Skip to content

Commit 94dded3

Browse files
committed
Added notes field to presenters for table view show/hide columns
Signed-off-by: snipe <[email protected]>
1 parent ac8a7d0 commit 94dded3

File tree

3 files changed

+24
-3
lines changed

3 files changed

+24
-3
lines changed

app/Presenters/AccessoryPresenter.php

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,14 @@ public static function dataTableLayout()
109109
"sortable" => true,
110110
"visible" => false,
111111
"title" => trans('general.order_number'),
112-
],[
112+
], [
113+
"field" => "notes",
114+
"searchable" => true,
115+
"sortable" => true,
116+
"visible" => false,
117+
"title" => trans('general.notes'),
118+
"formatter" => "notesFormatter"
119+
], [
113120
"field" => "change",
114121
"searchable" => false,
115122
"sortable" => false,

app/Presenters/ComponentPresenter.php

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,14 @@ public static function dataTableLayout()
104104
"title" => trans('general.purchase_cost'),
105105
"visible" => true,
106106
"footerFormatter" => 'sumFormatter',
107-
],
107+
], [
108+
"field" => "notes",
109+
"searchable" => true,
110+
"sortable" => true,
111+
"visible" => false,
112+
"title" => trans('general.notes'),
113+
"formatter" => "notesFormatter"
114+
]
108115
];
109116

110117
$layout[] = [

app/Presenters/ConsumablePresenter.php

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,13 +118,20 @@ public static function dataTableLayout()
118118
"visible" => true,
119119
"footerFormatter" => 'sumFormatter',
120120
],[
121+
"field" => "notes",
122+
"searchable" => true,
123+
"sortable" => true,
124+
"visible" => false,
125+
"title" => trans('general.notes'),
126+
"formatter" => "notesFormatter"
127+
], [
121128
"field" => "change",
122129
"searchable" => false,
123130
"sortable" => false,
124131
"visible" => true,
125132
"title" => trans('general.change'),
126133
"formatter" => "consumablesInOutFormatter",
127-
], [
134+
], [
128135
"field" => "actions",
129136
"searchable" => false,
130137
"sortable" => false,

0 commit comments

Comments
 (0)