diff --git a/packages/Webkul/Admin/src/Http/ViewComposers/DataGrids/ChannelsComposer.php b/packages/Webkul/Admin/src/Http/ViewComposers/DataGrids/ChannelsComposer.php new file mode 100644 index 000000000..9a213fa8a --- /dev/null +++ b/packages/Webkul/Admin/src/Http/ViewComposers/DataGrids/ChannelsComposer.php @@ -0,0 +1,154 @@ + 'Channels', + 'table' => 'channels', + 'select' => 'id', + 'perpage' => 5, + 'aliased' => false, //use this with false as default and true in case of joins + + 'massoperations' =>[ + [ + 'route' => route('admin.datagrid.delete'), + 'method' => 'DELETE', + 'label' => 'Delete', + 'type' => 'button', + ], + ], + + 'actions' => [ + [ + 'type' => 'Edit', + 'route' => route('admin.datagrid.delete'), + 'confirm_text' => 'Do you really edit this record?', + 'icon' => 'icon pencil-lg-icon', + ], [ + 'type' => 'Delete', + 'route' => route('admin.datagrid.delete'), + 'confirm_text' => 'Do you really want to delete this record?', + 'icon' => 'icon trash-icon', + ], + ], + + 'join' => [ + // [ + // 'join' => 'leftjoin', + // 'table' => 'roles as r', + // 'primaryKey' => 'u.role_id', + // 'condition' => '=', + // 'secondaryKey' => 'r.id', + // ] + ], + + //use aliasing on secodary columns if join is performed + + 'columns' => [ + + [ + 'name' => 'id', + 'alias' => 'channel_id', + 'type' => 'number', + 'label' => 'Channel ID', + 'sortable' => true, + ], + [ + 'name' => 'code', + 'alias' => 'channel_code', + 'type' => 'string', + 'label' => 'Channel Code', + 'sortable' => true, + ], + [ + 'name' => 'name', + 'alias' => 'channel_name', + 'type' => 'string', + 'label' => 'Channel Name', + 'sortable' => true, + ], + + ], + + //don't use aliasing in case of filters + + 'filterable' => [ + [ + 'column' => 'id', + 'alias' => 'channel_id', + 'type' => 'number', + 'label' => 'Channel ID', + ], + [ + 'column' => 'code', + 'alias' => 'channel_code', + 'type' => 'string', + 'label' => 'Channel Code', + ], + [ + 'column' => 'name', + 'alias' => 'channel_name', + 'type' => 'string', + 'label' => 'Channel Name', + ], + ], + + //don't use aliasing in case of searchables + + 'searchable' => [ + [ + 'column' => 'name', + 'type' => 'string', + 'label' => 'Channel Name', + ], + [ + 'column' => 'code', + 'type' => 'string', + 'label' => 'Channel Code', + ], + ], + + //list of viable operators that will be used + 'operators' => [ + 'eq' => "=", + 'lt' => "<", + 'gt' => ">", + 'lte' => "<=", + 'gte' => ">=", + 'neqs' => "<>", + 'neqn' => "!=", + 'like' => "like", + 'nlike' => "not like", + ], + // 'css' => [] + + ]); + + $view->with('datagrid', $datagrid); + // $view->with('count', $this->users->count()); + } +} \ No newline at end of file diff --git a/packages/Webkul/Admin/src/Http/ViewComposers/DataGrids/CountryComposer.php b/packages/Webkul/Admin/src/Http/ViewComposers/DataGrids/CountryComposer.php new file mode 100644 index 000000000..7d4c1ae36 --- /dev/null +++ b/packages/Webkul/Admin/src/Http/ViewComposers/DataGrids/CountryComposer.php @@ -0,0 +1,167 @@ + 'Countries', + 'table' => 'countries', + 'select' => 'id', + 'perpage' => 10, + 'aliased' => false, //use this with false as default and true in case of joins + + 'massoperations' =>[ + [ + 'route' => route('admin.datagrid.delete'), + 'method' => 'DELETE', + 'label' => 'Delete', + 'type' => 'button', + ], + ], + + 'actions' => [ + [ + 'type' => 'Edit', + 'route' => route('admin.datagrid.delete'), + 'confirm_text' => 'Do you really want to do this?', + 'icon' => 'icon pencil-lg-icon', + ], [ + 'type' => 'Delete', + 'route' => route('admin.datagrid.delete'), + 'confirm_text' => 'Do you really want to do this?', + 'icon' => 'icon trash-icon', + ], + ], + + 'join' => [ + // [ + // 'join' => 'leftjoin', + // 'table' => 'roles as r', + // 'primaryKey' => 'u.role_id', + // 'condition' => '=', + // 'secondaryKey' => 'r.id', + // ] + ], + + //use aliasing on secodary columns if join is performed + + 'columns' => [ + + [ + 'name' => 'id', + 'alias' => 'country_id', + 'type' => 'number', + 'label' => 'ID', + 'sortable' => true, + ], + [ + 'name' => 'code', + 'alias' => 'country_code', + 'type' => 'string', + 'label' => 'Code', + 'sortable' => true, + ], + [ + 'name' => 'name', + 'alias' => 'country_name', + 'type' => 'string', + 'label' => 'Name', + 'sortable' => true, + ], + [ + 'name' => 'status', + 'alias' => 'country_status', + 'type' => 'number', + 'label' => 'Code', + 'sortable' => true, + ], + + ], + + //don't use aliasing in case of filters + + 'filterable' => [ + [ + 'column' => 'id', + 'alias' => 'country_id', + 'type' => 'number', + 'label' => 'ID', + ], + [ + 'column' => 'code', + 'alias' => 'country_code', + 'type' => 'string', + 'label' => 'Code', + ], + [ + 'column' => 'name', + 'alias' => 'country_name', + 'type' => 'string', + 'label' => 'Name', + ], + [ + 'column' => 'status', + 'alias' => 'country_status', + 'type' => 'number', + 'label' => 'Code', + ], + ], + + //don't use aliasing in case of searchables + + 'searchable' => [ + [ + 'column' => 'name', + 'type' => 'string', + 'label' => 'Name', + ], + [ + 'column' => 'code', + 'type' => 'string', + 'label' => 'Code', + ], + ], + + //list of viable operators that will be used + 'operators' => [ + 'eq' => "=", + 'lt' => "<", + 'gt' => ">", + 'lte' => "<=", + 'gte' => ">=", + 'neqs' => "<>", + 'neqn' => "!=", + 'like' => "like", + 'nlike' => "not like", + ], + // 'css' => [] + + ]); + + $view->with('datagrid', $datagrid); + // $view->with('count', $this->users->count()); + } +} \ No newline at end of file diff --git a/packages/Webkul/Admin/src/Http/ViewComposers/DataGrids/CurrenciesComposer.php b/packages/Webkul/Admin/src/Http/ViewComposers/DataGrids/CurrenciesComposer.php new file mode 100644 index 000000000..b489aa97d --- /dev/null +++ b/packages/Webkul/Admin/src/Http/ViewComposers/DataGrids/CurrenciesComposer.php @@ -0,0 +1,154 @@ + 'Currencies', + 'table' => 'currencies', + 'select' => 'id', + 'perpage' => 5, + 'aliased' => false, //use this with false as default and true in case of joins + + 'massoperations' =>[ + [ + 'route' => route('admin.datagrid.delete'), + 'method' => 'DELETE', + 'label' => 'Delete', + 'type' => 'button', + ], + ], + + 'actions' => [ + [ + 'type' => 'Edit', + 'route' => route('admin.datagrid.delete'), + 'confirm_text' => 'Do you really edit this record?', + 'icon' => 'icon pencil-lg-icon', + ], [ + 'type' => 'Delete', + 'route' => route('admin.datagrid.delete'), + 'confirm_text' => 'Do you really want to delete this record?', + 'icon' => 'icon trash-icon', + ], + ], + + 'join' => [ + // [ + // 'join' => 'leftjoin', + // 'table' => 'roles as r', + // 'primaryKey' => 'u.role_id', + // 'condition' => '=', + // 'secondaryKey' => 'r.id', + // ] + ], + + //use aliasing on secodary columns if join is performed + + 'columns' => [ + + [ + 'name' => 'id', + 'alias' => 'currency_id', + 'type' => 'number', + 'label' => 'ID', + 'sortable' => true, + ], + [ + 'name' => 'code', + 'alias' => 'currency_code', + 'type' => 'string', + 'label' => 'Code', + 'sortable' => true, + ], + [ + 'name' => 'name', + 'alias' => 'currency_name', + 'type' => 'string', + 'label' => 'Name', + 'sortable' => true, + ], + + ], + + //don't use aliasing in case of filters + + 'filterable' => [ + [ + 'column' => 'id', + 'alias' => 'currency_id', + 'type' => 'number', + 'label' => 'ID', + ], + [ + 'column' => 'code', + 'alias' => 'currency_code', + 'type' => 'string', + 'label' => 'Code', + ], + [ + 'column' => 'name', + 'alias' => 'currency_name', + 'type' => 'string', + 'label' => 'Name', + ], + ], + + //don't use aliasing in case of searchables + + 'searchable' => [ + [ + 'column' => 'name', + 'type' => 'string', + 'label' => 'Name', + ], + [ + 'column' => 'code', + 'type' => 'string', + 'label' => 'Code', + ], + ], + + //list of viable operators that will be used + 'operators' => [ + 'eq' => "=", + 'lt' => "<", + 'gt' => ">", + 'lte' => "<=", + 'gte' => ">=", + 'neqs' => "<>", + 'neqn' => "!=", + 'like' => "like", + 'nlike' => "not like", + ], + // 'css' => [] + + ]); + + $view->with('datagrid', $datagrid); + // $view->with('count', $this->users->count()); + } +} \ No newline at end of file diff --git a/packages/Webkul/Admin/src/Http/ViewComposers/DataGrids/ExchangeRatesComposer.php b/packages/Webkul/Admin/src/Http/ViewComposers/DataGrids/ExchangeRatesComposer.php new file mode 100644 index 000000000..c207f3881 --- /dev/null +++ b/packages/Webkul/Admin/src/Http/ViewComposers/DataGrids/ExchangeRatesComposer.php @@ -0,0 +1,162 @@ + 'Exchange Rates', + 'table' => 'currency_exchange_rates', + 'select' => 'id', + 'perpage' => 5, + 'aliased' => false, //use this with false as default and true in case of joins + + 'massoperations' =>[ + [ + 'route' => route('admin.datagrid.delete'), + 'method' => 'DELETE', + 'label' => 'Delete', + 'type' => 'button', + ], + ], + + 'actions' => [ + [ + 'type' => 'Edit', + 'route' => route('admin.datagrid.delete'), + 'confirm_text' => 'Do you really edit this record?', + 'icon' => 'icon pencil-lg-icon', + ], [ + 'type' => 'Delete', + 'route' => route('admin.datagrid.delete'), + 'confirm_text' => 'Do you really want to delete this record?', + 'icon' => 'icon trash-icon', + ], + ], + + 'join' => [ + // [ + // 'join' => 'leftjoin', + // 'table' => 'roles as r', + // 'primaryKey' => 'u.role_id', + // 'condition' => '=', + // 'secondaryKey' => 'r.id', + // ] + ], + + //use aliasing on secodary columns if join is performed + + 'columns' => [ + + [ + 'name' => 'id', + 'alias' => 'exch_id', + 'type' => 'number', + 'label' => 'Rate ID', + 'sortable' => true, + ], + [ + 'name' => 'source_currency', + 'alias' => 'exch_source_currency', + 'type' => 'string', + 'label' => 'Source Currency', + 'sortable' => true, + ], + [ + 'name' => 'target_currency', + 'alias' => 'exch_target_currency', + 'type' => 'string', + 'label' => 'Target Currency', + 'sortable' => true, + ], + [ + 'name' => 'ratio', + 'alias' => 'exch_ratio', + 'type' => 'string', + 'label' => 'Exchange Ratio', + ], + + ], + + //don't use aliasing in case of filters + + 'filterable' => [ + [ + 'column' => 'id', + 'alias' => 'exch_id', + 'type' => 'number', + 'label' => 'Rate ID', + ], + [ + 'column' => 'source_currency', + 'alias' => 'exch_source_currency', + 'type' => 'string', + 'label' => 'Source Currency', + 'sortable' => true, + ], + [ + 'column' => 'target_currency', + 'alias' => 'exch_target_currency', + 'type' => 'string', + 'label' => 'Target Currency', + 'sortable' => true, + ], + ], + + //don't use aliasing in case of searchables + + 'searchable' => [ + [ + 'column' => 'source_currency', + 'type' => 'string', + 'label' => 'Source Currency', + ], + [ + 'column' => 'target_currency', + 'type' => 'string', + 'label' => 'Target Currency', + ], + ], + + //list of viable operators that will be used + 'operators' => [ + 'eq' => "=", + 'lt' => "<", + 'gt' => ">", + 'lte' => "<=", + 'gte' => ">=", + 'neqs' => "<>", + 'neqn' => "!=", + 'like' => "like", + 'nlike' => "not like", + ], + // 'css' => [] + + ]); + + $view->with('datagrid', $datagrid); + // $view->with('count', $this->users->count()); + } +} \ No newline at end of file diff --git a/packages/Webkul/Admin/src/Http/ViewComposers/DataGrids/InventorySourcesComposer.php b/packages/Webkul/Admin/src/Http/ViewComposers/DataGrids/InventorySourcesComposer.php new file mode 100644 index 000000000..b6b2c4083 --- /dev/null +++ b/packages/Webkul/Admin/src/Http/ViewComposers/DataGrids/InventorySourcesComposer.php @@ -0,0 +1,167 @@ + 'Inventory Sources', + 'table' => 'inventory_sources', + 'select' => 'id', + 'perpage' => 5, + 'aliased' => false, //use this with false as default and true in case of joins + + 'massoperations' =>[ + [ + 'route' => route('admin.datagrid.delete'), + 'method' => 'DELETE', + 'label' => 'Delete', + 'type' => 'button', + ], + ], + + 'actions' => [ + [ + 'type' => 'Edit', + 'route' => route('admin.datagrid.delete'), + 'confirm_text' => 'Do you really edit this record?', + 'icon' => 'icon pencil-lg-icon', + ], [ + 'type' => 'Delete', + 'route' => route('admin.datagrid.delete'), + 'confirm_text' => 'Do you really want to delete this record?', + 'icon' => 'icon trash-icon', + ], + ], + + 'join' => [ + // [ + // 'join' => 'leftjoin', + // 'table' => 'roles as r', + // 'primaryKey' => 'u.role_id', + // 'condition' => '=', + // 'secondaryKey' => 'r.id', + // ] + ], + + //use aliasing on secodary columns if join is performed + + 'columns' => [ + + [ + 'name' => 'id', + 'alias' => 'inventory_id', + 'type' => 'number', + 'label' => 'ID', + 'sortable' => true, + ], + [ + 'name' => 'code', + 'alias' => 'inventory_code', + 'type' => 'string', + 'label' => 'Code', + 'sortable' => true, + ], + [ + 'name' => 'name', + 'alias' => 'inventory_name', + 'type' => 'string', + 'label' => 'Name', + 'sortable' => true, + ], + [ + 'name' => 'priority', + 'alias' => 'inventory_priority', + 'type' => 'string', + 'label' => 'Priority', + 'sortable' => true, + ], + [ + 'name' => 'status', + 'alias' => 'inventory_status', + 'type' => 'string', + 'label' => 'Status', + 'sortable' => true, + ], + + ], + + //don't use aliasing in case of filters + + 'filterable' => [ + [ + 'column' => 'id', + 'alias' => 'inventory_id', + 'type' => 'number', + 'label' => 'ID', + ], + [ + 'column' => 'code', + 'alias' => 'inventory_code', + 'type' => 'string', + 'label' => 'Code', + ], + [ + 'column' => 'name', + 'alias' => 'inventory_name', + 'type' => 'string', + 'label' => 'Name', + ], + ], + + //don't use aliasing in case of searchables + + 'searchable' => [ + [ + 'column' => 'name', + 'type' => 'string', + 'label' => 'Name', + ], + [ + 'column' => 'code', + 'type' => 'string', + 'label' => 'Code', + ], + ], + + //list of viable operators that will be used + 'operators' => [ + 'eq' => "=", + 'lt' => "<", + 'gt' => ">", + 'lte' => "<=", + 'gte' => ">=", + 'neqs' => "<>", + 'neqn' => "!=", + 'like' => "like", + 'nlike' => "not like", + ], + // 'css' => [] + + ]); + + $view->with('datagrid', $datagrid); + } +} \ No newline at end of file diff --git a/packages/Webkul/Admin/src/Http/ViewComposers/DataGrids/LocalesComposer.php b/packages/Webkul/Admin/src/Http/ViewComposers/DataGrids/LocalesComposer.php new file mode 100644 index 000000000..8de71b5c9 --- /dev/null +++ b/packages/Webkul/Admin/src/Http/ViewComposers/DataGrids/LocalesComposer.php @@ -0,0 +1,154 @@ + 'Locales', + 'table' => 'locales', + 'select' => 'id', + 'perpage' => 5, + 'aliased' => false, //use this with false as default and true in case of joins + + 'massoperations' =>[ + [ + 'route' => route('admin.datagrid.delete'), + 'method' => 'DELETE', + 'label' => 'Delete', + 'type' => 'button', + ], + ], + + 'actions' => [ + [ + 'type' => 'Edit', + 'route' => route('admin.datagrid.delete'), + 'confirm_text' => 'Do you really edit this record?', + 'icon' => 'icon pencil-lg-icon', + ], [ + 'type' => 'Delete', + 'route' => route('admin.datagrid.delete'), + 'confirm_text' => 'Do you really want to delete this record?', + 'icon' => 'icon trash-icon', + ], + ], + + 'join' => [ + // [ + // 'join' => 'leftjoin', + // 'table' => 'roles as r', + // 'primaryKey' => 'u.role_id', + // 'condition' => '=', + // 'secondaryKey' => 'r.id', + // ] + ], + + //use aliasing on secodary columns if join is performed + + 'columns' => [ + + [ + 'name' => 'id', + 'alias' => 'locale_id', + 'type' => 'number', + 'label' => 'ID', + 'sortable' => true, + ], + [ + 'name' => 'code', + 'alias' => 'locale_code', + 'type' => 'string', + 'label' => 'Code', + 'sortable' => true, + ], + [ + 'name' => 'name', + 'alias' => 'locale_name', + 'type' => 'string', + 'label' => 'Name', + 'sortable' => true, + ], + + ], + + //don't use aliasing in case of filters + + 'filterable' => [ + [ + 'column' => 'id', + 'alias' => 'locale_id', + 'type' => 'number', + 'label' => 'ID', + ], + [ + 'column' => 'code', + 'alias' => 'locale_code', + 'type' => 'string', + 'label' => 'Code', + ], + [ + 'column' => 'name', + 'alias' => 'locale_name', + 'type' => 'string', + 'label' => 'Name', + ], + ], + + //don't use aliasing in case of searchables + + 'searchable' => [ + [ + 'column' => 'name', + 'type' => 'string', + 'label' => 'Name', + ], + [ + 'column' => 'code', + 'type' => 'string', + 'label' => 'Code', + ], + ], + + //list of viable operators that will be used + 'operators' => [ + 'eq' => "=", + 'lt' => "<", + 'gt' => ">", + 'lte' => "<=", + 'gte' => ">=", + 'neqs' => "<>", + 'neqn' => "!=", + 'like' => "like", + 'nlike' => "not like", + ], + // 'css' => [] + + ]); + + $view->with('datagrid', $datagrid); + // $view->with('count', $this->users->count()); + } +} \ No newline at end of file diff --git a/packages/Webkul/Admin/src/Http/ViewComposers/DataGrids/RolesComposer.php b/packages/Webkul/Admin/src/Http/ViewComposers/DataGrids/RolesComposer.php new file mode 100644 index 000000000..82b31fcc9 --- /dev/null +++ b/packages/Webkul/Admin/src/Http/ViewComposers/DataGrids/RolesComposer.php @@ -0,0 +1,154 @@ + 'Roles', + 'table' => 'roles', + 'select' => 'id', + 'perpage' => 5, + 'aliased' => false, //use this with false as default and true in case of joins + + 'massoperations' =>[ + [ + 'route' => route('admin.datagrid.delete'), + 'method' => 'DELETE', + 'label' => 'Delete', + 'type' => 'button', + ], + ], + + 'actions' => [ + [ + 'type' => 'Edit', + 'route' => route('admin.datagrid.delete'), + 'confirm_text' => 'Do you really edit this record?', + 'icon' => 'icon pencil-lg-icon', + ], [ + 'type' => 'Delete', + 'route' => route('admin.datagrid.delete'), + 'confirm_text' => 'Do you really want to delete this record?', + 'icon' => 'icon trash-icon', + ], + ], + + 'join' => [ + // [ + // 'join' => 'leftjoin', + // 'table' => 'roles as r', + // 'primaryKey' => 'u.role_id', + // 'condition' => '=', + // 'secondaryKey' => 'r.id', + // ] + ], + + //use aliasing on secodary columns if join is performed + + 'columns' => [ + + [ + 'name' => 'id', + 'alias' => 'r_id', + 'type' => 'number', + 'label' => 'ID', + 'sortable' => true, + ], + [ + 'name' => 'name', + 'alias' => 'r_name', + 'type' => 'string', + 'label' => 'Name', + 'sortable' => true, + ], + [ + 'name' => 'permission_type', + 'alias' => 'r_permission_type', + 'type' => 'string', + 'label' => 'Permission Type', + 'sortable' => true, + ], + + ], + + //don't use aliasing in case of filters + + 'filterable' => [ + [ + 'column' => 'id', + 'alias' => 'r_id', + 'type' => 'number', + 'label' => 'ID', + ], + [ + 'column' => 'name', + 'alias' => 'r_name', + 'type' => 'string', + 'label' => 'Name', + ], + [ + 'column' => 'permission_type', + 'alias' => 'r_permission_type', + 'type' => 'string', + 'label' => 'Permission Type', + ], + ], + + //don't use aliasing in case of searchables + + 'searchable' => [ + [ + 'column' => 'name', + 'type' => 'string', + 'label' => 'Name', + ], + [ + 'column' => 'permission_type', + 'type' => 'string', + 'label' => 'Permission Type', + ], + ], + + //list of viable operators that will be used + 'operators' => [ + 'eq' => "=", + 'lt' => "<", + 'gt' => ">", + 'lte' => "<=", + 'gte' => ">=", + 'neqs' => "<>", + 'neqn' => "!=", + 'like' => "like", + 'nlike' => "not like", + ], + // 'css' => [] + + ]); + + $view->with('datagrid', $datagrid); + // $view->with('count', $this->users->count()); + } +} \ No newline at end of file diff --git a/packages/Webkul/Admin/src/Http/ViewComposers/DataGrids/UserComposer.php b/packages/Webkul/Admin/src/Http/ViewComposers/DataGrids/UserComposer.php index 494b2f68a..e64f8f4d5 100644 --- a/packages/Webkul/Admin/src/Http/ViewComposers/DataGrids/UserComposer.php +++ b/packages/Webkul/Admin/src/Http/ViewComposers/DataGrids/UserComposer.php @@ -55,15 +55,15 @@ class UserComposer ], 'actions' => [ [ - 'type' => 'Delete', - 'route' => route('admin.datagrid.delete'), - 'confirm_text' => 'Do you really want to do this?', - 'icon' => 'icon trash-icon', - ], [ 'type' => 'Edit', 'route' => route('admin.datagrid.delete'), 'confirm_text' => 'Do you really want to do this?', 'icon' => 'icon pencil-lg-icon', + ], [ + 'type' => 'Delete', + 'route' => route('admin.datagrid.delete'), + 'confirm_text' => 'Do you really want to do this?', + 'icon' => 'icon trash-icon', ], ], 'join' => [ @@ -92,7 +92,7 @@ class UserComposer 'name' => 'u.name', 'alias' => 'Name', 'type' => 'string', - 'label' => 'Admin Name', + 'label' => 'Name', 'sortable' => true, 'wrapper' => function ($value, $object) { return '' . $object->Name . ''; @@ -102,7 +102,7 @@ class UserComposer 'name' => 'u.email', 'alias' => 'Email', 'type' => 'string', - 'label' => 'Admin E-Mail', + 'label' => 'E-Mail', 'sortable' => true, ], [ @@ -147,7 +147,7 @@ class UserComposer 'column' => 'u.name', 'alias' => 'Name', 'type' => 'string', - 'label' => 'Admin Name' + 'label' => 'Name' ], [ 'column' => 'u.id', 'alias' => 'ID', @@ -165,11 +165,11 @@ class UserComposer [ 'column' => 'u.email', 'type' => 'string', - 'label' => 'Admin E-Mail' + 'label' => 'E-Mail' ], [ 'column' => 'u.name', 'type' => 'string', - 'label' => 'Admin Name' + 'label' => 'Name' ] ], 'operators' => [ diff --git a/packages/Webkul/Admin/src/Http/routes.php b/packages/Webkul/Admin/src/Http/routes.php index 1a49e40b7..1464d5cdc 100644 --- a/packages/Webkul/Admin/src/Http/routes.php +++ b/packages/Webkul/Admin/src/Http/routes.php @@ -212,7 +212,7 @@ Route::group(['middleware' => ['web']], function () { ])->name('admin.countries.store'); - // Country Routes + // Currency Routes Route::get('/currencies', 'Webkul\Core\Http\Controllers\CurrencyController@index')->defaults('_config', [ 'view' => 'admin::settings.currencies.index' ])->name('admin.currencies.index'); @@ -226,7 +226,7 @@ Route::group(['middleware' => ['web']], function () { ])->name('admin.currencies.store'); - // Country Routes + // Exchange Rates Routes Route::get('/exchange_rates', 'Webkul\Core\Http\Controllers\ExchangeRateController@index')->defaults('_config', [ 'view' => 'admin::settings.exchange_rates.index' ])->name('admin.exchange_rates.index'); diff --git a/packages/Webkul/Admin/src/Providers/ComposerServiceProvider.php b/packages/Webkul/Admin/src/Providers/ComposerServiceProvider.php index 7037ffa84..79ea7c7fe 100644 --- a/packages/Webkul/Admin/src/Providers/ComposerServiceProvider.php +++ b/packages/Webkul/Admin/src/Providers/ComposerServiceProvider.php @@ -16,14 +16,31 @@ class ComposerServiceProvider extends ServiceProvider */ public function boot() { - // Using class based composers... + + //for the users in the countries dashboard + View::composer('admin::settings.countries.index', 'Webkul\Admin\Http\ViewComposers\DataGrids\CountryComposer'); + + //for the users in the admin dashboard View::composer('admin::users.users.index', 'Webkul\Admin\Http\ViewComposers\DataGrids\UserComposer'); - // Using Closure based composers... + //for the users in the admin dashboard + View::composer('admin::users.roles.index', 'Webkul\Admin\Http\ViewComposers\DataGrids\RolesComposer'); + + //for the locales in admin dashboard + View::composer('admin::settings.locales.index', 'Webkul\Admin\Http\ViewComposers\DataGrids\LocalesComposer'); + + //for the currencies in admin dashboard + View::composer('admin::settings.currencies.index', 'Webkul\Admin\Http\ViewComposers\DataGrids\CurrenciesComposer'); + + //for the Exchange Rates in admin dashboard + View::composer('admin::settings.exchange_rates.index', 'Webkul\Admin\Http\ViewComposers\DataGrids\ExchangeRatesComposer'); + + //for inventory sources in admin dashboard + View::composer('admin::settings.inventory_sources.index', 'Webkul\Admin\Http\ViewComposers\DataGrids\InventorySourcesComposer'); + + //for channels in admin dashboard + View::composer('admin::settings.channels.index', 'Webkul\Admin\Http\ViewComposers\DataGrids\ChannelsComposer'); - // View::composer('admin::users.index', function ($view) { - // // - // }); } /** diff --git a/packages/Webkul/Admin/src/Resources/lang/en/app.php b/packages/Webkul/Admin/src/Resources/lang/en/app.php index 396c8e85f..71f9960ee 100644 --- a/packages/Webkul/Admin/src/Resources/lang/en/app.php +++ b/packages/Webkul/Admin/src/Resources/lang/en/app.php @@ -28,6 +28,7 @@ return [ 'submit-btn-title' => 'Reset Password' ], 'roles' => [ + 'title' => 'Roles', 'add-role-title' => 'Add Role', 'edit-role-title' => 'Edit Role', 'save-btn-title' => 'Save Role', @@ -40,6 +41,7 @@ return [ 'all' => 'All' ], 'users' => [ + 'title' => 'Users', 'add-user-title' => 'Add User', 'edit-user-title' => 'Edit User', 'save-btn-title' => 'Save User', @@ -161,6 +163,7 @@ return [ ], 'settings' => [ 'locales' => [ + 'title' => 'Locales', 'add-locale-title' => 'Add Locale', 'edit-locale-title' => 'Edit Locale', 'add-title' => 'Add Locale', @@ -170,6 +173,7 @@ return [ 'name' => 'Name' ], 'countries' => [ + 'title' => 'Countries', 'add-title' => 'Add Counrty', 'save-btn-title' => 'Save Counrty', 'general' => 'General', @@ -177,6 +181,7 @@ return [ 'name' => 'Name' ], 'currencies' => [ + 'title' => 'Currencies', 'add-title' => 'Add Currency', 'edit-title' => 'Edit Currency', 'save-btn-title' => 'Save Currency', diff --git a/packages/Webkul/Admin/src/Resources/views/settings/channels/index.blade.php b/packages/Webkul/Admin/src/Resources/views/settings/channels/index.blade.php index e07483858..9f9e6af3f 100644 --- a/packages/Webkul/Admin/src/Resources/views/settings/channels/index.blade.php +++ b/packages/Webkul/Admin/src/Resources/views/settings/channels/index.blade.php @@ -4,7 +4,7 @@