@feedmepos/mf-hrm-portal 1.1.0-dev → 1.1.2-dev
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/AuditLogList-CjrocQS2.js +316 -0
- package/dist/{EmployeeList-tmUqs5a6.js → EmployeeList-CKHgrdAO.js} +157 -150
- package/dist/Main-HzplGv-e.js +85 -0
- package/dist/{main-DOtgCRZe.js → Main-YQ5f-v03.js} +1501 -1532
- package/dist/{PageLayout.vue_vue_type_script_setup_true_lang-DuwNwJDM.js → PageLayout.vue_vue_type_script_setup_true_lang-HKK4cbW8.js} +2 -2
- package/dist/PortalPermissionEditor.vue_vue_type_script_setup_true_lang-xQ4fjIxa.js +3050 -0
- package/dist/ResponsiveFabButton.vue_vue_type_script_setup_true_lang-Cn-3MRBO.js +38 -0
- package/dist/{RoleList-C5xG7LHg.js → RoleList-Bef-7IhW.js} +52 -50
- package/dist/RolePermissionList-BzwpQFeO.js +285 -0
- package/dist/{useSearch-C25VELOk.js → SelectFilter-NbXrJ4iH.js} +90 -101
- package/dist/TeamMemberList-D2Xey_w9.js +949 -0
- package/dist/{TimesheetList-CZfo4Dua.js → TimesheetList-DVIk0Tis.js} +30 -29
- package/dist/api/audit-log/index.d.ts +10 -0
- package/dist/api/index.d.ts +1 -3
- package/dist/api/permission-assignment/index.d.ts +10 -0
- package/dist/api/permission-set/index.d.ts +8 -0
- package/dist/api/team/index.d.ts +5 -1
- package/dist/app-DUs516v0.js +2592 -0
- package/dist/app.js +4 -4
- package/dist/components/AppForm.vue.d.ts +3 -2
- package/dist/components/CheckboxInput.vue.d.ts +10 -4
- package/dist/components/CollapsibleWrapper.vue.d.ts +3 -2
- package/dist/components/form/SelectFilter.vue.d.ts +3 -2
- package/dist/components/layout/FormColumn.vue.d.ts +6 -3
- package/dist/components/layout/FormItem.vue.d.ts +2 -1
- package/dist/components/layout/FormSection.vue.d.ts +2 -1
- package/dist/components/layout/FullWrapper.vue.d.ts +6 -3
- package/dist/components/layout/PageLayout.vue.d.ts +2 -1
- package/dist/components/menu/BottomSheetMenu.vue.d.ts +2 -1
- package/dist/components/menu/BottomSheetMenuItem.vue.d.ts +6 -3
- package/dist/components/table/EmptyDataTemplate/index.vue.d.ts +6 -3
- package/dist/composables/useAppStore.d.ts +6 -6
- package/dist/composables/useDateRange.d.ts +1 -1
- package/dist/composables/useRestaurantMap.d.ts +4 -8
- package/dist/composables/useSheet.d.ts +1 -1
- package/dist/dayjs.min-DVb8OkTL.js +282 -0
- package/dist/employee-jH7EJnhi.js +172 -0
- package/dist/helpers/permission-set.d.ts +32 -0
- package/dist/helpers/portal-user.d.ts +8 -0
- package/dist/helpers/rule.d.ts +4 -3
- package/dist/index-CicR1-Jp.js +8411 -0
- package/dist/{empty-placeholder-ey8LJtN1.js → index.vue_vue_type_script_setup_true_lang-Vc5ARO29.js} +43 -2
- package/dist/{lodash-DNzKT_gG.js → lodash-DpoPPi_j.js} +326 -343
- package/dist/router/shared.d.ts +3 -1
- package/dist/stores/employee.d.ts +4 -4
- package/dist/stores/permission-assignment.d.ts +277 -0
- package/dist/stores/permission-set.d.ts +250 -0
- package/dist/stores/role.d.ts +4 -4
- package/dist/stores/team.d.ts +288 -0
- package/dist/stores/timesheet.d.ts +19 -19
- package/dist/team-CiZSNUQW.js +26 -0
- package/dist/timesheet-BRQvljNj.js +56 -0
- package/dist/tsconfig.app.tsbuildinfo +1 -1
- package/dist/types/audit-log.d.ts +19 -0
- package/dist/types/permission-assignment.d.ts +20 -0
- package/dist/types/permission-set.d.ts +20 -0
- package/dist/types/permission.d.ts +1 -4
- package/dist/types/team.d.ts +13 -3
- package/dist/useAppStore-RzLLN5d9.js +180 -0
- package/dist/useLoading-1OqFn86y.js +99 -0
- package/dist/useRestaurantMap-D5BNPLKh.js +107 -0
- package/dist/useSearch-B6WK1LBB.js +15 -0
- package/dist/views/audit-log/locales/index.d.ts +211 -0
- package/dist/views/hr/employee/{components/EmployeeForm.vue.d.ts → EmployeeForm.vue.d.ts} +10 -7
- package/dist/views/hr/locales/index.d.ts +0 -214
- package/dist/views/team/components/BasePermission.vue.d.ts +64 -0
- package/dist/views/team/components/{TeamMemberConditionPermission.vue.d.ts → ConditionPermission.vue.d.ts} +14 -1
- package/dist/views/team/components/InheritPermissionTooltip.vue.d.ts +14 -0
- package/dist/views/team/components/PermissionWithTooltip.vue.d.ts +14 -0
- package/dist/views/team/components/PortalPermissionEditor.vue.d.ts +68 -28
- package/dist/views/team/components/{TeamMemberRolePermission.vue.d.ts → PosRolePermission.vue.d.ts} +14 -1
- package/dist/views/team/locales/index.d.ts +176 -4
- package/dist/views/team/{components → member}/AddMemberForm.vue.d.ts +1 -0
- package/dist/views/team/member/TeamMemberList.vue.d.ts +4 -0
- package/dist/views/team/member/TeamMemberMasterUser.vue.d.ts +55 -0
- package/dist/views/team/role/RolePermissionForm.vue.d.ts +19 -0
- package/dist/views/{hr/grant-user/GrantUserList.vue.d.ts → team/role/RolePermissionList.vue.d.ts} +0 -12
- package/package.json +14 -9
- package/dist/FormSection.vue_vue_type_script_setup_true_lang-BY9VGOoM.js +0 -71
- package/dist/HorizontalSplitter-B9DVYJIM.js +0 -12
- package/dist/Main-ebQsujY3.js +0 -600
- package/dist/TeamMemberList-09_3YTHe.js +0 -1509
- package/dist/api/grant-user/index.d.ts +0 -8
- package/dist/app-B4KDGOw1.js +0 -1432
- package/dist/employee-BQc7Wgpu.js +0 -450
- package/dist/index-CSG8t9Dl.js +0 -58
- package/dist/role-DGAu9X1X.js +0 -9728
- package/dist/rule-CSj0p2P3.js +0 -450
- package/dist/stores/grant-user.d.ts +0 -86
- package/dist/timesheet-B4M1nCIm.js +0 -57
- package/dist/types/grant-user.d.ts +0 -17
- package/dist/useAppStore-CKmMR-gI.js +0 -93
- package/dist/useLoading-v4m-6mEy.js +0 -141
- package/dist/useRestaurantMap-e9fQJiLC.js +0 -39
- package/dist/views/hr/grant-user/components/GrantUserForm.vue.d.ts +0 -14
- package/dist/views/team/components/TeamMemberBasePermission.vue.d.ts +0 -36
- package/dist/views/team/components/TeamMemberMasterUser.vue.d.ts +0 -718
- /package/dist/views/{hr/grant-user/Main.vue.d.ts → audit-log/AuditLogList.vue.d.ts} +0 -0
- /package/dist/views/hr/{main.vue.d.ts → Main.vue.d.ts} +0 -0
- /package/dist/views/team/{TeamMemberList.vue.d.ts → Main.vue.d.ts} +0 -0
- /package/dist/views/team/{components → member}/MemberInfo.vue.d.ts +0 -0
|
@@ -0,0 +1,288 @@
|
|
|
1
|
+
import type { FTeamMember } from '@/types/team';
|
|
2
|
+
declare const useTeamStore: import("pinia").StoreDefinition<"team", Pick<{
|
|
3
|
+
members: import("vue").Ref<{
|
|
4
|
+
id: string;
|
|
5
|
+
name: string;
|
|
6
|
+
phoneNumber: string;
|
|
7
|
+
email: string;
|
|
8
|
+
restaurants: string[];
|
|
9
|
+
managableRestaurantIds: string[];
|
|
10
|
+
permissions: {
|
|
11
|
+
reason?: string | null | undefined | undefined;
|
|
12
|
+
conditions?: any;
|
|
13
|
+
fields?: string[] | null | undefined | undefined;
|
|
14
|
+
inverted?: boolean | null | undefined | undefined;
|
|
15
|
+
label: string;
|
|
16
|
+
subject: string;
|
|
17
|
+
actions: ("update" | "create" | "read" | "delete" | "manage")[];
|
|
18
|
+
}[];
|
|
19
|
+
permissionLabels: string[];
|
|
20
|
+
doc: {
|
|
21
|
+
id: string;
|
|
22
|
+
posUserId: string;
|
|
23
|
+
isOwner: boolean;
|
|
24
|
+
name: string;
|
|
25
|
+
phoneNumber: string;
|
|
26
|
+
email: string;
|
|
27
|
+
posUser?: {
|
|
28
|
+
code: string;
|
|
29
|
+
name: string;
|
|
30
|
+
passcode: string;
|
|
31
|
+
roles: {
|
|
32
|
+
restaurantId: string;
|
|
33
|
+
roleId: string;
|
|
34
|
+
}[];
|
|
35
|
+
} | undefined;
|
|
36
|
+
businessId: string;
|
|
37
|
+
userId: string;
|
|
38
|
+
permissions: {
|
|
39
|
+
subject: string | string[];
|
|
40
|
+
actions: string | string[];
|
|
41
|
+
fields?: string[] | undefined;
|
|
42
|
+
conditions?: Object | undefined;
|
|
43
|
+
inverted?: boolean | undefined;
|
|
44
|
+
reason?: string | undefined;
|
|
45
|
+
}[];
|
|
46
|
+
permissionSetIds: string[];
|
|
47
|
+
};
|
|
48
|
+
}[], FTeamMember[] | {
|
|
49
|
+
id: string;
|
|
50
|
+
name: string;
|
|
51
|
+
phoneNumber: string;
|
|
52
|
+
email: string;
|
|
53
|
+
restaurants: string[];
|
|
54
|
+
managableRestaurantIds: string[];
|
|
55
|
+
permissions: {
|
|
56
|
+
reason?: string | null | undefined | undefined;
|
|
57
|
+
conditions?: any;
|
|
58
|
+
fields?: string[] | null | undefined | undefined;
|
|
59
|
+
inverted?: boolean | null | undefined | undefined;
|
|
60
|
+
label: string;
|
|
61
|
+
subject: string;
|
|
62
|
+
actions: ("update" | "create" | "read" | "delete" | "manage")[];
|
|
63
|
+
}[];
|
|
64
|
+
permissionLabels: string[];
|
|
65
|
+
doc: {
|
|
66
|
+
id: string;
|
|
67
|
+
posUserId: string;
|
|
68
|
+
isOwner: boolean;
|
|
69
|
+
name: string;
|
|
70
|
+
phoneNumber: string;
|
|
71
|
+
email: string;
|
|
72
|
+
posUser?: {
|
|
73
|
+
code: string;
|
|
74
|
+
name: string;
|
|
75
|
+
passcode: string;
|
|
76
|
+
roles: {
|
|
77
|
+
restaurantId: string;
|
|
78
|
+
roleId: string;
|
|
79
|
+
}[];
|
|
80
|
+
} | undefined;
|
|
81
|
+
businessId: string;
|
|
82
|
+
userId: string;
|
|
83
|
+
permissions: {
|
|
84
|
+
subject: string | string[];
|
|
85
|
+
actions: string | string[];
|
|
86
|
+
fields?: string[] | undefined;
|
|
87
|
+
conditions?: Object | undefined;
|
|
88
|
+
inverted?: boolean | undefined;
|
|
89
|
+
reason?: string | undefined;
|
|
90
|
+
}[];
|
|
91
|
+
permissionSetIds: string[];
|
|
92
|
+
};
|
|
93
|
+
}[]>;
|
|
94
|
+
isLoading: import("vue").Ref<boolean, boolean>;
|
|
95
|
+
userIdToName: import("vue").ComputedRef<Record<string, string>>;
|
|
96
|
+
readTeamMembers: () => Promise<void>;
|
|
97
|
+
}, "isLoading" | "members">, Pick<{
|
|
98
|
+
members: import("vue").Ref<{
|
|
99
|
+
id: string;
|
|
100
|
+
name: string;
|
|
101
|
+
phoneNumber: string;
|
|
102
|
+
email: string;
|
|
103
|
+
restaurants: string[];
|
|
104
|
+
managableRestaurantIds: string[];
|
|
105
|
+
permissions: {
|
|
106
|
+
reason?: string | null | undefined | undefined;
|
|
107
|
+
conditions?: any;
|
|
108
|
+
fields?: string[] | null | undefined | undefined;
|
|
109
|
+
inverted?: boolean | null | undefined | undefined;
|
|
110
|
+
label: string;
|
|
111
|
+
subject: string;
|
|
112
|
+
actions: ("update" | "create" | "read" | "delete" | "manage")[];
|
|
113
|
+
}[];
|
|
114
|
+
permissionLabels: string[];
|
|
115
|
+
doc: {
|
|
116
|
+
id: string;
|
|
117
|
+
posUserId: string;
|
|
118
|
+
isOwner: boolean;
|
|
119
|
+
name: string;
|
|
120
|
+
phoneNumber: string;
|
|
121
|
+
email: string;
|
|
122
|
+
posUser?: {
|
|
123
|
+
code: string;
|
|
124
|
+
name: string;
|
|
125
|
+
passcode: string;
|
|
126
|
+
roles: {
|
|
127
|
+
restaurantId: string;
|
|
128
|
+
roleId: string;
|
|
129
|
+
}[];
|
|
130
|
+
} | undefined;
|
|
131
|
+
businessId: string;
|
|
132
|
+
userId: string;
|
|
133
|
+
permissions: {
|
|
134
|
+
subject: string | string[];
|
|
135
|
+
actions: string | string[];
|
|
136
|
+
fields?: string[] | undefined;
|
|
137
|
+
conditions?: Object | undefined;
|
|
138
|
+
inverted?: boolean | undefined;
|
|
139
|
+
reason?: string | undefined;
|
|
140
|
+
}[];
|
|
141
|
+
permissionSetIds: string[];
|
|
142
|
+
};
|
|
143
|
+
}[], FTeamMember[] | {
|
|
144
|
+
id: string;
|
|
145
|
+
name: string;
|
|
146
|
+
phoneNumber: string;
|
|
147
|
+
email: string;
|
|
148
|
+
restaurants: string[];
|
|
149
|
+
managableRestaurantIds: string[];
|
|
150
|
+
permissions: {
|
|
151
|
+
reason?: string | null | undefined | undefined;
|
|
152
|
+
conditions?: any;
|
|
153
|
+
fields?: string[] | null | undefined | undefined;
|
|
154
|
+
inverted?: boolean | null | undefined | undefined;
|
|
155
|
+
label: string;
|
|
156
|
+
subject: string;
|
|
157
|
+
actions: ("update" | "create" | "read" | "delete" | "manage")[];
|
|
158
|
+
}[];
|
|
159
|
+
permissionLabels: string[];
|
|
160
|
+
doc: {
|
|
161
|
+
id: string;
|
|
162
|
+
posUserId: string;
|
|
163
|
+
isOwner: boolean;
|
|
164
|
+
name: string;
|
|
165
|
+
phoneNumber: string;
|
|
166
|
+
email: string;
|
|
167
|
+
posUser?: {
|
|
168
|
+
code: string;
|
|
169
|
+
name: string;
|
|
170
|
+
passcode: string;
|
|
171
|
+
roles: {
|
|
172
|
+
restaurantId: string;
|
|
173
|
+
roleId: string;
|
|
174
|
+
}[];
|
|
175
|
+
} | undefined;
|
|
176
|
+
businessId: string;
|
|
177
|
+
userId: string;
|
|
178
|
+
permissions: {
|
|
179
|
+
subject: string | string[];
|
|
180
|
+
actions: string | string[];
|
|
181
|
+
fields?: string[] | undefined;
|
|
182
|
+
conditions?: Object | undefined;
|
|
183
|
+
inverted?: boolean | undefined;
|
|
184
|
+
reason?: string | undefined;
|
|
185
|
+
}[];
|
|
186
|
+
permissionSetIds: string[];
|
|
187
|
+
};
|
|
188
|
+
}[]>;
|
|
189
|
+
isLoading: import("vue").Ref<boolean, boolean>;
|
|
190
|
+
userIdToName: import("vue").ComputedRef<Record<string, string>>;
|
|
191
|
+
readTeamMembers: () => Promise<void>;
|
|
192
|
+
}, "userIdToName">, Pick<{
|
|
193
|
+
members: import("vue").Ref<{
|
|
194
|
+
id: string;
|
|
195
|
+
name: string;
|
|
196
|
+
phoneNumber: string;
|
|
197
|
+
email: string;
|
|
198
|
+
restaurants: string[];
|
|
199
|
+
managableRestaurantIds: string[];
|
|
200
|
+
permissions: {
|
|
201
|
+
reason?: string | null | undefined | undefined;
|
|
202
|
+
conditions?: any;
|
|
203
|
+
fields?: string[] | null | undefined | undefined;
|
|
204
|
+
inverted?: boolean | null | undefined | undefined;
|
|
205
|
+
label: string;
|
|
206
|
+
subject: string;
|
|
207
|
+
actions: ("update" | "create" | "read" | "delete" | "manage")[];
|
|
208
|
+
}[];
|
|
209
|
+
permissionLabels: string[];
|
|
210
|
+
doc: {
|
|
211
|
+
id: string;
|
|
212
|
+
posUserId: string;
|
|
213
|
+
isOwner: boolean;
|
|
214
|
+
name: string;
|
|
215
|
+
phoneNumber: string;
|
|
216
|
+
email: string;
|
|
217
|
+
posUser?: {
|
|
218
|
+
code: string;
|
|
219
|
+
name: string;
|
|
220
|
+
passcode: string;
|
|
221
|
+
roles: {
|
|
222
|
+
restaurantId: string;
|
|
223
|
+
roleId: string;
|
|
224
|
+
}[];
|
|
225
|
+
} | undefined;
|
|
226
|
+
businessId: string;
|
|
227
|
+
userId: string;
|
|
228
|
+
permissions: {
|
|
229
|
+
subject: string | string[];
|
|
230
|
+
actions: string | string[];
|
|
231
|
+
fields?: string[] | undefined;
|
|
232
|
+
conditions?: Object | undefined;
|
|
233
|
+
inverted?: boolean | undefined;
|
|
234
|
+
reason?: string | undefined;
|
|
235
|
+
}[];
|
|
236
|
+
permissionSetIds: string[];
|
|
237
|
+
};
|
|
238
|
+
}[], FTeamMember[] | {
|
|
239
|
+
id: string;
|
|
240
|
+
name: string;
|
|
241
|
+
phoneNumber: string;
|
|
242
|
+
email: string;
|
|
243
|
+
restaurants: string[];
|
|
244
|
+
managableRestaurantIds: string[];
|
|
245
|
+
permissions: {
|
|
246
|
+
reason?: string | null | undefined | undefined;
|
|
247
|
+
conditions?: any;
|
|
248
|
+
fields?: string[] | null | undefined | undefined;
|
|
249
|
+
inverted?: boolean | null | undefined | undefined;
|
|
250
|
+
label: string;
|
|
251
|
+
subject: string;
|
|
252
|
+
actions: ("update" | "create" | "read" | "delete" | "manage")[];
|
|
253
|
+
}[];
|
|
254
|
+
permissionLabels: string[];
|
|
255
|
+
doc: {
|
|
256
|
+
id: string;
|
|
257
|
+
posUserId: string;
|
|
258
|
+
isOwner: boolean;
|
|
259
|
+
name: string;
|
|
260
|
+
phoneNumber: string;
|
|
261
|
+
email: string;
|
|
262
|
+
posUser?: {
|
|
263
|
+
code: string;
|
|
264
|
+
name: string;
|
|
265
|
+
passcode: string;
|
|
266
|
+
roles: {
|
|
267
|
+
restaurantId: string;
|
|
268
|
+
roleId: string;
|
|
269
|
+
}[];
|
|
270
|
+
} | undefined;
|
|
271
|
+
businessId: string;
|
|
272
|
+
userId: string;
|
|
273
|
+
permissions: {
|
|
274
|
+
subject: string | string[];
|
|
275
|
+
actions: string | string[];
|
|
276
|
+
fields?: string[] | undefined;
|
|
277
|
+
conditions?: Object | undefined;
|
|
278
|
+
inverted?: boolean | undefined;
|
|
279
|
+
reason?: string | undefined;
|
|
280
|
+
}[];
|
|
281
|
+
permissionSetIds: string[];
|
|
282
|
+
};
|
|
283
|
+
}[]>;
|
|
284
|
+
isLoading: import("vue").Ref<boolean, boolean>;
|
|
285
|
+
userIdToName: import("vue").ComputedRef<Record<string, string>>;
|
|
286
|
+
readTeamMembers: () => Promise<void>;
|
|
287
|
+
}, "readTeamMembers">>;
|
|
288
|
+
export { useTeamStore };
|
|
@@ -7,7 +7,7 @@ export declare const useTimesheetStore: () => {
|
|
|
7
7
|
duration: string;
|
|
8
8
|
restaurantId: string;
|
|
9
9
|
restaurantName: string;
|
|
10
|
-
endedAt?: string | null | undefined;
|
|
10
|
+
endedAt?: string | null | undefined | undefined;
|
|
11
11
|
user: {
|
|
12
12
|
name: string;
|
|
13
13
|
id: string;
|
|
@@ -21,7 +21,7 @@ export declare const useTimesheetStore: () => {
|
|
|
21
21
|
duration: string;
|
|
22
22
|
restaurantId: string;
|
|
23
23
|
restaurantName: string;
|
|
24
|
-
endedAt?: string | null | undefined;
|
|
24
|
+
endedAt?: string | null | undefined | undefined;
|
|
25
25
|
user: {
|
|
26
26
|
name: string;
|
|
27
27
|
id: string;
|
|
@@ -37,7 +37,7 @@ export declare const useTimesheetStore: () => {
|
|
|
37
37
|
duration: string;
|
|
38
38
|
restaurantId: string;
|
|
39
39
|
restaurantName: string;
|
|
40
|
-
endedAt?: string | null | undefined;
|
|
40
|
+
endedAt?: string | null | undefined | undefined;
|
|
41
41
|
user: {
|
|
42
42
|
name: string;
|
|
43
43
|
id: string;
|
|
@@ -53,7 +53,7 @@ export declare const useTimesheetStore: () => {
|
|
|
53
53
|
duration: string;
|
|
54
54
|
restaurantId: string;
|
|
55
55
|
restaurantName: string;
|
|
56
|
-
endedAt?: string | null | undefined;
|
|
56
|
+
endedAt?: string | null | undefined | undefined;
|
|
57
57
|
user: {
|
|
58
58
|
name: string;
|
|
59
59
|
id: string;
|
|
@@ -67,7 +67,7 @@ export declare const useTimesheetStore: () => {
|
|
|
67
67
|
duration: string;
|
|
68
68
|
restaurantId: string;
|
|
69
69
|
restaurantName: string;
|
|
70
|
-
endedAt?: string | null | undefined;
|
|
70
|
+
endedAt?: string | null | undefined | undefined;
|
|
71
71
|
user: {
|
|
72
72
|
name: string;
|
|
73
73
|
id: string;
|
|
@@ -86,7 +86,7 @@ export declare const useTimesheetStore: () => {
|
|
|
86
86
|
duration: string;
|
|
87
87
|
restaurantId: string;
|
|
88
88
|
restaurantName: string;
|
|
89
|
-
endedAt?: string | null | undefined;
|
|
89
|
+
endedAt?: string | null | undefined | undefined;
|
|
90
90
|
user: {
|
|
91
91
|
name: string;
|
|
92
92
|
id: string;
|
|
@@ -103,7 +103,7 @@ export declare const useTimesheetStore: () => {
|
|
|
103
103
|
duration: string;
|
|
104
104
|
restaurantId: string;
|
|
105
105
|
restaurantName: string;
|
|
106
|
-
endedAt?: string | null | undefined;
|
|
106
|
+
endedAt?: string | null | undefined | undefined;
|
|
107
107
|
user: {
|
|
108
108
|
name: string;
|
|
109
109
|
id: string;
|
|
@@ -121,7 +121,7 @@ export declare const useTimesheetStore: () => {
|
|
|
121
121
|
duration: string;
|
|
122
122
|
restaurantId: string;
|
|
123
123
|
restaurantName: string;
|
|
124
|
-
endedAt?: string | null | undefined;
|
|
124
|
+
endedAt?: string | null | undefined | undefined;
|
|
125
125
|
user: {
|
|
126
126
|
name: string;
|
|
127
127
|
id: string;
|
|
@@ -135,7 +135,7 @@ export declare const useTimesheetStore: () => {
|
|
|
135
135
|
duration: string;
|
|
136
136
|
restaurantId: string;
|
|
137
137
|
restaurantName: string;
|
|
138
|
-
endedAt?: string | null | undefined;
|
|
138
|
+
endedAt?: string | null | undefined | undefined;
|
|
139
139
|
user: {
|
|
140
140
|
name: string;
|
|
141
141
|
id: string;
|
|
@@ -145,9 +145,9 @@ export declare const useTimesheetStore: () => {
|
|
|
145
145
|
}[]>;
|
|
146
146
|
readTimesheet: (start: Date, end: Date) => Promise<void>;
|
|
147
147
|
updateTimesheet: (timesheet: IFdtoTimesheet, start: string, end: string) => Promise<void>;
|
|
148
|
-
}, "timesheets">>, options?:
|
|
149
|
-
detached?: boolean
|
|
150
|
-
} & import("vue").WatchOptions
|
|
148
|
+
}, "timesheets">>, options?: {
|
|
149
|
+
detached?: boolean;
|
|
150
|
+
} & import("vue").WatchOptions): () => void;
|
|
151
151
|
$onAction(callback: import("pinia").StoreOnActionListener<"timesheet", Pick<{
|
|
152
152
|
timesheets: import("vue").Ref<{
|
|
153
153
|
start: string;
|
|
@@ -156,7 +156,7 @@ export declare const useTimesheetStore: () => {
|
|
|
156
156
|
duration: string;
|
|
157
157
|
restaurantId: string;
|
|
158
158
|
restaurantName: string;
|
|
159
|
-
endedAt?: string | null | undefined;
|
|
159
|
+
endedAt?: string | null | undefined | undefined;
|
|
160
160
|
user: {
|
|
161
161
|
name: string;
|
|
162
162
|
id: string;
|
|
@@ -170,7 +170,7 @@ export declare const useTimesheetStore: () => {
|
|
|
170
170
|
duration: string;
|
|
171
171
|
restaurantId: string;
|
|
172
172
|
restaurantName: string;
|
|
173
|
-
endedAt?: string | null | undefined;
|
|
173
|
+
endedAt?: string | null | undefined | undefined;
|
|
174
174
|
user: {
|
|
175
175
|
name: string;
|
|
176
176
|
id: string;
|
|
@@ -188,7 +188,7 @@ export declare const useTimesheetStore: () => {
|
|
|
188
188
|
duration: string;
|
|
189
189
|
restaurantId: string;
|
|
190
190
|
restaurantName: string;
|
|
191
|
-
endedAt?: string | null | undefined;
|
|
191
|
+
endedAt?: string | null | undefined | undefined;
|
|
192
192
|
user: {
|
|
193
193
|
name: string;
|
|
194
194
|
id: string;
|
|
@@ -202,7 +202,7 @@ export declare const useTimesheetStore: () => {
|
|
|
202
202
|
duration: string;
|
|
203
203
|
restaurantId: string;
|
|
204
204
|
restaurantName: string;
|
|
205
|
-
endedAt?: string | null | undefined;
|
|
205
|
+
endedAt?: string | null | undefined | undefined;
|
|
206
206
|
user: {
|
|
207
207
|
name: string;
|
|
208
208
|
id: string;
|
|
@@ -220,7 +220,7 @@ export declare const useTimesheetStore: () => {
|
|
|
220
220
|
duration: string;
|
|
221
221
|
restaurantId: string;
|
|
222
222
|
restaurantName: string;
|
|
223
|
-
endedAt?: string | null | undefined;
|
|
223
|
+
endedAt?: string | null | undefined | undefined;
|
|
224
224
|
user: {
|
|
225
225
|
name: string;
|
|
226
226
|
id: string;
|
|
@@ -234,7 +234,7 @@ export declare const useTimesheetStore: () => {
|
|
|
234
234
|
duration: string;
|
|
235
235
|
restaurantId: string;
|
|
236
236
|
restaurantName: string;
|
|
237
|
-
endedAt?: string | null | undefined;
|
|
237
|
+
endedAt?: string | null | undefined | undefined;
|
|
238
238
|
user: {
|
|
239
239
|
name: string;
|
|
240
240
|
id: string;
|
|
@@ -244,7 +244,7 @@ export declare const useTimesheetStore: () => {
|
|
|
244
244
|
}[]>;
|
|
245
245
|
readTimesheet: (start: Date, end: Date) => Promise<void>;
|
|
246
246
|
updateTimesheet: (timesheet: IFdtoTimesheet, start: string, end: string) => Promise<void>;
|
|
247
|
-
}, "readTimesheet" | "updateTimesheet">>, detached?: boolean
|
|
247
|
+
}, "readTimesheet" | "updateTimesheet">>, detached?: boolean): () => void;
|
|
248
248
|
$dispose(): void;
|
|
249
249
|
$id: "timesheet";
|
|
250
250
|
_customProperties: Set<string>;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { defineStore as c } from "pinia";
|
|
2
|
+
import { ref as t, computed as i } from "vue";
|
|
3
|
+
import { t as u } from "./index-CicR1-Jp.js";
|
|
4
|
+
const p = c("team", () => {
|
|
5
|
+
const r = t([]), a = t(!1), m = i(
|
|
6
|
+
() => Object.fromEntries(r.value.map((e) => [e.doc.userId, e.name]))
|
|
7
|
+
);
|
|
8
|
+
async function s() {
|
|
9
|
+
try {
|
|
10
|
+
a.value = !0;
|
|
11
|
+
const e = await u.readTeamMembers();
|
|
12
|
+
r.value = e.sort((o, n) => o.doc.isOwner ? -1 : o.name.localeCompare(n.name));
|
|
13
|
+
} finally {
|
|
14
|
+
a.value = !1;
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
return {
|
|
18
|
+
members: r,
|
|
19
|
+
isLoading: a,
|
|
20
|
+
userIdToName: m,
|
|
21
|
+
readTeamMembers: s
|
|
22
|
+
};
|
|
23
|
+
});
|
|
24
|
+
export {
|
|
25
|
+
p as u
|
|
26
|
+
};
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { d as i } from "./dayjs.min-DVb8OkTL.js";
|
|
2
|
+
import { defineStore as p, storeToRefs as T } from "pinia";
|
|
3
|
+
import { ref as l } from "vue";
|
|
4
|
+
import { b as c, g as y, k as u, j as S, s as g } from "./index-CicR1-Jp.js";
|
|
5
|
+
const f = {
|
|
6
|
+
async readTimesheets(t, e) {
|
|
7
|
+
return y(await c().get(`timesheet?start=${t}&end=${e}`));
|
|
8
|
+
},
|
|
9
|
+
async updateTimesheet(t, e) {
|
|
10
|
+
await c().put(`timesheet/${t}`, e);
|
|
11
|
+
}
|
|
12
|
+
};
|
|
13
|
+
function A(t) {
|
|
14
|
+
const e = t.map((o) => {
|
|
15
|
+
const { startedAt: s, endedAt: a } = o, r = i(u(s)), n = a ? i(u(a)) : null, m = (n == null ? void 0 : n.diff(r, "minute", !1)) || 0, h = n ? S(m) : "", d = "YYYY-MM-DD hh:mm a";
|
|
16
|
+
return {
|
|
17
|
+
...o,
|
|
18
|
+
start: r.format(d),
|
|
19
|
+
end: n ? n.format(d) : "",
|
|
20
|
+
totalMin: m,
|
|
21
|
+
duration: h
|
|
22
|
+
};
|
|
23
|
+
});
|
|
24
|
+
return g(e, { selector: "start" });
|
|
25
|
+
}
|
|
26
|
+
const D = p("timesheet", () => {
|
|
27
|
+
const t = l([]);
|
|
28
|
+
async function e(s, a) {
|
|
29
|
+
const r = await f.readTimesheets(
|
|
30
|
+
i(s).startOf("day").toISOString(),
|
|
31
|
+
i(a).endOf("day").toISOString()
|
|
32
|
+
);
|
|
33
|
+
t.value = A(r);
|
|
34
|
+
}
|
|
35
|
+
async function o(s, a, r) {
|
|
36
|
+
await f.updateTimesheet(s.restaurantId, {
|
|
37
|
+
id: s._id,
|
|
38
|
+
startAt: a,
|
|
39
|
+
endAt: r
|
|
40
|
+
});
|
|
41
|
+
}
|
|
42
|
+
return {
|
|
43
|
+
timesheets: t,
|
|
44
|
+
readTimesheet: e,
|
|
45
|
+
updateTimesheet: o
|
|
46
|
+
};
|
|
47
|
+
}), M = () => {
|
|
48
|
+
const t = D();
|
|
49
|
+
return {
|
|
50
|
+
...t,
|
|
51
|
+
...T(t)
|
|
52
|
+
};
|
|
53
|
+
};
|
|
54
|
+
export {
|
|
55
|
+
M as u
|
|
56
|
+
};
|