Skip to content

Commit

Permalink
Issue krayin#1418 fixed.
Browse files Browse the repository at this point in the history
  • Loading branch information
suraj-webkul committed Aug 23, 2024
1 parent b310043 commit 5a636f2
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 8 deletions.
9 changes: 9 additions & 0 deletions packages/Webkul/Admin/src/DataGrids/Mail/EmailDataGrid.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,15 @@ public function prepareQueryBuilder(): Builder
*/
public function prepareColumns(): void
{
$this->addColumn([
'index' => 'id',
'label' => trans('admin::app.mail.index.datagrid.id'),
'type' => 'string',
'sortable' => true,
'searchable' => true,
'filterable' => true,
]);

$this->addColumn([
'index' => 'attachments',
'label' => '<span class="icon-attachment text-2xl"></span>',
Expand Down
32 changes: 24 additions & 8 deletions packages/Webkul/Admin/src/Resources/views/mail/index.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@ class="primary-button"
>
{!! view_render_event('krayin.admin.mail.'.request('route').'.datagrid.before') !!}
<!-- DataGrid -->
<!-- DataGrid -->
<x-admin::datagrid
ref="datagrid"
Expand All @@ -74,21 +73,38 @@ class="primary-button"
class="row grid items-center gap-2.5 border-b px-4 py-4 text-gray-600 transition-all hover:bg-gray-50 dark:border-gray-800 dark:text-gray-300 dark:hover:bg-gray-950"
:style="`grid-template-columns: repeat(${gridsCount}, minmax(0, 1fr))`"
>
<!-- Group ID -->
<!-- Select Box -->
<div class="flex select-none items-center gap-16">
<input
type="checkbox"
:name="`mass_action_select_record_${record.id}`"
:id="`mass_action_select_record_${record.id}`"
:value="record.id"
class="peer hidden"
v-model="applied.massActions.indices"
>
<label
class="icon-checkbox-outline peer-checked:icon-checkbox-select cursor-pointer rounded-md text-2xl text-gray-600 peer-checked:text-brandColor dark:text-gray-300"
:for="`mass_action_select_record_${record.id}`"
></label>
</div>
<!-- ID -->
<p>@{{ record.id }}</p>
<!-- Attachments -->
<!-- Attachment -->
<p v-html="record.attachments"></p>
<!-- Name -->
<!-- From -->
<p>@{{ record.name }}</p>
<!-- Subject -->
<p v-html="record.subject"></p>
<p>@{{ record.subject }}</p>
<!-- Created At -->
<p v-html="record.created_at"></p>
<p>@{{ record.created_at }}</p>
<!-- Actions -->
<div class="flex justify-end">
<a @click="selectedMail=true; editModal(record.actions.find(action => action.index === 'edit'))">
Expand Down

0 comments on commit 5a636f2

Please sign in to comment.