From 2c38e6336ad636d7c546e45173df5c8734376568 Mon Sep 17 00:00:00 2001 From: Arlen Johnson Date: Fri, 14 Nov 2025 22:33:31 -0500 Subject: [PATCH] Ensure frozen MVEAs link to 'view' action from Person Canvas (CFM-468) --- app/src/Controller/StandardController.php | 2 +- app/webroot/js/comanage/components/mvea/mvea-item.js | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/app/src/Controller/StandardController.php b/app/src/Controller/StandardController.php index 2a30f174a..8c31a8ce4 100644 --- a/app/src/Controller/StandardController.php +++ b/app/src/Controller/StandardController.php @@ -541,7 +541,7 @@ public function generateRedirect($entity) { return $this->redirect(['action' => 'deleted']); } elseif($redirectGoal == 'self' && $entity - && in_array($this->request->getParam('action'), ['add', 'copy', 'edit'])) { + && in_array($this->request->getParam('action'), ['add', 'copy', 'edit', 'unfreeze'])) { // We typically want to redirect to the edit view of the record, // but in some cases (eg: if the record was just frozen) we want to // redirect to "view" instead. diff --git a/app/webroot/js/comanage/components/mvea/mvea-item.js b/app/webroot/js/comanage/components/mvea/mvea-item.js index 0e85b86ab..91098c540 100644 --- a/app/webroot/js/comanage/components/mvea/mvea-item.js +++ b/app/webroot/js/comanage/components/mvea/mvea-item.js @@ -42,7 +42,8 @@ export default { }, computed: { mveaLink: function() { - return this.core.webroot + this.core.mveaController + (this.core.action == 'edit' ? '/edit/' : '/view/') + this.mvea.id; + const mveaAction = this.core.action == 'edit' && !this.mvea.frozen ? '/edit/' : '/view/'; + return this.core.webroot + this.core.mveaController + mveaAction + this.mvea.id; }, mveaAddress: function() { return this.mvea.room + ' ' + this.mvea.street + ' ' + this.mvea.locality + ' ' + this.mvea.state + ' ' + this.mvea.postal_code + ' ' + this.mvea.country;