@studio-west/employees 0.5.0 → 0.5.2

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.
@@ -0,0 +1,3 @@
1
+ "use strict";const e=require("vue"),$=require("vue-i18n"),p=require("./index-CHGzf-XH.cjs"),o=require("element-plus"),F={style:{height:"20px",width:"100%",display:"inline-block"}},Y={style:{height:"20px",width:"100%",display:"inline-block"}},H={__name:"SheetTable",props:{checkEdit:{type:Boolean,default:()=>!0},odata:Object,workSchedule:Object,fullName:{type:String,default:"Вы"}},setup(x){const g=x,{t:u,d:C}=$.useI18n(),c=e.ref([]),w=e.ref("0"),y=e.ref(new Date(new Date().getFullYear(),new Date().getMonth(),1).setMonth(new Date().getMonth()+Number(w.value))),h=e.ref([]),v=e.ref("all"),N=e.ref([{value:"all",label:"Все",key:"all"}]),T=e.ref([]),k=e.ref(0),b=e.ref([]);e.watch(v,async(t,l)=>{t!==l&&(b.value=[],confirm.value=!1,g.odata.personal.forEach(a=>{a.divisionName===t&&(b.value.some(r=>(r==null?void 0:r.activeText)===a.roleName)||b.value.push({val:!0,activeText:a.roleName}))}),D())}),e.watch(w,t=>{y.value=new Date(new Date().getFullYear(),new Date().getMonth(),1).setMonth(new Date().getMonth()+Number(t)),V()});const i=e.computed(()=>c.value.flatMap((t,l)=>[{...t,key:0,ids:l},{...t,key:1,ids:l}])),I=t=>{if(t.columnIndex<2||t.columnIndex>h.value.length+3&&t.columnIndex<h.value.length+9||t.columnIndex>h.value.length+11)return i.value[t.rowIndex].key===0?{rowspan:2,colspan:1}:{rowspan:0,colspan:0}},V=()=>{const t=T.value,l=new Date(y.value),a=new Date(l.getFullYear(),l.getMonth()+1,0).getDate();let r=[],f=0;for(let d=1;d<=a;d++){const n=p.parseTime(l.setDate(d),"{Y}-{m}-{dd}");f+=t.nowork.includes(n)||t.holidays.includes(n)?0:t.preholidays.includes(n)?7:8;let s=t.nowork.includes(n)?"nowork":t.holidays.includes(n)?"holiday":t.preholidays.includes(n)?"preholiday":"";r.push({day:d,holidays:s,weekday:C(new Date(l.getFullYear(),l.getMonth(),d),"day")})}k.value=f,h.value=r,g.odata.getPersonal({}).then(d=>{var n;v.value=(n=d.find(s=>s.employeeName===g.fullName))==null?void 0:n.divisionName,d.forEach(s=>{N.value.some(m=>(m==null?void 0:m.value)===s.divisionName)||N.value.push({value:s.divisionName,label:s.divisionName,key:s.divisionName}),s.divisionName===v.value&&!b.value.some(m=>(m==null?void 0:m.activeText)===s.roleName)&&b.value.push({val:!0,activeText:s.roleName})}),D()})},D=()=>{c.value=[];let t=[];g.odata.personal.forEach(l=>{if(l.divisionName===v.value&&b.value.some(a=>a.val&&a.activeText===l.roleName)){let a=p.byInitials(l.employeeName);t.push(l.employeeKey),c.value.push({name:a+" ("+l.roleName+")",code:l.employeeKey,days:[],contHour:0,id:!1,ids:c.value.length})}}),B(t)},B=t=>{g.workSchedule.getWorkSchedule({code:t,date:p.parseTime(new Date(y.value),"{Y}-{m}-{dd}")}).then(l=>{l.forEach((a,r)=>{var f,d;if(a!==null){a.data.days.forEach(n=>n.state="Я");for(let n=1;n<=h.value.length;n++){let s=p.parseTime(new Date(y.value).setDate(n),"{Y}-{m}-{dd}");const m=(f=a.data)==null?void 0:f.days.findIndex(M=>M.day===s);m===-1?c.value[r].days.push({day:s,time:"-",state:"В"}):c.value[r].days.push((d=a.data)==null?void 0:d.days[m])}}else{c.value[r].days=[];for(let n=1;n<=h.value.length;n++)h.value[n-1].holidays===""?S(n,r,8):h.value[n-1].holidays==="preholiday"?S(n,r,7):c.value[r].days.push({day:p.parseTime(new Date(y.value).setDate(n),"{Y}-{m}-{dd}"),time:"-",state:"В"})}}),_()})},S=(t,l,a)=>{const r=p.parseTime(new Date(y.value).setDate(t),"{Y}-{m}-{dd}");ind===-1&&c.value[l].days.push({day:r,time:a,state:"Я"})},_=()=>{c.value.forEach(t=>{t.hourI=0,t.hourII=0,t.halfII=0,t.halfI=0,t.weekend=0,t.weekendDays=0,t.night=0;for(let l=0;l<t.days.length;l++)l<15&&t.days[l].time!=="-"&&(t.hourI+=t.days[l].time),l<15&&t.days[l].state==="Я"&&t.halfI++,l>=15&&t.days[l].time!=="-"&&(t.hourII+=t.days[l].time),l>=15&&t.days[l].state==="Я"&&t.halfII++,t.days[l].state==="Н"&&(t.night+=t.days[l].time),t.days[l].state==="РВ"&&(t.weekend+=t.days[l].time),t.days[l].state==="В"&&t.weekendDays++;t.contDays=t.halfI+t.halfII,t.contHour=t.hourI+t.hourII,t.overtime=0,k.value<t.contHour&&(t.overtime=t.contHour-k.value),t.numberNonAppearing=0,t.appearing={code:"-",countH:"-"}})},E=(t,l)=>{var d,n;if(l===-1)return"";const a=new Date(y.value),r=`${a.getFullYear()}-${(a.getMonth()+1).toString().padStart(2,"0")}-${t.toString().padStart(2,"0")}`,f=i.value[l].days.findIndex(s=>s.day===r);return f===-1?"":i.value[l].key===0?(d=i.value[l].days[f])==null?void 0:d.state:(n=i.value[l].days[f])==null?void 0:n.time};return p.holidays().then(t=>{T.value=t,V()}),(t,l)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[x.checkEdit?(e.openBlock(),e.createBlock(e.unref(o.ElSelect),{key:0,modelValue:v.value,"onUpdate:modelValue":l[0]||(l[0]=a=>v.value=a),placeholder:"Select",style:{width:"240px","margin-bottom":".5rem","margin-right":".5rem"}},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(N.value,a=>(e.openBlock(),e.createBlock(e.unref(o.ElOption),{key:a.value,label:a.label,value:a.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])):e.createCommentVNode("",!0),x.checkEdit?(e.openBlock(),e.createBlock(e.unref(o.ElSwitch),{key:1,modelValue:w.value,"onUpdate:modelValue":l[1]||(l[1]=a=>w.value=a),"active-text":e.unref(u)("workSchedule.currentMonth"),"active-value":"0","inactive-value":"-1",style:{"margin-bottom":".5rem","margin-left":".5rem"}},null,8,["modelValue","active-text"])):e.createCommentVNode("",!0),e.createVNode(e.unref(o.ElTable),{id:"printTable",data:i.value,"span-method":I,border:"",style:{width:"100%"},size:"small","empty-text":e.unref(u)("sheet.emptyText"),align:"center",onCellClick:t.coMenu},{default:e.withCtx(()=>[e.createVNode(e.unref(o.ElTableColumn),{label:e.unref(u)("sheet.title",{name:v.value})+e.unref(C)(y.value,"month"),align:"center",height:"10"},{default:e.withCtx(()=>[e.createVNode(e.unref(o.ElTableColumn),{label:e.unref(u)("sheet.employee"),width:"180",align:"center"},{default:e.withCtx(a=>[e.createTextVNode(e.toDisplayString(i.value[a.$index].name),1)]),_:1},8,["label"]),e.createVNode(e.unref(o.ElTableColumn),{label:e.unref(u)("sheet.personnelNumber"),align:"center"},{default:e.withCtx(a=>[e.createTextVNode(e.toDisplayString(i.value[a.$index].code),1)]),_:1},8,["label"]),e.createVNode(e.unref(o.ElTableColumn),{label:e.unref(u)("sheet.marks"),align:"center"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(h.value,a=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:a.day},[a.day<=15?(e.openBlock(),e.createBlock(e.unref(o.ElTableColumn),{key:0,width:"30","class-name":a.holidays,align:"center",label:a.day.toString()+`
2
+ `+a.weekday},{default:e.withCtx(r=>[e.createElementVNode("div",F,e.toDisplayString(E(a.day,r.$index)||" "),1)]),_:2},1032,["class-name","label"])):e.createCommentVNode("",!0)],64))),128)),e.createVNode(e.unref(o.ElTableColumn),{label:e.unref(u)("sheet.halfMonth",{half:"I"}),align:"center"},{default:e.withCtx(a=>[e.createTextVNode(e.toDisplayString(i.value[a.$index].dateStart),1)]),_:1},8,["label"]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(h.value,a=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:a.day},[a.day>15?(e.openBlock(),e.createBlock(e.unref(o.ElTableColumn),{key:0,width:"30","class-name":a.holidays,align:"center",label:a.day.toString()+`
3
+ `+a.weekday},{default:e.withCtx(r=>[e.createElementVNode("div",Y,e.toDisplayString(E(a.day,r.$index)||" "),1)]),_:2},1032,["class-name","label"])):e.createCommentVNode("",!0)],64))),128)),e.createVNode(e.unref(o.ElTableColumn),{label:e.unref(u)("sheet.halfMonth",{half:"II"}),align:"center"},{default:e.withCtx(a=>[e.createTextVNode(e.toDisplayString(i.value[a.$index].dateStart),1)]),_:1},8,["label"])]),_:1},8,["label"]),e.createVNode(e.unref(o.ElTableColumn),{label:e.unref(u)("sheet.workedMonth"),align:"center"},{default:e.withCtx(()=>[e.createVNode(e.unref(o.ElTableColumn),{label:e.unref(u)("sheet.days"),align:"center","label-class-name":"turn",width:"30"},{default:e.withCtx(a=>[e.createTextVNode(e.toDisplayString(i.value[a.$index].dateStart),1)]),_:1},8,["label"]),e.createVNode(e.unref(o.ElTableColumn),{label:e.unref(u)("sheet.hours"),align:"center"},{default:e.withCtx(()=>[e.createVNode(e.unref(o.ElTableColumn),{label:e.unref(u)("sheet.all"),align:"center","label-class-name":"turn",width:"30"},{default:e.withCtx(a=>[e.createTextVNode(e.toDisplayString(i.value[a.$index].dateStart),1)]),_:1},8,["label"]),e.createVNode(e.unref(o.ElTableColumn),{label:e.unref(u)("sheet.overtime"),align:"center","label-class-name":"turn",width:"30"},{default:e.withCtx(a=>[e.createTextVNode(e.toDisplayString(i.value[a.$index].dateStart),1)]),_:1},8,["label"]),e.createVNode(e.unref(o.ElTableColumn),{label:e.unref(u)("sheet.night"),align:"center","label-class-name":"turn",width:"30"},{default:e.withCtx(a=>[e.createTextVNode(e.toDisplayString(i.value[a.$index].dateStart),1)]),_:1},8,["label"]),e.createVNode(e.unref(o.ElTableColumn),{label:e.unref(u)("sheet.weekend"),align:"center","label-class-name":"turn",width:"30"},{default:e.withCtx(a=>[e.createTextVNode(e.toDisplayString(i.value[a.$index].dateStart),1)]),_:1},8,["label"])]),_:1},8,["label"])]),_:1},8,["label"]),e.createVNode(e.unref(o.ElTableColumn),{label:e.unref(u)("sheet.numberNonAppearing"),align:"center"},{default:e.withCtx(a=>[e.createTextVNode(e.toDisplayString(i.value[a.$index].dateStart),1)]),_:1},8,["label"]),e.createVNode(e.unref(o.ElTableColumn),{label:e.unref(u)("sheet.them"),align:"center"},{default:e.withCtx(()=>[e.createVNode(e.unref(o.ElTableColumn),{label:e.unref(u)("sheet.code"),align:"center","label-class-name":"turn",width:"30"},{default:e.withCtx(a=>[e.createTextVNode(e.toDisplayString(i.value[a.$index].dateStart),1)]),_:1},8,["label"]),e.createVNode(e.unref(o.ElTableColumn),{label:e.unref(u)("sheet.count"),align:"center","label-class-name":"turn",width:"30"},{default:e.withCtx(a=>[e.createTextVNode(e.toDisplayString(i.value[a.$index].dateStart),1)]),_:1},8,["label"])]),_:1},8,["label"]),e.createVNode(e.unref(o.ElTableColumn),{label:e.unref(u)("sheet.countWeekend"),align:"center"},{default:e.withCtx(a=>[e.createTextVNode(e.toDisplayString(i.value[a.$index].dateStart),1)]),_:1},8,["label"])]),_:1},8,["label"])]),_:1},8,["data","empty-text","onCellClick"])],64))}};module.exports=H;
@@ -0,0 +1,361 @@
1
+ import { ref as w, watch as K, computed as L, openBlock as y, createElementBlock as D, Fragment as S, createBlock as _, unref as l, withCtx as o, renderList as C, createCommentVNode as E, createVNode as d, createTextVNode as m, toDisplayString as c, createElementVNode as P } from "vue";
2
+ import { useI18n as q } from "vue-i18n";
3
+ import { p as M, b as G, h as R } from "./index-uVRk2ARj.js";
4
+ import { ElSelect as X, ElOption as Z, ElSwitch as Q, ElTable as ee, ElTableColumn as i } from "element-plus";
5
+ const ae = { style: { height: "20px", width: "100%", display: "inline-block" } }, te = { style: { height: "20px", width: "100%", display: "inline-block" } }, se = {
6
+ __name: "SheetTable",
7
+ props: {
8
+ checkEdit: { type: Boolean, default: () => !0 },
9
+ odata: Object,
10
+ workSchedule: Object,
11
+ fullName: { type: String, default: "Вы" }
12
+ },
13
+ setup(T) {
14
+ const N = T, { t: s, d: F } = q(), f = w([]), $ = w("0"), x = w(new Date((/* @__PURE__ */ new Date()).getFullYear(), (/* @__PURE__ */ new Date()).getMonth(), 1).setMonth((/* @__PURE__ */ new Date()).getMonth() + Number($.value))), b = w([]), k = w("all"), V = w([{ value: "all", label: "Все", key: "all" }]), H = w([]), Y = w(0), I = w([]);
15
+ K(k, async (e, t) => {
16
+ e !== t && (I.value = [], confirm.value = !1, N.odata.personal.forEach((a) => {
17
+ a.divisionName === e && (I.value.some((u) => (u == null ? void 0 : u.activeText) === a.roleName) || I.value.push({ val: !0, activeText: a.roleName }));
18
+ }), j());
19
+ }), K($, (e) => {
20
+ x.value = new Date((/* @__PURE__ */ new Date()).getFullYear(), (/* @__PURE__ */ new Date()).getMonth(), 1).setMonth((/* @__PURE__ */ new Date()).getMonth() + Number(e)), B();
21
+ });
22
+ const r = L(() => f.value.flatMap((e, t) => [{ ...e, key: 0, ids: t }, { ...e, key: 1, ids: t }])), U = (e) => {
23
+ if (e.columnIndex < 2 || e.columnIndex > b.value.length + 3 && e.columnIndex < b.value.length + 9 || e.columnIndex > b.value.length + 11)
24
+ return r.value[e.rowIndex].key === 0 ? {
25
+ rowspan: 2,
26
+ colspan: 1
27
+ } : {
28
+ rowspan: 0,
29
+ colspan: 0
30
+ };
31
+ }, B = () => {
32
+ const e = H.value, t = new Date(x.value), a = new Date(t.getFullYear(), t.getMonth() + 1, 0).getDate();
33
+ let u = [], g = 0;
34
+ for (let v = 1; v <= a; v++) {
35
+ const n = M(t.setDate(v), "{Y}-{m}-{dd}");
36
+ g += e.nowork.includes(n) || e.holidays.includes(n) ? 0 : e.preholidays.includes(n) ? 7 : 8;
37
+ let h = e.nowork.includes(n) ? "nowork" : e.holidays.includes(n) ? "holiday" : e.preholidays.includes(n) ? "preholiday" : "";
38
+ u.push({ day: v, holidays: h, weekday: F(new Date(t.getFullYear(), t.getMonth(), v), "day") });
39
+ }
40
+ Y.value = g, b.value = u, N.odata.getPersonal({}).then((v) => {
41
+ var n;
42
+ k.value = (n = v.find((h) => h.employeeName === N.fullName)) == null ? void 0 : n.divisionName, v.forEach((h) => {
43
+ V.value.some((p) => (p == null ? void 0 : p.value) === h.divisionName) || V.value.push({ value: h.divisionName, label: h.divisionName, key: h.divisionName }), h.divisionName === k.value && !I.value.some((p) => (p == null ? void 0 : p.activeText) === h.roleName) && I.value.push({ val: !0, activeText: h.roleName });
44
+ }), j();
45
+ });
46
+ }, j = () => {
47
+ f.value = [];
48
+ let e = [];
49
+ N.odata.personal.forEach((t) => {
50
+ if (t.divisionName === k.value && I.value.some((a) => a.val && a.activeText === t.roleName)) {
51
+ let a = G(t.employeeName);
52
+ e.push(t.employeeKey), f.value.push({ name: a + " (" + t.roleName + ")", code: t.employeeKey, days: [], contHour: 0, id: !1, ids: f.value.length });
53
+ }
54
+ }), W(e);
55
+ }, W = (e) => {
56
+ N.workSchedule.getWorkSchedule({ code: e, date: M(new Date(x.value), "{Y}-{m}-{dd}") }).then(
57
+ (t) => {
58
+ t.forEach((a, u) => {
59
+ var g, v;
60
+ if (a !== null) {
61
+ a.data.days.forEach((n) => n.state = "Я");
62
+ for (let n = 1; n <= b.value.length; n++) {
63
+ let h = M(new Date(x.value).setDate(n), "{Y}-{m}-{dd}");
64
+ const p = (g = a.data) == null ? void 0 : g.days.findIndex((J) => J.day === h);
65
+ p === -1 ? f.value[u].days.push({
66
+ day: h,
67
+ time: "-",
68
+ state: "В"
69
+ }) : f.value[u].days.push((v = a.data) == null ? void 0 : v.days[p]);
70
+ }
71
+ } else {
72
+ f.value[u].days = [];
73
+ for (let n = 1; n <= b.value.length; n++)
74
+ b.value[n - 1].holidays === "" ? O(n, u, 8) : b.value[n - 1].holidays === "preholiday" ? O(n, u, 7) : f.value[u].days.push({
75
+ day: M(new Date(x.value).setDate(n), "{Y}-{m}-{dd}"),
76
+ time: "-",
77
+ state: "В"
78
+ });
79
+ }
80
+ }), z();
81
+ }
82
+ );
83
+ }, O = (e, t, a) => {
84
+ const u = M(new Date(x.value).setDate(e), "{Y}-{m}-{dd}");
85
+ ind === -1 && f.value[t].days.push({
86
+ day: u,
87
+ time: a,
88
+ state: "Я"
89
+ });
90
+ }, z = () => {
91
+ f.value.forEach((e) => {
92
+ e.hourI = 0, e.hourII = 0, e.halfII = 0, e.halfI = 0, e.weekend = 0, e.weekendDays = 0, e.night = 0;
93
+ for (let t = 0; t < e.days.length; t++)
94
+ t < 15 && e.days[t].time !== "-" && (e.hourI += e.days[t].time), t < 15 && e.days[t].state === "Я" && e.halfI++, t >= 15 && e.days[t].time !== "-" && (e.hourII += e.days[t].time), t >= 15 && e.days[t].state === "Я" && e.halfII++, e.days[t].state === "Н" && (e.night += e.days[t].time), e.days[t].state === "РВ" && (e.weekend += e.days[t].time), e.days[t].state === "В" && e.weekendDays++;
95
+ e.contDays = e.halfI + e.halfII, e.contHour = e.hourI + e.hourII, e.overtime = 0, Y.value < e.contHour && (e.overtime = e.contHour - Y.value), e.numberNonAppearing = 0, e.appearing = {
96
+ code: "-",
97
+ countH: "-"
98
+ };
99
+ });
100
+ }, A = (e, t) => {
101
+ var v, n;
102
+ if (t === -1) return "";
103
+ const a = new Date(x.value), u = `${a.getFullYear()}-${(a.getMonth() + 1).toString().padStart(2, "0")}-${e.toString().padStart(2, "0")}`, g = r.value[t].days.findIndex((h) => h.day === u);
104
+ return g === -1 ? "" : r.value[t].key === 0 ? (v = r.value[t].days[g]) == null ? void 0 : v.state : (n = r.value[t].days[g]) == null ? void 0 : n.time;
105
+ };
106
+ return R().then((e) => {
107
+ H.value = e, B();
108
+ }), (e, t) => (y(), D(S, null, [
109
+ T.checkEdit ? (y(), _(l(X), {
110
+ key: 0,
111
+ modelValue: k.value,
112
+ "onUpdate:modelValue": t[0] || (t[0] = (a) => k.value = a),
113
+ placeholder: "Select",
114
+ style: { width: "240px", "margin-bottom": ".5rem", "margin-right": ".5rem" }
115
+ }, {
116
+ default: o(() => [
117
+ (y(!0), D(S, null, C(V.value, (a) => (y(), _(l(Z), {
118
+ key: a.value,
119
+ label: a.label,
120
+ value: a.value
121
+ }, null, 8, ["label", "value"]))), 128))
122
+ ]),
123
+ _: 1
124
+ }, 8, ["modelValue"])) : E("", !0),
125
+ T.checkEdit ? (y(), _(l(Q), {
126
+ key: 1,
127
+ modelValue: $.value,
128
+ "onUpdate:modelValue": t[1] || (t[1] = (a) => $.value = a),
129
+ "active-text": l(s)("workSchedule.currentMonth"),
130
+ "active-value": "0",
131
+ "inactive-value": "-1",
132
+ style: { "margin-bottom": ".5rem", "margin-left": ".5rem" }
133
+ }, null, 8, ["modelValue", "active-text"])) : E("", !0),
134
+ d(l(ee), {
135
+ id: "printTable",
136
+ data: r.value,
137
+ "span-method": U,
138
+ border: "",
139
+ style: { width: "100%" },
140
+ size: "small",
141
+ "empty-text": l(s)("sheet.emptyText"),
142
+ align: "center",
143
+ onCellClick: e.coMenu
144
+ }, {
145
+ default: o(() => [
146
+ d(l(i), {
147
+ label: l(s)("sheet.title", { name: k.value }) + l(F)(x.value, "month"),
148
+ align: "center",
149
+ height: "10"
150
+ }, {
151
+ default: o(() => [
152
+ d(l(i), {
153
+ label: l(s)("sheet.employee"),
154
+ width: "180",
155
+ align: "center"
156
+ }, {
157
+ default: o((a) => [
158
+ m(c(r.value[a.$index].name), 1)
159
+ ]),
160
+ _: 1
161
+ }, 8, ["label"]),
162
+ d(l(i), {
163
+ label: l(s)("sheet.personnelNumber"),
164
+ align: "center"
165
+ }, {
166
+ default: o((a) => [
167
+ m(c(r.value[a.$index].code), 1)
168
+ ]),
169
+ _: 1
170
+ }, 8, ["label"]),
171
+ d(l(i), {
172
+ label: l(s)("sheet.marks"),
173
+ align: "center"
174
+ }, {
175
+ default: o(() => [
176
+ (y(!0), D(S, null, C(b.value, (a) => (y(), D(S, {
177
+ key: a.day
178
+ }, [
179
+ a.day <= 15 ? (y(), _(l(i), {
180
+ key: 0,
181
+ width: "30",
182
+ "class-name": a.holidays,
183
+ align: "center",
184
+ label: a.day.toString() + `
185
+ ` + a.weekday
186
+ }, {
187
+ default: o((u) => [
188
+ P("div", ae, c(A(a.day, u.$index) || " "), 1)
189
+ ]),
190
+ _: 2
191
+ }, 1032, ["class-name", "label"])) : E("", !0)
192
+ ], 64))), 128)),
193
+ d(l(i), {
194
+ label: l(s)("sheet.halfMonth", { half: "I" }),
195
+ align: "center"
196
+ }, {
197
+ default: o((a) => [
198
+ m(c(r.value[a.$index].dateStart), 1)
199
+ ]),
200
+ _: 1
201
+ }, 8, ["label"]),
202
+ (y(!0), D(S, null, C(b.value, (a) => (y(), D(S, {
203
+ key: a.day
204
+ }, [
205
+ a.day > 15 ? (y(), _(l(i), {
206
+ key: 0,
207
+ width: "30",
208
+ "class-name": a.holidays,
209
+ align: "center",
210
+ label: a.day.toString() + `
211
+ ` + a.weekday
212
+ }, {
213
+ default: o((u) => [
214
+ P("div", te, c(A(a.day, u.$index) || " "), 1)
215
+ ]),
216
+ _: 2
217
+ }, 1032, ["class-name", "label"])) : E("", !0)
218
+ ], 64))), 128)),
219
+ d(l(i), {
220
+ label: l(s)("sheet.halfMonth", { half: "II" }),
221
+ align: "center"
222
+ }, {
223
+ default: o((a) => [
224
+ m(c(r.value[a.$index].dateStart), 1)
225
+ ]),
226
+ _: 1
227
+ }, 8, ["label"])
228
+ ]),
229
+ _: 1
230
+ }, 8, ["label"]),
231
+ d(l(i), {
232
+ label: l(s)("sheet.workedMonth"),
233
+ align: "center"
234
+ }, {
235
+ default: o(() => [
236
+ d(l(i), {
237
+ label: l(s)("sheet.days"),
238
+ align: "center",
239
+ "label-class-name": "turn",
240
+ width: "30"
241
+ }, {
242
+ default: o((a) => [
243
+ m(c(r.value[a.$index].dateStart), 1)
244
+ ]),
245
+ _: 1
246
+ }, 8, ["label"]),
247
+ d(l(i), {
248
+ label: l(s)("sheet.hours"),
249
+ align: "center"
250
+ }, {
251
+ default: o(() => [
252
+ d(l(i), {
253
+ label: l(s)("sheet.all"),
254
+ align: "center",
255
+ "label-class-name": "turn",
256
+ width: "30"
257
+ }, {
258
+ default: o((a) => [
259
+ m(c(r.value[a.$index].dateStart), 1)
260
+ ]),
261
+ _: 1
262
+ }, 8, ["label"]),
263
+ d(l(i), {
264
+ label: l(s)("sheet.overtime"),
265
+ align: "center",
266
+ "label-class-name": "turn",
267
+ width: "30"
268
+ }, {
269
+ default: o((a) => [
270
+ m(c(r.value[a.$index].dateStart), 1)
271
+ ]),
272
+ _: 1
273
+ }, 8, ["label"]),
274
+ d(l(i), {
275
+ label: l(s)("sheet.night"),
276
+ align: "center",
277
+ "label-class-name": "turn",
278
+ width: "30"
279
+ }, {
280
+ default: o((a) => [
281
+ m(c(r.value[a.$index].dateStart), 1)
282
+ ]),
283
+ _: 1
284
+ }, 8, ["label"]),
285
+ d(l(i), {
286
+ label: l(s)("sheet.weekend"),
287
+ align: "center",
288
+ "label-class-name": "turn",
289
+ width: "30"
290
+ }, {
291
+ default: o((a) => [
292
+ m(c(r.value[a.$index].dateStart), 1)
293
+ ]),
294
+ _: 1
295
+ }, 8, ["label"])
296
+ ]),
297
+ _: 1
298
+ }, 8, ["label"])
299
+ ]),
300
+ _: 1
301
+ }, 8, ["label"]),
302
+ d(l(i), {
303
+ label: l(s)("sheet.numberNonAppearing"),
304
+ align: "center"
305
+ }, {
306
+ default: o((a) => [
307
+ m(c(r.value[a.$index].dateStart), 1)
308
+ ]),
309
+ _: 1
310
+ }, 8, ["label"]),
311
+ d(l(i), {
312
+ label: l(s)("sheet.them"),
313
+ align: "center"
314
+ }, {
315
+ default: o(() => [
316
+ d(l(i), {
317
+ label: l(s)("sheet.code"),
318
+ align: "center",
319
+ "label-class-name": "turn",
320
+ width: "30"
321
+ }, {
322
+ default: o((a) => [
323
+ m(c(r.value[a.$index].dateStart), 1)
324
+ ]),
325
+ _: 1
326
+ }, 8, ["label"]),
327
+ d(l(i), {
328
+ label: l(s)("sheet.count"),
329
+ align: "center",
330
+ "label-class-name": "turn",
331
+ width: "30"
332
+ }, {
333
+ default: o((a) => [
334
+ m(c(r.value[a.$index].dateStart), 1)
335
+ ]),
336
+ _: 1
337
+ }, 8, ["label"])
338
+ ]),
339
+ _: 1
340
+ }, 8, ["label"]),
341
+ d(l(i), {
342
+ label: l(s)("sheet.countWeekend"),
343
+ align: "center"
344
+ }, {
345
+ default: o((a) => [
346
+ m(c(r.value[a.$index].dateStart), 1)
347
+ ]),
348
+ _: 1
349
+ }, 8, ["label"])
350
+ ]),
351
+ _: 1
352
+ }, 8, ["label"])
353
+ ]),
354
+ _: 1
355
+ }, 8, ["data", "empty-text", "onCellClick"])
356
+ ], 64));
357
+ }
358
+ };
359
+ export {
360
+ se as default
361
+ };
@@ -1 +1 @@
1
- .wrapper[data-v-5b3d4c74]{display:flex}.wrapper .month_year[data-v-5b3d4c74]{display:flex;justify-content:space-around;align-items:center}.wrapper .month_year span:not(.text) button[data-v-5b3d4c74]{font-size:1.3em}.wrapper>div[data-v-5b3d4c74]:not(:first-child){margin-left:2rem}.wrapper button[data-v-5b3d4c74]{height:30px;text-align:center;line-height:30px;cursor:pointer;background:none;border:none;border-radius:.2rem;transition:all .3s ease}.wrapper button[data-v-5b3d4c74]:hover:not(.disabled):not(.active){color:var(--el-color-success)}.wrapper .week[data-v-5b3d4c74]{border-bottom:1px solid var(--el-color-info);margin-bottom:.5rem}.wrapper .month[data-v-5b3d4c74],.wrapper .week[data-v-5b3d4c74]{width:250px;display:grid;grid-template-columns:1fr 1fr 1fr 1fr 1fr 1fr 1fr;gap:.2rem}.wrapper .month>button[data-v-5b3d4c74],.wrapper .week>button[data-v-5b3d4c74]{width:30px}.wrapper .month>button.disabled[data-v-5b3d4c74],.wrapper .week>button.disabled[data-v-5b3d4c74]{color:var(--el-color-info);cursor:not-allowed}.wrapper .month>button.preholiday[data-v-5b3d4c74],.wrapper .week>button.preholiday[data-v-5b3d4c74]{background-color:#ffe78070}.wrapper .month>button.weekend[data-v-5b3d4c74],.wrapper .week>button.weekend[data-v-5b3d4c74]{background-color:#ff808070}.wrapper .month>button.select[data-v-5b3d4c74],.wrapper .week>button.select[data-v-5b3d4c74]{background-color:#007bff70}.wrapper .month>button.holiday[data-v-5b3d4c74],.wrapper .week>button.holiday[data-v-5b3d4c74]{background-color:red}.wrapper .month>button.nowork[data-v-5b3d4c74],.wrapper .week>button.nowork[data-v-5b3d4c74]{background-color:red}.wrapper .month>button.active[data-v-5b3d4c74],.wrapper .week>button.active[data-v-5b3d4c74]{background-color:#007bff}.noBorder .el-input__wrapper{box-shadow:none}
1
+ .wrapper[data-v-5b3d4c74]{display:flex}.wrapper .month_year[data-v-5b3d4c74]{display:flex;justify-content:space-around;align-items:center}.wrapper .month_year span:not(.text) button[data-v-5b3d4c74]{font-size:1.3em}.wrapper>div[data-v-5b3d4c74]:not(:first-child){margin-left:2rem}.wrapper button[data-v-5b3d4c74]{height:30px;text-align:center;line-height:30px;cursor:pointer;background:none;border:none;border-radius:.2rem;transition:all .3s ease}.wrapper button[data-v-5b3d4c74]:hover:not(.disabled):not(.active){color:var(--el-color-success)}.wrapper .week[data-v-5b3d4c74]{border-bottom:1px solid var(--el-color-info);margin-bottom:.5rem}.wrapper .month[data-v-5b3d4c74],.wrapper .week[data-v-5b3d4c74]{width:250px;display:grid;grid-template-columns:1fr 1fr 1fr 1fr 1fr 1fr 1fr;gap:.2rem}.wrapper .month>button[data-v-5b3d4c74],.wrapper .week>button[data-v-5b3d4c74]{width:30px}.wrapper .month>button.disabled[data-v-5b3d4c74],.wrapper .week>button.disabled[data-v-5b3d4c74]{color:var(--el-color-info);cursor:not-allowed}.wrapper .month>button.preholiday[data-v-5b3d4c74],.wrapper .week>button.preholiday[data-v-5b3d4c74]{background-color:#ffe78070}.wrapper .month>button.weekend[data-v-5b3d4c74],.wrapper .week>button.weekend[data-v-5b3d4c74]{background-color:#ff808070}.wrapper .month>button.select[data-v-5b3d4c74],.wrapper .week>button.select[data-v-5b3d4c74]{background-color:#007bff70}.wrapper .month>button.holiday[data-v-5b3d4c74],.wrapper .week>button.holiday[data-v-5b3d4c74]{background-color:red}.wrapper .month>button.nowork[data-v-5b3d4c74],.wrapper .week>button.nowork[data-v-5b3d4c74]{background-color:red}.wrapper .month>button.active[data-v-5b3d4c74],.wrapper .week>button.active[data-v-5b3d4c74]{background-color:#007bff}.noBorder .el-input__wrapper{box-shadow:none}.turn{writing-mode:vertical-rl;text-orientation:sideways;border-left:var(--el-table-border);transform:rotate(180deg)}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@studio-west/employees",
3
- "version": "0.5.0",
3
+ "version": "0.5.2",
4
4
  "files": [
5
5
  "dist"
6
6
  ],
@@ -15,6 +15,10 @@
15
15
  "import": "./dist/VacationTable.js",
16
16
  "require": "./dist/VacationTable.cjs"
17
17
  },
18
+ "./sheet": {
19
+ "import": "./dist/SheetTable.js",
20
+ "require": "./dist/SheetTable.cjs"
21
+ },
18
22
  "./dist/employees.css": "./dist/employees.css"
19
23
  },
20
24
  "type": "module",