whoami7 - Manager
:
/
home
/
qbizpnmr
/
arif.umairtax.com
/
public
/
Upload File:
files >> /home/qbizpnmr/arif.umairtax.com/public/Vendor-R3X2jQm6.js
import{u as h,M as w,bS as p,i as n,j as e,bT as v,dd as C,L as T,fe as E,ff as P,a9 as k,Y as B,bt as A,p as D,f as L,a as S,Q as V,a_ as I,bq as O,a$ as R,ci as F,bV as Q,bW as q,bE as H,l as M}from"./bundle.OlIVtvc7.js";import{I as u}from"./InfoCard-BvC2FhUQ.js";import{u as W}from"./useActions-71aU1kti.js";import{P as Y}from"./PreviousNextNavigation-zAd8_mLU.js";function z(m){const[i]=h(),c=w(),{vendor:s}=m,{id:o}=p();let r=[{name:i("purchase_orders"),href:n("/vendors/:id",{id:o})},{name:i("expenses"),href:n("/vendors/:id/expenses",{id:o})},{name:i("recurring_expenses"),href:n("/vendors/:id/recurring_expenses",{id:o})},{name:i("activity"),href:n("/vendors/:id/activities",{id:o})},{name:i("documents"),href:n("/vendors/:id/documents",{id:o}),formatName:()=>e.jsx(v,{numberOfDocuments:s==null?void 0:s.documents.length})}];return C.forEach(l=>{c(l.bitmask)||(r=r.filter(d=>d.name!==i(l.label)))}),r}function X(){var x,f;const{documentTitle:m,setDocumentTitle:i}=T("view_vendor"),{id:c}=p(),{data:s}=E({id:c}),o=P(),r=W(),[l]=h(),d=k(),y=B(),b=A();D.useEffect(()=>{s&&s.name.length>=1&&i(s.name)},[s]);const j=[{name:l("vendors"),href:"/vendors"},{name:m||"",href:n("/vendors/:id",{id:c})}],N=z({vendor:s}),{dateFormat:g}=L(),_=t=>t?M(t,g):l("never"),a=S();return e.jsxs(V,{title:m,breadcrumbs:j,...(y("edit_vendor")||b(s))&&s&&{navigationTopRight:e.jsx(H,{saveButtonLabel:l("edit_vendor"),onSaveClick:()=>d(n("/vendors/:id/edit",{id:c})),resource:s,actions:r})},afterBreadcrumbs:e.jsx(Y,{entity:"vendor"}),children:[e.jsxs("div",{className:"grid grid-cols-12 gap-4",children:[e.jsx(u,{title:l("details"),className:"h-full 2xl:h-max col-span-12 lg:col-span-4 shadow-sm p-4",style:{borderColor:a.$24},withoutPadding:!0,children:e.jsxs("div",{className:"flex flex-col pt-1 space-y-3 h-44 overflow-y-auto",children:[s&&e.jsxs("div",{className:"flex flex-col space-y-1",children:[e.jsx("span",{className:"text-sm font-medium",style:{color:a.$22},children:l("status")}),e.jsx("div",{children:e.jsx(I,{entity:s})})]}),(s==null?void 0:s.id_number)&&e.jsxs("div",{className:"flex flex-col space-y-1",children:[e.jsx("span",{className:"text-sm font-medium",style:{color:a.$22},children:l("id_number")}),e.jsx("span",{className:"text-sm font-medium",style:{color:a.$3},children:s.id_number})]}),(s==null?void 0:s.vat_number)&&e.jsxs("div",{className:"flex flex-col space-y-1",children:[e.jsx("span",{className:"text-sm font-medium",style:{color:a.$22},children:l("vat_number")}),e.jsx("span",{className:"text-sm font-medium",style:{color:a.$3},children:s.vat_number})]}),!!(s!=null&&s.last_login)&&e.jsxs("div",{className:"flex flex-col space-y-1",children:[e.jsx("span",{className:"text-sm font-medium",style:{color:a.$22},children:l("last_login")}),e.jsx("span",{className:"text-sm font-medium",style:{color:a.$3},children:_(s==null?void 0:s.last_login)})]}),(s==null?void 0:s.website)&&e.jsxs("div",{className:"flex flex-col space-y-1",children:[e.jsx("span",{className:"text-sm font-medium",style:{color:a.$22},children:l("website")}),e.jsx(O,{className:"font-medium whitespace-normal",to:s.website,external:!0,style:{textAlign:"left"},children:s.website})]})]})}),e.jsx(u,{title:l("address"),withoutTruncate:!0,className:"shadow-sm h-full 2xl:h-max col-span-12 lg:col-span-4 p-4",style:{borderColor:a.$24},withoutPadding:!0,children:e.jsxs("div",{className:"flex flex-col pt-1 h-44 overflow-y-auto",children:[(s==null?void 0:s.address1)&&e.jsx("span",{className:"break-all text-sm font-medium",style:{color:a.$3},children:s.address1}),(s==null?void 0:s.address2)&&e.jsx("span",{className:"break-all text-sm font-medium",style:{color:a.$3},children:s.address2}),((s==null?void 0:s.city)||(s==null?void 0:s.state)||(s==null?void 0:s.postal_code))&&e.jsxs("span",{className:"break-all text-sm font-medium",style:{color:a.$3},children:[s.city&&s.city,s.city&&s.state&&", ",s.state,(s.city||s.state)&&s.postal_code&&" ",s.postal_code]}),(s==null?void 0:s.country_id)&&((x=o.find(t=>t.id===s.country_id))==null?void 0:x.name)&&e.jsx("span",{className:"break-all text-sm font-medium",style:{color:a.$3},children:(f=o.find(t=>t.id===s.country_id))==null?void 0:f.name})]})}),e.jsx(u,{title:l("contacts"),className:"col-span-12 lg:col-span-4 shadow-sm h-full 2xl:h-max p-4",style:{borderColor:a.$24},withoutPadding:!0,children:e.jsx("div",{className:"flex flex-col h-44 w-full overflow-y-auto",children:s==null?void 0:s.contacts.map((t,$)=>e.jsx("div",{className:"flex justify-between items-center first:pt-1 py-4 border-b border-dashed",style:{borderColor:a.$21},children:e.jsxs("div",{className:"flex flex-col space-y-1 text-sm",children:[!!(t.first_name||t.last_name)&&e.jsxs("span",{className:"font-medium",style:{color:a.$3},children:[t.first_name," ",t.last_name]}),!!t.phone&&e.jsx("span",{className:"font-medium",style:{color:a.$22},children:t.phone}),!!t.email&&e.jsxs("div",{className:"flex space-x-2",children:[e.jsx("a",{href:`mailto:${t.email}`,className:"font-medium",style:{color:a.$22},children:t.email}),e.jsx(R,{message:l("copy"),placement:"top",width:"auto",centerVertically:!0,children:e.jsx(F,{text:t.email})})]})]})},$))})})]}),e.jsx(Q,{tabs:N,className:"my-6"}),e.jsx(q,{context:{displayName:(s==null?void 0:s.name)||""}})]})}export{X as default};
Copyright ©2021 || Defacer Indonesia