|
|
@ -15,6 +15,7 @@ import VendorSelector from '@/components/VendorSelector';
|
|
|
|
import AuditStateSelector from '@/components/AuditStateSelector';
|
|
|
|
import AuditStateSelector from '@/components/AuditStateSelector';
|
|
|
|
import NewProductModal from './NewProductModal';
|
|
|
|
import NewProductModal from './NewProductModal';
|
|
|
|
import ContractRemarksModal from './ContractRemarksModal'
|
|
|
|
import ContractRemarksModal from './ContractRemarksModal'
|
|
|
|
|
|
|
|
import { usingStorage } from '@/hooks/usingStorage';
|
|
|
|
|
|
|
|
|
|
|
|
import AgencyContract from '../Print/AgencyContract_v0903';
|
|
|
|
import AgencyContract from '../Print/AgencyContract_v0903';
|
|
|
|
import { saveAs } from "file-saver";
|
|
|
|
import { saveAs } from "file-saver";
|
|
|
@ -26,6 +27,7 @@ const Header = ({ refresh, ...props }) => {
|
|
|
|
const showEditA = !location.pathname.includes('edit');
|
|
|
|
const showEditA = !location.pathname.includes('edit');
|
|
|
|
const showAuditA = !location.pathname.includes('audit');
|
|
|
|
const showAuditA = !location.pathname.includes('audit');
|
|
|
|
const { travel_agency_id, use_year, audit_state } = useParams();
|
|
|
|
const { travel_agency_id, use_year, audit_state } = useParams();
|
|
|
|
|
|
|
|
const { travelAgencyId } = usingStorage();
|
|
|
|
const { t } = useTranslation();
|
|
|
|
const { t } = useTranslation();
|
|
|
|
const isPermitted = useAuthStore((state) => state.isPermitted);
|
|
|
|
const isPermitted = useAuthStore((state) => state.isPermitted);
|
|
|
|
const [activeAgency, setActiveAgency] = useProductsStore((state) => [state.activeAgency, state.setActiveAgency]);
|
|
|
|
const [activeAgency, setActiveAgency] = useProductsStore((state) => [state.activeAgency, state.setActiveAgency]);
|
|
|
@ -49,7 +51,7 @@ const Header = ({ refresh, ...props }) => {
|
|
|
|
const [pickAuditState, setPickAuditState] = useState();
|
|
|
|
const [pickAuditState, setPickAuditState] = useState();
|
|
|
|
useEffect(() => {
|
|
|
|
useEffect(() => {
|
|
|
|
const _param = objectMapper(param, { pick_year: 'use_year', pick_agency: 'travel_agency_id', pick_state: 'audit_state' });
|
|
|
|
const _param = objectMapper(param, { pick_year: 'use_year', pick_agency: 'travel_agency_id', pick_state: 'audit_state' });
|
|
|
|
setSwitchParams({ ..._param });
|
|
|
|
setSwitchParams({ ..._param, travel_agency_id: _param?.travel_agency_id || travelAgencyId });
|
|
|
|
refresh(param);
|
|
|
|
refresh(param);
|
|
|
|
|
|
|
|
|
|
|
|
return () => {};
|
|
|
|
return () => {};
|
|
|
|