Error al insertar un bloque: falta inicializar el resto de campos (dto, precio unitario, etc)
This commit is contained in:
parent
4a53730bbb
commit
d24f8859b7
@ -9,7 +9,7 @@ import { DataTableProvider } from "@/lib/hooks";
|
||||
import { cn } from "@/lib/utils";
|
||||
import { ResizableHandle, ResizablePanel, ResizablePanelGroup } from "@/ui";
|
||||
import { useToast } from "@/ui/use-toast";
|
||||
import { CurrencyData, Language, Quantity } from "@shared/contexts";
|
||||
import { CurrencyData, Language, Quantity, UnitPrice } from "@shared/contexts";
|
||||
import { ColumnDef } from "@tanstack/react-table";
|
||||
import { t } from "i18next";
|
||||
import { ChevronDownIcon, ChevronUpIcon, CopyIcon, Trash2Icon } from "lucide-react";
|
||||
@ -241,6 +241,18 @@ export const QuoteDetailsCardEditor = ({
|
||||
(block: any) => {
|
||||
fieldActions.append({
|
||||
description: `${block.title}\n${block.body}`,
|
||||
quantity: {
|
||||
amount: null,
|
||||
scale: Quantity.DEFAULT_SCALE,
|
||||
},
|
||||
unit_price: {
|
||||
amount: null,
|
||||
scale: UnitPrice.DEFAULT_SCALE,
|
||||
},
|
||||
discount: {
|
||||
amount: null,
|
||||
scale: 2,
|
||||
},
|
||||
});
|
||||
toast({
|
||||
title: t("quotes.blocks_picker_dialog.toast_article_added"),
|
||||
|
||||
Loading…
Reference in New Issue
Block a user