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;
|
listen [::]:80 default_server;
|
||||||
server_name _;
|
server_name _;
|
||||||
autoindex off;
|
autoindex off;
|
||||||
|
client_max_body_size 50M;
|
||||||
|
|
||||||
root /salix/dist;
|
root /salix/dist;
|
||||||
error_page 404 = @notfound;
|
error_page 404 = @notfound;
|
||||||
|
|
|
@ -13,7 +13,6 @@
|
||||||
<vn-horizontal>
|
<vn-horizontal>
|
||||||
<vn-searchbar
|
<vn-searchbar
|
||||||
vn-id="ticketSearchbar"
|
vn-id="ticketSearchbar"
|
||||||
style="width: 100%"
|
|
||||||
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"
|
||||||
|
|
|
@ -18,30 +18,6 @@ export default class Controller {
|
||||||
this.$.balanceCreateDialog.show();
|
this.$.balanceCreateDialog.show();
|
||||||
}, name: 'Payment on account...', always: true}
|
}, 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() {
|
setBalanceCreateDialog() {
|
||||||
|
@ -61,27 +37,27 @@ export default class Controller {
|
||||||
this.$.balanceCreateDialog.description += description.join(', ');
|
this.$.balanceCreateDialog.description += description.join(', ');
|
||||||
}
|
}
|
||||||
|
|
||||||
buildFilterDates() {
|
getScopeDates(days) {
|
||||||
let today = new Date();
|
const today = new Date();
|
||||||
this.today = today.setHours(0, 0, 0, 0);
|
today.setHours(0, 0, 0, 0);
|
||||||
|
|
||||||
let buildDate = new Date(today);
|
const daysOnward = new Date(today);
|
||||||
buildDate.setDate(today.getDate() + this.scopeDays);
|
daysOnward.setDate(today.getDate() + days);
|
||||||
buildDate.setHours(23, 59, 59, 999);
|
daysOnward.setHours(23, 59, 59, 999);
|
||||||
|
|
||||||
this.daysOnward = buildDate;
|
return {from: today, to: daysOnward};
|
||||||
}
|
}
|
||||||
|
|
||||||
onSearch(params) {
|
onSearch(params) {
|
||||||
if (params) {
|
if (params) {
|
||||||
|
let newParams = params;
|
||||||
if (params.scopeDays) {
|
if (params.scopeDays) {
|
||||||
params.scopeDays = parseInt(params.scopeDays);
|
const scopeDates = this.getScopeDates(params.scopeDays);
|
||||||
this.scopeDays = params.scopeDays;
|
Object.assign(newParams, scopeDates);
|
||||||
this.buildFilterDates();
|
} else if (Object.entries(params).length == 0)
|
||||||
params = Object.assign(params, {from: this.today, to: this.daysOnward});
|
newParams = this.getScopeDates(1);
|
||||||
}
|
|
||||||
|
|
||||||
this.$.model.applyFilter(null, params);
|
this.$.model.applyFilter(null, newParams);
|
||||||
} else
|
} else
|
||||||
this.$.model.clear();
|
this.$.model.clear();
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,11 +1,17 @@
|
||||||
@import "variables";
|
@import "variables";
|
||||||
|
|
||||||
vn-ticket-index vn-icon-menu {
|
vn-ticket-index {
|
||||||
padding-top: 30px;
|
vn-icon-menu {
|
||||||
padding-left: 10px;
|
padding-top: 30px;
|
||||||
color: $color-main;
|
padding-left: 10px;
|
||||||
|
color: $color-main;
|
||||||
li {
|
|
||||||
color: initial;
|
li {
|
||||||
|
color: initial;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
vn-searchbar {
|
||||||
|
width: 100%
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in New Issue