"use strict";const e=require("../../../common/vendor.js");require("../../../common/libraries/request.js"),require("../../../common/store/useWatermarkStore.js");const o=require("../../../common/store/useWeAppAuthStore.js");require("../../../common/store/useWorkStore.js");const t=require("../../../common/libraries/apiLoading.js"),l=require("../../../gen/Apis.js"),n=require("./model.js");o.useWeAppAuthStore();const i=()=>{t.getApiLoading(l.Apis.Attendance.AttendanceSchedules.GetAttendanceSchedules,{}).then(e=>{n.useModel.showData.value=(null==e?void 0:e.data)||void 0})},d={getList:i,loadMore(e){n.useModel.formData.value.page=null==e?void 0:e.page,i()},async uploadMedia(e){let o=await l.Apis.Customer.CustomerMoments.UploadMedia(e);return null==o?void 0:o.data},calculationCurrent(e){var o,t,l,n,i,d;return(null==(t=null==(o=null==e?void 0:e.checkin_status)?void 0:o.start)?void 0:t.checked)&&(null==(n=null==(l=null==e?void 0:e.checkin_status)?void 0:l.end)?void 0:n.checked)?3:(null==(d=null==(i=null==e?void 0:e.checkin_status)?void 0:i.start)?void 0:d.checked)?1:null},toDetaile(o){var t,l,i,d,u,s;e.index.navigateTo({url:`/ME/attendance/sign_clock_in/index?attendance_schedules_id=${null==(i=null==(l=null==(t=n.useModel)?void 0:t.showData)?void 0:l.value)?void 0:i.schedule_id}&attendance_shift_periods_id=${null==o?void 0:o.id}&checkin_type=${null==o?void 0:o.type}&date=${null==(s=null==(u=null==(d=n.useModel)?void 0:d.showData)?void 0:u.value)?void 0:s.schedule_date}`})}};exports.method=d;
