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