-
+
{t("quotes.create.title")}
diff --git a/client/src/app/quotes/edit.tsx b/client/src/app/quotes/edit.tsx
index 7dd583a..9e131fd 100644
--- a/client/src/app/quotes/edit.tsx
+++ b/client/src/app/quotes/edit.tsx
@@ -1,12 +1,19 @@
-import { ErrorOverlay, FormCurrencyField, LoadingOverlay, SubmitButton } from "@/components";
+import {
+ BackHistoryButton,
+ CancelButton,
+ ErrorOverlay,
+ FormCurrencyField,
+ LoadingOverlay,
+ SubmitButton,
+} from "@/components";
import { calculateItemTotals } from "@/lib/calc";
import { useUrlId } from "@/lib/hooks/useUrlId";
import { Badge, Button, Form, Tabs, TabsContent, TabsList, TabsTrigger } from "@/ui";
import { CurrencyData, IUpdateQuote_Request_DTO, MoneyValue } from "@shared/contexts";
import { t } from "i18next";
-import { ChevronLeftIcon } from "lucide-react";
import { useEffect, useState } from "react";
import { SubmitHandler, useForm } from "react-hook-form";
+import { useNavigate } from "react-router-dom";
import { QuoteDetailsCardEditor, QuoteGeneralCardEditor } from "./components/editors";
import { useQuotes } from "./hooks";
@@ -14,6 +21,7 @@ interface QuoteDataForm extends IUpdateQuote_Request_DTO {}
// eslint-disable-next-line @typescript-eslint/no-unused-vars
export const QuoteEdit = () => {
+ const navigate = useNavigate();
const quoteId = useUrlId();
const [quoteCurrency, setQuoteCurrency] = useState
(
CurrencyData.createDefaultCode().object
@@ -46,6 +54,20 @@ export const QuoteEdit = () => {
payment_method: "",
notes: "",
validity: "",
+ subtotal_price: {
+ amount: undefined,
+ precision: 2,
+ currency_code: data?.currency_code,
+ },
+ discount: {
+ amount: undefined,
+ precision: 0,
+ },
+ total_price: {
+ amount: undefined,
+ precision: 2,
+ currency_code: data?.currency_code,
+ },
items: [],
},
});
@@ -140,10 +162,7 @@ export const QuoteEdit = () => {