ticket create now takes clientFk from params
gitea/salix/pipeline/head This commit looks good
Details
gitea/salix/pipeline/head This commit looks good
Details
This commit is contained in:
parent
43ddd509b6
commit
f969323a86
|
@ -101,7 +101,7 @@ class Controller extends Component {
|
|||
|
||||
this.$http.get(`Agencies/getAgenciesWithWarehouse`, {params}).then(res => {
|
||||
this.agencies = res.data;
|
||||
const defaultAgency = this.agencies.find(agency=> {
|
||||
const defaultAgency = this.agencies.find(agency => {
|
||||
return agency.agencyModeFk == this.defaultAddress.agencyModeFk;
|
||||
});
|
||||
if (defaultAgency)
|
||||
|
|
|
@ -166,7 +166,7 @@
|
|||
vn-tooltip="Payment on account..."
|
||||
tooltip-position="left">
|
||||
</vn-button>
|
||||
<a ui-sref="ticket.create" vn-bind="+">
|
||||
<a ui-sref="ticket.create($ctrl.clientParams())" vn-bind="+">
|
||||
<vn-button class="round md vn-mb-sm"
|
||||
icon="add"
|
||||
vn-tooltip="New ticket"
|
||||
|
|
|
@ -151,6 +151,14 @@ export default class Controller extends Section {
|
|||
|
||||
return [minHour, maxHour];
|
||||
}
|
||||
|
||||
clientParams() {
|
||||
if (this.$params.q) {
|
||||
const params = JSON.parse(this.$params.q);
|
||||
if (params.clientFk) return {clientFk: params.clientFk};
|
||||
}
|
||||
return {};
|
||||
}
|
||||
}
|
||||
Controller.$inject = ['$element', '$scope', 'vnReport'];
|
||||
|
||||
|
|
Loading…
Reference in New Issue