From 55984769ea88e3f4d84a36880b215653e7378a9d Mon Sep 17 00:00:00 2001 From: Book Pauk Date: Mon, 31 Oct 2022 21:07:25 +0700 Subject: [PATCH] =?UTF-8?q?=D0=A3=D0=BB=D1=83=D1=87=D1=88=D0=B5=D0=BD?= =?UTF-8?q?=D0=B8=D0=B5=20=D0=B2=D1=8B=D0=B1=D0=BE=D1=80=D0=B0=20=D0=B4?= =?UTF-8?q?=D0=B0=D1=82=D1=8B=20=D0=BF=D0=BE=D1=81=D1=82=D1=83=D0=BF=D0=BB?= =?UTF-8?q?=D0=B5=D0=BD=D0=B8=D1=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- client/components/Search/BaseList.js | 4 +++- client/components/Search/Search.vue | 1 + 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/client/components/Search/BaseList.js b/client/components/Search/BaseList.js index ffc1555..a7f9706 100644 --- a/client/components/Search/BaseList.js +++ b/client/components/Search/BaseList.js @@ -409,7 +409,7 @@ export default class BaseList { if (!dateFound) { const date = this.queryDate(s.date).split(','); let [from = '0000-00-00', to = '9999-99-99'] = date; - + dateFound = (book.date >= from && book.date <= to); } @@ -479,6 +479,7 @@ export default class BaseList { {label: 'за неделю', value: 'week'}, {label: 'за 2 недели', value: '2weeks'}, {label: 'за месяц', value: 'month'}, + {label: 'за 2 месяца', value: '2months'}, {label: 'за 3 месяца', value: '3months'}, {label: 'указать даты', value: 'manual'}, */ @@ -489,6 +490,7 @@ export default class BaseList { case 'week': date = utils.dateFormat(moment().subtract(1, 'weeks'), sqlFormat); break; case '2weeks': date = utils.dateFormat(moment().subtract(2, 'weeks'), sqlFormat); break; case 'month': date = utils.dateFormat(moment().subtract(1, 'months'), sqlFormat); break; + case '2months': date = utils.dateFormat(moment().subtract(2, 'months'), sqlFormat); break; case '3months': date = utils.dateFormat(moment().subtract(3, 'months'), sqlFormat); break; default: date = ''; diff --git a/client/components/Search/Search.vue b/client/components/Search/Search.vue index f512e30..910394a 100644 --- a/client/components/Search/Search.vue +++ b/client/components/Search/Search.vue @@ -452,6 +452,7 @@ class Search { {label: 'за неделю', value: 'week'}, {label: 'за 2 недели', value: '2weeks'}, {label: 'за месяц', value: 'month'}, + {label: 'за 2 месяца', value: '2months'}, {label: 'за 3 месяца', value: '3months'}, {label: 'выбрать даты', value: 'manual'}, ];