Skip to content

Commit

Permalink
Merge pull request #524 from jitendra-webkul/master
Browse files Browse the repository at this point in the history
Issue #452 fixed
  • Loading branch information
jitendra-webkul authored Oct 18, 2021
2 parents e123c02 + bb4397a commit 3a319c5
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
12 changes: 12 additions & 0 deletions packages/Webkul/Admin/src/DataGrids/Quote/QuoteDataGrid.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ public function prepareQueryBuilder()
'quotes.tax_amount',
'quotes.adjustment_amount',
'quotes.grand_total',
'quotes.created_at',
'users.id as user_id',
'users.name as user_name',
'persons.id as person_id',
Expand Down Expand Up @@ -162,6 +163,17 @@ public function addColumns()
return core()->formatBasePrice($row->grand_total, 2);
},
]);

$this->addColumn([
'index' => 'created_at',
'label' => trans('admin::app.datagrid.created_at'),
'type' => 'date_range',
'searchable' => false,
'sortable' => true,
'closure' => function ($row) {
return core()->formatDate($row->created_at);
},
]);
}

/**
Expand Down
2 changes: 1 addition & 1 deletion packages/Webkul/Core/src/Core.php
Original file line number Diff line number Diff line change
Expand Up @@ -305,7 +305,7 @@ public function getSingletonInstance($className)
*/
public function formatDate($date)
{
return Carbon::parse($date)->format('d M Y H:i');
return Carbon::parse($date)->format('d M Y h:iA');
}

/**
Expand Down

0 comments on commit 3a319c5

Please sign in to comment.