1import{_ as q}from"./Title.vue.kKV6Tbc7.js";import{_ as E}from"./Headline.vue.TYkGMqlL.js";import{_ as L}from"./VDivider.vue.PdpUP7EN.js";import{_ as B}from"./Button.rqw7atPz.js";import{_ as I}from"./Table.dd6ibwI1.js";import{d as C,k as W,c as T,o as b,l as U,m as r,t as d,b as e,h as s,w as l,i as j,S as $,D as w,E as M,H as P,B as Y,O as H,g as G}from"./entry.eAwQsD1a.js";import{u as D}from"./useDirectus.PaBxmo4Y.js";import{f as A}from"./currency.cSny6bph.js";import{g as J,a as K,b as Q}from"./time.TYhP27-i.js";import{w as z}from"./Icon.Bclsazv-.js";import{_ as X}from"./Pagination.eY34ORfK.js";import{_ as Z,a as ee}from"./Slideover.NNzzSYSN.js";import{_ as te}from"./_plugin-vue_export-helper.x3n3nnut.js";import"./UIcon.vue.q5BiR_CF.js";import"./nuxt-link.FwEzzv3T.js";import"./selectMenu.LLDhGwvZ.js";import"./Icon.mrl4pZkk.js";import"./Checkbox.jlCAE0XR.js";import"./useFormGroup.SefvtU2y.js";import"./index.0wqzsba0.js";import"./Avatar.3eHOCK-w.js";import"./index.iYKnUtq8.js";import"./Dropdown.SHU2QIIj.js";import"./Kbd.SQ7anWQl.js";import"./keyboard.vbECN2Vo.js";import"./transition.5YQFgrHJ.js";import"./combobox.wj5iimCf.js";import"./VLabel.1nIAEZ_v.js";import"./VAvatar.vue.ub-kRqjh.js";import"./nuxt-img._LKL550M.js";import"./user-name.1rxK8hrK.js";import"./DateDisplay.vue.bmCAZhSX.js";import"./FileCard.vue.jabOvjOw.js";import"./Card.OVYrjFH4.js";import"./useToast.VRliYgOS.js";import"./useFiles.dWUDMRFN.js";import"./UForm.vue.cDAqWEqD.js";import"./VAlert.vue.oSk6Dsi8.js";import"./Input.aKT7WUps.js";import"./Textarea.nWu07eBi.js";import"./composables.Mu4pbvdE.js";import"./VUpload.vue.rJypDffV.js";import"./embed.My3IY24S.js";const oe={class:"w-full px-4 py-10 bg-white border rounded-panel dark:border-gray-700 dark:bg-gray-900"},ne=r("dt",{class:"font-medium leading-6 text-gray-500 font-display dark:text-gray-300"},"Open Invoices",-1),ae={class:"flex-none w-full text-3xl font-medium leading-10 tracking-tight text-gray-900 dark:text-white"},se={class:"capitalize"},re={class:"capitalize"},ie=C({__name:"InvoiceWidget",async setup(v){let a,y;const{data:i,pending:c,error:h}=([a,y]=z(()=>W("organization-open-invoices",()=>D($("os_invoices",{fields:["*"],filter:{_and:[{status:{_neq:"open"}}]}})),{})),a=await a,y(),a),_=T(()=>{var t;return(t=i.value)==null?void 0:t.reduce((p,g)=>p+g.amount_due,0)}),k=[{key:"invoice_number",label:"#"},{key:"due_date",label:"Due Date"},{key:"amount_due",label:"Amount Due"}];return(t,p)=>{const g=B,f=I;return b(),U("div",oe,[r("div",null,[ne,r("dd",ae,d(e(_)?("formatCurrency"in t?t.formatCurrency:e(A))(e(_)):"N/A"),1)]),s(f,{columns:k,rows:e(i)},{"invoice_number-data":l(({row:o})=>[s(g,{variant:"outline",to:`/portal/billing/invoices/${o.id}`},{default:l(()=>[j(d(o.invoice_number),1)]),_:2},1032,["to"])]),"due_date-data":l(({row:o})=>[r("p",se,d(("getFriendlyDate"in t?t.getFriendlyDate:e(J))(o.due_date)),1)]),"amount_due-data":l(({row:o})=>[r("p",re,d(("formatCurrency"in t?t.formatCurrency:e(A))(o.amount_due)),1)]),_:1},8,["rows"])])}}}),me={class:"px-4 py-10 bg-white border border-gray-300 rounded-panel dark:border-gray-700 dark:bg-gray-900"},le=r("dt",{class:"font-medium leading-6 text-gray-500 font-display dark:text-gray-300"},"Open Tasks",-1),ce={class:"flex-none w-full text-3xl font-medium leading-10 tracking-tight text-gray-900 dark:text-white"},ue={class:"truncate"},de={class:"capitalize"},_e=C({__name:"TaskWidget",async setup(v){let a,y;const i=w(1),c=w(5),{data:h,pending:_,error:k,refresh:t}=([a,y]=z(()=>W("user-open-tasks",()=>{const n={_and:[{status:{_neq:"open"}},{is_visible_to_client:{_eq:!0}}]},m=D($("os_tasks",{fields:["id","name","due_date"],sort:["due_date"],filter:n,limit:e(c),offset:(e(i)-1)*5})),x=D($("os_tasks",{filter:n,aggregate:{count:["*"]}}));return Promise.all([m,x])},{transform:([n,m])=>({tasks:n,count:parseInt(m[0].count)??0})})),a=await a,y(),a),p=[{key:"name",label:"Name"},{key:"due_date",label:"Due Date"}],g=T(()=>{var n;return((n=h.value)==null?void 0:n.tasks)??[]}),f=T(()=>{var n;return((n=h.value)==null?void 0:n.count)??0});M(i,()=>{t()});const o=w(!1),V=w(null);async function R(n){V.value=n,o.value=!0}return(n,m)=>{const x=B,F=I,N=X,O=Z,S=ee;return b(),U("div",me,[r("div",null,[le,r("dd",ce,d(e(f))+" tasks ",1)]),s(F,{columns:p,rows:e(g)},{"name-data":l(({row:u})=>[s(x,{variant:"link",class:"max-w-[250px]",padded:!1,onClick:we=>R(u.id)},{default:l(()=>[r("span",ue,d(u.name??"Task with no name"),1)]),_:2},1032,["onClick"])]),"due_date-data":l(({row:u})=>[r("p",de,d(("getRelativeTime"in n?n.getRelativeTime:e(K))(u.due_date)),1)]),_:1},8,["rows"]),s(N,{modelValue:e(i),"onUpdate:modelValue":m[0]||(m[0]=u=>P(i)?i.value=u:null),max:5,"page-count":e(c),total:e(f)},null,8,["modelValue","page-count","total"]),s(S,{modelValue:e(o),"onUpdate:modelValue":m[2]||(m[2]=u=>P(o)?o.value=u:null),ui:{width:"max-w-xl"}},{default:l(()=>[s(O,{"task-id":e(V)??"",class:"overflow-y-auto",onClose:m[1]||(m[1]=u=>o.value=!1)},null,8,["task-id"])]),_:1},8,["modelValue"])])}}}),pe={},ge={class:"px-4 py-8 mx-auto max-w-7xl md:py-24 lg:py-12 lg:px-8"};function fe(v,a){return b(),U("div",ge,[Y(v.$slots,"default")])}const ye=te(pe,[["render",fe]]),he=""+new URL("tokyo-luminous-table-lamp-on-boxes.J52G9qAL.svg",import.meta.url).href,ke=r("img",{class:"w-48 ml-auto mr-0",src:he},null,-1),ve={class:"grid w-full grid-cols-1 gap-6 md:grid-cols-2"},ut=C({__name:"index",setup(v){function a(){const c=["Remember, <em>every challenge</em> is easier together.","Your vision is our mission. Together, we'll create <em>something outstanding</em>.","The best projects are <em>fueled by partnership</em>. Here's to another successful day working together!","Every detail, every idea, every feedback. <em>It all matters</em>
1. Thank you for entrusting us with your vision.","Project management isn't just about the destination, it's about <em>enjoying and learning from the journey</em>. We're thrilled to be on this adventure with you.","With every challenge, we <em>grow stronger</em>. Thanks for pushing us to be our best!","From concept to completion, your aspirations are in <em>dedicated hands</em>. Let's keep moving forward, together.","Like a symphony, <em>every note counts</em>. We're harmonizing perfectly with your vision, creating a masterpiece in progress.","As we tackle today's tasks, know that our <em>commitment</em> to your success is unwavering.","Every step with you is a step towards <em>brilliance</em>. Thanks for making this journey shine brighter."];function h(){const _=new Date,k=new Date(_.getFullYear(),0,0),t=_.getTime()-k.getTime(),p=1e3*60*60*24,f=Math.floor(t/p)%c.length;return c[f]}return{getTodaysMessage:h}}const{getTodaysMessage:y}=a(),{user:i}=H();return(c,h)=>{const _=q,k=E,t=L,p=ie,g=_e,f=ye;return b(),G(f,null,{default:l(()=>[ke,s(_,{class:"normal-case"},{default:l(()=>{var o;return[j(d(("greetUser"in c?c.greetUser:e(Q))())+" "+d(((o=e(i))==null?void 0:o.first_name)??"friend")+",",1)]}),_:1}),s(k,{content:e(y)(),size:"xl"},null,8,["content"]),s(t,{class:"my-8"}),r("div",ve,[s(p),s(g)])]),_:1})}}});
1export{ut as default};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.