File manager - Edit - /home/autoph/public_html/projects/ahg-hr/assets/index.9932af2b.js
Back
import{w as T,L as k,N as O}from"./index.0fd81098.js";import{B as I}from"./index.43ed8c16.js";import{s as v,b as f,a as x}from"./data.a5ee1e0a.js";import{C as E}from"./index.d162669d.js";import{B as A}from"./index.833a76e1.js";import{F as M,i as S,a as D,b as N,c as B}from"./index.esm.84bdb605.js";import{O as F}from"./index.9186ce30.js";import{I as P}from"./index.31d8f3a7.js";import{_ as V,A as W,c as u,w as G,r as m,o as l,d as e,b as c,e as d,j as R,F as w,m as _,t as g}from"./index.836ff972.js";import{A as j}from"./AnnouncementService.e96ce466.js";import"./logo-black.7c15feb3.js";import"./logo-white.b04c5a89.js";import"./transition.624fb26d.js";/* empty css */import"./vue-cleave.min.6d14d8ca.js";import"./es.string.replace.f497f8c7.js";import"./Loading.8843dce9.js";const H={mixins:[T],components:{Layout:k,Card:E,Button:I,Badge:A,FullCalendar:M,OnlineTITO:F,Icon:P},data(){return{announcement:"",index:null,activeStatus:null,notifications:[],employees:[],scheduleList:[],holidayList:[],leaveList:[],timelogList:[],tardinessList:[],overtimeList:[],absentList:[],state:{chartType1:"bar",showTable1:!1,chartType2:"bar",showTable2:!1,showTimeIn:!1},statistics:[{name:v,title:"Leave",count:"25",bg:"bg-rose-400 dark:bg-slate-900 ",chart:!0},{name:f,title:"Overtime",count:"28",bg:"bg-pink-400 dark:bg-slate-900 ",chart:!0},{name:x,title:"Undertime",count:"18",bg:"bg-fuchsia-300 dark:bg-slate-900 ",chart:!0},{name:v,title:"OB",count:"18",bg:"bg-purple-300 dark:bg-slate-900 ",chart:!0},{name:x,title:"MRF",count:"28",bg:"bg-violet-400 dark:bg-slate-900",chart:!0},{name:v,title:"PAF",count:"28",bg:"bg-indigo-400 dark:bg-slate-900",chart:!0},{name:f,title:"New Clearance",count:"28",bg:"bg-blue-400 dark:bg-slate-900",chart:!0}],calendarEvents:[],calendarOptions:{headerToolbar:{left:"prev,next today",center:"title",right:"dayGridMonth,timeGridWeek,timeGridDay,listWeek"},plugins:[S,D,N,B],initialView:"dayGridMonth",themeSystem:"bootstrap",initialEvents:[],events:this.calendarEvents,editable:!1,droppable:!1,eventResizableFromStart:!0,dateClick:this.dateClicked,eventClick:this.editEvent,eventsSet:this.handleEvents,weekends:!0,selectable:!1,selectMirror:!0,dayMaxEvents:!0,datesSet:this.getCalendarViewDates},currentEvents:[],showModal:!1,eventModal:!1,submitted:!1,submit:!1,newEventData:{},edit:{},deleteId:{},event:{title:"",category:""},editevent:{editTitle:"",editcategory:""},state:{showCalendar:!1,isWfh:!1},attendance:[{date:"May 10, 2024",in:"7:48 am",out:"5:02 pm",status:"Present"},{date:"May 9, 2024",in:"7:55 am",out:"5:12 pm",status:"Present"},{date:"May 8, 2024",in:"7:50 am",out:"5:05 pm",status:"Present"},{date:"May 7, 2024",in:"7:52 am",out:"5:19 pm",status:"Present"},{date:"May 6, 2024",in:"",out:"",status:"Absent"},{date:"May 4, 2024",in:"8:02 am",out:"5:04 pm",status:"Present"},{date:"May 3, 2024",in:"7:30 am",out:"5:01 pm",status:"Present"},{date:"May 2, 2024",in:"8:18 am",out:"5:02 pm",status:"Late"}]}},computed:{},created(){},methods:{async fetchAnnouncement(){await j.fetchRecord().then(i=>{this.announcement=i.data.description}).catch(i=>{console.log(i)})},async getNotifications(){try{const i=await O.fetchRecord(this.$store.userSettings.getActiveUser.employees?this.$store.userSettings.getActiveUser.employees.employee_id:"");this.notifications=i.data.map(t=>{let h=JSON.parse(t.data);return{id:t.id,message:h.message}})}catch(i){console.log(i)}},async getCalendarViewDates(){const i=this.$refs.fullCalendar.getApi(),t=i.view,h=t.activeStart,y=t.activeEnd;let o={start_date:h,end_date:y};try{const s=await W.fetchRecords(o);console.log(s),this.scheduleList=s.data.schedule?s.data.schedule:[],this.holidayList=s.data.holiday?s.data.holiday:[],this.leaveList=s.data.leave?s.data.leave:[],this.timelogList=s.data.timelog?s.data.timelog:[],this.tardinessList=s.data.tardiness?s.data.tardiness:[],this.overtimeList=s.data.overtime?s.data.overtime:[],this.absentList=s.data.absent?s.data.absent:[];const p=new Date().toISOString().split("T")[0];if(this.scheduleList.filter(r=>r.date===p).map(r=>{r.title.includes("WFH")&&(this.isWfh=!0)}),this.scheduleList||this.holidayList||this.leaveList||this.timelogList||this.tardinessList||this.overtimeList||this.absentList){const r=[...this.scheduleList||[],...this.holidayList||[],...this.leaveList||[],...this.timelogList||[],...this.tardinessList||[],...this.overtimeList||[],...this.absentList||[]];this.calendarEvents=[],this.calendarEvents=r.map((a,b)=>({id:b,title:a.title,start:a.date,className:a.className||"bg-danger-500"})),i.removeAllEvents(),i.addEventSource(this.calendarEvents)}this.state.showCalendar=!0}catch(s){console.log(s)}},showOnlineTITO(){this.state.showTimeIn=!0},closeOnlineTITO(){this.state.showTimeIn=!1}},mounted(){this.getCalendarViewDates(),this.getNotifications(),this.fetchAnnouncement()}},U={key:0,class:"w-full"},z={class:""},J={key:1,class:"2xl:col-span-9 lg:col-span-8 col-span-12"},q={class:"mb-4 bg-sky-700 text-sky-700 bg-opacity-[0.12] rounded-md p-4"},K={class:"grid grid-cols-3"},Q={key:0,class:"flex justify-end"},X={class:"flex flex-col justify-center text-white"},Y={class:"text-slate-700"},Z=["innerHTML"],$={class:"grid grid-cols-3 gap-5"},ee={class:"bg-white rounded border border-slate-300"},te={class:"space-y-8 p-4"},se={class:"w-full"},ae={class:"col-span-2"},ie={class:"shadow-md rounded-md bg-white border border-slate-300"},ne={class:"flex items-center justify-start p-2"},le={class:"badge-group space-x-2"},oe={class:"dashcode-calendar"};function de(i,t,h,y,o,s){const p=m("OnlineTITO"),r=m("Icon"),a=m("Badge"),b=m("FullCalendar"),L=m("Layout");return l(),u(L,null,{default:G(()=>[e("div",null,[o.state.showTimeIn?(l(),c("div",U,[e("div",z,[d(p,{ref:"timeIn",onClose:s.closeOnlineTITO},null,8,["onClose"])])])):(l(),c("div",J,[e("div",q,[e("div",K,[t[2]||(t[2]=e("div",null,null,-1)),t[3]||(t[3]=e("div",{class:"text-lg text-center font-serif"}," Updates and Notifications ",-1)),i.isWfh?(l(),c("div",Q,[e("button",{class:"btn py-2 px-4 bg-primary-800 text-center",onClick:t[0]||(t[0]=(...n)=>s.showOnlineTITO&&s.showOnlineTITO(...n))},[e("div",X,[d(r,{icon:"ic:twotone-access-time",class:"text-3xl text-white text-center mx-auto"}),t[1]||(t[1]=e("div",{class:"w-full text-center"},"Time In",-1))])])])):R("",!0)]),e("div",Y,[e("ul",null,[(l(!0),c(w,null,_(o.notifications,n=>(l(),c("li",{key:n.id},g(n.message),1))),128))]),t[4]||(t[4]=e("div",{class:"font-semibold py-4 pb-2"},"Announcement:",-1)),e("div",{innerHTML:o.announcement,class:"exclusiveForAnnouncement"},null,8,Z)])]),e("div",$,[e("div",ee,[t[6]||(t[6]=e("div",{class:"bg-primary-700 text-primary-700 bg-opacity-[0.2] rounded-t-md p-4"},[e("div",{class:"text-xl"},"Daily Attendance")],-1)),e("div",te,[e("div",null,[e("table",se,[t[5]||(t[5]=e("thead",null,[e("tr",null,[e("th",null,"Date"),e("th",null,"In"),e("th",null,"Out"),e("th",null,"Status")])],-1)),e("tbody",null,[(l(!0),c(w,null,_(o.attendance,(n,C)=>(l(),c("tr",{key:C},[e("td",null,g(n.date),1),e("td",null,g(n.in),1),e("td",null,g(n.out),1),e("td",null,[n.status=="Absent"?(l(),u(a,{key:0,badgeClass:"bg-danger-700 text-danger-700 bg-opacity-[0.12] ",label:n.status},null,8,["label"])):n.status=="Late"?(l(),u(a,{key:1,badgeClass:"bg-amber-700 text-amber-700 bg-opacity-[0.12] ",label:n.status},null,8,["label"])):(l(),u(a,{key:2,badgeClass:"bg-primary-700 text-primary-700 bg-opacity-[0.12] ",label:n.status},null,8,["label"]))])]))),128))])])])])]),e("div",ae,[e("div",ie,[t[8]||(t[8]=e("div",{class:"bg-emerald-700 text-emerald-700 bg-opacity-[0.2] rounded-t-md p-4"},[e("div",{class:"text-xl"},"My Calendar")],-1)),e("div",ne,[t[7]||(t[7]=e("div",{class:"font-bold text-sm p-2"}," LEGEND: ",-1)),e("div",le,[d(a,{label:"Schedule",badgeClass:"bg-blue-500 text-white"}),d(a,{label:"Absent",badgeClass:"bg-red-600 text-white"}),d(a,{label:"Day Off",badgeClass:"bg-orange-500 text-white"}),d(a,{label:"Holiday",badgeClass:"bg-yellow-500 text-white"}),d(a,{label:"Leave",badgeClass:"bg-green-500 text-white"}),d(a,{label:"Overtime",badgeClass:"bg-purple-500 text-white"}),d(a,{label:"Tardiness",badgeClass:"bg-pink-500 text-white"}),d(a,{label:"Time-In",badgeClass:"bg-teal-500 text-white"}),d(a,{label:"Time-Out",badgeClass:"bg-gray-500 text-white"})])]),e("div",oe,[o.state.showCalendar?(l(),u(b,{key:0,ref:"fullCalendar",options:o.calendarOptions,events:o.calendarEvents},null,8,["options","events"])):(l(),u(b,{key:1,ref:"fullCalendar",options:o.calendarOptions,events:o.calendarEvents},null,8,["options","events"]))])])])])]))])]),_:1})}const ke=V(H,[["render",de]]);export{ke as default};
| ver. 1.4 |
.
| PHP 8.1.32 | Generation time: 0 |
proxy
|
phpinfo
|
Settings