fixed ticket.index
gitea/salix/master This commit looks good Details

This commit is contained in:
Joan Sanchez 2019-07-12 11:43:10 +02:00
parent 25014654b1
commit 29744c52f3
3 changed files with 28 additions and 23 deletions

View File

@ -2,7 +2,6 @@
vn-id="model" vn-id="model"
url="/ticket/api/Tickets/filter" url="/ticket/api/Tickets/filter"
limit="20" limit="20"
params="::$ctrl.params"
data="tickets" data="tickets"
order="shipped DESC, zoneHour ASC, zoneMinute ASC, clientFk" order="shipped DESC, zoneHour ASC, zoneMinute ASC, clientFk"
auto-load="false"> auto-load="false">
@ -13,7 +12,7 @@
<vn-horizontal> <vn-horizontal>
<vn-searchbar <vn-searchbar
vn-id="ticketSearchbar" vn-id="ticketSearchbar"
style="width: 100%" filter="$ctrl.filter"
panel="vn-ticket-search-panel" panel="vn-ticket-search-panel"
on-search="$ctrl.onSearch($params)" on-search="$ctrl.onSearch($params)"
info="Search ticket by id or alias" info="Search ticket by id or alias"

View File

@ -19,22 +19,22 @@ export default class Controller {
}, name: 'Payment on account...', always: true} }, name: 'Payment on account...', always: true}
]; ];
const morning = new Date(); if (!$stateParams.q) {
morning.setHours(0, 0, 0, 0); const today = new Date();
today.setHours(0, 0, 0, 0);
const tonight = new Date(); const tomorrow = new Date();
tonight.setHours(23, 59, 59, 999); tomorrow.setDate(tomorrow.getDate() + 1);
tomorrow.setHours(23, 59, 59, 999);
this.params = { this.filter = {
from: morning, from: today,
to: tonight to: tomorrow
}; };
}
if (!$stateParams.q)
this.getScopeDays();
} }
getScopeDays() { /* getScopeDays() {
this.$http.get(`/api/TicketConfigs/findOne`).then(res => { this.$http.get(`/api/TicketConfigs/findOne`).then(res => {
if (res.data) { if (res.data) {
this.filter = { this.filter = {
@ -42,7 +42,7 @@ export default class Controller {
}; };
} }
}); });
} } */
setBalanceCreateDialog() { setBalanceCreateDialog() {
let data = this.$.tickets; let data = this.$.tickets;

View File

@ -1,6 +1,7 @@
@import "variables"; @import "variables";
vn-ticket-index vn-icon-menu { vn-ticket-index {
vn-icon-menu {
padding-top: 30px; padding-top: 30px;
padding-left: 10px; padding-left: 10px;
color: $color-main; color: $color-main;
@ -9,3 +10,8 @@ vn-ticket-index vn-icon-menu {
color: initial; color: initial;
} }
} }
vn-searchbar {
width: 100%
}
}