refactor(ticket): loadDefaultTicketAction()
gitea/salix/pipeline/head This commit looks good Details

This commit is contained in:
Alex Moreno 2021-11-17 09:59:34 +01:00
parent b45b8950fb
commit 72c724c1e7
1 changed files with 3 additions and 3 deletions

View File

@ -23,9 +23,9 @@ class Controller extends Component {
} }
loadDefaultTicketAction() { loadDefaultTicketAction() {
let filter = {where: {code: 'changePrice'}}; const isSalesAssistant = this.aclService.hasAny(['salesAssistant']);
if (this.aclService.hasAny(['salesAssistant'])) const defaultOption = isSalesAssistant ? 'turnInMana' : 'changePrice';
filter = {where: {code: 'turnInMana'}}; const filter = {where: {code: defaultOption}};
this.$http.get(`TicketUpdateActions`, {filter}).then(response => { this.$http.get(`TicketUpdateActions`, {filter}).then(response => {
return this.ticket.option = response.data[0].id; return this.ticket.option = response.data[0].id;