@feedmepos/mf-hrm-portal 2.1.1-dev.3 → 2.1.1-dev.5

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.
Files changed (32) hide show
  1. package/dist/ApprovalCodeList-CXJyMKEg.js +757 -0
  2. package/dist/{AuditLogList-Q4L5Te8O.js → AuditLogList-CXUkbDyT.js} +3 -3
  3. package/dist/{EmployeeList-GtKmJZbf.js → EmployeeList-BSfUFTcN.js} +4 -4
  4. package/dist/{GrantUserList-CnLjOi5_.js → GrantUserList-DKP4MBQM.js} +175 -182
  5. package/dist/Main-CblWfQk_.js +122 -0
  6. package/dist/{Main-cskEZ3k_.js → Main-CyCfz4ka.js} +9 -9
  7. package/dist/{Main-DLlpEU3j.js → Main-Cz1pfe2k.js} +5 -5
  8. package/dist/{PermissionSetList-C2fK2pTz.js → PermissionSetList-BwyblSeE.js} +5 -5
  9. package/dist/{PortalPermissionEditor.vue_vue_type_script_setup_true_lang-CMh0DL1_.js → PortalPermissionEditor.vue_vue_type_script_setup_true_lang-BJ-PZ2Nv.js} +599 -599
  10. package/dist/{RoleList-CcuT1ERb.js → RoleList-CXYgCmHp.js} +6 -6
  11. package/dist/{TeamMemberList-Dfs2iNdC.js → TeamMemberList-CnLbqaPS.js} +6 -6
  12. package/dist/{TimesheetList-B1H_6zfP.js → TimesheetList-s_bP5OGA.js} +5 -5
  13. package/dist/{TimesheetList.vue_vue_type_style_index_0_scoped_91afda4e_lang-DeTpbaRk.js → TimesheetList.vue_vue_type_style_index_0_scoped_91afda4e_lang-BCLv-2Re.js} +2 -2
  14. package/dist/{app-DX-PG6wx.js → app-BP0oihBR.js} +783 -752
  15. package/dist/app.js +1 -1
  16. package/dist/{dayjs.min-BJrHE7oz.js → dayjs.min-BTSZLci9.js} +1 -1
  17. package/dist/{employee-BJcqtqLM.js → employee-BPv1j6T4.js} +3 -3
  18. package/dist/{iteration-Cfaqt-0s.js → iteration-BNA1cEos.js} +1 -1
  19. package/dist/{lodash-ClKqCmlZ.js → lodash-DKG9IyB-.js} +1 -1
  20. package/dist/{role-CR_-nBDY.js → role-BS3LFO8u.js} +1 -1
  21. package/dist/{rule-BB-3S-2R.js → rule-DaSLVZWm.js} +2 -2
  22. package/dist/src/stores/approval-code.d.ts +6 -6
  23. package/dist/src/types/approval-code.d.ts +60 -20
  24. package/dist/src/views/approval-code/ApprovalCodeList.vue.d.ts +1 -1
  25. package/dist/src/views/approval-code/components/ApprovalCodeCreatedDialog.vue.d.ts +9 -0
  26. package/dist/src/views/approval-code/components/ApprovalCodeForm.vue.d.ts +6 -1
  27. package/dist/src/views/approval-code/locales/index.d.ts +44 -12
  28. package/dist/tsconfig.app.tsbuildinfo +1 -1
  29. package/dist/{useReportPermissions-ybHA26cJ.js → useReportPermissions-J3-DjopO.js} +3 -3
  30. package/package.json +1 -1
  31. package/dist/ApprovalCodeList-BH5sgVMU.js +0 -638
  32. package/dist/Main-Cn7Dawg4.js +0 -120
@@ -1,13 +1,13 @@
1
1
  import { defineComponent as Xe, ref as f, computed as h, onMounted as Vt, onBeforeUnmount as Et, watch as Q, resolveComponent as C, createElementBlock as M, openBlock as y, createBlock as Z, createCommentVNode as N, createElementVNode as a, Fragment as ee, renderList as re, withCtx as z, createVNode as p, toDisplayString as i, unref as n, nextTick as Rt } from "vue";
2
- import { d as x } from "./dayjs.min-BJrHE7oz.js";
2
+ import { d as x } from "./dayjs.min-BTSZLci9.js";
3
3
  import { useI18n as Qe, useCoreStore as Ct } from "@feedmepos/mf-common";
4
- import { G as He, _ as Ut } from "./app-DX-PG6wx.js";
4
+ import { G as He, _ as Ut } from "./app-BP0oihBR.js";
5
5
  import { components as We } from "@feedmepos/ui-library";
6
6
  import { g as Ae, b as Fe } from "./restaurant-YOVMuuFY.js";
7
7
  import { S as be, _ as $t } from "./SelectFilter-ATOm0hdn.js";
8
8
  import { _ as Nt } from "./PageLayout.vue_vue_type_script_setup_true_lang-HKK4cbW8.js";
