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:
@@ -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
|
||||
}
|
||||
Reference in New Issue
Block a user