merge
gitea/salix/dev Something is wrong with the build of this commit
Details
gitea/salix/dev Something is wrong with the build of this commit
Details
This commit is contained in:
commit
23f5ff0c5c
|
@ -16,6 +16,7 @@ server {
|
|||
listen [::]:80 default_server;
|
||||
server_name _;
|
||||
autoindex off;
|
||||
client_max_body_size 50M;
|
||||
|
||||
root /salix/dist;
|
||||
error_page 404 = @notfound;
|
||||
|
|
|
@ -13,7 +13,6 @@
|
|||
<vn-horizontal>
|
||||
<vn-searchbar
|
||||
vn-id="ticketSearchbar"
|
||||
style="width: 100%"
|
||||
panel="vn-ticket-search-panel"
|
||||
on-search="$ctrl.onSearch($params)"
|
||||
info="Search ticket by id or alias"
|
||||
|
|
|
@ -18,30 +18,6 @@ export default class Controller {
|
|||
this.$.balanceCreateDialog.show();
|
||||
}, name: 'Payment on account...', always: true}
|
||||
];
|
||||
|
||||
const morning = new Date();
|
||||
morning.setHours(0, 0, 0, 0);
|
||||
|
||||
const tonight = new Date();
|
||||
tonight.setHours(23, 59, 59, 999);
|
||||
|
||||
this.params = {
|
||||
from: morning,
|
||||
to: tonight
|
||||
};
|
||||
|
||||
if (!$stateParams.q)
|
||||
this.getScopeDays();
|
||||
}
|
||||
|
||||
getScopeDays() {
|
||||
this.$http.get(`/api/TicketConfigs/findOne`).then(res => {
|
||||
if (res.data) {
|
||||
this.filter = {
|
||||
scopeDays: parseInt(res.data.scopeDays)
|
||||
};
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
setBalanceCreateDialog() {
|
||||
|
@ -61,27 +37,27 @@ export default class Controller {
|
|||
this.$.balanceCreateDialog.description += description.join(', ');
|
||||
}
|
||||
|
||||
buildFilterDates() {
|
||||
let today = new Date();
|
||||
this.today = today.setHours(0, 0, 0, 0);
|
||||
getScopeDates(days) {
|
||||
const today = new Date();
|
||||
today.setHours(0, 0, 0, 0);
|
||||
|
||||
let buildDate = new Date(today);
|
||||
buildDate.setDate(today.getDate() + this.scopeDays);
|
||||
buildDate.setHours(23, 59, 59, 999);
|
||||
const daysOnward = new Date(today);
|
||||
daysOnward.setDate(today.getDate() + days);
|
||||
daysOnward.setHours(23, 59, 59, 999);
|
||||
|
||||
this.daysOnward = buildDate;
|
||||
return {from: today, to: daysOnward};
|
||||
}
|
||||
|
||||
onSearch(params) {
|
||||
if (params) {
|
||||
let newParams = params;
|
||||
if (params.scopeDays) {
|
||||
params.scopeDays = parseInt(params.scopeDays);
|
||||
this.scopeDays = params.scopeDays;
|
||||
this.buildFilterDates();
|
||||
params = Object.assign(params, {from: this.today, to: this.daysOnward});
|
||||
}
|
||||
const scopeDates = this.getScopeDates(params.scopeDays);
|
||||
Object.assign(newParams, scopeDates);
|
||||
} else if (Object.entries(params).length == 0)
|
||||
newParams = this.getScopeDates(1);
|
||||
|
||||
this.$.model.applyFilter(null, params);
|
||||
this.$.model.applyFilter(null, newParams);
|
||||
} else
|
||||
this.$.model.clear();
|
||||
}
|
||||
|
|
|
@ -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%
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue