Skip to content

Commit

Permalink
Merge pull request #1885 from amit-webkul/daterange-placeholder
Browse files Browse the repository at this point in the history
🛠️ [v2.0] : Fixed Issue #1838
  • Loading branch information
devansh-webkul authored Jan 13, 2025
2 parents 4c70ee0 + d5d09b6 commit 0f120c5
Show file tree
Hide file tree
Showing 11 changed files with 53 additions and 38 deletions.
2 changes: 1 addition & 1 deletion packages/Webkul/Admin/src/DataGrids/Lead/LeadDataGrid.php
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,7 @@ public function prepareColumns(): void

$this->addColumn([
'index' => 'expected_close_date',
'label' => trans('admin::app.leads.index.datagrid.expected-close-date'),
'label' => trans('admin::app.leads.index.datagrid.date-to'),
'type' => 'date',
'searchable' => false,
'sortable' => true,
Expand Down
4 changes: 3 additions & 1 deletion packages/Webkul/Admin/src/Resources/lang/ar/app.php
Original file line number Diff line number Diff line change
Expand Up @@ -1677,7 +1677,7 @@
'contact-person' => 'شخص الاتصال',
'stage' => 'المرحلة',
'rotten-lead' => 'عميل محتمل متعفن',
'expected-close-date' => 'تاريخ الإغلاق المتوقع',
'date-to' => 'تاريخ إلى',
'created-at' => 'تم الإنشاء في',
'no' => 'لا',
'yes' => 'نعم',
Expand Down Expand Up @@ -1715,7 +1715,9 @@
'clear-all' => 'مسح الكل',
'filter' => 'تصفية',
'filters' => 'الفلاتر',
'from' => 'من',
'select' => 'اختر',
'to' => 'إلى',
],
],
],
Expand Down
4 changes: 3 additions & 1 deletion packages/Webkul/Admin/src/Resources/lang/en/app.php
Original file line number Diff line number Diff line change
Expand Up @@ -1681,7 +1681,7 @@
'contact-person' => 'Contact Person',
'stage' => 'Stage',
'rotten-lead' => 'Rotten Lead',
'expected-close-date' => 'Expected Close Date',
'date-to' => 'Date To',
'created-at' => 'Created At',
'no' => 'No',
'yes' => 'Yes',
Expand Down Expand Up @@ -1719,7 +1719,9 @@
'clear-all' => 'Clear All',
'filter' => 'Filter',
'filters' => 'Filters',
'from' => 'From',
'select' => 'Select',
'to' => 'To',
],
],
],
Expand Down
4 changes: 3 additions & 1 deletion packages/Webkul/Admin/src/Resources/lang/es/app.php
Original file line number Diff line number Diff line change
Expand Up @@ -1681,7 +1681,7 @@
'contact-person' => 'Persona de Contacto',
'stage' => 'Etapa',
'rotten-lead' => 'Lead Podrido',
'expected-close-date' => 'Fecha de Cierre Esperada',
'date-to' => 'Fecha Hasta',
'created-at' => 'Creado En',
'no' => 'No',
'yes' => '',
Expand Down Expand Up @@ -1719,7 +1719,9 @@
'clear-all' => 'Limpiar Todo',
'filter' => 'Filtrar',
'filters' => 'Filtros',
'from' => 'De',
'select' => 'Seleccionar',
'to' => 'A',
],
],
],
Expand Down
4 changes: 3 additions & 1 deletion packages/Webkul/Admin/src/Resources/lang/fa/app.php
Original file line number Diff line number Diff line change
Expand Up @@ -1681,7 +1681,7 @@
'contact-person' => 'شخص تماس',
'stage' => 'مرحله',
'rotten-lead' => 'سرنخ خراب شده',
'expected-close-date' => 'تاریخ بسته شدن مورد انتظار',
'date-to' => 'تاریخ تا',
'created-at' => 'تاریخ ایجاد',
'no' => 'خیر',
'yes' => 'بله',
Expand Down Expand Up @@ -1719,7 +1719,9 @@
'clear-all' => 'پاک کردن همه',
'filter' => 'فیلتر',
'filters' => 'فیلترها',
'from' => 'از',
'select' => 'انتخاب',
'to' => 'تا',
],
],
],
Expand Down
4 changes: 3 additions & 1 deletion packages/Webkul/Admin/src/Resources/lang/pt_BR/app.php
Original file line number Diff line number Diff line change
Expand Up @@ -1676,7 +1676,7 @@
'contact-person' => 'Pessoa de Contato',
'stage' => 'Etapa',
'rotten-lead' => 'Lead Podre',
'expected-close-date' => 'Data Esperada de Fechamento',
'date-to' => 'Data Até',
'created-at' => 'Criado Em',
'no' => 'Não',
'yes' => 'Sim',
Expand Down Expand Up @@ -1714,7 +1714,9 @@
'clear-all' => 'Limpar Tudo',
'filter' => 'Filtrar',
'filters' => 'Filtros',
'from' => 'De',
'select' => 'Selecionar',
'to' => 'Para',
],
],
],
Expand Down
4 changes: 3 additions & 1 deletion packages/Webkul/Admin/src/Resources/lang/tr/app.php
Original file line number Diff line number Diff line change
Expand Up @@ -1681,7 +1681,7 @@
'contact-person' => 'İletişim Kişisi',
'stage' => 'Aşama',
'rotten-lead' => 'Çürümüş Lead',
'expected-close-date' => 'Beklenen Kapanış Tarihi',
'date-to' => 'Bitiş Tarihi',
'created-at' => 'Oluşturulma Tarihi',
'no' => 'Hayır',
'yes' => 'Evet',
Expand Down Expand Up @@ -1719,7 +1719,9 @@
'clear-all' => 'Tümünü Temizle',
'filter' => 'Filtre',
'filters' => 'Filtreler',
'from' => 'Kimden',
'select' => 'Seç',
'to' => 'Kime',
],
],
],
Expand Down
36 changes: 19 additions & 17 deletions packages/Webkul/Admin/src/Resources/lang/vi/app.php
Original file line number Diff line number Diff line change
Expand Up @@ -1670,42 +1670,42 @@
'create-btn' => 'Tạo Khách Hàng Tiềm Năng',

'datagrid' => [
'id' => 'ID',
'sales-person' => 'Nhân Viên Kinh Doanh',
'subject' => 'Chủ Đề',
'source' => 'Nguồn',
'lead-value' => 'Giá Trị Khách Hàng',
'lead-type' => 'Loại Khách Hàng',
'tag-name' => 'Tên Thẻ',
'contact-person' => 'Người Liên Hệ',
'stage' => 'Giai Đoạn',
'rotten-lead' => 'Khách Hàng Tiềm Năng Hết Hạn',
'expected-close-date' => 'Ngày Dự Kiến Đóng',
'created-at' => 'Tạo Vào Lúc',
'no' => 'Không',
'yes' => '',
'date-to' => 'Ngày Đến',
'delete' => 'Xóa',
'id' => 'ID',
'lead-type' => 'Loại Khách Hàng',
'lead-value' => 'Giá Trị Khách Hàng',
'mass-delete' => 'Xóa Hàng Loạt',
'mass-update' => 'Cập Nhật Hàng Loạt',
'no' => 'Không',
'rotten-lead' => 'Khách Hàng Tiềm Năng Hết Hạn',
'sales-person' => 'Nhân Viên Kinh Doanh',
'source' => 'Nguồn',
'stage' => 'Giai Đoạn',
'subject' => 'Chủ Đề',
'tag-name' => 'Tên Thẻ',
'yes' => '',
],

'kanban' => [
'rotten-days' => 'Khách hàng tiềm năng đã hết hạn trong :days ngày',
'create-lead-btn' => 'Tạo Khách Hàng Tiềm Năng',
'empty-list' => 'Danh sách khách hàng tiềm năng của bạn trống',
'empty-list-description' => 'Tạo một khách hàng tiềm năng để tổ chức các mục tiêu của bạn.',
'create-lead-btn' => 'Tạo Khách Hàng Tiềm Năng',
'rotten-days' => 'Khách hàng tiềm năng đã hết hạn trong :days ngày',

'columns' => [
'contact-person' => 'Người Liên Hệ',
'created-at' => 'Tạo Vào Lúc',
'expected-close-date' => 'Ngày Dự Kiến Đóng',
'id' => 'ID',
'lead-type' => 'Loại Khách Hàng',
'lead-value' => 'Giá Trị Khách Hàng',
'sales-person' => 'Nhân Viên Kinh Doanh',
'source' => 'Nguồn',
'title' => 'Tiêu Đề',
'tags' => 'Thẻ',
'expected-close-date' => 'Ngày Dự Kiến Đóng',
'created-at' => 'Tạo Vào Lúc',
'title' => 'Tiêu Đề',
],

'toolbar' => [
Expand All @@ -1718,7 +1718,9 @@
'clear-all' => 'Xóa Tất Cả',
'filter' => 'Bộ Lọc',
'filters' => 'Bộ Lọc',
'from' => 'Từ',
'select' => 'Chọn',
'to' => 'Đến',
],
],
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -251,9 +251,7 @@ class="cursor-pointer rounded-md border px-3 py-2 text-center text-sm font-mediu
>
</p>
<x-admin::flat-picker.date
::allow-input="false"
>
<x-admin::flat-picker.date ::allow-input="false">
<input
type="date"
:name="`${column.index}[from]`"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,10 @@
{!! view_render_event('admin.leads.index.kanban.after') !!}

@pushOnce('scripts')
<script type="text/x-template" id="v-leads-kanban-template">
<script
type="text/x-template"
id="v-leads-kanban-template"
>
<template v-if="isLoading">
<div class="flex flex-col gap-4">
<x-admin::shimmer.leads.index.kanban />
Expand Down Expand Up @@ -487,11 +490,11 @@ class="rounded-xl bg-gray-200 px-2 py-1 text-xs font-medium dark:bg-gray-800"
},
//=======================================================================================
// Support for previous applied values in kanbans. All code is based on local storage.
// Support for previous applied values in kanban's. All code is based on local storage.
//=======================================================================================
/**
* Updates the kanbans stored in local storage with the latest data.
* Updates the kanban's stored in local storage with the latest data.
*
* @returns {void}
*/
Expand Down Expand Up @@ -539,9 +542,9 @@ class="rounded-xl bg-gray-200 px-2 py-1 text-xs font-medium dark:bg-gray-800"
},
/**
* Returns the storage key for kanbans in local storage.
* Returns the storage key for kanban's in local storage.
*
* @returns {string} Storage key for kanbans.
* @returns {string} Storage key for kanban's.
*/
getKanbansStorageKey() {
return 'kanbans';
Expand All @@ -561,9 +564,9 @@ class="rounded-xl bg-gray-200 px-2 py-1 text-xs font-medium dark:bg-gray-800"
},
/**
* Sets the kanbans in local storage.
* Sets the kanban's in local storage.
*
* @param {Array} kanbans - Kanbans to be stored in local storage.
* @param {Array} kanbans - Kanban's to be stored in local storage.
* @returns {void}
*/
setKanbans(kanbans) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ class="cursor-pointer rounded-md border px-3 py-2 text-center text-sm font-mediu
:name="`${column.index}[from]`"
value=""
class="flex min-h-[39px] w-full rounded-md border px-3 py-2 text-sm text-gray-600 transition-all hover:border-gray-400 dark:border-gray-800 dark:bg-gray-900 dark:text-gray-300 dark:hover:border-gray-400 ltr:pr-8 rtl:pl-8"
:placeholder="column.label"
placeholder="@lang('admin::app.leads.index.kanban.toolbar.filters.from')"
:ref="`${column.index}[from]`"
@change="addFilter(
$event,
Expand All @@ -205,7 +205,7 @@ class="flex min-h-[39px] w-full rounded-md border px-3 py-2 text-sm text-gray-60
:name="`${column.index}[to]`"
value=""
class="flex min-h-[39px] w-full rounded-md border px-3 py-2 text-sm text-gray-600 transition-all hover:border-gray-400 dark:border-gray-800 dark:bg-gray-900 dark:text-gray-300 dark:hover:border-gray-400 ltr:pr-8 rtl:pl-8"
:placeholder="column.label"
placeholder="@lang('admin::app.leads.index.kanban.toolbar.filters.to')"
:ref="`${column.index}[from]`"
@change="addFilter(
$event,
Expand Down Expand Up @@ -332,7 +332,7 @@ class="cursor-pointer rounded-md border px-3 py-2 text-center text-sm font-mediu
:name="`${column.index}[from]`"
value=""
class="flex min-h-[39px] w-full rounded-md border px-3 py-2 text-sm text-gray-600 transition-all hover:border-gray-400 dark:border-gray-800 dark:bg-gray-900 dark:text-gray-300 dark:hover:border-gray-400"
:placeholder="column.label"
placeholder="@lang('admin::app.leads.index.kanban.toolbar.filters.from')"
:ref="`${column.index}[from]`"
@change="addFilter(
$event,
Expand All @@ -348,7 +348,7 @@ class="flex min-h-[39px] w-full rounded-md border px-3 py-2 text-sm text-gray-60
:name="`${column.index}[to]`"
value=""
class="flex min-h-[39px] w-full rounded-md border px-3 py-2 text-sm text-gray-600 transition-all hover:border-gray-400 dark:border-gray-800 dark:bg-gray-900 dark:text-gray-300 dark:hover:border-gray-400"
:placeholder="column.label"
placeholder="@lang('admin::app.leads.index.kanban.toolbar.filters.to')"
:ref="`${column.index}[from]`"
@change="addFilter(
$event,
Expand Down

0 comments on commit 0f120c5

Please sign in to comment.