Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[2.0] fix: add mail header and ui fix. #1718

Open
wants to merge 7 commits into
base: 2.0
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 22 additions & 5 deletions packages/Webkul/Admin/src/DataGrids/Mail/EmailDataGrid.php
Original file line number Diff line number Diff line change
Expand Up @@ -58,12 +58,20 @@ public function prepareColumns(): void

$this->addColumn([
'index' => 'attachments',
'label' => '<span class="icon-attachment text-2xl"></span>',
'label' => trans('admin::app.mail.index.datagrid.attachments'),
'type' => 'string',
'searchable' => false,
'filterable' => false,
'sortable' => false,
'closure' => fn ($row) => $row->attachments ? '<i class="icon-attachment text-2xl"></i>' : '',
'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 ? '<i class="icon-attachment text-2xl"></i>' : '';
},
]);

$this->addColumn([
Expand All @@ -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,
Expand All @@ -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,
Expand Down
10 changes: 6 additions & 4 deletions packages/Webkul/Admin/src/Resources/lang/ar/app.php
Original file line number Diff line number Diff line change
Expand Up @@ -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' => 'حذف',
],
Expand Down
6 changes: 4 additions & 2 deletions packages/Webkul/Admin/src/Resources/lang/en/app.php
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down
8 changes: 5 additions & 3 deletions packages/Webkul/Admin/src/Resources/lang/es/app.php
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down
8 changes: 5 additions & 3 deletions packages/Webkul/Admin/src/Resources/lang/fa/app.php
Original file line number Diff line number Diff line change
Expand Up @@ -1579,11 +1579,13 @@
'from' => 'از',
'to' => 'به',
'subject' => 'موضوع',
'tag-name' => 'نام برچسب',
'created-at' => 'تاریخ ایجاد',
'tags' => 'برچسب‌ها',
'content' => 'محتوا',
'attachments' => 'پیوست‌ها',
'date' => 'تاریخ',
'move-to-inbox' => 'انتقال به صندوق ورودی',
'edit' => 'ویرایش',
'view' => 'مشاهده',
'view' => 'نمایش',
'delete' => 'حذف',
],
],
Expand Down
10 changes: 6 additions & 4 deletions packages/Webkul/Admin/src/Resources/lang/tr/app.php
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down
12 changes: 7 additions & 5 deletions packages/Webkul/Admin/src/Resources/lang/vi/app.php
Original file line number Diff line number Diff line change
Expand Up @@ -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',
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
<div class="flex">
<div class="w-full">
<div class="table-responsive box-shadow grid w-full overflow-hidden rounded border border-gray-200 bg-white dark:border-gray-800 dark:bg-gray-900">
<x-admin::shimmer.mail.datagrid.table.head />

<x-admin::shimmer.mail.datagrid.table.body />
</div>
</div>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,24 +1,28 @@
@for ($i = 0; $i < 10; $i++)
<div class="flex justify-between items-center border-b px-8 py-4 text-gray-600 cursor-pointer hover:bg-gray-50 dark:border-gray-800 dark:text-gray-300 dark:hover:bg-gray-950">
<div class="flex gap-32 items-center justify-start w-full">
<div class="flex cursor-pointer items-center justify-between border-b px-8 py-4 text-gray-600 hover:bg-gray-50 dark:border-gray-800 dark:text-gray-300 dark:hover:bg-gray-950">
<div class="flex w-full items-center justify-start gap-[100px]">
<div class="flex items-center gap-6">
<div class="relative flex items-center">
<div class="flex gap-1.5 items-center justify-center">
<div class="flex items-center justify-center gap-1.5">
<div class="shimmer absolute right-8 h-1.5 w-1.5 rounded-full bg-sky-600 dark:bg-white"></div>

<div class="shimmer h-6 w-6"></div>
</div>
</div>

<div class="shimmer h-[17px] w-[150px]"></div>
<div class="flex items-center gap-2">
<div class="shimmer flex h-9 min-w-9 rounded-full"></div>

<div class="shimmer h-[17px] w-[125px]"></div>
</div>
</div>

<div class="flex gap-4 items-center justify-between w-full">
<div class="flex gap-2 items-center flex-frow">
<div class="shimmer h-6 w-[850px]"></div>
<div class="flex w-full items-center justify-between gap-4">
<div class="flex-frow flex items-center gap-2">
<div class="shimmer h-6 w-[650px]"></div>
</div>

<div class="flex-shrink-0 min-w-[80px] text-right">
<div class="min-w-[80px] flex-shrink-0 text-right">
<div class="shimmer h-[17px] w-[100px]"></div>
</div>
</div>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<div class="row tems-center grid grid-cols-[2fr_7fr_.1fr] items-center gap-2.5 border-b px-8 py-4 dark:border-gray-800">
<div class="flex items-center gap-6">
<div class="shimmer h-6 w-6"></div>

<div class="shimmer h-[17px] w-[150px]"></div>
</div>

<div class="flex w-full items-center justify-between gap-4">
<div class="shimmer h-[17px] w-[280px]"></div>

<div class="shimmer float-right h-[17px] w-[75px]"></div>
</div>
</div>
Loading
Loading