hotFix: ticketAdvanced
gitea/salix/pipeline/head This commit looks good
Details
gitea/salix/pipeline/head This commit looks good
Details
This commit is contained in:
parent
0ab40dbfb2
commit
2505adf87f
|
@ -62,8 +62,11 @@ export default class Controller extends Section {
|
|||
|
||||
setDefaultFilter() {
|
||||
let today = Date.vnNew();
|
||||
today.setHours(0, 0, 0, 0);
|
||||
const tomorrow = new Date(today);
|
||||
tomorrow.setDate(tomorrow.getDate() + 1);
|
||||
tomorrow.setHours(23, 59, 59, 999);
|
||||
|
||||
this.$http.get(`UserConfigs/getUserConfig`)
|
||||
.then(res => {
|
||||
this.filterParams = {
|
||||
|
@ -86,15 +89,6 @@ export default class Controller extends Section {
|
|||
return checkedLines;
|
||||
}
|
||||
|
||||
dateRange(value) {
|
||||
const minHour = new Date(value);
|
||||
minHour.setHours(0, 0, 0, 0);
|
||||
const maxHour = new Date(value);
|
||||
maxHour.setHours(23, 59, 59, 59);
|
||||
|
||||
return [minHour, maxHour];
|
||||
}
|
||||
|
||||
totalPriceColor(totalWithVat) {
|
||||
return this.isLessThan50(totalWithVat) ? 'warning' : '';
|
||||
}
|
||||
|
|
|
@ -36,24 +36,6 @@ describe('Component vnTicketAdvance', () => {
|
|||
});
|
||||
});
|
||||
|
||||
describe('dateRange()', () => {
|
||||
it('should return two dates with the hours at the start and end of the given date', () => {
|
||||
const now = Date.vnNew();
|
||||
|
||||
const today = now.getDate();
|
||||
|
||||
const dateRange = controller.dateRange(now);
|
||||
const start = dateRange[0].toString();
|
||||
const end = dateRange[1].toString();
|
||||
|
||||
expect(start).toContain(today);
|
||||
expect(start).toContain('00:00:00');
|
||||
|
||||
expect(end).toContain(today);
|
||||
expect(end).toContain('23:59:59');
|
||||
});
|
||||
});
|
||||
|
||||
describe('moveTicketsAdvance()', () => {
|
||||
it('should make an HTTP Post query', () => {
|
||||
jest.spyOn(controller.$.model, 'refresh');
|
||||
|
|
Loading…
Reference in New Issue