add status semua module parameter

This commit is contained in:
daengdeni 2023-12-26 15:55:08 +07:00
parent b7c189c6f6
commit 0aaa17b40a
20 changed files with 127 additions and 42 deletions

View File

@ -28,7 +28,10 @@
}
})->addIndexColumn()->editColumn('updated_at', function ($row) {
return $row->updated_at->locale('id')->translatedFormat('d F Y H:i:s');
})->rawColumns(['action'])->addColumn('action', function ($branch) {
})->editColumn('status', function ($row) {
$status = $row->status ? '<span class="badge badge-light-success">Aktif</span>' : '<span class="badge badge-light-danger">Tidak Aktif</span>';
return $status;
})->rawColumns(['action','status'])->addColumn('action', function ($branch) {
return view('writeoff::parameter.branches._actions', compact('branch'));
})->setRowId('id');
}
@ -75,6 +78,7 @@
Column::make('kode')->title('Kode Branch'),
Column::make('name')->title('Nama Branch'),
Column::make('updated_at')->title('Last Update'),
Column::make('status')->title('Status'),
Column::computed('action')->exportable(false)->printable(false)->width(60)->addClass('text-center'),
];
}

View File

@ -28,7 +28,10 @@
}
})->addIndexColumn()->editColumn('updated_at', function ($row) {
return $row->updated_at->locale('id')->translatedFormat('d F Y H:i:s');
})->rawColumns(['action'])->addColumn('action', function ($currency) {
})->editColumn('status', function ($row) {
$status = $row->status ? '<span class="badge badge-light-success">Aktif</span>' : '<span class="badge badge-light-danger">Tidak Aktif</span>';
return $status;
})->rawColumns(['action','status'])->addColumn('action', function ($currency) {
return view('writeoff::parameter.currencies._actions', compact('currency'));
})->setRowId('id');
}
@ -75,6 +78,7 @@
Column::make('kode')->title('Kode Currency'),
Column::make('name')->title('Nama Currency'),
Column::make('updated_at')->title('Last Update'),
Column::make('status')->title('Status'),
Column::computed('action')->exportable(false)->printable(false)->width(60)->addClass('text-center'),
];
}

View File

@ -28,7 +28,10 @@
}
})->addIndexColumn()->editColumn('updated_at', function ($row) {
return $row->updated_at->locale('id')->translatedFormat('d F Y H:i:s');
})->rawColumns(['action'])->addColumn('action', function ($facility_type) {
})->editColumn('status', function ($row) {
$status = $row->status ? '<span class="badge badge-light-success">Aktif</span>' : '<span class="badge badge-light-danger">Tidak Aktif</span>';
return $status;
})->rawColumns(['action','status'])->addColumn('action', function ($facility_type) {
return view('writeoff::parameter.facility_types._actions', compact('facility_type'));
})->setRowId('id');
}
@ -75,6 +78,7 @@
Column::make('kode')->title('Kode'),
Column::make('name')->title('Jenis Fasilitas'),
Column::make('updated_at')->title('Last Update'),
Column::make('status')->title('Status'),
Column::computed('action')->exportable(false)->printable(false)->width(60)->addClass('text-center'),
];
}

View File

@ -31,7 +31,10 @@
return $row->updated_at->locale('id')->translatedFormat('d F Y H:i:s');
return '-';
})->rawColumns(['action'])->addColumn('action', function ($guarantee_type) {
})->editColumn('status', function ($row) {
$status = $row->status ? '<span class="badge badge-light-success">Aktif</span>' : '<span class="badge badge-light-danger">Tidak Aktif</span>';
return $status;
})->rawColumns(['action','status'])->addColumn('action', function ($guarantee_type) {
return view('writeoff::parameter.guarantee_types._actions', compact('guarantee_type'));
})->setRowId('id');
}
@ -78,6 +81,7 @@
Column::make('kode')->title('Kode'),
Column::make('name')->title('Jenis Jaminan'),
Column::make('updated_at')->title('Last Update'),
Column::make('status')->title('Status'),
Column::computed('action')->exportable(false)->printable(false)->width(60)->addClass('text-center'),
];
}

View File

