bug fix
This commit is contained in:
@@ -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>
|
||||
)}
|
||||
|
||||
Reference in New Issue
Block a user