kolom aktif dan browse

This commit is contained in:
2026-05-08 16:00:01 +07:00
parent e57e6b882c
commit ac9335bde5
6 changed files with 93 additions and 6 deletions
@@ -44,7 +44,10 @@ class ValueBasisDataController extends Controller
if (!$tabel) {
abort(404, 'Data tabel tidak ditemukan.');
}
$kolom = KolomBasisData::where('tabel_id', $tabelId)->get();
$kolom = KolomBasisData::where('tabel_id', $tabelId)
->where('is_active', true)
->where('is_browse', true)
->get();
if ($kolom->isEmpty()) {
abort(404, 'Data kolom tidak ditemukan untuk tabel ini.');
}
@@ -162,7 +165,8 @@ class ValueBasisDataController extends Controller
if (!$tabel) {
abort(404, 'Data tabel tidak ditemukan.');
}
$kolom = KolomBasisData::where('tabel_id', $tabelId)->get();
$kolom = KolomBasisData::where('tabel_id', $tabelId)
->where('is_active', true)->get();
if ($kolom->isEmpty()) {
abort(404, 'Data kolom tidak ditemukan untuk tabel ini.');
}
@@ -210,7 +214,8 @@ class ValueBasisDataController extends Controller
if (!$tabel) {
abort(404, 'Data tabel tidak ditemukan.');
}
$kolom = KolomBasisData::where('tabel_id', $tabelId)->get();
$kolom = KolomBasisData::where('tabel_id', $tabelId)
->where('is_active', true)->get();
if ($kolom->isEmpty()) {
abort(404, 'Data kolom tidak ditemukan untuk tabel ini.');
}
@@ -278,7 +283,8 @@ class ValueBasisDataController extends Controller
if (!$tabel) {
abort(404, 'Data tabel tidak ditemukan.');
}
$kolom = KolomBasisData::where('tabel_id', $tabelId)->get();
$kolom = KolomBasisData::where('tabel_id', $tabelId)
->where('is_active', true)->get();
if ($kolom->isEmpty()) {
abort(404, 'Data kolom tidak ditemukan untuk tabel ini.');
}
@@ -334,7 +340,8 @@ class ValueBasisDataController extends Controller
if (!$tabel) {
abort(404, 'Data tabel tidak ditemukan.');
}
$kolom = KolomBasisData::where('tabel_id', $tabelId)->get();
$kolom = KolomBasisData::where('tabel_id', $tabelId)
->where('is_active', true)->get();
if ($kolom->isEmpty()) {
abort(404, 'Data kolom tidak ditemukan untuk tabel ini.');
}
@@ -396,7 +403,8 @@ class ValueBasisDataController extends Controller
if (!$tabel) {
abort(404, 'Data tabel tidak ditemukan.');
}
$kolom = KolomBasisData::where('tabel_id', $tabelId)->get();
$kolom = KolomBasisData::where('tabel_id', $tabelId)
->where('is_active', true)->get();
if ($kolom->isEmpty()) {
abort(404, 'Data kolom tidak ditemukan untuk tabel ini.');
}