@ -28,7 +28,10 @@
}
})->addIndexColumn()->editColumn('updated_at', function ($row) {
return $row->updated_at->locale('id')->translatedFormat('d F Y H:i:s');
})->rawColumns(['action'])->addColumn('action', function ($loan_type) {
})->editColumn('status', function ($row) {
$status = $row->status ? '<span class="badge badge-light-success">Aktif</span>' : '<span class="badge badge-light-danger">Tidak Aktif</span>';
return $status;
})->rawColumns(['action','status'])->addColumn('action', function ($loan_type) {
return view('writeoff::parameter.loan_types._actions', compact('loan_type'));
})->setRowId('id');
}
@ -75,6 +78,7 @@
Column::make('kode')->title('Kode'),
Column::make('name')->title('Jenis Pinjaman'),
Column::make('updated_at')->title('Last Update'),
Column::make('status')->title('Status'),
Column::computed('action')->exportable(false)->printable(false)->width(60)->addClass('text-center'),
];
}

View File

@ -16,7 +16,7 @@
$table->id();
$table->string('kode', 9)->unique();
$table->string('name');
$table->char('status', 1)->default('A');
$table->boolean('status')->default(true)->nullable();
$table->timestamps();
$table->timestamp('authorized_at')->nullable();
$table->char('authorized_status', 1)->nullable();

View File

@ -17,7 +17,7 @@ return new class extends Migration
$table->id();
$table->string('kode',3)->unique();
$table->string('name');
$table->char('status', 1)->default('A');
$table->boolean('status')->default(true)->nullable();
$table->timestamps();
$table->timestamp('authorized_at')->nullable();
$table->char('authorized_status', 1)->nullable();

View File

@ -17,7 +17,7 @@ return new class extends Migration
$table->id();
$table->string('kode',3)->unique();
$table->string('name');
$table->char('status', 1)->default('A');
$table->boolean('status')->default(true)->nullable();
$table->timestamps();
$table->timestamp('authorized_at')->nullable();
$table->char('authorized_status', 1)->nullable();

View File

@ -17,7 +17,7 @@ return new class extends Migration
$table->id();
$table->string('kode',3)->unique();
$table->string('name');
$table->char('status', 1)->default('A');
$table->boolean('status')->default(true)->nullable();
$table->timestamps();
$table->timestamp('authorized_at')->nullable();
$table->char('authorized_status', 1)->nullable();

View File

@ -15,7 +15,7 @@ return new class extends Migration
$table->id();
$table->string('kode',4)->unique();
$table->string('name');
$table->char('status', 1)->default('A');
$table->boolean('status')->default(true)->nullable();
$table->timestamps();
$table->timestamp('authorized_at')->nullable();
$table->char('authorized_status', 1)->nullable();

View File

@ -14,6 +14,7 @@
public $id;
public $kode;
public $name;
public $status;
public $edit_mode = false;
@ -36,7 +37,8 @@
// Prepare the data for creating a new user
$data = [
'kode' => $this->kode,
'name' => $this->name
'name' => $this->name,
'status' => $this->status ? 1 : 0,
];
if ($this->edit_mode) {
@ -107,6 +109,7 @@
$this->id = $branch->id;
$this->kode = $branch->kode;
$this->name = $branch->name;
$this->status = $branch->status ? true : false;
}
public function delete($id)

View File

@ -14,6 +14,7 @@
public $id;
public $kode;
public $name;
public $status;
public $edit_mode = false;
@ -36,7 +37,8 @@
// Prepare the data for creating a new user
$data = [
'kode' => $this->kode,
'name' => $this->name
'name' => $this->name,
'status' => $this->status ? 1 : 0,
];
if ($this->edit_mode) {
@ -107,6 +109,7 @@
$this->id = $currency->id;
$this->kode = $currency->kode;
$this->name = $currency->name;
$this->status = $currency->status ? true : false;
}
public function delete($id)

View File

@ -14,6 +14,7 @@
public $id;
public $kode;
public $name;
public $status;
public $edit_mode = false;
@ -36,7 +37,8 @@
// Prepare the data for creating a new user
$data = [
'kode' => $this->kode,
'name' => $this->name
'name' => $this->name,
'status' => $this->status ? 1 : 0,
];
if ($this->edit_mode) {
@ -107,6 +109,7 @@
$this->id = $facility_type->id;
$this->kode = $facility_type->kode;
$this->name = $facility_type->name;
$this->status = $facility_type->status ? true : false;
}
public function delete($id)

View File

