refactor(ticket): loadDefaultTicketAction()
gitea/salix/pipeline/head This commit looks good
Details
gitea/salix/pipeline/head This commit looks good
Details
This commit is contained in:
parent
b45b8950fb
commit
72c724c1e7
|
@ -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;
|
||||||
|
|
Loading…
Reference in New Issue