You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
1 lines
4.3 KiB
1 lines
4.3 KiB
var w=Object.defineProperty;var S=(t,e,s)=>e in t?w(t,e,{enumerable:!0,configurable:!0,writable:!0,value:s}):t[e]=s;var p=(t,e,s)=>S(t,typeof e!="symbol"?e+"":e,s);import{V as k,f as T,a as y,C as $,_ as C,g as v,h as m,i as g,j as r,m as h,o as x,s as V,k as _,F as D,x as f}from"./index-BLqts8WY.js";import{D as M}from"./datetime-BDQ5ptpc.js";import{Q as O}from"./QuickNav-DgCyvgDx.js";import{T as B}from"./TopMessage-BE0GBIgW.js";import{av as A,ar as E,aQ as P,u as Q,aR as N}from"./index-MyY_xqVN.js";import"./index-CsfPLOYu.js";var j=Object.defineProperty,U=Object.getOwnPropertyDescriptor,Y=(t,e,s,n)=>{for(var a=n>1?void 0:n?U(e,s):e,d=t.length-1,l;d>=0;d--)(l=t[d])&&(a=(n?l(e,s,a):l(a))||a);return n&&a&&j(e,s,a),a};let b=class extends k{constructor(){super(...arguments);p(this,"$notify");p(this,"attended",!0);p(this,"gaveTime",!0);p(this,"hoursStr","1");p(this,"todayOrPreviousStartDate","")}async mounted(){let s=M.now().setZone("America/Denver");s.weekday<6&&(s=s.minus({week:1}));const n=s.set({weekday:6}).set({hour:9}).startOf("hour");this.todayOrPreviousStartDate=n.toISO({suppressMilliseconds:!0})||""}async record(){var d,l;const s=await T(),n=s.activeDid||"",a=s.apiServer||"";try{const u=A(this.hoursStr);this.$notify({group:"alert",type:"toast",title:"Sent..."},1e3);let c=!1;if(this.gaveTime&&u>0){const o=await E(y,a,n,n,void 0,void 0,u,"HUR",P);o.type==="success"?c=!0:(console.error("Error sending time:",o),this.$notify({group:"alert",type:"danger",title:"Error",text:((d=o==null?void 0:o.error)==null?void 0:d.userMessage)||"There was an error sending the time."},5e3))}let i=!1;if(this.attended){const o=await Q(N(n,this.todayOrPreviousStartDate),n,a,y);o.type==="success"?i=!0:(console.error("Error sending attendance:",o),this.$notify({group:"alert",type:"danger",title:"Error",text:((l=o==null?void 0:o.error)==null?void 0:l.userMessage)||"There was an error sending the attendance."},5e3))}if(c||i){const o=c&&i?"Your attendance and time have been recorded.":c?"Your time has been recorded.":"Your attendance has been recorded.";this.$notify({group:"alert",type:"success",title:"Success",text:o},3e3),this.$router.push({path:"/quick-action-bvc"})}}catch(u){console.error("Error sending claims.",u),this.$notify({group:"alert",type:"danger",title:"Error",text:u.userMessage||"There was an error sending the claims."},5e3)}}};b=Y([$({components:{QuickNav:O,TopMessage:B}})],b);const H={id:"Content",class:"p-6 pb-24 max-w-3xl mx-auto"},F={class:"text-lg text-center font-light relative px-7"},I={class:"m-2 flex"},J={class:"m-2 flex"},Z={key:0},q={key:1,class:"h-6"},z={key:0,class:"flex justify-center mt-4"},G={key:1,class:"flex justify-center mt-4"};function L(t,e,s,n,a,d){const l=v("QuickNav"),u=v("TopMessage"),c=v("fa");return f(),m(D,null,[g(l),g(u),r("section",H,[r("div",F,[r("h1",{class:"text-lg text-center px-2 py-1 absolute -left-2 -top-1",onClick:e[0]||(e[0]=i=>t.$router.back())},[g(c,{icon:"chevron-left",class:"fa-fw"})])]),e[10]||(e[10]=r("h1",{id:"ViewHeading",class:"text-4xl text-center font-light px-4 mb-4"}," Beginning of BVC Saturday Meeting ",-1)),r("div",null,[e[8]||(e[8]=r("h2",{class:"text-2xl m-2"},"You're Here",-1)),r("div",I,[h(r("input",{type:"checkbox","onUpdate:modelValue":e[1]||(e[1]=i=>t.attended=i),class:"h-6 w-6"},null,512),[[x,t.attended]]),e[5]||(e[5]=r("span",{class:"pb-2 pl-2 pr-2"},"Attended",-1))]),r("div",J,[h(r("input",{type:"checkbox","onUpdate:modelValue":e[2]||(e[2]=i=>t.gaveTime=i),class:"h-6 w-6"},null,512),[[x,t.gaveTime]]),e[7]||(e[7]=r("span",{class:"pb-2 pl-2 pr-2"},"Spent Time",-1)),t.gaveTime?(f(),m("span",Z,[h(r("input",{type:"text",placeholder:"How much time","onUpdate:modelValue":e[3]||(e[3]=i=>t.hoursStr=i),size:"1",class:"border border-slate-400 h-6 px-2"},null,512),[[V,t.hoursStr]]),e[6]||(e[6]=_(" hour(s) "))])):(f(),m("span",q))])]),t.attended||t.gaveTime&&t.hoursStr&&t.hoursStr!="0"?(f(),m("div",z,[r("button",{onClick:e[4]||(e[4]=i=>t.record()),class:"block text-center text-md font-bold bg-gradient-to-b from-blue-400 to-blue-700 shadow-[inset_0_-1px_0_0_rgba(0,0,0,0.5)] text-white px-2 py-3 rounded-md w-56"}," Sign & Send ")])):(f(),m("div",G,e[9]||(e[9]=[r("button",{class:"block text-center text-md font-bold bg-gradient-to-b from-slate-400 to-slate-700 shadow-[inset_0_-1px_0_0_rgba(0,0,0,0.5)] text-white px-2 py-3 rounded-md w-56"}," Select Your Actions ",-1)])))])],64)}const oe=C(b,[["render",L]]);export{oe as default};
|
|
|