@ -14,6 +14,7 @@
public $id;
public $kode;
public $name;
public $status;
public $edit_mode = false;
@ -36,7 +37,8 @@
// Prepare the data for creating a new user
$data = [
'kode' => $this->kode,
'name' => $this->name
'name' => $this->name,
'status' => $this->status ? 1 : 0,
];
if ($this->edit_mode) {
@ -107,6 +109,7 @@
$this->id = $guarantee_type->id;
$this->kode = $guarantee_type->kode;
$this->name = $guarantee_type->name;
$this->status = $guarantee_type->status ? true : false;
}
public function delete($id)

View File

@ -14,6 +14,7 @@
public $id;
public $kode;
public $name;
public $status;
public $edit_mode = false;
@ -36,7 +37,8 @@
// Prepare the data for creating a new user
$data = [
'kode' => $this->kode,
'name' => $this->name
'name' => $this->name,
'status' => $this->status ? 1 : 0,
];
if ($this->edit_mode) {
@ -107,6 +109,7 @@
$this->id = $loan_type->id;
$this->kode = $loan_type->kode;
$this->name = $loan_type->name;
$this->status = $loan_type->status;
}
public function delete($id)

View File

@ -46,6 +46,16 @@
<span class="text-danger">{{ $message }}</span> @enderror
</div>
<!--end::Input group-->
<div class="fv-row mb-7"><label class="fw-semibold fs-6 mb-2">Status Data</label>
<div class="form-check form-switch form-check-custom form-check-solid" style="display: block!important;">
<input class="form-check-input h-20px w-30px me-5" type="checkbox" wire:model.defer="status" id="status" name="status"/>
<label class="form-check-label" for="status">
Aktif
</label>
@error('status')
<span class="text-danger">{{ $message }}</span> @enderror
</div>
</div>
</div>
<!--end::Scroll-->

View File

@ -46,6 +46,16 @@
<span class="text-danger">{{ $message }}</span> @enderror
</div>
<!--end::Input group-->
<div class="fv-row mb-7"><label class="fw-semibold fs-6 mb-2">Status Data</label>
<div class="form-check form-switch form-check-custom form-check-solid" style="display: block!important;">
<input class="form-check-input h-20px w-30px me-5" type="checkbox" wire:model.defer="status" id="status" name="status"/>
<label class="form-check-label" for="status">
Aktif
</label>
@error('status')
<span class="text-danger">{{ $message }}</span> @enderror
</div>
</div>
</div>
<!--end::Scroll-->

View File

@ -46,6 +46,16 @@
<span class="text-danger">{{ $message }}</span> @enderror
</div>
<!--end::Input group-->
<div class="fv-row mb-7"><label class="fw-semibold fs-6 mb-2">Status Data</label>
<div class="form-check form-switch form-check-custom form-check-solid" style="display: block!important;">
<input class="form-check-input h-20px w-30px me-5" type="checkbox" wire:model.defer="status" id="status" name="status"/>
<label class="form-check-label" for="status">
Aktif
</label>
@error('status')
<span class="text-danger">{{ $message }}</span> @enderror
</div>
</div>
</div>
<!--end::Scroll-->

View File

@ -46,6 +46,16 @@
<span class="text-danger">{{ $message }}</span> @enderror
</div>
<!--end::Input group-->
<div class="fv-row mb-7"><label class="fw-semibold fs-6 mb-2">Status Data</label>
<div class="form-check form-switch form-check-custom form-check-solid" style="display: block!important;">
<input class="form-check-input h-20px w-30px me-5" type="checkbox" wire:model.defer="status" id="status" name="status"/>
<label class="form-check-label" for="status">
Aktif
</label>
@error('status')
<span class="text-danger">{{ $message }}</span> @enderror
</div>
</div>
</div>
<!--end::Scroll-->

View File

@ -46,6 +46,16 @@
<span class="text-danger">{{ $message }}</span> @enderror
</div>
<!--end::Input group-->
<div class="fv-row mb-7"><label class="fw-semibold fs-6 mb-2">Status Data</label>
<div class="form-check form-switch form-check-custom form-check-solid" style="display: block!important;">
<input class="form-check-input h-20px w-30px me-5" type="checkbox" wire:model.defer="status" id="status" name="status"/>
<label class="form-check-label" for="status">
Aktif
</label>
@error('status')
<span class="text-danger">{{ $message }}</span> @enderror
</div>
</div>
</div>
<!--end::Scroll-->