PageSourceSearch

https://app.withvayu.com/assets/ContractInvoiceFormatPage-e19a5772.js

js withvayu.com collected 2026-10-03 19:30:06 UTC 2,355 bytes, 1 lines download raw bytes

1import{o as g,p as v,a_ as p,j as r,u as b,r as u}from"./vendor-react-2cb5d109.js";import{d,c3 as y,c4 as I,c5 as S,bb as h}from"./vendor-vy-bde48d53.js";import"./vendor-misc-09f7f1da.js";import{a as C}from"./use-account-f5081143.js";import{u as E}from"./use-contract-page-b55cb2ea.js";import{Y as P,o as x,q as F,e as j,h as w,Z as D}from"./app-core-47ba8b05.js";import{I as _}from"./InvoiceFormatEditor-73391dac.js";import{c as L,m as N}from"./vendor-vy-ds-da93fbfd.js";import"./vendor-mui-c34240eb.js";import"./reference-data-query-options-consts-650f2d3a.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{};e.SENTRY_RELEASE={id:"a44d049e7c59"};var t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="8d087264-b266-4c4c-8c3b-a916e1fe00be",e._sentryDebugIdIdentifier="sentry-dbid-8d087264-b266-4c4c-8c3b-a916e1fe00be")}catch{}})();function R(e){const t=g();return v(({contractId:a,...o})=>j().updateContractInvoiceFormat({contractId:a,updateContractInvoiceFormatRequest:o}),{...e,onSuccess:async(a,o,s)=>{var n;await Promise.all([P(t),x(t),t.invalidateQueries(F.contractPage(a.contractId))]),await((n=e==null?void 0:e.onSuccess)==null?void 0:n.call(e,a,o,s))}})}function K(){const{contractId:e=""}=p(),{data:t}=E(e,{enabled:e.length>0}),{data:a}=C();return!d(t)||!d(a)?r.jsx(L,{sx:{height:"100vh",alignItems:"center",justifyContent:"center"},children:r.jsx(N,{})}):r.jsx(T,{contract:t.contractPageData.contract,account:a.account,contractId:e})}function T({contract:e,account:t,contractId:a}){var c;const s=((c=b().state)==null?void 0:c.from)??`/plans/contracts/${a}`,n=R(),i=u.useMemo(()=>y(e),[e]),m=u.useMemo(()=>I(i,t,{currency:S(e),customer:e.customer,refNo:`#${e.id.slice(-5)}`}),[i,t,e]);function l(f){D(n,{contractId:a,...f},{pending:"Saving invoice format...",success:"Invoice format saved",error:"Failed to save invoice format"})}return r.jsx(_,{subtitle:"Template · applies to every invoice generated from this contract",catalogue:i,sampleInvoice:m,savedSettings:e.contractSettings,inheritedSettings:[e.plan.invoiceFormat],restoreLabel:"Reset to plan format",accountInvoicingSettings:t.settings.invoicingSettings,canEdit:w([h.PLAN_UPDATE]),isSaving:n.isLoading,onSave:l,backTarget:s})}export{K as ContractInvoiceFormatPage};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.