@studio-west/employees 0.1.7 → 0.1.8

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