whoami7 - Manager
:
/
home
/
qbizpnmr
/
arif.umairtax.com
/
public
/
Upload File:
files >> /home/qbizpnmr/arif.umairtax.com/public/Activities-Cch-PWQS.js
import{u as $,bS as k,a as S,bv as F,f as i,b as q,j as s,C as B,b2 as T,S as A,bD as E,l as P,bj as D,bq as d,i as a,bF as L,H as O,r as R,e as z}from"./bundle.OlIVtvc7.js";const G=O.div` background-color: ${o=>o.theme.backgroundColor}; &:hover { background-color: ${o=>o.theme.hoverBackgroundColor}; } `;function H(){const[o]=$();return e=>{var u,h,n,m,l,c,p,j,b,f,_,t,g,C;let r=D(`activity_${e.activity_type_id}`,{});const x={client:s.jsx(d,{to:a("/clients/:id",{id:(u=e.client)==null?void 0:u.hashed_id}),children:(h=e.client)==null?void 0:h.label}),user:((n=e.user)==null?void 0:n.label)??o("system"),invoice:s.jsx(d,{to:a("/invoices/:id/edit",{id:(m=e.invoice)==null?void 0:m.hashed_id}),children:(l=e==null?void 0:e.invoice)==null?void 0:l.label}),recurring_invoice:s.jsx(d,{to:a("/recurring_invoices/:id/edit",{id:(c=e==null?void 0:e.recurring_invoice)==null?void 0:c.hashed_id}),children:(p=e==null?void 0:e.recurring_invoice)==null?void 0:p.label}),contact:s.jsx(d,{to:a("/clients/:id/edit",{id:(j=e==null?void 0:e.contact)==null?void 0:j.hashed_id}),children:(b=e==null?void 0:e.contact)==null?void 0:b.label}),notes:(e==null?void 0:e.notes)&&s.jsxs(s.Fragment,{children:[s.jsx("br",{}),e==null?void 0:e.notes]}),payment_amount:(f=e==null?void 0:e.payment_amount)==null?void 0:f.label,payment:s.jsx(d,{to:a("/payments/:id/edit",{id:(_=e==null?void 0:e.payment)==null?void 0:_.hashed_id}),children:(t=e==null?void 0:e.payment)==null?void 0:t.label}),purchase_order:s.jsx(d,{to:a("/purchase_orders/:id/edit",{id:(g=e==null?void 0:e.purchase_order)==null?void 0:g.hashed_id}),children:(C=e==null?void 0:e.purchase_order)==null?void 0:C.label})};for(const[N,w]of Object.entries(x))r=L(r,`:${N}`,()=>w);return r}}function K(){const[o]=$(),{id:e}=k(),r=S(),x=H(),{timeFormat:u}=F(),{dateFormat:h}=i(),{data:n,isLoading:m}=q({queryKey:["/api/v1/activities/entity",e],queryFn:()=>R("POST",z("/api/v1/activities/entity"),{entity:"purchase_order",entity_id:e}).then(l=>l.data.data),enabled:!!e,staleTime:1/0});return s.jsx(B,{title:o("activity"),className:"shadow-sm",style:{borderColor:r.$24},headerStyle:{borderColor:r.$20},withoutBodyPadding:!0,children:s.jsxs("div",{className:T("w-full px-2 pt-2",{"pb-10":n&&n.length,"pb-6":!n||!n.length}),children:[m&&s.jsx("div",{className:"flex justify-center",children:s.jsx(A,{})}),n&&!n.length&&s.jsx("div",{className:"px-3 pt-3 text-sm",children:o("api_404")}),s.jsx("div",{className:"flex flex-col w-full",children:n==null?void 0:n.map(l=>s.jsxs(G,{className:"flex space-x-3 p-4 rounded-md flex-1 min-w-0 w-full",theme:{backgroundColor:r.$1,hoverBackgroundColor:r.$25},children:[s.jsx("div",{className:"flex items-center justify-center",children:s.jsx("div",{className:"p-2 rounded-full",style:{backgroundColor:r.$20},children:s.jsx(E,{size:"1.3rem",color:r.$16,filledColor:r.$16})})}),s.jsxs("div",{className:"flex flex-col space-y-0.5 flex-1 min-w-0",children:[s.jsx("div",{className:"text-sm",style:{color:r.$3},children:x(l)}),s.jsxs("div",{className:"flex w-full items-center space-x-1 text-xs truncate",style:{color:r.$17},children:[s.jsx("span",{className:"whitespace-nowrap",children:P(l.created_at,`${h} ${u}`)}),s.jsx("span",{children:"-"}),s.jsx("span",{children:l.ip})]})]})]},l.id))})]})})}export{K as default,H as useGenerateActivityElement};
Copyright ©2021 || Defacer Indonesia