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

View File

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

View File

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