This commit is contained in:
Samandar Turgunboyev
2025-11-24 18:08:09 +05:00
parent 11f88d1edf
commit 3eddadaad0
5 changed files with 13 additions and 7 deletions

View File

@@ -119,7 +119,7 @@ const EditAgency = () => {
name: values.name, name: values.name,
addres: values.addres, addres: values.addres,
email: values.email, email: values.email,
phone: values.phone, phone: onlyNumber(values.phone),
web_site: values.web_site, web_site: values.web_site,
}); });
}; };

View File

@@ -67,7 +67,7 @@ const getDetailToursId = async ({
}: { }: {
id: number; id: number;
}): Promise<AxiosResponse<GetDetailTours>> => { }): Promise<AxiosResponse<GetDetailTours>> => {
const response = await httpClient.get(`tickets/${id}/`); const response = await httpClient.get(`${GET_TICKET}${id}/`);
return response; return response;
}; };

View File

@@ -22,6 +22,7 @@ const CreateEditTour = () => {
select(data) { select(data) {
return data.data; return data.data;
}, },
enabled: !!id,
}); });
return ( return (

View File

@@ -314,8 +314,10 @@ const StepTwo = ({
data.hotelType && data.hotelType &&
data.hotelType.forEach((id) => formData.append("hotel_type", id)); data.hotelType.forEach((id) => formData.append("hotel_type", id));
data.hotelFeatures && data.hotelFeaturesType &&
data.hotelFeatures.forEach((id) => formData.append("hotel_features", id)); data.hotelFeaturesType.forEach((id) =>
formData.append("hotel_features", id),
);
if (isEditMode && hotelDetail && hotelDetail?.length > 0) { if (isEditMode && hotelDetail && hotelDetail?.length > 0) {
edit({ edit({
@@ -329,8 +331,6 @@ const StepTwo = ({
} }
}; };
console.log(hotelDetail);
const mealPlans = [ const mealPlans = [
"Breakfast Only", "Breakfast Only",
"Half Board", "Half Board",

View File

@@ -242,7 +242,12 @@ const Tours = ({ user }: { user: Role }) => {
<Button <Button
variant="default" variant="default"
size="sm" size="sm"
onClick={() => navigate(`/tours/${tour.id}`)} onClick={() => {
navigate(`/tours/${tour.id}`);
queryClient.refetchQueries({
queryKey: ["tours_detail"],
});
}}
> >
{t("Batafsil")} {t("Batafsil")}
</Button> </Button>