From f8253a5b305d9d9dbde85ff84baa0b91cf1ae6eb Mon Sep 17 00:00:00 2001 From: Sevan Nerse Date: Tue, 23 Feb 2021 18:29:31 +0300 Subject: [PATCH] date filter will work based on company format and the selection of date range is added --- app/View/Components/SearchString.php | 9 +++- .../assets/js/components/AkauntingSearch.vue | 54 +++++++++++++++---- .../views/components/search-string.blade.php | 6 +-- 3 files changed, 54 insertions(+), 15 deletions(-) diff --git a/app/View/Components/SearchString.php b/app/View/Components/SearchString.php index 9063929e3..c1f579f8b 100644 --- a/app/View/Components/SearchString.php +++ b/app/View/Components/SearchString.php @@ -2,17 +2,21 @@ namespace App\View\Components; -use Illuminate\View\Component; +use App\Traits\DateTime; use Illuminate\Support\Str; -use Symfony\Component\Routing\Exception\RouteNotFoundException; +use Illuminate\View\Component; class SearchString extends Component { + use DateTime; + public $filters; /** string */ public $model; + public $date_format; + /** * Create a new component instance. * @@ -22,6 +26,7 @@ class SearchString extends Component { $this->model = $model; $this->filters = $filters; + $this->date_format = $this->getCompanyDateFormat(); } /** diff --git a/resources/assets/js/components/AkauntingSearch.vue b/resources/assets/js/components/AkauntingSearch.vue index 1a1b2a0d4..2dcf6aa0c 100644 --- a/resources/assets/js/components/AkauntingSearch.vue +++ b/resources/assets/js/components/AkauntingSearch.vue @@ -9,6 +9,7 @@ + @@ -41,9 +42,9 @@ class="form-control datepicker" :placeholder="placeholder" :ref="'input-search-date-field-' + _uid" - v-model="search" + value="" @focus="onInputFocus" - @input="onInputDateSelected" + @on-close="onInputDateSelected" @keyup.enter="onInputConfirm" > @@ -70,6 +71,10 @@ + +