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