feat: duplicate to all
This commit is contained in:
@@ -28,6 +28,13 @@ const SelectDealProductsModal = ({
|
||||
innerProps.onSelect(innerProps.dealProduct, dealProducts);
|
||||
context.closeContextModal(id);
|
||||
}
|
||||
const onDuplicateAllClick = () => {
|
||||
innerProps.onSelect(
|
||||
innerProps.dealProduct,
|
||||
innerProps.dealProducts.filter(item => item !== innerProps.dealProduct)
|
||||
);
|
||||
context.closeContextModal(id);
|
||||
}
|
||||
return (
|
||||
<Flex direction={"column"} gap={rem(10)}>
|
||||
<Flex>
|
||||
@@ -50,6 +57,11 @@ const SelectDealProductsModal = ({
|
||||
>
|
||||
Отменить
|
||||
</Button>
|
||||
<Button
|
||||
onClick={onDuplicateAllClick}
|
||||
>
|
||||
Продублировать на все товары
|
||||
</Button>
|
||||
<Button
|
||||
onClick={onSelectClick}
|
||||
variant={"default"}
|
||||
|
||||
Reference in New Issue
Block a user