Merge pull request 'ticket create now takes clientFk from params' (#643) from 2946-ticket_create_from_client_tickets into dev
gitea/salix/pipeline/head This commit looks good
Details
gitea/salix/pipeline/head This commit looks good
Details
Reviewed-on: #643 Reviewed-by: Joan Sanchez <joan@verdnatura.es>
This commit is contained in:
commit
e3484750ba
|
@ -474,7 +474,7 @@ export default {
|
||||||
advancedSearchDaysOnward: 'vn-ticket-search-panel vn-input-number[ng-model="filter.scopeDays"]',
|
advancedSearchDaysOnward: 'vn-ticket-search-panel vn-input-number[ng-model="filter.scopeDays"]',
|
||||||
advancedSearchClient: 'vn-ticket-search-panel vn-textfield[ng-model="filter.clientFk"]',
|
advancedSearchClient: 'vn-ticket-search-panel vn-textfield[ng-model="filter.clientFk"]',
|
||||||
advancedSearchButton: 'vn-ticket-search-panel button[type=submit]',
|
advancedSearchButton: 'vn-ticket-search-panel button[type=submit]',
|
||||||
newTicketButton: 'vn-ticket-index a[ui-sref="ticket.create"]',
|
newTicketButton: 'vn-ticket-index vn-button[icon="add"]',
|
||||||
searchResult: 'vn-ticket-index vn-card > vn-table > div > vn-tbody > a.vn-tr',
|
searchResult: 'vn-ticket-index vn-card > vn-table > div > vn-tbody > a.vn-tr',
|
||||||
firstTicketCheckbox: 'vn-ticket-index vn-tbody > a:nth-child(1) > vn-td:nth-child(1) > vn-check',
|
firstTicketCheckbox: 'vn-ticket-index vn-tbody > a:nth-child(1) > vn-td:nth-child(1) > vn-check',
|
||||||
secondTicketCheckbox: 'vn-ticket-index vn-tbody > a:nth-child(2) > vn-td:nth-child(1) > vn-check',
|
secondTicketCheckbox: 'vn-ticket-index vn-tbody > a:nth-child(2) > vn-td:nth-child(1) > vn-check',
|
||||||
|
|
|
@ -101,7 +101,7 @@ class Controller extends Component {
|
||||||
|
|
||||||
this.$http.get(`Agencies/getAgenciesWithWarehouse`, {params}).then(res => {
|
this.$http.get(`Agencies/getAgenciesWithWarehouse`, {params}).then(res => {
|
||||||
this.agencies = res.data;
|
this.agencies = res.data;
|
||||||
const defaultAgency = this.agencies.find(agency=> {
|
const defaultAgency = this.agencies.find(agency => {
|
||||||
return agency.agencyModeFk == this.defaultAddress.agencyModeFk;
|
return agency.agencyModeFk == this.defaultAddress.agencyModeFk;
|
||||||
});
|
});
|
||||||
if (defaultAgency)
|
if (defaultAgency)
|
||||||
|
|
|
@ -166,7 +166,7 @@
|
||||||
vn-tooltip="Payment on account..."
|
vn-tooltip="Payment on account..."
|
||||||
tooltip-position="left">
|
tooltip-position="left">
|
||||||
</vn-button>
|
</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"
|
<vn-button class="round md vn-mb-sm"
|
||||||
icon="add"
|
icon="add"
|
||||||
vn-tooltip="New ticket"
|
vn-tooltip="New ticket"
|
||||||
|
|
|
@ -151,6 +151,14 @@ export default class Controller extends Section {
|
||||||
|
|
||||||
return [minHour, maxHour];
|
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'];
|
Controller.$inject = ['$element', '$scope', 'vnReport'];
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue