From 9c27c66028660c304fb8c603398bc3296161a56f Mon Sep 17 00:00:00 2001 From: Suraj Kashyap Date: Fri, 8 Nov 2024 11:51:14 +0530 Subject: [PATCH 1/7] add mail header and ui fix. --- .../src/DataGrids/Mail/EmailDataGrid.php | 17 ++- .../Admin/src/Resources/lang/ar/app.php | 9 +- .../Admin/src/Resources/lang/en/app.php | 5 +- .../Admin/src/Resources/lang/es/app.php | 7 +- .../Admin/src/Resources/lang/fa/app.php | 7 +- .../Admin/src/Resources/lang/tr/app.php | 9 +- .../Admin/src/Resources/lang/vi/app.php | 11 +- .../shimmer/mail/datagrid/index.blade.php | 2 + .../mail/datagrid/table/body.blade.php | 20 +-- .../mail/datagrid/table/head.blade.php | 13 ++ .../src/Resources/views/mail/index.blade.php | 117 ++++++++++++++---- 11 files changed, 160 insertions(+), 57 deletions(-) create mode 100644 packages/Webkul/Admin/src/Resources/views/components/shimmer/mail/datagrid/table/head.blade.php diff --git a/packages/Webkul/Admin/src/DataGrids/Mail/EmailDataGrid.php b/packages/Webkul/Admin/src/DataGrids/Mail/EmailDataGrid.php index a17df598c..29201256c 100644 --- a/packages/Webkul/Admin/src/DataGrids/Mail/EmailDataGrid.php +++ b/packages/Webkul/Admin/src/DataGrids/Mail/EmailDataGrid.php @@ -58,11 +58,11 @@ public function prepareColumns(): void $this->addColumn([ 'index' => 'attachments', - 'label' => '', + 'label' => 'Attachments', 'type' => 'string', 'searchable' => false, 'filterable' => false, - 'sortable' => false, + 'sortable' => true, 'closure' => fn ($row) => $row->attachments ? '' : '', ]); @@ -84,9 +84,18 @@ public function prepareColumns(): void 'filterable' => true, ]); + $this->addColumn([ + 'index' => 'reply', + 'label' => trans('admin::app.mail.index.datagrid.content'), + 'type' => 'string', + 'sortable' => true, + 'searchable' => true, + 'filterable' => true, + ]); + $this->addColumn([ 'index' => 'tags', - 'label' => trans('admin::app.mail.index.datagrid.tag-name'), + 'label' => trans('admin::app.mail.index.datagrid.tags'), 'type' => 'string', 'searchable' => false, 'sortable' => true, @@ -110,7 +119,7 @@ public function prepareColumns(): void $this->addColumn([ 'index' => 'created_at', - 'label' => trans('admin::app.mail.index.datagrid.created-at'), + 'label' => trans('admin::app.mail.index.datagrid.date'), 'type' => 'date', 'searchable' => true, 'filterable' => true, diff --git a/packages/Webkul/Admin/src/Resources/lang/ar/app.php b/packages/Webkul/Admin/src/Resources/lang/ar/app.php index 9d2eca9c6..55cd28ae8 100644 --- a/packages/Webkul/Admin/src/Resources/lang/ar/app.php +++ b/packages/Webkul/Admin/src/Resources/lang/ar/app.php @@ -1579,10 +1579,11 @@ 'from' => 'من', 'to' => 'إلى', 'subject' => 'الموضوع', - 'tag-name' => 'اسم العلامة', - 'created-at' => 'تم الإنشاء في', - 'move-to-inbox' => 'تم النقل إلى الوارد', - 'edit' => 'تحرير', + 'tags' => 'العلامات', + 'content' => 'المحتوى', + 'date' => 'التاريخ', + 'move-to-inbox' => 'نقل إلى البريد الوارد', + 'edit' => 'تعديل', 'view' => 'عرض', 'delete' => 'حذف', ], diff --git a/packages/Webkul/Admin/src/Resources/lang/en/app.php b/packages/Webkul/Admin/src/Resources/lang/en/app.php index 5c24c98de..9d76871d8 100644 --- a/packages/Webkul/Admin/src/Resources/lang/en/app.php +++ b/packages/Webkul/Admin/src/Resources/lang/en/app.php @@ -1579,8 +1579,9 @@ 'from' => 'From', 'to' => 'To', 'subject' => 'Subject', - 'tag-name' => 'Tag Name', - 'created-at' => 'Created At', + 'tags' => 'Tags', + 'content' => 'Content', + 'date' => 'Date', 'move-to-inbox' => 'Moved To Inbox', 'edit' => 'Edit', 'view' => 'View', diff --git a/packages/Webkul/Admin/src/Resources/lang/es/app.php b/packages/Webkul/Admin/src/Resources/lang/es/app.php index 26d410204..fb4f4bbe3 100644 --- a/packages/Webkul/Admin/src/Resources/lang/es/app.php +++ b/packages/Webkul/Admin/src/Resources/lang/es/app.php @@ -1579,9 +1579,10 @@ 'from' => 'De', 'to' => 'Para', 'subject' => 'Asunto', - 'tag-name' => 'Nombre de la etiqueta', - 'created-at' => 'Creado En', - 'move-to-inbox' => 'Mover a Bandeja de Entrada', + 'tags' => 'Etiquetas', + 'content' => 'Contenido', + 'date' => 'Fecha', + 'move-to-inbox' => 'Mover a la bandeja de entrada', 'edit' => 'Editar', 'view' => 'Ver', 'delete' => 'Eliminar', diff --git a/packages/Webkul/Admin/src/Resources/lang/fa/app.php b/packages/Webkul/Admin/src/Resources/lang/fa/app.php index f1c719aaf..6eeecd407 100644 --- a/packages/Webkul/Admin/src/Resources/lang/fa/app.php +++ b/packages/Webkul/Admin/src/Resources/lang/fa/app.php @@ -1579,11 +1579,12 @@ 'from' => 'از', 'to' => 'به', 'subject' => 'موضوع', - 'tag-name' => 'نام برچسب', - 'created-at' => 'تاریخ ایجاد', + 'tags' => 'برچسب‌ها', + 'content' => 'محتوا', + 'date' => 'تاریخ', 'move-to-inbox' => 'انتقال به صندوق ورودی', 'edit' => 'ویرایش', - 'view' => 'مشاهده', + 'view' => 'نمایش', 'delete' => 'حذف', ], ], diff --git a/packages/Webkul/Admin/src/Resources/lang/tr/app.php b/packages/Webkul/Admin/src/Resources/lang/tr/app.php index a0817ac5a..c487554a6 100644 --- a/packages/Webkul/Admin/src/Resources/lang/tr/app.php +++ b/packages/Webkul/Admin/src/Resources/lang/tr/app.php @@ -1576,11 +1576,12 @@ 'datagrid' => [ 'id' => 'ID', - 'from' => 'Kimden', - 'to' => 'Kime', + 'from' => 'Gönderen', + 'to' => 'Alıcı', 'subject' => 'Konu', - 'tag-name' => 'Etiket Adı', - 'created-at' => 'Oluşturulma Tarihi', + 'tags' => 'Etiketler', + 'content' => 'İçerik', + 'date' => 'Tarih', 'move-to-inbox' => 'Gelen Kutusuna Taşı', 'edit' => 'Düzenle', 'view' => 'Görüntüle', diff --git a/packages/Webkul/Admin/src/Resources/lang/vi/app.php b/packages/Webkul/Admin/src/Resources/lang/vi/app.php index 9ecef3e51..dfd3fbacc 100644 --- a/packages/Webkul/Admin/src/Resources/lang/vi/app.php +++ b/packages/Webkul/Admin/src/Resources/lang/vi/app.php @@ -1578,11 +1578,12 @@ 'id' => 'ID', 'from' => 'Từ', 'to' => 'Đến', - 'subject' => 'Chủ Đề', - 'tag-name' => 'Tên Thẻ', - 'created-at' => 'Thời Gian Tạo', - 'move-to-inbox' => 'Chuyển Đến Hộp Thư Đến', - 'edit' => 'Chỉnh Sửa', + 'subject' => 'Chủ đề', + 'tags' => 'Thẻ', + 'content' => 'Nội dung', + 'date' => 'Ngày', + 'move-to-inbox' => 'Di chuyển vào hộp thư đến', + 'edit' => 'Chỉnh sửa', 'view' => 'Xem', 'delete' => 'Xóa', ], diff --git a/packages/Webkul/Admin/src/Resources/views/components/shimmer/mail/datagrid/index.blade.php b/packages/Webkul/Admin/src/Resources/views/components/shimmer/mail/datagrid/index.blade.php index b8b4f06e6..b9c7a983c 100644 --- a/packages/Webkul/Admin/src/Resources/views/components/shimmer/mail/datagrid/index.blade.php +++ b/packages/Webkul/Admin/src/Resources/views/components/shimmer/mail/datagrid/index.blade.php @@ -4,6 +4,8 @@
+ +
diff --git a/packages/Webkul/Admin/src/Resources/views/components/shimmer/mail/datagrid/table/body.blade.php b/packages/Webkul/Admin/src/Resources/views/components/shimmer/mail/datagrid/table/body.blade.php index d65a4150e..11f80cda9 100644 --- a/packages/Webkul/Admin/src/Resources/views/components/shimmer/mail/datagrid/table/body.blade.php +++ b/packages/Webkul/Admin/src/Resources/views/components/shimmer/mail/datagrid/table/body.blade.php @@ -1,24 +1,28 @@ @for ($i = 0; $i < 10; $i++) -
-
+
+
-
+
-
+
+
+ +
+
-
-
-
+
+
+
-
+
diff --git a/packages/Webkul/Admin/src/Resources/views/components/shimmer/mail/datagrid/table/head.blade.php b/packages/Webkul/Admin/src/Resources/views/components/shimmer/mail/datagrid/table/head.blade.php new file mode 100644 index 000000000..7797ae63a --- /dev/null +++ b/packages/Webkul/Admin/src/Resources/views/components/shimmer/mail/datagrid/table/head.blade.php @@ -0,0 +1,13 @@ +
+
+
+ +
+
+ +
+
+ +
+
+
\ No newline at end of file diff --git a/packages/Webkul/Admin/src/Resources/views/mail/index.blade.php b/packages/Webkul/Admin/src/Resources/views/mail/index.blade.php index 5ad4fdbbc..f4c409480 100644 --- a/packages/Webkul/Admin/src/Resources/views/mail/index.blade.php +++ b/packages/Webkul/Admin/src/Resources/views/mail/index.blade.php @@ -49,10 +49,10 @@ class="primary-button" - +
- + @pushOnce('scripts')