-
-
Notifications
You must be signed in to change notification settings - Fork 809
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1290 from shivendra-webkul/krayin-update
Fix settings route and datagrid namespacing and fix groups and role pages
- Loading branch information
Showing
42 changed files
with
794 additions
and
441 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
72 changes: 0 additions & 72 deletions
72
packages/Webkul/Admin/src/DataGrids/Setting/SourceDataGrid.php
This file was deleted.
Oops, something went wrong.
2 changes: 1 addition & 1 deletion
2
...c/DataGrids/Setting/AttributeDataGrid.php → .../DataGrids/Settings/AttributeDataGrid.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...taGrids/Setting/EmailTemplateDataGrid.php → ...aGrids/Settings/EmailTemplateDataGrid.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...n/src/DataGrids/Setting/GroupDataGrid.php → .../src/DataGrids/Settings/GroupDataGrid.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...rc/DataGrids/Setting/PipelineDataGrid.php → ...c/DataGrids/Settings/PipelineDataGrid.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...in/src/DataGrids/Setting/RoleDataGrid.php → ...n/src/DataGrids/Settings/RoleDataGrid.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
72 changes: 72 additions & 0 deletions
72
packages/Webkul/Admin/src/DataGrids/Settings/SourceDataGrid.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
<?php | ||
|
||
namespace Webkul\Admin\DataGrids\Settings; | ||
|
||
use Illuminate\Database\Query\Builder; | ||
use Illuminate\Support\Facades\DB; | ||
use Webkul\DataGrid\DataGrid; | ||
|
||
class SourceDataGrid extends DataGrid | ||
{ | ||
/** | ||
* Prepare query builder. | ||
*/ | ||
public function prepareQueryBuilder(): Builder | ||
{ | ||
$queryBuilder = DB::table('lead_sources') | ||
->addSelect( | ||
'lead_sources.id', | ||
'lead_sources.name' | ||
); | ||
|
||
$this->addFilter('id', 'lead_sources.id'); | ||
|
||
return $queryBuilder; | ||
} | ||
|
||
/** | ||
* Add columns. | ||
*/ | ||
public function prepareColumns(): void | ||
{ | ||
$this->addColumn([ | ||
'index' => 'id', | ||
'label' => trans('admin::app.settings.sources.index.datagrid.id'), | ||
'type' => 'string', | ||
'sortable' => true, | ||
]); | ||
|
||
$this->addColumn([ | ||
'index' => 'name', | ||
'label' => trans('admin::app.settings.sources.index.datagrid.name'), | ||
'type' => 'string', | ||
'sortable' => true, | ||
]); | ||
} | ||
|
||
/** | ||
* Prepare actions. | ||
*/ | ||
public function prepareActions(): void | ||
{ | ||
$this->addAction([ | ||
'index' => 'edit', | ||
'icon' => 'icon-edit', | ||
'title' => trans('admin::app.settings.sources.index.datagrid.edit'), | ||
'method' => 'GET', | ||
'url' => function ($row) { | ||
return route('admin.settings.sources.edit', $row->id); | ||
}, | ||
]); | ||
|
||
$this->addAction([ | ||
'index' => 'delete', | ||
'icon' => 'icon-delete', | ||
'title' => trans('admin::app.settings.sources.index.datagrid.delete'), | ||
'method' => 'DELETE', | ||
'url' => function ($row) { | ||
return route('admin.settings.sources.delete', $row->id); | ||
}, | ||
]); | ||
} | ||
} |
2 changes: 1 addition & 1 deletion
2
...min/src/DataGrids/Setting/TagDataGrid.php → ...in/src/DataGrids/Settings/TagDataGrid.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...in/src/DataGrids/Setting/UserDataGrid.php → ...n/src/DataGrids/Settings/UserDataGrid.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...c/DataGrids/Setting/WarehouseDataGrid.php → .../DataGrids/Settings/WarehouseDataGrid.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...rc/DataGrids/Setting/WorkflowDataGrid.php → ...c/DataGrids/Settings/WorkflowDataGrid.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
...llers/Setting/EmailTemplateController.php → ...lers/Settings/EmailTemplateController.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.