Skip to content

Commit

Permalink
Ensure list column names do not much model relation name
Browse files Browse the repository at this point in the history
Signed-off-by: Sam Poyigi <6567634+sampoyigi@users.noreply.github.com>
  • Loading branch information
sampoyigi committed Jun 30, 2022
1 parent ec0542b commit 5e84a71
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 6 deletions.
5 changes: 3 additions & 2 deletions app/admin/models/config/categories_model.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php

$config['list']['filter'] = [
'search' => [
'prompt' => 'lang:admin::lang.categories.text_filter_search',
Expand Down Expand Up @@ -70,13 +71,13 @@
'label' => 'lang:admin::lang.label_name',
'type' => 'text',
],
'parent_cat' => [
'parent' => [
'label' => 'lang:admin::lang.categories.column_parent',
'type' => 'text',
'relation' => 'parent_cat',
'select' => 'name',
],
'locations' => [
'location_name' => [
'label' => 'lang:admin::lang.column_location',
'type' => 'text',
'relation' => 'locations',
Expand Down
3 changes: 2 additions & 1 deletion app/admin/models/config/mealtimes_model.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php

$config['list']['filter'] = [
'scopes' => [
'location' => [
Expand Down Expand Up @@ -82,7 +83,7 @@
'label' => 'lang:admin::lang.column_id',
'invisible' => true,
],
'locations' => [
'location_name' => [
'label' => 'lang:admin::lang.column_location',
'type' => 'text',
'relation' => 'locations',
Expand Down
3 changes: 2 additions & 1 deletion app/admin/models/config/menus_model.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php

$config['list']['filter'] = [
'search' => [
'prompt' => 'lang:admin::lang.menus.text_filter_search',
Expand Down Expand Up @@ -89,7 +90,7 @@
'relation' => 'categories',
'select' => 'name',
],
'locations' => [
'location_name' => [
'label' => 'lang:admin::lang.column_location',
'type' => 'text',
'relation' => 'locations',
Expand Down
3 changes: 2 additions & 1 deletion app/admin/models/config/status_history_model.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php

$config['list']['columns'] = [
'created_at' => [
'label' => 'lang:admin::lang.statuses.column_time_date',
Expand All @@ -9,7 +10,7 @@
'relation' => 'staff',
'select' => 'staff_name',
],
'status' => [
'status_name' => [
'label' => 'lang:admin::lang.label_status',
'relation' => 'status',
'select' => 'status_name',
Expand Down
3 changes: 2 additions & 1 deletion app/admin/models/config/tables_model.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php

$config['list']['filter'] = [
'search' => [
'prompt' => 'lang:admin::lang.tables.text_filter_search',
Expand Down Expand Up @@ -90,7 +91,7 @@
'type' => 'number',
'invisible' => true,
],
'locations' => [
'location_name' => [
'label' => 'lang:admin::lang.column_location',
'type' => 'text',
'relation' => 'locations',
Expand Down

0 comments on commit 5e84a71

Please sign in to comment.