|
|
@ -109,21 +109,23 @@ const PriceTable = ({ productType, dataSource, refresh }) => {
|
|
|
|
key: 'action',
|
|
|
|
key: 'action',
|
|
|
|
render: (_, r, ri) =>
|
|
|
|
render: (_, r, ri) =>
|
|
|
|
[-1, 0, 3].includes(Number(r.audit_state_id)) ? (
|
|
|
|
[-1, 0, 3].includes(Number(r.audit_state_id)) ? (
|
|
|
|
<RequireAuth subject={PERM_PRODUCTS_OFFER_AUDIT}>
|
|
|
|
<>
|
|
|
|
<Space className='w-full [&>*:last-child]:ms-auto'>
|
|
|
|
<Space className='w-full [&>*:last-child]:ms-auto'>
|
|
|
|
{Number(r.audit_state_id) === 0 && (
|
|
|
|
<RequireAuth subject={PERM_PRODUCTS_OFFER_AUDIT}>
|
|
|
|
<>
|
|
|
|
{Number(r.audit_state_id) === 0 && (
|
|
|
|
<Button onClick={() => handleAuditPriceItem('2', r, ri)}>✔</Button>
|
|
|
|
<div className='flex gap-2'>
|
|
|
|
<Button onClick={() => handleAuditPriceItem('3', r, ri)}>✖</Button>
|
|
|
|
<Button onClick={() => handleAuditPriceItem('2', r, ri)}>✔</Button>
|
|
|
|
</>
|
|
|
|
<Button onClick={() => handleAuditPriceItem('3', r, ri)}>✖</Button>
|
|
|
|
)}
|
|
|
|
</div>
|
|
|
|
|
|
|
|
)}
|
|
|
|
|
|
|
|
</RequireAuth>
|
|
|
|
<ProductQuotationLogPopover
|
|
|
|
<ProductQuotationLogPopover
|
|
|
|
method={'history'}
|
|
|
|
method={'history'}
|
|
|
|
{...{ travel_agency_id, product_id: r.info.id, price_id: r.id, use_year }}
|
|
|
|
{...{ travel_agency_id, product_id: r.info.id, price_id: r.id, use_year }}
|
|
|
|
onOpenChange={(open) => setLogOpenPriceRow(open ? r.id : null)}
|
|
|
|
onOpenChange={(open) => setLogOpenPriceRow(open ? r.id : null)}
|
|
|
|
/>
|
|
|
|
/>
|
|
|
|
</Space>
|
|
|
|
</Space>
|
|
|
|
</RequireAuth>
|
|
|
|
</>
|
|
|
|
) : null,
|
|
|
|
) : null,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
// {
|
|
|
|
// {
|
|
|
@ -183,11 +185,11 @@ const TypesPanels = (props) => {
|
|
|
|
r.concat(
|
|
|
|
r.concat(
|
|
|
|
c.quotation.map((q, i) => ({
|
|
|
|
c.quotation.map((q, i) => ({
|
|
|
|
...q,
|
|
|
|
...q,
|
|
|
|
weekdays: q.weekdays
|
|
|
|
// weekdays: q.weekdays
|
|
|
|
.split(',')
|
|
|
|
// .split(',')
|
|
|
|
.filter(Boolean)
|
|
|
|
// .filter(Boolean)
|
|
|
|
.map((w) => t(`weekdaysShort.${w}`))
|
|
|
|
// .map((w) => t(`weekdaysShort.${w}`))
|
|
|
|
.join(', '),
|
|
|
|
// .join(', '),
|
|
|
|
info: c.info,
|
|
|
|
info: c.info,
|
|
|
|
lgc_details: c.lgc_details.reduce((rlgc, clgc) => ({...rlgc, [clgc.lgc]: clgc}), {}),
|
|
|
|
lgc_details: c.lgc_details.reduce((rlgc, clgc) => ({...rlgc, [clgc.lgc]: clgc}), {}),
|
|
|
|
rowSpan: i === 0 ? c.quotation.length : 0,
|
|
|
|
rowSpan: i === 0 ? c.quotation.length : 0,
|
|
|
|