@studio-west/employees 0.2.2 → 0.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- "use strict";const e=require("vue"),w=require("./index-CHGzf-XH.cjs"),G=require("vue-i18n"),r=require("element-plus"),z=require("@imengyu/vue3-context-menu"),O=(D,E)=>{const u=D.__vccOpts||D;for(const[k,v]of E)u[k]=v;return u},R={class:"wrapper"},P={class:"month_year"},A={class:"text"},J={class:"week"},W={class:"month"},X=["onClick"],H={key:0},K={class:"month_year"},Z={class:"text"},Q={class:"week"},ee={class:"month"},te=["onClick"],ae={__name:"DataPicker",props:{data:Object,range:{type:String,default:()=>"solid"}},emits:["init"],setup(D,{emit:E}){var L,I,U,q;const u=e.ref(new Date),k=e.ref(new Date),v=D,F=E,y=e.ref(new Date().getFullYear()),b=e.ref(new Date().getMonth()),_=e.ref(new Date().getFullYear()),f=e.ref(new Date().getMonth()),d=e.ref([]),B=e.ref(0),$=e.ref(0),g=e.ref(-1),x=e.ref(-1),{locale:Y}=G.useI18n(),T=/en|zh|ja|he/.test(Y.value)?0:1,j=s=>{const o=s.split(s.match(/\D.*?\D?/));return o[0].length>2?o.join("-")+"T00:00:01":o.reverse().join("-")+"T00:00:01"};typeof((L=v.data)==null?void 0:L.startDate)<"u"&&(u.value=new Date(j(v.data.startDate)),y.value=u.value.getFullYear(),f.value=u.value.getMonth()),typeof((I=v.data)==null?void 0:I.endDate)<"u"&&(k.value=new Date(j(v.data.endDate)),_.value=k.value.getFullYear(),b.value=k.value.getMonth());const S=()=>{let s=new Date(y.value,f.value,0);for(let n=s.getDate()-s.getDay()+T;n<=s.getDate()&&s.getDay()!==6+T;n++)B.value++,d.value.push({day:n,month:s.getMonth(),year:s.getFullYear(),class:[]});for(let n=1;n<=new Date(y.value,f.value+1,0).getDate();n++)B.value++,d.value.push({day:n,month:f.value,year:y.value,class:[]});if(v.range==="range"){$.value=new Date(y.value,f.value+2,0);for(let n=1;n<=$.value.getDate();n++)d.value.push({day:n,month:$.value.getMonth(),year:$.value.getFullYear(),class:[]})}let o=v.range==="range"?2:1,i=new Date(y.value,f.value+o,1);for(let n=1;n<=(7-i.getDay()+T)%7&&i.getDay()!==T;n++)d.value.push({day:n,month:i.getMonth(),year:i.getFullYear(),class:[]});v.data.holiday.length!==0&&(v.data.holiday.preholidays.forEach(n=>{let m=n.split("-");const C=d.value.findIndex(V=>V.year==m[0]&&V.month+1==m[1]&&V.day==m[2]);C!==-1&&(d.value[C].class[0]="preholiday")}),v.data.holiday.holidays.forEach(n=>{let m=n.split("-");const C=d.value.findIndex(V=>V.year==m[0]&&V.month+1==m[1]&&V.day==m[2]);C!==-1&&(d.value[C].class[0]="weekend")}),v.data.holiday.holiday.forEach(n=>{let m=n.split("-");const C=d.value.findIndex(V=>V.year==m[0]&&V.month+1==m[1]&&V.day==m[2]);C!==-1&&(d.value[C].class[0]="holiday")}),v.data.holiday.nowork.forEach(n=>{let m=n.split("-");const C=d.value.findIndex(V=>V.year==m[0]&&V.month+1==m[1]&&V.day==m[2]);C!==-1&&(d.value[C].class[0]="nowork")}))},M=(s,o)=>{let i=s-o+1;for(let n=0;n<=s-o;n++)d.value[n+o].class[0]==="holiday"&&i--;return i},c=(s,o)=>{const i=w.parseTime(new Date(s.year,s.month,s.day),"{dd}.{m}.{Y}");if(v.range==="range")if(console.log(g.value),x.value!==-1){if(x.value<=g.value)for(let n=x.value;n<=g.value;n++)d.value[n].class[1]="";else for(let n=g.value;n<=x.value;n++)d.value[n].class[1]="";g.value=o,x.value=-1,d.value[o].class[1]="active"}else if(g.value!==-1){if(x.value=o,x.value>=g.value)for(let m=g.value+1;m<o;m++)d.value[m].class[1]="select";else for(let m=o+1;m<g.value;m++)d.value[m].class[1]="select";d.value[o].class[1]="active";let n=w.parseTime(new Date(d.value[g.value].year,d.value[g.value].month,d.value[g.value].day),"{dd}.{m}.{Y}");g.value>o?F("input",{dateStart:i,dateEnd:n,count:M(g.value,o)}):F("input",{dateStart:n,dateEnd:i,count:M(o,g.value)})}else g.value=o,d.value[o].class[1]="active";else d.value[g.value].class[1]="",g.value=o,d.value[o].class[1]="active",F("input",{dateStart:i,count:1})};if(S(),typeof((U=v.data)==null?void 0:U.startDate)<"u"&&(g.value=d.value.findIndex(s=>s.day===u.value.getDate()&&s.month===f.value&&s.year===y.value),d.value[g.value].class[1]="active"),typeof((q=v.data)==null?void 0:q.endDate)<"u"&&v.range==="range"){x.value=d.value.findIndex(s=>s.day===k.value.getDate()&&s.month===b.value&&s.year===_.value),d.value[x.value].class[1]="active";for(let s=g.value+1;s<x.value;s++)d.value[s].class[1]="select"}const h=(s,o)=>{d.value=[],B.value=0,u.value=new Date(s,o,1),y.value=u.value.getFullYear(),f.value=u.value.getMonth(),S()};return(s,o)=>(e.openBlock(),e.createElementBlock("div",R,[e.createElementVNode("div",null,[e.createElementVNode("p",P,[e.createElementVNode("span",null,[e.createElementVNode("button",{onClick:o[0]||(o[0]=i=>h(y.value-1,f.value))},"«"),e.createElementVNode("button",{onClick:o[1]||(o[1]=i=>h(y.value,f.value-1))},"‹")]),e.createElementVNode("span",A,[e.createElementVNode("button",null,e.toDisplayString(y.value),1),e.createElementVNode("button",null,e.toDisplayString(e.unref(w.parseTime)(u.value,"{F}")),1)]),e.createElementVNode("span",null,[e.createElementVNode("button",{onClick:o[2]||(o[2]=i=>h(y.value,f.value+1))},"›"),e.createElementVNode("button",{onClick:o[3]||(o[3]=i=>h(y.value+1,f.value))},"»")])]),e.createElementVNode("div",J,[(e.openBlock(),e.createElementBlock(e.Fragment,null,e.renderList(7,(i,n)=>e.createElementVNode("button",{key:n,class:"disabled"},e.toDisplayString(e.unref(w.parseTime)(new Date(1970,1,i+e.unref(T)),"{D}")),1)),64))]),e.createElementVNode("div",W,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value,(i,n)=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:n},[n<B.value+(7-new Date(y.value,f.value+1,1).getDay()+e.unref(T))%7?(e.openBlock(),e.createElementBlock("button",{key:0,class:e.normalizeClass(i.month===f.value?i.class:"disabled"),onClick:()=>{i.month===f.value&&c(i,n)}},e.toDisplayString(i.day),11,X)):e.createCommentVNode("",!0)],64))),128))])]),v.range==="range"?(e.openBlock(),e.createElementBlock("div",H,[e.createElementVNode("p",K,[e.createElementVNode("span",null,[e.createElementVNode("button",{onClick:o[4]||(o[4]=i=>h(y.value-1,f.value))},"«"),e.createElementVNode("button",{onClick:o[5]||(o[5]=i=>h(y.value,f.value-1))},"‹")]),e.createElementVNode("span",Z,[e.createElementVNode("button",null,e.toDisplayString(new Date(y.value,f.value+1).getFullYear()),1),e.createElementVNode("button",null,e.toDisplayString(e.unref(w.parseTime)(u.value.setMonth(f.value+1),"{F}")),1)]),e.createElementVNode("span",null,[e.createElementVNode("button",{onClick:o[6]||(o[6]=i=>h(y.value,f.value+1))},"›"),e.createElementVNode("button",{onClick:o[7]||(o[7]=i=>h(y.value+1,f.value))},"»")])]),e.createElementVNode("div",Q,[(e.openBlock(),e.createElementBlock(e.Fragment,null,e.renderList(7,(i,n)=>e.createElementVNode("button",{key:n,class:"disabled"},e.toDisplayString(e.unref(w.parseTime)(new Date(1970,1,i+e.unref(T)),"{D}")),1)),64))]),e.createElementVNode("div",ee,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value,(i,n)=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:n},[n>=B.value-new Date(y.value,f.value+1,1).getDay()+e.unref(T)?(e.openBlock(),e.createElementBlock("button",{key:0,class:e.normalizeClass(i.month===$.value.getMonth()?i.class:"disabled"),onClick:()=>{i.month===$.value.getMonth()&&c(i,n)}},e.toDisplayString(i.day),11,te)):e.createCommentVNode("",!0)],64))),128))])])):e.createCommentVNode("",!0)]))}},le=O(ae,[["__scopeId","data-v-fef4c07c"]]),ne={key:1,class:"controls-container",style:{"margin-top":".5rem"}},oe={key:0},ue={key:1,style:{padding:"0 1rem .5rem"}},re={__name:"VacationTable",props:{checkEdit:{type:Boolean,default:()=>!0},odata:Object,workSchedule:Object,query:String,fullName:{type:String,default:"Вы"}},setup(D){const E=D,{t:u}=G.useI18n(),k=e.ref([]);e.ref([]);const v=e.ref(new Date().getFullYear()),F=e.ref(!1),y=e.ref(!1),b=e.ref(!1),_=e.ref({zIndex:3,minWidth:230,x:500,y:200}),f=e.ref(!1),d=e.ref(!1),B=e.ref({participants:[]}),$=e.ref([]),g=e.ref([]),x=e.ref("Сектор разработок и эксплуатации сети"),Y=e.ref([{value:"all",label:u("vacationSchedule.all"),key:"all"}]),T=e.ref([{value:v.value,label:v.value},{value:v.value+1,label:v.value+1}]),j=e.ref(!1),S=e.ref([]),M=e.ref(!1),c=e.ref({name:"Имя",length:0,code:""});e.watch(x,async(l,a)=>{l!==a&&(S.value=[],F.value=!1,E.odata.personalManagerData.forEach(p=>{(p.Status!=="Увольнение"&&p.Group===l||l==="all")&&(S.value.some(t=>(t==null?void 0:t.activeText)===p.Role)||S.value.push({val:!0,activeText:p.Role}))}),I())});const h=e.computed(()=>k.value.flatMap((l,a)=>!l.days||l.days.length===0?[{...l,key:0,ids:a}]:l.days.map((p,t)=>({ids:a,key:t,...l,...p})))),L=async()=>{E.odata.getPersonalManagerData({}).then(l=>{var a;x.value=(a=l.find(p=>p.Status!=="Увольнение"&&p.Description===E.fullName))==null?void 0:a.Group,l.forEach(p=>{p.Status!=="Увольнение"&&(Y.value.some(t=>(t==null?void 0:t.value)===p.Group)||Y.value.push({value:p.Group,label:p.Group,key:p.Group}),p.Group===x.value&&!S.value.some(t=>(t==null?void 0:t.activeText)===p.Role)&&S.value.push({val:!0,activeText:p.Role}))}),I(),y.value=!1})},I=()=>{k.value=[];let l=[];E.odata.personalManagerData.forEach(a=>{a.Status!=="Увольнение"&&(a.Group===x.value||x.value==="all")&&S.value.some(p=>p.val&&p.activeText===a.Role)&&(l.push(a.Code),k.value.push({name:a.Description,days:[{note:""}],jobTitle:a.Role,code:a.Code}))}),U(l),f.value=!1},U=l=>{E.workSchedule.getAllVacations({year:v.value}).then(a=>{console.log(l),l.forEach((p,t)=>{k.value[t].days=[{note:""}],a.forEach(N=>{p===N.code&&(typeof k.value[t].days[0].dateStart>"u"?k.value[t].days[0]={dateStart:w.parseTime(N.dateStart,"{dd}.{m}.{Y}"),dateEnd:w.parseTime(N.dateEnd,"{dd}.{m}.{Y}"),note:N.note,count:N.count}:k.value[t].days.push({dateStart:w.parseTime(N.dateStart,"{dd}.{m}.{Y}"),dateEnd:w.parseTime(N.dateEnd,"{dd}.{m}.{Y}"),note:N.note,count:N.count}))})})})},q=l=>{if(l.columnIndex<3&&h.value[l.rowIndex].key<h.value[l.rowIndex].days.length)return h.value[l.rowIndex].key===0?{rowspan:h.value[l.rowIndex].days.length,colspan:1}:{rowspan:0,colspan:0}},s=(l,a,p,t)=>{c.value.ids=l.ids,c.value.key=l.key,c.value.startDate=l.dateStart,c.value.endDate=l.dateEnd,c.value.name=l.name,c.value.count=l.count,c.value.length=l.days.length,c.value.add=l.days.length>0&&l.days[l.days.length-1].count,c.value.level=a.level,c.value.holiday=g.value,_.value.y=t.clientY,_.value.x=t.clientX,a.level===2&&a.no<4&&(c.value.add||l.days.length>1)&&(b.value=!0),a.level===3&&(b.value=!0)},o=l=>{console.log(l);let a=k.value[c.value.ids];switch(l){case"add":a.days.push({note:""}),console.log(a.days.length);break;case"delete":delete a.days.pop(),m(c.value.ids);break}b.value=!1},i=l=>{M.value=l,c.value.count=l.count},n=()=>{M.value&&(console.log(M.value),k.value[c.value.ids].days[c.value.key]={...M.value,note:""},m(c.value.ids)),b.value=!1},m=l=>{E.workSchedule.rewriteFull({year:v.value,code:k.value[l].code,data:k.value[l].days.map(a=>({dateStart:a.dateStart.split(".").reverse().join("-"),dateEnd:a.dateEnd.split(".").reverse().join("-"),note:a.note,count:a.count}))})},C=l=>{E.workSchedule.sendConfirmMessage({fullname:E.fullName,confirm:l}),E.query=""},V=()=>{E.workSchedule.sendAgreementMessage({users:B.value.participants}),console.log("sendAgreement"),d.value=!1};return E.workSchedule.getBoss().then(l=>{console.log(l),$.value=l[0].users}),w.holidays().then(l=>{g.value=l,L()}),(l,a)=>{const p=e.resolveDirective("loading");return e.openBlock(),e.createElementBlock("div",null,[D.checkEdit?(e.openBlock(),e.createBlock(e.unref(r.ElSelect),{key:0,modelValue:x.value,"onUpdate:modelValue":a[0]||(a[0]=t=>x.value=t),placeholder:"Select",style:{width:"240px","margin-bottom":".5rem","margin-right":".5rem"}},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Y.value,t=>(e.openBlock(),e.createBlock(e.unref(r.ElOption),{key:t.value,label:t.label,value:t.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])):e.createCommentVNode("",!0),e.createVNode(e.unref(r.ElButton),{plain:"",onClick:a[1]||(a[1]=t=>f.value=!0),style:{"margin-bottom":".5rem"}},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(u)("workSchedule.jobTitle")),1)]),_:1}),e.createVNode(e.unref(r.ElSelect),{modelValue:v.value,"onUpdate:modelValue":a[2]||(a[2]=t=>v.value=t),onChange:I,placeholder:"Year",style:{width:"240px","margin-bottom":".5rem","margin-right":".5rem"}},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(T.value,t=>(e.openBlock(),e.createBlock(e.unref(r.ElOption),{key:t.value,label:t.label,value:t.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue"]),e.createVNode(e.unref(r.ElSkeleton),{style:{width:"100%"},loading:y.value,animated:""},{template:e.withCtx(()=>[e.createVNode(e.unref(r.ElSkeletonItem),{variant:"text",style:{width:"100%",height:"2rem"}}),e.createVNode(e.unref(r.ElSkeletonItem),{variant:"text",style:{width:"180px",height:"4rem","margin-right":"4px"}}),e.createVNode(e.unref(r.ElSkeletonItem),{variant:"text",style:{width:"calc( 100% - 184px)",height:"4rem"}}),e.createVNode(e.unref(r.ElSkeletonItem),{variant:"text",style:{width:"180px",height:"8rem","margin-right":"4px"}}),e.createVNode(e.unref(r.ElSkeletonItem),{variant:"text",style:{width:"calc( 100% - 184px)",height:"8rem"}})]),default:e.withCtx(()=>[e.createVNode(e.unref(r.ElTable),{id:"printTable",data:h.value,"span-method":q,onCellClick:s,border:"",style:{width:"100%"},size:"small","empty-text":e.unref(u)("vacationSchedule.emptyText")},{default:e.withCtx(()=>[e.createVNode(e.unref(r.ElTableColumn),{label:x.value!=="all"?e.unref(u)("vacationSchedule.title",{name:x.value}):e.unref(u)("vacationSchedule.enterprise")+` ${v.value}`,align:"center",height:"34"},{default:e.withCtx(()=>[e.createVNode(e.unref(r.ElTableColumn),{label:e.unref(u)("vacationSchedule.jobTitle"),width:"180",align:"center"},{default:e.withCtx(t=>[e.createTextVNode(e.toDisplayString(h.value[t.$index].jobTitle),1)]),_:1},8,["label"]),e.createVNode(e.unref(r.ElTableColumn),{label:e.unref(u)("vacationSchedule.fullName"),width:"180",align:"center"},{default:e.withCtx(t=>[e.createTextVNode(e.toDisplayString(h.value[t.$index].name),1)]),_:1},8,["label"]),e.createVNode(e.unref(r.ElTableColumn),{label:e.unref(u)("vacationSchedule.personnelNumber"),align:"center"},{default:e.withCtx(t=>[e.createTextVNode(e.toDisplayString(h.value[t.$index].code),1)]),_:1},8,["label"]),e.createVNode(e.unref(r.ElTableColumn),{label:e.unref(u)("vacationSchedule.vacation"),align:"center"},{default:e.withCtx(()=>[e.createVNode(e.unref(r.ElTableColumn),{label:e.unref(u)("vacationSchedule.days"),align:"center"},{default:e.withCtx(t=>[e.createTextVNode(e.toDisplayString(h.value[t.$index].count),1)]),_:1},8,["label"]),e.createVNode(e.unref(r.ElTableColumn),{label:e.unref(u)("vacationSchedule.date"),align:"center"},{default:e.withCtx(t=>[e.createTextVNode(e.toDisplayString(h.value[t.$index].dateStart),1)]),_:1},8,["label"]),e.createVNode(e.unref(r.ElTableColumn),{label:e.unref(u)("vacationSchedule.endDate"),align:"center"},{default:e.withCtx(t=>[e.createTextVNode(e.toDisplayString(h.value[t.$index].dateEnd),1)]),_:1},8,["label"])]),_:1},8,["label"]),e.createVNode(e.unref(r.ElTableColumn),{label:e.unref(u)("vacationSchedule.note"),align:"center"},{default:e.withCtx(t=>[e.createVNode(e.unref(r.ElInput),{modelValue:k.value[h.value[t.$index].ids].days[h.value[t.$index].key].note,"onUpdate:modelValue":N=>k.value[h.value[t.$index].ids].days[h.value[t.$index].key].note=N,style:{width:"100%"},placeholder:" ",class:"noBorder",onBlur:N=>m(h.value[t.$index].ids)},null,8,["modelValue","onUpdate:modelValue","onBlur"])]),_:1},8,["label"])]),_:1},8,["label"])]),_:1},8,["data","empty-text"])]),_:1},8,["loading"]),D.checkEdit?(e.openBlock(),e.createElementBlock("div",ne,[F.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(e.unref(r.ElButton),{key:0,type:"primary",onClick:a[3]||(a[3]=t=>d.value=!0)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(u)("vacationSchedule.sendInformation")),1)]),_:1})),D.query==="confirm"?(e.openBlock(),e.createBlock(e.unref(r.ElButton),{key:1,type:"primary",onClick:a[4]||(a[4]=t=>C(!0))},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(u)("vacationSchedule.agreeOn")),1)]),_:1})):e.createCommentVNode("",!0),D.query==="confirm"?(e.openBlock(),e.createBlock(e.unref(r.ElButton),{key:2,type:"primary",onClick:a[5]||(a[5]=t=>C(!1))},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(u)("vacationSchedule.reject")),1)]),_:1})):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),e.withDirectives((e.openBlock(),e.createBlock(e.unref(r.ElButton),{disabled:j.value,plain:"",onClick:l.exportToExcel,style:{"margin-top":".5rem"}},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(u)("workSchedule.exportExcel")),1)]),_:1},8,["disabled","onClick"])),[[p,j.value]]),e.createVNode(e.unref(r.ElDialog),{title:e.unref(u)("workSchedule.jobTitle"),modelValue:f.value,"onUpdate:modelValue":a[7]||(a[7]=t=>f.value=t),width:"400px"},{footer:e.withCtx(()=>[e.createVNode(e.unref(r.ElButton),{onClick:a[6]||(a[6]=t=>f.value=!1),size:"default"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(l.$t("workSchedule.cancel")),1)]),_:1}),e.createVNode(e.unref(r.ElButton),{size:"default",type:"primary",onClick:I},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(l.$t("workSchedule.select")),1)]),_:1})]),default:e.withCtx(()=>[e.createVNode(e.unref(r.ElForm),{model:S.value,autocomplete:"on"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(S.value,t=>(e.openBlock(),e.createBlock(e.unref(r.ElFormItem),null,{default:e.withCtx(()=>[e.createVNode(e.unref(r.ElSwitch),{modelValue:t.val,"onUpdate:modelValue":N=>t.val=N,"active-text":t.activeText},null,8,["modelValue","onUpdate:modelValue","active-text"])]),_:2},1024))),256))]),_:1},8,["model"])]),_:1},8,["title","modelValue"]),e.createVNode(e.unref(r.ElDialog),{title:e.unref(u)("vacationSchedule.pleaseCoordinate"),modelValue:d.value,"onUpdate:modelValue":a[10]||(a[10]=t=>d.value=t),width:"500px"},{footer:e.withCtx(()=>[e.createVNode(e.unref(r.ElButton),{onClick:a[9]||(a[9]=t=>d.value=!1),size:"default"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(u)("workSchedule.cancel")),1)]),_:1}),e.createVNode(e.unref(r.ElButton),{size:"default",type:"primary",onClick:V},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(u)("vacationSchedule.send")),1)]),_:1})]),default:e.withCtx(()=>[e.createVNode(e.unref(r.ElForm),{model:B.value,autocomplete:"on"},{default:e.withCtx(()=>[e.createVNode(e.unref(r.ElSelect),{modelValue:B.value.participants,"onUpdate:modelValue":a[8]||(a[8]=t=>B.value.participants=t),placeholder:e.unref(u)("vacationSchedule.fullName"),multiple:"",size:"default"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList($.value,t=>(e.openBlock(),e.createBlock(e.unref(r.ElOption),{key:t,label:t,value:t},null,8,["label","value"]))),128))]),_:1},8,["modelValue","placeholder"])]),_:1},8,["model"])]),_:1},8,["title","modelValue"]),e.createVNode(e.unref(z.ContextMenu),{show:b.value,"onUpdate:show":a[14]||(a[14]=t=>b.value=t),options:_.value},{default:e.withCtx(()=>[e.createVNode(e.unref(z.ContextMenuItem),{label:c.value.level===3&&typeof c.value.count<"u"?c.value.name+" "+c.value.count+" "+e.unref(u)("vacationSchedule.day",c.value.count):c.value.name,disabled:""},null,8,["label"]),e.createVNode(e.unref(z.ContextMenuSeparator)),c.value.level===2?(e.openBlock(),e.createElementBlock("div",oe,[c.value.length>1?(e.openBlock(),e.createBlock(e.unref(z.ContextMenuItem),{key:0,label:e.unref(u)("vacationSchedule.deleteLast"),onClick:a[11]||(a[11]=t=>o("delete"))},null,8,["label"])):e.createCommentVNode("",!0),c.value.add?(e.openBlock(),e.createBlock(e.unref(z.ContextMenuItem),{key:1,label:e.unref(u)("vacationSchedule.addVacation"),onClick:a[12]||(a[12]=t=>o("add"))},null,8,["label"])):e.createCommentVNode("",!0)])):(e.openBlock(),e.createElementBlock("div",ue,[e.createVNode(le,{data:c.value,range:"range",onInput:i},null,8,["data"]),e.createElementVNode("div",null,[e.createVNode(e.unref(r.ElButton),{onClick:a[13]||(a[13]=t=>b.value=!1)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(u)("vacationSchedule.cancel")),1)]),_:1}),e.createVNode(e.unref(r.ElButton),{onClick:n},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(u)("vacationSchedule.save")),1)]),_:1})])]))]),_:1},8,["show","options"])])}}};module.exports=re;
1
+ "use strict";const e=require("vue"),w=require("./index-CHGzf-XH.cjs"),G=require("vue-i18n"),r=require("element-plus"),z=require("@imengyu/vue3-context-menu"),O=(D,E)=>{const u=D.__vccOpts||D;for(const[k,v]of E)u[k]=v;return u},R={class:"wrapper"},P={class:"month_year"},A={class:"text"},J={class:"week"},W={class:"month"},X=["onClick"],H={key:0},K={class:"month_year"},Z={class:"text"},Q={class:"week"},ee={class:"month"},te=["onClick"],ae={__name:"DataPicker",props:{data:Object,range:{type:String,default:()=>"solid"}},emits:["init"],setup(D,{emit:E}){var L,M,U,q;const u=e.ref(new Date),k=e.ref(new Date),v=D,I=E,y=e.ref(new Date().getFullYear()),b=e.ref(new Date().getMonth()),F=e.ref(new Date().getFullYear()),f=e.ref(new Date().getMonth()),d=e.ref([]),B=e.ref(0),$=e.ref(0),g=e.ref(-1),x=e.ref(-1),{locale:Y}=G.useI18n(),T=/en|zh|ja|he/.test(Y.value)?0:1,j=s=>{const o=s.split(s.match(/\D.*?\D?/));return o[0].length>2?o.join("-")+"T00:00:01":o.reverse().join("-")+"T00:00:01"};typeof((L=v.data)==null?void 0:L.startDate)<"u"&&(u.value=new Date(j(v.data.startDate)),y.value=u.value.getFullYear(),f.value=u.value.getMonth()),typeof((M=v.data)==null?void 0:M.endDate)<"u"&&(k.value=new Date(j(v.data.endDate)),F.value=k.value.getFullYear(),b.value=k.value.getMonth());const S=()=>{let s=new Date(y.value,f.value,0);for(let n=s.getDate()-s.getDay()+T;n<=s.getDate()&&s.getDay()!==6+T;n++)B.value++,d.value.push({day:n,month:s.getMonth(),year:s.getFullYear(),class:[]});for(let n=1;n<=new Date(y.value,f.value+1,0).getDate();n++)B.value++,d.value.push({day:n,month:f.value,year:y.value,class:[]});if(v.range==="range"){$.value=new Date(y.value,f.value+2,0);for(let n=1;n<=$.value.getDate();n++)d.value.push({day:n,month:$.value.getMonth(),year:$.value.getFullYear(),class:[]})}let o=v.range==="range"?2:1,i=new Date(y.value,f.value+o,1);for(let n=1;n<=(7-i.getDay()+T)%7&&i.getDay()!==T;n++)d.value.push({day:n,month:i.getMonth(),year:i.getFullYear(),class:[]});v.data.holiday.length!==0&&(v.data.holiday.preholidays.forEach(n=>{let m=n.split("-");const C=d.value.findIndex(V=>V.year==m[0]&&V.month+1==m[1]&&V.day==m[2]);C!==-1&&(d.value[C].class[0]="preholiday")}),v.data.holiday.holidays.forEach(n=>{let m=n.split("-");const C=d.value.findIndex(V=>V.year==m[0]&&V.month+1==m[1]&&V.day==m[2]);C!==-1&&(d.value[C].class[0]="weekend")}),v.data.holiday.holiday.forEach(n=>{let m=n.split("-");const C=d.value.findIndex(V=>V.year==m[0]&&V.month+1==m[1]&&V.day==m[2]);C!==-1&&(d.value[C].class[0]="holiday")}),v.data.holiday.nowork.forEach(n=>{let m=n.split("-");const C=d.value.findIndex(V=>V.year==m[0]&&V.month+1==m[1]&&V.day==m[2]);C!==-1&&(d.value[C].class[0]="nowork")}))},_=(s,o)=>{let i=s-o+1;for(let n=0;n<=s-o;n++)d.value[n+o].class[0]==="holiday"&&i--;return i},c=(s,o)=>{const i=w.parseTime(new Date(s.year,s.month,s.day),"{dd}.{m}.{Y}");if(v.range==="range")if(console.log(g.value),x.value!==-1){if(x.value<=g.value)for(let n=x.value;n<=g.value;n++)d.value[n].class[1]="";else for(let n=g.value;n<=x.value;n++)d.value[n].class[1]="";g.value=o,x.value=-1,d.value[o].class[1]="active"}else if(g.value!==-1){if(x.value=o,x.value>=g.value)for(let m=g.value+1;m<o;m++)d.value[m].class[1]="select";else for(let m=o+1;m<g.value;m++)d.value[m].class[1]="select";d.value[o].class[1]="active";let n=w.parseTime(new Date(d.value[g.value].year,d.value[g.value].month,d.value[g.value].day),"{dd}.{m}.{Y}");g.value>o?I("input",{dateStart:i,dateEnd:n,count:_(g.value,o)}):I("input",{dateStart:n,dateEnd:i,count:_(o,g.value)})}else g.value=o,d.value[o].class[1]="active";else d.value[g.value].class[1]="",g.value=o,d.value[o].class[1]="active",I("input",{dateStart:i,count:1})};if(S(),typeof((U=v.data)==null?void 0:U.startDate)<"u"&&(g.value=d.value.findIndex(s=>s.day===u.value.getDate()&&s.month===f.value&&s.year===y.value),d.value[g.value].class[1]="active"),typeof((q=v.data)==null?void 0:q.endDate)<"u"&&v.range==="range"){x.value=d.value.findIndex(s=>s.day===k.value.getDate()&&s.month===b.value&&s.year===F.value),d.value[x.value].class[1]="active";for(let s=g.value+1;s<x.value;s++)d.value[s].class[1]="select"}const h=(s,o)=>{d.value=[],B.value=0,u.value=new Date(s,o,1),y.value=u.value.getFullYear(),f.value=u.value.getMonth(),S()};return(s,o)=>(e.openBlock(),e.createElementBlock("div",R,[e.createElementVNode("div",null,[e.createElementVNode("p",P,[e.createElementVNode("span",null,[e.createElementVNode("button",{onClick:o[0]||(o[0]=i=>h(y.value-1,f.value))},"«"),e.createElementVNode("button",{onClick:o[1]||(o[1]=i=>h(y.value,f.value-1))},"‹")]),e.createElementVNode("span",A,[e.createElementVNode("button",null,e.toDisplayString(y.value),1),e.createElementVNode("button",null,e.toDisplayString(e.unref(w.parseTime)(u.value,"{F}")),1)]),e.createElementVNode("span",null,[e.createElementVNode("button",{onClick:o[2]||(o[2]=i=>h(y.value,f.value+1))},"›"),e.createElementVNode("button",{onClick:o[3]||(o[3]=i=>h(y.value+1,f.value))},"»")])]),e.createElementVNode("div",J,[(e.openBlock(),e.createElementBlock(e.Fragment,null,e.renderList(7,(i,n)=>e.createElementVNode("button",{key:n,class:"disabled"},e.toDisplayString(e.unref(w.parseTime)(new Date(1970,1,i+e.unref(T)),"{D}")),1)),64))]),e.createElementVNode("div",W,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value,(i,n)=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:n},[n<B.value+(7-new Date(y.value,f.value+1,1).getDay()+e.unref(T))%7?(e.openBlock(),e.createElementBlock("button",{key:0,class:e.normalizeClass(i.month===f.value?i.class:"disabled"),onClick:()=>{i.month===f.value&&c(i,n)}},e.toDisplayString(i.day),11,X)):e.createCommentVNode("",!0)],64))),128))])]),v.range==="range"?(e.openBlock(),e.createElementBlock("div",H,[e.createElementVNode("p",K,[e.createElementVNode("span",null,[e.createElementVNode("button",{onClick:o[4]||(o[4]=i=>h(y.value-1,f.value))},"«"),e.createElementVNode("button",{onClick:o[5]||(o[5]=i=>h(y.value,f.value-1))},"‹")]),e.createElementVNode("span",Z,[e.createElementVNode("button",null,e.toDisplayString(new Date(y.value,f.value+1).getFullYear()),1),e.createElementVNode("button",null,e.toDisplayString(e.unref(w.parseTime)(u.value.setMonth(f.value+1),"{F}")),1)]),e.createElementVNode("span",null,[e.createElementVNode("button",{onClick:o[6]||(o[6]=i=>h(y.value,f.value+1))},"›"),e.createElementVNode("button",{onClick:o[7]||(o[7]=i=>h(y.value+1,f.value))},"»")])]),e.createElementVNode("div",Q,[(e.openBlock(),e.createElementBlock(e.Fragment,null,e.renderList(7,(i,n)=>e.createElementVNode("button",{key:n,class:"disabled"},e.toDisplayString(e.unref(w.parseTime)(new Date(1970,1,i+e.unref(T)),"{D}")),1)),64))]),e.createElementVNode("div",ee,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value,(i,n)=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:n},[n>=B.value-new Date(y.value,f.value+1,1).getDay()+e.unref(T)?(e.openBlock(),e.createElementBlock("button",{key:0,class:e.normalizeClass(i.month===$.value.getMonth()?i.class:"disabled"),onClick:()=>{i.month===$.value.getMonth()&&c(i,n)}},e.toDisplayString(i.day),11,te)):e.createCommentVNode("",!0)],64))),128))])])):e.createCommentVNode("",!0)]))}},le=O(ae,[["__scopeId","data-v-fef4c07c"]]),ne={key:1,class:"controls-container",style:{"margin-top":".5rem"}},oe={key:0},ue={key:1,style:{padding:"0 1rem .5rem"}},re={__name:"VacationTable",props:{checkEdit:{type:Boolean,default:()=>!0},odata:Object,workSchedule:Object,query:String,fullName:{type:String,default:"Вы"}},setup(D){const E=D,{t:u}=G.useI18n(),k=e.ref([]);e.ref([]);const v=e.ref(new Date().getFullYear()),I=e.ref(!1),y=e.ref(!1),b=e.ref(!1),F=e.ref({zIndex:3,minWidth:230,x:500,y:200}),f=e.ref(!1),d=e.ref(!1),B=e.ref({participants:[]}),$=e.ref([]),g=e.ref([]),x=e.ref("Сектор разработок и эксплуатации сети"),Y=e.ref([{value:"all",label:u("vacationSchedule.all"),key:"all"}]),T=e.ref([{value:v.value,label:v.value},{value:v.value+1,label:v.value+1}]),j=e.ref(!1),S=e.ref([]),_=e.ref(!1),c=e.ref({name:"Имя",length:0,code:""});e.watch(x,async(l,a)=>{l!==a&&(S.value=[],I.value=!1,E.odata.personalManagerData.forEach(p=>{(p.Status!=="Увольнение"&&p.Group===l||l==="all")&&(S.value.some(t=>(t==null?void 0:t.activeText)===p.Role)||S.value.push({val:!0,activeText:p.Role}))}),M())});const h=e.computed(()=>k.value.flatMap((l,a)=>!l.days||l.days.length===0?[{...l,key:0,ids:a}]:l.days.map((p,t)=>({ids:a,key:t,...l,...p})))),L=async()=>{E.odata.getPersonalManagerData({}).then(l=>{var a;x.value=(a=l.find(p=>p.Status!=="Увольнение"&&p.Description===E.fullName))==null?void 0:a.Group,l.forEach(p=>{p.Status!=="Увольнение"&&(Y.value.some(t=>(t==null?void 0:t.value)===p.Group)||Y.value.push({value:p.Group,label:p.Group,key:p.Group}),p.Group===x.value&&!S.value.some(t=>(t==null?void 0:t.activeText)===p.Role)&&S.value.push({val:!0,activeText:p.Role}))}),M(),y.value=!1})},M=()=>{k.value=[];let l=[];E.odata.personalManagerData.forEach(a=>{a.Status!=="Увольнение"&&(a.Group===x.value||x.value==="all")&&S.value.some(p=>p.val&&p.activeText===a.Role)&&(l.push(a.Code),k.value.push({name:a.Description,days:[{note:""}],jobTitle:a.Role,code:a.Code}))}),U(l),f.value=!1},U=l=>{E.workSchedule.getAllVacations({year:v.value}).then(a=>{l.forEach((p,t)=>{k.value[t].days=[{note:""}],a.forEach(N=>{p===N.code&&(typeof k.value[t].days[0].dateStart>"u"?k.value[t].days[0]={dateStart:w.parseTime(N.dateStart,"{dd}.{m}.{Y}"),dateEnd:w.parseTime(N.dateEnd,"{dd}.{m}.{Y}"),note:N.note,count:N.count}:k.value[t].days.push({dateStart:w.parseTime(N.dateStart,"{dd}.{m}.{Y}"),dateEnd:w.parseTime(N.dateEnd,"{dd}.{m}.{Y}"),note:N.note,count:N.count}))})})})},q=l=>{if(l.columnIndex<3&&h.value[l.rowIndex].key<h.value[l.rowIndex].days.length)return h.value[l.rowIndex].key===0?{rowspan:h.value[l.rowIndex].days.length,colspan:1}:{rowspan:0,colspan:0}},s=(l,a,p,t)=>{c.value.ids=l.ids,c.value.key=l.key,c.value.startDate=l.dateStart,c.value.endDate=l.dateEnd,c.value.name=l.name,c.value.count=l.count,c.value.length=l.days.length,c.value.add=l.days.length>0&&l.days[l.days.length-1].count,c.value.level=a.level,c.value.holiday=g.value,F.value.y=t.clientY,F.value.x=t.clientX,a.level===2&&a.no<4&&(c.value.add||l.days.length>1)&&(b.value=!0),a.level===3&&(b.value=!0)},o=l=>{console.log(l);let a=k.value[c.value.ids];switch(l){case"add":a.days.push({note:""}),console.log(a.days.length);break;case"delete":delete a.days.pop(),m(c.value.ids);break}b.value=!1},i=l=>{_.value=l,c.value.count=l.count},n=()=>{_.value&&(k.value[c.value.ids].days[c.value.key]={..._.value,note:""},m(c.value.ids)),b.value=!1},m=l=>{E.workSchedule.rewriteFull({year:v.value,code:k.value[l].code,data:k.value[l].days.map(a=>({dateStart:a.dateStart.split(".").reverse().join("-"),dateEnd:a.dateEnd.split(".").reverse().join("-"),note:a.note,count:a.count}))})},C=l=>{E.workSchedule.sendConfirmMessage({fullname:E.fullName,confirm:l}),E.query=""},V=()=>{E.workSchedule.sendAgreementMessage({users:B.value.participants}),d.value=!1};return E.workSchedule.getBoss().then(l=>{$.value=l[0].users}),w.holidays().then(l=>{g.value=l,L()}),(l,a)=>{const p=e.resolveDirective("loading");return e.openBlock(),e.createElementBlock("div",null,[D.checkEdit?(e.openBlock(),e.createBlock(e.unref(r.ElSelect),{key:0,modelValue:x.value,"onUpdate:modelValue":a[0]||(a[0]=t=>x.value=t),placeholder:"Select",style:{width:"240px","margin-bottom":".5rem","margin-right":".5rem"}},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Y.value,t=>(e.openBlock(),e.createBlock(e.unref(r.ElOption),{key:t.value,label:t.label,value:t.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])):e.createCommentVNode("",!0),e.createVNode(e.unref(r.ElButton),{plain:"",onClick:a[1]||(a[1]=t=>f.value=!0),style:{"margin-bottom":".5rem"}},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(u)("workSchedule.jobTitle")),1)]),_:1}),e.createVNode(e.unref(r.ElSelect),{modelValue:v.value,"onUpdate:modelValue":a[2]||(a[2]=t=>v.value=t),onChange:M,placeholder:"Year",style:{width:"240px","margin-bottom":".5rem","margin-right":".5rem"}},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(T.value,t=>(e.openBlock(),e.createBlock(e.unref(r.ElOption),{key:t.value,label:t.label,value:t.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue"]),e.createVNode(e.unref(r.ElSkeleton),{style:{width:"100%"},loading:y.value,animated:""},{template:e.withCtx(()=>[e.createVNode(e.unref(r.ElSkeletonItem),{variant:"text",style:{width:"100%",height:"2rem"}}),e.createVNode(e.unref(r.ElSkeletonItem),{variant:"text",style:{width:"180px",height:"4rem","margin-right":"4px"}}),e.createVNode(e.unref(r.ElSkeletonItem),{variant:"text",style:{width:"calc( 100% - 184px)",height:"4rem"}}),e.createVNode(e.unref(r.ElSkeletonItem),{variant:"text",style:{width:"180px",height:"8rem","margin-right":"4px"}}),e.createVNode(e.unref(r.ElSkeletonItem),{variant:"text",style:{width:"calc( 100% - 184px)",height:"8rem"}})]),default:e.withCtx(()=>[e.createVNode(e.unref(r.ElTable),{id:"printTable",data:h.value,"span-method":q,onCellClick:s,border:"",style:{width:"100%"},size:"small","empty-text":e.unref(u)("vacationSchedule.emptyText")},{default:e.withCtx(()=>[e.createVNode(e.unref(r.ElTableColumn),{label:x.value!=="all"?e.unref(u)("vacationSchedule.title",{name:x.value}):e.unref(u)("vacationSchedule.enterprise")+` ${v.value}`,align:"center",height:"34"},{default:e.withCtx(()=>[e.createVNode(e.unref(r.ElTableColumn),{label:e.unref(u)("vacationSchedule.jobTitle"),width:"180",align:"center"},{default:e.withCtx(t=>[e.createTextVNode(e.toDisplayString(h.value[t.$index].jobTitle),1)]),_:1},8,["label"]),e.createVNode(e.unref(r.ElTableColumn),{label:e.unref(u)("vacationSchedule.fullName"),width:"180",align:"center"},{default:e.withCtx(t=>[e.createTextVNode(e.toDisplayString(h.value[t.$index].name),1)]),_:1},8,["label"]),e.createVNode(e.unref(r.ElTableColumn),{label:e.unref(u)("vacationSchedule.personnelNumber"),align:"center"},{default:e.withCtx(t=>[e.createTextVNode(e.toDisplayString(h.value[t.$index].code),1)]),_:1},8,["label"]),e.createVNode(e.unref(r.ElTableColumn),{label:e.unref(u)("vacationSchedule.vacation"),align:"center"},{default:e.withCtx(()=>[e.createVNode(e.unref(r.ElTableColumn),{label:e.unref(u)("vacationSchedule.days"),align:"center"},{default:e.withCtx(t=>[e.createTextVNode(e.toDisplayString(h.value[t.$index].count),1)]),_:1},8,["label"]),e.createVNode(e.unref(r.ElTableColumn),{label:e.unref(u)("vacationSchedule.date"),align:"center"},{default:e.withCtx(t=>[e.createTextVNode(e.toDisplayString(h.value[t.$index].dateStart),1)]),_:1},8,["label"]),e.createVNode(e.unref(r.ElTableColumn),{label:e.unref(u)("vacationSchedule.endDate"),align:"center"},{default:e.withCtx(t=>[e.createTextVNode(e.toDisplayString(h.value[t.$index].dateEnd),1)]),_:1},8,["label"])]),_:1},8,["label"]),e.createVNode(e.unref(r.ElTableColumn),{label:e.unref(u)("vacationSchedule.note"),align:"center"},{default:e.withCtx(t=>[e.createVNode(e.unref(r.ElInput),{modelValue:k.value[h.value[t.$index].ids].days[h.value[t.$index].key].note,"onUpdate:modelValue":N=>k.value[h.value[t.$index].ids].days[h.value[t.$index].key].note=N,style:{width:"100%"},placeholder:" ",class:"noBorder",onBlur:N=>m(h.value[t.$index].ids)},null,8,["modelValue","onUpdate:modelValue","onBlur"])]),_:1},8,["label"])]),_:1},8,["label"])]),_:1},8,["data","empty-text"])]),_:1},8,["loading"]),D.checkEdit?(e.openBlock(),e.createElementBlock("div",ne,[I.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(e.unref(r.ElButton),{key:0,type:"primary",onClick:a[3]||(a[3]=t=>d.value=!0)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(u)("vacationSchedule.sendInformation")),1)]),_:1})),D.query==="confirm"?(e.openBlock(),e.createBlock(e.unref(r.ElButton),{key:1,type:"primary",onClick:a[4]||(a[4]=t=>C(!0))},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(u)("vacationSchedule.agreeOn")),1)]),_:1})):e.createCommentVNode("",!0),D.query==="confirm"?(e.openBlock(),e.createBlock(e.unref(r.ElButton),{key:2,type:"primary",onClick:a[5]||(a[5]=t=>C(!1))},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(u)("vacationSchedule.reject")),1)]),_:1})):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),e.withDirectives((e.openBlock(),e.createBlock(e.unref(r.ElButton),{disabled:j.value,plain:"",onClick:l.exportToExcel,style:{"margin-top":".5rem"}},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(u)("workSchedule.exportExcel")),1)]),_:1},8,["disabled","onClick"])),[[p,j.value]]),e.createVNode(e.unref(r.ElDialog),{title:e.unref(u)("workSchedule.jobTitle"),modelValue:f.value,"onUpdate:modelValue":a[7]||(a[7]=t=>f.value=t),width:"400px"},{footer:e.withCtx(()=>[e.createVNode(e.unref(r.ElButton),{onClick:a[6]||(a[6]=t=>f.value=!1),size:"default"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(l.$t("workSchedule.cancel")),1)]),_:1}),e.createVNode(e.unref(r.ElButton),{size:"default",type:"primary",onClick:M},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(l.$t("workSchedule.select")),1)]),_:1})]),default:e.withCtx(()=>[e.createVNode(e.unref(r.ElForm),{model:S.value,autocomplete:"on"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(S.value,t=>(e.openBlock(),e.createBlock(e.unref(r.ElFormItem),null,{default:e.withCtx(()=>[e.createVNode(e.unref(r.ElSwitch),{modelValue:t.val,"onUpdate:modelValue":N=>t.val=N,"active-text":t.activeText},null,8,["modelValue","onUpdate:modelValue","active-text"])]),_:2},1024))),256))]),_:1},8,["model"])]),_:1},8,["title","modelValue"]),e.createVNode(e.unref(r.ElDialog),{title:e.unref(u)("vacationSchedule.pleaseCoordinate"),modelValue:d.value,"onUpdate:modelValue":a[10]||(a[10]=t=>d.value=t),width:"500px"},{footer:e.withCtx(()=>[e.createVNode(e.unref(r.ElButton),{onClick:a[9]||(a[9]=t=>d.value=!1),size:"default"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(u)("workSchedule.cancel")),1)]),_:1}),e.createVNode(e.unref(r.ElButton),{size:"default",type:"primary",onClick:V},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(u)("vacationSchedule.send")),1)]),_:1})]),default:e.withCtx(()=>[e.createVNode(e.unref(r.ElForm),{model:B.value,autocomplete:"on"},{default:e.withCtx(()=>[e.createVNode(e.unref(r.ElSelect),{modelValue:B.value.participants,"onUpdate:modelValue":a[8]||(a[8]=t=>B.value.participants=t),placeholder:e.unref(u)("vacationSchedule.fullName"),multiple:"",size:"default"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList($.value,t=>(e.openBlock(),e.createBlock(e.unref(r.ElOption),{key:t,label:t,value:t},null,8,["label","value"]))),128))]),_:1},8,["modelValue","placeholder"])]),_:1},8,["model"])]),_:1},8,["title","modelValue"]),e.createVNode(e.unref(z.ContextMenu),{show:b.value,"onUpdate:show":a[14]||(a[14]=t=>b.value=t),options:F.value},{default:e.withCtx(()=>[e.createVNode(e.unref(z.ContextMenuItem),{label:c.value.level===3&&typeof c.value.count<"u"?c.value.name+" "+c.value.count+" "+e.unref(u)("vacationSchedule.day",c.value.count):c.value.name,disabled:""},null,8,["label"]),e.createVNode(e.unref(z.ContextMenuSeparator)),c.value.level===2?(e.openBlock(),e.createElementBlock("div",oe,[c.value.length>1?(e.openBlock(),e.createBlock(e.unref(z.ContextMenuItem),{key:0,label:e.unref(u)("vacationSchedule.deleteLast"),onClick:a[11]||(a[11]=t=>o("delete"))},null,8,["label"])):e.createCommentVNode("",!0),c.value.add?(e.openBlock(),e.createBlock(e.unref(z.ContextMenuItem),{key:1,label:e.unref(u)("vacationSchedule.addVacation"),onClick:a[12]||(a[12]=t=>o("add"))},null,8,["label"])):e.createCommentVNode("",!0)])):(e.openBlock(),e.createElementBlock("div",ue,[e.createVNode(le,{data:c.value,range:"range",onInput:i},null,8,["data"]),e.createElementVNode("div",null,[e.createVNode(e.unref(r.ElButton),{onClick:a[13]||(a[13]=t=>b.value=!1)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(u)("vacationSchedule.cancel")),1)]),_:1}),e.createVNode(e.unref(r.ElButton),{onClick:n},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(u)("vacationSchedule.save")),1)]),_:1})])]))]),_:1},8,["show","options"])])}}};module.exports=re;
@@ -1,8 +1,8 @@
1
- import { ref as f, openBlock as p, createElementBlock as E, createElementVNode as g, toDisplayString as k, unref as e, Fragment as G, renderList as A, normalizeClass as ne, createCommentVNode as z, watch as se, computed as ve, resolveDirective as ie, createBlock as Y, withCtx as i, createVNode as v, createTextVNode as V, withDirectives as re } from "vue";
1
+ import { ref as f, openBlock as p, createElementBlock as E, createElementVNode as y, toDisplayString as k, unref as e, Fragment as G, renderList as P, normalizeClass as ne, createCommentVNode as z, watch as se, computed as ve, resolveDirective as ie, createBlock as Y, withCtx as i, createVNode as v, createTextVNode as V, withDirectives as re } from "vue";
2
2
  import { p as O, h as ce } from "./index-uVRk2ARj.js";
3
3
  import { useI18n as de } from "vue-i18n";
4
- import { ElSelect as ae, ElOption as le, ElButton as F, ElSkeleton as fe, ElSkeletonItem as K, ElTable as pe, ElTableColumn as q, ElInput as he, ElDialog as ue, ElForm as oe, ElFormItem as me, ElSwitch as ge } from "element-plus";
5
- import { ContextMenu as ye, ContextMenuItem as te, ContextMenuSeparator as be } from "@imengyu/vue3-context-menu";
4
+ import { ElSelect as ae, ElOption as le, ElButton as F, ElSkeleton as fe, ElSkeletonItem as K, ElTable as pe, ElTableColumn as q, ElInput as he, ElDialog as ue, ElForm as oe, ElFormItem as me, ElSwitch as ye } from "element-plus";
5
+ import { ContextMenu as ge, ContextMenuItem as te, ContextMenuSeparator as be } from "@imengyu/vue3-context-menu";
6
6
  const xe = (j, M) => {
7
7
  const o = j.__vccOpts || j;
8
8
  for (const [w, h] of M)
@@ -17,12 +17,12 @@ const xe = (j, M) => {
17
17
  },
18
18
  emits: ["init"],
19
19
  setup(j, { emit: M }) {
20
- var Z, L, Q, ee;
21
- const o = f(/* @__PURE__ */ new Date()), w = f(/* @__PURE__ */ new Date()), h = j, J = M, S = f((/* @__PURE__ */ new Date()).getFullYear()), N = f((/* @__PURE__ */ new Date()).getMonth()), W = f((/* @__PURE__ */ new Date()).getFullYear()), m = f((/* @__PURE__ */ new Date()).getMonth()), d = f([]), B = f(0), R = f(0), D = f(-1), C = f(-1), { locale: X } = de(), U = /en|zh|ja|he/.test(X.value) ? 0 : 1, H = (r) => {
20
+ var Z, A, Q, ee;
21
+ const o = f(/* @__PURE__ */ new Date()), w = f(/* @__PURE__ */ new Date()), h = j, L = M, S = f((/* @__PURE__ */ new Date()).getFullYear()), N = f((/* @__PURE__ */ new Date()).getMonth()), J = f((/* @__PURE__ */ new Date()).getFullYear()), m = f((/* @__PURE__ */ new Date()).getMonth()), d = f([]), B = f(0), R = f(0), D = f(-1), C = f(-1), { locale: X } = de(), U = /en|zh|ja|he/.test(X.value) ? 0 : 1, H = (r) => {
22
22
  const u = r.split(r.match(/\D.*?\D?/));
23
23
  return u[0].length > 2 ? u.join("-") + "T00:00:01" : u.reverse().join("-") + "T00:00:01";
24
24
  };
25
- typeof ((Z = h.data) == null ? void 0 : Z.startDate) < "u" && (o.value = new Date(H(h.data.startDate)), S.value = o.value.getFullYear(), m.value = o.value.getMonth()), typeof ((L = h.data) == null ? void 0 : L.endDate) < "u" && (w.value = new Date(H(h.data.endDate)), W.value = w.value.getFullYear(), N.value = w.value.getMonth());
25
+ typeof ((Z = h.data) == null ? void 0 : Z.startDate) < "u" && (o.value = new Date(H(h.data.startDate)), S.value = o.value.getFullYear(), m.value = o.value.getMonth()), typeof ((A = h.data) == null ? void 0 : A.endDate) < "u" && (w.value = new Date(H(h.data.endDate)), J.value = w.value.getFullYear(), N.value = w.value.getMonth());
26
26
  const T = () => {
27
27
  let r = new Date(S.value, m.value, 0);
28
28
  for (let n = r.getDate() - r.getDay() + U; n <= r.getDate() && r.getDay() !== 6 + U; n++)
@@ -38,23 +38,23 @@ const xe = (j, M) => {
38
38
  for (let n = 1; n <= (7 - s.getDay() + U) % 7 && s.getDay() !== U; n++)
39
39
  d.value.push({ day: n, month: s.getMonth(), year: s.getFullYear(), class: [] });
40
40
  h.data.holiday.length !== 0 && (h.data.holiday.preholidays.forEach((n) => {
41
- let y = n.split("-");
42
- const _ = d.value.findIndex(($) => $.year == y[0] && $.month + 1 == y[1] && $.day == y[2]);
41
+ let g = n.split("-");
42
+ const _ = d.value.findIndex(($) => $.year == g[0] && $.month + 1 == g[1] && $.day == g[2]);
43
43
  _ !== -1 && (d.value[_].class[0] = "preholiday");
44
44
  }), h.data.holiday.holidays.forEach((n) => {
45
- let y = n.split("-");
46
- const _ = d.value.findIndex(($) => $.year == y[0] && $.month + 1 == y[1] && $.day == y[2]);
45
+ let g = n.split("-");
46
+ const _ = d.value.findIndex(($) => $.year == g[0] && $.month + 1 == g[1] && $.day == g[2]);
47
47
  _ !== -1 && (d.value[_].class[0] = "weekend");
48
48
  }), h.data.holiday.holiday.forEach((n) => {
49
- let y = n.split("-");
50
- const _ = d.value.findIndex(($) => $.year == y[0] && $.month + 1 == y[1] && $.day == y[2]);
49
+ let g = n.split("-");
50
+ const _ = d.value.findIndex(($) => $.year == g[0] && $.month + 1 == g[1] && $.day == g[2]);
51
51
  _ !== -1 && (d.value[_].class[0] = "holiday");
52
52
  }), h.data.holiday.nowork.forEach((n) => {
53
- let y = n.split("-");
54
- const _ = d.value.findIndex(($) => $.year == y[0] && $.month + 1 == y[1] && $.day == y[2]);
53
+ let g = n.split("-");
54
+ const _ = d.value.findIndex(($) => $.year == g[0] && $.month + 1 == g[1] && $.day == g[2]);
55
55
  _ !== -1 && (d.value[_].class[0] = "nowork");
56
56
  }));
57
- }, P = (r, u) => {
57
+ }, W = (r, u) => {
58
58
  let s = r - u + 1;
59
59
  for (let n = 0; n <= r - u; n++)
60
60
  d.value[n + u].class[0] === "holiday" && s--;
@@ -69,55 +69,55 @@ const xe = (j, M) => {
69
69
  D.value = u, C.value = -1, d.value[u].class[1] = "active";
70
70
  } else if (D.value !== -1) {
71
71
  if (C.value = u, C.value >= D.value)
72
- for (let y = D.value + 1; y < u; y++) d.value[y].class[1] = "select";
73
- else for (let y = u + 1; y < D.value; y++) d.value[y].class[1] = "select";
72
+ for (let g = D.value + 1; g < u; g++) d.value[g].class[1] = "select";
73
+ else for (let g = u + 1; g < D.value; g++) d.value[g].class[1] = "select";
74
74
  d.value[u].class[1] = "active";
75
75
  let n = O(new Date(d.value[D.value].year, d.value[D.value].month, d.value[D.value].day), "{dd}.{m}.{Y}");
76
- D.value > u ? J("input", { dateStart: s, dateEnd: n, count: P(D.value, u) }) : J("input", { dateStart: n, dateEnd: s, count: P(u, D.value) });
76
+ D.value > u ? L("input", { dateStart: s, dateEnd: n, count: W(D.value, u) }) : L("input", { dateStart: n, dateEnd: s, count: W(u, D.value) });
77
77
  } else
78
78
  D.value = u, d.value[u].class[1] = "active";
79
79
  else
80
- d.value[D.value].class[1] = "", D.value = u, d.value[u].class[1] = "active", J("input", { dateStart: s, count: 1 });
80
+ d.value[D.value].class[1] = "", D.value = u, d.value[u].class[1] = "active", L("input", { dateStart: s, count: 1 });
81
81
  };
82
82
  if (T(), typeof ((Q = h.data) == null ? void 0 : Q.startDate) < "u" && (D.value = d.value.findIndex((r) => r.day === o.value.getDate() && r.month === m.value && r.year === S.value), d.value[D.value].class[1] = "active"), typeof ((ee = h.data) == null ? void 0 : ee.endDate) < "u" && h.range === "range") {
83
- C.value = d.value.findIndex((r) => r.day === w.value.getDate() && r.month === N.value && r.year === W.value), d.value[C.value].class[1] = "active";
83
+ C.value = d.value.findIndex((r) => r.day === w.value.getDate() && r.month === N.value && r.year === J.value), d.value[C.value].class[1] = "active";
84
84
  for (let r = D.value + 1; r < C.value; r++) d.value[r].class[1] = "select";
85
85
  }
86
86
  const x = (r, u) => {
87
87
  d.value = [], B.value = 0, o.value = new Date(r, u, 1), S.value = o.value.getFullYear(), m.value = o.value.getMonth(), T();
88
88
  };
89
89
  return (r, u) => (p(), E("div", ke, [
90
- g("div", null, [
91
- g("p", De, [
92
- g("span", null, [
93
- g("button", {
90
+ y("div", null, [
91
+ y("p", De, [
92
+ y("span", null, [
93
+ y("button", {
94
94
  onClick: u[0] || (u[0] = (s) => x(S.value - 1, m.value))
95
95
  }, "«"),
96
- g("button", {
96
+ y("button", {
97
97
  onClick: u[1] || (u[1] = (s) => x(S.value, m.value - 1))
98
98
  }, "‹")
99
99
  ]),
100
- g("span", Se, [
101
- g("button", null, k(S.value), 1),
102
- g("button", null, k(e(O)(o.value, "{F}")), 1)
100
+ y("span", Se, [
101
+ y("button", null, k(S.value), 1),
102
+ y("button", null, k(e(O)(o.value, "{F}")), 1)
103
103
  ]),
104
- g("span", null, [
105
- g("button", {
104
+ y("span", null, [
105
+ y("button", {
106
106
  onClick: u[2] || (u[2] = (s) => x(S.value, m.value + 1))
107
107
  }, "›"),
108
- g("button", {
108
+ y("button", {
109
109
  onClick: u[3] || (u[3] = (s) => x(S.value + 1, m.value))
110
110
  }, "»")
111
111
  ])
112
112
  ]),
113
- g("div", we, [
114
- (p(), E(G, null, A(7, (s, n) => g("button", {
113
+ y("div", we, [
114
+ (p(), E(G, null, P(7, (s, n) => y("button", {
115
115
  key: n,
116
116
  class: "disabled"
117
117
  }, k(e(O)(new Date(1970, 1, s + e(U)), "{D}")), 1)), 64))
118
118
  ]),
119
- g("div", Ce, [
120
- (p(!0), E(G, null, A(d.value, (s, n) => (p(), E(G, { key: n }, [
119
+ y("div", Ce, [
120
+ (p(!0), E(G, null, P(d.value, (s, n) => (p(), E(G, { key: n }, [
121
121
  n < B.value + (7 - new Date(S.value, m.value + 1, 1).getDay() + e(U)) % 7 ? (p(), E("button", {
122
122
  key: 0,
123
123
  class: ne(s.month === m.value ? s.class : "disabled"),
@@ -129,36 +129,36 @@ const xe = (j, M) => {
129
129
  ])
130
130
  ]),
131
131
  h.range === "range" ? (p(), E("div", $e, [
132
- g("p", Ve, [
133
- g("span", null, [
134
- g("button", {
132
+ y("p", Ve, [
133
+ y("span", null, [
134
+ y("button", {
135
135
  onClick: u[4] || (u[4] = (s) => x(S.value - 1, m.value))
136
136
  }, "«"),
137
- g("button", {
137
+ y("button", {
138
138
  onClick: u[5] || (u[5] = (s) => x(S.value, m.value - 1))
139
139
  }, "‹")
140
140
  ]),
141
- g("span", Me, [
142
- g("button", null, k(new Date(S.value, m.value + 1).getFullYear()), 1),
143
- g("button", null, k(e(O)(o.value.setMonth(m.value + 1), "{F}")), 1)
141
+ y("span", Me, [
142
+ y("button", null, k(new Date(S.value, m.value + 1).getFullYear()), 1),
143
+ y("button", null, k(e(O)(o.value.setMonth(m.value + 1), "{F}")), 1)
144
144
  ]),
145
- g("span", null, [
146
- g("button", {
145
+ y("span", null, [
146
+ y("button", {
147
147
  onClick: u[6] || (u[6] = (s) => x(S.value, m.value + 1))
148
148
  }, "›"),
149
- g("button", {
149
+ y("button", {
150
150
  onClick: u[7] || (u[7] = (s) => x(S.value + 1, m.value))
151
151
  }, "»")
152
152
  ])
153
153
  ]),
154
- g("div", _e, [
155
- (p(), E(G, null, A(7, (s, n) => g("button", {
154
+ y("div", _e, [
155
+ (p(), E(G, null, P(7, (s, n) => y("button", {
156
156
  key: n,
157
157
  class: "disabled"
158
158
  }, k(e(O)(new Date(1970, 1, s + e(U)), "{D}")), 1)), 64))
159
159
  ]),
160
- g("div", Ie, [
161
- (p(!0), E(G, null, A(d.value, (s, n) => (p(), E(G, { key: n }, [
160
+ y("div", Ie, [
161
+ (p(!0), E(G, null, P(d.value, (s, n) => (p(), E(G, { key: n }, [
162
162
  n >= B.value - new Date(S.value, m.value + 1, 1).getDay() + e(U) ? (p(), E("button", {
163
163
  key: 0,
164
164
  class: ne(s.month === R.value.getMonth() ? s.class : "disabled"),
@@ -208,16 +208,16 @@ const xe = (j, M) => {
208
208
  // }
209
209
  ]);
210
210
  f([]);
211
- const h = f((/* @__PURE__ */ new Date()).getFullYear()), J = f(!1), S = f(!1), N = f(!1), W = f({
211
+ const h = f((/* @__PURE__ */ new Date()).getFullYear()), L = f(!1), S = f(!1), N = f(!1), J = f({
212
212
  zIndex: 3,
213
213
  minWidth: 230,
214
214
  x: 500,
215
215
  y: 200
216
- }), m = f(!1), d = f(!1), B = f({ participants: [] }), R = f([]), D = f([]), C = f("Сектор разработок и эксплуатации сети"), X = f([{ value: "all", label: o("vacationSchedule.all"), key: "all" }]), U = f([{ value: h.value, label: h.value }, { value: h.value + 1, label: h.value + 1 }]), H = f(!1), T = f([]), P = f(!1), c = f({ name: "Имя", length: 0, code: "" });
216
+ }), m = f(!1), d = f(!1), B = f({ participants: [] }), R = f([]), D = f([]), C = f("Сектор разработок и эксплуатации сети"), X = f([{ value: "all", label: o("vacationSchedule.all"), key: "all" }]), U = f([{ value: h.value, label: h.value }, { value: h.value + 1, label: h.value + 1 }]), H = f(!1), T = f([]), W = f(!1), c = f({ name: "Имя", length: 0, code: "" });
217
217
  se(C, async (t, l) => {
218
- t !== l && (T.value = [], J.value = !1, M.odata.personalManagerData.forEach((b) => {
218
+ t !== l && (T.value = [], L.value = !1, M.odata.personalManagerData.forEach((b) => {
219
219
  (b.Status !== "Увольнение" && b.Group === t || t === "all") && (T.value.some((a) => (a == null ? void 0 : a.activeText) === b.Role) || T.value.push({ val: !0, activeText: b.Role }));
220
- }), L());
220
+ }), A());
221
221
  });
222
222
  const x = ve(() => w.value.flatMap((t, l) => !t.days || t.days.length === 0 ? [{ ...t, key: 0, ids: l }] : t.days.map((b, a) => ({
223
223
  ids: l,
@@ -229,9 +229,9 @@ const xe = (j, M) => {
229
229
  var l;
230
230
  C.value = (l = t.find((b) => b.Status !== "Увольнение" && b.Description === M.fullName)) == null ? void 0 : l.Group, t.forEach((b) => {
231
231
  b.Status !== "Увольнение" && (X.value.some((a) => (a == null ? void 0 : a.value) === b.Group) || X.value.push({ value: b.Group, label: b.Group, key: b.Group }), b.Group === C.value && !T.value.some((a) => (a == null ? void 0 : a.activeText) === b.Role) && T.value.push({ val: !0, activeText: b.Role }));
232
- }), L(), S.value = !1;
232
+ }), A(), S.value = !1;
233
233
  });
234
- }, L = () => {
234
+ }, A = () => {
235
235
  w.value = [];
236
236
  let t = [];
237
237
  M.odata.personalManagerData.forEach((l) => {
@@ -240,7 +240,7 @@ const xe = (j, M) => {
240
240
  }, Q = (t) => {
241
241
  M.workSchedule.getAllVacations({ year: h.value }).then(
242
242
  (l) => {
243
- console.log(t), t.forEach((b, a) => {
243
+ t.forEach((b, a) => {
244
244
  w.value[a].days = [{ note: "" }], l.forEach((I) => {
245
245
  b === I.code && (typeof w.value[a].days[0].dateStart > "u" ? w.value[a].days[0] = {
246
246
  dateStart: O(I.dateStart, "{dd}.{m}.{Y}"),
@@ -267,7 +267,7 @@ const xe = (j, M) => {
267
267
  colspan: 0
268
268
  };
269
269
  }, r = (t, l, b, a) => {
270
- c.value.ids = t.ids, c.value.key = t.key, c.value.startDate = t.dateStart, c.value.endDate = t.dateEnd, c.value.name = t.name, c.value.count = t.count, c.value.length = t.days.length, c.value.add = t.days.length > 0 && t.days[t.days.length - 1].count, c.value.level = l.level, c.value.holiday = D.value, W.value.y = a.clientY, W.value.x = a.clientX, l.level === 2 && l.no < 4 && (c.value.add || t.days.length > 1) && (N.value = !0), l.level === 3 && (N.value = !0);
270
+ c.value.ids = t.ids, c.value.key = t.key, c.value.startDate = t.dateStart, c.value.endDate = t.dateEnd, c.value.name = t.name, c.value.count = t.count, c.value.length = t.days.length, c.value.add = t.days.length > 0 && t.days[t.days.length - 1].count, c.value.level = l.level, c.value.holiday = D.value, J.value.y = a.clientY, J.value.x = a.clientX, l.level === 2 && l.no < 4 && (c.value.add || t.days.length > 1) && (N.value = !0), l.level === 3 && (N.value = !0);
271
271
  }, u = (t) => {
272
272
  console.log(t);
273
273
  let l = w.value[c.value.ids];
@@ -276,15 +276,15 @@ const xe = (j, M) => {
276
276
  l.days.push({ note: "" }), console.log(l.days.length);
277
277
  break;
278
278
  case "delete":
279
- delete l.days.pop(), y(c.value.ids);
279
+ delete l.days.pop(), g(c.value.ids);
280
280
  break;
281
281
  }
282
282
  N.value = !1;
283
283
  }, s = (t) => {
284
- P.value = t, c.value.count = t.count;
284
+ W.value = t, c.value.count = t.count;
285
285
  }, n = () => {
286
- P.value && (console.log(P.value), w.value[c.value.ids].days[c.value.key] = { ...P.value, note: "" }, y(c.value.ids)), N.value = !1;
287
- }, y = (t) => {
286
+ W.value && (w.value[c.value.ids].days[c.value.key] = { ...W.value, note: "" }, g(c.value.ids)), N.value = !1;
287
+ }, g = (t) => {
288
288
  M.workSchedule.rewriteFull({
289
289
  year: h.value,
290
290
  code: w.value[t].code,
@@ -298,10 +298,10 @@ const xe = (j, M) => {
298
298
  }, _ = (t) => {
299
299
  M.workSchedule.sendConfirmMessage({ fullname: M.fullName, confirm: t }), M.query = "";
300
300
  }, $ = () => {
301
- M.workSchedule.sendAgreementMessage({ users: B.value.participants }), console.log("sendAgreement"), d.value = !1;
301
+ M.workSchedule.sendAgreementMessage({ users: B.value.participants }), d.value = !1;
302
302
  };
303
303
  return M.workSchedule.getBoss().then((t) => {
304
- console.log(t), R.value = t[0].users;
304
+ R.value = t[0].users;
305
305
  }), ce().then((t) => {
306
306
  D.value = t, Z();
307
307
  }), (t, l) => {
@@ -315,7 +315,7 @@ const xe = (j, M) => {
315
315
  style: { width: "240px", "margin-bottom": ".5rem", "margin-right": ".5rem" }
316
316
  }, {
317
317
  default: i(() => [
318
- (p(!0), E(G, null, A(X.value, (a) => (p(), Y(e(le), {
318
+ (p(!0), E(G, null, P(X.value, (a) => (p(), Y(e(le), {
319
319
  key: a.value,
320
320
  label: a.label,
321
321
  value: a.value
@@ -336,12 +336,12 @@ const xe = (j, M) => {
336
336
  v(e(ae), {
337
337
  modelValue: h.value,
338
338
  "onUpdate:modelValue": l[2] || (l[2] = (a) => h.value = a),
339
- onChange: L,
339
+ onChange: A,
340
340
  placeholder: "Year",
341
341
  style: { width: "240px", "margin-bottom": ".5rem", "margin-right": ".5rem" }
342
342
  }, {
343
343
  default: i(() => [
344
- (p(!0), E(G, null, A(U.value, (a) => (p(), Y(e(le), {
344
+ (p(!0), E(G, null, P(U.value, (a) => (p(), Y(e(le), {
345
345
  key: a.value,
346
346
  label: a.label,
347
347
  value: a.value
@@ -469,7 +469,7 @@ const xe = (j, M) => {
469
469
  style: { width: "100%" },
470
470
  placeholder: " ",
471
471
  class: "noBorder",
472
- onBlur: (I) => y(x.value[a.$index].ids)
472
+ onBlur: (I) => g(x.value[a.$index].ids)
473
473
  }, null, 8, ["modelValue", "onUpdate:modelValue", "onBlur"])
474
474
  ]),
475
475
  _: 1
@@ -484,7 +484,7 @@ const xe = (j, M) => {
484
484
  _: 1
485
485
  }, 8, ["loading"]),
486
486
  j.checkEdit ? (p(), E("div", je, [
487
- J.value ? z("", !0) : (p(), Y(e(F), {
487
+ L.value ? z("", !0) : (p(), Y(e(F), {
488
488
  key: 0,
489
489
  type: "primary",
490
490
  onClick: l[3] || (l[3] = (a) => d.value = !0)
@@ -547,7 +547,7 @@ const xe = (j, M) => {
547
547
  v(e(F), {
548
548
  size: "default",
549
549
  type: "primary",
550
- onClick: L
550
+ onClick: A
551
551
  }, {
552
552
  default: i(() => [
553
553
  V(k(t.$t("workSchedule.select")), 1)
@@ -561,9 +561,9 @@ const xe = (j, M) => {
561
561
  autocomplete: "on"
562
562
  }, {
563
563
  default: i(() => [
564
- (p(!0), E(G, null, A(T.value, (a) => (p(), Y(e(me), null, {
564
+ (p(!0), E(G, null, P(T.value, (a) => (p(), Y(e(me), null, {
565
565
  default: i(() => [
566
- v(e(ge), {
566
+ v(e(ye), {
567
567
  modelValue: a.val,
568
568
  "onUpdate:modelValue": (I) => a.val = I,
569
569
  "active-text": a.activeText
@@ -618,7 +618,7 @@ const xe = (j, M) => {
618
618
  size: "default"
619
619
  }, {
620
620
  default: i(() => [
621
- (p(!0), E(G, null, A(R.value, (a) => (p(), Y(e(le), {
621
+ (p(!0), E(G, null, P(R.value, (a) => (p(), Y(e(le), {
622
622
  key: a,
623
623
  label: a,
624
624
  value: a
@@ -632,10 +632,10 @@ const xe = (j, M) => {
632
632
  ]),
633
633
  _: 1
634
634
  }, 8, ["title", "modelValue"]),
635
- v(e(ye), {
635
+ v(e(ge), {
636
636
  show: N.value,
637
637
  "onUpdate:show": l[14] || (l[14] = (a) => N.value = a),
638
- options: W.value
638
+ options: J.value
639
639
  }, {
640
640
  default: i(() => [
641
641
  v(e(te), {
@@ -660,7 +660,7 @@ const xe = (j, M) => {
660
660
  range: "range",
661
661
  onInput: s
662
662
  }, null, 8, ["data"]),
663
- g("div", null, [
663
+ y("div", null, [
664
664
  v(e(F), {
665
665
  onClick: l[13] || (l[13] = (a) => N.value = !1)
666
666
  }, {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@studio-west/employees",
3
- "version": "0.2.2",
3
+ "version": "0.3.0",
4
4
  "files": [
5
5
  "dist"
6
6
  ],