@acorex/modules 19.4.5 → 19.4.7

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.
@@ -4513,6 +4513,8 @@ withMethods((store, dashboardPopup = inject(AXMDashboardPopupService), dialogSer
4513
4513
  description: currentDashboard.description,
4514
4514
  roleIds: currentDashboard.roleIds,
4515
4515
  scope: currentDashboard.scope,
4516
+ locked: currentDashboard.locked,
4517
+ isDeleted: currentDashboard.isDeleted,
4516
4518
  }, store.isUserAdmin());
4517
4519
  if (!editedDashboard)
4518
4520
  return;
@@ -4531,10 +4533,26 @@ withMethods((store, dashboardPopup = inject(AXMDashboardPopupService), dialogSer
4531
4533
  const updatedDashboards = store
4532
4534
  .dashboards()
4533
4535
  .map((d) => (d.id === updatedDashboard.id ? updatedDashboard : d));
4534
- patchState(store, {
4535
- allDashboards: updatedAllDashboards,
4536
- dashboards: updatedDashboards,
4537
- });
4536
+ // If lock state changed, update the dashboard options too
4537
+ if (currentDashboard.locked !== updatedDashboard.locked) {
4538
+ const baseOptions = { ...store.dashboardsOption() };
4539
+ const updatedOptions = {
4540
+ ...baseOptions,
4541
+ disableDrag: updatedDashboard.locked === true,
4542
+ disableResize: updatedDashboard.locked === true,
4543
+ };
4544
+ patchState(store, {
4545
+ allDashboards: updatedAllDashboards,
4546
+ dashboards: updatedDashboards,
4547
+ dashboardsOption: updatedOptions,
4548
+ });
4549
+ }
4550
+ else {
4551
+ patchState(store, {
4552
+ allDashboards: updatedAllDashboards,
4553
+ dashboards: updatedDashboards,
4554
+ });
4555
+ }
4538
4556
  }
4539
4557
  catch (error) {
4540
4558
  console.error('Error editing dashboard:', error);