whoami7 - Manager
:
/
home
/
qbizpnmr
/
arif.umairtax.com
/
public
/
Upload File:
files >> /home/qbizpnmr/arif.umairtax.com/public/Edit-D5ioH2mG.js
import{u as L,bO as P,w,cq as S,a as D,eB as N,j as e,C as Q,ey as R,bx as F,ct as x,cd as a,S as h}from"./bundle.OlIVtvc7.js";import{C as O}from"./ClientSelector-Ba4kw69L.js";import{u as B,I as E,a as $}from"./useProductColumns-CRexQ0gt.js";import{Q as q,a as A}from"./QuoteFooter-CcFuEu5K.js";import{u as G,T as M}from"./TasksTabLabel-Ba8gqxlc.js";import"./ClientActionButtons-DC8u7uNL.js";import"./InvoiceViewer-Dp83-peG.js";function X(){const[i]=L(),[C]=P(),r=w(),j=S(),{quote:s,errors:o,isDefaultTerms:y,isDefaultFooter:f,client:l,setIsDefaultFooter:v,setIsDefaultTerms:I,invoiceSum:T}=j,c=D(),g=G(),_=B(),{handleChange:n,handleInvitationChange:b,handleLineItemChange:m,handleLineItemPropertyChange:d,handleCreateLineItem:u,handleDeleteLineItem:p}=N({client:l});return e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"grid grid-cols-12 gap-4",children:[e.jsx(Q,{className:"col-span-12 xl:col-span-4 h-max px-6 py-2 shadow-sm",style:{borderColor:c.$24},children:e.jsxs("div",{className:"flex flex-col space-y-4",children:[s&&e.jsxs("div",{className:"flex items-center space-x-9",children:[e.jsx("span",{className:"text-sm font-medium",style:{color:c.$22},children:i("status")}),e.jsx("div",{children:e.jsx(R,{entity:s})})]}),e.jsx(O,{resource:s,onChange:t=>n("client_id",t),onClearButtonClick:()=>n("client_id",""),onLocationChange:t=>n("location_id",t),onContactCheckboxChange:b,errorMessage:o==null?void 0:o.errors.client_id,textOnly:!0,readonly:!0})]})}),e.jsx(q,{handleChange:n,errors:o}),e.jsx("div",{className:"col-span-12",children:e.jsxs(F,{tabs:[i("products"),i("tasks")],defaultTabIndex:C.get("table")==="tasks"?1:0,formatTabLabel:t=>{if(t===1)return e.jsx(M,{lineItems:(s==null?void 0:s.line_items)||[]})},children:[e.jsx("div",{children:s&&l?e.jsx(x,{type:"product",resource:s,items:s.line_items.filter(t=>t.type_id===a.Product),columns:_,relationType:"client_id",onLineItemChange:m,onSort:t=>n("line_items",t),onLineItemPropertyChange:d,onCreateItemClick:()=>u(a.Product),onDeleteRowClick:p}):e.jsx(h,{})}),e.jsx("div",{children:s&&l?e.jsx(x,{type:"task",resource:s,items:s.line_items.filter(t=>t.type_id===a.Task),columns:g,relationType:"client_id",onLineItemChange:m,onSort:t=>n("line_items",t),onLineItemPropertyChange:d,onCreateItemClick:()=>u(a.Task),onDeleteRowClick:p}):e.jsx(h,{})})]})}),e.jsx(A,{handleChange:n,errors:o,isDefaultFooter:f,isDefaultTerms:y,setIsDefaultFooter:v,setIsDefaultTerms:I}),s&&e.jsx(E,{relationType:"client_id",resource:s,invoiceSum:T,onChange:(t,k)=>n(t,k)})]}),(r==null?void 0:r.show_pdf_preview)&&e.jsx("div",{className:"my-4",children:s&&e.jsx($,{for:"invoice",resource:s,entity:"quote",relationType:"client_id",endpoint:"/api/v1/live_preview?entity=:entity",withRemoveLogoCTA:!0,observable:!0,initiallyVisible:!1})})]})}export{X as default};
Copyright ©2021 || Defacer Indonesia