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,
addres: values.addres,
email: values.email,
phone: values.phone,
phone: onlyNumber(values.phone),
web_site: values.web_site,
});
};

View File

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

View File

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

View File

@@ -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",

View File

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