feat(dashboard): Discounts details + edits (#6547)

**What**
- Discounts details page
- Edit discount details
- Edit discount configurations
- `ListSummary` component

**NOTE**
- conditions edit form will be implemented in a separate PR
- edit details from is missing metadata component which will be added later

---


https://github.com/medusajs/medusa/assets/16856471/c878af4a-48c2-4c45-b824-662784c7a139
This commit is contained in:
Frane Polić
2024-03-06 14:08:15 +00:00
committed by GitHub
parent a5a2395622
commit fcb03d60ea
43 changed files with 1783 additions and 131 deletions
@@ -0,0 +1,16 @@
/**
* Pick properties from an object and copy them to a new object
* @param obj
* @param keys
*/
export function pick(obj: Record<string, any>, keys: string[]) {
const ret: Record<string, any> = {}
keys.forEach((k) => {
if (k in obj) {
ret[k] = obj[k]
}
})
return ret
}