diff --git a/packages/Webkul/Admin/src/DataGrids/Mail/EmailDataGrid.php b/packages/Webkul/Admin/src/DataGrids/Mail/EmailDataGrid.php index a17df598c..af3e1c1c7 100644 --- a/packages/Webkul/Admin/src/DataGrids/Mail/EmailDataGrid.php +++ b/packages/Webkul/Admin/src/DataGrids/Mail/EmailDataGrid.php @@ -58,12 +58,20 @@ public function prepareColumns(): void $this->addColumn([ 'index' => 'attachments', - 'label' => '', + 'label' => trans('admin::app.mail.index.datagrid.attachments'), 'type' => 'string', 'searchable' => false, 'filterable' => false, - 'sortable' => false, - 'closure' => fn ($row) => $row->attachments ? '' : '', + 'sortable' => true, + 'closure' => function ($row) { + $email = app(EmailRepository::class)->find($row->id); + + $hasAttachments = collect($email->emails)->contains(function ($email) { + return $email->attachments()->exists(); + }); + + return $hasAttachments ? '' : ''; + }, ]); $this->addColumn([ @@ -84,9 +92,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 +127,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..33d1ce3a1 100644 --- a/packages/Webkul/Admin/src/Resources/lang/ar/app.php +++ b/packages/Webkul/Admin/src/Resources/lang/ar/app.php @@ -1579,10 +1579,12 @@ 'from' => 'من', 'to' => 'إلى', 'subject' => 'الموضوع', - 'tag-name' => 'اسم العلامة', - 'created-at' => 'تم الإنشاء في', - 'move-to-inbox' => 'تم النقل إلى الوارد', - 'edit' => 'تحرير', + 'tags' => 'العلامات', + 'content' => 'المحتوى', + 'attachments' => 'المرفقات', + '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..2a9c23a78 100644 --- a/packages/Webkul/Admin/src/Resources/lang/en/app.php +++ b/packages/Webkul/Admin/src/Resources/lang/en/app.php @@ -1579,8 +1579,10 @@ 'from' => 'From', 'to' => 'To', 'subject' => 'Subject', - 'tag-name' => 'Tag Name', - 'created-at' => 'Created At', + 'tags' => 'Tags', + 'content' => 'Content', + 'attachments' => 'Attachments', + '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..ef006ce47 100644 --- a/packages/Webkul/Admin/src/Resources/lang/es/app.php +++ b/packages/Webkul/Admin/src/Resources/lang/es/app.php @@ -1579,9 +1579,11 @@ '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', + 'attachments' => 'Archivos adjuntos', + '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..ab61dfc24 100644 --- a/packages/Webkul/Admin/src/Resources/lang/fa/app.php +++ b/packages/Webkul/Admin/src/Resources/lang/fa/app.php @@ -1579,11 +1579,13 @@ 'from' => 'از', 'to' => 'به', 'subject' => 'موضوع', - 'tag-name' => 'نام برچسب', - 'created-at' => 'تاریخ ایجاد', + 'tags' => 'برچسب‌ها', + 'content' => 'محتوا', + 'attachments' => 'پیوست‌ها', + '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..3e4d2fdcd 100644 --- a/packages/Webkul/Admin/src/Resources/lang/tr/app.php +++ b/packages/Webkul/Admin/src/Resources/lang/tr/app.php @@ -1576,11 +1576,13 @@ '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', + 'content' => 'Eklentiler', + '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..dd1f2f23f 100644 --- a/packages/Webkul/Admin/src/Resources/lang/vi/app.php +++ b/packages/Webkul/Admin/src/Resources/lang/vi/app.php @@ -1578,11 +1578,13 @@ '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', + 'attachments' => 'Tệp đính kèm', + '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..caf7f8407 --- /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..4154f17a8 100644 --- a/packages/Webkul/Admin/src/Resources/views/mail/index.blade.php +++ b/packages/Webkul/Admin/src/Resources/views/mail/index.blade.php @@ -1,5 +1,3 @@ - - @lang('admin::app.mail.index.' . request('route')) @@ -49,10 +47,10 @@ class="primary-button" - +
- + @pushOnce('scripts')