diff --git a/front/nginx.conf b/front/nginx.conf index 84daf2ef2..cf429b153 100644 --- a/front/nginx.conf +++ b/front/nginx.conf @@ -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; diff --git a/modules/ticket/front/index/index.html b/modules/ticket/front/index/index.html index bf8ccea49..b5eb250cd 100644 --- a/modules/ticket/front/index/index.html +++ b/modules/ticket/front/index/index.html @@ -13,7 +13,6 @@ { - 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(); } diff --git a/modules/ticket/front/index/style.scss b/modules/ticket/front/index/style.scss index b5722b9b1..6a935c7f6 100644 --- a/modules/ticket/front/index/style.scss +++ b/modules/ticket/front/index/style.scss @@ -1,11 +1,17 @@ @import "variables"; -vn-ticket-index vn-icon-menu { - padding-top: 30px; - padding-left: 10px; - color: $color-main; - - li { - color: initial; +vn-ticket-index { + vn-icon-menu { + padding-top: 30px; + padding-left: 10px; + color: $color-main; + + li { + color: initial; + } } -} + + vn-searchbar { + width: 100% + } +} \ No newline at end of file