.
This commit is contained in:
parent
9f655d47c0
commit
7ce5c5e7a7
@ -1,6 +1,7 @@
|
|||||||
import {
|
import {
|
||||||
BackHistoryButton,
|
BackHistoryButton,
|
||||||
CancelButton,
|
CancelButton,
|
||||||
|
ColorBadge,
|
||||||
ErrorOverlay,
|
ErrorOverlay,
|
||||||
LoadingOverlay,
|
LoadingOverlay,
|
||||||
SubmitButton,
|
SubmitButton,
|
||||||
@ -8,14 +9,13 @@ import {
|
|||||||
import { calculateQuoteItemTotals, calculateQuoteTotals } from "@/lib/calc";
|
import { calculateQuoteItemTotals, calculateQuoteTotals } from "@/lib/calc";
|
||||||
import { useUnsavedChangesNotifier } from "@/lib/hooks";
|
import { useUnsavedChangesNotifier } from "@/lib/hooks";
|
||||||
import { useUrlId } from "@/lib/hooks/useUrlId";
|
import { useUrlId } from "@/lib/hooks/useUrlId";
|
||||||
import { Badge, Button, Form, Tabs, TabsContent, TabsList, TabsTrigger } from "@/ui";
|
import { Button, Form, Tabs, TabsContent, TabsList, TabsTrigger } from "@/ui";
|
||||||
import { CurrencyData, IGetQuote_Response_DTO, Language } from "@shared/contexts";
|
import { CurrencyData, IGetQuote_Response_DTO, Language } from "@shared/contexts";
|
||||||
import { t } from "i18next";
|
import { t } from "i18next";
|
||||||
import { useEffect, useMemo, useState } from "react";
|
import { useEffect, useMemo, useState } from "react";
|
||||||
import { SubmitHandler, useForm } from "react-hook-form";
|
import { SubmitHandler, useForm } from "react-hook-form";
|
||||||
import { useNavigate } from "react-router-dom";
|
import { useNavigate } from "react-router-dom";
|
||||||
import { toast } from "react-toastify";
|
import { toast } from "react-toastify";
|
||||||
|
|
||||||
import { QuotePricesResume } from "./components";
|
import { QuotePricesResume } from "./components";
|
||||||
import { QuoteDetailsCardEditor, QuoteGeneralCardEditor } from "./components/editors";
|
import { QuoteDetailsCardEditor, QuoteGeneralCardEditor } from "./components/editors";
|
||||||
import { useQuotes } from "./hooks";
|
import { useQuotes } from "./hooks";
|
||||||
@ -131,7 +131,7 @@ export const QuoteEdit = () => {
|
|||||||
|
|
||||||
const onSubmit: SubmitHandler<QuoteDataForm> = async (data) => {
|
const onSubmit: SubmitHandler<QuoteDataForm> = async (data) => {
|
||||||
// Transformación del form -> typo de request
|
// Transformación del form -> typo de request
|
||||||
console.log(data);
|
|
||||||
mutate(data, {
|
mutate(data, {
|
||||||
onError: (error) => {
|
onError: (error) => {
|
||||||
console.debug(error);
|
console.debug(error);
|
||||||
@ -246,9 +246,8 @@ export const QuoteEdit = () => {
|
|||||||
<h1 className='flex-1 text-xl font-semibold tracking-tight shrink-0 whitespace-nowrap sm:grow-0'>
|
<h1 className='flex-1 text-xl font-semibold tracking-tight shrink-0 whitespace-nowrap sm:grow-0'>
|
||||||
{t("quotes.edit.title")}
|
{t("quotes.edit.title")}
|
||||||
</h1>
|
</h1>
|
||||||
<Badge variant='default' className='ml-auto sm:ml-0'>
|
<ColorBadge label={data.status} className='ml-auto sm:ml-0' />
|
||||||
{data.status}
|
|
||||||
</Badge>
|
|
||||||
<div className='items-center hidden gap-2 md:ml-auto md:flex'>
|
<div className='items-center hidden gap-2 md:ml-auto md:flex'>
|
||||||
<CancelButton
|
<CancelButton
|
||||||
label={t("common.cancel")}
|
label={t("common.cancel")}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user