@studio-west/employees 0.0.10 → 0.1.1

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