|
|
@ -10,12 +10,15 @@ import RequireAuth from '@/components/RequireAuth';
|
|
|
|
import { PERM_PRODUCTS_MANAGEMENT } from '@/config';
|
|
|
|
import { PERM_PRODUCTS_MANAGEMENT } from '@/config';
|
|
|
|
import { useProductsTypesMapVal } from '@/hooks/useProductsSets';
|
|
|
|
import { useProductsTypesMapVal } from '@/hooks/useProductsSets';
|
|
|
|
import { usingStorage } from '@/hooks/usingStorage';
|
|
|
|
import { usingStorage } from '@/hooks/usingStorage';
|
|
|
|
|
|
|
|
import useProductsStore from '@/stores/Products/Index';
|
|
|
|
|
|
|
|
|
|
|
|
const NewAddonModal = ({ onPick, ...props }) => {
|
|
|
|
const NewAddonModal = ({ onPick, ...props }) => {
|
|
|
|
const { travel_agency_id, use_year } = useParams();
|
|
|
|
// const { travel_agency_id, use_year } = useParams();
|
|
|
|
const { t } = useTranslation();
|
|
|
|
const { t } = useTranslation();
|
|
|
|
const { notification, message } = App.useApp();
|
|
|
|
const { notification, message } = App.useApp();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const [{ travel_agency_id, use_year }] = useProductsStore((state) => [state.switchParams]);
|
|
|
|
|
|
|
|
|
|
|
|
const productsTypesMapVal = useProductsTypesMapVal();
|
|
|
|
const productsTypesMapVal = useProductsTypesMapVal();
|
|
|
|
|
|
|
|
|
|
|
|
const [open, setOpen] = useState(false);
|
|
|
|
const [open, setOpen] = useState(false);
|
|
|
@ -29,7 +32,7 @@ const NewAddonModal = ({ onPick, ...props }) => {
|
|
|
|
setSearchLoading(true);
|
|
|
|
setSearchLoading(true);
|
|
|
|
setSearchResult([]);
|
|
|
|
setSearchResult([]);
|
|
|
|
const search_year = year || use_year;
|
|
|
|
const search_year = year || use_year;
|
|
|
|
const result = await searchPublishedProductsAction({ ...param, use_year: search_year, travel_agency_id, });
|
|
|
|
const result = await searchPublishedProductsAction({ ...param, use_year: search_year, travel_agency_id });
|
|
|
|
setSearchResult(result);
|
|
|
|
setSearchResult(result);
|
|
|
|
setSearchLoading(false);
|
|
|
|
setSearchLoading(false);
|
|
|
|
};
|
|
|
|
};
|
|
|
@ -110,8 +113,9 @@ const Extras = ({ productId, onChange, ...props }) => {
|
|
|
|
const { t } = useTranslation();
|
|
|
|
const { t } = useTranslation();
|
|
|
|
const { notification, message } = App.useApp();
|
|
|
|
const { notification, message } = App.useApp();
|
|
|
|
|
|
|
|
|
|
|
|
const { travel_agency_id, use_year } = useParams();
|
|
|
|
// const { travel_agency_id, use_year } = useParams();
|
|
|
|
const { travelAgencyId } = usingStorage();
|
|
|
|
const { travelAgencyId } = usingStorage();
|
|
|
|
|
|
|
|
const [{travel_agency_id, use_year}] = useProductsStore((state) => [state.switchParams]);
|
|
|
|
|
|
|
|
|
|
|
|
const [extrasData, setExtrasData] = useState([]);
|
|
|
|
const [extrasData, setExtrasData] = useState([]);
|
|
|
|
|
|
|
|
|
|
|
|