Merge pull request 'hotfix_claim.detail_noPermiteModificarReclamados' (!1409) from hotfix_claim.detail_noPermiteModificarReclamados into master
gitea/salix/pipeline/head This commit looks good Details

Reviewed-on: #1409
This commit is contained in:
Joan Sanchez 2023-03-23 09:59:00 +00:00
commit 83c1750aae
2 changed files with 9 additions and 9 deletions

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;
}); });
} }