8062-testToMaster_2 #3059
|
@ -21,6 +21,7 @@ BEGIN
|
||||||
t.clientFk,
|
t.clientFk,
|
||||||
t.warehouseFk,
|
t.warehouseFk,
|
||||||
ts.alertLevel,
|
ts.alertLevel,
|
||||||
|
sub2.alertLevel futureAlertLevel,
|
||||||
t.shipped,
|
t.shipped,
|
||||||
t.totalWithVat,
|
t.totalWithVat,
|
||||||
sub2.shipped futureShipped,
|
sub2.shipped futureShipped,
|
||||||
|
@ -47,6 +48,7 @@ BEGIN
|
||||||
t.addressFk,
|
t.addressFk,
|
||||||
t.id,
|
t.id,
|
||||||
t.shipped,
|
t.shipped,
|
||||||
|
ts.alertLevel,
|
||||||
st.name state,
|
st.name state,
|
||||||
st.code,
|
st.code,
|
||||||
st.classColor,
|
st.classColor,
|
||||||
|
|
|
@ -687,8 +687,8 @@ export default {
|
||||||
ticketFuture: {
|
ticketFuture: {
|
||||||
searchResult: 'vn-ticket-future tbody tr',
|
searchResult: 'vn-ticket-future tbody tr',
|
||||||
openAdvancedSearchButton: 'vn-searchbar .append vn-icon[icon="arrow_drop_down"]',
|
openAdvancedSearchButton: 'vn-searchbar .append vn-icon[icon="arrow_drop_down"]',
|
||||||
originDated: 'vn-date-picker[label="Origin date"]',
|
originScopeDays: 'vn-date-picker[label="Origin date"]',
|
||||||
futureDated: 'vn-date-picker[label="Destination date"]',
|
futureScopeDays: 'vn-date-picker[label="Destination date"]',
|
||||||
linesMax: 'vn-textfield[label="Max Lines"]',
|
linesMax: 'vn-textfield[label="Max Lines"]',
|
||||||
litersMax: 'vn-textfield[label="Max Liters"]',
|
litersMax: 'vn-textfield[label="Max Liters"]',
|
||||||
ipt: 'vn-autocomplete[label="Origin IPT"]',
|
ipt: 'vn-autocomplete[label="Origin IPT"]',
|
||||||
|
|
|
@ -30,18 +30,18 @@ describe('Ticket Future path', () => {
|
||||||
expect(message.text).toContain('warehouseFk is a required argument');
|
expect(message.text).toContain('warehouseFk is a required argument');
|
||||||
|
|
||||||
await page.waitToClick(selectors.ticketFuture.openAdvancedSearchButton);
|
await page.waitToClick(selectors.ticketFuture.openAdvancedSearchButton);
|
||||||
await page.clearInput(selectors.ticketFuture.futureDated);
|
await page.clearInput(selectors.ticketFuture.futureScopeDays);
|
||||||
await page.waitToClick(selectors.ticketFuture.submit);
|
await page.waitToClick(selectors.ticketFuture.submit);
|
||||||
message = await page.waitForSnackbar();
|
message = await page.waitForSnackbar();
|
||||||
|
|
||||||
expect(message.text).toContain('futureDated is a required argument');
|
expect(message.text).toContain('futureScopeDays is a required argument');
|
||||||
|
|
||||||
await page.waitToClick(selectors.ticketFuture.openAdvancedSearchButton);
|
await page.waitToClick(selectors.ticketFuture.openAdvancedSearchButton);
|
||||||
await page.clearInput(selectors.ticketFuture.originDated);
|
await page.clearInput(selectors.ticketFuture.originScopeDays);
|
||||||
await page.waitToClick(selectors.ticketFuture.submit);
|
await page.waitToClick(selectors.ticketFuture.submit);
|
||||||
message = await page.waitForSnackbar();
|
message = await page.waitForSnackbar();
|
||||||
|
|
||||||
expect(message.text).toContain('originDated is a required argument');
|
expect(message.text).toContain('originScopeDays is a required argument');
|
||||||
|
|
||||||
await page.waitToClick(selectors.ticketFuture.openAdvancedSearchButton);
|
await page.waitToClick(selectors.ticketFuture.openAdvancedSearchButton);
|
||||||
await page.waitToClick(selectors.ticketFuture.submit);
|
await page.waitToClick(selectors.ticketFuture.submit);
|
||||||
|
@ -71,7 +71,7 @@ describe('Ticket Future path', () => {
|
||||||
await page.autocompleteSearch(selectors.ticketFuture.state, 'Free');
|
await page.autocompleteSearch(selectors.ticketFuture.state, 'Free');
|
||||||
await page.waitToClick(selectors.ticketFuture.submit);
|
await page.waitToClick(selectors.ticketFuture.submit);
|
||||||
|
|
||||||
expect(httpRequest).toContain('state=FREE');
|
expect(httpRequest).toContain('state=0');
|
||||||
|
|
||||||
await page.waitToClick(selectors.ticketFuture.openAdvancedSearchButton);
|
await page.waitToClick(selectors.ticketFuture.openAdvancedSearchButton);
|
||||||
|
|
||||||
|
@ -80,7 +80,7 @@ describe('Ticket Future path', () => {
|
||||||
await page.autocompleteSearch(selectors.ticketFuture.futureState, 'Free');
|
await page.autocompleteSearch(selectors.ticketFuture.futureState, 'Free');
|
||||||
await page.waitToClick(selectors.ticketFuture.submit);
|
await page.waitToClick(selectors.ticketFuture.submit);
|
||||||
|
|
||||||
expect(httpRequest).toContain('futureState=FREE');
|
expect(httpRequest).toContain('futureState=0');
|
||||||
|
|
||||||
await page.waitToClick(selectors.ticketFuture.openAdvancedSearchButton);
|
await page.waitToClick(selectors.ticketFuture.openAdvancedSearchButton);
|
||||||
await page.clearInput(selectors.ticketFuture.state);
|
await page.clearInput(selectors.ticketFuture.state);
|
||||||
|
|
|
@ -9,13 +9,13 @@ module.exports = Self => {
|
||||||
accessType: 'READ',
|
accessType: 'READ',
|
||||||
accepts: [
|
accepts: [
|
||||||
{
|
{
|
||||||
arg: 'originDated',
|
arg: 'originScopeDays',
|
||||||
type: 'date',
|
type: 'date',
|
||||||
description: 'The date in question',
|
description: 'The date in question',
|
||||||
required: true
|
required: true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
arg: 'futureDated',
|
arg: 'futureScopeDays',
|
||||||
type: 'date',
|
type: 'date',
|
||||||
description: 'The date to probe',
|
description: 'The date to probe',
|
||||||
required: true
|
required: true
|
||||||
|
@ -129,9 +129,9 @@ module.exports = Self => {
|
||||||
]
|
]
|
||||||
};
|
};
|
||||||
case 'state':
|
case 'state':
|
||||||
return {'f.stateCode': {like: `%${value}%`}};
|
return {'f.alertLevel': value};
|
||||||
case 'futureState':
|
case 'futureState':
|
||||||
return {'f.futureStateCode': {like: `%${value}%`}};
|
return {'f.futureAlertLevel': value};
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -141,7 +141,7 @@ module.exports = Self => {
|
||||||
|
|
||||||
stmt = new ParameterizedSQL(
|
stmt = new ParameterizedSQL(
|
||||||
`CALL vn.ticket_canbePostponed(?,?,?)`,
|
`CALL vn.ticket_canbePostponed(?,?,?)`,
|
||||||
[args.originDated, args.futureDated, args.warehouseFk]);
|
[args.originScopeDays, args.futureScopeDays, args.warehouseFk]);
|
||||||
|
|
||||||
stmts.push(stmt);
|
stmts.push(stmt);
|
||||||
|
|
||||||
|
@ -170,7 +170,7 @@ module.exports = Self => {
|
||||||
LEFT JOIN tmp.ticket_problems tp ON tp.ticketFk = f.id
|
LEFT JOIN tmp.ticket_problems tp ON tp.ticketFk = f.id
|
||||||
`);
|
`);
|
||||||
|
|
||||||
if (args.problems != undefined && (!args.originDated && !args.futureDated))
|
if (args.problems != undefined && (!args.originScopeDays && !args.futureScopeDays))
|
||||||
throw new UserError('Choose a date range or days forward');
|
throw new UserError('Choose a date range or days forward');
|
||||||
|
|
||||||
let condition;
|
let condition;
|
||||||
|
|
|
@ -12,8 +12,8 @@ describe('ticket getTicketsFuture()', () => {
|
||||||
const options = {transaction: tx};
|
const options = {transaction: tx};
|
||||||
|
|
||||||
const args = {
|
const args = {
|
||||||
originDated: today,
|
originScopeDays: today,
|
||||||
futureDated: today,
|
futureScopeDays: today,
|
||||||
warehouseFk: 1,
|
warehouseFk: 1,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -35,8 +35,8 @@ describe('ticket getTicketsFuture()', () => {
|
||||||
const options = {transaction: tx};
|
const options = {transaction: tx};
|
||||||
|
|
||||||
const args = {
|
const args = {
|
||||||
originDated: today,
|
originScopeDays: today,
|
||||||
futureDated: today,
|
futureScopeDays: today,
|
||||||
warehouseFk: 1,
|
warehouseFk: 1,
|
||||||
problems: true
|
problems: true
|
||||||
};
|
};
|
||||||
|
@ -60,8 +60,8 @@ describe('ticket getTicketsFuture()', () => {
|
||||||
const options = {transaction: tx};
|
const options = {transaction: tx};
|
||||||
|
|
||||||
const args = {
|
const args = {
|
||||||
originDated: today,
|
originScopeDays: today,
|
||||||
futureDated: today,
|
futureScopeDays: today,
|
||||||
warehouseFk: 1,
|
warehouseFk: 1,
|
||||||
problems: false
|
problems: false
|
||||||
};
|
};
|
||||||
|
@ -85,8 +85,8 @@ describe('ticket getTicketsFuture()', () => {
|
||||||
const options = {transaction: tx};
|
const options = {transaction: tx};
|
||||||
|
|
||||||
const args = {
|
const args = {
|
||||||
originDated: today,
|
originScopeDays: today,
|
||||||
futureDated: today,
|
futureScopeDays: today,
|
||||||
warehouseFk: 1,
|
warehouseFk: 1,
|
||||||
problems: null
|
problems: null
|
||||||
};
|
};
|
||||||
|
@ -110,8 +110,8 @@ describe('ticket getTicketsFuture()', () => {
|
||||||
const options = {transaction: tx};
|
const options = {transaction: tx};
|
||||||
|
|
||||||
const args = {
|
const args = {
|
||||||
originDated: today,
|
originScopeDays: today,
|
||||||
futureDated: today,
|
futureScopeDays: today,
|
||||||
warehouseFk: 1,
|
warehouseFk: 1,
|
||||||
state: 'OK'
|
state: 'OK'
|
||||||
};
|
};
|
||||||
|
@ -135,8 +135,8 @@ describe('ticket getTicketsFuture()', () => {
|
||||||
const options = {transaction: tx};
|
const options = {transaction: tx};
|
||||||
|
|
||||||
const args = {
|
const args = {
|
||||||
originDated: today,
|
originScopeDays: today,
|
||||||
futureDated: today,
|
futureScopeDays: today,
|
||||||
warehouseFk: 1,
|
warehouseFk: 1,
|
||||||
futureState: 'OK'
|
futureState: 'OK'
|
||||||
};
|
};
|
||||||
|
@ -160,8 +160,8 @@ describe('ticket getTicketsFuture()', () => {
|
||||||
const options = {transaction: tx};
|
const options = {transaction: tx};
|
||||||
|
|
||||||
const args = {
|
const args = {
|
||||||
originDated: today,
|
originScopeDays: today,
|
||||||
futureDated: today,
|
futureScopeDays: today,
|
||||||
warehouseFk: 1,
|
warehouseFk: 1,
|
||||||
ipt: null
|
ipt: null
|
||||||
};
|
};
|
||||||
|
@ -185,8 +185,8 @@ describe('ticket getTicketsFuture()', () => {
|
||||||
const options = {transaction: tx};
|
const options = {transaction: tx};
|
||||||
|
|
||||||
const args = {
|
const args = {
|
||||||
originDated: today,
|
originScopeDays: today,
|
||||||
futureDated: today,
|
futureScopeDays: today,
|
||||||
warehouseFk: 1,
|
warehouseFk: 1,
|
||||||
ipt: 'H'
|
ipt: 'H'
|
||||||
};
|
};
|
||||||
|
@ -210,8 +210,8 @@ describe('ticket getTicketsFuture()', () => {
|
||||||
const options = {transaction: tx};
|
const options = {transaction: tx};
|
||||||
|
|
||||||
const args = {
|
const args = {
|
||||||
originDated: today,
|
originScopeDays: today,
|
||||||
futureDated: today,
|
futureScopeDays: today,
|
||||||
warehouseFk: 1,
|
warehouseFk: 1,
|
||||||
futureIpt: null
|
futureIpt: null
|
||||||
};
|
};
|
||||||
|
@ -235,8 +235,8 @@ describe('ticket getTicketsFuture()', () => {
|
||||||
const options = {transaction: tx};
|
const options = {transaction: tx};
|
||||||
|
|
||||||
const args = {
|
const args = {
|
||||||
originDated: today,
|
originScopeDays: today,
|
||||||
futureDated: today,
|
futureScopeDays: today,
|
||||||
warehouseFk: 1,
|
warehouseFk: 1,
|
||||||
futureIpt: 'H'
|
futureIpt: 'H'
|
||||||
};
|
};
|
||||||
|
@ -260,8 +260,8 @@ describe('ticket getTicketsFuture()', () => {
|
||||||
const options = {transaction: tx};
|
const options = {transaction: tx};
|
||||||
|
|
||||||
const args = {
|
const args = {
|
||||||
originDated: today,
|
originScopeDays: today,
|
||||||
futureDated: today,
|
futureScopeDays: today,
|
||||||
warehouseFk: 1,
|
warehouseFk: 1,
|
||||||
id: 13
|
id: 13
|
||||||
};
|
};
|
||||||
|
@ -285,8 +285,8 @@ describe('ticket getTicketsFuture()', () => {
|
||||||
const options = {transaction: tx};
|
const options = {transaction: tx};
|
||||||
|
|
||||||
const args = {
|
const args = {
|
||||||
originDated: today,
|
originScopeDays: today,
|
||||||
futureDated: today,
|
futureScopeDays: today,
|
||||||
warehouseFk: 1,
|
warehouseFk: 1,
|
||||||
futureId: 12
|
futureId: 12
|
||||||
};
|
};
|
||||||
|
|
|
@ -9,13 +9,13 @@
|
||||||
<vn-date-picker
|
<vn-date-picker
|
||||||
vn-one
|
vn-one
|
||||||
label="Origin date"
|
label="Origin date"
|
||||||
ng-model="filter.originDated"
|
ng-model="filter.originScopeDays"
|
||||||
required="true">
|
required="true">
|
||||||
</vn-date-picker>
|
</vn-date-picker>
|
||||||
<vn-date-picker
|
<vn-date-picker
|
||||||
vn-one
|
vn-one
|
||||||
label="Destination date"
|
label="Destination date"
|
||||||
ng-model="filter.futureDated"
|
ng-model="filter.futureScopeDays"
|
||||||
required="true">
|
required="true">
|
||||||
</vn-date-picker>
|
</vn-date-picker>
|
||||||
</vn-horizontal>
|
</vn-horizontal>
|
||||||
|
@ -59,7 +59,7 @@
|
||||||
<vn-autocomplete vn-one
|
<vn-autocomplete vn-one
|
||||||
data="$ctrl.groupedStates"
|
data="$ctrl.groupedStates"
|
||||||
label="Origin Grouped State"
|
label="Origin Grouped State"
|
||||||
value-field="code"
|
value-field="id"
|
||||||
show-field="name"
|
show-field="name"
|
||||||
ng-model="filter.state">
|
ng-model="filter.state">
|
||||||
<tpl-item>
|
<tpl-item>
|
||||||
|
@ -69,7 +69,7 @@
|
||||||
<vn-autocomplete vn-one
|
<vn-autocomplete vn-one
|
||||||
data="$ctrl.groupedStates"
|
data="$ctrl.groupedStates"
|
||||||
label="Destination Grouped State"
|
label="Destination Grouped State"
|
||||||
value-field="code"
|
value-field="id"
|
||||||
show-field="name"
|
show-field="name"
|
||||||
ng-model="filter.futureState">
|
ng-model="filter.futureState">
|
||||||
<tpl-item>
|
<tpl-item>
|
||||||
|
|
|
@ -65,8 +65,8 @@ export default class Controller extends Section {
|
||||||
this.$http.get(`UserConfigs/getUserConfig`)
|
this.$http.get(`UserConfigs/getUserConfig`)
|
||||||
.then(res => {
|
.then(res => {
|
||||||
this.filterParams = {
|
this.filterParams = {
|
||||||
originDated: today,
|
originScopeDays: today,
|
||||||
futureDated: today,
|
futureScopeDays: today,
|
||||||
warehouseFk: res.data.warehouseFk
|
warehouseFk: res.data.warehouseFk
|
||||||
};
|
};
|
||||||
this.$.model.applyFilter(null, this.filterParams);
|
this.$.model.applyFilter(null, this.filterParams);
|
||||||
|
|
Loading…
Reference in New Issue