From: Mike Rylander Date: Fri, 25 Mar 2022 17:00:23 +0000 (-0400) Subject: LP#1839341: Address sort, revert, and layout X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=43135abe759e66bad4049e7b82a1959bcfab41fb;p=working%2FEvergreen.git LP#1839341: Address sort, revert, and layout Based on testing feedback, this commit: * improves the layout and styling of the Edit dialog buttons * adds the Description as a (hidden) column * enables sort/multisort on the main grid * corrects the logic of the Revert function * corrects the logic used when saving booleans Signed-off-by: Mike Rylander Signed-off-by: Bill Erickson Signed-off-by: Terran McCanna Signed-off-by: Jane Sandberg --- diff --git a/Open-ILS/src/eg2/src/app/staff/admin/local/org-unit-settings/edit-org-unit-setting-dialog.component.html b/Open-ILS/src/eg2/src/app/staff/admin/local/org-unit-settings/edit-org-unit-setting-dialog.component.html index a2ef464879..bfa2c0e3db 100644 --- a/Open-ILS/src/eg2/src/app/staff/admin/local/org-unit-settings/edit-org-unit-setting-dialog.component.html +++ b/Open-ILS/src/eg2/src/app/staff/admin/local/org-unit-settings/edit-org-unit-setting-dialog.component.html @@ -140,12 +140,12 @@ {{r.label}} - \ No newline at end of file + diff --git a/Open-ILS/src/eg2/src/app/staff/admin/local/org-unit-settings/org-unit-setting-history-dialog.component.ts b/Open-ILS/src/eg2/src/app/staff/admin/local/org-unit-settings/org-unit-setting-history-dialog.component.ts index 200c25b9e8..3b297cc7d8 100644 --- a/Open-ILS/src/eg2/src/app/staff/admin/local/org-unit-settings/org-unit-setting-history-dialog.component.ts +++ b/Open-ILS/src/eg2/src/app/staff/admin/local/org-unit-settings/org-unit-setting-history-dialog.component.ts @@ -45,12 +45,21 @@ export class OuSettingHistoryDialogComponent extends DialogComponent implements if (log) { const intTypes = ['integer', 'currency', 'link']; if (intTypes.includes(this.entry.dataType)) { - log.new_value = Number(log.new_value); + log.original_value = Number(log.original_value); } else { - log.new_value = log.new_value.replace(/^"(.*)"$/, '$1'); + log.original_value = log.original_value.replace(/^"(.*)"$/, '$1'); } + + if (this.entry.dataType === 'bool') { + if (log.original_value.match(/^t/)) { + log.original_value = true; + } else { + log.original_value = false; + } + } + this.close({ - setting: {[this.entry.name]: log.new_value}, + setting: {[this.entry.name]: log.original_value}, context: this.org.get(log.org), revert: true }); diff --git a/Open-ILS/src/eg2/src/app/staff/admin/local/org-unit-settings/org-unit-settings.component.html b/Open-ILS/src/eg2/src/app/staff/admin/local/org-unit-settings/org-unit-settings.component.html index 2ad7679535..1cb314604b 100644 --- a/Open-ILS/src/eg2/src/app/staff/admin/local/org-unit-settings/org-unit-settings.component.html +++ b/Open-ILS/src/eg2/src/app/staff/admin/local/org-unit-settings/org-unit-settings.component.html @@ -50,17 +50,18 @@
- - +