perf/export-docx
Lei OT 11 months ago
parent acaf5a3de7
commit 3fb6872538

@ -39,7 +39,8 @@ const ProductInfo = ({ ...props }) => {
setInfoEditable(topPerm || (!hasHT && hasEditPer));
const _priceEditable = [-1, 3].includes(activeAgency?.audit_state_id) || isEmpty(editingProduct?.info?.id);
setPriceEditable(topPerm || (_priceEditable && hasEditPer));
// setPriceEditable(topPerm || (_priceEditable && hasEditPer));
setPriceEditable(true); // debug: 0
const showExtras = topPerm && hasHT; // !isEmpty(editingProduct) &&
setExtrasVisible(showExtras);
@ -50,7 +51,7 @@ const ProductInfo = ({ ...props }) => {
values.travel_agency_id = activeAgency.travel_agency_id;
const copyNewProduct = structuredClone(newProductRecord);
const poster = {
...(topPerm ? {} : { 'audit_state': -1 }), // :
// ...(topPerm ? { } : { 'audit_state': -1 }), // :
// "create_date": dayjs().format('YYYY-MM-DD HH:mm:ss'),
// "created_by": userId,
'travel_agency_id': activeAgency.travel_agency_id,
@ -96,6 +97,8 @@ const ProductInfo = ({ ...props }) => {
items={[
{ title: productsTypesMapVal[editingProduct?.info?.product_type_id]?.label || editingProduct?.info?.product_type_name },
{ title: editingProduct?.info?.title ?? t('New') },
{ title: 'htID: ' + editingProduct?.info?.htid },
{ title: 'ID: ' + editingProduct?.info?.id },
]}
/>
<Divider className='my-1' />

@ -200,6 +200,8 @@ const ProductInfoQuotation = ({ editable, ...props }) => {
}
const quotationColumns = [
{ title: 'id', dataIndex: 'id', width: 40, className: 'italic text-gray-400' }, // test: 0
{ title: 'WPI_SN', dataIndex: 'WPI_SN', width: 40, className: 'italic text-gray-400' }, // test: 0
{ title: t('products:adultPrice'), dataIndex: 'adult_cost', width: '4rem' },
{ title: t('products:childrenPrice'), dataIndex: 'child_cost', width: '4rem' },
{ title: t('products:currency'), dataIndex: 'currency', width: '4rem' },
@ -229,7 +231,8 @@ const ProductInfoQuotation = ({ editable, ...props }) => {
dataIndex: 'operation',
width: '3%',
render: (_, quotation) => {
const _rowEditable = [-1,3].includes(quotation.audit_state_id);
// const _rowEditable = [-1,3].includes(quotation.audit_state_id);
const _rowEditable = true; // test: 0
return (
<Space>
<Button type='link' disabled={!_rowEditable} onClick={() => onQuotationSeleted(quotation)}>{t('Edit')}</Button>

Loading…
Cancel
Save