diff --git a/client/package.json b/client/package.json index 9865b1a..fae61e5 100644 --- a/client/package.json +++ b/client/package.json @@ -1,7 +1,7 @@ { "name": "@uecko-presupuestador/client", "private": true, - "version": "1.0.9", + "version": "1.1.0", "author": "Rodax Software ", "type": "module", "scripts": { diff --git a/client/src/app/quotes/components/editors/BlocksPickerDialog/BlockList.tsx b/client/src/app/quotes/components/editors/BlocksPickerDialog/BlockList.tsx index f6394bc..4c88f71 100644 --- a/client/src/app/quotes/components/editors/BlocksPickerDialog/BlockList.tsx +++ b/client/src/app/quotes/components/editors/BlocksPickerDialog/BlockList.tsx @@ -99,39 +99,42 @@ export const BlockList = ({ onSelect: (data: BlockDataType, quantity: number) => void; }) => { const { i18n } = useTranslation(); - const [language] = useState(i18n.language); + const [language] = useState(i18n.resolvedLanguage || "es"); const [listState] = useState(blockData[language.toLowerCase()]); + console.log(language); + return (
- {listState - .sort((a, b) => a.title.localeCompare(b.title)) - .map((_block, _blockIdx) => { - return ( -
- - ); - })} + + ); + })}
); diff --git a/dist/client/assets/index-DmLZGQJJ.js b/dist/client/assets/index-C4JGyIFf.js similarity index 99% rename from dist/client/assets/index-DmLZGQJJ.js rename to dist/client/assets/index-C4JGyIFf.js index 40a1e0b..19cd576 100644 --- a/dist/client/assets/index-DmLZGQJJ.js +++ b/dist/client/assets/index-C4JGyIFf.js @@ -519,7 +519,7 @@ Acabado paneles: TRANSPARENTE TEMPLADO \r Tirador: DOBLE POR PUERTA\r Freno: DOBLE POR PUERTA (APERTURA Y CIERRE)\r Guía: VISTA (DOBLE EMBELLECEDOR)\r -Nº de hojas: 2 CORREDERAS + 2 FIJOS`}]},FH=({onSelect:t})=>{const{i18n:e}=K$(),[n]=S.useState(e.language),[r]=S.useState(dBe[n.toLowerCase()]);return b.jsx(JR,{className:"h-96",children:b.jsx("div",{className:"flex flex-col gap-2 p-4 pt-0",children:r.sort((s,i)=>s.title.localeCompare(i.title)).map((s,i)=>b.jsx("button",{className:"flex flex-col items-start gap-2 p-3 text-sm text-left transition-all border rounded-lg hover:bg-accent",onClick:()=>t&&t(s,1),children:b.jsxs("div",{className:"flex flex-col w-full gap-1",children:[b.jsx("div",{className:"flex items-center",children:b.jsx("div",{className:"flex items-center gap-2",children:b.jsx("div",{className:"font-semibold",children:s.title})})}),b.jsx("div",{className:"text-xs line-clamp-2 text-muted-foreground",children:b.jsx("p",{dangerouslySetInnerHTML:{__html:s.body.substring(0,300).replace(`\r +Nº de hojas: 2 CORREDERAS + 2 FIJOS`}]},FH=({onSelect:t})=>{const{i18n:e}=K$(),[n]=S.useState(e.resolvedLanguage||"es"),[r]=S.useState(dBe[n.toLowerCase()]);return console.log(n),b.jsx(JR,{className:"h-96",children:b.jsx("div",{className:"flex flex-col gap-2 p-4 pt-0",children:r&&r.sort((s,i)=>s.title.localeCompare(i.title)).map((s,i)=>b.jsx("button",{className:"flex flex-col items-start gap-2 p-3 text-sm text-left transition-all border rounded-lg hover:bg-accent",onClick:()=>t&&t(s,1),children:b.jsxs("div",{className:"flex flex-col w-full gap-1",children:[b.jsx("div",{className:"flex items-center",children:b.jsx("div",{className:"flex items-center gap-2",children:b.jsx("div",{className:"font-semibold",children:s.title})})}),b.jsx("div",{className:"text-xs line-clamp-2 text-muted-foreground",children:b.jsx("p",{dangerouslySetInnerHTML:{__html:s.body.substring(0,300).replace(`\r `,"
")}})})]})},s.id))})})},fBe=({isOpen:t,onOpenChange:e,onSelect:n})=>Dne("(min-width: 768px)")?b.jsx(Py,{modal:!0,open:t,onOpenChange:e,children:b.jsxs(qp,{className:"w-full max-w-full md:w-9/12 lg:w-10/12",children:[b.jsxs(Wp,{children:[b.jsx(Kp,{children:te("quotes.blocks_picker_dialog.title")}),b.jsx(R_,{children:te("quotes.blocks_picker_dialog.description")})]}),b.jsx(FH,{onSelect:n}),b.jsx(Gp,{children:b.jsx(qe,{type:"submit",onClick:()=>e(!1),children:te("common.close")})})]})}):b.jsx(T2,{open:t,onOpenChange:e,children:b.jsxs(k2,{children:[b.jsxs(D2,{className:"text-left",children:[b.jsx(O2,{children:te("quotes.blocks_picker_dialog.title")}),b.jsx(I2,{children:te("quotes.blocks_picker_dialog.description")})]}),b.jsx(FH,{onSelect:n}),b.jsx(M2,{className:"pt-2",children:b.jsx(aK,{asChild:!0,children:b.jsx(qe,{variant:"outline",children:te("common.close")})})})]})}),hBe=({isOpen:t,onOpenChange:e,onSelect:n})=>Dne("(min-width: 768px)")?b.jsx(Py,{modal:!0,open:t,onOpenChange:e,children:b.jsxs(qp,{className:"w-full max-w-full md:w-9/12 lg:w-10/12",children:[b.jsxs(Wp,{children:[b.jsx(Kp,{children:te("quotes.catalog_picker_dialog.title")}),b.jsx(R_,{children:te("quotes.catalog_picker_dialog.description")})]}),b.jsx(oy,{syncWithLocation:!1,initialPageSize:5,children:b.jsx(ej,{onSelect:n})}),b.jsx(Gp,{children:b.jsx(qe,{type:"submit",onClick:()=>e(!1),children:te("common.close")})})]})}):b.jsx(T2,{open:t,onOpenChange:e,children:b.jsxs(k2,{children:[b.jsxs(D2,{className:"text-left",children:[b.jsx(O2,{children:te("quotes.catalog_picker_dialog.title")}),b.jsx(I2,{children:te("quotes.catalog_picker_dialog.description")})]}),b.jsx(oy,{syncWithLocation:!1,initialPageSize:5,children:b.jsx(ej,{onSelect:n})}),b.jsx(M2,{className:"pt-2",children:b.jsx(aK,{asChild:!0,children:b.jsx(qe,{variant:"outline",children:te("common.close")})})})]})}),pBe=({currency:t,language:e,defaultValues:n})=>{const{toast:r}=nc(),{control:s,register:i}=Vi(),[o]=S.useState("dialog"),[a,c]=S.useState(!1),[u,f]=S.useState(!1),{fields:l,...d}=YAe({control:s,name:"items"}),p=Qze([{id:"description",accessorKey:"description",header:te("quotes.form_fields.items.description.label"),cell:({row:{index:_,original:A}})=>b.jsx(Ua,{readOnly:A==null?void 0:A.id_article,autoSize:!0,...i(`items.${_}.description`)}),size:500},{id:"quantity",accessorKey:"quantity",header:()=>b.jsx("div",{className:"text-right",children:te("quotes.form_fields.items.quantity.label")}),cell:({row:{index:_}})=>b.jsx(XLe,{scale:0,className:"text-right",...i(`items.${_}.quantity`)})},{id:"unit_price",accessorKey:"unit_price",header:()=>b.jsx("div",{className:"text-right",children:te("quotes.form_fields.items.unit_price.label")}),cell:({row:{index:_}})=>b.jsx(mC,{currency:t,language:e,scale:2,className:"text-right",...i(`items.${_}.unit_price`)})},{id:"subtotal_price",accessorKey:"subtotal_price",header:()=>b.jsx("div",{className:"text-right",children:te("quotes.form_fields.items.subtotal_price.label")}),cell:({row:{index:_}})=>b.jsx(mC,{currency:t,language:e,scale:2,readOnly:!0,className:"text-right",...i(`items.${_}.subtotal_price`)})},{id:"discount",accessorKey:"discount",header:()=>b.jsx("div",{className:"text-right",children:te("quotes.form_fields.items.discount.label")}),cell:({row:{index:_}})=>b.jsx(rA,{scale:2,className:"text-right",...i(`items.${_}.discount`)})},{id:"total_price",accessorKey:"total_price",header:()=>b.jsx("div",{className:"text-right",children:te("quotes.form_fields.items.total_price.label")}),cell:({row:{index:_}})=>b.jsx(mC,{variant:"ghost",currency:t,language:e,scale:2,readOnly:!0,className:"font-semibold text-right",...i(`items.${_}.total_price`)})}],{enableDragHandleColumn:!1,enableSelectionColumn:!0,enableActionsColumn:!0,rowActionFn:_=>{const{table:A,row:N}=_;return[{label:te("common.duplicate_row"),icon:b.jsx(pL,{className:"w-4 h-4 mr-2"}),onClick:()=>{var T;return(T=A.options.meta)==null?void 0:T.duplicateItems(N.index)}},{label:te("common.insert_row_above"),icon:b.jsx(uq,{className:"w-4 h-4 mr-2"}),onClick:()=>{var T;return(T=A.options.meta)==null?void 0:T.insertItem(N.index)}},{label:te("common.insert_row_below"),icon:b.jsx(my,{className:"w-4 h-4 mr-2"}),onClick:()=>{var T;return(T=A.options.meta)==null?void 0:T.insertItem(N.index+1)}},{label:"-"},{label:te("common.remove_row"),icon:b.jsx(yq,{className:"w-4 h-4 mr-2"}),onClick:()=>{var T;(T=A.options.meta)==null||T.deleteItems(N.index)}}]}}),h=S.useCallback((_,A=1)=>{d.append({..._,quantity:{amount:100*A,scale:Dp.DEFAULT_SCALE},unit_price:_.retail_price,discount:{amount:null,scale:2}}),r({title:te("quotes.catalog_picker_dialog.toast_article_added"),description:_.description})},[d]),m=S.useCallback(_=>{d.append({description:`${_.title} ${_.body}`}),r({title:te("quotes.blocks_picker_dialog.toast_article_added"),description:_.title})},[d]),[y,g]=S.useState(!1),v=[265,440,655],x=4;return o==="dialog"?b.jsxs("div",{className:"relative",children:[b.jsx($H,{actions:{...d,pickCatalogArticle:()=>c(!0),pickBlock:()=>f(!0)},columns:p,data:l,defaultValues:n}),b.jsx(hBe,{onSelect:h,isOpen:a,onOpenChange:c}),b.jsx(fBe,{onSelect:m,isOpen:u,onOpenChange:f})]}):b.jsxs(jPe,{direction:"horizontal",autoSaveId:"uecko.quotes.details_layout",className:"items-stretch h-full",children:[b.jsx(z5,{defaultSize:v[0],collapsedSize:x,collapsible:!0,minSize:50,maxSize:90,onCollapse:()=>{g(!0)},onExpand:()=>{g(!1)},className:ie(y&&"min-w-[50px] transition-all duration-300 ease-in-out"),children:b.jsx($H,{actions:d,columns:p,data:l,defaultValues:n})}),b.jsx(LPe,{withHandle:!0,className:"mx-3"}),b.jsx(z5,{defaultSize:v[1],minSize:10,children:b.jsx(oy,{syncWithLocation:!1,children:b.jsx(ej,{onSelect:h})})})]})},mBe=()=>{const{register:t,formState:e}=Vi();return b.jsxs("div",{className:"grid gap-6 md:grid-cols-6",children:[b.jsxs(nA,{className:"md:col-span-6",title:te("quotes.create.form_groups.general.title"),description:te("quotes.create.form_groups.general.desc"),children:[b.jsxs("div",{className:"grid grid-cols-6 gap-6",children:[b.jsx(ah,{required:!0,className:"col-span-2",label:te("quotes.form_fields.customer_reference.label"),description:te("quotes.form_fields.customer_reference.desc"),disabled:e.disabled,placeholder:te("quotes.form_fields.customer_reference.placeholder"),...t("customer_reference")}),b.jsx(lee,{required:!0,label:te("quotes.form_fields.date.label"),description:te("quotes.form_fields.date.desc"),disabled:e.disabled,placeholder:te("quotes.form_fields.date.placeholder"),...t("date",{required:!0})}),b.jsx(ah,{label:te("quotes.form_fields.validity.label"),description:te("quotes.form_fields.validity.desc"),disabled:e.disabled,placeholder:te("quotes.form_fields.validity.placeholder"),...t("validity",{required:!1})}),b.jsx(Ua,{className:"col-span-2",label:te("quotes.form_fields.payment_method.label"),description:te("quotes.form_fields.payment_method.desc"),disabled:e.disabled,placeholder:te("quotes.form_fields.payment_method.placeholder"),...t("payment_method",{required:!1})})]}),b.jsxs("div",{className:"grid grid-cols-6 gap-6",children:[b.jsx(Ua,{className:"col-span-3",required:!0,label:te("quotes.form_fields.customer_information.label"),description:te("quotes.form_fields.customer_information.desc"),disabled:e.disabled,placeholder:te("quotes.form_fields.customer_information.placeholder"),...t("customer_information",{required:!0}),errors:e.errors}),b.jsx(Ua,{className:"col-span-3",label:te("quotes.form_fields.notes.label"),description:te("quotes.form_fields.notes.desc"),disabled:e.disabled,placeholder:te("quotes.form_fields.notes.placeholder"),...t("notes",{required:!1})})]})]}),b.jsx(nA,{className:"hidden md:col-span-2",title:te("quotes.create.form_groups.status.title"),description:te("quotes.create.form_groups.status.desc"),children:b.jsxs("div",{className:"grid gap-6",children:[b.jsxs("div",{className:"grid gap-3",children:[b.jsx(Qp,{htmlFor:"status",children:"Status"}),b.jsxs(d$,{children:[b.jsx(rN,{id:"status","aria-label":"Select status",children:b.jsx(f$,{placeholder:"Select status"})}),b.jsxs(sN,{children:[b.jsx(Sg,{value:"draft",children:"Draft"}),b.jsx(Sg,{value:"published",children:"Active"}),b.jsx(Sg,{value:"archived",children:"Archived"})]})]})]}),b.jsx(ah,{required:!0,label:te("quotes.form_fields.lang_code.label"),description:te("quotes.form_fields.lang_code.desc"),placeholder:te("quotes.form_fields.lang_code.placeholder"),...t("lang_code",{required:!0})}),b.jsx(ah,{required:!0,label:te("quotes.form_fields.currency_code.label"),description:te("quotes.form_fields.currency_code.desc"),placeholder:te("quotes.form_fields.currency_code.placeholder"),...t("currency_code",{required:!0})})]})})]})},Xne=({id:t,onSentTo:e,disabled:n})=>{const r=()=>{e(t)};return b.jsxs(PL,{children:[b.jsx(Xge,{asChild:!0,disabled:n,children:b.jsxs(qe,{variant:"ghost",className:"h-10 gap-1 text-primary disabled:text-secondary-foreground",children:[b.jsx(Gpe,{className:"w-4 h-4"}),te("quotes.quote_sent_to_editor.trigger_button")]})}),b.jsxs(uR,{children:[b.jsxs(dR,{children:[b.jsx(hR,{children:te("quotes.quote_sent_to_editor.title")}),b.jsx(pR,{children:te("quotes.quote_sent_to_editor.description")})]}),b.jsxs(fR,{children:[b.jsx(gR,{children:te("common.cancel")}),b.jsx(mR,{asChild:!0,children:b.jsx(qe,{onClick:r,children:te("common.continue")})})]})]})]})},gBe=["draft","ready","delivered","accepted","rejected","archived"],vBe={draft:["draft","ready","archived"],ready:["ready","delivered","archived"],delivered:["delivered","accepted","rejected","archived"],accepted:["accepted","rejected","archived"],rejected:["rejected","accepted","archived"],archived:["archived","draft","ready","delivered","accepted","rejected"]},Qne=({type:t="button",status:e,onChangeStatus:n})=>{const[r,s]=S.useState(e),i=a=>s(a);S.useEffect(()=>{e&&s(e)},[e]);const o=()=>{r!==e&&n(r,e)};return b.jsxs(Py,{children:[b.jsx(JL,{asChild:!0,children:t==="button"?b.jsxs(qe,{size:"sm",variant:"outline",className:"h-8 gap-1",children:[b.jsx(gq,{className:"h-3.5 w-3.5"}),b.jsx("span",{className:"sr-only md:not-sr-only md:whitespace-nowrap",children:te("quotes.quote_status_editor.trigger_button")})]}):b.jsx(x4e,{status:e,isEditable:!0})}),b.jsxs(qp,{children:[b.jsx(Wp,{children:b.jsx(Kp,{children:te("quotes.quote_status_editor.title")})}),b.jsx(RL,{}),b.jsx("div",{className:"grid gap-4 py-4",children:gBe.map(a=>{const c=!vBe[e].includes(a);return b.jsxs("div",{className:"flex items-start space-x-4",children:[b.jsx(PQ,{id:a,checked:r===a,onCheckedChange:()=>i(a),disabled:c}),b.jsxs("div",{className:"grid gap-1.5 leading-none",children:[b.jsx(Qp,{htmlFor:a,className:ie("font-medium",c?"text-input":"text-foreground"),children:te(`quotes.quote_status_editor.status.${a}.title`)}),b.jsx("p",{className:ie("text-sm",c?"text-input":"text-muted-foreground"),children:te(`quotes.quote_status_editor.status.${a}.description`)})]})]},a)})}),b.jsxs(Gp,{className:"pt-6 border-t",children:[b.jsx(_E,{asChild:!0,children:b.jsx(qe,{type:"button",variant:"secondary",children:te("common.cancel")})}),b.jsx(_E,{asChild:!0,children:b.jsx(qe,{onClick:o,disabled:r===e,children:te("quotes.quote_status_editor.submit_button")})})]})]})]})},yBe=({quoteId:t,className:e})=>{const n=Us(),{toast:r}=nc(),{useOne:s,useSetStatus:i,useSentTo:o,useDownloader:a,useDuplicate:c,getQuotePDFFilename:u}=rS(),{data:f,status:l}=s(t),{mutate:d}=i(),{mutate:p}=o(t),{mutate:h}=c(),{download:m,...y}=a(),{formatCurrency:g,formatNumber:v}=kne({locale:(f==null?void 0:f.lang_code)||"ES"}),x=S.useMemo(()=>f?{subtotal_price:g(f.subtotal_price),discount:v(f.discount),discount_price:g(f.discount_price),tax:v(f.tax),tax_price:g(f.tax_price),total_price:g(f.total_price)}:{subtotal_price:"0,00 €",discount:"0",discount_price:"0,00 €",tax:"0",tax_price:"0,00 €",total_price:"0,00 €"},[f]),_=S.useMemo(()=>(f==null?void 0:f.status)==="accepted"&&!(f!=null&&f.date_sent),[f]),A=S.useMemo(()=>(f==null?void 0:f.status)==="accepted"&&!!(f!=null&&f.date_sent),[f]),N=I=>{d({id:f.id,newStatus:I},{onSuccess:()=>{r({description:te("quotes.quote_status_editor.toast_status_changed"),variant:"success"})}})},T=I=>{p({sent_date:jOe(new Date)},{onSuccess:()=>{r({description:te("quotes.quote_sent_to_editor.toast_status_changed"),variant:"success"})}})},E=S.useCallback(()=>{r({description:te("quotes.downloading_dialog.toast_success"),variant:"success"})},[r]),P=S.useCallback(()=>{f&&m(f.id,u(f))},[f]);if(l==="error"||l!=="success")return null;if(!f)return b.jsx(xr,{className:ie("overflow-hidden",e),children:b.jsx(wr,{className:"px-4 py-6 text-center",children:b.jsx("p",{className:"mx-auto",children:"Select a quote"})})});const k=I=>{h({id:I},{onSuccess(j){r({description:te("quotes.duplicate_action.toast_success"),variant:"success"}),n(`/quotes/edit/${j.id}`,{relative:"path"})}})},M=I=>{d({id:I,newStatus:"archived"},{onSuccess:()=>{r({description:te("quotes.quote_status_editor.toast_status_changed",{newStatus:te("quotes.status.archived")}),variant:"success"})}})};return b.jsxs(b.Fragment,{children:[b.jsx(Kne,{...y,onFinishDownload:E}),b.jsx(v$,{defaultValue:"resume",children:b.jsxs(xr,{className:"w-[390px] overflow-hidden",children:[b.jsxs(Ni,{className:"gap-3 border-b bg-accent",children:[b.jsxs(ns,{className:"flex items-center justify-between text-lg",children:[b.jsx("span",{children:te("quotes.list.resume.title")}),b.jsx(Qne,{status:f.status,onChangeStatus:N,type:"badge"})]}),b.jsx("div",{className:"flex w-full mr-auto text-foreground",children:b.jsxs("div",{className:"flex justify-between w-full",children:[b.jsxs(Mp,{className:"gap-0",children:[b.jsxs(bs,{children:[b.jsx(xs,{asChild:!0,children:b.jsxs(qe,{variant:"outline",size:"icon",disabled:A,onClick:I=>{I.preventDefault(),n(`/quotes/edit/${f.id}`,{relative:"path"})},children:[b.jsx(vq,{className:"w-4 h-4"}),b.jsx("span",{className:"sr-only",children:"Editar"})]})}),b.jsx(rs,{children:b.jsx("p",{children:"Editar"})})]}),b.jsxs(bs,{children:[b.jsx(xs,{asChild:!0,children:b.jsxs(qe,{variant:"outline",size:"icon",onClick:I=>{I.preventDefault(),k(f.id)},children:[b.jsx(pL,{className:"w-4 h-4"}),b.jsx("span",{className:"sr-only",children:"Duplicar"})]})}),b.jsx(rs,{children:b.jsx("p",{children:"Duplicar"})})]}),b.jsxs(bs,{children:[b.jsx(xs,{asChild:!0,children:b.jsxs(qe,{variant:"outline",size:"icon",onClick:P,children:[b.jsx(hq,{className:"w-4 h-4"}),b.jsx("span",{className:"sr-only",children:"Descargar"})]})}),b.jsx(rs,{children:b.jsx("p",{children:"Descargar"})})]}),b.jsxs(bs,{children:[b.jsx(xs,{asChild:!0,children:b.jsxs(qe,{variant:"outline",size:"icon",disabled:A,onClick:I=>{I.preventDefault(),M(f.id)},children:[b.jsx(cq,{className:"w-4 h-4"}),b.jsx("span",{className:"sr-only",children:"Archivar"})]})}),b.jsx(rs,{children:b.jsx("p",{children:"Archivar"})})]})]}),b.jsx(Mp,{children:b.jsx(Xne,{disabled:A||!_,id:f.id,onSentTo:T})})]})})]}),b.jsxs(wr,{className:"p-6 text-sm",children:[b.jsxs(lN,{className:"grid w-full grid-cols-2",children:[b.jsx(ty,{value:"resume",children:te("quotes.list.resume.tabs.resume")}),b.jsx(ty,{value:"preview",children:te("quotes.list.resume.tabs.preview")})]}),b.jsx(ny,{value:"resume",className:"pt-4",children:b.jsxs("div",{className:"grid gap-3",children:[b.jsxs("div",{className:"grid gap-3",children:[b.jsx("div",{className:"font-semibold",children:te("quotes.list.resume.quote_information")}),b.jsxs("dl",{className:"grid gap-3",children:[b.jsxs("div",{className:"flex items-center justify-between",children:[b.jsx("dt",{className:"text-muted-foreground",children:te("quotes.form_fields.reference.label")}),b.jsx("dd",{className:"font-medium",children:f.reference})]}),b.jsxs("div",{className:"flex items-center justify-between",children:[b.jsx("dt",{className:"text-muted-foreground",children:te("quotes.form_fields.date.label")}),b.jsx("dd",{className:"font-medium",children:new Date(f.date).toLocaleDateString()})]}),b.jsxs("div",{className:"flex items-start justify-between",children:[b.jsx("dt",{className:"text-muted-foreground whitespace-nowrap",children:te("quotes.form_fields.customer_reference.label")}),b.jsx("dd",{className:"font-medium text-right whitespace-break-spaces",children:f.customer_reference})]})]})]}),b.jsx(au,{className:"my-4"}),b.jsxs("div",{className:"grid gap-3",children:[b.jsx("div",{className:"font-semibold",children:te("quotes.list.resume.customer_information")}),b.jsx("div",{children:f.customer_information})]}),b.jsx(au,{className:"my-4"}),b.jsx("div",{className:"font-semibold",children:te("quotes.list.resume.price_information")}),b.jsxs("ul",{className:"grid gap-3",children:[b.jsxs("li",{className:"flex items-center justify-between",children:[b.jsx("span",{className:"text-muted-foreground",children:te("quotes.form_fields.subtotal_price.label")}),b.jsx("span",{children:x.subtotal_price})]}),b.jsxs("li",{className:"flex items-center justify-between",children:[b.jsx("span",{className:"text-muted-foreground",children:te("quotes.form_fields.discount_value.label",{value:x.discount})}),b.jsx("span",{children:x.discount_price})]}),b.jsxs("li",{className:"flex items-center justify-between",children:[b.jsx("span",{className:"text-muted-foreground",children:te("quotes.form_fields.tax_value.label",{value:x.tax})}),b.jsx("span",{children:x.tax_price})]}),b.jsxs("li",{className:"flex items-center justify-between font-semibold",children:[b.jsx("span",{className:"text-muted-foreground",children:te("quotes.form_fields.total_price.label")}),b.jsx("span",{children:x.total_price})]})]})]})}),b.jsx(ny,{value:"preview",children:b.jsx(Yne,{quote:f})})]}),b.jsx(Ko,{className:"flex flex-row items-center px-6 py-3 border-t bg-accent",children:b.jsx("div",{className:"text-xs text-muted-foreground"})})]})})]})},bBe=({status:t="all",preview:e=!1})=>{const n=Us(),{toast:r}=nc(),s=S.useId(),i=S.useId(),{pagination:o,globalFilter:a,isFiltered:c}=om(),[u,f]=S.useState(void 0),{useList:l,useDownloader:d,useSetStatus:p,useDuplicate:h,getQuotePDFFilename:m}=rS(),{mutate:y}=p(),{mutate:g}=h(),{data:v,isPending:x,isError:_,error:A}=l({pagination:{pageIndex:o.pageIndex,pageSize:o.pageSize},status:t,quickSearchTerm:a}),{download:N,...T}=d(),E=K=>{f(K)},P=S.useCallback(()=>{r({description:te("quotes.downloading_dialog.toast_success")})},[r]),k=S.useCallback(K=>{n(`/quotes/edit/${K.id}`,{relative:"path"})},[n,r]),M=K=>{g({id:K},{onSuccess(V){r({description:te("quotes.duplicate_action.toast_success"),variant:"success"}),n(`/quotes/edit/${V.id}`,{relative:"path"})}})},I=K=>{y({id:K,newStatus:"archived"},{onSuccess:()=>{r({description:te("quotes.quote_status_editor.toast_status_changed",{newStatus:te("quotes.status.archived")}),variant:"success"})}})},j=(K,V)=>{y({id:K,newStatus:V},{onSuccess:()=>{r({description:te("quotes.quote_status_editor.toast_status_changed",{newStatus:te(`quotes.status.${V}`)}),variant:"success"})}})},L=S.useMemo(()=>{const K=[{id:"reference",accessorKey:"reference",header:()=>b.jsx(b.Fragment,{children:te("quotes.list.columns.reference")}),cell:({row:{original:U},renderValue:Q})=>{const ne=!!((U==null?void 0:U.status)==="accepted"&&(U!=null&&U.date_sent));return b.jsx(qe,{size:"sm",variant:"link",disabled:ne,className:"h-8 gap-1 px-0 text-left text-ellipsis",onClick:X=>{X.preventDefault(),k(U)},children:b.jsx("div",{className:"",children:Q()})})}},{id:"status",accessorKey:"status",header:()=>b.jsx(b.Fragment,{children:te("quotes.list.columns.status")}),cell:({row:{original:U}})=>b.jsx(Qne,{type:"badge",status:U.status,onChangeStatus:Q=>j(U.id,Q)})},{id:"date_sent",accessor:"date_sent",header:()=>b.jsx("div",{className:"text-left text-ellipsis",children:te("quotes.list.columns.date_sent")}),cell:({row:{original:U}})=>{const Q=Cg.create(U.date_sent),ne=Q.isSuccess&&!Q.object.isEmpty();return b.jsx("div",{className:"text-left text-ellipsis",children:ne?b.jsx(TJ,{label:Q.object.toLocaleDateString("es-ES"),className:"text-green-800 bg-green-100 hover:text-green-800 hover:bg-green-100"}):b.jsx(b.Fragment,{})})}},{id:"date",accessor:"date",header:()=>b.jsx("div",{className:"text-left text-ellipsis",children:te("quotes.list.columns.date")}),cell:({row:{original:U}})=>{const Q=Cg.create(U.date);return b.jsx("div",{className:"text-left text-ellipsis",children:Q.isSuccess?Q.object.toLocaleDateString("es-ES"):"-"})}},{id:"customer_reference",accessorKey:"customer_reference",header:()=>b.jsx(b.Fragment,{children:te("quotes.list.columns.customer_reference")}),cell:({renderValue:U})=>b.jsx("div",{className:"text-left text-ellipsis",children:U()})},{id:"customer_information",accessorKey:"customer_information",header:()=>b.jsx(b.Fragment,{children:te("quotes.list.columns.customer_information")}),cell:({row:{original:U}})=>b.jsx("div",{className:"text-left text-ellipsis",children:U.customer_information.split(` `).map((Q,ne)=>b.jsxs("span",{className:ne===0?"font-medium":"hidden text-sm text-muted-foreground md:inline",children:[Q,b.jsx("br",{})]},ne))}),size:500}],V=[{id:"row-actions",header:()=>null,cell:({row:{original:U}})=>{const Q=(U==null?void 0:U.status)==="accepted"&&!(U!=null&&U.date_sent),ne=(U==null?void 0:U.status)==="accepted"&&!!(U!=null&&U.date_sent),X=(U==null?void 0:U.status)==="archived";return b.jsxs("div",{className:"flex gap-1",children:[b.jsxs(Mp,{className:"gap-0",children:[b.jsxs(bs,{children:[b.jsx(xs,{asChild:!0,children:b.jsxs(qe,{variant:"ghost",size:"icon",disabled:ne,onClick:G=>{G.preventDefault(),k(U)},children:[b.jsx(vq,{className:"w-4 h-4"}),b.jsx("span",{className:"sr-only",children:"Editar"})]})}),b.jsx(rs,{children:b.jsx("p",{children:"Editar"})})]}),b.jsxs(bs,{children:[b.jsx(xs,{asChild:!0,children:b.jsxs(qe,{variant:"ghost",size:"icon",onClick:G=>{G.preventDefault(),M(U.id)},children:[b.jsx(pL,{className:"w-4 h-4"}),b.jsx("span",{className:"sr-only",children:"Duplicar"})]})}),b.jsx(rs,{children:b.jsx("p",{children:"Duplicar"})})]}),b.jsxs(bs,{children:[b.jsx(xs,{asChild:!0,children:b.jsxs(qe,{variant:"ghost",size:"icon",onClick:()=>{N(U.id,m(U))},children:[b.jsx(hq,{className:"w-4 h-4"}),b.jsx("span",{className:"sr-only",children:"Descargar"})]})}),b.jsx(rs,{children:b.jsx("p",{children:"Descargar"})})]}),b.jsxs(bs,{children:[b.jsx(xs,{asChild:!0,children:b.jsxs(qe,{variant:"ghost",size:"icon",disabled:X||ne,onClick:G=>{G.preventDefault(),I(U.id)},children:[b.jsx(cq,{className:"w-4 h-4"}),b.jsx("span",{className:"sr-only",children:"Archivar"})]})}),b.jsx(rs,{children:b.jsx("p",{children:"Archivar"})})]})]}),b.jsx(Mp,{children:b.jsx(Xne,{id:U.id,onSentTo:()=>null,disabled:ne||!Q})})]})}}];return e?K:[...K,...V]},[e]),{table:H}=qN({data:(v==null?void 0:v.items)??[],columns:L,pageCount:(v==null?void 0:v.total_pages)??-1});return S.useEffect(()=>{H&&v&&(v==null?void 0:v.total_pages)>0&&f(H.getRowModel().rows[0])},[v,H]),_?b.jsx(Ef,{subtitle:A.message}):x?b.jsxs("div",{className:"grid items-start flex-1 gap-4 sm:py-0 md:gap-8 lg:grid-cols-3 xl:grid-cols-3",children:[b.jsx(xr,{className:"grid items-start gap-4 auto-rows-max md:gap-8 lg:col-span-2",children:b.jsx(wr,{children:b.jsx(PN,{columnCount:6,searchableColumnCount:1,filterableColumnCount:2,shrinkZero:!0})})}),b.jsx("div",{})]}):(v==null?void 0:v.total_items)===0&&!c?b.jsx(xr,{children:b.jsx(wr,{children:b.jsx(TN,{subtitle:"Empieza creando alguna cotización",buttonText:te("quotes.create.title"),onButtonClick:()=>n("add",{relative:"path"})})})}):b.jsxs(b.Fragment,{children:[b.jsxs("div",{className:"flex flex-col items-stretch flex-1 gap-4 xl:flex-row",children:[b.jsx("div",{id:s,className:"flex items-stretch flex-1",children:b.jsx(SN,{table:H,paginationOptions:{visible:!0},className:"grid items-start flex-1 gap-4 auto-rows-max md:gap-8 lg:col-span-2",onRowClick:E,activeRowIndex:u==null?void 0:u.index,children:b.jsx(Wne,{table:H})})}),e&&b.jsx("div",{id:i,className:"flex items-stretch ",children:b.jsx(yBe,{quoteId:u==null?void 0:u.original.id})})]}),b.jsx(Kne,{...T,onFinishDownload:P})]})},xBe=()=>{const t=Us(),e=nBe(),{toast:n}=nc(),[r,s]=S.useState("general"),[i,o]=S.useState(cu.createDefaultCode().object),[a,c]=S.useState(P0.createDefaultCode().object),{useOne:u,useUpdate:f}=rS(),{data:l,status:d,error:p}=u(e),h=S.useMemo(()=>({date:"",reference:"",customer_reference:"",customer_information:"",lang_code:"",currency_code:"",payment_method:"",notes:"",validity:"",subtotal_price:{amount:void 0,scale:2,currency_code:(l==null?void 0:l.currency_code)??i.code},discount:{amount:void 0,scale:0},discount_price:{amount:void 0,scale:2,currency_code:(l==null?void 0:l.currency_code)??i.code},before_tax_price:{amount:void 0,scale:2,currency_code:(l==null?void 0:l.currency_code)??i.code},tax:{amount:void 0,scale:0},tax_price:{amount:void 0,scale:2,currency_code:(l==null?void 0:l.currency_code)??i.code},total_price:{amount:void 0,scale:2,currency_code:(l==null?void 0:l.currency_code)??i.code},items:[{id_article:"",description:"",quantity:{amount:null,scale:2},unit_price:{amount:null,scale:2,currency_code:(l==null?void 0:l.currency_code)??i.code},subtotal_price:{amount:null,scale:2,currency_code:(l==null?void 0:l.currency_code)??i.code},discount:{amount:null,scale:2},total_price:{amount:null,scale:2,currency_code:(l==null?void 0:l.currency_code)??i.code}}]}),[l,i]),{mutate:m,isPending:y}=f(String(e)),g=z_({mode:"onBlur",values:l,defaultValues:h}),{getValues:v,reset:x,handleSubmit:_,formState:A,watch:N,setValue:T}=g,{isSubmitting:E,isDirty:P}=A;lF({isDirty:P});const k=async(I,j)=>{m(I,{onError:L=>{console.debug(L),n({title:"Error",description:L.message,variant:"destructive"})},onSuccess:()=>{x(v()),n({title:"Cotización guardada",variant:"success"}),j&&t("/quotes")}})};S.useEffect(()=>{const{unsubscribe:I}=N((j,{name:L})=>{const H=v();if(L)switch(!0){case L==="currency_code":o(cu.createFromCode(H.currency_code??cu.DEFAULT_CURRENCY_CODE).object);break;case L==="lang_code":c(P0.createFromCode(H.lang_code??P0.DEFAULT_LANGUAGE_CODE).object);break;case(L==="discount"||L==="tax"):{const K=gD(H);T("subtotal_price",K.subtotalPrice.toObject()),T("discount_price",K.discountPrice.toObject()),T("before_tax_price",K.priceBeforeTaxes.toObject()),T("tax_price",K.taxesPrice.toObject()),T("total_price",K.totalPrice.toObject());break}case L==="items":{H.items&&H.items.map((V,U)=>{const Q=JI(V);T(`items.${U}.subtotal_price`,Q.subtotalPrice.toObject()),T(`items.${U}.total_price`,Q.totalPrice.toObject())});const K=gD(H,!0);T("subtotal_price",K.subtotalPrice.toObject()),T("discount_price",K.discountPrice.toObject()),T("before_tax_price",K.priceBeforeTaxes.toObject()),T("tax_price",K.taxesPrice.toObject()),T("total_price",K.totalPrice.toObject());break}case(L.endsWith("quantity")||L.endsWith("unit_price")||L.endsWith("discount")):{const[,K]=String(L).split("."),V=parseInt(K),U=JI(H.items[V]);T(`items.${V}.subtotal_price`,U.subtotalPrice.toObject()),T(`items.${V}.total_price`,U.totalPrice.toObject());const Q=gD(H,!0);T("subtotal_price",Q.subtotalPrice.toObject()),T("discount_price",Q.discountPrice.toObject()),T("before_tax_price",Q.priceBeforeTaxes.toObject()),T("tax_price",Q.taxesPrice.toObject()),T("total_price",Q.totalPrice.toObject());break}}});return()=>I()},[N,v,T]);const M=()=>{t("/quotes",{state:{id:e}})};return E||y?b.jsx(Xl,{title:"Guardando cotización"}):d==="error"?b.jsx(Ef,{errorMessage:p.message}):d!=="success"?b.jsx(Xl,{}):b.jsx(B_,{...g,children:b.jsx("form",{onSubmit:_(I=>k(I,!1)),children:b.jsxs("div",{className:"mx-auto grid max-w-[90rem] flex-1 auto-rows-max gap-6",children:[b.jsxs("div",{className:"flex items-center gap-4",children:[b.jsx(j$,{}),b.jsxs("h1",{className:"flex-1 text-xl font-semibold tracking-tight shrink-0 whitespace-nowrap sm:grow-0",children:[te("quotes.edit.title")," ",l.reference]}),b.jsx(TJ,{label:te(`quotes.status.${l.status}`),className:"ml-auto sm:ml-0"}),b.jsxs("div",{className:"items-center hidden gap-2 md:ml-auto md:flex",children:[b.jsx(NJ,{label:te("common.close"),variant:"secondary",size:"sm",onClick:M}),b.jsx(_N,{label:te("common.save"),size:"sm",disabled:A.isSubmitting||A.isLoading||A.isValidating}),b.jsx(qe,{size:"sm",disabled:A.isSubmitting||A.isLoading||A.isValidating,onClick:_(I=>k(I,!0)),children:te("common.save_close")})]})]}),b.jsx(mBe,{}),b.jsx(rBe,{}),b.jsx(pBe,{currency:i,language:a,defaultValues:h}),b.jsxs(v$,{defaultValue:"items",className:"hidden space-y-4 ",value:r,onValueChange:s,children:[b.jsxs(lN,{children:[b.jsx(ty,{value:"general",children:te("quotes.create.tabs.general")}),b.jsx(ty,{value:"items",children:te("quotes.create.tabs.items")})]}),b.jsx(ny,{value:"general",forceMount:!0,hidden:r!=="general"}),b.jsx(ny,{value:"items",forceMount:!0,hidden:r!=="items"})]}),b.jsxs("div",{className:"flex items-center justify-center gap-2 md:hidden",children:[b.jsx(qe,{variant:"outline",size:"sm",children:te("common.discard")}),b.jsx(qe,{size:"sm",children:te("quotes.edit.buttons.save_quote")})]})]})})})},wBe=S.createContext(null),_Be=({children:t})=>{const[e,n]=xN();return b.jsx(wBe.Provider,{value:{pagination:e,setPagination:n},children:t})},SBe=({children:t})=>b.jsx(uy,{children:b.jsx(_Be,{children:b.jsxs(Vy,{className:"quotes-layout",children:[b.jsx(Wy,{}),b.jsx(qy,{children:t})]})})}),CBe=()=>{const t=Us(),[e,n]=S.useState("all"),[r,s]=L2e(!0),i=[{value:"all",label:te("quotes.list.tabs.all")},{value:"draft",label:te("quotes.list.tabs.draft")},{value:"ready",label:te("quotes.list.tabs.ready")},{value:"delivered",label:te("quotes.list.tabs.delivered")},{value:"accepted",label:te("quotes.list.tabs.accepted")},{value:"rejected",label:te("quotes.list.tabs.rejected")},{value:"archived",label:te("quotes.list.tabs.archived")}];return b.jsxs(oy,{children:[b.jsxs("div",{className:"flex items-center justify-between space-y-2",children:[b.jsxs("div",{children:[b.jsx("h2",{className:"text-2xl font-bold tracking-tight",children:b.jsx(Mt,{i18nKey:"quotes.list.title"})}),b.jsx("p",{className:"text-muted-foreground",children:b.jsx(Mt,{i18nKey:"quotes.list.subtitle"})})]}),b.jsx("div",{className:"flex items-center space-x-2",children:b.jsxs(qe,{onClick:()=>t("/quotes/add"),children:[b.jsx(gL,{className:"w-4 h-4 mr-2"}),te("quotes.create.title")]})})]}),b.jsxs(v$,{value:e,onValueChange:n,children:[b.jsxs("div",{className:"flex flex-col items-start justify-between mb-4 sm:flex-row sm:items-center",children:[b.jsxs("div",{className:"w-full mb-4 sm:w-auto sm:mb-0",children:[b.jsx(lN,{className:"hidden sm:flex",children:i.map(o=>b.jsx(ty,{value:o.value,children:o.label},o.value))}),b.jsxs("div",{className:"flex items-center w-full space-x-2 sm:hidden",children:[b.jsx(Qp,{children:te("quotes.list.tabs_title")}),b.jsxs(d$,{value:e,onValueChange:n,children:[b.jsx(rN,{children:b.jsx(f$,{placeholder:"Seleccionar estado"})}),b.jsx(sN,{children:i.map(o=>b.jsx(Sg,{value:o.value,children:o.label},o.value))})]})]})]}),b.jsx("div",{className:"flex items-baseline justify-center mr-4 font-medium",children:b.jsx($Ie,{buttonText:"Ayuda",title:"Ayuda sobre el Estado de Cotizaciones",content:EBe})}),b.jsx("div",{className:"flex items-center gap-2 ml-auto",children:b.jsx(yZ,{"aria-label":"Show quote preview",variant:"outline",defaultPressed:!1,pressed:r,onPressedChange:s,children:r?b.jsxs(b.Fragment,{children:[b.jsx(pq,{className:"w-4 h-4 mr-2"}),te("common.disable_preview")]}):b.jsxs(b.Fragment,{children:[b.jsx($pe,{className:"w-4 h-4 mr-2"}),te("common.enable_preview")]})})})]}),i.map(o=>b.jsx(ny,{value:o.value,children:b.jsx(bBe,{status:o.value,preview:r})},o.value))]})]})},EBe=b.jsxs(JR,{className:"grid gap-4 py-4",children:[b.jsx("p",{children:"El estado de una cotización indica su posición actual en el proceso de negocio."}),b.jsx("p",{children:"Los estados posibles son:"}),b.jsxs("ul",{className:"pl-6 space-y-2 list-disc",children:[b.jsxs("li",{children:[b.jsx("strong",{children:"Borrador:"})," La cotización está en proceso de creación o edición."]}),b.jsxs("li",{children:[b.jsx("strong",{children:"Preparado:"})," La cotización está lista para ser enviada al cliente."]}),b.jsxs("li",{children:[b.jsx("strong",{children:"Entregado:"})," La cotización ha sido enviada al cliente."]}),b.jsxs("li",{children:[b.jsx("strong",{children:"Aceptado:"})," El cliente ha aprobado la cotización."]}),b.jsxs("li",{children:[b.jsx("strong",{children:"Rechazado:"})," El cliente no ha aceptado la cotización."]}),b.jsxs("li",{children:[b.jsx("strong",{children:"Arcivado:"})," La cotización ha sido guardada para referencia futura y ya no está activa."]})]}),b.jsxs("p",{children:["Utiliza estos estados para hacer un seguimiento eficiente de tus cotizaciones y optimizar tu proceso de ventas. El estado ",b.jsx("strong",{children:"Archivado"})," es útil para mantener un historial de cotizaciones pasadas sin que interfieran con las cotizaciones activas."]})]}),ABe=t=>{const e=ly(),n=bu();return{useOne:()=>hJ({queryKey:n().data().resource("settings").action("one").id("me").params().get(),queryFn:()=>e.getOne({resource:"profile",id:""}),...t}),useUpdate:()=>{const r=Ml();return Il({mutationKey:n().data().resource("settings").action("one").id("me").params().get(),mutationFn:s=>e.updateOne({resource:"profile",data:s,id:""}),onSuccess:()=>{r.invalidateQueries({queryKey:["data","default","settings"]})}})},useUploadLogo:()=>{const r=Ml(),{mutate:s,mutateAsync:i,...o}=Il({mutationKey:["data","default","settings"],mutationFn:a=>e.uploadFile({path:"profile/logo",file:a,key:"logo"}),onError:()=>r.invalidateQueries({queryKey:["data","default","settings"]}),onSuccess:()=>{r.invalidateQueries({queryKey:["data","default","settings"]})}});return{upload:s,uploadAsync:i,...o}}}},RBe=()=>{var A,N;const[t,e]=S.useState("profile"),{useOne:n,useUpdate:r,useUploadLogo:s}=ABe(),{toast:i}=nc(),{data:o,status:a,error:c}=n(),u=S.useMemo(()=>({contact_information:"",default_payment_method:"",default_notes:"",default_legal_terms:"",default_quote_validity:"",default_tax:{amount:void 0,scale:2}}),[]),{mutate:f}=r(),{upload:l}=s(),d=z_({mode:"onBlur",values:o==null?void 0:o.dealer,defaultValues:u}),{formState:p,reset:h,getValues:m,handleSubmit:y}=d,{isSubmitting:g,isDirty:v}=p,x=T=>{var P;const E=(P=T.target.files)==null?void 0:P[0];if(E){if(E.type!=="image/png"&&E.type!=="image/jpeg"){alert(te("settings.form_fields.logo.invalid_format"));return}const k=new FileReader;k.onloadend=()=>{const M=new Image;M.onload=()=>{const I=M.width,j=M.height,L=I/j===2;I<200||j<100||!L?alert(te("settings.form_fields.logo.invalid_dimensions")):l(E)},M.src=k.result},k.readAsDataURL(E)}};lF({isDirty:v});const _=async T=>{f(T,{onError:E=>{console.debug(E),i({title:"Error",description:E.message,variant:"destructive"})},onSuccess:()=>{h(m()),i({description:"Ajustes guardados",variant:"success"})}})};return g?b.jsx(Xl,{title:"Guardando ajustes"}):a==="error"?b.jsx(Ef,{errorMessage:c.message}):a!=="success"?b.jsx(Xl,{}):b.jsx(B_,{...d,children:b.jsx("form",{onSubmit:y(_),children:b.jsxs("div",{className:"mx-auto grid w-full max-w-6xl items-start gap-6 md:grid-cols-[180px_1fr] lg:grid-cols-[250px_1fr]",children:[((A=d.formState.errors.root)==null?void 0:A.message)&&b.jsxs(bL,{variant:"destructive",children:[b.jsx(dq,{className:"w-4 h-4"}),b.jsx(xL,{children:b.jsx(Mt,{i18nKey:"common.error"})}),b.jsx(wL,{children:(N=d.formState.errors.root)==null?void 0:N.message})]}),b.jsxs("nav",{className:"grid gap-4 text-sm text-muted-foreground",children:[b.jsx("a",{onClick:()=>e("profile"),className:t==="profile"?"font-semibold text-primary":"cursor-pointer",children:b.jsx(Mt,{i18nKey:"settings.edit.tabs.profile"})}),b.jsx("a",{onClick:()=>e("quotes"),className:t==="quotes"?"font-semibold text-primary":"cursor-pointer ",children:b.jsx(Mt,{i18nKey:"settings.edit.tabs.quotes"})}),b.jsx("a",{onClick:()=>e("legal"),className:t==="legal"?"font-semibold text-primary":"cursor-pointer ",children:b.jsx(Mt,{i18nKey:"settings.edit.tabs.legal"})})]}),b.jsxs("div",{className:ie("grid gap-6",t==="profile"?"visible":"hidden"),children:[b.jsxs(xr,{children:[b.jsxs(Ni,{children:[b.jsx(ns,{children:b.jsx(Mt,{i18nKey:"settings.form_fields.contact_information.label"})}),b.jsx(ys,{children:b.jsx(Mt,{i18nKey:"settings.form_fields.contact_information.desc"})})]}),b.jsx(wr,{children:b.jsx(Ua,{rows:8,placeholder:te("settings.form_fields.contact_information.placeholder"),name:"contact_information",required:!0})}),b.jsx(Ko,{className:"px-6 py-4 border-t",children:b.jsx(qe,{children:b.jsx(Mt,{i18nKey:"common.save"})})})]}),b.jsxs(xr,{children:[b.jsxs(Ni,{children:[b.jsx(ns,{children:b.jsx(Mt,{i18nKey:"settings.form_fields.logo.label"})}),b.jsx(ys,{children:b.jsx(Mt,{i18nKey:"settings.form_fields.logo.desc"})})]}),b.jsx(wr,{children:b.jsxs("div",{className:"flex items-center space-x-4",children:[b.jsx("div",{className:"w-[400px] h-[200px] border border-gray-300 flex items-center justify-center overflow-hidden",children:b.jsx("img",{src:o.dealer.logo?o.dealer.logo:"https://via.placeholder.com/200x100",width:400,height:200,style:{objectFit:"contain"}})}),b.jsx("div",{children:b.jsx("p",{className:"mt-2 text-sm text-gray-500",children:b.jsx(Mt,{i18nKey:"settings.form_fields.logo.requirements"})})})]})}),b.jsxs(Ko,{className:"px-6 py-4 border-t",children:[b.jsx(Qp,{htmlFor:"logo-upload",className:"inline-flex items-center justify-center h-10 px-4 py-2 text-sm font-medium transition-colors rounded-md cursor-pointer bg-primary text-primary-foreground hover:bg-primary/90 whitespace-nowrap ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",children:b.jsx(Mt,{i18nKey:"settings.form_fields.logo.upload"})}),b.jsx(qR,{id:"logo-upload",type:"file",accept:".png,.jpg,.jpeg",onChange:x,className:"hidden"})]})]})]}),b.jsxs("div",{className:ie("grid gap-6",t==="quotes"?"visible":"hidden"),children:[b.jsxs(xr,{children:[b.jsxs(Ni,{children:[b.jsx(ns,{children:b.jsx(Mt,{i18nKey:"settings.form_fields.default_tax.label"})}),b.jsx(ys,{children:b.jsx(Mt,{i18nKey:"settings.form_fields.default_tax.desc"})})]}),b.jsx(wr,{children:b.jsx(rA,{scale:2,disabled:p.disabled,placeholder:te("settings.form_fields.default_tax.desc"),name:"default_tax",required:!0})}),b.jsx(Ko,{className:"px-6 py-4 border-t",children:b.jsx(qe,{children:b.jsx(Mt,{i18nKey:"common.save"})})})]}),b.jsxs(xr,{children:[b.jsxs(Ni,{children:[b.jsx(ns,{children:b.jsx(Mt,{i18nKey:"settings.form_fields.default_payment_method.label"})}),b.jsx(ys,{children:b.jsx(Mt,{i18nKey:"settings.form_fields.default_payment_method.desc"})})]}),b.jsx(wr,{children:b.jsx(Ua,{autoSize:!0,placeholder:te("settings.form_fields.default_payment_method.placeholder"),name:"default_payment_method",required:!0,errors:d.formState.errors})}),b.jsx(Ko,{className:"px-6 py-4 border-t",children:b.jsx(qe,{children:b.jsx(Mt,{i18nKey:"common.save"})})})]}),b.jsxs(xr,{children:[b.jsxs(Ni,{children:[b.jsx(ns,{children:b.jsx(Mt,{i18nKey:"settings.form_fields.default_quote_validity.label"})}),b.jsx(ys,{children:b.jsx(Mt,{i18nKey:"settings.form_fields.default_quote_validity.desc"})})]}),b.jsx(wr,{children:b.jsx(Ua,{autoSize:!0,placeholder:te("settings.form_fields.default_quote_validity.placeholder"),name:"default_quote_validity",required:!0})}),b.jsx(Ko,{className:"px-6 py-4 border-t",children:b.jsx(qe,{children:b.jsx(Mt,{i18nKey:"common.save"})})})]}),b.jsxs(xr,{children:[b.jsxs(Ni,{children:[b.jsx(ns,{children:b.jsx(Mt,{i18nKey:"settings.form_fields.default_notes.label"})}),b.jsx(ys,{children:b.jsx(Mt,{i18nKey:"settings.form_fields.default_notes.desc"})})]}),b.jsx(wr,{children:b.jsx(Ua,{autoSize:!0,placeholder:te("settings.form_fields.default_notes.placeholder"),name:"default_notes"})}),b.jsx(Ko,{className:"px-6 py-4 border-t",children:b.jsx(qe,{children:b.jsx(Mt,{i18nKey:"common.save"})})})]})]}),b.jsx("div",{className:ie("grid gap-6",t==="legal"?"visible":"hidden"),children:b.jsxs(xr,{className:"h-",children:[b.jsxs(Ni,{children:[b.jsx(ns,{children:b.jsx(Mt,{i18nKey:"settings.form_fields.default_legal_terms.label"})}),b.jsx(ys,{children:b.jsx(Mt,{i18nKey:"settings.form_fields.default_legal_terms.desc"})})]}),b.jsx(wr,{children:b.jsx(Ua,{rows:25,placeholder:te("settings.form_fields.default_legal_terms.placeholder"),name:"default_legal_terms"})}),b.jsx(Ko,{className:"px-6 py-4 border-t",children:b.jsx(qe,{children:b.jsx(Mt,{i18nKey:"common.save"})})})]})})]})})})},NBe=S.createContext(null),PBe=({children:t})=>b.jsx(NBe.Provider,{value:{},children:t}),TBe=({children:t})=>b.jsx(uy,{children:b.jsx(PBe,{children:b.jsxs(Vy,{className:"settings-layout",children:[b.jsx(Wy,{}),b.jsxs(qy,{children:[b.jsx("div",{className:"grid w-full max-w-6xl gap-2 mx-auto",children:b.jsx("h1",{className:"text-2xl font-semibold md:text-3xl",children:b.jsx(Mt,{i18nKey:"settings.edit.title"})})}),t]})]})})}),kBe=()=>{const t=[{path:"/",element:b.jsx(uy,{children:b.jsx(eJ,{to:"/quotes",replace:!0})})}],e=[{path:"*",Component:Xze}],n=[{path:"/home",element:b.jsx(uy,{children:b.jsx(Vze,{})})},{path:"/catalog",element:b.jsx(Bze,{children:b.jsx(P1,{})}),children:[{index:!0,element:b.jsx(Hze,{})}]},{path:"/dealers",element:b.jsx(qze,{children:b.jsx(P1,{})}),children:[{index:!0,element:b.jsx(Yze,{})}]},{path:"/quotes",element:b.jsx(SBe,{children:b.jsx(P1,{})}),children:[{index:!0,element:b.jsx(CBe,{})},{path:"add",element:b.jsx(eBe,{})},{path:"edit/:id",element:b.jsx(xBe,{})}]},{path:"/settings",element:b.jsx(TBe,{children:b.jsx(P1,{})}),children:[{index:!0,element:b.jsx(RBe,{})}]},{path:"/logout",element:b.jsx($ze,{})}],r=[{path:"/login",Component:jze}],s=SMe([...t,...n,...r,...e],{});return b.jsx(DMe,{router:s})};function Zne(t,e){return function(){return t.apply(e,arguments)}}const{toString:DBe}=Object.prototype,{getPrototypeOf:fF}=Object,YN=(t=>e=>{const n=DBe.call(e);return t[n]||(t[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),rl=t=>(t=t.toLowerCase(),e=>YN(e)===t),XN=t=>e=>typeof e===t,{isArray:Gy}=Array,Ex=XN("undefined");function MBe(t){return t!==null&&!Ex(t)&&t.constructor!==null&&!Ex(t.constructor)&&_o(t.constructor.isBuffer)&&t.constructor.isBuffer(t)}const Jne=rl("ArrayBuffer");function OBe(t){let e;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?e=ArrayBuffer.isView(t):e=t&&t.buffer&&Jne(t.buffer),e}const IBe=XN("string"),_o=XN("function"),ere=XN("number"),QN=t=>t!==null&&typeof t=="object",jBe=t=>t===!0||t===!1,VC=t=>{if(YN(t)!=="object")return!1;const e=fF(t);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(Symbol.toStringTag in t)&&!(Symbol.iterator in t)},LBe=rl("Date"),$Be=rl("File"),FBe=rl("Blob"),zBe=rl("FileList"),BBe=t=>QN(t)&&_o(t.pipe),UBe=t=>{let e;return t&&(typeof FormData=="function"&&t instanceof FormData||_o(t.append)&&((e=YN(t))==="formdata"||e==="object"&&_o(t.toString)&&t.toString()==="[object FormData]"))},HBe=rl("URLSearchParams"),[VBe,qBe,WBe,GBe]=["ReadableStream","Request","Response","Headers"].map(rl),KBe=t=>t.trim?t.trim():t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function sS(t,e,{allOwnKeys:n=!1}={}){if(t===null||typeof t>"u")return;let r,s;if(typeof t!="object"&&(t=[t]),Gy(t))for(r=0,s=t.length;r0;)if(s=n[r],e===s.toLowerCase())return s;return null}const lh=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,nre=t=>!Ex(t)&&t!==lh;function tj(){const{caseless:t}=nre(this)&&this||{},e={},n=(r,s)=>{const i=t&&tre(e,s)||s;VC(e[i])&&VC(r)?e[i]=tj(e[i],r):VC(r)?e[i]=tj({},r):Gy(r)?e[i]=r.slice():e[i]=r};for(let r=0,s=arguments.length;r(sS(e,(s,i)=>{n&&_o(s)?t[i]=Zne(s,n):t[i]=s},{allOwnKeys:r}),t),XBe=t=>(t.charCodeAt(0)===65279&&(t=t.slice(1)),t),QBe=(t,e,n,r)=>{t.prototype=Object.create(e.prototype,r),t.prototype.constructor=t,Object.defineProperty(t,"super",{value:e.prototype}),n&&Object.assign(t.prototype,n)},ZBe=(t,e,n,r)=>{let s,i,o;const a={};if(e=e||{},t==null)return e;do{for(s=Object.getOwnPropertyNames(t),i=s.length;i-- >0;)o=s[i],(!r||r(o,t,e))&&!a[o]&&(e[o]=t[o],a[o]=!0);t=n!==!1&&fF(t)}while(t&&(!n||n(t,e))&&t!==Object.prototype);return e},JBe=(t,e,n)=>{t=String(t),(n===void 0||n>t.length)&&(n=t.length),n-=e.length;const r=t.indexOf(e,n);return r!==-1&&r===n},e5e=t=>{if(!t)return null;if(Gy(t))return t;let e=t.length;if(!ere(e))return null;const n=new Array(e);for(;e-- >0;)n[e]=t[e];return n},t5e=(t=>e=>t&&e instanceof t)(typeof Uint8Array<"u"&&fF(Uint8Array)),n5e=(t,e)=>{const r=(t&&t[Symbol.iterator]).call(t);let s;for(;(s=r.next())&&!s.done;){const i=s.value;e.call(t,i[0],i[1])}},r5e=(t,e)=>{let n;const r=[];for(;(n=t.exec(e))!==null;)r.push(n);return r},s5e=rl("HTMLFormElement"),i5e=t=>t.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,s){return r.toUpperCase()+s}),zH=(({hasOwnProperty:t})=>(e,n)=>t.call(e,n))(Object.prototype),o5e=rl("RegExp"),rre=(t,e)=>{const n=Object.getOwnPropertyDescriptors(t),r={};sS(n,(s,i)=>{let o;(o=e(s,i,t))!==!1&&(r[i]=o||s)}),Object.defineProperties(t,r)},a5e=t=>{rre(t,(e,n)=>{if(_o(t)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const r=t[n];if(_o(r)){if(e.enumerable=!1,"writable"in e){e.writable=!1;return}e.set||(e.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},l5e=(t,e)=>{const n={},r=s=>{s.forEach(i=>{n[i]=!0})};return Gy(t)?r(t):r(String(t).split(e)),n},c5e=()=>{},u5e=(t,e)=>t!=null&&Number.isFinite(t=+t)?t:e,vD="abcdefghijklmnopqrstuvwxyz",BH="0123456789",sre={DIGIT:BH,ALPHA:vD,ALPHA_DIGIT:vD+vD.toUpperCase()+BH},d5e=(t=16,e=sre.ALPHA_DIGIT)=>{let n="";const{length:r}=e;for(;t--;)n+=e[Math.random()*r|0];return n};function f5e(t){return!!(t&&_o(t.append)&&t[Symbol.toStringTag]==="FormData"&&t[Symbol.iterator])}const h5e=t=>{const e=new Array(10),n=(r,s)=>{if(QN(r)){if(e.indexOf(r)>=0)return;if(!("toJSON"in r)){e[s]=r;const i=Gy(r)?[]:{};return sS(r,(o,a)=>{const c=n(o,s+1);!Ex(c)&&(i[a]=c)}),e[s]=void 0,i}}return r};return n(t,0)},p5e=rl("AsyncFunction"),m5e=t=>t&&(QN(t)||_o(t))&&_o(t.then)&&_o(t.catch),ire=((t,e)=>t?setImmediate:e?((n,r)=>(lh.addEventListener("message",({source:s,data:i})=>{s===lh&&i===n&&r.length&&r.shift()()},!1),s=>{r.push(s),lh.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",_o(lh.postMessage)),g5e=typeof queueMicrotask<"u"?queueMicrotask.bind(lh):typeof process<"u"&&process.nextTick||ire,be={isArray:Gy,isArrayBuffer:Jne,isBuffer:MBe,isFormData:UBe,isArrayBufferView:OBe,isString:IBe,isNumber:ere,isBoolean:jBe,isObject:QN,isPlainObject:VC,isReadableStream:VBe,isRequest:qBe,isResponse:WBe,isHeaders:GBe,isUndefined:Ex,isDate:LBe,isFile:$Be,isBlob:FBe,isRegExp:o5e,isFunction:_o,isStream:BBe,isURLSearchParams:HBe,isTypedArray:t5e,isFileList:zBe,forEach:sS,merge:tj,extend:YBe,trim:KBe,stripBOM:XBe,inherits:QBe,toFlatObject:ZBe,kindOf:YN,kindOfTest:rl,endsWith:JBe,toArray:e5e,forEachEntry:n5e,matchAll:r5e,isHTMLForm:s5e,hasOwnProperty:zH,hasOwnProp:zH,reduceDescriptors:rre,freezeMethods:a5e,toObjectSet:l5e,toCamelCase:i5e,noop:c5e,toFiniteNumber:u5e,findKey:tre,global:lh,isContextDefined:nre,ALPHABET:sre,generateString:d5e,isSpecCompliantForm:f5e,toJSONObject:h5e,isAsyncFn:p5e,isThenable:m5e,setImmediate:ire,asap:g5e};function Et(t,e,n,r,s){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=t,this.name="AxiosError",e&&(this.code=e),n&&(this.config=n),r&&(this.request=r),s&&(this.response=s)}be.inherits(Et,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:be.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});const ore=Et.prototype,are={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(t=>{are[t]={value:t}});Object.defineProperties(Et,are);Object.defineProperty(ore,"isAxiosError",{value:!0});Et.from=(t,e,n,r,s,i)=>{const o=Object.create(ore);return be.toFlatObject(t,o,function(c){return c!==Error.prototype},a=>a!=="isAxiosError"),Et.call(o,t.message,e,n,r,s),o.cause=t,o.name=t.name,i&&Object.assign(o,i),o};const v5e=null;function nj(t){return be.isPlainObject(t)||be.isArray(t)}function lre(t){return be.endsWith(t,"[]")?t.slice(0,-2):t}function UH(t,e,n){return t?t.concat(e).map(function(s,i){return s=lre(s),!n&&i?"["+s+"]":s}).join(n?".":""):e}function y5e(t){return be.isArray(t)&&!t.some(nj)}const b5e=be.toFlatObject(be,{},null,function(e){return/^is[A-Z]/.test(e)});function ZN(t,e,n){if(!be.isObject(t))throw new TypeError("target must be an object");e=e||new FormData,n=be.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(m,y){return!be.isUndefined(y[m])});const r=n.metaTokens,s=n.visitor||f,i=n.dots,o=n.indexes,c=(n.Blob||typeof Blob<"u"&&Blob)&&be.isSpecCompliantForm(e);if(!be.isFunction(s))throw new TypeError("visitor must be a function");function u(h){if(h===null)return"";if(be.isDate(h))return h.toISOString();if(!c&&be.isBlob(h))throw new Et("Blob is not supported. Use a Buffer instead.");return be.isArrayBuffer(h)||be.isTypedArray(h)?c&&typeof Blob=="function"?new Blob([h]):Buffer.from(h):h}function f(h,m,y){let g=h;if(h&&!y&&typeof h=="object"){if(be.endsWith(m,"{}"))m=r?m:m.slice(0,-2),h=JSON.stringify(h);else if(be.isArray(h)&&y5e(h)||(be.isFileList(h)||be.endsWith(m,"[]"))&&(g=be.toArray(h)))return m=lre(m),g.forEach(function(x,_){!(be.isUndefined(x)||x===null)&&e.append(o===!0?UH([m],_,i):o===null?m:m+"[]",u(x))}),!1}return nj(h)?!0:(e.append(UH(y,m,i),u(h)),!1)}const l=[],d=Object.assign(b5e,{defaultVisitor:f,convertValue:u,isVisitable:nj});function p(h,m){if(!be.isUndefined(h)){if(l.indexOf(h)!==-1)throw Error("Circular reference detected in "+m.join("."));l.push(h),be.forEach(h,function(g,v){(!(be.isUndefined(g)||g===null)&&s.call(e,g,be.isString(v)?v.trim():v,m,d))===!0&&p(g,m?m.concat(v):[v])}),l.pop()}}if(!be.isObject(t))throw new TypeError("data must be an object");return p(t),e}function HH(t){const e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(t).replace(/[!'()~]|%20|%00/g,function(r){return e[r]})}function hF(t,e){this._pairs=[],t&&ZN(t,this,e)}const cre=hF.prototype;cre.append=function(e,n){this._pairs.push([e,n])};cre.toString=function(e){const n=e?function(r){return e.call(this,r,HH)}:HH;return this._pairs.map(function(s){return n(s[0])+"="+n(s[1])},"").join("&")};function x5e(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function ure(t,e,n){if(!e)return t;const r=n&&n.encode||x5e,s=n&&n.serialize;let i;if(s?i=s(e,n):i=be.isURLSearchParams(e)?e.toString():new hF(e,n).toString(r),i){const o=t.indexOf("#");o!==-1&&(t=t.slice(0,o)),t+=(t.indexOf("?")===-1?"?":"&")+i}return t}class VH{constructor(){this.handlers=[]}use(e,n,r){return this.handlers.push({fulfilled:e,rejected:n,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){be.forEach(this.handlers,function(r){r!==null&&e(r)})}}const dre={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},w5e=typeof URLSearchParams<"u"?URLSearchParams:hF,_5e=typeof FormData<"u"?FormData:null,S5e=typeof Blob<"u"?Blob:null,C5e={isBrowser:!0,classes:{URLSearchParams:w5e,FormData:_5e,Blob:S5e},protocols:["http","https","file","blob","url","data"]},pF=typeof window<"u"&&typeof document<"u",E5e=(t=>pF&&["ReactNative","NativeScript","NS"].indexOf(t)<0)(typeof navigator<"u"&&navigator.product),A5e=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",R5e=pF&&window.location.href||"http://localhost",N5e=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:pF,hasStandardBrowserEnv:E5e,hasStandardBrowserWebWorkerEnv:A5e,origin:R5e},Symbol.toStringTag,{value:"Module"})),Ga={...N5e,...C5e};function P5e(t,e){return ZN(t,new Ga.classes.URLSearchParams,Object.assign({visitor:function(n,r,s,i){return Ga.isNode&&be.isBuffer(n)?(this.append(r,n.toString("base64")),!1):i.defaultVisitor.apply(this,arguments)}},e))}function T5e(t){return be.matchAll(/\w+|\[(\w*)]/g,t).map(e=>e[0]==="[]"?"":e[1]||e[0])}function k5e(t){const e={},n=Object.keys(t);let r;const s=n.length;let i;for(r=0;r=n.length;return o=!o&&be.isArray(s)?s.length:o,c?(be.hasOwnProp(s,o)?s[o]=[s[o],r]:s[o]=r,!a):((!s[o]||!be.isObject(s[o]))&&(s[o]=[]),e(n,r,s[o],i)&&be.isArray(s[o])&&(s[o]=k5e(s[o])),!a)}if(be.isFormData(t)&&be.isFunction(t.entries)){const n={};return be.forEachEntry(t,(r,s)=>{e(T5e(r),s,n,0)}),n}return null}function D5e(t,e,n){if(be.isString(t))try{return(e||JSON.parse)(t),be.trim(t)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(t)}const iS={transitional:dre,adapter:["xhr","http","fetch"],transformRequest:[function(e,n){const r=n.getContentType()||"",s=r.indexOf("application/json")>-1,i=be.isObject(e);if(i&&be.isHTMLForm(e)&&(e=new FormData(e)),be.isFormData(e))return s?JSON.stringify(fre(e)):e;if(be.isArrayBuffer(e)||be.isBuffer(e)||be.isStream(e)||be.isFile(e)||be.isBlob(e)||be.isReadableStream(e))return e;if(be.isArrayBufferView(e))return e.buffer;if(be.isURLSearchParams(e))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let a;if(i){if(r.indexOf("application/x-www-form-urlencoded")>-1)return P5e(e,this.formSerializer).toString();if((a=be.isFileList(e))||r.indexOf("multipart/form-data")>-1){const c=this.env&&this.env.FormData;return ZN(a?{"files[]":e}:e,c&&new c,this.formSerializer)}}return i||s?(n.setContentType("application/json",!1),D5e(e)):e}],transformResponse:[function(e){const n=this.transitional||iS.transitional,r=n&&n.forcedJSONParsing,s=this.responseType==="json";if(be.isResponse(e)||be.isReadableStream(e))return e;if(e&&be.isString(e)&&(r&&!this.responseType||s)){const o=!(n&&n.silentJSONParsing)&&s;try{return JSON.parse(e)}catch(a){if(o)throw a.name==="SyntaxError"?Et.from(a,Et.ERR_BAD_RESPONSE,this,null,this.response):a}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Ga.classes.FormData,Blob:Ga.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};be.forEach(["delete","get","head","post","put","patch"],t=>{iS.headers[t]={}});const M5e=be.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),O5e=t=>{const e={};let n,r,s;return t&&t.split(` diff --git a/dist/client/index.html b/dist/client/index.html index 28396f3..156f999 100644 --- a/dist/client/index.html +++ b/dist/client/index.html @@ -8,7 +8,7 @@ Uecko - + diff --git a/package.json b/package.json index 5a94d87..cf32cb3 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "uecko-presupuestador", - "version": "1.0.9", + "version": "1.1.0", "author": "Rodax Software ", "license": "ISC", "private": true,