hotfix_claim.detail_noPermiteModificarReclamados #1409
|
@ -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);
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
|
@ -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;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue