@studio-west/employees 0.3.0 → 0.4.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,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
+ "use strict";const e=require("vue"),V=require("./index-CHGzf-XH.cjs"),W=require("vue-i18n"),Z=require("file-saver"),Q=require("exceljs"),d=require("element-plus"),O=require("@imengyu/vue3-context-menu");function ee(D){const x=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(D){for(const n in D)if(n!=="default"){const g=Object.getOwnPropertyDescriptor(D,n);Object.defineProperty(x,n,g.get?g:{enumerable:!0,get:()=>D[n]})}}return x.default=D,Object.freeze(x)}const te=ee(Q),le=(D,x)=>{const n=D.__vccOpts||D;for(const[g,u]of x)n[g]=u;return n},ae={class:"wrapper"},ne={class:"month_year"},oe={class:"text"},ue={class:"week"},re={class:"month"},ie=["onClick"],de={key:0},ce={class:"month_year"},se={class:"text"},ve={class:"week"},me={class:"month"},fe=["onClick"],ge={__name:"DataPicker",props:{data:Object,limitation:{type:[Boolean,Object],default:()=>!1},range:{type:String,default:()=>"solid"}},emits:["init"],setup(D,{emit:x}){var L,U,P,z;const n=e.ref(new Date),g=e.ref(new Date),u=D,F=x,h=e.ref(new Date().getFullYear()),B=e.ref(new Date().getMonth()),Y=e.ref(new Date().getFullYear()),m=e.ref(new Date().getMonth()),c=e.ref([]),T=e.ref(0),M=e.ref(0),p=e.ref(-1),k=e.ref(-1),{locale:A}=W.useI18n(),b=/en|zh|ja|he/.test(A.value)?0:1,N=u.range==="range"?2:1,$=s=>{const r=s.split(s.match(/\D.*?\D?/));return r[0].length>2?r.join("-")+"T00:00:01":r.reverse().join("-")+"T00:00:01"};typeof((L=u.data)==null?void 0:L.startDate)<"u"&&(n.value=new Date($(u.data.startDate)),h.value=n.value.getFullYear(),m.value=n.value.getMonth()),typeof((U=u.data)==null?void 0:U.endDate)<"u"&&(g.value=new Date($(u.data.endDate)),Y.value=g.value.getFullYear(),B.value=g.value.getMonth());const v=()=>{let s=new Date(h.value,m.value,0);for(let a=s.getDate()-s.getDay()+b;a<=s.getDate()&&s.getDay()!==6+b;a++)T.value++,c.value.push({day:a,month:s.getMonth(),year:s.getFullYear(),class:[]});for(let a=1;a<=new Date(h.value,m.value+1,0).getDate();a++)T.value++,c.value.push({day:a,month:m.value,year:h.value,class:[]});if(u.range==="range"){M.value=new Date(h.value,m.value+2,0);for(let a=1;a<=M.value.getDate();a++)c.value.push({day:a,month:M.value.getMonth(),year:M.value.getFullYear(),class:[]})}let r=new Date(h.value,m.value+N,1);for(let a=1;a<=(7-r.getDay()+b)%7&&r.getDay()!==b;a++)c.value.push({day:a,month:r.getMonth(),year:r.getFullYear(),class:[]});u.data.holiday.length!==0&&(u.data.holiday.preholidays.forEach(a=>{let i=a.split("-");const y=c.value.findIndex(S=>S.year==i[0]&&S.month+1==i[1]&&S.day==i[2]);y!==-1&&(c.value[y].class[0]="preholiday")}),u.data.holiday.holidays.forEach(a=>{let i=a.split("-");const y=c.value.findIndex(S=>S.year==i[0]&&S.month+1==i[1]&&S.day==i[2]);y!==-1&&(c.value[y].class[0]="weekend")}),u.data.holiday.holiday.forEach(a=>{let i=a.split("-");const y=c.value.findIndex(S=>S.year==i[0]&&S.month+1==i[1]&&S.day==i[2]);y!==-1&&(c.value[y].class[0]="holiday")}),u.data.holiday.nowork.forEach(a=>{let i=a.split("-");const y=c.value.findIndex(S=>S.year==i[0]&&S.month+1==i[1]&&S.day==i[2]);y!==-1&&(c.value[y].class[0]="nowork")}))},q=(s,r)=>{let a=s-r+1;for(let i=0;i<=s-r;i++)c.value[i+r].class[0]==="holiday"&&a--;return a},E=(s,r)=>{const a=V.parseTime(new Date(s.year,s.month,s.day),"{dd}.{m}.{Y}");if(u.range==="range")if(console.log(p.value),k.value!==-1){if(k.value<=p.value)for(let i=k.value;i<=p.value;i++)c.value[i].class[1]="";else for(let i=p.value;i<=k.value;i++)c.value[i].class[1]="";p.value=r,k.value=-1,c.value[r].class[1]="active"}else if(p.value!==-1){if(k.value=r,k.value>=p.value)for(let y=p.value+1;y<r;y++)c.value[y].class[1]="select";else for(let y=r+1;y<p.value;y++)c.value[y].class[1]="select";c.value[r].class[1]="active";let i=V.parseTime(new Date(c.value[p.value].year,c.value[p.value].month,c.value[p.value].day),"{dd}.{m}.{Y}");p.value>r?F("input",{dateStart:a,dateEnd:i,count:q(p.value,r)}):F("input",{dateStart:i,dateEnd:a,count:q(r,p.value)})}else p.value=r,c.value[r].class[1]="active";else c.value[p.value].class[1]="",p.value=r,c.value[r].class[1]="active",F("input",{dateStart:a,count:1})};if(v(),typeof((P=u.data)==null?void 0:P.startDate)<"u"&&(p.value=c.value.findIndex(s=>s.day===n.value.getDate()&&s.month===m.value&&s.year===h.value),c.value[p.value].class[1]="active"),typeof((z=u.data)==null?void 0:z.endDate)<"u"&&u.range==="range"){k.value=c.value.findIndex(s=>s.day===g.value.getDate()&&s.month===B.value&&s.year===Y.value),c.value[k.value].class[1]="active";for(let s=p.value+1;s<k.value;s++)c.value[s].class[1]="select"}const I=(s,r)=>{j(s,r)&&(c.value=[],T.value=0,n.value=new Date(s,r,1),h.value=n.value.getFullYear(),m.value=n.value.getMonth(),v())},j=(s,r)=>{if(!u.limitation)return!0;if(u.limitation.dateStart){console.log(u.limitation.dateStart);let a=u.limitation.dateStart.split(u.limitation.dateStart.match(/\D.*?\D?/));if(a[0].length>2&&a.reverse(),parseInt(a[2])>s||parseInt(a[2])===s&&parseInt(a[1])>r+1)return!1}if(u.limitation.dateEnd){console.log(u.limitation.dateEnd);let a=u.limitation.dateEnd.split(u.limitation.dateEnd.match(/\D.*?\D?/));if(a[0].length>2&&a.reverse(),parseInt(a[2])<s||parseInt(a[2])===s&&parseInt(a[1])<r+N)return!1}return!0};return(s,r)=>(e.openBlock(),e.createElementBlock("div",ae,[e.createElementVNode("div",null,[e.createElementVNode("p",ne,[e.createElementVNode("span",null,[e.createElementVNode("button",{onClick:r[0]||(r[0]=a=>I(h.value-1,m.value))},"«"),e.createElementVNode("button",{onClick:r[1]||(r[1]=a=>I(h.value,m.value-1))},"‹")]),e.createElementVNode("span",oe,[e.createElementVNode("button",null,e.toDisplayString(h.value),1),e.createElementVNode("button",null,e.toDisplayString(e.unref(V.parseTime)(n.value.setMonth(m.value),"{F}")),1)]),e.createElementVNode("span",null,[e.createElementVNode("button",{onClick:r[2]||(r[2]=a=>I(h.value,m.value+1))},"›"),e.createElementVNode("button",{onClick:r[3]||(r[3]=a=>I(h.value+1,m.value))},"»")])]),e.createElementVNode("div",ue,[(e.openBlock(),e.createElementBlock(e.Fragment,null,e.renderList(7,(a,i)=>e.createElementVNode("button",{key:i,class:"disabled"},e.toDisplayString(e.unref(V.parseTime)(new Date(1970,1,a+e.unref(b)),"{D}")),1)),64))]),e.createElementVNode("div",re,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.value,(a,i)=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:i},[i<T.value+(7-new Date(h.value,m.value+1,1).getDay()+e.unref(b))%7?(e.openBlock(),e.createElementBlock("button",{key:0,class:e.normalizeClass(a.month===m.value&&(!u.limitation||new Date(a.year,a.month,a.day+1).getTime()>new Date($(u.limitation.dateStart)).getTime()&&new Date(a.year,a.month,a.day).getTime()<new Date($(u.limitation.dateEnd)).getTime())?a.class:"disabled"),onClick:()=>{a.month===m.value&&E(a,i)}},e.toDisplayString(a.day),11,ie)):e.createCommentVNode("",!0)],64))),128))])]),u.range==="range"?(e.openBlock(),e.createElementBlock("div",de,[e.createElementVNode("p",ce,[e.createElementVNode("span",null,[e.createElementVNode("button",{onClick:r[4]||(r[4]=a=>I(h.value-1,m.value))},"«"),e.createElementVNode("button",{onClick:r[5]||(r[5]=a=>I(h.value,m.value-1))},"‹")]),e.createElementVNode("span",se,[e.createElementVNode("button",null,e.toDisplayString(new Date(h.value,m.value+1).getFullYear()),1),e.createElementVNode("button",null,e.toDisplayString(e.unref(V.parseTime)(n.value.setMonth(m.value+1),"{F}")),1)]),e.createElementVNode("span",null,[e.createElementVNode("button",{onClick:r[6]||(r[6]=a=>I(h.value,m.value+1))},"›"),e.createElementVNode("button",{onClick:r[7]||(r[7]=a=>I(h.value+1,m.value))},"»")])]),e.createElementVNode("div",ve,[(e.openBlock(),e.createElementBlock(e.Fragment,null,e.renderList(7,(a,i)=>e.createElementVNode("button",{key:i,class:"disabled"},e.toDisplayString(e.unref(V.parseTime)(new Date(1970,1,a+e.unref(b)),"{D}")),1)),64))]),e.createElementVNode("div",me,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.value,(a,i)=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:i},[i>=T.value-new Date(h.value,m.value+1,1).getDay()+e.unref(b)?(e.openBlock(),e.createElementBlock("button",{key:0,class:e.normalizeClass(a.month===M.value.getMonth()&&(!u.limitation||new Date(a.year,a.month,a.day+1).getTime()>new Date($(u.limitation.dateStart)).getTime()&&new Date(a.year,a.month,a.day).getTime()<new Date($(u.limitation.dateEnd)).getTime())?a.class:"disabled"),onClick:()=>{a.month===M.value.getMonth()&&E(a,i)}},e.toDisplayString(a.day),11,fe)):e.createCommentVNode("",!0)],64))),128))])])):e.createCommentVNode("",!0)]))}},pe=le(ge,[["__scopeId","data-v-531eb182"]]),he={key:1,class:"controls-container",style:{"margin-top":".5rem"}},Ce={key:0},ye={key:1,style:{padding:"0 1rem .5rem"}},ke={__name:"VacationTable",props:{checkEdit:{type:Boolean,default:()=>!0},odata:Object,workSchedule:Object,query:String,fullName:{type:String,default:"Вы"}},setup(D){const x=D,{t:n}=W.useI18n(),g=e.ref([]);e.ref([]);const u=e.ref(new Date().getFullYear()),F=e.ref(!1),h=e.ref(!1),B=e.ref(!1),Y=e.ref({zIndex:3,minWidth:230,x:500,y:200}),m=e.ref(!1),c=e.ref(!1),T=e.ref({participants:[]}),M=e.ref([]),p=e.ref([]),k=e.ref("all"),A=e.ref([{value:"all",label:n("vacationSchedule.all"),key:"all"}]),b=e.ref(!1),N=e.ref([]),$=e.ref(!1),v=e.ref({name:"",length:0,code:""}),q=new Date().getMonth()>11?[{value:u.value,label:u.value},{value:u.value+1,label:u.value+1}]:[{value:u.value-1,label:u.value-1},{value:u.value,label:u.value}];e.watch(k,async(o,t)=>{o!==t&&(N.value=[],F.value=!1,x.odata.personalManagerData.forEach(f=>{(f.Status!=="Увольнение"&&f.Group===o||o==="all")&&(N.value.some(l=>(l==null?void 0:l.activeText)===f.Role)||N.value.push({val:!0,activeText:f.Role}))}),j())});const E=e.computed(()=>g.value.flatMap((o,t)=>!o.days||o.days.length===0?[{...o,key:0,ids:t}]:o.days.map((f,l)=>({ids:t,key:l,...o,...f})))),I=async()=>{x.odata.getPersonalManagerData({}).then(o=>{var t;k.value=(t=o.find(f=>f.Status!=="Увольнение"&&f.Description===x.fullName))==null?void 0:t.Group,o.forEach(f=>{f.Status!=="Увольнение"&&(A.value.some(l=>(l==null?void 0:l.value)===f.Group)||A.value.push({value:f.Group,label:f.Group,key:f.Group}),f.Group===k.value&&!N.value.some(l=>(l==null?void 0:l.activeText)===f.Role)&&N.value.push({val:!0,activeText:f.Role}))}),j(),h.value=!1})},j=()=>{g.value=[];let o=[];x.odata.personalManagerData.forEach(t=>{t.Status!=="Увольнение"&&(t.Group===k.value||k.value==="all")&&N.value.some(f=>f.val&&f.activeText===t.Role)&&(o.push(t.Code),g.value.push({name:t.Description,days:[{note:""}],jobTitle:t.Role,code:t.Code}))}),L(o),m.value=!1},L=o=>{x.workSchedule.getAllVacations({year:u.value}).then(t=>{o.forEach((f,l)=>{g.value[l].days=[{note:""}],t.forEach(C=>{f===C.code&&(typeof g.value[l].days[0].dateStart>"u"?g.value[l].days[0]={dateStart:V.parseTime(C.dateStart,"{dd}.{m}.{Y}"),dateEnd:V.parseTime(C.dateEnd,"{dd}.{m}.{Y}"),note:C.note,count:C.count}:g.value[l].days.push({dateStart:V.parseTime(C.dateStart,"{dd}.{m}.{Y}"),dateEnd:V.parseTime(C.dateEnd,"{dd}.{m}.{Y}"),note:C.note,count:C.count}))})})})},U=o=>{if(o.columnIndex<3&&E.value[o.rowIndex].key<E.value[o.rowIndex].days.length)return E.value[o.rowIndex].key===0?{rowspan:E.value[o.rowIndex].days.length,colspan:1}:{rowspan:0,colspan:0}},P=(o,t,f,l)=>{v.value.ids=o.ids,v.value.key=o.key,v.value.startDate=o.dateStart,v.value.endDate=o.dateEnd,v.value.name=o.name,v.value.count=o.count,v.value.length=o.days.length,v.value.add=o.days.length>0&&o.days[o.days.length-1].count,v.value.level=t.level,v.value.holiday=p.value,Y.value.y=l.clientY,Y.value.x=l.clientX,t.level===2&&t.no<4&&(v.value.add||o.days.length>1)&&(B.value=!0),t.level===3&&(B.value=!0)},z=o=>{let t=g.value[v.value.ids];switch(o){case"add":t.days.push({note:""}),console.log(t.days.length);break;case"delete":delete t.days.pop(),a(v.value.ids);break}B.value=!1},s=o=>{$.value=o,v.value.count=o.count},r=()=>{$.value&&(g.value[v.value.ids].days[v.value.key]={...$.value,note:""},a(v.value.ids)),B.value=!1},a=o=>{x.workSchedule.rewriteFull({year:u.value,code:g.value[o].code,data:g.value[o].days.map(t=>({dateStart:t.dateStart.split(".").reverse().join("-"),dateEnd:t.dateEnd.split(".").reverse().join("-"),note:t.note,count:t.count}))})},i=o=>{x.workSchedule.sendConfirmMessage({fullname:x.fullName,confirm:o}),x.query=""},y=()=>{x.workSchedule.sendAgreementMessage({users:T.value.participants}),c.value=!1};x.workSchedule.getBoss().then(o=>{M.value=o[0].users}),V.holidays().then(o=>{p.value=o,I()});const S=async()=>{b.value=!0;const o=new te.Workbook,t=o.addWorksheet(u.value.toString(),{pageSetup:{paperSize:9,orientation:"landscape",fitToPage:!0}}),f={vertical:"middle",horizontal:"center"},l={top:{style:"thin"},left:{style:"thin"},bottom:{style:"thin"},right:{style:"thin"}},C={vertical:"middle",horizontal:"center",wrapText:!0},R={vertical:"middle",horizontal:"right",wrapText:!0};t.mergeCells("D1:G1"),t.mergeCells("D2:G2"),t.mergeCells("D3:G3"),t.mergeCells("D4:G4"),t.mergeCells("A5:G5"),t.mergeCells("A6:G6"),t.mergeCells("A9:G9"),t.mergeCells("A10:A11"),t.mergeCells("B10:B11"),t.mergeCells("C10:C11"),t.mergeCells("D10:F10"),t.mergeCells("G10:G11"),t.getCell("D1").value=n("vacationSchedule.approve"),t.getCell("D2").value=n("vacationSchedule.dateApprove",{year:u.value-1}),t.getCell("D3").value=n("workSchedule.printPlace"),t.getCell("D4").value=n("vacationSchedule.dateApprove",{year:u.value-1}),t.getCell("A5").value=n("workSchedule.firm"),t.getCell("B7").value=n("vacationSchedule.vacationSchedule"),t.getCell("C7").value=n("vacationSchedule.numberDocs"),t.getCell("D7").value=n("vacationSchedule.compilation"),t.getCell("E7").value=n("vacationSchedule.year"),t.getCell("C8").value="",t.getCell("D8").value="",t.getCell("E8").value=u.value,t.getCell("E7").value=n("vacationSchedule.year"),t.getCell("A10").value=n("vacationSchedule.jobTitle"),t.getCell("B10").value=n("vacationSchedule.fullName"),t.getCell("C10").value=n("vacationSchedule.personnelNumber"),t.getCell("D10").value=n("vacationSchedule.vacation"),t.getCell("D11").value=n("vacationSchedule.days"),t.getCell("E11").value=n("vacationSchedule.date"),t.getCell("F11").value=n("vacationSchedule.endDate"),t.getCell("G11").value=n("vacationSchedule.note"),t.getRow(1).height=80,t.getColumn(1).width=28,t.getColumn(2).width=28,t.getColumn(3).width=18,t.getColumn(4).width=18,t.getColumn(5).width=14,t.getColumn(6).width=14,t.getColumn(7).width=14,t.getColumn(1).alignment=C,t.getColumn(2).alignment=C,t.getColumn(3).alignment=C,t.getColumn(4).alignment=C,t.getColumn(5).alignment=C,t.getColumn(6).alignment=C,t.getColumn(7).alignment=C,t.getCell("D1").alignment=R,t.getCell("D2").alignment=R,t.getCell("D4").alignment=R,t.getCell("A5").alignment=f,t.getCell("C7").border=l,t.getCell("D7").border=l,t.getCell("E7").border=l,t.getCell("C8").border=l,t.getCell("D8").border=l,t.getCell("E8").border=l,t.getCell("A10").border=l,t.getCell("B10").border=l,t.getCell("C10").border=l,t.getCell("D10").border=l,t.getCell("G10").border=l,t.getCell("D11").border=l,t.getCell("E11").border=l,t.getCell("F11").border=l;let _=11;for(const w of g.value)if(w.days.length>1)w.days.forEach(G=>{let J=[w.jobTitle,w.name,w.code,G.count,G.dateStart,G.dateEnd,G.note];const K=t.addRow(J);K.border=l,_++}),t.mergeCells(`A${_-w.days.length+1}:A${_}`),t.mergeCells(`B${_-w.days.length+1}:B${_}`),t.mergeCells(`C${_-w.days.length+1}:C${_}`);else{let G=[w.jobTitle,w.name,w.code,w.days[0].count,w.days[0].dateStart,w.days[0].dateEnd,w.days[0].note];const J=t.addRow(G);J.border=l,_++}const X="export_"+V.parseTime(Date.now(),"{dd}.{m}.{Y}")+".xlsx",H=await o.xlsx.writeBuffer();Z.saveAs(new Blob([H]),X),b.value=!1};return(o,t)=>{const f=e.resolveDirective("loading");return e.openBlock(),e.createElementBlock("div",null,[D.checkEdit?(e.openBlock(),e.createBlock(e.unref(d.ElSelect),{key:0,modelValue:k.value,"onUpdate:modelValue":t[0]||(t[0]=l=>k.value=l),placeholder:"Select",style:{width:"240px","margin-bottom":".5rem","margin-right":".5rem"}},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(A.value,l=>(e.openBlock(),e.createBlock(e.unref(d.ElOption),{key:l.value,label:l.label,value:l.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])):e.createCommentVNode("",!0),e.createVNode(e.unref(d.ElButton),{plain:"",onClick:t[1]||(t[1]=l=>m.value=!0),style:{"margin-bottom":".5rem","margin-right":".5rem"}},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(n)("workSchedule.jobTitle")),1)]),_:1}),e.createVNode(e.unref(d.ElSelect),{modelValue:u.value,"onUpdate:modelValue":t[2]||(t[2]=l=>u.value=l),onChange:j,placeholder:"Year",style:{width:"80px","margin-bottom":".5rem","margin-right":".5rem"}},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(q),l=>(e.openBlock(),e.createBlock(e.unref(d.ElOption),{key:l.value,label:l.label,value:l.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue"]),e.createVNode(e.unref(d.ElSkeleton),{style:{width:"100%"},loading:h.value,animated:""},{template:e.withCtx(()=>[e.createVNode(e.unref(d.ElSkeletonItem),{variant:"text",style:{width:"100%",height:"2rem"}}),e.createVNode(e.unref(d.ElSkeletonItem),{variant:"text",style:{width:"180px",height:"4rem","margin-right":"4px"}}),e.createVNode(e.unref(d.ElSkeletonItem),{variant:"text",style:{width:"calc( 100% - 184px)",height:"4rem"}}),e.createVNode(e.unref(d.ElSkeletonItem),{variant:"text",style:{width:"180px",height:"8rem","margin-right":"4px"}}),e.createVNode(e.unref(d.ElSkeletonItem),{variant:"text",style:{width:"calc( 100% - 184px)",height:"8rem"}})]),default:e.withCtx(()=>[e.createVNode(e.unref(d.ElTable),{id:"printTable",data:E.value,"span-method":U,onCellClick:P,border:"",style:{width:"100%"},size:"small","empty-text":e.unref(n)("vacationSchedule.emptyText")},{default:e.withCtx(()=>[e.createVNode(e.unref(d.ElTableColumn),{label:k.value!=="all"?e.unref(n)("vacationSchedule.title",{name:k.value}):e.unref(n)("vacationSchedule.enterprise")+` ${u.value}`,align:"center",height:"34"},{default:e.withCtx(()=>[e.createVNode(e.unref(d.ElTableColumn),{label:e.unref(n)("vacationSchedule.jobTitle"),width:"180",align:"center"},{default:e.withCtx(l=>[e.createTextVNode(e.toDisplayString(E.value[l.$index].jobTitle),1)]),_:1},8,["label"]),e.createVNode(e.unref(d.ElTableColumn),{label:e.unref(n)("vacationSchedule.fullName"),width:"180",align:"center"},{default:e.withCtx(l=>[e.createTextVNode(e.toDisplayString(E.value[l.$index].name),1)]),_:1},8,["label"]),e.createVNode(e.unref(d.ElTableColumn),{label:e.unref(n)("vacationSchedule.personnelNumber"),align:"center"},{default:e.withCtx(l=>[e.createTextVNode(e.toDisplayString(E.value[l.$index].code),1)]),_:1},8,["label"]),e.createVNode(e.unref(d.ElTableColumn),{label:e.unref(n)("vacationSchedule.vacation"),align:"center"},{default:e.withCtx(()=>[e.createVNode(e.unref(d.ElTableColumn),{label:e.unref(n)("vacationSchedule.days"),align:"center"},{default:e.withCtx(l=>[e.createTextVNode(e.toDisplayString(E.value[l.$index].count),1)]),_:1},8,["label"]),e.createVNode(e.unref(d.ElTableColumn),{label:e.unref(n)("vacationSchedule.date"),align:"center"},{default:e.withCtx(l=>[e.createTextVNode(e.toDisplayString(E.value[l.$index].dateStart),1)]),_:1},8,["label"]),e.createVNode(e.unref(d.ElTableColumn),{label:e.unref(n)("vacationSchedule.endDate"),align:"center"},{default:e.withCtx(l=>[e.createTextVNode(e.toDisplayString(E.value[l.$index].dateEnd),1)]),_:1},8,["label"])]),_:1},8,["label"]),e.createVNode(e.unref(d.ElTableColumn),{label:e.unref(n)("vacationSchedule.note"),align:"center"},{default:e.withCtx(l=>[e.createVNode(e.unref(d.ElInput),{modelValue:g.value[E.value[l.$index].ids].days[E.value[l.$index].key].note,"onUpdate:modelValue":C=>g.value[E.value[l.$index].ids].days[E.value[l.$index].key].note=C,style:{width:"100%"},placeholder:" ",class:"noBorder",onBlur:C=>a(E.value[l.$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",he,[F.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(e.unref(d.ElButton),{key:0,type:"primary",onClick:t[3]||(t[3]=l=>c.value=!0)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(n)("vacationSchedule.sendInformation")),1)]),_:1})),D.query==="confirm"?(e.openBlock(),e.createBlock(e.unref(d.ElButton),{key:1,type:"primary",onClick:t[4]||(t[4]=l=>i(!0))},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(n)("vacationSchedule.agreeOn")),1)]),_:1})):e.createCommentVNode("",!0),D.query==="confirm"?(e.openBlock(),e.createBlock(e.unref(d.ElButton),{key:2,type:"primary",onClick:t[5]||(t[5]=l=>i(!1))},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(n)("vacationSchedule.reject")),1)]),_:1})):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),e.withDirectives((e.openBlock(),e.createBlock(e.unref(d.ElButton),{disabled:b.value,plain:"",onClick:S,style:{"margin-top":".5rem"}},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(n)("workSchedule.exportExcel")),1)]),_:1},8,["disabled"])),[[f,b.value]]),e.createVNode(e.unref(d.ElDialog),{title:e.unref(n)("workSchedule.jobTitle"),modelValue:m.value,"onUpdate:modelValue":t[7]||(t[7]=l=>m.value=l),width:"400px"},{footer:e.withCtx(()=>[e.createVNode(e.unref(d.ElButton),{onClick:t[6]||(t[6]=l=>m.value=!1),size:"default"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(o.$t("workSchedule.cancel")),1)]),_:1}),e.createVNode(e.unref(d.ElButton),{size:"default",type:"primary",onClick:j},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(o.$t("workSchedule.select")),1)]),_:1})]),default:e.withCtx(()=>[e.createVNode(e.unref(d.ElForm),{model:N.value,autocomplete:"on"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(N.value,l=>(e.openBlock(),e.createBlock(e.unref(d.ElFormItem),null,{default:e.withCtx(()=>[e.createVNode(e.unref(d.ElSwitch),{modelValue:l.val,"onUpdate:modelValue":C=>l.val=C,"active-text":l.activeText},null,8,["modelValue","onUpdate:modelValue","active-text"])]),_:2},1024))),256))]),_:1},8,["model"])]),_:1},8,["title","modelValue"]),e.createVNode(e.unref(d.ElDialog),{title:e.unref(n)("vacationSchedule.pleaseCoordinate"),modelValue:c.value,"onUpdate:modelValue":t[10]||(t[10]=l=>c.value=l),width:"500px"},{footer:e.withCtx(()=>[e.createVNode(e.unref(d.ElButton),{onClick:t[9]||(t[9]=l=>c.value=!1),size:"default"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(n)("workSchedule.cancel")),1)]),_:1}),e.createVNode(e.unref(d.ElButton),{size:"default",type:"primary",onClick:y},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(n)("vacationSchedule.send")),1)]),_:1})]),default:e.withCtx(()=>[e.createVNode(e.unref(d.ElForm),{model:T.value,autocomplete:"on"},{default:e.withCtx(()=>[e.createVNode(e.unref(d.ElSelect),{modelValue:T.value.participants,"onUpdate:modelValue":t[8]||(t[8]=l=>T.value.participants=l),placeholder:e.unref(n)("vacationSchedule.fullName"),multiple:"",size:"default"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(M.value,l=>(e.openBlock(),e.createBlock(e.unref(d.ElOption),{key:l,label:l,value:l},null,8,["label","value"]))),128))]),_:1},8,["modelValue","placeholder"])]),_:1},8,["model"])]),_:1},8,["title","modelValue"]),e.createVNode(e.unref(O.ContextMenu),{show:B.value,"onUpdate:show":t[14]||(t[14]=l=>B.value=l),options:Y.value},{default:e.withCtx(()=>[e.createVNode(e.unref(O.ContextMenuItem),{label:v.value.level===3&&typeof v.value.count<"u"?v.value.name+" "+v.value.count+" "+e.unref(n)("vacationSchedule.day",v.value.count):v.value.name,disabled:""},null,8,["label"]),e.createVNode(e.unref(O.ContextMenuSeparator)),v.value.level===2?(e.openBlock(),e.createElementBlock("div",Ce,[v.value.length>1?(e.openBlock(),e.createBlock(e.unref(O.ContextMenuItem),{key:0,label:e.unref(n)("vacationSchedule.deleteLast"),onClick:t[11]||(t[11]=l=>z("delete"))},null,8,["label"])):e.createCommentVNode("",!0),v.value.add?(e.openBlock(),e.createBlock(e.unref(O.ContextMenuItem),{key:1,label:e.unref(n)("vacationSchedule.addVacation"),onClick:t[12]||(t[12]=l=>z("add"))},null,8,["label"])):e.createCommentVNode("",!0)])):(e.openBlock(),e.createElementBlock("div",ye,[e.createVNode(pe,{data:v.value,range:"range",limitation:{dateStart:"12.01."+u.value,dateEnd:"12.12."+u.value},onInput:s},null,8,["data","limitation"]),e.createElementVNode("div",null,[e.createVNode(e.unref(d.ElButton),{onClick:t[13]||(t[13]=l=>B.value=!1)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(n)("vacationSchedule.cancel")),1)]),_:1}),e.createVNode(e.unref(d.ElButton),{onClick:r},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(n)("vacationSchedule.save")),1)]),_:1})])]))]),_:1},8,["show","options"])])}}};module.exports=ke;
@@ -1,184 +1,201 @@
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
- import { p as O, h as ce } from "./index-uVRk2ARj.js";
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 ye } from "element-plus";
5
- import { ContextMenu as ge, ContextMenuItem as te, ContextMenuSeparator as be } from "@imengyu/vue3-context-menu";
6
- const xe = (j, M) => {
7
- const o = j.__vccOpts || j;
8
- for (const [w, h] of M)
9
- o[w] = h;
10
- return o;
11
- }, ke = { class: "wrapper" }, De = { class: "month_year" }, Se = { class: "text" }, we = { class: "week" }, Ce = { class: "month" }, Ee = ["onClick"], $e = { key: 0 }, Ve = { class: "month_year" }, Me = { class: "text" }, _e = { class: "week" }, Ie = { class: "month" }, Te = ["onClick"], Ye = {
1
+ import { ref as f, openBlock as h, createElementBlock as $, createElementVNode as y, toDisplayString as C, unref as a, Fragment as O, renderList as W, normalizeClass as re, createCommentVNode as R, watch as pe, computed as ye, resolveDirective as Ce, createBlock as B, withCtx as c, createVNode as v, createTextVNode as V, withDirectives as be } from "vue";
2
+ import { p as G, h as De } from "./index-uVRk2ARj.js";
3
+ import { useI18n as me } from "vue-i18n";
4
+ import { saveAs as Se } from "file-saver";
5
+ import * as we from "exceljs";
6
+ import { ElSelect as de, ElOption as ie, ElButton as F, ElSkeleton as xe, ElSkeletonItem as ee, ElTable as ke, ElTableColumn as q, ElInput as Ee, ElDialog as ve, ElForm as ce, ElFormItem as $e, ElSwitch as Te } from "element-plus";
7
+ import { ContextMenu as Ve, ContextMenuItem as se, ContextMenuSeparator as Me } from "@imengyu/vue3-context-menu";
8
+ const Ie = (A, M) => {
9
+ const n = A.__vccOpts || A;
10
+ for (const [w, u] of M)
11
+ n[w] = u;
12
+ return n;
13
+ }, _e = { class: "wrapper" }, Ye = { class: "month_year" }, Be = { class: "text" }, Fe = { class: "week" }, Ge = { class: "month" }, Ae = ["onClick"], je = { key: 0 }, ze = { class: "month_year" }, Ne = { class: "text" }, Ue = { class: "week" }, Re = { class: "month" }, Oe = ["onClick"], Pe = {
12
14
  __name: "DataPicker",
13
15
  props: {
14
16
  data: Object,
17
+ limitation: { type: [Boolean, Object], default: () => !1 },
18
+ // {dateEnd:"30.12.2024",dateStart:"30.11.2024"}
15
19
  range: { type: String, default: () => "solid" }
16
20
  // range | solid
17
21
  },
18
22
  emits: ["init"],
19
- setup(j, { emit: M }) {
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
- const u = r.split(r.match(/\D.*?\D?/));
23
- return u[0].length > 2 ? u.join("-") + "T00:00:01" : u.reverse().join("-") + "T00:00:01";
23
+ setup(A, { emit: M }) {
24
+ var te, ae, ne, Q;
25
+ const n = f(/* @__PURE__ */ new Date()), w = f(/* @__PURE__ */ new Date()), u = A, J = M, D = f((/* @__PURE__ */ new Date()).getFullYear()), j = f((/* @__PURE__ */ new Date()).getMonth()), X = f((/* @__PURE__ */ new Date()).getFullYear()), g = f((/* @__PURE__ */ new Date()).getMonth()), s = f([]), z = f(0), P = f(0), b = f(-1), k = f(-1), { locale: Z } = me(), _ = /en|zh|ja|he/.test(Z.value) ? 0 : 1, Y = u.range === "range" ? 2 : 1, N = (r) => {
26
+ const d = r.split(r.match(/\D.*?\D?/));
27
+ return d[0].length > 2 ? d.join("-") + "T00:00:01" : d.reverse().join("-") + "T00:00:01";
24
28
  };
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
- const T = () => {
27
- let r = new Date(S.value, m.value, 0);
28
- for (let n = r.getDate() - r.getDay() + U; n <= r.getDate() && r.getDay() !== 6 + U; n++)
29
- B.value++, d.value.push({ day: n, month: r.getMonth(), year: r.getFullYear(), class: [] });
30
- for (let n = 1; n <= new Date(S.value, m.value + 1, 0).getDate(); n++)
31
- B.value++, d.value.push({ day: n, month: m.value, year: S.value, class: [] });
32
- if (h.range === "range") {
33
- R.value = new Date(S.value, m.value + 2, 0);
34
- for (let n = 1; n <= R.value.getDate(); n++)
35
- d.value.push({ day: n, month: R.value.getMonth(), year: R.value.getFullYear(), class: [] });
29
+ typeof ((te = u.data) == null ? void 0 : te.startDate) < "u" && (n.value = new Date(N(u.data.startDate)), D.value = n.value.getFullYear(), g.value = n.value.getMonth()), typeof ((ae = u.data) == null ? void 0 : ae.endDate) < "u" && (w.value = new Date(N(u.data.endDate)), X.value = w.value.getFullYear(), j.value = w.value.getMonth());
30
+ const m = () => {
31
+ let r = new Date(D.value, g.value, 0);
32
+ for (let t = r.getDate() - r.getDay() + _; t <= r.getDate() && r.getDay() !== 6 + _; t++)
33
+ z.value++, s.value.push({ day: t, month: r.getMonth(), year: r.getFullYear(), class: [] });
34
+ for (let t = 1; t <= new Date(D.value, g.value + 1, 0).getDate(); t++)
35
+ z.value++, s.value.push({ day: t, month: g.value, year: D.value, class: [] });
36
+ if (u.range === "range") {
37
+ P.value = new Date(D.value, g.value + 2, 0);
38
+ for (let t = 1; t <= P.value.getDate(); t++)
39
+ s.value.push({ day: t, month: P.value.getMonth(), year: P.value.getFullYear(), class: [] });
36
40
  }
37
- let u = h.range === "range" ? 2 : 1, s = new Date(S.value, m.value + u, 1);
38
- for (let n = 1; n <= (7 - s.getDay() + U) % 7 && s.getDay() !== U; n++)
39
- d.value.push({ day: n, month: s.getMonth(), year: s.getFullYear(), class: [] });
40
- h.data.holiday.length !== 0 && (h.data.holiday.preholidays.forEach((n) => {
41
- let g = n.split("-");
42
- const _ = d.value.findIndex(($) => $.year == g[0] && $.month + 1 == g[1] && $.day == g[2]);
43
- _ !== -1 && (d.value[_].class[0] = "preholiday");
44
- }), h.data.holiday.holidays.forEach((n) => {
45
- let g = n.split("-");
46
- const _ = d.value.findIndex(($) => $.year == g[0] && $.month + 1 == g[1] && $.day == g[2]);
47
- _ !== -1 && (d.value[_].class[0] = "weekend");
48
- }), h.data.holiday.holiday.forEach((n) => {
49
- let g = n.split("-");
50
- const _ = d.value.findIndex(($) => $.year == g[0] && $.month + 1 == g[1] && $.day == g[2]);
51
- _ !== -1 && (d.value[_].class[0] = "holiday");
52
- }), h.data.holiday.nowork.forEach((n) => {
53
- let g = n.split("-");
54
- const _ = d.value.findIndex(($) => $.year == g[0] && $.month + 1 == g[1] && $.day == g[2]);
55
- _ !== -1 && (d.value[_].class[0] = "nowork");
41
+ let d = new Date(D.value, g.value + Y, 1);
42
+ for (let t = 1; t <= (7 - d.getDay() + _) % 7 && d.getDay() !== _; t++)
43
+ s.value.push({ day: t, month: d.getMonth(), year: d.getFullYear(), class: [] });
44
+ u.data.holiday.length !== 0 && (u.data.holiday.preholidays.forEach((t) => {
45
+ let i = t.split("-");
46
+ const x = s.value.findIndex((T) => T.year == i[0] && T.month + 1 == i[1] && T.day == i[2]);
47
+ x !== -1 && (s.value[x].class[0] = "preholiday");
48
+ }), u.data.holiday.holidays.forEach((t) => {
49
+ let i = t.split("-");
50
+ const x = s.value.findIndex((T) => T.year == i[0] && T.month + 1 == i[1] && T.day == i[2]);
51
+ x !== -1 && (s.value[x].class[0] = "weekend");
52
+ }), u.data.holiday.holiday.forEach((t) => {
53
+ let i = t.split("-");
54
+ const x = s.value.findIndex((T) => T.year == i[0] && T.month + 1 == i[1] && T.day == i[2]);
55
+ x !== -1 && (s.value[x].class[0] = "holiday");
56
+ }), u.data.holiday.nowork.forEach((t) => {
57
+ let i = t.split("-");
58
+ const x = s.value.findIndex((T) => T.year == i[0] && T.month + 1 == i[1] && T.day == i[2]);
59
+ x !== -1 && (s.value[x].class[0] = "nowork");
56
60
  }));
57
- }, W = (r, u) => {
58
- let s = r - u + 1;
59
- for (let n = 0; n <= r - u; n++)
60
- d.value[n + u].class[0] === "holiday" && s--;
61
- return s;
62
- }, c = (r, u) => {
63
- const s = O(new Date(r.year, r.month, r.day), "{dd}.{m}.{Y}");
64
- if (h.range === "range")
65
- if (console.log(D.value), C.value !== -1) {
66
- if (C.value <= D.value)
67
- for (let n = C.value; n <= D.value; n++) d.value[n].class[1] = "";
68
- else for (let n = D.value; n <= C.value; n++) d.value[n].class[1] = "";
69
- D.value = u, C.value = -1, d.value[u].class[1] = "active";
70
- } else if (D.value !== -1) {
71
- if (C.value = u, C.value >= D.value)
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
- d.value[u].class[1] = "active";
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 ? L("input", { dateStart: s, dateEnd: n, count: W(D.value, u) }) : L("input", { dateStart: n, dateEnd: s, count: W(u, D.value) });
61
+ }, le = (r, d) => {
62
+ let t = r - d + 1;
63
+ for (let i = 0; i <= r - d; i++)
64
+ s.value[i + d].class[0] === "holiday" && t--;
65
+ return t;
66
+ }, E = (r, d) => {
67
+ const t = G(new Date(r.year, r.month, r.day), "{dd}.{m}.{Y}");
68
+ if (u.range === "range")
69
+ if (console.log(b.value), k.value !== -1) {
70
+ if (k.value <= b.value)
71
+ for (let i = k.value; i <= b.value; i++) s.value[i].class[1] = "";
72
+ else for (let i = b.value; i <= k.value; i++) s.value[i].class[1] = "";
73
+ b.value = d, k.value = -1, s.value[d].class[1] = "active";
74
+ } else if (b.value !== -1) {
75
+ if (k.value = d, k.value >= b.value)
76
+ for (let x = b.value + 1; x < d; x++) s.value[x].class[1] = "select";
77
+ else for (let x = d + 1; x < b.value; x++) s.value[x].class[1] = "select";
78
+ s.value[d].class[1] = "active";
79
+ let i = G(new Date(s.value[b.value].year, s.value[b.value].month, s.value[b.value].day), "{dd}.{m}.{Y}");
80
+ b.value > d ? J("input", { dateStart: t, dateEnd: i, count: le(b.value, d) }) : J("input", { dateStart: i, dateEnd: t, count: le(d, b.value) });
77
81
  } else
78
- D.value = u, d.value[u].class[1] = "active";
82
+ b.value = d, s.value[d].class[1] = "active";
79
83
  else
80
- d.value[D.value].class[1] = "", D.value = u, d.value[u].class[1] = "active", L("input", { dateStart: s, count: 1 });
84
+ s.value[b.value].class[1] = "", b.value = d, s.value[d].class[1] = "active", J("input", { dateStart: t, count: 1 });
81
85
  };
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 === J.value), d.value[C.value].class[1] = "active";
84
- for (let r = D.value + 1; r < C.value; r++) d.value[r].class[1] = "select";
86
+ if (m(), typeof ((ne = u.data) == null ? void 0 : ne.startDate) < "u" && (b.value = s.value.findIndex((r) => r.day === n.value.getDate() && r.month === g.value && r.year === D.value), s.value[b.value].class[1] = "active"), typeof ((Q = u.data) == null ? void 0 : Q.endDate) < "u" && u.range === "range") {
87
+ k.value = s.value.findIndex((r) => r.day === w.value.getDate() && r.month === j.value && r.year === X.value), s.value[k.value].class[1] = "active";
88
+ for (let r = b.value + 1; r < k.value; r++) s.value[r].class[1] = "select";
85
89
  }
86
- const x = (r, u) => {
87
- d.value = [], B.value = 0, o.value = new Date(r, u, 1), S.value = o.value.getFullYear(), m.value = o.value.getMonth(), T();
90
+ const U = (r, d) => {
91
+ H(r, d) && (s.value = [], z.value = 0, n.value = new Date(r, d, 1), D.value = n.value.getFullYear(), g.value = n.value.getMonth(), m());
92
+ }, H = (r, d) => {
93
+ if (!u.limitation) return !0;
94
+ if (u.limitation.dateStart) {
95
+ console.log(u.limitation.dateStart);
96
+ let t = u.limitation.dateStart.split(u.limitation.dateStart.match(/\D.*?\D?/));
97
+ if (t[0].length > 2 && t.reverse(), parseInt(t[2]) > r || parseInt(t[2]) === r && parseInt(t[1]) > d + 1) return !1;
98
+ }
99
+ if (u.limitation.dateEnd) {
100
+ console.log(u.limitation.dateEnd);
101
+ let t = u.limitation.dateEnd.split(u.limitation.dateEnd.match(/\D.*?\D?/));
102
+ if (t[0].length > 2 && t.reverse(), parseInt(t[2]) < r || parseInt(t[2]) === r && parseInt(t[1]) < d + Y) return !1;
103
+ }
104
+ return !0;
88
105
  };
89
- return (r, u) => (p(), E("div", ke, [
106
+ return (r, d) => (h(), $("div", _e, [
90
107
  y("div", null, [
91
- y("p", De, [
108
+ y("p", Ye, [
92
109
  y("span", null, [
93
110
  y("button", {
94
- onClick: u[0] || (u[0] = (s) => x(S.value - 1, m.value))
111
+ onClick: d[0] || (d[0] = (t) => U(D.value - 1, g.value))
95
112
  }, "«"),
96
113
  y("button", {
97
- onClick: u[1] || (u[1] = (s) => x(S.value, m.value - 1))
114
+ onClick: d[1] || (d[1] = (t) => U(D.value, g.value - 1))
98
115
  }, "‹")
99
116
  ]),
100
- y("span", Se, [
101
- y("button", null, k(S.value), 1),
102
- y("button", null, k(e(O)(o.value, "{F}")), 1)
117
+ y("span", Be, [
118
+ y("button", null, C(D.value), 1),
119
+ y("button", null, C(a(G)(n.value.setMonth(g.value), "{F}")), 1)
103
120
  ]),
104
121
  y("span", null, [
105
122
  y("button", {
106
- onClick: u[2] || (u[2] = (s) => x(S.value, m.value + 1))
123
+ onClick: d[2] || (d[2] = (t) => U(D.value, g.value + 1))
107
124
  }, "›"),
108
125
  y("button", {
109
- onClick: u[3] || (u[3] = (s) => x(S.value + 1, m.value))
126
+ onClick: d[3] || (d[3] = (t) => U(D.value + 1, g.value))
110
127
  }, "»")
111
128
  ])
112
129
  ]),
113
- y("div", we, [
114
- (p(), E(G, null, P(7, (s, n) => y("button", {
115
- key: n,
130
+ y("div", Fe, [
131
+ (h(), $(O, null, W(7, (t, i) => y("button", {
132
+ key: i,
116
133
  class: "disabled"
117
- }, k(e(O)(new Date(1970, 1, s + e(U)), "{D}")), 1)), 64))
134
+ }, C(a(G)(new Date(1970, 1, t + a(_)), "{D}")), 1)), 64))
118
135
  ]),
119
- y("div", Ce, [
120
- (p(!0), E(G, null, P(d.value, (s, n) => (p(), E(G, { key: n }, [
121
- n < B.value + (7 - new Date(S.value, m.value + 1, 1).getDay() + e(U)) % 7 ? (p(), E("button", {
136
+ y("div", Ge, [
137
+ (h(!0), $(O, null, W(s.value, (t, i) => (h(), $(O, { key: i }, [
138
+ i < z.value + (7 - new Date(D.value, g.value + 1, 1).getDay() + a(_)) % 7 ? (h(), $("button", {
122
139
  key: 0,
123
- class: ne(s.month === m.value ? s.class : "disabled"),
140
+ class: re(t.month === g.value && (!u.limitation || new Date(t.year, t.month, t.day + 1).getTime() > new Date(N(u.limitation.dateStart)).getTime() && new Date(t.year, t.month, t.day).getTime() < new Date(N(u.limitation.dateEnd)).getTime()) ? t.class : "disabled"),
124
141
  onClick: () => {
125
- s.month === m.value && c(s, n);
142
+ t.month === g.value && E(t, i);
126
143
  }
127
- }, k(s.day), 11, Ee)) : z("", !0)
144
+ }, C(t.day), 11, Ae)) : R("", !0)
128
145
  ], 64))), 128))
129
146
  ])
130
147
  ]),
131
- h.range === "range" ? (p(), E("div", $e, [
132
- y("p", Ve, [
148
+ u.range === "range" ? (h(), $("div", je, [
149
+ y("p", ze, [
133
150
  y("span", null, [
134
151
  y("button", {
135
- onClick: u[4] || (u[4] = (s) => x(S.value - 1, m.value))
152
+ onClick: d[4] || (d[4] = (t) => U(D.value - 1, g.value))
136
153
  }, "«"),
137
154
  y("button", {
138
- onClick: u[5] || (u[5] = (s) => x(S.value, m.value - 1))
155
+ onClick: d[5] || (d[5] = (t) => U(D.value, g.value - 1))
139
156
  }, "‹")
140
157
  ]),
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)
158
+ y("span", Ne, [
159
+ y("button", null, C(new Date(D.value, g.value + 1).getFullYear()), 1),
160
+ y("button", null, C(a(G)(n.value.setMonth(g.value + 1), "{F}")), 1)
144
161
  ]),
145
162
  y("span", null, [
146
163
  y("button", {
147
- onClick: u[6] || (u[6] = (s) => x(S.value, m.value + 1))
164
+ onClick: d[6] || (d[6] = (t) => U(D.value, g.value + 1))
148
165
  }, "›"),
149
166
  y("button", {
150
- onClick: u[7] || (u[7] = (s) => x(S.value + 1, m.value))
167
+ onClick: d[7] || (d[7] = (t) => U(D.value + 1, g.value))
151
168
  }, "»")
152
169
  ])
153
170
  ]),
154
- y("div", _e, [
155
- (p(), E(G, null, P(7, (s, n) => y("button", {
156
- key: n,
171
+ y("div", Ue, [
172
+ (h(), $(O, null, W(7, (t, i) => y("button", {
173
+ key: i,
157
174
  class: "disabled"
158
- }, k(e(O)(new Date(1970, 1, s + e(U)), "{D}")), 1)), 64))
175
+ }, C(a(G)(new Date(1970, 1, t + a(_)), "{D}")), 1)), 64))
159
176
  ]),
160
- y("div", Ie, [
161
- (p(!0), E(G, null, P(d.value, (s, n) => (p(), E(G, { key: n }, [
162
- n >= B.value - new Date(S.value, m.value + 1, 1).getDay() + e(U) ? (p(), E("button", {
177
+ y("div", Re, [
178
+ (h(!0), $(O, null, W(s.value, (t, i) => (h(), $(O, { key: i }, [
179
+ i >= z.value - new Date(D.value, g.value + 1, 1).getDay() + a(_) ? (h(), $("button", {
163
180
  key: 0,
164
- class: ne(s.month === R.value.getMonth() ? s.class : "disabled"),
181
+ class: re(t.month === P.value.getMonth() && (!u.limitation || new Date(t.year, t.month, t.day + 1).getTime() > new Date(N(u.limitation.dateStart)).getTime() && new Date(t.year, t.month, t.day).getTime() < new Date(N(u.limitation.dateEnd)).getTime()) ? t.class : "disabled"),
165
182
  onClick: () => {
166
- s.month === R.value.getMonth() && c(s, n);
183
+ t.month === P.value.getMonth() && E(t, i);
167
184
  }
168
- }, k(s.day), 11, Te)) : z("", !0)
185
+ }, C(t.day), 11, Oe)) : R("", !0)
169
186
  ], 64))), 128))
170
187
  ])
171
- ])) : z("", !0)
188
+ ])) : R("", !0)
172
189
  ]));
173
190
  }
174
- }, Fe = /* @__PURE__ */ xe(Ye, [["__scopeId", "data-v-fef4c07c"]]), je = {
191
+ }, qe = /* @__PURE__ */ Ie(Pe, [["__scopeId", "data-v-531eb182"]]), Le = {
175
192
  key: 1,
176
193
  class: "controls-container",
177
194
  style: { "margin-top": ".5rem" }
178
- }, Ne = { key: 0 }, Be = {
195
+ }, We = { key: 0 }, Je = {
179
196
  key: 1,
180
197
  style: { padding: "0 1rem .5rem" }
181
- }, qe = {
198
+ }, ll = {
182
199
  __name: "VacationTable",
183
200
  props: {
184
201
  checkEdit: { type: Boolean, default: () => !0 },
@@ -187,8 +204,8 @@ const xe = (j, M) => {
187
204
  query: String,
188
205
  fullName: { type: String, default: "Вы" }
189
206
  },
190
- setup(j) {
191
- const M = j, { t: o } = de(), w = f([
207
+ setup(A) {
208
+ const M = A, { t: n } = me(), w = f([
192
209
  // { name: 'Иванов Петр Михалыч',
193
210
  // jobTitle: '(Ведущий работник месяца)',
194
211
  // days: [{dateStart: "03.05.2024", dateEnd: "06.06.2024", note: 'забил - сказал он ослик', count: 14 },
@@ -208,268 +225,288 @@ const xe = (j, M) => {
208
225
  // }
209
226
  ]);
210
227
  f([]);
211
- const h = f((/* @__PURE__ */ new Date()).getFullYear()), L = f(!1), S = f(!1), N = f(!1), J = f({
228
+ const u = f((/* @__PURE__ */ new Date()).getFullYear()), J = f(!1), D = f(!1), j = f(!1), X = f({
212
229
  zIndex: 3,
213
230
  minWidth: 230,
214
231
  x: 500,
215
232
  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([]), W = f(!1), c = f({ name: "Имя", length: 0, code: "" });
217
- se(C, async (t, l) => {
218
- t !== l && (T.value = [], L.value = !1, M.odata.personalManagerData.forEach((b) => {
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
- }), A());
233
+ }), g = f(!1), s = f(!1), z = f({ participants: [] }), P = f([]), b = f([]), k = f("all"), Z = f([{ value: "all", label: n("vacationSchedule.all"), key: "all" }]), _ = f(!1), Y = f([]), N = f(!1), m = f({ name: "", length: 0, code: "" }), le = (/* @__PURE__ */ new Date()).getMonth() > 11 ? [{ value: u.value, label: u.value }, { value: u.value + 1, label: u.value + 1 }] : [{ value: u.value - 1, label: u.value - 1 }, { value: u.value, label: u.value }];
234
+ pe(k, async (o, e) => {
235
+ o !== e && (Y.value = [], J.value = !1, M.odata.personalManagerData.forEach((p) => {
236
+ (p.Status !== "Увольнение" && p.Group === o || o === "all") && (Y.value.some((l) => (l == null ? void 0 : l.activeText) === p.Role) || Y.value.push({ val: !0, activeText: p.Role }));
237
+ }), H());
221
238
  });
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
- ids: l,
224
- key: a,
225
- ...t,
226
- ...b
227
- })))), Z = async () => {
228
- M.odata.getPersonalManagerData({}).then((t) => {
229
- var l;
230
- C.value = (l = t.find((b) => b.Status !== "Увольнение" && b.Description === M.fullName)) == null ? void 0 : l.Group, t.forEach((b) => {
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
- }), A(), S.value = !1;
239
+ const E = ye(() => w.value.flatMap((o, e) => !o.days || o.days.length === 0 ? [{ ...o, key: 0, ids: e }] : o.days.map((p, l) => ({
240
+ ids: e,
241
+ key: l,
242
+ ...o,
243
+ ...p
244
+ })))), U = async () => {
245
+ M.odata.getPersonalManagerData({}).then((o) => {
246
+ var e;
247
+ k.value = (e = o.find((p) => p.Status !== "Увольнение" && p.Description === M.fullName)) == null ? void 0 : e.Group, o.forEach((p) => {
248
+ p.Status !== "Увольнение" && (Z.value.some((l) => (l == null ? void 0 : l.value) === p.Group) || Z.value.push({ value: p.Group, label: p.Group, key: p.Group }), p.Group === k.value && !Y.value.some((l) => (l == null ? void 0 : l.activeText) === p.Role) && Y.value.push({ val: !0, activeText: p.Role }));
249
+ }), H(), D.value = !1;
233
250
  });
234
- }, A = () => {
251
+ }, H = () => {
235
252
  w.value = [];
236
- let t = [];
237
- M.odata.personalManagerData.forEach((l) => {
238
- l.Status !== "Увольнение" && (l.Group === C.value || C.value === "all") && T.value.some((b) => b.val && b.activeText === l.Role) && (t.push(l.Code), w.value.push({ name: l.Description, days: [{ note: "" }], jobTitle: l.Role, code: l.Code }));
239
- }), Q(t), m.value = !1;
240
- }, Q = (t) => {
241
- M.workSchedule.getAllVacations({ year: h.value }).then(
242
- (l) => {
243
- t.forEach((b, a) => {
244
- w.value[a].days = [{ note: "" }], l.forEach((I) => {
245
- b === I.code && (typeof w.value[a].days[0].dateStart > "u" ? w.value[a].days[0] = {
246
- dateStart: O(I.dateStart, "{dd}.{m}.{Y}"),
247
- dateEnd: O(I.dateEnd, "{dd}.{m}.{Y}"),
248
- note: I.note,
249
- count: I.count
250
- } : w.value[a].days.push({
251
- dateStart: O(I.dateStart, "{dd}.{m}.{Y}"),
252
- dateEnd: O(I.dateEnd, "{dd}.{m}.{Y}"),
253
- note: I.note,
254
- count: I.count
253
+ let o = [];
254
+ M.odata.personalManagerData.forEach((e) => {
255
+ e.Status !== "Увольнение" && (e.Group === k.value || k.value === "all") && Y.value.some((p) => p.val && p.activeText === e.Role) && (o.push(e.Code), w.value.push({ name: e.Description, days: [{ note: "" }], jobTitle: e.Role, code: e.Code }));
256
+ }), te(o), g.value = !1;
257
+ }, te = (o) => {
258
+ M.workSchedule.getAllVacations({ year: u.value }).then(
259
+ (e) => {
260
+ o.forEach((p, l) => {
261
+ w.value[l].days = [{ note: "" }], e.forEach((S) => {
262
+ p === S.code && (typeof w.value[l].days[0].dateStart > "u" ? w.value[l].days[0] = {
263
+ dateStart: G(S.dateStart, "{dd}.{m}.{Y}"),
264
+ dateEnd: G(S.dateEnd, "{dd}.{m}.{Y}"),
265
+ note: S.note,
266
+ count: S.count
267
+ } : w.value[l].days.push({
268
+ dateStart: G(S.dateStart, "{dd}.{m}.{Y}"),
269
+ dateEnd: G(S.dateEnd, "{dd}.{m}.{Y}"),
270
+ note: S.note,
271
+ count: S.count
255
272
  }));
256
273
  });
257
274
  });
258
275
  }
259
276
  );
260
- }, ee = (t) => {
261
- if (t.columnIndex < 3 && x.value[t.rowIndex].key < x.value[t.rowIndex].days.length)
262
- return x.value[t.rowIndex].key === 0 ? {
263
- rowspan: x.value[t.rowIndex].days.length,
277
+ }, ae = (o) => {
278
+ if (o.columnIndex < 3 && E.value[o.rowIndex].key < E.value[o.rowIndex].days.length)
279
+ return E.value[o.rowIndex].key === 0 ? {
280
+ rowspan: E.value[o.rowIndex].days.length,
264
281
  colspan: 1
265
282
  } : {
266
283
  rowspan: 0,
267
284
  colspan: 0
268
285
  };
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, 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
- }, u = (t) => {
272
- console.log(t);
273
- let l = w.value[c.value.ids];
274
- switch (t) {
286
+ }, ne = (o, e, p, l) => {
287
+ m.value.ids = o.ids, m.value.key = o.key, m.value.startDate = o.dateStart, m.value.endDate = o.dateEnd, m.value.name = o.name, m.value.count = o.count, m.value.length = o.days.length, m.value.add = o.days.length > 0 && o.days[o.days.length - 1].count, m.value.level = e.level, m.value.holiday = b.value, X.value.y = l.clientY, X.value.x = l.clientX, e.level === 2 && e.no < 4 && (m.value.add || o.days.length > 1) && (j.value = !0), e.level === 3 && (j.value = !0);
288
+ }, Q = (o) => {
289
+ let e = w.value[m.value.ids];
290
+ switch (o) {
275
291
  case "add":
276
- l.days.push({ note: "" }), console.log(l.days.length);
292
+ e.days.push({ note: "" }), console.log(e.days.length);
277
293
  break;
278
294
  case "delete":
279
- delete l.days.pop(), g(c.value.ids);
295
+ delete e.days.pop(), t(m.value.ids);
280
296
  break;
281
297
  }
282
- N.value = !1;
283
- }, s = (t) => {
284
- W.value = t, c.value.count = t.count;
285
- }, n = () => {
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) => {
298
+ j.value = !1;
299
+ }, r = (o) => {
300
+ N.value = o, m.value.count = o.count;
301
+ }, d = () => {
302
+ N.value && (w.value[m.value.ids].days[m.value.key] = { ...N.value, note: "" }, t(m.value.ids)), j.value = !1;
303
+ }, t = (o) => {
288
304
  M.workSchedule.rewriteFull({
289
- year: h.value,
290
- code: w.value[t].code,
291
- data: w.value[t].days.map((l) => ({
292
- dateStart: l.dateStart.split(".").reverse().join("-"),
293
- dateEnd: l.dateEnd.split(".").reverse().join("-"),
294
- note: l.note,
295
- count: l.count
305
+ year: u.value,
306
+ code: w.value[o].code,
307
+ data: w.value[o].days.map((e) => ({
308
+ dateStart: e.dateStart.split(".").reverse().join("-"),
309
+ dateEnd: e.dateEnd.split(".").reverse().join("-"),
310
+ note: e.note,
311
+ count: e.count
296
312
  }))
297
313
  });
298
- }, _ = (t) => {
299
- M.workSchedule.sendConfirmMessage({ fullname: M.fullName, confirm: t }), M.query = "";
300
- }, $ = () => {
301
- M.workSchedule.sendAgreementMessage({ users: B.value.participants }), d.value = !1;
314
+ }, i = (o) => {
315
+ M.workSchedule.sendConfirmMessage({ fullname: M.fullName, confirm: o }), M.query = "";
316
+ }, x = () => {
317
+ M.workSchedule.sendAgreementMessage({ users: z.value.participants }), s.value = !1;
318
+ };
319
+ M.workSchedule.getBoss().then((o) => {
320
+ P.value = o[0].users;
321
+ }), De().then((o) => {
322
+ b.value = o, U();
323
+ });
324
+ const T = async () => {
325
+ _.value = !0;
326
+ const o = new we.Workbook(), e = o.addWorksheet(u.value.toString(), { pageSetup: { paperSize: 9, orientation: "landscape", fitToPage: !0 } }), p = { vertical: "middle", horizontal: "center" }, l = { top: { style: "thin" }, left: { style: "thin" }, bottom: { style: "thin" }, right: { style: "thin" } }, S = { vertical: "middle", horizontal: "center", wrapText: !0 }, oe = { vertical: "middle", horizontal: "right", wrapText: !0 };
327
+ e.mergeCells("D1:G1"), e.mergeCells("D2:G2"), e.mergeCells("D3:G3"), e.mergeCells("D4:G4"), e.mergeCells("A5:G5"), e.mergeCells("A6:G6"), e.mergeCells("A9:G9"), e.mergeCells("A10:A11"), e.mergeCells("B10:B11"), e.mergeCells("C10:C11"), e.mergeCells("D10:F10"), e.mergeCells("G10:G11"), e.getCell("D1").value = n("vacationSchedule.approve"), e.getCell("D2").value = n("vacationSchedule.dateApprove", { year: u.value - 1 }), e.getCell("D3").value = n("workSchedule.printPlace"), e.getCell("D4").value = n("vacationSchedule.dateApprove", { year: u.value - 1 }), e.getCell("A5").value = n("workSchedule.firm"), e.getCell("B7").value = n("vacationSchedule.vacationSchedule"), e.getCell("C7").value = n("vacationSchedule.numberDocs"), e.getCell("D7").value = n("vacationSchedule.compilation"), e.getCell("E7").value = n("vacationSchedule.year"), e.getCell("C8").value = "", e.getCell("D8").value = "", e.getCell("E8").value = u.value, e.getCell("E7").value = n("vacationSchedule.year"), e.getCell("A10").value = n("vacationSchedule.jobTitle"), e.getCell("B10").value = n("vacationSchedule.fullName"), e.getCell("C10").value = n("vacationSchedule.personnelNumber"), e.getCell("D10").value = n("vacationSchedule.vacation"), e.getCell("D11").value = n("vacationSchedule.days"), e.getCell("E11").value = n("vacationSchedule.date"), e.getCell("F11").value = n("vacationSchedule.endDate"), e.getCell("G11").value = n("vacationSchedule.note"), e.getRow(1).height = 80, e.getColumn(1).width = 28, e.getColumn(2).width = 28, e.getColumn(3).width = 18, e.getColumn(4).width = 18, e.getColumn(5).width = 14, e.getColumn(6).width = 14, e.getColumn(7).width = 14, e.getColumn(1).alignment = S, e.getColumn(2).alignment = S, e.getColumn(3).alignment = S, e.getColumn(4).alignment = S, e.getColumn(5).alignment = S, e.getColumn(6).alignment = S, e.getColumn(7).alignment = S, e.getCell("D1").alignment = oe, e.getCell("D2").alignment = oe, e.getCell("D4").alignment = oe, e.getCell("A5").alignment = p, e.getCell("C7").border = l, e.getCell("D7").border = l, e.getCell("E7").border = l, e.getCell("C8").border = l, e.getCell("D8").border = l, e.getCell("E8").border = l, e.getCell("A10").border = l, e.getCell("B10").border = l, e.getCell("C10").border = l, e.getCell("D10").border = l, e.getCell("G10").border = l, e.getCell("D11").border = l, e.getCell("E11").border = l, e.getCell("F11").border = l;
328
+ let L = 11;
329
+ for (const I of w.value)
330
+ if (I.days.length > 1)
331
+ I.days.forEach((K) => {
332
+ let ue = [I.jobTitle, I.name, I.code, K.count, K.dateStart, K.dateEnd, K.note];
333
+ const fe = e.addRow(ue);
334
+ fe.border = l, L++;
335
+ }), e.mergeCells(`A${L - I.days.length + 1}:A${L}`), e.mergeCells(`B${L - I.days.length + 1}:B${L}`), e.mergeCells(`C${L - I.days.length + 1}:C${L}`);
336
+ else {
337
+ let K = [I.jobTitle, I.name, I.code, I.days[0].count, I.days[0].dateStart, I.days[0].dateEnd, I.days[0].note];
338
+ const ue = e.addRow(K);
339
+ ue.border = l, L++;
340
+ }
341
+ const ge = "export_" + G(Date.now(), "{dd}.{m}.{Y}") + ".xlsx", he = await o.xlsx.writeBuffer();
342
+ Se(new Blob([he]), ge), _.value = !1;
302
343
  };
303
- return M.workSchedule.getBoss().then((t) => {
304
- R.value = t[0].users;
305
- }), ce().then((t) => {
306
- D.value = t, Z();
307
- }), (t, l) => {
308
- const b = ie("loading");
309
- return p(), E("div", null, [
310
- j.checkEdit ? (p(), Y(e(ae), {
344
+ return (o, e) => {
345
+ const p = Ce("loading");
346
+ return h(), $("div", null, [
347
+ A.checkEdit ? (h(), B(a(de), {
311
348
  key: 0,
312
- modelValue: C.value,
313
- "onUpdate:modelValue": l[0] || (l[0] = (a) => C.value = a),
349
+ modelValue: k.value,
350
+ "onUpdate:modelValue": e[0] || (e[0] = (l) => k.value = l),
314
351
  placeholder: "Select",
315
352
  style: { width: "240px", "margin-bottom": ".5rem", "margin-right": ".5rem" }
316
353
  }, {
317
- default: i(() => [
318
- (p(!0), E(G, null, P(X.value, (a) => (p(), Y(e(le), {
319
- key: a.value,
320
- label: a.label,
321
- value: a.value
354
+ default: c(() => [
355
+ (h(!0), $(O, null, W(Z.value, (l) => (h(), B(a(ie), {
356
+ key: l.value,
357
+ label: l.label,
358
+ value: l.value
322
359
  }, null, 8, ["label", "value"]))), 128))
323
360
  ]),
324
361
  _: 1
325
- }, 8, ["modelValue"])) : z("", !0),
326
- v(e(F), {
362
+ }, 8, ["modelValue"])) : R("", !0),
363
+ v(a(F), {
327
364
  plain: "",
328
- onClick: l[1] || (l[1] = (a) => m.value = !0),
329
- style: { "margin-bottom": ".5rem" }
365
+ onClick: e[1] || (e[1] = (l) => g.value = !0),
366
+ style: { "margin-bottom": ".5rem", "margin-right": ".5rem" }
330
367
  }, {
331
- default: i(() => [
332
- V(k(e(o)("workSchedule.jobTitle")), 1)
368
+ default: c(() => [
369
+ V(C(a(n)("workSchedule.jobTitle")), 1)
333
370
  ]),
334
371
  _: 1
335
372
  }),
336
- v(e(ae), {
337
- modelValue: h.value,
338
- "onUpdate:modelValue": l[2] || (l[2] = (a) => h.value = a),
339
- onChange: A,
373
+ v(a(de), {
374
+ modelValue: u.value,
375
+ "onUpdate:modelValue": e[2] || (e[2] = (l) => u.value = l),
376
+ onChange: H,
340
377
  placeholder: "Year",
341
- style: { width: "240px", "margin-bottom": ".5rem", "margin-right": ".5rem" }
378
+ style: { width: "80px", "margin-bottom": ".5rem", "margin-right": ".5rem" }
342
379
  }, {
343
- default: i(() => [
344
- (p(!0), E(G, null, P(U.value, (a) => (p(), Y(e(le), {
345
- key: a.value,
346
- label: a.label,
347
- value: a.value
380
+ default: c(() => [
381
+ (h(!0), $(O, null, W(a(le), (l) => (h(), B(a(ie), {
382
+ key: l.value,
383
+ label: l.label,
384
+ value: l.value
348
385
  }, null, 8, ["label", "value"]))), 128))
349
386
  ]),
350
387
  _: 1
351
388
  }, 8, ["modelValue"]),
352
- v(e(fe), {
389
+ v(a(xe), {
353
390
  style: { width: "100%" },
354
- loading: S.value,
391
+ loading: D.value,
355
392
  animated: ""
356
393
  }, {
357
- template: i(() => [
358
- v(e(K), {
394
+ template: c(() => [
395
+ v(a(ee), {
359
396
  variant: "text",
360
397
  style: { width: "100%", height: "2rem" }
361
398
  }),
362
- v(e(K), {
399
+ v(a(ee), {
363
400
  variant: "text",
364
401
  style: { width: "180px", height: "4rem", "margin-right": "4px" }
365
402
  }),
366
- v(e(K), {
403
+ v(a(ee), {
367
404
  variant: "text",
368
405
  style: { width: "calc( 100% - 184px)", height: "4rem" }
369
406
  }),
370
- v(e(K), {
407
+ v(a(ee), {
371
408
  variant: "text",
372
409
  style: { width: "180px", height: "8rem", "margin-right": "4px" }
373
410
  }),
374
- v(e(K), {
411
+ v(a(ee), {
375
412
  variant: "text",
376
413
  style: { width: "calc( 100% - 184px)", height: "8rem" }
377
414
  })
378
415
  ]),
379
- default: i(() => [
380
- v(e(pe), {
416
+ default: c(() => [
417
+ v(a(ke), {
381
418
  id: "printTable",
382
- data: x.value,
383
- "span-method": ee,
384
- onCellClick: r,
419
+ data: E.value,
420
+ "span-method": ae,
421
+ onCellClick: ne,
385
422
  border: "",
386
423
  style: { width: "100%" },
387
424
  size: "small",
388
- "empty-text": e(o)("vacationSchedule.emptyText")
425
+ "empty-text": a(n)("vacationSchedule.emptyText")
389
426
  }, {
390
- default: i(() => [
391
- v(e(q), {
392
- label: C.value !== "all" ? e(o)("vacationSchedule.title", { name: C.value }) : e(o)("vacationSchedule.enterprise") + ` ${h.value}`,
427
+ default: c(() => [
428
+ v(a(q), {
429
+ label: k.value !== "all" ? a(n)("vacationSchedule.title", { name: k.value }) : a(n)("vacationSchedule.enterprise") + ` ${u.value}`,
393
430
  align: "center",
394
431
  height: "34"
395
432
  }, {
396
- default: i(() => [
397
- v(e(q), {
398
- label: e(o)("vacationSchedule.jobTitle"),
433
+ default: c(() => [
434
+ v(a(q), {
435
+ label: a(n)("vacationSchedule.jobTitle"),
399
436
  width: "180",
400
437
  align: "center"
401
438
  }, {
402
- default: i((a) => [
403
- V(k(x.value[a.$index].jobTitle), 1)
439
+ default: c((l) => [
440
+ V(C(E.value[l.$index].jobTitle), 1)
404
441
  ]),
405
442
  _: 1
406
443
  }, 8, ["label"]),
407
- v(e(q), {
408
- label: e(o)("vacationSchedule.fullName"),
444
+ v(a(q), {
445
+ label: a(n)("vacationSchedule.fullName"),
409
446
  width: "180",
410
447
  align: "center"
411
448
  }, {
412
- default: i((a) => [
413
- V(k(x.value[a.$index].name), 1)
449
+ default: c((l) => [
450
+ V(C(E.value[l.$index].name), 1)
414
451
  ]),
415
452
  _: 1
416
453
  }, 8, ["label"]),
417
- v(e(q), {
418
- label: e(o)("vacationSchedule.personnelNumber"),
454
+ v(a(q), {
455
+ label: a(n)("vacationSchedule.personnelNumber"),
419
456
  align: "center"
420
457
  }, {
421
- default: i((a) => [
422
- V(k(x.value[a.$index].code), 1)
458
+ default: c((l) => [
459
+ V(C(E.value[l.$index].code), 1)
423
460
  ]),
424
461
  _: 1
425
462
  }, 8, ["label"]),
426
- v(e(q), {
427
- label: e(o)("vacationSchedule.vacation"),
463
+ v(a(q), {
464
+ label: a(n)("vacationSchedule.vacation"),
428
465
  align: "center"
429
466
  }, {
430
- default: i(() => [
431
- v(e(q), {
432
- label: e(o)("vacationSchedule.days"),
467
+ default: c(() => [
468
+ v(a(q), {
469
+ label: a(n)("vacationSchedule.days"),
433
470
  align: "center"
434
471
  }, {
435
- default: i((a) => [
436
- V(k(x.value[a.$index].count), 1)
472
+ default: c((l) => [
473
+ V(C(E.value[l.$index].count), 1)
437
474
  ]),
438
475
  _: 1
439
476
  }, 8, ["label"]),
440
- v(e(q), {
441
- label: e(o)("vacationSchedule.date"),
477
+ v(a(q), {
478
+ label: a(n)("vacationSchedule.date"),
442
479
  align: "center"
443
480
  }, {
444
- default: i((a) => [
445
- V(k(x.value[a.$index].dateStart), 1)
481
+ default: c((l) => [
482
+ V(C(E.value[l.$index].dateStart), 1)
446
483
  ]),
447
484
  _: 1
448
485
  }, 8, ["label"]),
449
- v(e(q), {
450
- label: e(o)("vacationSchedule.endDate"),
486
+ v(a(q), {
487
+ label: a(n)("vacationSchedule.endDate"),
451
488
  align: "center"
452
489
  }, {
453
- default: i((a) => [
454
- V(k(x.value[a.$index].dateEnd), 1)
490
+ default: c((l) => [
491
+ V(C(E.value[l.$index].dateEnd), 1)
455
492
  ]),
456
493
  _: 1
457
494
  }, 8, ["label"])
458
495
  ]),
459
496
  _: 1
460
497
  }, 8, ["label"]),
461
- v(e(q), {
462
- label: e(o)("vacationSchedule.note"),
498
+ v(a(q), {
499
+ label: a(n)("vacationSchedule.note"),
463
500
  align: "center"
464
501
  }, {
465
- default: i((a) => [
466
- v(e(he), {
467
- modelValue: w.value[x.value[a.$index].ids].days[x.value[a.$index].key].note,
468
- "onUpdate:modelValue": (I) => w.value[x.value[a.$index].ids].days[x.value[a.$index].key].note = I,
502
+ default: c((l) => [
503
+ v(a(Ee), {
504
+ modelValue: w.value[E.value[l.$index].ids].days[E.value[l.$index].key].note,
505
+ "onUpdate:modelValue": (S) => w.value[E.value[l.$index].ids].days[E.value[l.$index].key].note = S,
469
506
  style: { width: "100%" },
470
507
  placeholder: " ",
471
508
  class: "noBorder",
472
- onBlur: (I) => g(x.value[a.$index].ids)
509
+ onBlur: (S) => t(E.value[l.$index].ids)
473
510
  }, null, 8, ["modelValue", "onUpdate:modelValue", "onBlur"])
474
511
  ]),
475
512
  _: 1
@@ -483,90 +520,90 @@ const xe = (j, M) => {
483
520
  ]),
484
521
  _: 1
485
522
  }, 8, ["loading"]),
486
- j.checkEdit ? (p(), E("div", je, [
487
- L.value ? z("", !0) : (p(), Y(e(F), {
523
+ A.checkEdit ? (h(), $("div", Le, [
524
+ J.value ? R("", !0) : (h(), B(a(F), {
488
525
  key: 0,
489
526
  type: "primary",
490
- onClick: l[3] || (l[3] = (a) => d.value = !0)
527
+ onClick: e[3] || (e[3] = (l) => s.value = !0)
491
528
  }, {
492
- default: i(() => [
493
- V(k(e(o)("vacationSchedule.sendInformation")), 1)
529
+ default: c(() => [
530
+ V(C(a(n)("vacationSchedule.sendInformation")), 1)
494
531
  ]),
495
532
  _: 1
496
533
  })),
497
- j.query === "confirm" ? (p(), Y(e(F), {
534
+ A.query === "confirm" ? (h(), B(a(F), {
498
535
  key: 1,
499
536
  type: "primary",
500
- onClick: l[4] || (l[4] = (a) => _(!0))
537
+ onClick: e[4] || (e[4] = (l) => i(!0))
501
538
  }, {
502
- default: i(() => [
503
- V(k(e(o)("vacationSchedule.agreeOn")), 1)
539
+ default: c(() => [
540
+ V(C(a(n)("vacationSchedule.agreeOn")), 1)
504
541
  ]),
505
542
  _: 1
506
- })) : z("", !0),
507
- j.query === "confirm" ? (p(), Y(e(F), {
543
+ })) : R("", !0),
544
+ A.query === "confirm" ? (h(), B(a(F), {
508
545
  key: 2,
509
546
  type: "primary",
510
- onClick: l[5] || (l[5] = (a) => _(!1))
547
+ onClick: e[5] || (e[5] = (l) => i(!1))
511
548
  }, {
512
- default: i(() => [
513
- V(k(e(o)("vacationSchedule.reject")), 1)
549
+ default: c(() => [
550
+ V(C(a(n)("vacationSchedule.reject")), 1)
514
551
  ]),
515
552
  _: 1
516
- })) : z("", !0)
517
- ])) : z("", !0),
518
- re((p(), Y(e(F), {
519
- disabled: H.value,
553
+ })) : R("", !0)
554
+ ])) : R("", !0),
555
+ be((h(), B(a(F), {
556
+ disabled: _.value,
520
557
  plain: "",
521
- onClick: t.exportToExcel,
558
+ onClick: T,
522
559
  style: { "margin-top": ".5rem" }
523
560
  }, {
524
- default: i(() => [
525
- V(k(e(o)("workSchedule.exportExcel")), 1)
561
+ default: c(() => [
562
+ V(C(a(n)("workSchedule.exportExcel")), 1)
526
563
  ]),
527
564
  _: 1
528
- }, 8, ["disabled", "onClick"])), [
529
- [b, H.value]
565
+ }, 8, ["disabled"])), [
566
+ [p, _.value]
530
567
  ]),
531
- v(e(ue), {
532
- title: e(o)("workSchedule.jobTitle"),
533
- modelValue: m.value,
534
- "onUpdate:modelValue": l[7] || (l[7] = (a) => m.value = a),
568
+ v(a(ve), {
569
+ title: a(n)("workSchedule.jobTitle"),
570
+ modelValue: g.value,
571
+ "onUpdate:modelValue": e[7] || (e[7] = (l) => g.value = l),
535
572
  width: "400px"
536
573
  }, {
537
- footer: i(() => [
538
- v(e(F), {
539
- onClick: l[6] || (l[6] = (a) => m.value = !1),
574
+ footer: c(() => [
575
+ v(a(F), {
576
+ onClick: e[6] || (e[6] = (l) => g.value = !1),
540
577
  size: "default"
541
578
  }, {
542
- default: i(() => [
543
- V(k(t.$t("workSchedule.cancel")), 1)
579
+ default: c(() => [
580
+ V(C(o.$t("workSchedule.cancel")), 1)
544
581
  ]),
545
582
  _: 1
546
583
  }),
547
- v(e(F), {
584
+ v(a(F), {
548
585
  size: "default",
549
586
  type: "primary",
550
- onClick: A
587
+ onClick: H
551
588
  }, {
552
- default: i(() => [
553
- V(k(t.$t("workSchedule.select")), 1)
589
+ default: c(() => [
590
+ V(C(o.$t("workSchedule.select")), 1)
554
591
  ]),
555
592
  _: 1
556
593
  })
557
594
  ]),
558
- default: i(() => [
559
- v(e(oe), {
560
- model: T.value,
595
+ default: c(() => [
596
+ v(a(ce), {
597
+ model: Y.value,
561
598
  autocomplete: "on"
562
599
  }, {
563
- default: i(() => [
564
- (p(!0), E(G, null, P(T.value, (a) => (p(), Y(e(me), null, {
565
- default: i(() => [
566
- v(e(ye), {
567
- modelValue: a.val,
568
- "onUpdate:modelValue": (I) => a.val = I,
569
- "active-text": a.activeText
600
+ default: c(() => [
601
+ (h(!0), $(O, null, W(Y.value, (l) => (h(), B(a($e), null, {
602
+ default: c(() => [
603
+ v(a(Te), {
604
+ modelValue: l.val,
605
+ "onUpdate:modelValue": (S) => l.val = S,
606
+ "active-text": l.activeText
570
607
  }, null, 8, ["modelValue", "onUpdate:modelValue", "active-text"])
571
608
  ]),
572
609
  _: 2
@@ -577,51 +614,51 @@ const xe = (j, M) => {
577
614
  ]),
578
615
  _: 1
579
616
  }, 8, ["title", "modelValue"]),
580
- v(e(ue), {
581
- title: e(o)("vacationSchedule.pleaseCoordinate"),
582
- modelValue: d.value,
583
- "onUpdate:modelValue": l[10] || (l[10] = (a) => d.value = a),
617
+ v(a(ve), {
618
+ title: a(n)("vacationSchedule.pleaseCoordinate"),
619
+ modelValue: s.value,
620
+ "onUpdate:modelValue": e[10] || (e[10] = (l) => s.value = l),
584
621
  width: "500px"
585
622
  }, {
586
- footer: i(() => [
587
- v(e(F), {
588
- onClick: l[9] || (l[9] = (a) => d.value = !1),
623
+ footer: c(() => [
624
+ v(a(F), {
625
+ onClick: e[9] || (e[9] = (l) => s.value = !1),
589
626
  size: "default"
590
627
  }, {
591
- default: i(() => [
592
- V(k(e(o)("workSchedule.cancel")), 1)
628
+ default: c(() => [
629
+ V(C(a(n)("workSchedule.cancel")), 1)
593
630
  ]),
594
631
  _: 1
595
632
  }),
596
- v(e(F), {
633
+ v(a(F), {
597
634
  size: "default",
598
635
  type: "primary",
599
- onClick: $
636
+ onClick: x
600
637
  }, {
601
- default: i(() => [
602
- V(k(e(o)("vacationSchedule.send")), 1)
638
+ default: c(() => [
639
+ V(C(a(n)("vacationSchedule.send")), 1)
603
640
  ]),
604
641
  _: 1
605
642
  })
606
643
  ]),
607
- default: i(() => [
608
- v(e(oe), {
609
- model: B.value,
644
+ default: c(() => [
645
+ v(a(ce), {
646
+ model: z.value,
610
647
  autocomplete: "on"
611
648
  }, {
612
- default: i(() => [
613
- v(e(ae), {
614
- modelValue: B.value.participants,
615
- "onUpdate:modelValue": l[8] || (l[8] = (a) => B.value.participants = a),
616
- placeholder: e(o)("vacationSchedule.fullName"),
649
+ default: c(() => [
650
+ v(a(de), {
651
+ modelValue: z.value.participants,
652
+ "onUpdate:modelValue": e[8] || (e[8] = (l) => z.value.participants = l),
653
+ placeholder: a(n)("vacationSchedule.fullName"),
617
654
  multiple: "",
618
655
  size: "default"
619
656
  }, {
620
- default: i(() => [
621
- (p(!0), E(G, null, P(R.value, (a) => (p(), Y(e(le), {
622
- key: a,
623
- label: a,
624
- value: a
657
+ default: c(() => [
658
+ (h(!0), $(O, null, W(P.value, (l) => (h(), B(a(ie), {
659
+ key: l,
660
+ label: l,
661
+ value: l
625
662
  }, null, 8, ["label", "value"]))), 128))
626
663
  ]),
627
664
  _: 1
@@ -632,46 +669,47 @@ const xe = (j, M) => {
632
669
  ]),
633
670
  _: 1
634
671
  }, 8, ["title", "modelValue"]),
635
- v(e(ge), {
636
- show: N.value,
637
- "onUpdate:show": l[14] || (l[14] = (a) => N.value = a),
638
- options: J.value
672
+ v(a(Ve), {
673
+ show: j.value,
674
+ "onUpdate:show": e[14] || (e[14] = (l) => j.value = l),
675
+ options: X.value
639
676
  }, {
640
- default: i(() => [
641
- v(e(te), {
642
- label: c.value.level === 3 && typeof c.value.count < "u" ? c.value.name + " " + c.value.count + " " + e(o)("vacationSchedule.day", c.value.count) : c.value.name,
677
+ default: c(() => [
678
+ v(a(se), {
679
+ label: m.value.level === 3 && typeof m.value.count < "u" ? m.value.name + " " + m.value.count + " " + a(n)("vacationSchedule.day", m.value.count) : m.value.name,
643
680
  disabled: ""
644
681
  }, null, 8, ["label"]),
645
- v(e(be)),
646
- c.value.level === 2 ? (p(), E("div", Ne, [
647
- c.value.length > 1 ? (p(), Y(e(te), {
682
+ v(a(Me)),
683
+ m.value.level === 2 ? (h(), $("div", We, [
684
+ m.value.length > 1 ? (h(), B(a(se), {
648
685
  key: 0,
649
- label: e(o)("vacationSchedule.deleteLast"),
650
- onClick: l[11] || (l[11] = (a) => u("delete"))
651
- }, null, 8, ["label"])) : z("", !0),
652
- c.value.add ? (p(), Y(e(te), {
686
+ label: a(n)("vacationSchedule.deleteLast"),
687
+ onClick: e[11] || (e[11] = (l) => Q("delete"))
688
+ }, null, 8, ["label"])) : R("", !0),
689
+ m.value.add ? (h(), B(a(se), {
653
690
  key: 1,
654
- label: e(o)("vacationSchedule.addVacation"),
655
- onClick: l[12] || (l[12] = (a) => u("add"))
656
- }, null, 8, ["label"])) : z("", !0)
657
- ])) : (p(), E("div", Be, [
658
- v(Fe, {
659
- data: c.value,
691
+ label: a(n)("vacationSchedule.addVacation"),
692
+ onClick: e[12] || (e[12] = (l) => Q("add"))
693
+ }, null, 8, ["label"])) : R("", !0)
694
+ ])) : (h(), $("div", Je, [
695
+ v(qe, {
696
+ data: m.value,
660
697
  range: "range",
661
- onInput: s
662
- }, null, 8, ["data"]),
698
+ limitation: { dateStart: "12.01." + u.value, dateEnd: "12.12." + u.value },
699
+ onInput: r
700
+ }, null, 8, ["data", "limitation"]),
663
701
  y("div", null, [
664
- v(e(F), {
665
- onClick: l[13] || (l[13] = (a) => N.value = !1)
702
+ v(a(F), {
703
+ onClick: e[13] || (e[13] = (l) => j.value = !1)
666
704
  }, {
667
- default: i(() => [
668
- V(k(e(o)("vacationSchedule.cancel")), 1)
705
+ default: c(() => [
706
+ V(C(a(n)("vacationSchedule.cancel")), 1)
669
707
  ]),
670
708
  _: 1
671
709
  }),
672
- v(e(F), { onClick: n }, {
673
- default: i(() => [
674
- V(k(e(o)("vacationSchedule.save")), 1)
710
+ v(a(F), { onClick: d }, {
711
+ default: c(() => [
712
+ V(C(a(n)("vacationSchedule.save")), 1)
675
713
  ]),
676
714
  _: 1
677
715
  })
@@ -685,5 +723,5 @@ const xe = (j, M) => {
685
723
  }
686
724
  };
687
725
  export {
688
- qe as default
726
+ ll as default
689
727
  };
@@ -1 +1 @@
1
- .wrapper[data-v-fef4c07c]{display:flex}.wrapper .month_year[data-v-fef4c07c]{display:flex;justify-content:space-around;align-items:center}.wrapper .month_year span:not(.text) button[data-v-fef4c07c]{font-size:1.3em}.wrapper>div[data-v-fef4c07c]:not(:first-child){margin-left:2rem}.wrapper button[data-v-fef4c07c]{height:30px;text-align:center;line-height:30px;cursor:pointer;background:none;border:none;border-radius:.2rem;transition:all .3s ease}.wrapper button[data-v-fef4c07c]:hover:not(.disabled):not(.active){color:var(--el-color-success)}.wrapper .week[data-v-fef4c07c]{border-bottom:1px solid var(--el-color-info);margin-bottom:.5rem}.wrapper .month[data-v-fef4c07c],.wrapper .week[data-v-fef4c07c]{width:250px;display:grid;grid-template-columns:1fr 1fr 1fr 1fr 1fr 1fr 1fr;gap:.2rem}.wrapper .month>button[data-v-fef4c07c],.wrapper .week>button[data-v-fef4c07c]{width:30px}.wrapper .month>button.disabled[data-v-fef4c07c],.wrapper .week>button.disabled[data-v-fef4c07c]{color:var(--el-color-info);cursor:not-allowed}.wrapper .month>button.preholiday[data-v-fef4c07c],.wrapper .week>button.preholiday[data-v-fef4c07c]{background-color:#ffe78070}.wrapper .month>button.weekend[data-v-fef4c07c],.wrapper .week>button.weekend[data-v-fef4c07c]{background-color:#ff808070}.wrapper .month>button.select[data-v-fef4c07c],.wrapper .week>button.select[data-v-fef4c07c]{background-color:#007bff70}.wrapper .month>button.holiday[data-v-fef4c07c],.wrapper .week>button.holiday[data-v-fef4c07c]{background-color:red}.wrapper .month>button.nowork[data-v-fef4c07c],.wrapper .week>button.nowork[data-v-fef4c07c]{background-color:red}.wrapper .month>button.active[data-v-fef4c07c],.wrapper .week>button.active[data-v-fef4c07c]{background-color:#007bff}.noBorder .el-input__wrapper{box-shadow:none}
1
+ .wrapper[data-v-531eb182]{display:flex}.wrapper .month_year[data-v-531eb182]{display:flex;justify-content:space-around;align-items:center}.wrapper .month_year span:not(.text) button[data-v-531eb182]{font-size:1.3em}.wrapper>div[data-v-531eb182]:not(:first-child){margin-left:2rem}.wrapper button[data-v-531eb182]{height:30px;text-align:center;line-height:30px;cursor:pointer;background:none;border:none;border-radius:.2rem;transition:all .3s ease}.wrapper button[data-v-531eb182]:hover:not(.disabled):not(.active){color:var(--el-color-success)}.wrapper .week[data-v-531eb182]{border-bottom:1px solid var(--el-color-info);margin-bottom:.5rem}.wrapper .month[data-v-531eb182],.wrapper .week[data-v-531eb182]{width:250px;display:grid;grid-template-columns:1fr 1fr 1fr 1fr 1fr 1fr 1fr;gap:.2rem}.wrapper .month>button[data-v-531eb182],.wrapper .week>button[data-v-531eb182]{width:30px}.wrapper .month>button.disabled[data-v-531eb182],.wrapper .week>button.disabled[data-v-531eb182]{color:var(--el-color-info);cursor:not-allowed}.wrapper .month>button.preholiday[data-v-531eb182],.wrapper .week>button.preholiday[data-v-531eb182]{background-color:#ffe78070}.wrapper .month>button.weekend[data-v-531eb182],.wrapper .week>button.weekend[data-v-531eb182]{background-color:#ff808070}.wrapper .month>button.select[data-v-531eb182],.wrapper .week>button.select[data-v-531eb182]{background-color:#007bff70}.wrapper .month>button.holiday[data-v-531eb182],.wrapper .week>button.holiday[data-v-531eb182]{background-color:red}.wrapper .month>button.nowork[data-v-531eb182],.wrapper .week>button.nowork[data-v-531eb182]{background-color:red}.wrapper .month>button.active[data-v-531eb182],.wrapper .week>button.active[data-v-531eb182]{background-color:#007bff}.noBorder .el-input__wrapper{box-shadow:none}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@studio-west/employees",
3
- "version": "0.3.0",
3
+ "version": "0.4.0",
4
4
  "files": [
5
5
  "dist"
6
6
  ],