bug fix
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
|
||||
import { getDetailAgency, updateAgencyStatus } from "@/pages/agencies/lib/api";
|
||||
import formatPhone from "@/shared/lib/formatPhone";
|
||||
import onlyNumber from "@/shared/lib/onlyNumber";
|
||||
import { Button } from "@/shared/ui/button";
|
||||
import { Card, CardContent, CardHeader, CardTitle } from "@/shared/ui/card";
|
||||
import {
|
||||
@@ -106,7 +107,7 @@ const EditAgency = () => {
|
||||
form.setValue("name", agency.name);
|
||||
form.setValue("addres", agency.addres);
|
||||
form.setValue("email", agency.email);
|
||||
form.setValue("phone", agency.phone);
|
||||
form.setValue("phone", onlyNumber(agency.phone));
|
||||
form.setValue("web_site", agency.web_site);
|
||||
}
|
||||
}, [data, form]);
|
||||
|
||||
@@ -129,10 +129,12 @@ const StepOne = ({
|
||||
|
||||
// 🔹 TransportS
|
||||
const transports =
|
||||
tour.transports?.map((t, i) => ({
|
||||
transport: i + 1,
|
||||
tour.transports?.map((t) => ({
|
||||
transport: t.transport.id,
|
||||
price: t.price ?? 0,
|
||||
})) ?? [];
|
||||
console.log("transport", transports);
|
||||
|
||||
setTransportPrices(transports.map((t) => formatPrice(t.price ?? 0)));
|
||||
|
||||
// 🔹 Tarif
|
||||
|
||||
@@ -18,6 +18,7 @@ import {
|
||||
} from "@/shared/ui/form";
|
||||
import { Input } from "@/shared/ui/input";
|
||||
import IconSelect from "@/shared/ui/iocnSelect";
|
||||
import { Label } from "@/shared/ui/label";
|
||||
import {
|
||||
Table,
|
||||
TableBody,
|
||||
@@ -312,15 +313,17 @@ const TransportTable = ({
|
||||
<FormField
|
||||
control={form.control}
|
||||
name="icon_name"
|
||||
render={() => (
|
||||
render={({ field }) => (
|
||||
<FormItem>
|
||||
<FormLabel>{t("Belgi (Icon)")}</FormLabel>
|
||||
<FormControl className="w-full">
|
||||
<Label className="text-md">{t("Belgi (Icon)")}</Label>
|
||||
|
||||
<div className="flex flex-col gap-4 w-full">
|
||||
<IconSelect
|
||||
setSelectedIcon={setSelectedIcon}
|
||||
selectedIcon={selectedIcon}
|
||||
selectedIcon={field.value ?? ""}
|
||||
setSelectedIcon={(val: string) => field.onChange(val)}
|
||||
/>
|
||||
</FormControl>
|
||||
</div>
|
||||
|
||||
<FormMessage />
|
||||
</FormItem>
|
||||
)}
|
||||
|
||||
@@ -35,8 +35,8 @@ httpClient.interceptors.request.use(
|
||||
if (method === "get") {
|
||||
// GET so'rovlarda hozirgi i18n tilini yuboramiz
|
||||
config.headers["Accept-Language"] = i18n.language;
|
||||
} else if (["put", "post", "delete"].includes(method)) {
|
||||
// PUT, POST, DELETE da faqat "uz"
|
||||
} else if (["put", "patch", "post", "delete"].includes(method)) {
|
||||
// PUT, PATCH, POST, DELETE da faqat "uz"
|
||||
config.headers["Accept-Language"] = "uz";
|
||||
}
|
||||
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
export const hotelIcons = [
|
||||
{ name: "Wifi", uz: "Wi-Fi", ru: "Wi-Fi" },
|
||||
{ name: "Bus", uz: "Avtobus", ru: "Автобус" },
|
||||
{ name: "CarFront", uz: "Auto", ru: "Авто" },
|
||||
{ name: "PlaneTakeoff", uz: "Avia", ru: "Авиа" },
|
||||
{ name: "WifiOff", uz: "Wi-Fi mavjud emas", ru: "Нет Wi-Fi" },
|
||||
{ name: "Tv", uz: "Televizor", ru: "Телевизор" },
|
||||
|
||||
Reference in New Issue
Block a user