@feedmepos/mf-hrm-portal 2.4.0 → 2.4.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/{ApprovalCodeList-D62tXKEd.js → ApprovalCodeList-DpNF0wL7.js} +14 -15
- package/dist/{AuditLogList-DQOdhFJm.js → AuditLogList-D2bUFsuK.js} +12 -12
- package/dist/ConditionBuilderForm.vue_vue_type_script_setup_true_lang-BjEJErcL.js +459 -0
- package/dist/EmployeeList-CBYU0R2j.js +896 -0
- package/dist/FormSection.vue_vue_type_script_setup_true_lang-DsPLbLwQ.js +90 -0
- package/dist/{GrantUserList-DaUUILOT.js → GrantUserList-ClliuQ8h.js} +15 -16
- package/dist/{Main-Dh3E2cEf.js → Main-CBuOW87D.js} +2274 -2280
- package/dist/Main-D9MQo2l1.js +101 -0
- package/dist/{Main-B95BdgQd.js → Main-DlPdGefL.js} +5 -5
- package/dist/MyPosProfile-IAPSqlBP.js +360 -0
- package/dist/PasscodePinField.vue_vue_type_script_setup_true_lang-TXPEqa46.js +126 -0
- package/dist/{PermissionSetList-BIzlo_EV.js → PermissionSetList-Dd0fkW0L.js} +107 -108
- package/dist/PortalPermissionEditor.vue_vue_type_script_setup_true_lang-CjQCbJRu.js +4212 -0
- package/dist/PortalUserSearcher.vue_vue_type_style_index_0_scoped_827dfd60_lang-DJnIFlKq.js +1797 -0
- package/dist/RoleForm.vue_vue_type_script_setup_true_lang-hE2OZwfO.js +547 -0
- package/dist/RoleList-zZHpt079.js +274 -0
- package/dist/{ScheduleAddPositionModal.vue_vue_type_script_setup_true_lang-DsKfRa5Z.js → ScheduleAddPositionModal.vue_vue_type_script_setup_true_lang-yJwTtFyF.js} +1 -1
- package/dist/{ScheduleGeneralPage-D6NPsdrU.js → ScheduleGeneralPage-_cqIJY8R.js} +2 -2
- package/dist/{ScheduleModal.vue_vue_type_script_setup_true_lang-kYGNELLb.js → ScheduleModal.vue_vue_type_script_setup_true_lang-C6M76KUA.js} +187 -186
- package/dist/{SchedulePage-CO_ZP2QD.js → SchedulePage-DHkWe1KO.js} +16 -16
- package/dist/{SchedulePositionPage-DFjWfRwI.js → SchedulePositionPage-5JUJwlJc.js} +3 -3
- package/dist/{SelectFilter-B94Z_Fat.js → SelectFilter-DWRvb1Yl.js} +1 -1
- package/dist/TeamMemberList-C_4f5Djs.js +2082 -0
- package/dist/TimesheetList-B3Yx8cwt.js +408 -0
- package/dist/{TimesheetList.vue_vue_type_style_index_0_scoped_63294af2_lang-B97k3KNz.js → TimesheetList.vue_vue_type_style_index_0_scoped_ffd7f807_lang-Co2GtU1N.js} +7 -7
- package/dist/{app-BRlNuQIz.js → app-BA3UHSk0.js} +7688 -3881
- package/dist/app.js +3 -3
- package/dist/{approval-code-D6eLRwC7.js → approval-code-BR4FD3sx.js} +1 -1
- package/dist/{dayjs.min-BaLuYA95.js → dayjs.min-JyaQ6PUU.js} +34 -34
- package/dist/employee-n31b7QEp.js +237 -0
- package/dist/{grant-user-CdkuTYlZ.js → grant-user-DKUZdzrY.js} +1 -1
- package/dist/{iteration-t4kb_i13.js → index-CkC2sfPK.js} +573 -558
- package/dist/{lodash-Dv0NUeUP.js → lodash-BJMVlo9i.js} +1 -1
- package/dist/member-grant-B1V9g0Sb.js +54 -0
- package/dist/restaurant-BbSg6yOm.js +49 -0
- package/dist/role-iTqgtFqf.js +91 -0
- package/dist/rule-BJhti6BZ.js +845 -0
- package/dist/src/api/my-pos-profile/index.d.ts +3 -0
- package/dist/src/api/sso-provider/index.d.ts +5 -0
- package/dist/src/api/staff-invite/index.d.ts +16 -0
- package/dist/src/components/CollapsibleWrapper.vue.d.ts +11 -3
- package/dist/src/components/form/SegmentedTabs.vue.d.ts +23 -0
- package/dist/src/composables/useMenuAccess.d.ts +56 -0
- package/dist/src/composables/useSsoProviders.d.ts +19 -0
- package/dist/src/composables/useStaffInviteProviders.d.ts +8 -0
- package/dist/src/helpers/employee-merge.d.ts +33 -0
- package/dist/src/helpers/iteration.d.ts +9 -2
- package/dist/src/helpers/member-grant.d.ts +36 -0
- package/dist/src/helpers/my-pos-profile.d.ts +37 -0
- package/dist/src/helpers/permission-set.d.ts +1 -102
- package/dist/src/helpers/pos-assignment-rows.d.ts +28 -0
- package/dist/src/helpers/restaurant-lookup.d.ts +19 -0
- package/dist/src/helpers/role-merge.d.ts +11 -0
- package/dist/src/helpers/rule.d.ts +2 -2
- package/dist/src/helpers/staff-invite.d.ts +54 -0
- package/dist/src/helpers/string.d.ts +10 -1
- package/dist/src/router/menu-access-guard.d.ts +17 -0
- package/dist/src/router/shared.d.ts +3 -1
- package/dist/src/stores/restaurant.d.ts +7 -7
- package/dist/src/stores/team.d.ts +30 -0
- package/dist/src/types/my-pos-profile.d.ts +24 -0
- package/dist/src/types/sso-provider.d.ts +10 -0
- package/dist/src/types/staff-invite.d.ts +100 -0
- package/dist/src/types/team.d.ts +17 -1
- package/dist/src/views/audit-log/locales/index.d.ts +12 -0
- package/dist/src/views/hr/locales/index.d.ts +20 -0
- package/dist/src/views/hr/role/RoleForm.vue.d.ts +29 -2
- package/dist/src/views/hr/timesheet/timesheet-view.d.ts +29 -0
- package/dist/src/views/my-pos-profile/MyPosProfile.vue.d.ts +2 -0
- package/dist/src/views/my-pos-profile/components/PasscodeChangedDialog.vue.d.ts +4 -0
- package/dist/src/views/my-pos-profile/locales/index.d.ts +236 -0
- package/dist/src/views/scheduling/composables/useScheduleOnboardingAvailability.d.ts +1 -1
- package/dist/src/views/scheduling/composables/useScheduleOnboardingWizard.d.ts +1 -1
- package/dist/src/views/scheduling/composables/useScheduleShiftDraft.d.ts +1 -1
- package/dist/src/views/scheduling/composables/useScheduleShiftPopover.d.ts +1 -1
- package/dist/src/views/team/components/BasePermission.vue.d.ts +11 -0
- package/dist/src/views/team/components/ConditionPermission.vue.d.ts +11 -0
- package/dist/src/views/team/components/MemberGrantFields.vue.d.ts +51 -0
- package/dist/src/views/team/{member/MemberInfo.vue.d.ts → components/MemberStatusBadge.vue.d.ts} +2 -2
- package/dist/src/views/team/components/PortalPermissionEditor.vue.d.ts +21 -0
- package/dist/src/views/team/components/PosAssignmentRows.vue.d.ts +44 -0
- package/dist/src/views/team/components/PosRolePermission.vue.d.ts +11 -0
- package/dist/src/views/team/locales/index.d.ts +716 -0
- package/dist/src/views/team/member/AddMemberForm.vue.d.ts +48 -3
- package/dist/src/views/team/member/ExistingMemberNotice.vue.d.ts +11 -0
- package/dist/src/views/team/member/MemberDetailsCard.vue.d.ts +35 -0
- package/dist/src/views/team/member/MemberHeaderCard.vue.d.ts +19 -0
- package/dist/src/views/team/member/TeamMemberList.vue.d.ts +1 -0
- package/dist/string-DZQ1uNjn.js +22 -0
- package/dist/style.css +1 -1
- package/dist/tsconfig.app.tsbuildinfo +1 -1
- package/dist/{useAppStore-CIPpnfP7.js → useAppStore-DiGaOhje.js} +1 -1
- package/dist/{useLoading-BRCeBVXP.js → useLoading-DOcoObCD.js} +1 -1
- package/dist/{useReportPermissions-Bveud3kc.js → useReportPermissions-c9KGuXQq.js} +22 -22
- package/dist/useSsoProviders-CkhHtzRQ.js +41 -0
- package/package.json +2 -2
- package/dist/ConditionBuilderForm.vue_vue_type_script_setup_true_lang-BDT1AfXa.js +0 -438
- package/dist/EmployeeList-Bd211chl.js +0 -776
- package/dist/FormItem.vue_vue_type_script_setup_true_lang-CUBQnkkY.js +0 -45
- package/dist/FormSection.vue_vue_type_script_setup_true_lang-DknXTYiK.js +0 -49
- package/dist/Main-CvGjvEQL.js +0 -96
- package/dist/PasscodePinField.vue_vue_type_script_setup_true_lang-CqG0v0Sz.js +0 -243
- package/dist/PortalPermissionEditor.vue_vue_type_script_setup_true_lang-BYYiW77c.js +0 -4181
- package/dist/PortalUserSearcher.vue_vue_type_style_index_0_scoped_827dfd60_lang-CSYNrTGr.js +0 -35
- package/dist/RoleList-QJV3cGvV.js +0 -740
- package/dist/TeamMemberList-BbGMw0jg.js +0 -1150
- package/dist/TimesheetList-DiTCj2H7.js +0 -402
- package/dist/employee-DF_QGtpu.js +0 -209
- package/dist/restaurant-D2q9eNtu.js +0 -2685
- package/dist/role-y253W1Ep.js +0 -91
- package/dist/rule-DaFOMP6z.js +0 -780
- package/dist/string-VNuQNweN.js +0 -15
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { HrmRestaurant } from '@/types/restaurant';
|
|
2
2
|
export declare const useRestaurantStore: () => {
|
|
3
|
+
isLoading: import("vue").Ref<boolean, boolean>;
|
|
3
4
|
restaurants: import("vue").Ref<{
|
|
4
5
|
_id: string;
|
|
5
6
|
businessId: string;
|
|
@@ -19,8 +20,8 @@ export declare const useRestaurantStore: () => {
|
|
|
19
20
|
};
|
|
20
21
|
managable: boolean;
|
|
21
22
|
}[]>;
|
|
22
|
-
isLoading: import("vue").Ref<boolean, boolean>;
|
|
23
23
|
$state: {
|
|
24
|
+
isLoading: boolean;
|
|
24
25
|
restaurants: {
|
|
25
26
|
_id: string;
|
|
26
27
|
businessId: string;
|
|
@@ -31,7 +32,6 @@ export declare const useRestaurantStore: () => {
|
|
|
31
32
|
};
|
|
32
33
|
managable: boolean;
|
|
33
34
|
}[];
|
|
34
|
-
isLoading: boolean;
|
|
35
35
|
} & import("pinia").PiniaCustomStateProperties<Pick<{
|
|
36
36
|
restaurants: import("vue").Ref<{
|
|
37
37
|
_id: string;
|
|
@@ -54,8 +54,9 @@ export declare const useRestaurantStore: () => {
|
|
|
54
54
|
}[]>;
|
|
55
55
|
isLoading: import("vue").Ref<boolean, boolean>;
|
|
56
56
|
readRestaurants: (force?: boolean) => Promise<void>;
|
|
57
|
-
}, "
|
|
57
|
+
}, "isLoading" | "restaurants">>;
|
|
58
58
|
$patch(partialState: import("pinia")._DeepPartial<{
|
|
59
|
+
isLoading: boolean;
|
|
59
60
|
restaurants: {
|
|
60
61
|
_id: string;
|
|
61
62
|
businessId: string;
|
|
@@ -66,9 +67,9 @@ export declare const useRestaurantStore: () => {
|
|
|
66
67
|
};
|
|
67
68
|
managable: boolean;
|
|
68
69
|
}[];
|
|
69
|
-
isLoading: boolean;
|
|
70
70
|
}>): void;
|
|
71
71
|
$patch<F extends (state: {
|
|
72
|
+
isLoading: boolean;
|
|
72
73
|
restaurants: {
|
|
73
74
|
_id: string;
|
|
74
75
|
businessId: string;
|
|
@@ -79,7 +80,6 @@ export declare const useRestaurantStore: () => {
|
|
|
79
80
|
};
|
|
80
81
|
managable: boolean;
|
|
81
82
|
}[];
|
|
82
|
-
isLoading: boolean;
|
|
83
83
|
}) => any>(stateMutator: ReturnType<F> extends Promise<any> ? never : F): void;
|
|
84
84
|
$reset(): void;
|
|
85
85
|
$subscribe(callback: import("pinia").SubscriptionCallback<Pick<{
|
|
@@ -104,7 +104,7 @@ export declare const useRestaurantStore: () => {
|
|
|
104
104
|
}[]>;
|
|
105
105
|
isLoading: import("vue").Ref<boolean, boolean>;
|
|
106
106
|
readRestaurants: (force?: boolean) => Promise<void>;
|
|
107
|
-
}, "
|
|
107
|
+
}, "isLoading" | "restaurants">>, options?: {
|
|
108
108
|
detached?: boolean;
|
|
109
109
|
} & import("vue").WatchOptions): () => void;
|
|
110
110
|
$onAction(callback: import("pinia").StoreOnActionListener<"hrm-restaurant", Pick<{
|
|
@@ -129,7 +129,7 @@ export declare const useRestaurantStore: () => {
|
|
|
129
129
|
}[]>;
|
|
130
130
|
isLoading: import("vue").Ref<boolean, boolean>;
|
|
131
131
|
readRestaurants: (force?: boolean) => Promise<void>;
|
|
132
|
-
}, "
|
|
132
|
+
}, "isLoading" | "restaurants">, Pick<{
|
|
133
133
|
restaurants: import("vue").Ref<{
|
|
134
134
|
_id: string;
|
|
135
135
|
businessId: string;
|
|
@@ -17,6 +17,8 @@ declare const useTeamStore: import("pinia").StoreDefinition<"hrm-team", Pick<{
|
|
|
17
17
|
actions: ("update" | "create" | "read" | "delete" | "manage")[];
|
|
18
18
|
}[];
|
|
19
19
|
permissionLabels: string[];
|
|
20
|
+
status: import("@/types/team").TeamMemberStatus;
|
|
21
|
+
loginMethod: import("@/types/team").TeamMemberLoginMethod;
|
|
20
22
|
doc: {
|
|
21
23
|
id: string;
|
|
22
24
|
posUserId: string;
|
|
@@ -34,6 +36,9 @@ declare const useTeamStore: import("pinia").StoreDefinition<"hrm-team", Pick<{
|
|
|
34
36
|
roleId: string;
|
|
35
37
|
}[];
|
|
36
38
|
} | undefined;
|
|
39
|
+
employeeId?: string | null | undefined;
|
|
40
|
+
loginMethod: import("@/types/team").TeamMemberLoginMethod;
|
|
41
|
+
status: import("@/types/team").TeamMemberStatus;
|
|
37
42
|
businessId: string;
|
|
38
43
|
userId: string;
|
|
39
44
|
permissions: {
|
|
@@ -63,6 +68,8 @@ declare const useTeamStore: import("pinia").StoreDefinition<"hrm-team", Pick<{
|
|
|
63
68
|
actions: ("update" | "create" | "read" | "delete" | "manage")[];
|
|
64
69
|
}[];
|
|
65
70
|
permissionLabels: string[];
|
|
71
|
+
status: import("@/types/team").TeamMemberStatus;
|
|
72
|
+
loginMethod: import("@/types/team").TeamMemberLoginMethod;
|
|
66
73
|
doc: {
|
|
67
74
|
id: string;
|
|
68
75
|
posUserId: string;
|
|
@@ -80,6 +87,9 @@ declare const useTeamStore: import("pinia").StoreDefinition<"hrm-team", Pick<{
|
|
|
80
87
|
roleId: string;
|
|
81
88
|
}[];
|
|
82
89
|
} | undefined;
|
|
90
|
+
employeeId?: string | null | undefined;
|
|
91
|
+
loginMethod: import("@/types/team").TeamMemberLoginMethod;
|
|
92
|
+
status: import("@/types/team").TeamMemberStatus;
|
|
83
93
|
businessId: string;
|
|
84
94
|
userId: string;
|
|
85
95
|
permissions: {
|
|
@@ -119,6 +129,8 @@ declare const useTeamStore: import("pinia").StoreDefinition<"hrm-team", Pick<{
|
|
|
119
129
|
actions: ("update" | "create" | "read" | "delete" | "manage")[];
|
|
120
130
|
}[];
|
|
121
131
|
permissionLabels: string[];
|
|
132
|
+
status: import("@/types/team").TeamMemberStatus;
|
|
133
|
+
loginMethod: import("@/types/team").TeamMemberLoginMethod;
|
|
122
134
|
doc: {
|
|
123
135
|
id: string;
|
|
124
136
|
posUserId: string;
|
|
@@ -136,6 +148,9 @@ declare const useTeamStore: import("pinia").StoreDefinition<"hrm-team", Pick<{
|
|
|
136
148
|
roleId: string;
|
|
137
149
|
}[];
|
|
138
150
|
} | undefined;
|
|
151
|
+
employeeId?: string | null | undefined;
|
|
152
|
+
loginMethod: import("@/types/team").TeamMemberLoginMethod;
|
|
153
|
+
status: import("@/types/team").TeamMemberStatus;
|
|
139
154
|
businessId: string;
|
|
140
155
|
userId: string;
|
|
141
156
|
permissions: {
|
|
@@ -165,6 +180,8 @@ declare const useTeamStore: import("pinia").StoreDefinition<"hrm-team", Pick<{
|
|
|
165
180
|
actions: ("update" | "create" | "read" | "delete" | "manage")[];
|
|
166
181
|
}[];
|
|
167
182
|
permissionLabels: string[];
|
|
183
|
+
status: import("@/types/team").TeamMemberStatus;
|
|
184
|
+
loginMethod: import("@/types/team").TeamMemberLoginMethod;
|
|
168
185
|
doc: {
|
|
169
186
|
id: string;
|
|
170
187
|
posUserId: string;
|
|
@@ -182,6 +199,9 @@ declare const useTeamStore: import("pinia").StoreDefinition<"hrm-team", Pick<{
|
|
|
182
199
|
roleId: string;
|
|
183
200
|
}[];
|
|
184
201
|
} | undefined;
|
|
202
|
+
employeeId?: string | null | undefined;
|
|
203
|
+
loginMethod: import("@/types/team").TeamMemberLoginMethod;
|
|
204
|
+
status: import("@/types/team").TeamMemberStatus;
|
|
185
205
|
businessId: string;
|
|
186
206
|
userId: string;
|
|
187
207
|
permissions: {
|
|
@@ -221,6 +241,8 @@ declare const useTeamStore: import("pinia").StoreDefinition<"hrm-team", Pick<{
|
|
|
221
241
|
actions: ("update" | "create" | "read" | "delete" | "manage")[];
|
|
222
242
|
}[];
|
|
223
243
|
permissionLabels: string[];
|
|
244
|
+
status: import("@/types/team").TeamMemberStatus;
|
|
245
|
+
loginMethod: import("@/types/team").TeamMemberLoginMethod;
|
|
224
246
|
doc: {
|
|
225
247
|
id: string;
|
|
226
248
|
posUserId: string;
|
|
@@ -238,6 +260,9 @@ declare const useTeamStore: import("pinia").StoreDefinition<"hrm-team", Pick<{
|
|
|
238
260
|
roleId: string;
|
|
239
261
|
}[];
|
|
240
262
|
} | undefined;
|
|
263
|
+
employeeId?: string | null | undefined;
|
|
264
|
+
loginMethod: import("@/types/team").TeamMemberLoginMethod;
|
|
265
|
+
status: import("@/types/team").TeamMemberStatus;
|
|
241
266
|
businessId: string;
|
|
242
267
|
userId: string;
|
|
243
268
|
permissions: {
|
|
@@ -267,6 +292,8 @@ declare const useTeamStore: import("pinia").StoreDefinition<"hrm-team", Pick<{
|
|
|
267
292
|
actions: ("update" | "create" | "read" | "delete" | "manage")[];
|
|
268
293
|
}[];
|
|
269
294
|
permissionLabels: string[];
|
|
295
|
+
status: import("@/types/team").TeamMemberStatus;
|
|
296
|
+
loginMethod: import("@/types/team").TeamMemberLoginMethod;
|
|
270
297
|
doc: {
|
|
271
298
|
id: string;
|
|
272
299
|
posUserId: string;
|
|
@@ -284,6 +311,9 @@ declare const useTeamStore: import("pinia").StoreDefinition<"hrm-team", Pick<{
|
|
|
284
311
|
roleId: string;
|
|
285
312
|
}[];
|
|
286
313
|
} | undefined;
|
|
314
|
+
employeeId?: string | null | undefined;
|
|
315
|
+
loginMethod: import("@/types/team").TeamMemberLoginMethod;
|
|
316
|
+
status: import("@/types/team").TeamMemberStatus;
|
|
287
317
|
businessId: string;
|
|
288
318
|
userId: string;
|
|
289
319
|
permissions: {
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/** GET /my-pos-profile response (shared contract with the HRM menu, KDI-5225). */
|
|
2
|
+
export interface FdtoMyPosProfile {
|
|
3
|
+
hasPosUser: boolean;
|
|
4
|
+
profile: null | {
|
|
5
|
+
name: string;
|
|
6
|
+
/** The caller's own current passcode, shown on reveal (D50). */
|
|
7
|
+
passcode: string;
|
|
8
|
+
phoneNumber: string | null;
|
|
9
|
+
email: string | null;
|
|
10
|
+
assignments: {
|
|
11
|
+
restaurantId: string;
|
|
12
|
+
restaurantName: string;
|
|
13
|
+
restaurantCode: string | null;
|
|
14
|
+
roleId: string;
|
|
15
|
+
roleName: string;
|
|
16
|
+
}[];
|
|
17
|
+
passcodeUpdatedAt: string | null;
|
|
18
|
+
};
|
|
19
|
+
}
|
|
20
|
+
export type FdtoMyPosProfileAssignment = NonNullable<FdtoMyPosProfile['profile']>['assignments'][number];
|
|
21
|
+
export interface FdtoRegenerateMyPosPasscodeRes {
|
|
22
|
+
passcode: string;
|
|
23
|
+
passcodeUpdatedAt: string;
|
|
24
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { StaffInviteMatch } from '@/types/staff-invite';
|
|
2
|
+
/** A business's SSO provider (GET /businesses/:businessId/sso-providers), on or off. */
|
|
3
|
+
export interface IFdtoSsoProvider {
|
|
4
|
+
slug: string;
|
|
5
|
+
label: string;
|
|
6
|
+
type: string;
|
|
7
|
+
enabled: boolean;
|
|
8
|
+
/** The key invites match people on; `none` turns invites off for this provider. */
|
|
9
|
+
inviteMatch: StaffInviteMatch | 'none';
|
|
10
|
+
}
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
import type { FdoPermissionRule } from '@feedmepos/core/entity';
|
|
2
|
+
import type { IFdtoPermissionPosUser } from '@/types/team';
|
|
3
|
+
/** Wire contract: account-service-zus-lark-sso/part-b-contract.md §2.2. */
|
|
4
|
+
export type StaffInviteMatch = 'mobile' | 'email';
|
|
5
|
+
export type StaffInviteWarning = 'not_in_org' | 'dm_unavailable' | 'dm_failed';
|
|
6
|
+
export declare const STAFF_INVITE_ERROR_CODES: readonly ["provider_unavailable", "key_mismatch", "key_required", "invalid_key", "invalid_contact", "already_member", "ambiguous_account", "invite_exists", "not_pending"];
|
|
7
|
+
export type StaffInviteErrorCode = (typeof STAFF_INVITE_ERROR_CODES)[number];
|
|
8
|
+
export type StaffInvitePosUser = IFdtoPermissionPosUser | null;
|
|
9
|
+
export type StaffInviteDmStatus = 'sent' | 'not_in_org' | 'unsupported' | 'failed';
|
|
10
|
+
export interface IFdtoStaffInviteProvider {
|
|
11
|
+
slug: string;
|
|
12
|
+
label: string;
|
|
13
|
+
type: string;
|
|
14
|
+
inviteMatch: StaffInviteMatch;
|
|
15
|
+
}
|
|
16
|
+
export interface IFdtoStaffInviteGrant {
|
|
17
|
+
permissions: FdoPermissionRule[];
|
|
18
|
+
customPermissions: FdoPermissionRule[];
|
|
19
|
+
permissionSetIds: string[];
|
|
20
|
+
posUser: StaffInvitePosUser;
|
|
21
|
+
}
|
|
22
|
+
export interface IFdtoStaffInvite {
|
|
23
|
+
_id: string;
|
|
24
|
+
businessId: string;
|
|
25
|
+
provider: string;
|
|
26
|
+
match: StaffInviteMatch;
|
|
27
|
+
mobile?: string;
|
|
28
|
+
email?: string;
|
|
29
|
+
/** The other way to reach them; never matched on. */
|
|
30
|
+
contact?: {
|
|
31
|
+
mobile?: string;
|
|
32
|
+
email?: string;
|
|
33
|
+
};
|
|
34
|
+
displayName?: string;
|
|
35
|
+
employeeId?: string | null;
|
|
36
|
+
grant: IFdtoStaffInviteGrant;
|
|
37
|
+
status: 'pending' | 'claiming' | 'claimed' | 'revoked';
|
|
38
|
+
createdBy: string;
|
|
39
|
+
createdAt: string;
|
|
40
|
+
updatedAt: string;
|
|
41
|
+
claimedBy?: string;
|
|
42
|
+
claimedAt?: string;
|
|
43
|
+
claimOutcome?: 'granted' | 'already_member' | 'granted_without_pos';
|
|
44
|
+
posConflict?: {
|
|
45
|
+
restaurantId: string;
|
|
46
|
+
reason: 'passcode_taken';
|
|
47
|
+
}[];
|
|
48
|
+
dm?: {
|
|
49
|
+
status: StaffInviteDmStatus;
|
|
50
|
+
at: string;
|
|
51
|
+
};
|
|
52
|
+
revokedBy?: string;
|
|
53
|
+
revokedAt?: string;
|
|
54
|
+
}
|
|
55
|
+
export interface IFdtoCreateStaffInviteReq {
|
|
56
|
+
provider: string;
|
|
57
|
+
/** The sign-in key; the other of mobile/email is contact only. */
|
|
58
|
+
match: StaffInviteMatch;
|
|
59
|
+
mobile?: string;
|
|
60
|
+
email?: string;
|
|
61
|
+
displayName: string;
|
|
62
|
+
employeeId?: string;
|
|
63
|
+
permissions: FdoPermissionRule[];
|
|
64
|
+
customPermissions: FdoPermissionRule[];
|
|
65
|
+
permissionSetIds?: string[];
|
|
66
|
+
posUser?: StaffInvitePosUser;
|
|
67
|
+
}
|
|
68
|
+
/** The key is fixed: only the mobile/email that isn't the key applies ('' clears it). */
|
|
69
|
+
export type IFdtoUpdateStaffInviteReq = Omit<IFdtoCreateStaffInviteReq, 'provider' | 'match'>;
|
|
70
|
+
/** Who already answers to a sign-in key: a member, or an open invite. */
|
|
71
|
+
export type IFdtoStaffInviteLookup = {
|
|
72
|
+
kind: 'member';
|
|
73
|
+
id: string;
|
|
74
|
+
name: string;
|
|
75
|
+
restaurantCount: number;
|
|
76
|
+
isOwner: boolean;
|
|
77
|
+
} | {
|
|
78
|
+
kind: 'invite';
|
|
79
|
+
id: string;
|
|
80
|
+
name: string;
|
|
81
|
+
restaurantCount: number;
|
|
82
|
+
invite: IFdtoStaffInvite;
|
|
83
|
+
};
|
|
84
|
+
export type IFdtoCreateStaffInviteRes = {
|
|
85
|
+
result: 'added';
|
|
86
|
+
uid: string;
|
|
87
|
+
portalUserId: string;
|
|
88
|
+
warnings: StaffInviteWarning[];
|
|
89
|
+
} | {
|
|
90
|
+
result: 'invited';
|
|
91
|
+
invite: IFdtoStaffInvite;
|
|
92
|
+
warnings: StaffInviteWarning[];
|
|
93
|
+
};
|
|
94
|
+
export interface IFdtoResendStaffInviteRes {
|
|
95
|
+
dm: {
|
|
96
|
+
status: StaffInviteDmStatus;
|
|
97
|
+
at: string;
|
|
98
|
+
};
|
|
99
|
+
warnings: StaffInviteWarning[];
|
|
100
|
+
}
|
package/dist/src/types/team.d.ts
CHANGED
|
@@ -19,7 +19,12 @@ export interface IFdtoPortalUser extends IPermissionUser {
|
|
|
19
19
|
phoneNumber: string;
|
|
20
20
|
email: string;
|
|
21
21
|
posUser?: IFdtoPermissionPosUser;
|
|
22
|
+
employeeId?: string | null;
|
|
23
|
+
loginMethod: TeamMemberLoginMethod;
|
|
24
|
+
status: TeamMemberStatus;
|
|
22
25
|
}
|
|
26
|
+
export type TeamMemberStatus = 'active' | 'invited';
|
|
27
|
+
export type TeamMemberLoginMethod = 'sso' | 'feedme';
|
|
23
28
|
export interface IFdtoPortalUserPage {
|
|
24
29
|
items: IFdtoPortalUser[];
|
|
25
30
|
total: number;
|
|
@@ -34,10 +39,16 @@ export interface IFdtoPermissionPosUserRole {
|
|
|
34
39
|
restaurantId: string;
|
|
35
40
|
roleId: string;
|
|
36
41
|
}
|
|
42
|
+
/** On a member edit `passcode` is sent only when the admin changed it; absent keeps the stored one. */
|
|
43
|
+
export type IFdtoUpdatePermissionPosUser = Omit<IFdtoPermissionPosUser, 'passcode'> & {
|
|
44
|
+
passcode?: string;
|
|
45
|
+
};
|
|
37
46
|
export interface IFdtoUpdatePortalUserReq {
|
|
47
|
+
/** Absent keeps the stored one; '' clears it. */
|
|
48
|
+
employeeId?: string;
|
|
38
49
|
/** @deprecated use customPermissions instead */
|
|
39
50
|
permissions?: FdoPermissionRule[];
|
|
40
|
-
posUser?:
|
|
51
|
+
posUser?: IFdtoUpdatePermissionPosUser | null;
|
|
41
52
|
permissionSetIds?: string[];
|
|
42
53
|
customPermissions?: FdoPermissionRule[];
|
|
43
54
|
}
|
|
@@ -49,6 +60,7 @@ export interface IFdtoCreatePortalUserReq {
|
|
|
49
60
|
permissionSetIds?: string[];
|
|
50
61
|
customPermissions: FdoPermissionRule[];
|
|
51
62
|
name?: string;
|
|
63
|
+
employeeId?: string;
|
|
52
64
|
posUser?: IFdtoPermissionPosUser | null;
|
|
53
65
|
}
|
|
54
66
|
export interface FTeamMember {
|
|
@@ -60,6 +72,8 @@ export interface FTeamMember {
|
|
|
60
72
|
managableRestaurantIds: string[] | null;
|
|
61
73
|
permissions: FdoPermissionRule[];
|
|
62
74
|
permissionLabels: string[];
|
|
75
|
+
status: TeamMemberStatus;
|
|
76
|
+
loginMethod: TeamMemberLoginMethod;
|
|
63
77
|
doc: IFdtoPortalUser;
|
|
64
78
|
}
|
|
65
79
|
export interface IReadTeamMembersPageReq {
|
|
@@ -69,6 +83,8 @@ export interface IReadTeamMembersPageReq {
|
|
|
69
83
|
restaurantIds?: string[];
|
|
70
84
|
permissionSubjects?: string[];
|
|
71
85
|
permissionSetIds?: string[];
|
|
86
|
+
statuses?: TeamMemberStatus[];
|
|
87
|
+
loginMethods?: TeamMemberLoginMethod[];
|
|
72
88
|
}
|
|
73
89
|
export interface IFdtoTeamMemberPage {
|
|
74
90
|
items: FTeamMember[];
|
|
@@ -268,6 +268,9 @@ export declare const i18nMessages: {
|
|
|
268
268
|
update: string;
|
|
269
269
|
delete: string;
|
|
270
270
|
"generate-passcode": string;
|
|
271
|
+
invite: string;
|
|
272
|
+
"invite-update": string;
|
|
273
|
+
"invite-revoke": string;
|
|
271
274
|
};
|
|
272
275
|
"pos-user": {
|
|
273
276
|
list: string;
|
|
@@ -627,6 +630,9 @@ export declare const i18nMessages: {
|
|
|
627
630
|
update: string;
|
|
628
631
|
delete: string;
|
|
629
632
|
"generate-passcode": string;
|
|
633
|
+
invite: string;
|
|
634
|
+
"invite-update": string;
|
|
635
|
+
"invite-revoke": string;
|
|
630
636
|
};
|
|
631
637
|
"pos-user": {
|
|
632
638
|
list: string;
|
|
@@ -986,6 +992,9 @@ export declare const i18nMessages: {
|
|
|
986
992
|
update: string;
|
|
987
993
|
delete: string;
|
|
988
994
|
"generate-passcode": string;
|
|
995
|
+
invite: string;
|
|
996
|
+
"invite-update": string;
|
|
997
|
+
"invite-revoke": string;
|
|
989
998
|
};
|
|
990
999
|
"pos-user": {
|
|
991
1000
|
list: string;
|
|
@@ -1345,6 +1354,9 @@ export declare const i18nMessages: {
|
|
|
1345
1354
|
update: string;
|
|
1346
1355
|
delete: string;
|
|
1347
1356
|
"generate-passcode": string;
|
|
1357
|
+
invite: string;
|
|
1358
|
+
"invite-update": string;
|
|
1359
|
+
"invite-revoke": string;
|
|
1348
1360
|
};
|
|
1349
1361
|
"pos-user": {
|
|
1350
1362
|
list: string;
|
|
@@ -160,6 +160,11 @@ export declare const i18nMessages: {
|
|
|
160
160
|
"report:timesheet": string;
|
|
161
161
|
"report:counterPayment": string;
|
|
162
162
|
};
|
|
163
|
+
addTitle: string;
|
|
164
|
+
permissionsSubtitle: string;
|
|
165
|
+
namePlaceholder: string;
|
|
166
|
+
permissionAllowed: string;
|
|
167
|
+
permissionsAllowed: string;
|
|
163
168
|
};
|
|
164
169
|
noData: {
|
|
165
170
|
title: string;
|
|
@@ -368,6 +373,11 @@ export declare const i18nMessages: {
|
|
|
368
373
|
"report:timesheet": string;
|
|
369
374
|
"report:counterPayment": string;
|
|
370
375
|
};
|
|
376
|
+
addTitle: string;
|
|
377
|
+
permissionsSubtitle: string;
|
|
378
|
+
namePlaceholder: string;
|
|
379
|
+
permissionAllowed: string;
|
|
380
|
+
permissionsAllowed: string;
|
|
371
381
|
};
|
|
372
382
|
noData: {
|
|
373
383
|
title: string;
|
|
@@ -576,6 +586,11 @@ export declare const i18nMessages: {
|
|
|
576
586
|
"report:timesheet": string;
|
|
577
587
|
"report:counterPayment": string;
|
|
578
588
|
};
|
|
589
|
+
addTitle: string;
|
|
590
|
+
permissionsSubtitle: string;
|
|
591
|
+
namePlaceholder: string;
|
|
592
|
+
permissionAllowed: string;
|
|
593
|
+
permissionsAllowed: string;
|
|
579
594
|
};
|
|
580
595
|
noData: {
|
|
581
596
|
title: string;
|
|
@@ -783,6 +798,11 @@ export declare const i18nMessages: {
|
|
|
783
798
|
"report:timesheet": string;
|
|
784
799
|
"report:counterPayment": string;
|
|
785
800
|
};
|
|
801
|
+
addTitle: string;
|
|
802
|
+
permissionsSubtitle: string;
|
|
803
|
+
namePlaceholder: string;
|
|
804
|
+
permissionAllowed: string;
|
|
805
|
+
permissionsAllowed: string;
|
|
786
806
|
};
|
|
787
807
|
noData: {
|
|
788
808
|
title: string;
|
|
@@ -1,17 +1,44 @@
|
|
|
1
|
+
import { type PropType } from 'vue';
|
|
1
2
|
declare const _default: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
2
3
|
id: {
|
|
3
4
|
type: StringConstructor;
|
|
4
5
|
default: undefined;
|
|
5
6
|
};
|
|
7
|
+
/** Outlets ticked when creating a role (the member sheet passes the row's outlets). */
|
|
8
|
+
restaurantIds: {
|
|
9
|
+
type: PropType<string[]>;
|
|
10
|
+
default: () => never[];
|
|
11
|
+
};
|
|
12
|
+
/** Opened over another sheet: a back arrow returns to it. */
|
|
13
|
+
showBack: {
|
|
14
|
+
type: BooleanConstructor;
|
|
15
|
+
default: boolean;
|
|
16
|
+
};
|
|
6
17
|
}>, {
|
|
7
18
|
show: import("vue").Ref<boolean, boolean>;
|
|
8
19
|
trigger: () => void;
|
|
9
|
-
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}
|
|
20
|
+
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
21
|
+
created: (roleId: string) => any;
|
|
22
|
+
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
10
23
|
id: {
|
|
11
24
|
type: StringConstructor;
|
|
12
25
|
default: undefined;
|
|
13
26
|
};
|
|
14
|
-
|
|
27
|
+
/** Outlets ticked when creating a role (the member sheet passes the row's outlets). */
|
|
28
|
+
restaurantIds: {
|
|
29
|
+
type: PropType<string[]>;
|
|
30
|
+
default: () => never[];
|
|
31
|
+
};
|
|
32
|
+
/** Opened over another sheet: a back arrow returns to it. */
|
|
33
|
+
showBack: {
|
|
34
|
+
type: BooleanConstructor;
|
|
35
|
+
default: boolean;
|
|
36
|
+
};
|
|
37
|
+
}>> & Readonly<{
|
|
38
|
+
onCreated?: ((roleId: string) => any) | undefined;
|
|
39
|
+
}>, {
|
|
15
40
|
id: string;
|
|
41
|
+
restaurantIds: string[];
|
|
42
|
+
showBack: boolean;
|
|
16
43
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
17
44
|
export default _default;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import type { Employee } from '@/types/employee';
|
|
2
|
+
import type { HrmRestaurant } from '@/types/restaurant';
|
|
3
|
+
import type { Timesheet } from '@/types/timesheet';
|
|
4
|
+
/** A list-view row: the timesheet with its outlet code and the employee's code. */
|
|
5
|
+
export type TimesheetRow = Timesheet & {
|
|
6
|
+
restaurantCode?: string;
|
|
7
|
+
user: Timesheet['user'] & {
|
|
8
|
+
code?: string;
|
|
9
|
+
};
|
|
10
|
+
};
|
|
11
|
+
/** A user-view row: one employee name with their timesheets and the total time. */
|
|
12
|
+
export interface TimesheetGroup {
|
|
13
|
+
key: string;
|
|
14
|
+
user: string;
|
|
15
|
+
code: string | undefined;
|
|
16
|
+
timesheets: TimesheetRow[];
|
|
17
|
+
total: string;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Timesheets in the selected outlets (a falsy selection means all) with the outlet code and
|
|
21
|
+
* the employee code attached. Both lookups are built once per call instead of scanning every
|
|
22
|
+
* outlet and every employee per timesheet.
|
|
23
|
+
*/
|
|
24
|
+
export declare function attachTimesheetCodes(timesheets: readonly Timesheet[], restaurants: readonly HrmRestaurant[], employees: readonly Employee[], selectedRestaurantIds: readonly string[] | null | undefined): TimesheetRow[];
|
|
25
|
+
/**
|
|
26
|
+
* Rows grouped by employee name and sorted by it. A group's code is its first timesheet's
|
|
27
|
+
* employee code (or the row's own code when that employee is gone).
|
|
28
|
+
*/
|
|
29
|
+
export declare function groupTimesheetsByUser(rows: readonly TimesheetRow[], employees: readonly Employee[]): TimesheetGroup[];
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
2
|
+
export default _default;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
declare const _default: import("vue").DefineComponent<{}, {
|
|
2
|
+
open: (code: string, as?: "changed" | "generated") => void;
|
|
3
|
+
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
4
|
+
export default _default;
|