whoami7 - Manager
:
/
home
/
qbizpnmr
/
arif.umairtax.com
/
public
/
Upload File:
files >> /home/qbizpnmr/arif.umairtax.com/public/RecurringInvoiceSlider-CHmNRL8L.js
import{bs as H,Z as z,u as D,a as W,a9 as K,I as M,J as Z,Y as J,bt as Q,g as U,K as Y,d as X,b_ as I,bv as ee,f as se,p as te,b as q,j as s,bw as le,bx as ne,by as i,cT as ae,ej as oe,aA as re,aO as ie,bz as de,bA as ce,bf as me,N as ue,bp as xe,D as he,l as b,h as G,i as f,bC as pe,aH as be,bD as je,bE as fe,bj as _e,bq as w,bF as ye,H as Ce,bG as ge,r as B,e as F}from"./bundle.OlIVtvc7.js";import{C as $e}from"./CloudPlay-C_FtsbNl.js";import{H as Ne}from"./History-C-yFGmPI.js";const we=H(null),Se=H(!1);G.extend(ge);const j=Ce.div` background-color: ${({theme:r})=>r.backgroundColor}; &:hover { background-color: ${({theme:r})=>r.hoverBackgroundColor}; } `,Te=()=>{const[r]=D();return n=>{var l,t,c,m,u,x,h;let e=_e(`activity_${n.activity_type_id}`,{});const _={client:s.jsx(w,{to:f("/clients/:id",{id:(l=n.client)==null?void 0:l.hashed_id}),children:(t=n.client)==null?void 0:t.label}),invoice:s.jsx(w,{to:f("/invoices/:id/edit",{id:(c=n==null?void 0:n.invoice)==null?void 0:c.hashed_id}),children:(m=n==null?void 0:n.invoice)==null?void 0:m.label}),user:((u=n.user)==null?void 0:u.label)??r("system"),recurring_invoice:s.jsx(w,{to:f("/recurring_invoices/:id/edit",{id:(x=n.recurring_invoice)==null?void 0:x.hashed_id}),children:(h=n==null?void 0:n.recurring_invoice)==null?void 0:h.label}),notes:(n==null?void 0:n.notes)&&s.jsxs(s.Fragment,{children:[s.jsx("br",{}),"'",n==null?void 0:n.notes,"'"]})};for(const[y,C]of Object.entries(_))e=ye(e,`:${y}`,()=>C);return e}},Ee=()=>{var T,k,v,A,E;const[r,n]=z(Se),[e,_]=z(we),[l]=D(),t=W(),c=K(),m=M(),u=Z(),x=J(),h=Q(),y=U(),C=Te(),L=Y({withTimezone:!0}),g=X(),O=I({showCommonBulkActions:!0,showEditAction:!0}),{timeFormat:S}=ee(),{dateFormat:p}=se(),[$,V]=te.useState(!1),{data:o}=q({queryKey:["/api/v1/recurring_invoices",e==null?void 0:e.id,"slider"],queryFn:()=>B("GET",F("/api/v1/recurring_invoices/:id?include=activities.history&show_dates=true",{id:e==null?void 0:e.id})).then(a=>a.data.data),enabled:e!==null&&r,staleTime:1/0}),{data:N}=q({queryKey:["/api/v1/activities/entity",e==null?void 0:e.id],queryFn:()=>B("POST",F("/api/v1/activities/entity"),{entity:"recurring_invoice",entity_id:e==null?void 0:e.id}).then(a=>a.data.data),enabled:e!==null&&r,staleTime:1/0});return s.jsx(le,{visible:r,onClose:()=>{n(!1),_(null)},size:"regular",title:`${l("recurring_invoice")} ${(e==null?void 0:e.number)||""}`,topRight:e&&(x("edit_recurring_invoice")||h(e))?s.jsx(fe,{label:l("actions"),resource:e,actions:O}):null,withoutActionContainer:!0,withoutHeaderBorder:!0,children:s.jsxs(ne,{tabs:[l("overview"),l("history"),l("schedule"),l("activity")],width:"full",withHorizontalPadding:!0,horizontalPaddingWidth:"1.5rem",children:[s.jsxs("div",{className:"space-y-2",children:[s.jsxs("div",{className:"px-6",children:[s.jsx(i,{className:"border-b border-dashed",leftSide:l("invoice_amount"),pushContentToRight:!0,withoutWrappingLeftSide:!0,noExternalPadding:!0,style:{borderColor:t.$20},children:e?g((e==null?void 0:e.amount)||0,(T=e.client)==null?void 0:T.country_id,(k=e.client)==null?void 0:k.settings.currency_id):null}),s.jsx(i,{className:"border-b border-dashed",leftSide:l("balance_due"),pushContentToRight:!0,withoutWrappingLeftSide:!0,noExternalPadding:!0,style:{borderColor:t.$20},children:e?g(e.balance||0,(v=e.client)==null?void 0:v.country_id,(A=e.client)==null?void 0:A.settings.currency_id):null}),e&&e.next_send_date?s.jsx(i,{className:"border-b border-dashed",leftSide:l("next_send_date"),pushContentToRight:!0,noExternalPadding:!0,style:{borderColor:t.$20},children:e?L(e.next_send_datetime,"","",u(m(e.client,"timezone_id")).timeZone):null}):null,s.jsx(i,{className:"border-b border-dashed",leftSide:l("frequency"),pushContentToRight:!0,noExternalPadding:!0,style:{borderColor:t.$20},children:l(ae[e==null?void 0:e.frequency_id])}),s.jsx(i,{className:"border-b border-dashed",leftSide:l("remaining_cycles"),pushContentToRight:!0,withoutWrappingLeftSide:!0,noExternalPadding:!0,style:{borderColor:t.$20},children:(e==null?void 0:e.remaining_cycles)===-1?l("endless"):e==null?void 0:e.remaining_cycles}),s.jsx(i,{className:"border-b border-dashed",leftSide:l("auto_bill"),pushContentToRight:!0,noExternalPadding:!0,style:{borderColor:t.$20},children:l((e==null?void 0:e.auto_bill)||"")}),s.jsx(i,{leftSide:l("status"),pushContentToRight:!0,noExternalPadding:!0,children:e?s.jsx(oe,{entity:e}):null})]}),s.jsx(re,{withoutPadding:!0,borderColor:t.$20}),s.jsxs("div",{className:"flex space-x-4 items-center justify-center px-6 py-5",children:[s.jsxs(j,{className:"flex flex-col items-center justify-center space-y-2 shadow-sm border px-14 py-5 cursor-pointer rounded-md",onClick:()=>e?ie(e):null,style:{borderColor:t.$20},theme:{backgroundColor:t.$1,hoverBackgroundColor:t.$4},children:[s.jsx($e,{color:t.$17,filledColor:t.$17,size:"1.3rem"}),s.jsx("span",{className:"font-medium whitespace-nowrap",style:{color:t.$3},children:l("view_portal")})]}),e?s.jsxs(j,{className:"flex flex-col items-center justify-center space-y-2 shadow-sm border px-14 py-5 cursor-pointer rounded-md",onClick:()=>{navigator.clipboard.writeText(ce(e)??""),me.success("copied_to_clipboard",{value:""})},style:{borderColor:t.$20},theme:{backgroundColor:t.$1,hoverBackgroundColor:t.$4},children:[s.jsx(de,{color:t.$17,filledColor:t.$17,size:"1.3rem"}),s.jsx("span",{className:"font-medium whitespace-nowrap",style:{color:t.$3},children:l("copy_link")})]}):null]})]}),s.jsxs("div",{children:[(o==null?void 0:o.activities)&&o.activities.length===0&&s.jsx(ue,{children:l("api_404")}),!!((E=o==null?void 0:o.activities)!=null&&E.length)&&s.jsx("div",{className:"flex flex-col px-3",children:(o==null?void 0:o.activities)&&o.activities.map(a=>{var d,P,R;return s.jsxs(j,{className:"flex items-center justify-start p-4 space-x-3 rounded-md cursor-pointer",onClick:()=>c(f("/activities/:id",{id:a.id})),theme:{backgroundColor:t.$1,hoverBackgroundColor:t.$25},children:[s.jsx("div",{className:"p-2 rounded-full",style:{backgroundColor:t.$20},children:s.jsx(Ne,{size:"1.3rem",color:t.$16,filledColor:t.$16})}),s.jsxs("div",{className:"flex flex-col items-start space-y-0.5 justify-center",children:[s.jsxs("div",{className:"flex space-x-1 text-sm",children:[s.jsx("span",{style:{color:t.$3},children:e!=null&&e.client?g(a.history.amount||0,(d=e==null?void 0:e.client)==null?void 0:d.country_id,(P=e==null?void 0:e.client)==null?void 0:P.settings.currency_id):null}),s.jsx("div",{children:s.jsx(xe,{color:t.$17,size:"1.1rem"})}),s.jsx(he,{to:`/clients/${a.client_id}`,renderSpan:y("client",e==null?void 0:e.client),children:(R=e==null?void 0:e.client)==null?void 0:R.display_name})]}),s.jsxs("div",{className:"flex items-center space-x-1 text-xs",style:{color:t.$17},children:[s.jsx("span",{children:b(a.created_at,`${p} ${S}`)}),s.jsx("span",{children:G.unix(a.created_at).fromNow()})]})]})]},a.id)})})]}),s.jsxs("div",{children:[s.jsxs("div",{className:"flex px-6 pt-2 pb-3 font-medium text-sm",style:{color:t.$22},children:[s.jsx("span",{className:"w-1/2",children:l("send_date")}),s.jsx("span",{className:"w-1/2",children:l("due_date")})]}),s.jsx("div",{className:"px-6",children:o==null?void 0:o.recurring_dates.map((a,d)=>s.jsxs("div",{className:"flex py-2 text-sm border-b border-dashed",style:{borderColor:d===o.recurring_dates.length-1?"transparent":t.$20},children:[s.jsx("span",{className:"w-1/2",style:{color:t.$3},children:b(a.send_date,p)}),s.jsx("span",{className:"w-1/2",style:{color:t.$3},children:b(a.due_date,p)})]},d))})]}),s.jsxs("div",{children:[s.jsxs("div",{className:"flex items-center border-b px-6 pb-4 justify-between",style:{borderColor:t.$20},children:[s.jsx(pe,{label:l("comments_only"),checked:$,onValueChange:a=>V(a)}),s.jsx(be,{entity:"recurring_invoice",entityId:o==null?void 0:o.id,label:(o==null?void 0:o.number)||""})]}),s.jsx("div",{className:"flex flex-col pt-3 px-3",children:N==null?void 0:N.filter(a=>$&&a.activity_type_id===141||!$).map(a=>s.jsxs(j,{className:"flex space-x-3 p-4 rounded-md flex-1 min-w-0",theme:{backgroundColor:t.$1,hoverBackgroundColor:t.$25},children:[s.jsx("div",{className:"flex items-center justify-center",children:s.jsx("div",{className:"p-2 rounded-full",style:{backgroundColor:t.$20},children:s.jsx(je,{size:"1.3rem",color:t.$16,filledColor:t.$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:t.$3},children:C(a)}),s.jsxs("div",{className:"flex w-full items-center space-x-1 text-xs truncate",style:{color:t.$17},children:[s.jsx("span",{className:"whitespace-nowrap",children:b(a.created_at,`${p} ${S}`)}),s.jsx("span",{children:"-"}),s.jsx("span",{children:a.ip})]})]})]},a.id))})]})]})})};export{Ee as R,Se as a,we as r,Te as u};
Copyright ©2021 || Defacer Indonesia