#1022 ticket.create
This commit is contained in:
parent
12cf059534
commit
f4839cb642
|
@ -1,7 +1,7 @@
|
|||
import selectors from '../../helpers/selectors.js';
|
||||
import createNightmare from '../../helpers/nightmare';
|
||||
// test excluded #1022
|
||||
xdescribe('Client risk path', () => {
|
||||
|
||||
describe('Client risk path', () => {
|
||||
const nightmare = createNightmare();
|
||||
|
||||
beforeAll(() => {
|
||||
|
|
|
@ -43,6 +43,8 @@ class Controller {
|
|||
|
||||
set warehouseFk(value) {
|
||||
this.warehouse = value;
|
||||
if (!window.localStorage.defaultWarehouseFk)
|
||||
window.localStorage.defaultWarehouseFk = value;
|
||||
this.setUserConfig('warehouseFk', value);
|
||||
}
|
||||
|
||||
|
@ -52,6 +54,8 @@ class Controller {
|
|||
|
||||
set companyFk(value) {
|
||||
this.company = value;
|
||||
if (!window.localStorage.defaultCompanyFk)
|
||||
window.localStorage.defaultCompanyFk = value;
|
||||
this.setUserConfig('companyFk', value);
|
||||
}
|
||||
|
||||
|
@ -74,17 +78,11 @@ class Controller {
|
|||
getUserConfig() {
|
||||
this.$http.get('/api/UserConfigs/getUserConfig')
|
||||
.then(res => {
|
||||
if (res.data && res.data.warehouseFk) {
|
||||
if (res.data && res.data.warehouseFk)
|
||||
this.warehouse = res.data.warehouseFk;
|
||||
if (!localStorage.getItem('localWarehouseFk'))
|
||||
localStorage.setItem('defaultWarehouseFk', res.data.warehouseFk);
|
||||
}
|
||||
|
||||
if (res.data && res.data.companyFk) {
|
||||
if (res.data && res.data.companyFk)
|
||||
this.company = res.data.companyFk;
|
||||
if (!localStorage.getItem('localCompanyFk'))
|
||||
localStorage.setItem('defaultCompanyFk', res.data.companyFk);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
@ -3,12 +3,13 @@
|
|||
url="/client/api/receipts/filter"
|
||||
params="$ctrl.params"
|
||||
limit="20"
|
||||
data="$ctrl.risks">
|
||||
data="$ctrl.risks"
|
||||
auto-load="true">
|
||||
</vn-crud-model>
|
||||
<vn-crud-model
|
||||
vn-id="riskModel"
|
||||
url="/client/api/ClientRisks"
|
||||
filter="::$ctrl.filter"
|
||||
filter="$ctrl.filter"
|
||||
data="riskTotal"
|
||||
auto-load="true">
|
||||
</vn-crud-model>
|
||||
|
|
|
@ -18,6 +18,7 @@ class Controller {
|
|||
},
|
||||
where: {
|
||||
clientFk: $stateParams.id,
|
||||
companyFk: this.companyFk
|
||||
},
|
||||
};
|
||||
this.params = {
|
||||
|
@ -29,7 +30,9 @@ class Controller {
|
|||
}
|
||||
setOrder(value) {
|
||||
this.params.params.companyFk = value;
|
||||
this.filter.where.companyFk = value;
|
||||
this.$.model.refresh();
|
||||
this.$.riskModel.refresh();
|
||||
}
|
||||
|
||||
set risks(value) {
|
||||
|
|
|
@ -1052,6 +1052,7 @@ INSERT INTO `vn`.`orderTicket`(`orderFk`, `ticketFk`)
|
|||
INSERT INTO `vn`.`userConfig` (`userFk`, `warehouseFk`, `companyFk`)
|
||||
VALUES
|
||||
(1, 2, 69),
|
||||
(5, 1, 442),
|
||||
(9, 1, 442),
|
||||
(18, 3, 791);
|
||||
|
||||
|
|
Loading…
Reference in New Issue