|
|
|
@ -6,6 +6,7 @@ import dayjs from 'dayjs';
|
|
|
|
|
import arraySupport from 'dayjs/plugin/arraySupport';
|
|
|
|
|
import { useTranslation } from 'react-i18next';
|
|
|
|
|
import useProductsStore, { copyAgencyDataAction } from '@/stores/Products/Index';
|
|
|
|
|
import { useProductsTypes, useProductsAuditStatesMapVal } from '@/hooks/useProductsSets';
|
|
|
|
|
import useFormStore from '@/stores/Form';
|
|
|
|
|
import { objectMapper } from '@/utils/commons';
|
|
|
|
|
import CopyProductsFormModal from './Detail/CopyProducts';
|
|
|
|
@ -20,6 +21,8 @@ function Index() {
|
|
|
|
|
const [searchValues, setSearchValues] = useProductsStore((state) => [state.searchValues, state.setSearchValues]);
|
|
|
|
|
const formValuesToSub = useFormStore(state => state.formValuesToSub);
|
|
|
|
|
|
|
|
|
|
const stateMapVal = useProductsAuditStatesMapVal();
|
|
|
|
|
|
|
|
|
|
const useYear = formValuesToSub.year;
|
|
|
|
|
|
|
|
|
|
const handleSearchAgency = (formVal = undefined) => {
|
|
|
|
@ -60,7 +63,12 @@ function Index() {
|
|
|
|
|
{ title: t('products:Vendor'), key: 'vendor', dataIndex: 'travel_agency_name' },
|
|
|
|
|
{ title: t('products:CreatedBy'), key: 'poster_by', dataIndex: 'poster_name' },
|
|
|
|
|
{ title: t('products:CreateDate'), key: 'poster_date', dataIndex: 'poster_date' },
|
|
|
|
|
{ title: t('products:AuState'), key: 'audit_state', dataIndex: 'audit_state' },
|
|
|
|
|
{ title: t('products:AuState'), key: 'audit_state', dataIndex: 'audit_state',
|
|
|
|
|
render: (_, r) => {
|
|
|
|
|
|
|
|
|
|
const stateCls = ` text-${stateMapVal[`${r.audit_state_id}`]?.color} `;
|
|
|
|
|
return <span className={stateCls}>{stateMapVal[`${r.audit_state_id}`]?.label}</span>;
|
|
|
|
|
}, },
|
|
|
|
|
{ title: t('products:AuditedBy'), key: 'audited_by', dataIndex: 'audited_by_name' },
|
|
|
|
|
{ title: t('products:AuditDate'), key: 'audit_date', dataIndex: 'audit_date' },
|
|
|
|
|
{
|
|
|
|
|