Merge branch 'dev' of https://git.verdnatura.es/salix into dev
This commit is contained in:
commit
3c954f13f3
|
@ -23,7 +23,6 @@
|
|||
translate-attr="{title: 'Clear'}"
|
||||
ng-show="!$ctrl.disabled
|
||||
&& $ctrl.hasValue
|
||||
&& ($ctrl.hasFocus)
|
||||
&& !$ctrl.unclearable"
|
||||
ng-click="$ctrl.clear()">
|
||||
clear
|
||||
|
|
|
@ -20,9 +20,10 @@ module.exports = Self => {
|
|||
});
|
||||
|
||||
Self.isEditable = async ticketFk => {
|
||||
let state = await Self.app.models.TicketState.findOne({where: {ticketFk: ticketFk}, fields: 'alertLevel'});
|
||||
let state = await Self.app.models.TicketState.findOne({where: {ticketFk: ticketFk}});
|
||||
let alertLevel = state ? state.alertLevel : null;
|
||||
let exists = await Self.app.models.Ticket.findOne({where: {id: ticketFk}, fields: 'isDeleted'});
|
||||
if (!exists || exists.isDeleted == 1 || state.alertLevel > 0)
|
||||
if (!exists || exists.isDeleted == 1 || (alertLevel && alertLevel > 0))
|
||||
return false;
|
||||
|
||||
return true;
|
||||
|
|
Loading…
Reference in New Issue