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