9
9
  import { _ as Yt } from "./index.vue_vue_type_script_setup_true_lang-BVVwfd7B.js";
10
- import { t as Bt, p as Je } from "./rule-BB-3S-2R.js";
10
+ import { t as Bt, p as Je } from "./rule-DaSLVZWm.js";
11
11
  import { defineStore as Kt } from "pinia";
12
12
  const ue = [
13
13
  { key: "all", label: "All", subjectPrefixes: [] },
@@ -2,17 +2,17 @@ import { defineComponent as Ee, computed as b, createElementBlock as C, openBloc
2
2
  import { useI18n as Be, useCoreStore as We } from "@feedmepos/mf-common";
3
3
  import { useBreakpoints as Te, useSnackbar as Ne, components as ze, useDialog as Qe } from "@feedmepos/ui-library";
4
4
  import { S as pe, _ as Ye } from "./SelectFilter-ATOm0hdn.js";
5
- import { _ as Ze, a as Xe } from "./app-DX-PG6wx.js";
5
+ import { _ as Ze, a as Xe } from "./app-BP0oihBR.js";
6
6
  import { _ as Ce, u as et, H as tt } from "./FormItem.vue_vue_type_script_setup_true_lang-DPT2FoIc.js";
7
7
  import { u as at, _ as lt } from "./useDiscardConfirm-DPhEV6v0.js";
8
8
  import { _ as Re } from "./index.vue_vue_type_script_setup_true_lang-BVVwfd7B.js";
9
9
  import { u as st, _ as $e } from "./useDebounce-CWb5QR9G.js";
10
- import { u as Oe, E as ot } from "./employee-BJcqtqLM.js";
10
+ import { u as Oe, E as ot } from "./employee-BPv1j6T4.js";
11
11
  import { u as Ke } from "./restaurant-YOVMuuFY.js";
12
- import { l as rt } from "./lodash-ClKqCmlZ.js";
12
+ import { l as rt } from "./lodash-DKG9IyB-.js";
13
13
  import { _ as Ue } from "./FormSection.vue_vue_type_script_setup_true_lang-DknXTYiK.js";
14
14
  import { u as je } from "./useLoading-BH02lYns.js";
15
- import { u as xe } from "./role-CR_-nBDY.js";
15
+ import { u as xe } from "./role-BS3LFO8u.js";
16
16
  /* empty css */
17
17
  const nt = {
18
18
  key: 0,
@@ -1,127 +1,128 @@
1
- import { defineComponent as Z, ref as S, computed as g, watch as ue, resolveComponent as _, createElementBlock as z, openBlock as x, Fragment as P, renderSlot as de, createVNode as l, unref as s, withCtx as y, createElementVNode as o, toDisplayString as f, createBlock as j, isRef as J, renderList as me, createCommentVNode as pe, withModifiers as Q, createTextVNode as X, normalizeClass as ve, h as p } from "vue";
1
+ import { defineComponent as Z, ref as S, computed as f, watch as de, resolveComponent as v, createElementBlock as D, openBlock as b, Fragment as P, renderSlot as me, createVNode as l, unref as s, withCtx as y, createElementVNode as n, toDisplayString as _, createBlock as O, isRef as W, renderList as pe, createCommentVNode as fe, withModifiers as J, createTextVNode as Q, normalizeClass as ve, h as p } from "vue";
2
+ import { d as ge } from "./dayjs.min-BTSZLci9.js";
2
3
  import { useI18n as ee } from "@feedmepos/mf-common";
3
- import { useSnackbar as te, components as A, useDialog as fe, useBreakpoints as ge, FmButtonVariant as E } from "@feedmepos/ui-library";
4
- import { S as L } from "./SelectFilter-ATOm0hdn.js";
5
- import { _ as _e } from "./app-DX-PG6wx.js";
6
- import { _ as Y, u as ye, H as Ue } from "./FormItem.vue_vue_type_script_setup_true_lang-DPT2FoIc.js";
7
- import { _ as he } from "./index.vue_vue_type_script_setup_true_lang-BVVwfd7B.js";
4
+ import { useSnackbar as te, components as K, useDialog as _e, useBreakpoints as ye, FmButtonVariant as E } from "@feedmepos/ui-library";
5
+ import { S as A } from "./SelectFilter-ATOm0hdn.js";
6
+ import { _ as Ue } from "./app-BP0oihBR.js";
7
+ import { _ as X, u as he, H as xe } from "./FormItem.vue_vue_type_script_setup_true_lang-DPT2FoIc.js";
8
+ import { _ as be } from "./index.vue_vue_type_script_setup_true_lang-BVVwfd7B.js";
8
9
  import { u as ae } from "./useLoading-BH02lYns.js";
9
10
  import { u as se } from "./grant-user-CQZaTzVt.js";
10
11
  import { u as re } from "./restaurant-YOVMuuFY.js";
11
- import { u as le } from "./role-CR_-nBDY.js";
12
- import { _ as xe } from "./FormSection.vue_vue_type_script_setup_true_lang-DknXTYiK.js";
13
- const be = { class: "fm-typo-en-title-md-600" }, ke = { class: "space-y-40" }, Ve = { class: "flex gap-8 items-center justify-start" }, we = /* @__PURE__ */ Z({
12
+ import { u as le } from "./role-BS3LFO8u.js";
13
+ import { _ as ke } from "./FormSection.vue_vue_type_script_setup_true_lang-DknXTYiK.js";
14
+ const Ve = { class: "fm-typo-en-title-md-600" }, Fe = { class: "space-y-40" }, we = { class: "flex gap-8 items-center justify-start" }, Se = /* @__PURE__ */ Z({
14
15
  __name: "GrantUserForm",
15
- setup(oe, { expose: D }) {
16
- const a = se(), U = le(), b = re(), F = te(), K = ae(F), { t: c } = ee(), v = S(!1), i = S({
16
+ setup(oe, { expose: M }) {
17
+ const a = se(), I = le(), U = re(), h = te(), C = ae(h), { t: d } = ee(), g = S(!1), o = S({
17
18
  name: "",
18
19
  restaurantId: "",
19
20
  roleId: ""
20
- }), h = () => {
21
- i.value = {
21
+ }), B = () => {
22
+ o.value = {
22
23
  name: "",
23
24
  restaurantId: "",
24
25
  roleId: ""
25
- }, v.value = !0;
26
- }, k = g(() => c("grantUser.form.title")), V = g(() => c("common.create")), C = g(() => b.restaurants.value.map((n) => ({
27
- label: `${n.profile.code ? n.profile.code + " - " : ""}${n.profile.name}`,
28
- value: n._id
29
- }))), B = g(() => i.value.restaurantId ? U.roles.value.filter((n) => n.restaurants.some((u) => u.id === i.value.restaurantId)).map((n) => ({
30
- label: n.name,
31
- value: n._id,
32
- disabled: !n.isUsable
26
+ }, g.value = !0;
27
+ }, x = f(() => d("grantUser.form.title")), k = f(() => d("common.create")), V = f(() => U.restaurants.value.map((c) => ({
28
+ label: `${c.profile.code ? c.profile.code + " - " : ""}${c.profile.name}`,
29
+ value: c._id
30
+ }))), $ = f(() => o.value.restaurantId ? I.roles.value.filter((c) => c.restaurants.some((i) => i.id === o.value.restaurantId)).map((c) => ({
31
+ label: c.name,
32
+ value: c._id,
33
+ disabled: !c.isUsable
33
34
  })) : []);
34
- ue(
35
- () => i.value.restaurantId,
35
+ de(
36
+ () => o.value.restaurantId,
36
37
  () => {
37
- i.value.roleId = "";
38
+ o.value.roleId = "";
38
39
  }
39
40
  );
40
- async function T() {
41
- await K.minor(async () => {
42
- const n = await a.createGrantUser(i.value);
43
- F.open({
44
- message: c("grantUser.create.successMessage", {
45
- passcode: n.passcode
41
+ async function N() {
42
+ await C.minor(async () => {
43
+ const c = await a.createGrantUser(o.value);
44
+ h.open({
45
+ message: d("grantUser.create.successMessage", {
46
+ passcode: c.passcode
46
47
  }),
47
48
  type: "success"
48
49
  });
49
- }), v.value = !1;
50
+ }), g.value = !1;
50
51
  }
51
- return D({
52
- show: v,
53
- trigger: h
54
- }), (n, u) => {
55
- const G = _("FmTextField"), I = _("FmSelect"), $ = _("fm-button"), N = _("fm-side-sheet");
56
- return x(), z(P, null, [
57
- de(n.$slots, "default", { trigger: h }),
58
- l(N, {
52
+ return M({
53
+ show: g,
54
+ trigger: B
55
+ }), (c, i) => {
56
+ const R = v("FmTextField"), z = v("FmSelect"), w = v("fm-button"), T = v("fm-side-sheet");
57
+ return b(), D(P, null, [
58
+ me(c.$slots, "default", { trigger: B }),
59
+ l(T, {
59
60
  id: "grant-user-form",
60
- modelValue: v.value,
61
- "onUpdate:modelValue": u[4] || (u[4] = (d) => v.value = d),
62
- "is-container": s(A).FmForm,
61
+ modelValue: g.value,
62
+ "onUpdate:modelValue": i[4] || (i[4] = (u) => g.value = u),
63
+ "is-container": s(K).FmForm,
63
64
  "is-container-props": {
64
- onValidationSuccess: T,
65
+ onValidationSuccess: N,
65
66
  blameFormChildOnValidationFailed: !0
66
67
  },
67
68
  "max-width": 560
68
69
  }, {
69
70
  "side-sheet-header": y(() => [
70
- o("p", be, f(k.value), 1)
71
+ n("p", Ve, _(x.value), 1)
71
72
  ]),
72
73
  "side-sheet-footer": y(() => [
73
- o("div", Ve, [
74
- l($, {
75
- label: V.value,
74
+ n("div", we, [
75
+ l(w, {
76
+ label: k.value,
76
77
  size: "lg",
77
78
  type: "submit",
78
79
  variant: "primary"
79
80
  }, null, 8, ["label"]),
80
- l($, {
81
- label: s(c)("common.cancel"),
81
+ l(w, {
82
+ label: s(d)("common.cancel"),
82
83
  size: "lg",
83
84
  variant: "tertiary",
84
- onClick: u[3] || (u[3] = () => v.value = !1)
85
+ onClick: i[3] || (i[3] = () => g.value = !1)
85
86
  }, null, 8, ["label"])
86
87
  ])
87
88
  ]),
88
89
  default: y(() => [
89
- o("div", ke, [
90
- l(xe, {
91
- title: s(c)("grantUser.form.section")
90
+ n("div", Fe, [
91
+ l(ke, {
92
+ title: s(d)("grantUser.form.section")
92
93
  }, {
93
94
  default: y(() => [
94
- l(G, {
95
- modelValue: i.value.name,
96
- "onUpdate:modelValue": u[0] || (u[0] = (d) => i.value.name = d),
97
- label: s(c)("grantUser.form.name"),
98
- rules: [(d) => !!d || s(c)("grantUser.form.nameRequired")]
95
+ l(R, {
96
+ modelValue: o.value.name,
97
+ "onUpdate:modelValue": i[0] || (i[0] = (u) => o.value.name = u),
98
+ label: s(d)("grantUser.form.name"),
99
+ rules: [(u) => !!u || s(d)("grantUser.form.nameRequired")]
99
100
  }, null, 8, ["modelValue", "label", "rules"]),
100
- l(Y, {
101
- label: s(c)("grantUser.form.restaurant")
101
+ l(X, {
102
+ label: s(d)("grantUser.form.restaurant")
102
103
  }, {
103
104
  default: y(() => [
104
- l(I, {
105
- modelValue: i.value.restaurantId,
106
- "onUpdate:modelValue": u[1] || (u[1] = (d) => i.value.restaurantId = d),
107
- items: C.value,
108
- placeholder: s(c)("grantUser.form.selectRestaurant"),
109
- rules: [(d) => !!d || s(c)("grantUser.form.restaurantRequired")]
105
+ l(z, {
106
+ modelValue: o.value.restaurantId,
107
+ "onUpdate:modelValue": i[1] || (i[1] = (u) => o.value.restaurantId = u),
108
+ items: V.value,
109
+ placeholder: s(d)("grantUser.form.selectRestaurant"),
110
+ rules: [(u) => !!u || s(d)("grantUser.form.restaurantRequired")]
110
111
  }, null, 8, ["modelValue", "items", "placeholder", "rules"])
111
112
  ]),
112
113
  _: 1
113
114
  }, 8, ["label"]),
114
- l(Y, {
115
- label: s(c)("grantUser.form.role")
115
+ l(X, {
116
+ label: s(d)("grantUser.form.role")
116
117
  }, {
117
118
  default: y(() => [
118
- l(I, {
119
- modelValue: i.value.roleId,
120
- "onUpdate:modelValue": u[2] || (u[2] = (d) => i.value.roleId = d),
121
- items: B.value,
122
- placeholder: s(c)("grantUser.form.selectRole"),
123
- disabled: !i.value.restaurantId,
124
- rules: [(d) => !!d || s(c)("grantUser.form.roleRequired")]
119
+ l(z, {
120
+ modelValue: o.value.roleId,
121
+ "onUpdate:modelValue": i[2] || (i[2] = (u) => o.value.roleId = u),
122
+ items: $.value,
123
+ placeholder: s(d)("grantUser.form.selectRole"),
124
+ disabled: !o.value.restaurantId,
125
+ rules: [(u) => !!u || s(d)("grantUser.form.roleRequired")]
125
126
  }, null, 8, ["modelValue", "items", "placeholder", "disabled", "rules"])
126
127
  ]),
127
128
  _: 1
@@ -136,72 +137,70 @@ const be = { class: "fm-typo-en-title-md-600" }, ke = { class: "space-y-40" }, V
136
137
  ], 64);
137
138
  };
138
139
  }
139
- }), Fe = {
140
+ }), Ie = {
140
141
  class: "space-y-8"
141
- }, Ie = {
142
+ }, Ce = {
142
143
  class: "xs:hidden flex w-full items-start justify-between"
143
- }, Se = {
144
+ }, Be = {
144
145
  class: "flex items-start gap-8"
145
- }, Ce = {
146
+ }, $e = {
146
147
  class: "space-y-4 hidden xs:block"
147
- }, Be = {
148
+ }, Ne = {
148
149
  class: "px-16"
149
- }, $e = {
150
+ }, Re = {
150
151
  class: "px-16 flex items-start gap-8"
151
- }, Ne = {
152
+ }, ze = {
152
153
  class: "pb-64 hidden xs:block"
153
- }, Re = {
154
- class: "space-y-4"
155
154
  }, Le = {
155
+ class: "space-y-4"
156
+ }, Ae = {
156
157
  class: "flex items-center gap-8"
157
- }, ze = {
158
+ }, De = {
158
159
  class: "fm-typo-en-body-lg-600"
159
- }, Ae = {
160
+ }, Ke = {
160
161
  class: "font-mono text-lg font-bold mr-4"
161
- }, De = {
162
+ }, Me = {
162
163
  class: "text-fm-color-typo-secondary"
163
- }, Ke = {
164
- class: "text-xs"
165
164
  }, Te = {
166
165
  class: "mt-4 space-y-2"
167
166
  }, Ge = {
168
167
  class: "text-xs"
169
- }, Me = {
168
+ }, je = {
170
169
  class: "text-xs"
171
170
  }, Oe = {
172
171
  key: 0,
173
172
  class: "flex flex-col gap-4"
174
- }, tt = /* @__PURE__ */ Z({
173
+ }, st = /* @__PURE__ */ Z({
175
174
  __name: "GrantUserList",
176
175
  setup(oe, {
177
- expose: D
176
+ expose: M
178
177
  }) {
179
178
  const {
180
179
  t: a
181
- } = ee(), U = S(), b = se(), {
182
- restaurants: F
180
+ } = ee(), I = (e) => ge(e).format("DD/MM/YYYY, h:mm:ss A"), U = S(), h = se(), {
181
+ restaurants: C
183
182
  } = re(), {
184
- roles: K
185
- } = le(), c = g(() => b.grantUsers), {
186
- searchKey: v,
187
- filter: i
188
- } = ye(), h = g(() => {
183
+ roles: d
184
+ } = le(), g = f(() => h.grantUsers), {
185
+ searchKey: o,
186
+ filter: B
187
+ } = he(), x = f(() => {
189
188
  var e;
190
- return (e = c.value) == null ? void 0 : e.filter((t) => {
191
- const m = !U.value || U.value.includes(t.restaurantId), M = !w.value || w.value.includes(t.status), R = k.value[t.restaurantId] || "", O = V.value[t.roleId] || "";
192
- return m && M && i([t.passcode, t.name, R, O, t.grantByName]);
189
+ return (e = g.value) == null ? void 0 : e.filter((t) => {
190
+ const m = !U.value || U.value.includes(t.restaurantId), G = !F.value || F.value.includes(t.status), L = k.value[t.restaurantId] || "", j = V.value[t.roleId] || "";
191
+ return m && G && B([t.passcode, t.name, L, j, t.grantByName]);
193
192
  });
194
- }), k = g(() => {
193
+ }), k = f(() => {
195
194
  const e = {};
196
- return F.value.forEach((t) => {
195
+ return C.value.forEach((t) => {
197
196
  e[t._id] = t.profile.name;
198
197
  }), e;
199
- }), V = g(() => {
198
+ }), V = f(() => {
200
199
  const e = {};
201
- return K.value.forEach((t) => {
200
+ return d.value.forEach((t) => {
202
201
  e[t._id] = t.name;
203
202
  }), e;
204
- }), C = (e) => {
203
+ }), $ = (e) => {
205
204
  switch (e) {
206
205
  case "active":
207
206
  return "bg-fm-color-system-success-100 text-fm-color-typo-success";
@@ -212,7 +211,7 @@ const be = { class: "fm-typo-en-title-md-600" }, ke = { class: "space-y-40" }, V
212
211
  default:
213
212
  return "bg-fm-color-typo-secondary text-fm-color-typo-primary";
214
213
  }
215
- }, B = (e) => a(`grantUser.status.${e}`), T = [{
214
+ }, N = (e) => a(`grantUser.status.${e}`), c = [{
216
215
  accessorKey: "passcode",
217
216
  size: 120,
218
217
  maxSize: 120,
@@ -222,12 +221,12 @@ const be = { class: "fm-typo-en-title-md-600" }, ke = { class: "space-y-40" }, V
222
221
  const t = e.row.original.passcode;
223
222
  return p("div", {
224
223
  class: "flex items-center gap-8"
225
- }, [p(A.FmButton, {
224
+ }, [p(K.FmButton, {
226
225
  variant: E.Tertiary,
227
226
  textColor: "neutral-gray-400",
228
227
  icon: "content_copy",
229
228
  onClick: (m) => {
230
- m.stopPropagation(), W(t);
229
+ m.stopPropagation(), H(t);
231
230
  }
232
231
  }), p("span", {
233
232
  class: "font-mono text-lg font-bold"
@@ -244,10 +243,7 @@ const be = { class: "fm-typo-en-title-md-600" }, ke = { class: "space-y-40" }, V
244
243
  width: "250px"
245
244
  },
246
245
  cell(e) {
247
- const t = e.row.original.restaurantId, m = k.value[t] || "-";
248
- return p("div", [p("div", m), p("div", {
249
- class: "text-fm-color-typo-secondary text-sm"
250
- }, `${t}`)]);
246
+ return p("div", k.value[e.row.original.restaurantId] || "-");
251
247
  }
252
248
  }, {
253
249
  accessorKey: "roleName",
@@ -265,26 +261,23 @@ const be = { class: "fm-typo-en-title-md-600" }, ke = { class: "space-y-40" }, V
265
261
  },
266
262
  cell(e) {
267
263
  const t = e.row.original.status;
268
- return p(A.FmChip, {
269
- label: B(t),
270
- class: C(t)
264
+ return p(K.FmChip, {
265
+ label: N(t),
266
+ class: $(t)
271
267
  });
272
268
  }
273
269
  }, {
274
270
  accessorKey: "grantByName",
275
271
  header: () => a("grantUser.columns.grantedBy"),
276
272
  cell(e) {
277
- const t = e.row.original.grantById, m = e.row.original.grantByName;
278
- return p("div", [p("div", m), p("div", {
279
- class: "text-fm-color-typo-secondary text-sm"
280
- }, `${t}`)]);
273
+ return p("div", e.row.original.grantByName);
281
274
  }
282
275
  }, {
283
276
  accessorKey: "createdAt",
284
277
  header: () => a("grantUser.columns.createdAt"),
285
278
  cell(e) {
286
279
  const t = e.row.original.createdAt;
287
- return p("div", new Date(t).toLocaleString());
280
+ return p("div", I(t));
288
281
  }
289
282
  }, {
290
283
  id: "action",
@@ -297,23 +290,23 @@ const be = { class: "fm-typo-en-title-md-600" }, ke = { class: "space-y-40" }, V
297
290
  const t = e.row.original;
298
291
  return t.status !== "active" ? null : p("div", {
299
292
  class: "w-full flex justify-end items-center gap-4"
300
- }, [p(A.FmButton, {
293
+ }, [p(K.FmButton, {
301
294
  label: a("grantUser.actions.revoke"),
302
295
  variant: E.Secondary,
303
296
  onClick: (m) => {
304
- m.stopPropagation(), N(t);
297
+ m.stopPropagation(), u(t);
305
298
  }
306
299
  })]);
307
300
  }
308
- }], n = te(), u = fe(), G = ae(n), I = S(), {
309
- breakpoints: $
310
- } = ge(), N = (e) => {
311
- u.open({
301
+ }], i = te(), R = _e(), z = ae(i), w = S(), {
302
+ breakpoints: T
303
+ } = ye(), u = (e) => {
304
+ R.open({
312
305
  title: a("grantUser.revoke.title"),
313
306
  message: a("grantUser.revoke.message", {
314
307
  name: e.name
315
308
  }),
316
- minWidth: $.value.lg ? 588 : 0,
309
+ minWidth: T.value.lg ? 588 : 0,
317
310
  primaryActions: {
318
311
  text: a("grantUser.actions.revoke"),
319
312
  close: !1,
@@ -324,20 +317,20 @@ const be = { class: "fm-typo-en-title-md-600" }, ke = { class: "space-y-40" }, V
324
317
  close: !0
325
318
  }
326
319
  }).onPrimary(async () => {
327
- G.minor(async () => {
328
- await b.revokeGrantUser(e._id, e.restaurantId);
320
+ z.minor(async () => {
321
+ await h.revokeGrantUser(e._id, e.restaurantId);
329
322
  }, {
330
323
  successMessage: a("grantUser.revoke.successMessage", {
331
324
  name: e.name
332
325
  })
333
- }), u.close();
326
+ }), R.close();
334
327
  });
335
328
  };
336
- function d() {
329
+ function ne() {
337
330
  var e;
338
- (e = I.value) == null || e.trigger();
331
+ (e = w.value) == null || e.trigger();
339
332
  }
340
- const q = g(() => [{
333
+ const Y = f(() => [{
341
334
  label: a("grantUser.status.active"),
342
335
  value: "active"
343
336
  }, {
@@ -346,116 +339,116 @@ const be = { class: "fm-typo-en-title-md-600" }, ke = { class: "space-y-40" }, V
346
339
  }, {
347
340
  label: a("grantUser.status.revoked"),
348
341
  value: "revoked"
349
- }]), H = g(() => F.value.map((e) => ({
342
+ }]), q = f(() => C.value.map((e) => ({
350
343
  label: `${e.profile.code ? `${e.profile.code} - ` : ""}${e.profile.name}`,
351
344
  value: e._id
352
- }))), w = S();
353
- async function W(e) {
345
+ }))), F = S();
346
+ async function H(e) {
354
347
  try {
355
- await navigator.clipboard.writeText(e), n.open({
348
+ await navigator.clipboard.writeText(e), i.open({
356
349
  message: a("grantUser.passcode.copied"),
357
350
  type: "success"
358
351
  });
359
352
  } catch (t) {
360
- n.open({
353
+ i.open({
361
354
  message: String(t),
362
355
  type: "error"
363
356
  });
364
357
  }
365
358
  }
366
- return D({
367
- create: d,
368
- filteredGrantUsers: h
359
+ return M({
360
+ create: ne,
361
+ filteredGrantUsers: x
369
362
  }), (e, t) => {
370
- const m = _("FmSearch"), M = _("FmTable"), R = _("FmButton"), O = _("FmChip"), ne = _("FmListItem"), ce = _("FmList");
371
- return x(), z(P, null, [l(we, {
363
+ const m = v("FmSearch"), G = v("FmTable"), L = v("FmButton"), j = v("FmChip"), ce = v("FmListItem"), ie = v("FmList");
364
+ return b(), D(P, null, [l(Se, {
372
365
  ref_key: "grantUserFormRef",
373
- ref: I,
366
+ ref: w,
374
367
  class: "gap-8"
375
- }, null, 512), o("div", Fe, [o("div", Ie, [o("div", Se, [l(L, {
368
+ }, null, 512), n("div", Ie, [n("div", Ce, [n("div", Be, [l(A, {
376
369
  modelValue: U.value,
377
370
  "onUpdate:modelValue": t[0] || (t[0] = (r) => U.value = r),
378
371
  multiple: "",
379
- items: H.value,
372
+ items: q.value,
380
373
  variant: "dark",
381
374
  "selected-prefix": s(a)("grantUser.columns.restaurant"),
382
375
  placeholder: s(a)("grantUser.columns.restaurant"),
383
376
  class: "!w-auto"
384
- }, null, 8, ["modelValue", "items", "selected-prefix", "placeholder"]), l(L, {
385
- modelValue: w.value,
386
- "onUpdate:modelValue": t[1] || (t[1] = (r) => w.value = r),
377
+ }, null, 8, ["modelValue", "items", "selected-prefix", "placeholder"]), l(A, {
378
+ modelValue: F.value,
379
+ "onUpdate:modelValue": t[1] || (t[1] = (r) => F.value = r),
387
380
  multiple: "",
388
381
  variant: "dark",
389
- items: q.value,
382
+ items: Y.value,
390
383
  "selected-prefix": s(a)("grantUser.filter.selected_status_prefix"),
391
384
  placeholder: s(a)("grantUser.filter.status_placeholder")
392
385
  }, null, 8, ["modelValue", "items", "selected-prefix", "placeholder"])]), l(m, {
393
- modelValue: s(v),
394
- "onUpdate:modelValue": t[2] || (t[2] = (r) => J(v) ? v.value = r : null),
386
+ modelValue: s(o),
387
+ "onUpdate:modelValue": t[2] || (t[2] = (r) => W(o) ? o.value = r : null),
395
388
  autofocus: "",
396
389
  class: "pl-4 w-[320px]",
397
390
  placeholder: s(a)("grantUser.search.placeholder")
398
- }, null, 8, ["modelValue", "placeholder"])]), o("div", Ce, [o("div", Be, [l(m, {
399
- modelValue: s(v),
400
- "onUpdate:modelValue": t[3] || (t[3] = (r) => J(v) ? v.value = r : null),
391
+ }, null, 8, ["modelValue", "placeholder"])]), n("div", $e, [n("div", Ne, [l(m, {
392
+ modelValue: s(o),
393
+ "onUpdate:modelValue": t[3] || (t[3] = (r) => W(o) ? o.value = r : null),
401
394
  autofocus: "",
402
395
  placeholder: s(a)("grantUser.search.placeholder")
403
- }, null, 8, ["modelValue", "placeholder"])]), l(Ue), o("div", $e, [l(L, {
396
+ }, null, 8, ["modelValue", "placeholder"])]), l(xe), n("div", Re, [l(A, {
404
397
  modelValue: U.value,
405
398
  "onUpdate:modelValue": t[4] || (t[4] = (r) => U.value = r),
406
399
  multiple: "",
407
- items: H.value,
400
+ items: q.value,
408
401
  variant: "dark",
409
402
  "selected-prefix": s(a)("grantUser.columns.restaurant"),
410
403
  placeholder: s(a)("grantUser.columns.restaurant"),
411
404
  class: "!w-auto"
412
- }, null, 8, ["modelValue", "items", "selected-prefix", "placeholder"]), l(L, {
413
- modelValue: w.value,
414
- "onUpdate:modelValue": t[5] || (t[5] = (r) => w.value = r),
405
+ }, null, 8, ["modelValue", "items", "selected-prefix", "placeholder"]), l(A, {
406
+ modelValue: F.value,
407
+ "onUpdate:modelValue": t[5] || (t[5] = (r) => F.value = r),
415
408
  multiple: "",
416
- items: q.value,
409
+ items: Y.value,
417
410
  variant: "dark",
418
411
  "selected-prefix": s(a)("grantUser.filter.selected_status_prefix"),
419
412
  placeholder: s(a)("grantUser.filter.status_placeholder")
420
- }, null, 8, ["modelValue", "items", "selected-prefix", "placeholder"])])]), c.value.length > 0 || s(b).isLoading ? (x(), j(_e, {
413
+ }, null, 8, ["modelValue", "items", "selected-prefix", "placeholder"])])]), g.value.length > 0 || s(h).isLoading ? (b(), O(Ue, {
421
414
  key: 0,
422
415
  class: "overflow-auto"
423
416
  }, {
424
- default: y(() => [l(M, {
417
+ default: y(() => [l(G, {
425
418
  class: "xs:hidden",
426
- "column-defs": T,
427
- "row-data": h.value,
428
- "page-size": h.value.length,
429
- loading: s(b).isLoading,
430
- virtual: h.value.length > 0,
419
+ "column-defs": c,
420
+ "row-data": x.value,
421
+ "page-size": x.value.length,
422
+ loading: s(h).isLoading,
423
+ virtual: x.value.length > 0,
431
424
  "pin-header-row": "",
432
425
  "hide-footer": ""
433
- }, null, 8, ["row-data", "page-size", "loading", "virtual"]), o("div", Ne, [l(ce, {
426
+ }, null, 8, ["row-data", "page-size", "loading", "virtual"]), n("div", ze, [l(ie, {
434
427
  separator: ""
435
428
  }, {
436
- default: y(() => [(x(!0), z(P, null, me(h.value, (r) => (x(), j(ne, {
429
+ default: y(() => [(b(!0), D(P, null, pe(x.value, (r) => (b(), O(ce, {
437
430
  key: r._id,
438
431
  class: "py-12 px-16 items-center justify-between"
439
432
  }, {
440
- default: y(() => [o("div", Re, [o("div", Le, [l(R, {
433
+ default: y(() => [n("div", Le, [n("div", Ae, [l(L, {
441
434
  variant: "tertiary",
442
435
  "text-color": "neutral-gray-400",
443
436
  icon: "content_copy",
444
- onClick: Q((ie) => W(r.passcode), ["stop"])
445
- }, null, 8, ["onClick"]), o("p", ze, [o("span", Ae, f(r.passcode), 1), X(" - " + f(r.name), 1)])]), o("div", De, [o("div", null, [X(f(k.value[r.restaurantId] || "-") + " ", 1), o("div", Ke, f(r.restaurantId), 1), o("div", null, f(V.value[r.roleId] || "-"), 1)]), o("div", Te, [o("div", Ge, f(s(a)("grantUser.columns.grantedBy")) + ": " + f(r.grantByName), 1), o("div", Me, f(s(a)("grantUser.columns.createdAt")) + ": " + f(new Date(r.createdAt).toLocaleString()), 1), l(O, {
446
- label: B(r.status),
447
- class: ve(C(r.status))
448
- }, null, 8, ["label", "class"])])])]), r.status === "active" ? (x(), z("div", Oe, [l(R, {
437
+ onClick: J((ue) => H(r.passcode), ["stop"])
438
+ }, null, 8, ["onClick"]), n("p", De, [n("span", Ke, _(r.passcode), 1), Q(" - " + _(r.name), 1)])]), n("div", Me, [n("div", null, [Q(_(k.value[r.restaurantId] || "-") + " ", 1), n("div", null, _(V.value[r.roleId] || "-"), 1)]), n("div", Te, [n("div", Ge, _(s(a)("grantUser.columns.grantedBy")) + ": " + _(r.grantByName), 1), n("div", je, _(s(a)("grantUser.columns.createdAt")) + ": " + _(I(r.createdAt)), 1), l(j, {
439
+ label: N(r.status),
440
+ class: ve($(r.status))
441
+ }, null, 8, ["label", "class"])])])]), r.status === "active" ? (b(), D("div", Oe, [l(L, {
449
442
  label: s(a)("grantUser.actions.revoke"),
450
443
  variant: s(E).Secondary,
451
- onClick: Q((ie) => N(r), ["stop"])
452
- }, null, 8, ["label", "variant", "onClick"])])) : pe("", !0)]),
444
+ onClick: J((ue) => u(r), ["stop"])
445
+ }, null, 8, ["label", "variant", "onClick"])])) : fe("", !0)]),
453
446
  _: 2
454
447
  }, 1024))), 128))]),
455
448
  _: 1
456
449
  })])]),
457
450
  _: 1
458
- })) : (x(), j(s(he), {
451
+ })) : (b(), O(s(be), {
459
452
  key: 1,
460
453
  title: s(a)("grantUser.noData.title"),
461
454
  subtitle: s(a)("grantUser.noData.subtitle")
@@ -464,5 +457,5 @@ const be = { class: "fm-typo-en-title-md-600" }, ke = { class: "space-y-40" }, V
464
457
  }
465
458
  });
466
459
  export {
467
- tt as default
460
+ st as default
468
461
  };