diff --git a/src/pages/agencies/ui/EditAgecy.tsx b/src/pages/agencies/ui/EditAgecy.tsx index d6f2aab..ade48eb 100644 --- a/src/pages/agencies/ui/EditAgecy.tsx +++ b/src/pages/agencies/ui/EditAgecy.tsx @@ -119,7 +119,7 @@ const EditAgency = () => { name: values.name, addres: values.addres, email: values.email, - phone: values.phone, + phone: onlyNumber(values.phone), web_site: values.web_site, }); }; diff --git a/src/pages/tours/lib/api.ts b/src/pages/tours/lib/api.ts index 1a973ba..97e04c1 100644 --- a/src/pages/tours/lib/api.ts +++ b/src/pages/tours/lib/api.ts @@ -67,7 +67,7 @@ const getDetailToursId = async ({ }: { id: number; }): Promise> => { - const response = await httpClient.get(`tickets/${id}/`); + const response = await httpClient.get(`${GET_TICKET}${id}/`); return response; }; diff --git a/src/pages/tours/ui/CreateEditTour.tsx b/src/pages/tours/ui/CreateEditTour.tsx index 14057d0..288315c 100644 --- a/src/pages/tours/ui/CreateEditTour.tsx +++ b/src/pages/tours/ui/CreateEditTour.tsx @@ -22,6 +22,7 @@ const CreateEditTour = () => { select(data) { return data.data; }, + enabled: !!id, }); return ( diff --git a/src/pages/tours/ui/StepTwo.tsx b/src/pages/tours/ui/StepTwo.tsx index c6a25cd..6aaec71 100644 --- a/src/pages/tours/ui/StepTwo.tsx +++ b/src/pages/tours/ui/StepTwo.tsx @@ -314,8 +314,10 @@ const StepTwo = ({ data.hotelType && data.hotelType.forEach((id) => formData.append("hotel_type", id)); - data.hotelFeatures && - data.hotelFeatures.forEach((id) => formData.append("hotel_features", id)); + data.hotelFeaturesType && + data.hotelFeaturesType.forEach((id) => + formData.append("hotel_features", id), + ); if (isEditMode && hotelDetail && hotelDetail?.length > 0) { edit({ @@ -329,8 +331,6 @@ const StepTwo = ({ } }; - console.log(hotelDetail); - const mealPlans = [ "Breakfast Only", "Half Board", diff --git a/src/pages/tours/ui/Tours.tsx b/src/pages/tours/ui/Tours.tsx index 25c496b..d6264ab 100644 --- a/src/pages/tours/ui/Tours.tsx +++ b/src/pages/tours/ui/Tours.tsx @@ -242,7 +242,12 @@ const Tours = ({ user }: { user: Role }) => {