|
|
@ -132,7 +132,7 @@ const Extras = ({ productId, onChange, ...props }) => {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
const handleDelAddon = async (item) => {
|
|
|
|
const handleDelAddon = async (item) => {
|
|
|
|
const delSuccess = await delProductExtrasAction({ travel_agency_id, id: productId, extras: [item.id] });
|
|
|
|
const delSuccess = await delProductExtrasAction({ travel_agency_id, id: productId, del_extras_ids: [item.id] });
|
|
|
|
delSuccess ? message.success(`${t('Success')}`) : message.error(`${t('Failed')}`);
|
|
|
|
delSuccess ? message.success(`${t('Success')}`) : message.error(`${t('Failed')}`);
|
|
|
|
await handleGetAgencyProductExtras();
|
|
|
|
await handleGetAgencyProductExtras();
|
|
|
|
};
|
|
|
|
};
|
|
|
@ -150,7 +150,7 @@ const Extras = ({ productId, onChange, ...props }) => {
|
|
|
|
dataIndex: 'operation',
|
|
|
|
dataIndex: 'operation',
|
|
|
|
width: '4rem',
|
|
|
|
width: '4rem',
|
|
|
|
render: (_, r) => (
|
|
|
|
render: (_, r) => (
|
|
|
|
<Popconfirm title={t('sureDelete')} onConfirm={(e) => handleDelAddon(r)} okText={t('Yes')} >
|
|
|
|
<Popconfirm title={t('sureDelete')} onConfirm={(e) => handleDelAddon(r.info)} okText={t('Yes')} >
|
|
|
|
<Button size='small' type='link' danger>
|
|
|
|
<Button size='small' type='link' danger>
|
|
|
|
{t('Delete')}
|
|
|
|
{t('Delete')}
|
|
|
|
</Button>
|
|
|
|
</Button>
|
|
|
|