hotfix_claim.detail_noPermiteModificarReclamados #1409

Merged
joan merged 1 commits from hotfix_claim.detail_noPermiteModificarReclamados into master 2023-03-23 09:59:10 +00:00
2 changed files with 9 additions and 9 deletions
Showing only changes of commit 805df64bb2 - Show all commits

View File

@ -26,13 +26,13 @@ module.exports = Self => {
if (typeof options == 'object') if (typeof options == 'object')
Object.assign(myOptions, options); Object.assign(myOptions, options);
const state = await models.ClaimState.findById(id, { const state = await models.ClaimState.findById(id, {
include: { include: {
relation: 'writeRole' relation: 'writeRole'
} }
}, myOptions); }, myOptions);
const roleWithGrants = state && state.writeRole().name; const roleWithGrants = state && state.writeRole().name;
return await models.Account.hasRole(userId, roleWithGrants, myOptions); return await models.Account.hasRole(userId, roleWithGrants, myOptions);
}; };
}; };

View File

@ -151,7 +151,7 @@ class Controller extends Section {
isClaimEditable() { isClaimEditable() {
if (!this.claim) return; if (!this.claim) return;
this.$http.get(`ClaimStates/${this.claim.id}/isEditable`).then(res => { this.$http.get(`ClaimStates/${this.claim.claimStateFk}/isEditable`).then(res => {
this.isRewritable = res.data; this.isRewritable = res.data;
}); });
} }