bettertend/frontend/dist/assets/TimeTracker-Ch4gtOrh.js

2 lines
19 KiB
JavaScript

import{aO as he,r as U,c as O,b2 as B,b3 as Te,m as oe,b4 as we,_ as xe,a as y,g as f,b as t,j as A,d as R,e as n,k as te,w as ce,t as F,F as me,af as se,aQ as ke,i as Ee,aR as Se}from"./index-BUdRbiwj.js";import{F as J}from"./FPInput-CzR_dWoe.js";import{F as ve}from"./FPSelect-C7p47Ma2.js";const _e=he("timeTracking",()=>{const d=U(new Map),u=U(new Map),k=U(new Map),m=U(!1),v=U(null),T=U(!1),p=U(0),E=O(()=>s=>u.value.get(s)||[]),K=O(()=>s=>d.value.get(s)),z=O(()=>s=>d.value.has(s)),h=O(()=>s=>(u.value.get(s)||[]).reduce((l,c)=>l+(c.duration||0),0)),_=O(()=>s=>(u.value.get(s)||[]).reduce((l,c)=>l+(c.duration||0)*(c.hourlyRate||0),0));return{activeTimers:d,timeEntries:u,timerSessions:k,loading:m,error:v,globalTimerRunning:T,activeTimerCount:p,getTimeEntriesForWorkOrder:E,getActiveTimerForUser:K,hasActiveTimer:z,getTotalHoursForWorkOrder:h,getTotalCostForWorkOrder:_,loadTimeEntries:async s=>{try{m.value=!0,v.value=null;const i=await B.getByWorkOrderId(s);return u.value.set(s,i),i}catch(i){throw v.value=i.message||"Failed to load time entries",i}finally{m.value=!1}},addTimeEntry:async(s,i)=>{try{m.value=!0,v.value=null;const l=await B.create({...i,workOrderId:s}),c=u.value.get(s)||[];return u.value.set(s,[l,...c]),l}catch(l){throw v.value=l.message||"Failed to add time entry",l}finally{m.value=!1}},updateTimeEntry:async(s,i,l)=>{try{m.value=!0,v.value=null;const c=await B.update(i,l),D=u.value.get(s)||[],C=D.findIndex(q=>q.id===i);return C!==-1&&(D[C]=c,u.value.set(s,[...D])),c}catch(c){throw v.value=c.message||"Failed to update time entry",c}finally{m.value=!1}},removeTimeEntry:async(s,i)=>{try{m.value=!0,v.value=null,await B.delete(i);const c=(u.value.get(s)||[]).filter(D=>D.id!==i);return u.value.set(s,c),!0}catch(l){throw v.value=l.message||"Failed to remove time entry",l}finally{m.value=!1}},startTimer:async(s,i,l={})=>{try{if(m.value=!0,v.value=null,d.value.has(s))throw new Error("User already has an active timer");const c=await B.startTimer({userId:s,workOrderId:i,...l});return d.value.set(s,{...c,workOrderId:i,startTime:new Date,localElapsed:0}),p.value=d.value.size,T.value=p.value>0,c}catch(c){throw v.value=c.message||"Failed to start timer",c}finally{m.value=!1}},stopTimer:async(s,i={})=>{try{m.value=!0,v.value=null;const l=d.value.get(s);if(!l)throw new Error("No active timer found for user");const c=await B.stopTimer(l.id,i),D=l.workOrderId,C=u.value.get(D)||[];return u.value.set(D,[c,...C]),d.value.delete(s),p.value=d.value.size,T.value=p.value>0,c}catch(l){throw v.value=l.message||"Failed to stop timer",l}finally{m.value=!1}},updateTimerElapsed:(s,i)=>{const l=d.value.get(s);l&&(l.localElapsed=i,d.value.set(s,{...l}))},loadActiveTimers:async s=>{try{const i=await B.getActiveTimers(s);return i.forEach(l=>{d.value.set(l.userId,{...l,startTime:new Date(l.startTime),localElapsed:0})}),p.value=d.value.size,T.value=p.value>0,i}catch(i){return console.error("Failed to load active timers:",i),[]}},getSummary:async s=>{try{return await B.getSummary(s)}catch(i){throw v.value=i.message||"Failed to get time tracking summary",i}},clearWorkOrderData:s=>{u.value.delete(s)},clearUserTimer:s=>{d.value.delete(s),p.value=d.value.size,T.value=p.value>0},clearError:()=>{v.value=null},enableAutoSave:(s=3e4)=>{setInterval(()=>{d.value.forEach((i,l)=>{i.localElapsed>0&&console.log(`Auto-saving timer for user ${l}: ${i.localElapsed}`)})},s)}}});function be(d={}){const{workOrderId:u=null,userId:k=null,userOptions:m=[],autoSave:v=!1,autoSaveInterval:T=3e4,persistToLocalStorage:p=!0}=d,E=_e(),{loading:K,error:z}=Te(E),h=U([]),_=U(!1),w=U({startTime:null,userId:null,description:"",workOrderId:null}),M=U(0);let V=null,$=null;const N=`timer_session_${k}_${u}`,b=U({userId:null,hours:null,description:""}),H=O(()=>b.value?!!(b.value.userId&&b.value.hours&&b.value.hours>0):!1),Q=O(()=>h.value.reduce((e,r)=>e+(r.duration||0),0)),G=O(()=>h.value.reduce((e,r)=>e+(r.duration||0)*(r.hourlyRate||0),0)),X=O(()=>k?E.hasActiveTimer(k):!1),W=O(()=>le(M.value)),P=async(e={})=>{if(!k||!u)throw new Error("User ID and Work Order ID are required to start timer");try{const r=new Date;w.value={startTime:r,userId:k,description:e.description||"",workOrderId:u,...e},_.value=!0,M.value=0,a(),d.useServerTimer&&await E.startTimer(k,u,e),p&&Z(),v&&x()}catch(r){throw _.value=!1,w.value={startTime:null,userId:null,description:"",workOrderId:null},r}},Y=async(e={})=>{if(!_.value)return null;try{const r=M.value,S=new Date,j=Math.max(3e-4,Math.round(r*1e4)/1e4),L={type:"timer",userId:w.value.userId,workOrderId:w.value.workOrderId,startTime:w.value.startTime,endTime:S,duration:j,description:e.description||w.value.description||"Timer session",date:new Date().toISOString().split("T")[0],hourlyRate:fe(w.value.userId),...e};o(),re();const de={id:Date.now()+Math.random(),...L,user:ie(w.value.userId),editing:!1};return h.value.unshift(de),d.useServerTimer&&k?await E.stopTimer(k,e):u&&await E.addTimeEntry(u,L),l(),p&&ee(),de}catch(r){throw console.error("Failed to stop timer:",r),r}},s=()=>{V&&(clearInterval(V),V=null),re()},i=()=>{_.value&&!V&&(a(),v&&x())},l=()=>{_.value=!1,M.value=0,w.value={startTime:null,userId:null,description:"",workOrderId:null}},c=async()=>{var e;if(!H.value||!u)return null;try{const r=m.find(L=>L.value===b.value.userId),S={type:"manual",userId:b.value.userId,workOrderId:u,duration:parseFloat(b.value.hours),description:b.value.description||"Manual entry",date:new Date().toISOString().split("T")[0],hourlyRate:((e=r==null?void 0:r.data)==null?void 0:e.hourlyRate)||0},j={id:Date.now()+Math.random(),...S,user:(r==null?void 0:r.data)||null,editing:!1};return h.value.unshift(j),await E.addTimeEntry(u,S),b.value={userId:null,hours:null,description:""},j}catch(r){throw console.error("Failed to add manual entry:",r),r}},D=e=>{h.value[e]&&(h.value[e].editing=!0)},C=async e=>{const r=h.value[e];if(!(!r||!u))try{r.editing=!1,await E.updateTimeEntry(u,r.id,r)}catch(S){throw console.error("Failed to save edited entry:",S),S}},q=e=>{h.value[e]&&(h.value[e].editing=!1)},g=async e=>{const r=h.value[e];if(!(!r||!u))try{h.value.splice(e,1),await E.removeTimeEntry(u,r.id)}catch(S){throw h.value.splice(e,0,r),S}},a=()=>{V||(V=setInterval(()=>{I()},1e3))},o=()=>{V&&(clearInterval(V),V=null)},I=()=>{if(w.value.startTime){const r=Date.now()-w.value.startTime.getTime();M.value=r/(1e3*60*60),k&&d.useServerTimer&&E.updateTimerElapsed(k,M.value)}},x=()=>{!v||$||($=setInterval(()=>{_.value&&p&&Z()},T))},re=()=>{$&&(clearInterval($),$=null)},Z=()=>{try{const e={isTracking:_.value,currentSession:w.value,currentElapsed:M.value,timestamp:Date.now()};localStorage.setItem(N,JSON.stringify(e))}catch(e){console.warn("Failed to save timer to localStorage:",e)}},ne=()=>{try{const e=localStorage.getItem(N);if(!e)return!1;const r=JSON.parse(e);return Date.now()-r.timestamp>36e5?(ee(),!1):r.isTracking?(w.value={...r.currentSession,startTime:new Date(r.currentSession.startTime)},M.value=r.currentElapsed,_.value=!0,a(),v&&x(),!0):!1}catch(e){return console.warn("Failed to load timer from localStorage:",e),ee(),!1}},ee=()=>{try{localStorage.removeItem(N)}catch(e){console.warn("Failed to clear timer from localStorage:",e)}},le=e=>{if(!e||e<0||!isFinite(e)||isNaN(e))return"0:00:00";const r=Math.floor(e*3600),S=Math.floor(r/3600),j=Math.floor(r%3600/60),L=r%60;return S===0?`${j.toString().padStart(2,"0")}:${L.toString().padStart(2,"0")}`:`${S}:${j.toString().padStart(2,"0")}:${L.toString().padStart(2,"0")}`},pe=e=>e?new Date(e).toLocaleTimeString("en-US",{hour12:!1,hour:"2-digit",minute:"2-digit"}):"",ge=e=>e?new Date(e).toLocaleDateString("en-US",{month:"short",day:"numeric",year:"numeric"}):"",ie=e=>{var r;return((r=m.find(S=>S.value===e))==null?void 0:r.data)||null},fe=e=>{var r;return((r=ie(e))==null?void 0:r.hourlyRate)||0},ae=async()=>{if(!u)return[];try{const e=await E.loadTimeEntries(u);return h.value=e.map(r=>({...r,editing:!1})),e}catch(e){throw console.error("Failed to load time entries:",e),e}},ye=()=>{if(u)return ae()};oe(()=>u,e=>{e&&ae()},{immediate:!0});const ue=()=>{o(),re(),p&&_.value&&Z()};return p&&k&&u&&ne(),we(ue),{timeEntries:h,isTracking:_,currentSession:w,currentElapsed:M,manualEntry:b,loading:K,error:z,canAddManualEntry:H,totalHours:Q,totalCost:G,hasActiveTimer:X,currentSessionDuration:W,startTimer:P,stopTimer:Y,pauseTimer:s,resumeTimer:i,resetTimer:l,addManualEntry:c,editEntry:D,saveEditedEntry:C,cancelEditEntry:q,removeEntry:g,loadTimeEntries:ae,refreshTimeEntries:ye,formatDuration:le,formatTime:pe,formatDate:ge,saveTimerToLocalStorage:Z,loadTimerFromLocalStorage:ne,clearTimerFromLocalStorage:ee,updateElapsedTime:I,cleanup:ue}}const Ie={class:"time-tracker"},Fe={class:"flex items-center justify-between mb-4"},Ve={class:"flex items-center space-x-2"},Me={key:0,class:"flex items-center text-sm text-green-600"},De={key:0,class:"w-4 h-4 mr-2",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},Ue={key:1,class:"w-4 h-4 mr-2",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},Ce={key:0,class:"mb-6 p-4 bg-green-50 border border-green-200 rounded-lg"},Oe={class:"flex items-center justify-between"},ze={class:"text-xs text-green-700"},Ae={class:"text-right"},Re={class:"text-2xl font-bold text-green-900","data-testid":"current-elapsed"},$e={class:"mb-6 p-4 bg-gray-50 rounded-lg"},Be={class:"grid grid-cols-1 md:grid-cols-4 gap-3"},je={key:1,class:"space-y-3"},Le={class:"flex items-center justify-between"},Ne={class:"flex-1"},He={class:"flex items-center space-x-3"},We={class:"flex-1"},Pe={key:0},qe={class:"font-medium text-gray-900"},Je={key:0,class:"text-sm text-gray-600"},Ke={class:"flex items-center space-x-4 text-xs text-gray-500 mt-1"},Qe={key:0},Ge={key:0},Xe={key:1},Ye={class:"inline-flex items-center px-2 py-1 rounded-full text-xs bg-blue-100 text-blue-800"},Ze={key:1,class:"space-y-2"},et={class:"grid grid-cols-2 gap-2"},tt={class:"flex items-center space-x-3"},rt={class:"text-right"},at={key:0},st={class:"text-lg font-semibold text-gray-900"},ot={class:"text-xs text-gray-500"},nt={key:1},lt={class:"flex items-center space-x-1"},it=["onClick"],ut=["onClick"],dt=["onClick"],ct=["onClick"],mt={key:2,class:"text-center py-8 text-gray-500"},vt={key:3,class:"mt-6 p-4 bg-gray-50 rounded-lg"},pt={class:"grid grid-cols-3 gap-4 text-center"},gt={class:"text-lg font-semibold text-gray-900"},ft={class:"text-lg font-semibold text-gray-900"},yt={class:"text-lg font-semibold text-gray-900"},ht={__name:"TimeTracker",props:{modelValue:{type:Array,default:()=>[]},workOrderId:{type:[String,Number],required:!0},disabled:{type:Boolean,default:!1},userOptions:{type:Array,default:()=>[]},currentUser:{type:Object,default:null},autoSave:{type:Boolean,default:!0},useServerTimer:{type:Boolean,default:!1}},emits:["update:modelValue","timer-started","timer-stopped","entry-added"],setup(d,{expose:u,emit:k}){var q;const m=d,v=k,{timeEntries:T,isTracking:p,currentSession:E,currentElapsed:K,manualEntry:z,loading:h,canAddManualEntry:_,totalHours:w,totalCost:M,startTimer:V,stopTimer:$,resetTimer:N,addManualEntry:b,editEntry:H,saveEditedEntry:Q,cancelEditEntry:G,removeEntry:X,formatDuration:W,formatTime:P,formatDate:Y,updateElapsedTime:s}=be({workOrderId:m.workOrderId,userId:(q=m.currentUser)==null?void 0:q.id,userOptions:m.userOptions,autoSave:m.autoSave,useServerTimer:m.useServerTimer,persistToLocalStorage:!0}),i=async()=>{if(!m.disabled)try{if(p.value){const g=await $();v("timer-stopped",g)}else await V({description:"Timer session"}),v("timer-started",E.value)}catch(g){console.error("Timer toggle failed:",g)}},l=async()=>{try{const g=await b();g&&(v("entry-added",g),C())}catch(g){console.error("Failed to add manual entry:",g)}},c=async g=>{try{await X(g),C()}catch(a){console.error("Failed to remove entry:",a)}},D=async g=>{try{await Q(g),C()}catch(a){console.error("Failed to save edited entry:",a)}},C=()=>{v("update:modelValue",T.value)};return oe(()=>m.modelValue,g=>{if(g&&g.length!==T.value.length){const a=new Set(T.value.map(I=>I.id)),o=new Set(g.map(I=>I.id));(a.size!==o.size||!Array.from(a).every(I=>o.has(I)))&&(T.value=[...g])}},{deep:!0}),oe(T,()=>{C()},{deep:!0}),O(()=>{var g;return((g=m.currentUser)==null?void 0:g.hourlyRate)||0}),u({updateElapsedTime:s,startTimer:V,stopTimer:$,addManualEntry:b,editEntry:H,saveEditedEntry:Q,cancelEditEntry:G,toggleTimer:i,resetTimer:N}),(g,a)=>(f(),y("div",Ie,[t("div",Fe,[a[6]||(a[6]=t("h3",{class:"text-lg font-medium text-gray-900"},"Labor Time Tracking",-1)),t("div",Ve,[n(p)?(f(),y("span",Me,a[3]||(a[3]=[t("div",{class:"w-2 h-2 bg-green-500 rounded-full mr-2 animate-pulse"},null,-1),te(" Recording time ",-1)]))):A("",!0),R(n(me),{variant:n(p)?"danger":"primary",size:"sm",onClick:i,disabled:d.disabled||n(h),"data-testid":n(p)?"stop-timer-btn":"start-timer-btn"},{default:ce(()=>[n(p)?(f(),y("svg",Ue,a[5]||(a[5]=[t("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M21 12a9 9 0 11-18 0 9 9 0 0118 0z"},null,-1),t("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M9 10a1 1 0 011-1h4a1 1 0 011 1v4a1 1 0 01-1 1h-4a1 1 0 01-1-1v-4z"},null,-1)]))):(f(),y("svg",De,a[4]||(a[4]=[t("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M14.828 14.828a4 4 0 01-5.656 0M9 10h1m4 0h1m-6 4h1m4 0h1m-6-8h1m4 0h1M8 21l4-7 4 7M3 4h18M4 4h16v12a1 1 0 01-1 1H5a1 1 0 01-1-1V4z"},null,-1)]))),te(" "+F(n(p)?"Stop Timer":"Start Timer"),1)]),_:1},8,["variant","disabled","data-testid"])])]),n(p)?(f(),y("div",Ce,[t("div",Oe,[t("div",null,[a[7]||(a[7]=t("h4",{class:"text-sm font-medium text-green-900"},"Current Session",-1)),t("p",ze," Started at "+F(n(P)(n(E).startTime)),1)]),t("div",Ae,[t("div",Re,F(n(W)(n(K))),1),a[8]||(a[8]=t("p",{class:"text-xs text-green-700"},"elapsed",-1))])])])):A("",!0),t("div",$e,[a[10]||(a[10]=t("h4",{class:"text-sm font-medium text-gray-900 mb-3"},"Add Manual Entry",-1)),t("div",Be,[R(n(ve),{modelValue:n(z).userId,"onUpdate:modelValue":a[0]||(a[0]=o=>n(z).userId=o),placeholder:"Select user",options:d.userOptions,size:"sm"},null,8,["modelValue","options"]),R(n(J),{modelValue:n(z).hours,"onUpdate:modelValue":a[1]||(a[1]=o=>n(z).hours=o),type:"number",step:"0.25",min:"0",max:"24",placeholder:"Hours",size:"sm"},null,8,["modelValue"]),R(n(J),{modelValue:n(z).description,"onUpdate:modelValue":a[2]||(a[2]=o=>n(z).description=o),placeholder:"Description",size:"sm"},null,8,["modelValue"]),R(n(me),{variant:"outline",size:"sm",onClick:l,disabled:!n(_)||n(h)},{default:ce(()=>a[9]||(a[9]=[te(" Add Entry ",-1)])),_:1,__:[9]},8,["disabled"])])]),n(T).length>0?(f(),y("div",je,[(f(!0),y(se,null,ke(n(T),(o,I)=>(f(),y("div",{key:o.id||I,class:"time-entry border border-gray-200 rounded-lg p-4 transition-all duration-200"},[t("div",Le,[t("div",Ne,[t("div",He,[o.user?(f(),Ee(n(Se),{key:0,user:o.user,size:"sm"},null,8,["user"])):A("",!0),t("div",We,[o.editing?(f(),y("div",Ze,[R(n(ve),{modelValue:o.userId,"onUpdate:modelValue":x=>o.userId=x,options:d.userOptions,placeholder:"Select user",size:"sm"},null,8,["modelValue","onUpdate:modelValue","options"]),R(n(J),{modelValue:o.description,"onUpdate:modelValue":x=>o.description=x,placeholder:"Description",size:"sm"},null,8,["modelValue","onUpdate:modelValue"]),t("div",et,[R(n(J),{modelValue:o.date,"onUpdate:modelValue":x=>o.date=x,type:"date",size:"sm"},null,8,["modelValue","onUpdate:modelValue"]),R(n(J),{modelValue:o.hourlyRate,"onUpdate:modelValue":x=>o.hourlyRate=x,modelModifiers:{number:!0},type:"number",step:"0.01",placeholder:"Hourly rate",size:"sm"},null,8,["modelValue","onUpdate:modelValue"])])])):(f(),y("div",Pe,[t("h4",qe,F(o.user?`${o.user.firstName} ${o.user.lastName}`:"Unknown User"),1),o.description?(f(),y("p",Je,F(o.description),1)):A("",!0),t("div",Ke,[o.startTime?(f(),y("span",Qe,[te(F(n(P)(o.startTime))+" ",1),o.endTime?(f(),y("span",Ge," - "+F(n(P)(o.endTime)),1)):A("",!0)])):A("",!0),o.date?(f(),y("span",Xe,F(n(Y)(o.date)),1)):A("",!0),t("span",Ye,F(o.type==="timer"?"Timer":"Manual"),1)])]))])])]),t("div",tt,[t("div",rt,[o.editing?(f(),y("div",nt,[R(n(J),{modelValue:o.duration,"onUpdate:modelValue":x=>o.duration=x,modelModifiers:{number:!0},type:"number",step:"0.01",min:"0",placeholder:"Hours",size:"sm",class:"w-20"},null,8,["modelValue","onUpdate:modelValue"]),a[11]||(a[11]=t("div",{class:"text-xs text-gray-500 mt-1"}," hours ",-1))])):(f(),y("div",at,[t("div",st,F(n(W)(o.duration)),1),t("div",ot," $"+F((o.duration*(o.hourlyRate||0)).toFixed(2)),1)]))]),t("div",lt,[o.editing?(f(),y(se,{key:1},[t("button",{onClick:x=>D(I),class:"p-1 text-green-500 hover:text-green-600 rounded",title:"Save changes"},a[14]||(a[14]=[t("svg",{class:"w-4 h-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[t("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M5 13l4 4L19 7"})],-1)]),8,dt),t("button",{onClick:x=>n(G)(I),class:"p-1 text-gray-400 hover:text-gray-600 rounded",title:"Cancel editing"},a[15]||(a[15]=[t("svg",{class:"w-4 h-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[t("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M6 18L18 6M6 6l12 12"})],-1)]),8,ct)],64)):(f(),y(se,{key:0},[d.disabled?A("",!0):(f(),y("button",{key:0,onClick:x=>n(H)(I),class:"p-1 text-gray-400 hover:text-gray-600 rounded",title:"Edit entry"},a[12]||(a[12]=[t("svg",{class:"w-4 h-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[t("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M11 5H6a2 2 0 00-2 2v11a2 2 0 002 2h11a2 2 0 002-2v-5m-1.414-9.414a2 2 0 112.828 2.828L11.828 15H9v-2.828l8.586-8.586z"})],-1)]),8,it)),d.disabled?A("",!0):(f(),y("button",{key:1,onClick:x=>c(I),class:"p-1 text-red-400 hover:text-red-600 rounded",title:"Remove entry"},a[13]||(a[13]=[t("svg",{class:"w-4 h-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[t("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M19 7l-.867 12.142A2 2 0 0116.138 21H7.862a2 2 0 01-1.995-1.858L5 7m5 4v6m4-6v6m1-10V4a1 1 0 00-1-1h-4a1 1 0 00-1 1v3M4 7h16"})],-1)]),8,ut))],64))])])])]))),128))])):(f(),y("div",mt,a[16]||(a[16]=[t("svg",{class:"w-12 h-12 mx-auto mb-4 text-gray-300",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[t("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M12 8v4l3 3m6-3a9 9 0 11-18 0 9 9 0 0118 0z"})],-1),t("p",{class:"text-sm"},"No time entries recorded",-1),t("p",{class:"text-xs text-gray-400 mt-1"},'Click "Start Timer" to begin tracking time',-1)]))),n(T).length>0?(f(),y("div",vt,[t("div",pt,[t("div",null,[t("div",gt,F(n(W)(n(w))),1),a[17]||(a[17]=t("div",{class:"text-xs text-gray-500"},"Total Hours",-1))]),t("div",null,[t("div",ft,"$"+F(n(M).toFixed(2)),1),a[18]||(a[18]=t("div",{class:"text-xs text-gray-500"},"Total Cost",-1))]),t("div",null,[t("div",yt,F(n(T).length),1),a[19]||(a[19]=t("div",{class:"text-xs text-gray-500"},"Entries",-1))])])])):A("",!0)]))}},Et=xe(ht,[["__scopeId","data-v-94245190"]]);export{Et as T};