Skip to content

Ensure frozen MVEAs link to 'view' action from Person Canvas (CFM-468) #353

Merged
merged 1 commit into from
Nov 15, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion app/src/Controller/StandardController.php
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
3 changes: 2 additions & 1 deletion app/webroot/js/comanage/components/mvea/mvea-item.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down