@realtek/core-theme 0.0.112 → 0.0.113

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-lib/index.js CHANGED
@@ -27182,15 +27182,23 @@ function Lx({ onLogout: e }) {
27182
27182
  async function je(e) {
27183
27183
  L(!0);
27184
27184
  try {
27185
- let t = V?.userId ?? null, n = (ne ? await Xv(ne.user_type_id, {
27185
+ let t = V?.userId ?? null, n = !!ne, r = n ? await Xv(ne.user_type_id, {
27186
27186
  ...e,
27187
27187
  updated_by: t
27188
27188
  }) : await Yv({
27189
27189
  ...e,
27190
27190
  created_by: t,
27191
27191
  visible_menu_ids: []
27192
- })).user_type_id;
27193
- Y.success(ne ? "Role updated" : "Role created"), I(!1), await ue(), S(n);
27192
+ }), i = r.user_type_id;
27193
+ Y.success(n ? "User type updated" : "User type created. Customize its menus and permissions."), I(!1), await ue(), S(i), n || (se("permissions"), R({
27194
+ kind: "role",
27195
+ record: {
27196
+ ...e,
27197
+ ...r,
27198
+ user_type_id: i,
27199
+ user_type_name: r.user_type_name ?? e.user_type_name
27200
+ }
27201
+ }));
27194
27202
  } catch (e) {
27195
27203
  Y.error(e.message || "Unable to save role");
27196
27204
  } finally {
@@ -27560,10 +27568,11 @@ function Lx({ onLogout: e }) {
27560
27568
  }),
27561
27569
  /* @__PURE__ */ Z(H, {
27562
27570
  className: "admin-role-modal",
27563
- title: ne ? "Edit Role" : "Add Role",
27571
+ title: ne ? "Edit User Type" : "Create User Type",
27564
27572
  open: te,
27565
27573
  onCancel: () => I(!1),
27566
27574
  onOk: () => n.submit(),
27575
+ okText: ne ? "Save" : "Next",
27567
27576
  confirmLoading: ie,
27568
27577
  destroyOnHidden: !0,
27569
27578
  width: 900,