add react-query

This commit is contained in:
Julien Aldon
2026-02-10 17:21:26 +01:00
parent 7df0af8f1d
commit feea610d09
6 changed files with 53 additions and 6 deletions

View File

@@ -2,8 +2,11 @@ import { Flex, Grid, Select, Stack, Text, TextInput, Title } from "@mantine/core
import { t } from "../../config/i18n";
import { IconUser } from "@tabler/icons-react";
import ShipmentCard from "../../components/ShipmentCard";
import { getForm } from "../../services/api";
export function ContractForm() {
const { isPending, error, data } = getForm(1);
console.log(isPending, error, data);
return (
<Flex
w={{base: "100%", sm: "50%", lg: "60%"}}
@@ -50,11 +53,13 @@ export function ContractForm() {
</Stack>
<Stack>
<Text>{t("products reccurent phase")}</Text>
{isPending ||
<Select
label={`${t("select reccurent product")} (${t("this product will be distributed for all shipments")})`}
placeholder={t("select reccurent product")}
data={["qwe", "qweqwe", "qweqweqwe"]}
data={data?.productor?.products.map(el=> el.name)}
/>
}
</Stack>
<Stack>
<Text>{t("products planned phase")}</Text>