@studio-west/employees 0.6.71 → 0.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,4 +1,4 @@
1
- "use strict";const e=require("vue"),ie=require("file-saver"),de=require("exceljs"),c=require("./index-uKIn9vG1.cjs"),se=require("vue-i18n"),d=require("element-plus"),X=require("@imengyu/vue3-context-menu");function ve(k){const r=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(k){for(const V in k)if(V!=="default"){const m=Object.getOwnPropertyDescriptor(k,V);Object.defineProperty(r,V,m.get?m:{enumerable:!0,get:()=>k[V]})}}return r.default=k,Object.freeze(r)}const ce=ve(de),me={class:"work"},ge={class:"nav"},he={style:{height:"100px",width:"100%",display:"inline-block"}},fe={style:{height:"100px",width:"100%",display:"inline-block"}},pe={key:0,class:"controls-container",style:{"margin-top":".5rem"}},ye={class:"label"},we={key:0,style:{padding:"0.5em 1.5em"}},Ce={key:1,style:{padding:"0.5em 1.5em"}},ke={__name:"WorkTable",props:{checkEdit:{type:Boolean,default:()=>!0},odata:Object,workSchedule:Object,fullName:{type:String,default:"Вы"},group:String,date:String},setup(k){const{t:r,d:V}=se.useI18n(),m=k,I=e.ref(!1),n=e.ref([]),q=e.ref(m.date?new Date(m.date+"T00:00:01").getMonth():new Date().getMonth()),O=e.ref(!1),T=e.ref([]),h=e.ref(new Date(new Date().getFullYear(),new Date().getMonth(),1)),u=e.ref([]),M=e.ref(0),p=e.ref(9),f=e.ref(8),H=e.ref(!1),$=e.ref(!1),P=e.ref("5"),A=e.ref(1),S=e.ref([]),W=e.ref([]),N=e.ref([]),R=e.ref([]),g=e.ref({name:"Имя",length:0,code:""}),z=e.ref(!1),L=e.ref({zIndex:3,minWidth:230,x:500,y:200}),b=e.ref({}),F=e.ref("100%");e.watch(S,async(t,l)=>{t!==l&&(N.value=[],H.value=!1,m.odata.personal.forEach(o=>{t.includes(o.divisionName)&&(N.value.some(s=>(s==null?void 0:s.activeText)===o.roleName)||N.value.push({val:!0,activeText:o.roleName}))}),G())}),e.watch(q,async t=>{let l=new Date().getMonth(),o=t===null?l:t-1;o=l-1<=o?o-l>=11?o-12:o:o+12,h.value=new Date(new Date().getFullYear(),o,1),Z()});const _=(t,l,o,s)=>{g.value.ids=t.ids,g.value.key=t.key,g.value.add=t.days.length>0&&t.days[t.days.length-1].cont,g.value.level=l.level,g.value.day=o.cellIndex,L.value.y=s.clientY,L.value.x=s.clientX,l.level===2&&l.no===0&&m.checkEdit&&(g.value.name=r("workSchedule.autocomplete"),z.value=!0),l.level===3&&o.cellIndex-l.no===1&&m.checkEdit&&(E(o.cellIndex,t.ids),g.value.name=r("workSchedule.modeSelection"),z.value=!0)},ee=({row:t,columnIndex:l})=>{if(!T.value||T.value.length===0||!O.value)return"";const o=new Date(new Date(h.value).getFullYear(),new Date(h.value).getMonth(),l).getTime()+1e3;for(let s of T.value){const{dateStart:v,dateEnd:a,code:y}=s;if(v&&a&&y===t.code&&l!==0&&l<=u.value.length){const x=new Date(c.parseDate(v)).getTime(),w=new Date(c.parseDate(a)).getTime();if(o>=x&&o<=w)return"vacation"}}return""},Z=()=>{var v,a,y,x;const t=new Date(h.value),l=new Date(t.getFullYear(),t.getMonth()+1,0).getDate();let o=[],s=0;for(let w=1;w<=l;w++){const C=c.parseTime(t.setDate(w),"{Y}-{m}-{dd}");s+=(v=b.value.nowork)!=null&&v.includes(C)||b.value.holidays.includes(C)?0:(a=b.value.preholidays)!=null&&a.includes(C)?7:8;const i=(y=b.value.nowork)!=null&&y.includes(C)?"nowork":b.value.holidays.includes(C)?"holiday":(x=b.value.preholidays)!=null&&x.includes(C)?"preholiday":"";o.push({day:w,holidays:i,weekday:V(new Date(t.getFullYear(),t.getMonth(),w),"day")})}M.value=s,u.value=o,m.odata.getPersonal({dismissed:"false"}).then(w=>{var C;S.value.length===0&&(S.value=[(C=w.find(i=>i.employeeName===m.fullName&&i.dismissalDate.length===0))==null?void 0:C.divisionName]),w.forEach((i,B)=>{W.value.some(D=>i.dismissalDate.length>0&&new Date(i.dismissalDate)<new Date(h.value)||(D==null?void 0:D.value)===i.divisionName)||W.value.push({value:i.divisionName,label:i.divisionName,key:B}),S.value.includes(i.divisionName)&&!N.value.some(D=>(D==null?void 0:D.activeText)===i.roleName)&&N.value.push({val:!0,activeText:i.roleName})}),G()})},le=e.computed(()=>!n.value.some(t=>t.contHour!==M.value)),Q=(t,l)=>{var a,y,x;const o=new Date(h.value),s=`${o.getFullYear()}-${(o.getMonth()+1).toString().padStart(2,"0")}-${t.toString().padStart(2,"0")}`,v=(a=n.value[l])==null?void 0:a.days.findIndex(w=>w.day===s);return l===-1||v===-1?"":((y=n.value[l].days[v])==null?void 0:y.tips)+`
1
+ "use strict";const e=require("vue"),ie=require("file-saver"),de=require("exceljs"),c=require("./index-uKIn9vG1.cjs"),se=require("vue-i18n"),d=require("element-plus"),X=require("@imengyu/vue3-context-menu");function ve(k){const r=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(k){for(const V in k)if(V!=="default"){const m=Object.getOwnPropertyDescriptor(k,V);Object.defineProperty(r,V,m.get?m:{enumerable:!0,get:()=>k[V]})}}return r.default=k,Object.freeze(r)}const ce=ve(de),me={class:"work"},ge={class:"nav"},he={style:{height:"100px",width:"100%",display:"inline-block"}},fe={style:{height:"100px",width:"100%",display:"inline-block"}},pe={key:0,class:"controls-container",style:{"margin-top":".5rem"}},ye={class:"label"},we={key:0,style:{padding:"0.5em 1.5em"}},Ce={key:1,style:{padding:"0.5em 1.5em"}},ke={__name:"WorkTable",props:{checkEdit:{type:Boolean,default:()=>!0},odata:Object,workSchedule:Object,fullName:{type:String,default:"Вы"},groups:String,dat:String},setup(k){const{t:r,d:V}=se.useI18n(),m=k,I=e.ref(!1),n=e.ref([]),q=e.ref(m.dat?new Date(m.dat+"T00:00:01").getMonth():new Date().getMonth()),O=e.ref(!1),T=e.ref([]),h=e.ref(new Date(new Date().getFullYear(),new Date().getMonth(),1)),u=e.ref([]),M=e.ref(0),p=e.ref(9),f=e.ref(8),H=e.ref(!1),$=e.ref(!1),P=e.ref("5"),A=e.ref(1),S=e.ref([]),W=e.ref([]),N=e.ref([]),R=e.ref([]),g=e.ref({name:"Имя",length:0,code:""}),z=e.ref(!1),L=e.ref({zIndex:3,minWidth:230,x:500,y:200}),b=e.ref({}),F=e.ref("100%");e.watch(S,async(t,l)=>{t!==l&&(N.value=[],H.value=!1,m.odata.personal.forEach(o=>{t.includes(o.divisionName)&&(N.value.some(s=>(s==null?void 0:s.activeText)===o.roleName)||N.value.push({val:!0,activeText:o.roleName}))}),G())}),e.watch(q,async t=>{let l=new Date().getMonth(),o=t===null?l:t-1;o=l-1<=o?o-l>=11?o-12:o:o+12,h.value=new Date(new Date().getFullYear(),o,1),Z()});const _=(t,l,o,s)=>{g.value.ids=t.ids,g.value.key=t.key,g.value.add=t.days.length>0&&t.days[t.days.length-1].cont,g.value.level=l.level,g.value.day=o.cellIndex,L.value.y=s.clientY,L.value.x=s.clientX,l.level===2&&l.no===0&&m.checkEdit&&(g.value.name=r("workSchedule.autocomplete"),z.value=!0),l.level===3&&o.cellIndex-l.no===1&&m.checkEdit&&(E(o.cellIndex,t.ids),g.value.name=r("workSchedule.modeSelection"),z.value=!0)},ee=({row:t,columnIndex:l})=>{if(!T.value||T.value.length===0||!O.value)return"";const o=new Date(new Date(h.value).getFullYear(),new Date(h.value).getMonth(),l).getTime()+1e3;for(let s of T.value){const{dateStart:v,dateEnd:a,code:y}=s;if(v&&a&&y===t.code&&l!==0&&l<=u.value.length){const x=new Date(c.parseDate(v)).getTime(),w=new Date(c.parseDate(a)).getTime();if(o>=x&&o<=w)return"vacation"}}return""},Z=()=>{var v,a,y,x;const t=new Date(h.value),l=new Date(t.getFullYear(),t.getMonth()+1,0).getDate();let o=[],s=0;for(let w=1;w<=l;w++){const C=c.parseTime(t.setDate(w),"{Y}-{m}-{dd}");s+=(v=b.value.nowork)!=null&&v.includes(C)||b.value.holidays.includes(C)?0:(a=b.value.preholidays)!=null&&a.includes(C)?7:8;const i=(y=b.value.nowork)!=null&&y.includes(C)?"nowork":b.value.holidays.includes(C)?"holiday":(x=b.value.preholidays)!=null&&x.includes(C)?"preholiday":"";o.push({day:w,holidays:i,weekday:V(new Date(t.getFullYear(),t.getMonth(),w),"day")})}M.value=s,u.value=o,m.odata.getPersonal({dismissed:"false"}).then(w=>{var C;S.value.length===0&&(S.value=[(C=w.find(i=>i.employeeName===m.fullName&&i.dismissalDate.length===0))==null?void 0:C.divisionName]),w.forEach((i,B)=>{W.value.some(D=>i.dismissalDate.length>0&&new Date(i.dismissalDate)<new Date(h.value)||(D==null?void 0:D.value)===i.divisionName)||W.value.push({value:i.divisionName,label:i.divisionName,key:B}),S.value.includes(i.divisionName)&&!N.value.some(D=>(D==null?void 0:D.activeText)===i.roleName)&&N.value.push({val:!0,activeText:i.roleName})}),G()})},le=e.computed(()=>!n.value.some(t=>t.contHour!==M.value)),Q=(t,l)=>{var a,y,x;const o=new Date(h.value),s=`${o.getFullYear()}-${(o.getMonth()+1).toString().padStart(2,"0")}-${t.toString().padStart(2,"0")}`,v=(a=n.value[l])==null?void 0:a.days.findIndex(w=>w.day===s);return l===-1||v===-1?"":((y=n.value[l].days[v])==null?void 0:y.tips)+`
2
2
  `+((x=n.value[l].days[v])==null?void 0:x.time)},G=()=>{n.value=[],R.value=[],T.value=[],m.odata.personal.forEach(t=>{if(S.value.includes(t.divisionName)&&N.value.some(l=>l.val&&l.activeText===t.roleName)&&(t.dismissalDate.length===0||new Date(t.dismissalDate)>new Date(h.value))){let l=c.byInitials(t.employeeName);n.value.push({name:l+" ("+t.roleName+")",days:[],contHour:0,code:t.employeeKey,id:!1})}}),n.value.sort((t,l)=>t.name<l.name?-1:t.name>l.name?1:0),n.value.forEach((t,l)=>{t.ids=l,R.value.push(t.code)}),m.workSchedule.getUsersYear({code:R.value,year:new Date(h.value).getFullYear()}).then(t=>{t.forEach(l=>{l.dateStart&&T.value.push({code:l.code,dateStart:l.dateStart,dateEnd:l.dateEnd})}),te(),$.value=!1})},te=()=>{m.workSchedule.getWorkSchedule({code:R.value,date:c.parseTime(new Date(h.value),"{Y}-{m}-{dd}")}).then(t=>{t.forEach((l,o)=>{l!==null&&(n.value[o].days=l.data.days,n.value[o].id=l.id)}),Y()})},Y=()=>{n.value.forEach(t=>{t.contHour=t.days.reduce((l,o)=>l+o.time,0)})},ae=t=>{n.value[t].days=[],Y()},ne=t=>{switch(P.value){case"5":for(let l=A.value;l<=u.value.length;l++)u.value[l-1].holidays===""&&E(l,t,!0),u.value[l-1].holidays==="preholiday"&&(f.value-=1,E(l,t,!0),f.value+=1);break;case"2x2":for(let l=A.value;l<=u.value.length;l+=4)E(l,t,!0),l+1<=u.value.length&&E(l+1,t,!0);break;case"2x5":for(let l=A.value;l<=u.value.length;l+=7)for(let o=l;o<l+5&&o<=u.value.length;o++)u.value[o-1].holidays==="preholiday"?(f.value-=1,E(o,t,!0),f.value+=1):E(o,t,!0);break}},E=(t,l,o=!1)=>{const{date:s,ind:v}=j(t,l);v===-1?(n.value[l].days.push({day:s,time:f.value,tips:`(${p.value}:00 - ${f.value>=22?p.value+f.value+2:p.value+f.value+1}:00)`}),Y()):o||(f.value=n.value[l].days[v].time,p.value=parseInt(n.value[l].days[v].tips.slice(1,-12)))},oe=(t,l)=>{const{ind:o}=j(t,l);n.value[l].days.splice(o,1),Y(),document.querySelector(".app-main").click()},K=(t,l)=>{const{date:o,ind:s}=j(t,l);n.value[l].days[s]={day:o,time:f.value,tips:`(${p.value}:00 - ${f.value>=22?p.value+f.value+2:p.value+f.value+1}:00)`},Y()},j=(t,l)=>{var v;const o=c.parseTime(new Date(h.value).setDate(t),"{Y}-{m}-{dd}"),s=(v=n.value[l])==null?void 0:v.days.findIndex(a=>a.day===o);return{date:o,ind:s}},ue=async()=>{var C;I.value=!0;const t=new ce.Workbook,l=t.addWorksheet(V(h.value,"month"),{pageSetup:{paperSize:9,orientation:"landscape",fitToPage:!0}}),o={vertical:"middle",horizontal:"center"},s={top:{style:"thin"},left:{style:"thin"},bottom:{style:"thin"},right:{style:"thin"}},v={vertical:"middle",horizontal:"center",wrapText:!0};l.mergeCells(`A1:${c.cellsDynamically("A1",u.value.length+6)}1`),l.mergeCells(`A2:${c.cellsDynamically("A2",u.value.length+6)}2`),l.mergeCells("A3:A4"),l.mergeCells(`B3:${c.cellsDynamically("B3",u.value.length)}3`),l.mergeCells(`${c.cellsDynamically("B3",u.value.length+1)}3:${c.cellsDynamically("B3",u.value.length+2)}3`),l.mergeCells(`${c.cellsDynamically("B3",u.value.length+3)}3:${c.cellsDynamically("B4",u.value.length+3)}4`),l.mergeCells(`${c.cellsDynamically("B3",u.value.length+4)}3:${c.cellsDynamically("B4",u.value.length+4)}4`),l.mergeCells(`${c.cellsDynamically("B3",u.value.length+5)}3:${c.cellsDynamically("B4",u.value.length+5)}4`),l.getCell("A1").value=r("workSchedule.firm"),l.getCell("A2").value=r("workSchedule.title",{name:S.value[0]})+V(h.value,"month")+` ${new Date(h.value).getFullYear()}`,l.getCell("A3").value=r("workSchedule.month"),l.getCell("B3").value=r("workSchedule.numbersMonth"),l.getCell(3,u.value.length+2).value=r("workSchedule.onSchedule"),l.getCell(3,u.value.length+4).value=r("workSchedule.acquainted"),l.getCell(3,u.value.length+5).value=r("workSchedule.decryption"),l.getCell(3,u.value.length+6).value=r("workSchedule.date"),l.getCell(4,u.value.length+2).value=r("workSchedule.days"),l.getCell(4,u.value.length+3).value=`${r("workSchedule.hours")} (${M.value})`;for(let i=2;i<=u.value.length+1;i++)l.getCell(4,i).value=u.value[i-2].weekday+`
3
- `+(i-1),l.getColumn(i).width=6,l.getColumn(i).alignment=v,l.getCell(4,i).border=s;l.getRow(1).height=40,l.getRow(2).height=30,l.getRow(3).height=20,l.getColumn(1).width=15,l.getColumn(u.value.length+2).width=5,l.getColumn(u.value.length+3).width=6,l.getColumn(u.value.length+4).width=13,l.getColumn(u.value.length+5).width=13,l.getColumn(u.value.length+6).width=13,l.getColumn(1).alignment=v,l.getCell("A2").alignment=o,l.getCell("A3").alignment=o,l.getCell("B3").alignment=o,l.getCell(3,u.value.length+2).alignment=o,l.getColumn(u.value.length+2).alignment=v,l.getColumn(u.value.length+3).alignment=v,l.getColumn(u.value.length+4).alignment=v,l.getColumn(u.value.length+5).alignment=v,l.getColumn(u.value.length+6).alignment=o,l.getCell("A3").border=s,l.getCell("B3").border=s,l.getCell(3,u.value.length+2).border=s,l.getCell(4,u.value.length+2).border=s,l.getCell(3,u.value.length+4).border=s,l.getCell(3,u.value.length+5).border=s,l.getCell(3,u.value.length+6).border=s,l.getCell(4,u.value.length+3).border=s;let a=0;for(const i of n.value){let B=[i.name];for(let U=1;U<=u.value.length;U++){const{ind:J}=j(U,a);J!==-1?B[U]=`${i.days[J].time} ${i.days[J].tips}`:B[U]=" "}B.push(((C=i.days)==null?void 0:C.length)||" ",i.contHour||0);const D=l.addRow(B);D.border=s,a++}let y="Щербина Е. В.";m.odata.personal.forEach(i=>{i.roleName==="Начальник отдела правовой и кадровой работы"&&(i.dismissalDate.length===0||new Date(i.dismissalDate)>new Date(thisMonth.value))&&(y=i.employeeName)}),l.mergeCells(`A${n.value.length+6}:P${n.value.length+6}`),l.mergeCells(`Q${n.value.length+6}:AG${n.value.length+6}`),l.mergeCells(`B${n.value.length+8}:E${n.value.length+8}`),l.mergeCells(`F${n.value.length+8}:L${n.value.length+8}`),l.mergeCells(`M${n.value.length+8}:P${n.value.length+8}`),l.mergeCells(`S${n.value.length+8}:V${n.value.length+8}`),l.mergeCells(`W${n.value.length+8}:AC${n.value.length+8}`),l.mergeCells(`AD${n.value.length+8}:AG${n.value.length+8}`),l.mergeCells(`Z${n.value.length+9}:AA${n.value.length+9}`),l.getCell(`A${n.value.length+6}`).value=r("workSchedule.byInitials"),l.getCell(`Q${n.value.length+6}`).value=r("workSchedule.supervisorHR"),l.getCell(`B${n.value.length+8}`).value=r("workSchedule.compiled")+":",l.getCell(`S${n.value.length+8}`).value=r("workSchedule.approved")+":",l.getCell(`M${n.value.length+8}`).value=c.byInitials(m.fullName),l.getCell(`AD${n.value.length+8}`).value=c.byInitials(y),l.getCell(`Z${n.value.length+9}`).value=r("workSchedule.printPlace"),l.getCell(`A${n.value.length+6}`).alignment={vertical:"middle",horizontal:"right"},l.getCell(`Q${n.value.length+6}`).alignment={vertical:"middle",horizontal:"right"},l.getCell(`B${n.value.length+8}`).alignment={vertical:"middle",horizontal:"right"},l.getCell(`F${n.value.length+8}`).alignment={vertical:"middle",horizontal:"right"},l.getCell(`M${n.value.length+8}`).alignment={vertical:"middle",horizontal:"left"},l.getCell(`AD${n.value.length+8}`).alignment={vertical:"middle",horizontal:"left"},l.getCell(`Z${n.value.length+9}`).alignment=o,l.getCell(`F${n.value.length+8}`).border={bottom:{style:"thin"}},l.getCell(`W${n.value.length+8}`).border={bottom:{style:"thin"}};const x="export_"+c.parseTime(Date.now(),"{dd}.{m}.{Y}")+".xlsx",w=await t.xlsx.writeBuffer();ie.saveAs(new Blob([w]),x),I.value=!1},re=async()=>{H.value||m.workSchedule.addWorkSchedule({data:n.value,date:c.parseTime(new Date(h.value),"{Y}-{m}-{dd}"),group:S.value[0]}).then(t=>H.value=t)};return console.log("props.group",m.group),console.log("props.date",m.date),m.group&&(S.value[0]=m.group),m.date&&(h.value=new Date(m.date+"T00:00:01")),c.holidays().then(t=>{b.value=t,Z()}),(t,l)=>{const o=e.resolveComponent("el-date-picker"),s=e.resolveComponent("svg-icon"),v=e.resolveDirective("loading");return e.openBlock(),e.createElementBlock("div",me,[e.createElementVNode("div",ge,[k.checkEdit?(e.openBlock(),e.createBlock(e.unref(d.ElSelect),{key:0,modelValue:S.value,"onUpdate:modelValue":l[0]||(l[0]=a=>S.value=a),multiple:"","collapse-tags":"","collapse-tags-tooltip":"",placeholder:"Select",style:{width:"240px"}},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(W.value,a=>(e.openBlock(),e.createBlock(e.unref(d.ElOption),{key:a.key,label:a.label,value:a.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])):e.createCommentVNode("",!0),k.checkEdit?(e.openBlock(),e.createBlock(e.unref(d.ElButton),{key:1,plain:"",onClick:l[1]||(l[1]=a=>$.value=!0)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(r)("workSchedule.jobTitle")),1)]),_:1})):e.createCommentVNode("",!0),e.createVNode(o,{modelValue:q.value,"onUpdate:modelValue":l[2]||(l[2]=a=>q.value=a),type:"month",placeholder:"Выберите месяц",format:"MMM","value-format":"M"},null,8,["modelValue"]),l[21]||(l[21]=e.createElementVNode("div",{class:"expander"},null,-1)),e.createVNode(e.unref(d.ElSwitch),{modelValue:F.value,"onUpdate:modelValue":l[3]||(l[3]=a=>F.value=a),"active-text":t.$t("bids.currentHeight"),"active-value":"100%","inactive-value":"calc(100vh - var(--el-component-size)*5 - var(--el-main-padding)*2 - var(--header-height))"},null,8,["modelValue","active-text"]),e.createVNode(e.unref(d.ElSwitch),{modelValue:O.value,"onUpdate:modelValue":l[4]||(l[4]=a=>O.value=a),"active-text":"Отпуска","active-value":!0,"inactive-value":!1},null,8,["modelValue"])]),e.createVNode(e.unref(d.ElTable),{id:"printTable",data:n.value,style:{width:"100%"},"max-height":F.value,size:"small",align:"center",onCellClick:_,"empty-text":e.unref(r)("workSchedule.emptyText"),"cell-class-name":ee},{default:e.withCtx(()=>[e.createVNode(e.unref(d.ElTableColumn),{label:e.unref(r)("workSchedule.title",{name:S.value[0]})+e.unref(V)(h.value,"month")+` ${new Date(h.value).getFullYear()}`,align:"center",height:"34"},{default:e.withCtx(()=>[e.createVNode(e.unref(d.ElTableColumn),{label:e.unref(r)("workSchedule.month"),width:"180",align:"center",fixed:F.value!=="100%"},{default:e.withCtx(a=>[e.createElementVNode("div",he,e.toDisplayString(n.value[a.$index].name),1)]),_:1},8,["label","fixed"]),e.createVNode(e.unref(d.ElTableColumn),{label:e.unref(r)("workSchedule.numbersMonth"),align:"center"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(u.value,a=>(e.openBlock(),e.createBlock(e.unref(d.ElTableColumn),{key:a.day,width:"46","class-name":a.holidays,align:"center",label:a.weekday+`
3
+ `+(i-1),l.getColumn(i).width=6,l.getColumn(i).alignment=v,l.getCell(4,i).border=s;l.getRow(1).height=40,l.getRow(2).height=30,l.getRow(3).height=20,l.getColumn(1).width=15,l.getColumn(u.value.length+2).width=5,l.getColumn(u.value.length+3).width=6,l.getColumn(u.value.length+4).width=13,l.getColumn(u.value.length+5).width=13,l.getColumn(u.value.length+6).width=13,l.getColumn(1).alignment=v,l.getCell("A2").alignment=o,l.getCell("A3").alignment=o,l.getCell("B3").alignment=o,l.getCell(3,u.value.length+2).alignment=o,l.getColumn(u.value.length+2).alignment=v,l.getColumn(u.value.length+3).alignment=v,l.getColumn(u.value.length+4).alignment=v,l.getColumn(u.value.length+5).alignment=v,l.getColumn(u.value.length+6).alignment=o,l.getCell("A3").border=s,l.getCell("B3").border=s,l.getCell(3,u.value.length+2).border=s,l.getCell(4,u.value.length+2).border=s,l.getCell(3,u.value.length+4).border=s,l.getCell(3,u.value.length+5).border=s,l.getCell(3,u.value.length+6).border=s,l.getCell(4,u.value.length+3).border=s;let a=0;for(const i of n.value){let B=[i.name];for(let U=1;U<=u.value.length;U++){const{ind:J}=j(U,a);J!==-1?B[U]=`${i.days[J].time} ${i.days[J].tips}`:B[U]=" "}B.push(((C=i.days)==null?void 0:C.length)||" ",i.contHour||0);const D=l.addRow(B);D.border=s,a++}let y="Щербина Е. В.";m.odata.personal.forEach(i=>{i.roleName==="Начальник отдела правовой и кадровой работы"&&(i.dismissalDate.length===0||new Date(i.dismissalDate)>new Date(thisMonth.value))&&(y=i.employeeName)}),l.mergeCells(`A${n.value.length+6}:P${n.value.length+6}`),l.mergeCells(`Q${n.value.length+6}:AG${n.value.length+6}`),l.mergeCells(`B${n.value.length+8}:E${n.value.length+8}`),l.mergeCells(`F${n.value.length+8}:L${n.value.length+8}`),l.mergeCells(`M${n.value.length+8}:P${n.value.length+8}`),l.mergeCells(`S${n.value.length+8}:V${n.value.length+8}`),l.mergeCells(`W${n.value.length+8}:AC${n.value.length+8}`),l.mergeCells(`AD${n.value.length+8}:AG${n.value.length+8}`),l.mergeCells(`Z${n.value.length+9}:AA${n.value.length+9}`),l.getCell(`A${n.value.length+6}`).value=r("workSchedule.byInitials"),l.getCell(`Q${n.value.length+6}`).value=r("workSchedule.supervisorHR"),l.getCell(`B${n.value.length+8}`).value=r("workSchedule.compiled")+":",l.getCell(`S${n.value.length+8}`).value=r("workSchedule.approved")+":",l.getCell(`M${n.value.length+8}`).value=c.byInitials(m.fullName),l.getCell(`AD${n.value.length+8}`).value=c.byInitials(y),l.getCell(`Z${n.value.length+9}`).value=r("workSchedule.printPlace"),l.getCell(`A${n.value.length+6}`).alignment={vertical:"middle",horizontal:"right"},l.getCell(`Q${n.value.length+6}`).alignment={vertical:"middle",horizontal:"right"},l.getCell(`B${n.value.length+8}`).alignment={vertical:"middle",horizontal:"right"},l.getCell(`F${n.value.length+8}`).alignment={vertical:"middle",horizontal:"right"},l.getCell(`M${n.value.length+8}`).alignment={vertical:"middle",horizontal:"left"},l.getCell(`AD${n.value.length+8}`).alignment={vertical:"middle",horizontal:"left"},l.getCell(`Z${n.value.length+9}`).alignment=o,l.getCell(`F${n.value.length+8}`).border={bottom:{style:"thin"}},l.getCell(`W${n.value.length+8}`).border={bottom:{style:"thin"}};const x="export_"+c.parseTime(Date.now(),"{dd}.{m}.{Y}")+".xlsx",w=await t.xlsx.writeBuffer();ie.saveAs(new Blob([w]),x),I.value=!1},re=async()=>{H.value||m.workSchedule.addWorkSchedule({data:n.value,date:c.parseTime(new Date(h.value),"{Y}-{m}-{dd}"),group:S.value[0]}).then(t=>H.value=t)};return console.log("props.groups",m.groups),console.log("props.dat",m.dat),m.groups&&(S.value[0]=m.groups),m.dat&&(h.value=new Date(m.dat+"T00:00:01")),c.holidays().then(t=>{b.value=t,Z()}),(t,l)=>{const o=e.resolveComponent("el-date-picker"),s=e.resolveComponent("svg-icon"),v=e.resolveDirective("loading");return e.openBlock(),e.createElementBlock("div",me,[e.createElementVNode("div",ge,[k.checkEdit?(e.openBlock(),e.createBlock(e.unref(d.ElSelect),{key:0,modelValue:S.value,"onUpdate:modelValue":l[0]||(l[0]=a=>S.value=a),multiple:"","collapse-tags":"","collapse-tags-tooltip":"",placeholder:"Select",style:{width:"240px"}},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(W.value,a=>(e.openBlock(),e.createBlock(e.unref(d.ElOption),{key:a.key,label:a.label,value:a.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])):e.createCommentVNode("",!0),k.checkEdit?(e.openBlock(),e.createBlock(e.unref(d.ElButton),{key:1,plain:"",onClick:l[1]||(l[1]=a=>$.value=!0)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(r)("workSchedule.jobTitle")),1)]),_:1})):e.createCommentVNode("",!0),e.createVNode(o,{modelValue:q.value,"onUpdate:modelValue":l[2]||(l[2]=a=>q.value=a),type:"month",placeholder:"Выберите месяц",format:"MMM","value-format":"M"},null,8,["modelValue"]),l[21]||(l[21]=e.createElementVNode("div",{class:"expander"},null,-1)),e.createVNode(e.unref(d.ElSwitch),{modelValue:F.value,"onUpdate:modelValue":l[3]||(l[3]=a=>F.value=a),"active-text":t.$t("bids.currentHeight"),"active-value":"100%","inactive-value":"calc(100vh - var(--el-component-size)*5 - var(--el-main-padding)*2 - var(--header-height))"},null,8,["modelValue","active-text"]),e.createVNode(e.unref(d.ElSwitch),{modelValue:O.value,"onUpdate:modelValue":l[4]||(l[4]=a=>O.value=a),"active-text":"Отпуска","active-value":!0,"inactive-value":!1},null,8,["modelValue"])]),e.createVNode(e.unref(d.ElTable),{id:"printTable",data:n.value,style:{width:"100%"},"max-height":F.value,size:"small",align:"center",onCellClick:_,"empty-text":e.unref(r)("workSchedule.emptyText"),"cell-class-name":ee},{default:e.withCtx(()=>[e.createVNode(e.unref(d.ElTableColumn),{label:e.unref(r)("workSchedule.title",{name:S.value[0]})+e.unref(V)(h.value,"month")+` ${new Date(h.value).getFullYear()}`,align:"center",height:"34"},{default:e.withCtx(()=>[e.createVNode(e.unref(d.ElTableColumn),{label:e.unref(r)("workSchedule.month"),width:"180",align:"center",fixed:F.value!=="100%"},{default:e.withCtx(a=>[e.createElementVNode("div",he,e.toDisplayString(n.value[a.$index].name),1)]),_:1},8,["label","fixed"]),e.createVNode(e.unref(d.ElTableColumn),{label:e.unref(r)("workSchedule.numbersMonth"),align:"center"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(u.value,a=>(e.openBlock(),e.createBlock(e.unref(d.ElTableColumn),{key:a.day,width:"46","class-name":a.holidays,align:"center",label:a.weekday+`
4
4
  `+a.day.toString(),prop:"vacation"},{default:e.withCtx(y=>[e.createElementVNode("div",fe,e.toDisplayString(Q(a.day,y.$index)||" "),1)]),_:2},1032,["class-name","label"]))),128))]),_:1},8,["label"]),e.createVNode(e.unref(d.ElTableColumn),{label:e.unref(r)("workSchedule.onSchedule"),align:"center",fixed:F.value!=="100%"?"right":!1},{default:e.withCtx(()=>[e.createVNode(e.unref(d.ElTableColumn),{label:e.unref(r)("workSchedule.days"),align:"center"},{default:e.withCtx(a=>[e.createTextVNode(e.toDisplayString(n.value[a.$index].days.length||0),1)]),_:1},8,["label"]),e.createVNode(e.unref(d.ElTableColumn),{label:`${e.unref(r)("workSchedule.hours")} ( ${M.value} )`,align:"center"},{default:e.withCtx(a=>[e.createElementVNode("div",{style:e.normalizeStyle(`color: ${M.value===a.row.contHour?"green":"red"};`)},e.toDisplayString(a.row.contHour),5)]),_:1},8,["label"])]),_:1},8,["label","fixed"])]),_:1},8,["label"])]),_:1},8,["data","max-height","empty-text"]),le.value&&k.checkEdit?(e.openBlock(),e.createElementBlock("div",pe,[e.createTextVNode(e.toDisplayString(e.unref(r)("workSchedule.chartsFilled"))+": ",1),H.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(e.unref(d.ElButton),{key:0,type:"primary",onClick:re},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(r)("workSchedule.confirm")),1)]),_:1})),l[22]||(l[22]=e.createTextVNode()),e.createElementVNode("span",null,e.toDisplayString(k.fullName),1)])):e.createCommentVNode("",!0),e.withDirectives((e.openBlock(),e.createBlock(e.unref(d.ElButton),{disabled:I.value,plain:"",onClick:ue,style:{"margin-top":".5rem"}},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(r)("workSchedule.exportExcel")),1)]),_:1},8,["disabled"])),[[v,I.value]]),e.createVNode(e.unref(d.ElDialog),{title:e.unref(r)("workSchedule.jobTitle"),modelValue:$.value,"onUpdate:modelValue":l[7]||(l[7]=a=>$.value=a),width:"400px"},{footer:e.withCtx(()=>[e.createVNode(e.unref(d.ElButton),{onClick:l[5]||(l[5]=a=>$.value=!1),size:"default"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.$t("workSchedule.cancel")),1)]),_:1}),e.createVNode(e.unref(d.ElButton),{size:"default",type:"primary",onClick:l[6]||(l[6]=a=>{G(),$.value=!1})},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.$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,a=>(e.openBlock(),e.createBlock(e.unref(d.ElFormItem),null,{default:e.withCtx(()=>[e.createVNode(e.unref(d.ElSwitch),{modelValue:a.val,"onUpdate:modelValue":y=>a.val=y,"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(X.ContextMenu),{show:z.value,"onUpdate:show":l[20]||(l[20]=a=>z.value=a),options:L.value},{default:e.withCtx(()=>[e.createElementVNode("div",{class:"mx-context-menu-item",onClick:l[8]||(l[8]=a=>z.value=!1)},[e.createElementVNode("span",ye,e.toDisplayString(g.value.name),1),l[23]||(l[23]=e.createElementVNode("div",{class:"expander"},null,-1)),e.createVNode(s,{"icon-class":"cross"})]),e.createVNode(e.unref(X.ContextMenuSeparator)),g.value.level===2?(e.openBlock(),e.createElementBlock("div",we,[e.createVNode(e.unref(d.ElRadioGroup),{modelValue:P.value,"onUpdate:modelValue":l[9]||(l[9]=a=>P.value=a),size:"small"},{default:e.withCtx(()=>[e.createVNode(e.unref(d.ElRadioButton),{label:e.unref(r)("workSchedule.Days5"),value:"5"},null,8,["label"]),e.createVNode(e.unref(d.ElRadioButton),{label:"2 Х 2",value:"2x2"}),e.createVNode(e.unref(d.ElRadioButton),{label:"2 Х 5",value:"2x5"})]),_:1},8,["modelValue"]),l[24]||(l[24]=e.createElementVNode("br",null,null,-1)),e.createElementVNode("span",null,e.toDisplayString(e.unref(r)("workSchedule.fromDate"))+":",1),e.createVNode(e.unref(d.ElSlider),{modelValue:A.value,"onUpdate:modelValue":l[10]||(l[10]=a=>A.value=a),step:1,min:1,max:u.value.length},null,8,["modelValue","max"]),e.createElementVNode("span",null,e.toDisplayString(e.unref(r)("workSchedule.with"))+":",1),e.createVNode(e.unref(d.ElSlider),{modelValue:p.value,"onUpdate:modelValue":l[11]||(l[11]=a=>p.value=a),step:1,min:0,max:19},null,8,["modelValue"]),e.createElementVNode("span",null,e.toDisplayString(e.unref(r)("workSchedule.duration"))+":",1),e.createVNode(e.unref(d.ElSlider),{modelValue:f.value,"onUpdate:modelValue":l[12]||(l[12]=a=>f.value=a),step:1,min:4,max:e.unref(c.clamp)(p.value!==1?23-p.value:21,4,22)},null,8,["modelValue","max"]),e.createVNode(e.unref(d.ElButton),{style:{"margin-top":".5rem"},size:"small",onClick:l[13]||(l[13]=a=>ne(g.value.ids))},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(r)("workSchedule.fillOut")),1)]),_:1}),e.createVNode(e.unref(d.ElButton),{style:{"margin-top":".5rem"},size:"small",onClick:l[14]||(l[14]=a=>ae(g.value.ids))},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(r)("workSchedule.clearRow")),1)]),_:1})])):(e.openBlock(),e.createElementBlock("div",Ce,[e.createElementVNode("div",null,e.toDisplayString(Q(g.value.day,g.value.ids)),1),l[25]||(l[25]=e.createElementVNode("br",null,null,-1)),e.createElementVNode("span",null,e.toDisplayString(e.unref(r)("workSchedule.with"))+":",1),e.createVNode(e.unref(d.ElSlider),{modelValue:p.value,"onUpdate:modelValue":l[15]||(l[15]=a=>p.value=a),step:1,min:0,max:19,onChange:l[16]||(l[16]=a=>K(g.value.day,g.value.ids))},null,8,["modelValue"]),e.createElementVNode("span",null,e.toDisplayString(e.unref(r)("workSchedule.duration"))+":",1),e.createVNode(e.unref(d.ElSlider),{modelValue:f.value,"onUpdate:modelValue":l[17]||(l[17]=a=>f.value=a),step:1,min:4,max:e.unref(c.clamp)(p.value!==1?23-p.value:21,4,22),onChange:l[18]||(l[18]=a=>K(g.value.day,g.value.ids))},null,8,["modelValue","max"]),e.createVNode(e.unref(d.ElButton),{style:{"margin-top":".5rem"},size:"small",onClick:l[19]||(l[19]=a=>oe(g.value.day,g.value.ids))},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(r)("workSchedule.delete")),1)]),_:1})]))]),_:1},8,["show","options"])])}}};module.exports=ke;
package/dist/WorkTable.js CHANGED
@@ -1,7 +1,7 @@
1
- import { ref as g, watch as pe, computed as Me, resolveComponent as fe, resolveDirective as Ne, createElementBlock as z, openBlock as S, createElementVNode as w, createVNode as s, createCommentVNode as ee, withDirectives as Ae, createBlock as F, unref as t, withCtx as m, Fragment as ie, renderList as re, createTextVNode as D, toDisplayString as h, normalizeStyle as Be } from "vue";
1
+ import { ref as g, watch as pe, computed as Me, resolveComponent as fe, resolveDirective as Ne, createElementBlock as z, openBlock as S, createElementVNode as w, createVNode as r, createCommentVNode as ee, withDirectives as Ae, createBlock as F, unref as t, withCtx as m, Fragment as ie, renderList as se, createTextVNode as D, toDisplayString as h, normalizeStyle as Be } from "vue";
2
2
  import { saveAs as Te } from "file-saver";
3
3
  import * as ze from "exceljs";
4
- import { p as Z, b as se, h as Fe, c as ye, a as we, d as V } from "./index-DaZTfcYO.js";
4
+ import { p as Z, b as re, h as Fe, c as ye, a as we, d as V } from "./index-DaZTfcYO.js";
5
5
  import { useI18n as Ye } from "vue-i18n";
6
6
  import { ElSelect as Ue, ElOption as He, ElButton as A, ElSwitch as ve, ElTable as Ie, ElTableColumn as Y, ElDialog as Re, ElForm as We, ElFormItem as Pe, ElRadioGroup as je, ElRadioButton as ge, ElSlider as q } from "element-plus";
7
7
  import { ContextMenu as Oe, ContextMenuSeparator as Ge } from "@imengyu/vue3-context-menu";
@@ -22,8 +22,8 @@ const Le = { class: "work" }, Ze = { class: "nav" }, qe = { style: { height: "10
22
22
  odata: Object,
23
23
  workSchedule: Object,
24
24
  fullName: { type: String, default: "Вы" },
25
- group: String,
26
- date: String
25
+ groups: String,
26
+ dat: String
27
27
  },
28
28
  setup(I) {
29
29
  const { t: d, d: J } = Ye(), c = I, Q = g(!1), n = g([
@@ -39,7 +39,7 @@ const Le = { class: "work" }, Ze = { class: "nav" }, qe = { style: { height: "10
39
39
  // code: '0000-00052'
40
40
  // ids: 1
41
41
  // }
42
- ]), le = g(c.date ? (/* @__PURE__ */ new Date(c.date + "T00:00:01")).getMonth() : (/* @__PURE__ */ new Date()).getMonth()), ae = g(!1), R = g([]), f = g(new Date((/* @__PURE__ */ new Date()).getFullYear(), (/* @__PURE__ */ new Date()).getMonth(), 1)), o = g([]), W = g(0), k = g(9), y = g(8), K = g(!1), U = g(!1), te = g("5"), P = g(1), x = g([]), ne = g([]), N = g([]), X = g([]), p = g({ name: "Имя", length: 0, code: "" }), j = g(!1), ue = g({
42
+ ]), le = g(c.dat ? (/* @__PURE__ */ new Date(c.dat + "T00:00:01")).getMonth() : (/* @__PURE__ */ new Date()).getMonth()), ae = g(!1), R = g([]), f = g(new Date((/* @__PURE__ */ new Date()).getFullYear(), (/* @__PURE__ */ new Date()).getMonth(), 1)), o = g([]), W = g(0), k = g(9), y = g(8), K = g(!1), U = g(!1), te = g("5"), P = g(1), x = g([]), ne = g([]), N = g([]), X = g([]), p = g({ name: "Имя", length: 0, code: "" }), j = g(!1), ue = g({
43
43
  zIndex: 3,
44
44
  minWidth: 230,
45
45
  x: 500,
@@ -47,19 +47,19 @@ const Le = { class: "work" }, Ze = { class: "nav" }, qe = { style: { height: "10
47
47
  }), B = g({}), O = g("100%");
48
48
  pe(x, async (l, e) => {
49
49
  l !== e && (N.value = [], K.value = !1, c.odata.personal.forEach((u) => {
50
- l.includes(u.divisionName) && (N.value.some((r) => (r == null ? void 0 : r.activeText) === u.roleName) || N.value.push({ val: !0, activeText: u.roleName }));
50
+ l.includes(u.divisionName) && (N.value.some((s) => (s == null ? void 0 : s.activeText) === u.roleName) || N.value.push({ val: !0, activeText: u.roleName }));
51
51
  }), oe());
52
52
  }), pe(le, async (l) => {
53
53
  let e = (/* @__PURE__ */ new Date()).getMonth(), u = l === null ? e : l - 1;
54
54
  u = e - 1 <= u ? u - e >= 11 ? u - 12 : u : u + 12, f.value = new Date((/* @__PURE__ */ new Date()).getFullYear(), u, 1), me();
55
55
  });
56
- const ke = (l, e, u, r) => {
57
- p.value.ids = l.ids, p.value.key = l.key, p.value.add = l.days.length > 0 && l.days[l.days.length - 1].cont, p.value.level = e.level, p.value.day = u.cellIndex, ue.value.y = r.clientY, ue.value.x = r.clientX, e.level === 2 && e.no === 0 && c.checkEdit && (p.value.name = d("workSchedule.autocomplete"), j.value = !0), e.level === 3 && u.cellIndex - e.no === 1 && c.checkEdit && (T(u.cellIndex, l.ids), p.value.name = d("workSchedule.modeSelection"), j.value = !0);
56
+ const ke = (l, e, u, s) => {
57
+ p.value.ids = l.ids, p.value.key = l.key, p.value.add = l.days.length > 0 && l.days[l.days.length - 1].cont, p.value.level = e.level, p.value.day = u.cellIndex, ue.value.y = s.clientY, ue.value.x = s.clientX, e.level === 2 && e.no === 0 && c.checkEdit && (p.value.name = d("workSchedule.autocomplete"), j.value = !0), e.level === 3 && u.cellIndex - e.no === 1 && c.checkEdit && (T(u.cellIndex, l.ids), p.value.name = d("workSchedule.modeSelection"), j.value = !0);
58
58
  }, Ce = ({ row: l, columnIndex: e }) => {
59
59
  if (!R.value || R.value.length === 0 || !ae.value) return "";
60
60
  const u = new Date(new Date(f.value).getFullYear(), new Date(f.value).getMonth(), e).getTime() + 1e3;
61
- for (let r of R.value) {
62
- const { dateStart: v, dateEnd: a, code: C } = r;
61
+ for (let s of R.value) {
62
+ const { dateStart: v, dateEnd: a, code: C } = s;
63
63
  if (v && a && C === l.code && e !== 0 && e <= o.value.length) {
64
64
  const E = new Date(we(v)).getTime(), $ = new Date(we(a)).getTime();
65
65
  if (u >= E && u <= $) return "vacation";
@@ -69,14 +69,14 @@ const Le = { class: "work" }, Ze = { class: "nav" }, qe = { style: { height: "10
69
69
  }, me = () => {
70
70
  var v, a, C, E;
71
71
  const l = new Date(f.value), e = new Date(l.getFullYear(), l.getMonth() + 1, 0).getDate();
72
- let u = [], r = 0;
72
+ let u = [], s = 0;
73
73
  for (let $ = 1; $ <= e; $++) {
74
74
  const b = Z(l.setDate($), "{Y}-{m}-{dd}");
75
- r += (v = B.value.nowork) != null && v.includes(b) || B.value.holidays.includes(b) ? 0 : (a = B.value.preholidays) != null && a.includes(b) ? 7 : 8;
75
+ s += (v = B.value.nowork) != null && v.includes(b) || B.value.holidays.includes(b) ? 0 : (a = B.value.preholidays) != null && a.includes(b) ? 7 : 8;
76
76
  const i = (C = B.value.nowork) != null && C.includes(b) ? "nowork" : B.value.holidays.includes(b) ? "holiday" : (E = B.value.preholidays) != null && E.includes(b) ? "preholiday" : "";
77
77
  u.push({ day: $, holidays: i, weekday: J(new Date(l.getFullYear(), l.getMonth(), $), "day") });
78
78
  }
79
- W.value = r, o.value = u, c.odata.getPersonal({ dismissed: "false" }).then(($) => {
79
+ W.value = s, o.value = u, c.odata.getPersonal({ dismissed: "false" }).then(($) => {
80
80
  var b;
81
81
  x.value.length === 0 && (x.value = [(b = $.find((i) => i.employeeName === c.fullName && i.dismissalDate.length === 0)) == null ? void 0 : b.divisionName]), $.forEach((i, H) => {
82
82
  ne.value.some((M) => i.dismissalDate.length > 0 && new Date(i.dismissalDate) < new Date(f.value) || (M == null ? void 0 : M.value) === i.divisionName) || ne.value.push({ value: i.divisionName, label: i.divisionName, key: H }), x.value.includes(i.divisionName) && !N.value.some((M) => (M == null ? void 0 : M.activeText) === i.roleName) && N.value.push({ val: !0, activeText: i.roleName });
@@ -84,13 +84,13 @@ const Le = { class: "work" }, Ze = { class: "nav" }, qe = { style: { height: "10
84
84
  });
85
85
  }, $e = Me(() => !n.value.some((l) => l.contHour !== W.value)), he = (l, e) => {
86
86
  var a, C, E;
87
- const u = new Date(f.value), r = `${u.getFullYear()}-${(u.getMonth() + 1).toString().padStart(2, "0")}-${l.toString().padStart(2, "0")}`, v = (a = n.value[e]) == null ? void 0 : a.days.findIndex(($) => $.day === r);
87
+ const u = new Date(f.value), s = `${u.getFullYear()}-${(u.getMonth() + 1).toString().padStart(2, "0")}-${l.toString().padStart(2, "0")}`, v = (a = n.value[e]) == null ? void 0 : a.days.findIndex(($) => $.day === s);
88
88
  return e === -1 || v === -1 ? "" : ((C = n.value[e].days[v]) == null ? void 0 : C.tips) + `
89
89
  ` + ((E = n.value[e].days[v]) == null ? void 0 : E.time);
90
90
  }, oe = () => {
91
91
  n.value = [], X.value = [], R.value = [], c.odata.personal.forEach((l) => {
92
92
  if (x.value.includes(l.divisionName) && N.value.some((e) => e.val && e.activeText === l.roleName) && (l.dismissalDate.length === 0 || new Date(l.dismissalDate) > new Date(f.value))) {
93
- let e = se(l.employeeName);
93
+ let e = re(l.employeeName);
94
94
  n.value.push({ name: e + " (" + l.roleName + ")", days: [], contHour: 0, code: l.employeeKey, id: !1 });
95
95
  }
96
96
  }), n.value.sort((l, e) => l.name < e.name ? -1 : l.name > e.name ? 1 : 0), n.value.forEach((l, e) => {
@@ -131,9 +131,9 @@ const Le = { class: "work" }, Ze = { class: "nav" }, qe = { style: { height: "10
131
131
  break;
132
132
  }
133
133
  }, T = (l, e, u = !1) => {
134
- const { date: r, ind: v } = _(l, e);
134
+ const { date: s, ind: v } = _(l, e);
135
135
  v === -1 ? (n.value[e].days.push({
136
- day: r,
136
+ day: s,
137
137
  time: y.value,
138
138
  tips: `(${k.value}:00 - ${y.value >= 22 ? k.value + y.value + 2 : k.value + y.value + 1}:00)`
139
139
  }), G()) : u || (y.value = n.value[e].days[v].time, k.value = parseInt(n.value[e].days[v].tips.slice(1, -12)));
@@ -141,25 +141,25 @@ const Le = { class: "work" }, Ze = { class: "nav" }, qe = { style: { height: "10
141
141
  const { ind: u } = _(l, e);
142
142
  n.value[e].days.splice(u, 1), G(), document.querySelector(".app-main").click();
143
143
  }, ce = (l, e) => {
144
- const { date: u, ind: r } = _(l, e);
145
- n.value[e].days[r] = {
144
+ const { date: u, ind: s } = _(l, e);
145
+ n.value[e].days[s] = {
146
146
  day: u,
147
147
  time: y.value,
148
148
  tips: `(${k.value}:00 - ${y.value >= 22 ? k.value + y.value + 2 : k.value + y.value + 1}:00)`
149
149
  }, G();
150
150
  }, _ = (l, e) => {
151
151
  var v;
152
- const u = Z(new Date(f.value).setDate(l), "{Y}-{m}-{dd}"), r = (v = n.value[e]) == null ? void 0 : v.days.findIndex((a) => a.day === u);
153
- return { date: u, ind: r };
152
+ const u = Z(new Date(f.value).setDate(l), "{Y}-{m}-{dd}"), s = (v = n.value[e]) == null ? void 0 : v.days.findIndex((a) => a.day === u);
153
+ return { date: u, ind: s };
154
154
  }, Ve = async () => {
155
155
  var b;
156
156
  Q.value = !0;
157
- const l = new ze.Workbook(), e = l.addWorksheet(J(f.value, "month"), { pageSetup: { paperSize: 9, orientation: "landscape", fitToPage: !0 } }), u = { vertical: "middle", horizontal: "center" }, r = { top: { style: "thin" }, left: { style: "thin" }, bottom: { style: "thin" }, right: { style: "thin" } }, v = { vertical: "middle", horizontal: "center", wrapText: !0 };
157
+ const l = new ze.Workbook(), e = l.addWorksheet(J(f.value, "month"), { pageSetup: { paperSize: 9, orientation: "landscape", fitToPage: !0 } }), u = { vertical: "middle", horizontal: "center" }, s = { top: { style: "thin" }, left: { style: "thin" }, bottom: { style: "thin" }, right: { style: "thin" } }, v = { vertical: "middle", horizontal: "center", wrapText: !0 };
158
158
  e.mergeCells(`A1:${V("A1", o.value.length + 6)}1`), e.mergeCells(`A2:${V("A2", o.value.length + 6)}2`), e.mergeCells("A3:A4"), e.mergeCells(`B3:${V("B3", o.value.length)}3`), e.mergeCells(`${V("B3", o.value.length + 1)}3:${V("B3", o.value.length + 2)}3`), e.mergeCells(`${V("B3", o.value.length + 3)}3:${V("B4", o.value.length + 3)}4`), e.mergeCells(`${V("B3", o.value.length + 4)}3:${V("B4", o.value.length + 4)}4`), e.mergeCells(`${V("B3", o.value.length + 5)}3:${V("B4", o.value.length + 5)}4`), e.getCell("A1").value = d("workSchedule.firm"), e.getCell("A2").value = d("workSchedule.title", { name: x.value[0] }) + J(f.value, "month") + ` ${new Date(f.value).getFullYear()}`, e.getCell("A3").value = d("workSchedule.month"), e.getCell("B3").value = d("workSchedule.numbersMonth"), e.getCell(3, o.value.length + 2).value = d("workSchedule.onSchedule"), e.getCell(3, o.value.length + 4).value = d("workSchedule.acquainted"), e.getCell(3, o.value.length + 5).value = d("workSchedule.decryption"), e.getCell(3, o.value.length + 6).value = d("workSchedule.date"), e.getCell(4, o.value.length + 2).value = d("workSchedule.days"), e.getCell(4, o.value.length + 3).value = `${d("workSchedule.hours")} (${W.value})`;
159
159
  for (let i = 2; i <= o.value.length + 1; i++)
160
160
  e.getCell(4, i).value = o.value[i - 2].weekday + `
161
- ` + (i - 1), e.getColumn(i).width = 6, e.getColumn(i).alignment = v, e.getCell(4, i).border = r;
162
- e.getRow(1).height = 40, e.getRow(2).height = 30, e.getRow(3).height = 20, e.getColumn(1).width = 15, e.getColumn(o.value.length + 2).width = 5, e.getColumn(o.value.length + 3).width = 6, e.getColumn(o.value.length + 4).width = 13, e.getColumn(o.value.length + 5).width = 13, e.getColumn(o.value.length + 6).width = 13, e.getColumn(1).alignment = v, e.getCell("A2").alignment = u, e.getCell("A3").alignment = u, e.getCell("B3").alignment = u, e.getCell(3, o.value.length + 2).alignment = u, e.getColumn(o.value.length + 2).alignment = v, e.getColumn(o.value.length + 3).alignment = v, e.getColumn(o.value.length + 4).alignment = v, e.getColumn(o.value.length + 5).alignment = v, e.getColumn(o.value.length + 6).alignment = u, e.getCell("A3").border = r, e.getCell("B3").border = r, e.getCell(3, o.value.length + 2).border = r, e.getCell(4, o.value.length + 2).border = r, e.getCell(3, o.value.length + 4).border = r, e.getCell(3, o.value.length + 5).border = r, e.getCell(3, o.value.length + 6).border = r, e.getCell(4, o.value.length + 3).border = r;
161
+ ` + (i - 1), e.getColumn(i).width = 6, e.getColumn(i).alignment = v, e.getCell(4, i).border = s;
162
+ e.getRow(1).height = 40, e.getRow(2).height = 30, e.getRow(3).height = 20, e.getColumn(1).width = 15, e.getColumn(o.value.length + 2).width = 5, e.getColumn(o.value.length + 3).width = 6, e.getColumn(o.value.length + 4).width = 13, e.getColumn(o.value.length + 5).width = 13, e.getColumn(o.value.length + 6).width = 13, e.getColumn(1).alignment = v, e.getCell("A2").alignment = u, e.getCell("A3").alignment = u, e.getCell("B3").alignment = u, e.getCell(3, o.value.length + 2).alignment = u, e.getColumn(o.value.length + 2).alignment = v, e.getColumn(o.value.length + 3).alignment = v, e.getColumn(o.value.length + 4).alignment = v, e.getColumn(o.value.length + 5).alignment = v, e.getColumn(o.value.length + 6).alignment = u, e.getCell("A3").border = s, e.getCell("B3").border = s, e.getCell(3, o.value.length + 2).border = s, e.getCell(4, o.value.length + 2).border = s, e.getCell(3, o.value.length + 4).border = s, e.getCell(3, o.value.length + 5).border = s, e.getCell(3, o.value.length + 6).border = s, e.getCell(4, o.value.length + 3).border = s;
163
163
  let a = 0;
164
164
  for (const i of n.value) {
165
165
  let H = [i.name];
@@ -169,21 +169,21 @@ const Le = { class: "work" }, Ze = { class: "nav" }, qe = { style: { height: "10
169
169
  }
170
170
  H.push(((b = i.days) == null ? void 0 : b.length) || " ", i.contHour || 0);
171
171
  const M = e.addRow(H);
172
- M.border = r, a++;
172
+ M.border = s, a++;
173
173
  }
174
174
  let C = "Щербина Е. В.";
175
175
  c.odata.personal.forEach((i) => {
176
176
  i.roleName === "Начальник отдела правовой и кадровой работы" && (i.dismissalDate.length === 0 || new Date(i.dismissalDate) > new Date(thisMonth.value)) && (C = i.employeeName);
177
- }), e.mergeCells(`A${n.value.length + 6}:P${n.value.length + 6}`), e.mergeCells(`Q${n.value.length + 6}:AG${n.value.length + 6}`), e.mergeCells(`B${n.value.length + 8}:E${n.value.length + 8}`), e.mergeCells(`F${n.value.length + 8}:L${n.value.length + 8}`), e.mergeCells(`M${n.value.length + 8}:P${n.value.length + 8}`), e.mergeCells(`S${n.value.length + 8}:V${n.value.length + 8}`), e.mergeCells(`W${n.value.length + 8}:AC${n.value.length + 8}`), e.mergeCells(`AD${n.value.length + 8}:AG${n.value.length + 8}`), e.mergeCells(`Z${n.value.length + 9}:AA${n.value.length + 9}`), e.getCell(`A${n.value.length + 6}`).value = d("workSchedule.byInitials"), e.getCell(`Q${n.value.length + 6}`).value = d("workSchedule.supervisorHR"), e.getCell(`B${n.value.length + 8}`).value = d("workSchedule.compiled") + ":", e.getCell(`S${n.value.length + 8}`).value = d("workSchedule.approved") + ":", e.getCell(`M${n.value.length + 8}`).value = se(c.fullName), e.getCell(`AD${n.value.length + 8}`).value = se(C), e.getCell(`Z${n.value.length + 9}`).value = d("workSchedule.printPlace"), e.getCell(`A${n.value.length + 6}`).alignment = { vertical: "middle", horizontal: "right" }, e.getCell(`Q${n.value.length + 6}`).alignment = { vertical: "middle", horizontal: "right" }, e.getCell(`B${n.value.length + 8}`).alignment = { vertical: "middle", horizontal: "right" }, e.getCell(`F${n.value.length + 8}`).alignment = { vertical: "middle", horizontal: "right" }, e.getCell(`M${n.value.length + 8}`).alignment = { vertical: "middle", horizontal: "left" }, e.getCell(`AD${n.value.length + 8}`).alignment = { vertical: "middle", horizontal: "left" }, e.getCell(`Z${n.value.length + 9}`).alignment = u, e.getCell(`F${n.value.length + 8}`).border = { bottom: { style: "thin" } }, e.getCell(`W${n.value.length + 8}`).border = { bottom: { style: "thin" } };
177
+ }), e.mergeCells(`A${n.value.length + 6}:P${n.value.length + 6}`), e.mergeCells(`Q${n.value.length + 6}:AG${n.value.length + 6}`), e.mergeCells(`B${n.value.length + 8}:E${n.value.length + 8}`), e.mergeCells(`F${n.value.length + 8}:L${n.value.length + 8}`), e.mergeCells(`M${n.value.length + 8}:P${n.value.length + 8}`), e.mergeCells(`S${n.value.length + 8}:V${n.value.length + 8}`), e.mergeCells(`W${n.value.length + 8}:AC${n.value.length + 8}`), e.mergeCells(`AD${n.value.length + 8}:AG${n.value.length + 8}`), e.mergeCells(`Z${n.value.length + 9}:AA${n.value.length + 9}`), e.getCell(`A${n.value.length + 6}`).value = d("workSchedule.byInitials"), e.getCell(`Q${n.value.length + 6}`).value = d("workSchedule.supervisorHR"), e.getCell(`B${n.value.length + 8}`).value = d("workSchedule.compiled") + ":", e.getCell(`S${n.value.length + 8}`).value = d("workSchedule.approved") + ":", e.getCell(`M${n.value.length + 8}`).value = re(c.fullName), e.getCell(`AD${n.value.length + 8}`).value = re(C), e.getCell(`Z${n.value.length + 9}`).value = d("workSchedule.printPlace"), e.getCell(`A${n.value.length + 6}`).alignment = { vertical: "middle", horizontal: "right" }, e.getCell(`Q${n.value.length + 6}`).alignment = { vertical: "middle", horizontal: "right" }, e.getCell(`B${n.value.length + 8}`).alignment = { vertical: "middle", horizontal: "right" }, e.getCell(`F${n.value.length + 8}`).alignment = { vertical: "middle", horizontal: "right" }, e.getCell(`M${n.value.length + 8}`).alignment = { vertical: "middle", horizontal: "left" }, e.getCell(`AD${n.value.length + 8}`).alignment = { vertical: "middle", horizontal: "left" }, e.getCell(`Z${n.value.length + 9}`).alignment = u, e.getCell(`F${n.value.length + 8}`).border = { bottom: { style: "thin" } }, e.getCell(`W${n.value.length + 8}`).border = { bottom: { style: "thin" } };
178
178
  const E = "export_" + Z(Date.now(), "{dd}.{m}.{Y}") + ".xlsx", $ = await l.xlsx.writeBuffer();
179
179
  Te(new Blob([$]), E), Q.value = !1;
180
180
  }, Ee = async () => {
181
181
  K.value || c.workSchedule.addWorkSchedule({ data: n.value, date: Z(new Date(f.value), "{Y}-{m}-{dd}"), group: x.value[0] }).then((l) => K.value = l);
182
182
  };
183
- return console.log("props.group", c.group), console.log("props.date", c.date), c.group && (x.value[0] = c.group), c.date && (f.value = /* @__PURE__ */ new Date(c.date + "T00:00:01")), Fe().then((l) => {
183
+ return console.log("props.groups", c.groups), console.log("props.dat", c.dat), c.groups && (x.value[0] = c.groups), c.dat && (f.value = /* @__PURE__ */ new Date(c.dat + "T00:00:01")), Fe().then((l) => {
184
184
  B.value = l, me();
185
185
  }), (l, e) => {
186
- const u = fe("el-date-picker"), r = fe("svg-icon"), v = Ne("loading");
186
+ const u = fe("el-date-picker"), s = fe("svg-icon"), v = Ne("loading");
187
187
  return S(), z("div", Le, [
188
188
  w("div", Ze, [
189
189
  I.checkEdit ? (S(), F(t(Ue), {
@@ -197,7 +197,7 @@ const Le = { class: "work" }, Ze = { class: "nav" }, qe = { style: { height: "10
197
197
  style: { width: "240px" }
198
198
  }, {
199
199
  default: m(() => [
200
- (S(!0), z(ie, null, re(ne.value, (a) => (S(), F(t(He), {
200
+ (S(!0), z(ie, null, se(ne.value, (a) => (S(), F(t(He), {
201
201
  key: a.key,
202
202
  label: a.label,
203
203
  value: a.value
@@ -215,7 +215,7 @@ const Le = { class: "work" }, Ze = { class: "nav" }, qe = { style: { height: "10
215
215
  ]),
216
216
  _: 1
217
217
  })) : ee("", !0),
218
- s(u, {
218
+ r(u, {
219
219
  modelValue: le.value,
220
220
  "onUpdate:modelValue": e[2] || (e[2] = (a) => le.value = a),
221
221
  type: "month",
@@ -224,14 +224,14 @@ const Le = { class: "work" }, Ze = { class: "nav" }, qe = { style: { height: "10
224
224
  "value-format": "M"
225
225
  }, null, 8, ["modelValue"]),
226
226
  e[21] || (e[21] = w("div", { class: "expander" }, null, -1)),
227
- s(t(ve), {
227
+ r(t(ve), {
228
228
  modelValue: O.value,
229
229
  "onUpdate:modelValue": e[3] || (e[3] = (a) => O.value = a),
230
230
  "active-text": l.$t("bids.currentHeight"),
231
231
  "active-value": "100%",
232
232
  "inactive-value": "calc(100vh - var(--el-component-size)*5 - var(--el-main-padding)*2 - var(--header-height))"
233
233
  }, null, 8, ["modelValue", "active-text"]),
234
- s(t(ve), {
234
+ r(t(ve), {
235
235
  modelValue: ae.value,
236
236
  "onUpdate:modelValue": e[4] || (e[4] = (a) => ae.value = a),
237
237
  "active-text": "Отпуска",
@@ -239,7 +239,7 @@ const Le = { class: "work" }, Ze = { class: "nav" }, qe = { style: { height: "10
239
239
  "inactive-value": !1
240
240
  }, null, 8, ["modelValue"])
241
241
  ]),
242
- s(t(Ie), {
242
+ r(t(Ie), {
243
243
  id: "printTable",
244
244
  data: n.value,
245
245
  style: { width: "100%" },
@@ -251,13 +251,13 @@ const Le = { class: "work" }, Ze = { class: "nav" }, qe = { style: { height: "10
251
251
  "cell-class-name": Ce
252
252
  }, {
253
253
  default: m(() => [
254
- s(t(Y), {
254
+ r(t(Y), {
255
255
  label: t(d)("workSchedule.title", { name: x.value[0] }) + t(J)(f.value, "month") + ` ${new Date(f.value).getFullYear()}`,
256
256
  align: "center",
257
257
  height: "34"
258
258
  }, {
259
259
  default: m(() => [
260
- s(t(Y), {
260
+ r(t(Y), {
261
261
  label: t(d)("workSchedule.month"),
262
262
  width: "180",
263
263
  align: "center",
@@ -268,12 +268,12 @@ const Le = { class: "work" }, Ze = { class: "nav" }, qe = { style: { height: "10
268
268
  ]),
269
269
  _: 1
270
270
  }, 8, ["label", "fixed"]),
271
- s(t(Y), {
271
+ r(t(Y), {
272
272
  label: t(d)("workSchedule.numbersMonth"),
273
273
  align: "center"
274
274
  }, {
275
275
  default: m(() => [
276
- (S(!0), z(ie, null, re(o.value, (a) => (S(), F(t(Y), {
276
+ (S(!0), z(ie, null, se(o.value, (a) => (S(), F(t(Y), {
277
277
  key: a.day,
278
278
  width: "46",
279
279
  "class-name": a.holidays,
@@ -290,13 +290,13 @@ const Le = { class: "work" }, Ze = { class: "nav" }, qe = { style: { height: "10
290
290
  ]),
291
291
  _: 1
292
292
  }, 8, ["label"]),
293
- s(t(Y), {
293
+ r(t(Y), {
294
294
  label: t(d)("workSchedule.onSchedule"),
295
295
  align: "center",
296
296
  fixed: O.value !== "100%" ? "right" : !1
297
297
  }, {
298
298
  default: m(() => [
299
- s(t(Y), {
299
+ r(t(Y), {
300
300
  label: t(d)("workSchedule.days"),
301
301
  align: "center"
302
302
  }, {
@@ -305,7 +305,7 @@ const Le = { class: "work" }, Ze = { class: "nav" }, qe = { style: { height: "10
305
305
  ]),
306
306
  _: 1
307
307
  }, 8, ["label"]),
308
- s(t(Y), {
308
+ r(t(Y), {
309
309
  label: `${t(d)("workSchedule.hours")} ( ${W.value} )`,
310
310
  align: "center"
311
311
  }, {
@@ -353,14 +353,14 @@ const Le = { class: "work" }, Ze = { class: "nav" }, qe = { style: { height: "10
353
353
  }, 8, ["disabled"])), [
354
354
  [v, Q.value]
355
355
  ]),
356
- s(t(Re), {
356
+ r(t(Re), {
357
357
  title: t(d)("workSchedule.jobTitle"),
358
358
  modelValue: U.value,
359
359
  "onUpdate:modelValue": e[7] || (e[7] = (a) => U.value = a),
360
360
  width: "400px"
361
361
  }, {
362
362
  footer: m(() => [
363
- s(t(A), {
363
+ r(t(A), {
364
364
  onClick: e[5] || (e[5] = (a) => U.value = !1),
365
365
  size: "default"
366
366
  }, {
@@ -369,7 +369,7 @@ const Le = { class: "work" }, Ze = { class: "nav" }, qe = { style: { height: "10
369
369
  ]),
370
370
  _: 1
371
371
  }),
372
- s(t(A), {
372
+ r(t(A), {
373
373
  size: "default",
374
374
  type: "primary",
375
375
  onClick: e[6] || (e[6] = (a) => {
@@ -383,15 +383,15 @@ const Le = { class: "work" }, Ze = { class: "nav" }, qe = { style: { height: "10
383
383
  })
384
384
  ]),
385
385
  default: m(() => [
386
- s(t(We), {
386
+ r(t(We), {
387
387
  ref: "dialogForm",
388
388
  model: N.value,
389
389
  autocomplete: "on"
390
390
  }, {
391
391
  default: m(() => [
392
- (S(!0), z(ie, null, re(N.value, (a) => (S(), F(t(Pe), null, {
392
+ (S(!0), z(ie, null, se(N.value, (a) => (S(), F(t(Pe), null, {
393
393
  default: m(() => [
394
- s(t(ve), {
394
+ r(t(ve), {
395
395
  modelValue: a.val,
396
396
  "onUpdate:modelValue": (C) => a.val = C,
397
397
  "active-text": a.activeText
@@ -405,7 +405,7 @@ const Le = { class: "work" }, Ze = { class: "nav" }, qe = { style: { height: "10
405
405
  ]),
406
406
  _: 1
407
407
  }, 8, ["title", "modelValue"]),
408
- s(t(Oe), {
408
+ r(t(Oe), {
409
409
  show: j.value,
410
410
  "onUpdate:show": e[20] || (e[20] = (a) => j.value = a),
411
411
  options: ue.value
@@ -417,25 +417,25 @@ const Le = { class: "work" }, Ze = { class: "nav" }, qe = { style: { height: "10
417
417
  }, [
418
418
  w("span", Ke, h(p.value.name), 1),
419
419
  e[23] || (e[23] = w("div", { class: "expander" }, null, -1)),
420
- s(r, { "icon-class": "cross" })
420
+ r(s, { "icon-class": "cross" })
421
421
  ]),
422
- s(t(Ge)),
422
+ r(t(Ge)),
423
423
  p.value.level === 2 ? (S(), z("div", Xe, [
424
- s(t(je), {
424
+ r(t(je), {
425
425
  modelValue: te.value,
426
426
  "onUpdate:modelValue": e[9] || (e[9] = (a) => te.value = a),
427
427
  size: "small"
428
428
  }, {
429
429
  default: m(() => [
430
- s(t(ge), {
430
+ r(t(ge), {
431
431
  label: t(d)("workSchedule.Days5"),
432
432
  value: "5"
433
433
  }, null, 8, ["label"]),
434
- s(t(ge), {
434
+ r(t(ge), {
435
435
  label: "2 Х 2",
436
436
  value: "2x2"
437
437
  }),
438
- s(t(ge), {
438
+ r(t(ge), {
439
439
  label: "2 Х 5",
440
440
  value: "2x5"
441
441
  })
@@ -444,7 +444,7 @@ const Le = { class: "work" }, Ze = { class: "nav" }, qe = { style: { height: "10
444
444
  }, 8, ["modelValue"]),
445
445
  e[24] || (e[24] = w("br", null, null, -1)),
446
446
  w("span", null, h(t(d)("workSchedule.fromDate")) + ":", 1),
447
- s(t(q), {
447
+ r(t(q), {
448
448
  modelValue: P.value,
449
449
  "onUpdate:modelValue": e[10] || (e[10] = (a) => P.value = a),
450
450
  step: 1,
@@ -452,7 +452,7 @@ const Le = { class: "work" }, Ze = { class: "nav" }, qe = { style: { height: "10
452
452
  max: o.value.length
453
453
  }, null, 8, ["modelValue", "max"]),
454
454
  w("span", null, h(t(d)("workSchedule.with")) + ":", 1),
455
- s(t(q), {
455
+ r(t(q), {
456
456
  modelValue: k.value,
457
457
  "onUpdate:modelValue": e[11] || (e[11] = (a) => k.value = a),
458
458
  step: 1,
@@ -460,14 +460,14 @@ const Le = { class: "work" }, Ze = { class: "nav" }, qe = { style: { height: "10
460
460
  max: 19
461
461
  }, null, 8, ["modelValue"]),
462
462
  w("span", null, h(t(d)("workSchedule.duration")) + ":", 1),
463
- s(t(q), {
463
+ r(t(q), {
464
464
  modelValue: y.value,
465
465
  "onUpdate:modelValue": e[12] || (e[12] = (a) => y.value = a),
466
466
  step: 1,
467
467
  min: 4,
468
468
  max: t(ye)(k.value !== 1 ? 23 - k.value : 21, 4, 22)
469
469
  }, null, 8, ["modelValue", "max"]),
470
- s(t(A), {
470
+ r(t(A), {
471
471
  style: { "margin-top": ".5rem" },
472
472
  size: "small",
473
473
  onClick: e[13] || (e[13] = (a) => xe(p.value.ids))
@@ -477,7 +477,7 @@ const Le = { class: "work" }, Ze = { class: "nav" }, qe = { style: { height: "10
477
477
  ]),
478
478
  _: 1
479
479
  }),
480
- s(t(A), {
480
+ r(t(A), {
481
481
  style: { "margin-top": ".5rem" },
482
482
  size: "small",
483
483
  onClick: e[14] || (e[14] = (a) => be(p.value.ids))
@@ -491,7 +491,7 @@ const Le = { class: "work" }, Ze = { class: "nav" }, qe = { style: { height: "10
491
491
  w("div", null, h(he(p.value.day, p.value.ids)), 1),
492
492
  e[25] || (e[25] = w("br", null, null, -1)),
493
493
  w("span", null, h(t(d)("workSchedule.with")) + ":", 1),
494
- s(t(q), {
494
+ r(t(q), {
495
495
  modelValue: k.value,
496
496
  "onUpdate:modelValue": e[15] || (e[15] = (a) => k.value = a),
497
497
  step: 1,
@@ -500,7 +500,7 @@ const Le = { class: "work" }, Ze = { class: "nav" }, qe = { style: { height: "10
500
500
  onChange: e[16] || (e[16] = (a) => ce(p.value.day, p.value.ids))
501
501
  }, null, 8, ["modelValue"]),
502
502
  w("span", null, h(t(d)("workSchedule.duration")) + ":", 1),
503
- s(t(q), {
503
+ r(t(q), {
504
504
  modelValue: y.value,
505
505
  "onUpdate:modelValue": e[17] || (e[17] = (a) => y.value = a),
506
506
  step: 1,
@@ -508,7 +508,7 @@ const Le = { class: "work" }, Ze = { class: "nav" }, qe = { style: { height: "10
508
508
  max: t(ye)(k.value !== 1 ? 23 - k.value : 21, 4, 22),
509
509
  onChange: e[18] || (e[18] = (a) => ce(p.value.day, p.value.ids))
510
510
  }, null, 8, ["modelValue", "max"]),
511
- s(t(A), {
511
+ r(t(A), {
512
512
  style: { "margin-top": ".5rem" },
513
513
  size: "small",
514
514
  onClick: e[19] || (e[19] = (a) => De(p.value.day, p.value.ids))
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@studio-west/employees",
3
- "version": "0.6.71",
3
+ "version": "0.7.0",
4
4
  "files": [
5
5
  "dist"
6
6
  ],