Mengubah tampilan menu master Ijin Usaha
This commit is contained in:
@@ -3,9 +3,11 @@
|
|||||||
namespace Modules\Lpj\Http\Controllers;
|
namespace Modules\Lpj\Http\Controllers;
|
||||||
|
|
||||||
use App\Http\Controllers\Controller;
|
use App\Http\Controllers\Controller;
|
||||||
use Illuminate\Http\RedirectResponse;
|
|
||||||
use Illuminate\Http\Request;
|
use Illuminate\Http\Request;
|
||||||
use Illuminate\Http\Response;
|
use Illuminate\Http\Response;
|
||||||
|
use Modules\Lpj\Models\Branch;
|
||||||
|
use Modules\Lpj\Models\IjinUsaha;
|
||||||
|
use Modules\Lpj\Models\JenisAset;
|
||||||
use Modules\Lpj\Models\KJPP;
|
use Modules\Lpj\Models\KJPP;
|
||||||
|
|
||||||
class KJPPController extends Controller
|
class KJPPController extends Controller
|
||||||
@@ -24,13 +26,17 @@ class KJPPController extends Controller
|
|||||||
*/
|
*/
|
||||||
public function create()
|
public function create()
|
||||||
{
|
{
|
||||||
return view('lpj::create');
|
$branch = Branch::all();
|
||||||
|
$ijin_usaha = IjinUsaha::all();
|
||||||
|
$jenis_aset = JenisAset::all();
|
||||||
|
|
||||||
|
return view('lpj::kjpp.create', compact('branch', 'ijin_usaha', 'jenis_aset'));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Store a newly created resource in storage.
|
* Store a newly created resource in storage.
|
||||||
*/
|
*/
|
||||||
public function store(Request $request): RedirectResponse
|
public function store(Request $request)
|
||||||
{
|
{
|
||||||
//
|
//
|
||||||
}
|
}
|
||||||
@@ -54,7 +60,7 @@ class KJPPController extends Controller
|
|||||||
/**
|
/**
|
||||||
* Update the specified resource in storage.
|
* Update the specified resource in storage.
|
||||||
*/
|
*/
|
||||||
public function update(Request $request, $id): RedirectResponse
|
public function update(Request $request, $id)
|
||||||
{
|
{
|
||||||
//
|
//
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -12,9 +12,15 @@ class IjinUsahaRequest extends FormRequest
|
|||||||
public function rules(): array
|
public function rules(): array
|
||||||
{
|
{
|
||||||
$rules = [
|
$rules = [
|
||||||
'nama_ijin_usaha' => 'required|string|not_regex:/^\d+$/|max:255'
|
'name' => 'required|string|not_regex:/^\d+$/|max:255'
|
||||||
];
|
];
|
||||||
|
|
||||||
|
if ($this->method() == 'PUT') {
|
||||||
|
$rules['code'] = 'required|max:50|unique:ijin_usaha,code,' . $this->id;
|
||||||
|
} else {
|
||||||
|
$rules['code'] = 'required|max:50|unique:ijin_usaha,code';
|
||||||
|
}
|
||||||
|
|
||||||
return $rules;
|
return $rules;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -29,9 +35,12 @@ class IjinUsahaRequest extends FormRequest
|
|||||||
public function messages(): array
|
public function messages(): array
|
||||||
{
|
{
|
||||||
return [
|
return [
|
||||||
'nama_ijin_usaha.required' => 'Nama Ijin Usaha harus diisi!',
|
'code.required' => 'Kode Ijin Usaha harus diisi!',
|
||||||
'nama_ijin_usaha.not_regex' => 'Nama Ijin Usaha harus berupa huruf!',
|
'code.max' => 'Kode Ijin Usaha maksimal 255 huruf!',
|
||||||
'nama_ijin_usaha.max' => 'Nama Ijin Usaha maksimal 255 huruf!'
|
'code.unique' => 'Kode Ijin Usaha tidak boleh sama!',
|
||||||
|
'name.required' => 'Nama Ijin Usaha harus diisi!',
|
||||||
|
'name.not_regex' => 'Nama Ijin Usaha harus berupa huruf!',
|
||||||
|
'name.max' => 'Nama Ijin Usaha maksimal 255 huruf!'
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,16 +1,16 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
namespace Modules\Lpj\Models;
|
namespace Modules\Lpj\Models;
|
||||||
|
|
||||||
use Modules\Lpj\Database\Factories\BranchFactory;
|
use Modules\Lpj\Database\Factories\BranchFactory;
|
||||||
|
|
||||||
class Branch extends Base
|
class Branch extends Base
|
||||||
|
{
|
||||||
|
protected $table = 'branches';
|
||||||
|
protected $fillable = ['code', 'name', 'status', 'authorized_at', 'authorized_status', 'authorized_by'];
|
||||||
|
|
||||||
|
public function debitures()
|
||||||
{
|
{
|
||||||
protected $table = 'branches';
|
return $this->hasMany(Debiture::class, 'branch_id', 'id');
|
||||||
protected $fillable = ['code', 'name', 'status', 'authorized_at', 'authorized_status', 'authorized_by'];
|
|
||||||
|
|
||||||
public function debitures()
|
|
||||||
{
|
|
||||||
return $this->hasMany(Debiture::class, 'branch_id', 'id');
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|||||||
@@ -4,7 +4,6 @@ namespace Modules\Lpj\Models;
|
|||||||
|
|
||||||
use Illuminate\Database\Eloquent\Model;
|
use Illuminate\Database\Eloquent\Model;
|
||||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||||
use Modules\Lpj\Database\Factories\IjinUsahaFactory;
|
|
||||||
|
|
||||||
class IjinUsaha extends Model
|
class IjinUsaha extends Model
|
||||||
{
|
{
|
||||||
@@ -15,10 +14,5 @@ class IjinUsaha extends Model
|
|||||||
/**
|
/**
|
||||||
* The attributes that are mass assignable.
|
* The attributes that are mass assignable.
|
||||||
*/
|
*/
|
||||||
protected $fillable = ['nama_ijin_usaha'];
|
protected $fillable = ['code', 'name'];
|
||||||
|
|
||||||
// protected static function newFactory(): IjinUsahaFactory
|
|
||||||
// {
|
|
||||||
// //return IjinUsahaFactory::new();
|
|
||||||
// }
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,11 +1,11 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
namespace Modules\Lpj\Models;
|
namespace Modules\Lpj\Models;
|
||||||
|
|
||||||
use Modules\Lpj\Database\Factories\JenisAsetFactory;
|
use Modules\Lpj\Database\Factories\JenisAsetFactory;
|
||||||
|
|
||||||
class JenisAset extends Base
|
class JenisAset extends Base
|
||||||
{
|
{
|
||||||
protected $table = 'jenis_aset';
|
protected $table = 'jenis_aset';
|
||||||
protected $fillable = ['code', 'name'];
|
protected $fillable = ['code', 'name'];
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -17,16 +17,4 @@ class KJPP extends Model
|
|||||||
* The attributes that are mass assignable.
|
* The attributes that are mass assignable.
|
||||||
*/
|
*/
|
||||||
protected $guarded = ['id'];
|
protected $guarded = ['id'];
|
||||||
|
|
||||||
// If you're using JSON columns, you may want to cast them properly
|
|
||||||
protected $casts = [
|
|
||||||
'jenis_usaha' => 'array',
|
|
||||||
'pengalaman' => 'array',
|
|
||||||
'kerjasama_sejak' => 'date', // For date fields
|
|
||||||
];
|
|
||||||
|
|
||||||
// protected static function newFactory(): KJPPFactory
|
|
||||||
// {
|
|
||||||
// //return KJPPFactory::new();
|
|
||||||
// }
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -13,8 +13,16 @@ return new class extends Migration
|
|||||||
{
|
{
|
||||||
Schema::create('ijin_usaha', function (Blueprint $table) {
|
Schema::create('ijin_usaha', function (Blueprint $table) {
|
||||||
$table->id();
|
$table->id();
|
||||||
$table->string('nama_ijin_usaha');
|
$table->string('code')->unique()->index();
|
||||||
|
$table->string('name');
|
||||||
|
$table->boolean('status')->default(true)->nullable();
|
||||||
|
$table->char('authorized_status', 1)->nullable();
|
||||||
|
$table->timestamp('authorized_at')->nullable();
|
||||||
|
$table->unsignedBigInteger('authorized_by')->nullable();
|
||||||
$table->timestamps();
|
$table->timestamps();
|
||||||
|
$table->softDeletes();
|
||||||
|
|
||||||
|
$table->unsignedBigInteger('deleted_by')->nullable();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -13,28 +13,35 @@ return new class extends Migration
|
|||||||
{
|
{
|
||||||
Schema::create('kjpp', function (Blueprint $table) {
|
Schema::create('kjpp', function (Blueprint $table) {
|
||||||
$table->id();
|
$table->id();
|
||||||
$table->string('nomor');
|
$table->string('code');
|
||||||
$table->string('nama_kjpp');
|
$table->string('name');
|
||||||
$table->string('kantor_pusat');
|
$table->string('jenis_kantor');
|
||||||
$table->string('nomor_ijin_usaha');
|
$table->string('nomor_ijin_usaha');
|
||||||
$table->string('kota');
|
$table->string('province_code');
|
||||||
$table->date('kerjasama_sejak');
|
$table->string('city_code');
|
||||||
$table->text('alamat_kantor');
|
$table->string('district_code');
|
||||||
$table->string('no_tlp_kantor', 15);
|
$table->string('village_code');
|
||||||
$table->string('alamat_email');
|
$table->string('address');
|
||||||
$table->string('nama_pimpinan_kantor');
|
$table->string('postal_code');
|
||||||
$table->string('no_hp_pimpinan', 15);
|
$table->string('nomor_telepon_kantor');
|
||||||
|
$table->string('email_kantor');
|
||||||
|
$table->string('nomor_hp_pimpinan');
|
||||||
$table->string('nama_pic_reviewer');
|
$table->string('nama_pic_reviewer');
|
||||||
$table->string('no_pic_reviewer', 15);
|
$table->string('nomor_hp_pic_reviewer');
|
||||||
$table->string('nama_pic_admin');
|
$table->string('nama_pic_admin');
|
||||||
$table->string('no_pic_admin', 15);
|
$table->string('nomor_hp_pic_admin');
|
||||||
$table->string('nama_pic_marketing');
|
$table->string('nama_pic_marketing');
|
||||||
$table->string('no_pic_marketing', 15);
|
$table->string('nomor_hp_pic_marketing');
|
||||||
$table->json('ijin_usaha');
|
$table->foreignId('ijin_usaha_id')->constrained()->onDelete('cascade');
|
||||||
$table->json('pengalaman');
|
$table->foreignId('jenis_aset_id')->constrained()->onDelete('cascade');
|
||||||
$table->string('company_name');
|
$table->string('attachment');
|
||||||
$table->string('ijin_ijin');
|
$table->boolean('status')->default(true)->nullable();
|
||||||
$table->string('npwp');
|
$table->char('authorized_status', 1)->nullable();
|
||||||
|
$table->timestamp('authorized_at')->nullable();
|
||||||
|
$table->unsignedBigInteger('authorized_by')->nullable();
|
||||||
|
$table->softDeletes();
|
||||||
|
|
||||||
|
$table->unsignedBigInteger('deleted_by')->nullable();
|
||||||
$table->timestamps();
|
$table->timestamps();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -25,15 +25,42 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="card-body grid gap-5">
|
<div class="card-body grid gap-5">
|
||||||
|
@if (isset($ijin_usaha->id))
|
||||||
|
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
|
||||||
|
<label class="form-label max-w-56">
|
||||||
|
Kode Ijin Usaha
|
||||||
|
</label>
|
||||||
|
<div class="flex flex-wrap items-baseline w-full">
|
||||||
|
<input readonly
|
||||||
|
class="input border-warning bg-warning-light @error('code') border-danger bg-danger-light @enderror"
|
||||||
|
type="text" name="code" value="{{ $ijin_usaha->code ?? old('code') }}">
|
||||||
|
@error('code')
|
||||||
|
<em class="alert text-danger text-sm">{{ $message }}</em>
|
||||||
|
@enderror
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
@else
|
||||||
|
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
|
||||||
|
<label class="form-label max-w-56">
|
||||||
|
Kode Ijin Usaha
|
||||||
|
</label>
|
||||||
|
<div class="flex flex-wrap items-baseline w-full">
|
||||||
|
<input class="input @error('code') border-danger bg-danger-light @enderror" type="text"
|
||||||
|
name="code" value="{{ $ijin_usaha->code ?? old('code') }}">
|
||||||
|
@error('code')
|
||||||
|
<em class="alert text-danger text-sm">{{ $message }}</em>
|
||||||
|
@enderror
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
@endif
|
||||||
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
|
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
|
||||||
<label class="form-label max-w-56">
|
<label class="form-label max-w-56">
|
||||||
Nama Ijin Usaha
|
Nama Ijin Usaha
|
||||||
</label>
|
</label>
|
||||||
<div class="flex flex-wrap items-baseline w-full">
|
<div class="flex flex-wrap items-baseline w-full">
|
||||||
<input class="input @error('nama_ijin_usaha') border-danger bg-danger-light @enderror"
|
<input class="input @error('name') border-danger bg-danger-light @enderror" type="text"
|
||||||
type="text" name="nama_ijin_usaha"
|
name="name" value="{{ $ijin_usaha->name ?? old('name') }}">
|
||||||
value="{{ $ijin_usaha->nama_ijin_usaha ?? old('nama_ijin_usaha') }}">
|
@error('name')
|
||||||
@error('nama_ijin_usaha')
|
|
||||||
<em class="alert text-danger text-sm">{{ $message }}</em>
|
<em class="alert text-danger text-sm">{{ $message }}</em>
|
||||||
@enderror
|
@enderror
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -35,7 +35,11 @@
|
|||||||
<th class="w-14">
|
<th class="w-14">
|
||||||
<input class="checkbox checkbox-sm" data-datatable-check="true" type="checkbox" />
|
<input class="checkbox checkbox-sm" data-datatable-check="true" type="checkbox" />
|
||||||
</th>
|
</th>
|
||||||
<th class="min-w-[250px]" data-datatable-column="nama_ijin_usaha">
|
<th class="min-w-[250px]" data-datatable-column="code">
|
||||||
|
<span class="sort"> <span class="sort-label"> Kode Ijin Usaha </span>
|
||||||
|
<span class="sort-icon"> </span> </span>
|
||||||
|
</th>
|
||||||
|
<th class="min-w-[250px]" data-datatable-column="name">
|
||||||
<span class="sort"> <span class="sort-label"> Nama Ijin Usaha </span>
|
<span class="sort"> <span class="sort-label"> Nama Ijin Usaha </span>
|
||||||
<span class="sort-icon"> </span> </span>
|
<span class="sort-icon"> </span> </span>
|
||||||
</th>
|
</th>
|
||||||
@@ -114,7 +118,10 @@
|
|||||||
return checkbox.outerHTML.trim();
|
return checkbox.outerHTML.trim();
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
nama_ijin_usaha: {
|
code: {
|
||||||
|
title: 'Kode Ijin Usaha',
|
||||||
|
},
|
||||||
|
name: {
|
||||||
title: 'Nama Ijin Usaha',
|
title: 'Nama Ijin Usaha',
|
||||||
},
|
},
|
||||||
actions: {
|
actions: {
|
||||||
|
|||||||
@@ -6,75 +6,94 @@
|
|||||||
|
|
||||||
@section('content')
|
@section('content')
|
||||||
<div class="w-full grid gap-5 lg:gap-7.5 mx-auto">
|
<div class="w-full grid gap-5 lg:gap-7.5 mx-auto">
|
||||||
@if(isset($jenisJaminan->id))
|
@if (isset($jenisJaminan->id))
|
||||||
<form action="{{ route('basicdata.jenis-jaminan.update', $jenisJaminan->id) }}" method="POST">
|
<form action="{{ route('basicdata.jenis-jaminan.update', $jenisJaminan->id) }}" method="POST">
|
||||||
<input type="hidden" name="id" value="{{ $jenisJaminan->id }}">
|
<input type="hidden" name="id" value="{{ $jenisJaminan->id }}">
|
||||||
@method('PUT')
|
@method('PUT')
|
||||||
@else
|
@else
|
||||||
<form method="POST" action="{{ route('basicdata.jenis-jaminan.store') }}">
|
<form method="POST" action="{{ route('basicdata.jenis-jaminan.store') }}">
|
||||||
@endif
|
@endif
|
||||||
@csrf
|
@csrf
|
||||||
<div class="card pb-2.5">
|
<div class="card pb-2.5">
|
||||||
<div class="card-header" id="basic_settings">
|
<div class="card-header" id="basic_settings">
|
||||||
<h3 class="card-title">
|
<h3 class="card-title">
|
||||||
{{ isset($jenisJaminan->id) ? 'Edit' : 'Tambah' }} Jenis Jaminan
|
{{ isset($jenisJaminan->id) ? 'Edit' : 'Tambah' }} Jenis Jaminan
|
||||||
</h3>
|
</h3>
|
||||||
<div class="flex items-center gap-2">
|
<div class="flex items-center gap-2">
|
||||||
<a href="{{ route('basicdata.jenis-jaminan.index') }}" class="btn btn-xs btn-info"><i class="ki-filled ki-exit-left"></i> Back</a>
|
<a href="{{ route('basicdata.jenis-jaminan.index') }}" class="btn btn-xs btn-info"><i
|
||||||
</div>
|
class="ki-filled ki-exit-left"></i> Back</a>
|
||||||
</div>
|
</div>
|
||||||
<div class="card-body grid gap-5">
|
</div>
|
||||||
@if(isset($jenisJaminan->id))
|
<div class="card-body grid gap-5">
|
||||||
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
|
@if (isset($jenisJaminan->id))
|
||||||
<label class="form-label max-w-56">
|
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
|
||||||
Code
|
<label class="form-label max-w-56">
|
||||||
</label>
|
Code
|
||||||
<div class="flex flex-wrap items-baseline w-full">
|
</label>
|
||||||
<input readonly class="input border-warning bg-warning-light @error('code') border-danger bg-danger-light @enderror" type="text" name="code" value="{{ $jenisJaminan->code ?? '' }}">
|
<div class="flex flex-wrap items-baseline w-full">
|
||||||
@error('code')
|
<input readonly
|
||||||
<em class="alert text-danger text-sm">{{ $message }}</em>
|
class="input border-warning bg-warning-light @error('code') border-danger bg-danger-light @enderror"
|
||||||
@enderror
|
type="text" name="code" value="{{ $jenisJaminan->code ?? '' }}">
|
||||||
</div>
|
@error('code')
|
||||||
</div>
|
<em class="alert text-danger text-sm">{{ $message }}</em>
|
||||||
@endif
|
@enderror
|
||||||
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
|
|
||||||
<label class="form-label max-w-56">
|
|
||||||
Name
|
|
||||||
</label>
|
|
||||||
<div class="flex flex-wrap items-baseline w-full">
|
|
||||||
<input class="input @error('name') border-danger bg-danger-light @enderror" type="text" name="name" value="{{ $jenisJaminan->name ?? '' }}">
|
|
||||||
@error('name')
|
|
||||||
<em class="alert text-danger text-sm">{{ $message }}</em>
|
|
||||||
@enderror
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
|
|
||||||
<label class="form-label max-w-56">
|
|
||||||
Jenis Legalitas Jaminan
|
|
||||||
</label>
|
|
||||||
<div class="grid grid-cols-3 lg:grid-cols-4 w-full gap-2.5">
|
|
||||||
@foreach($jenisLegalitasJaminan as $row)
|
|
||||||
<label class="switch">
|
|
||||||
@if(isset($jenisJaminan->jenis_legalitas_jaminan_id))
|
|
||||||
<input type="checkbox" @if(in_array($row->code,json_decode($jenisJaminan->jenis_legalitas_jaminan_id,true))) {{ "checked" }} @endif value="{{ $row->code }}" name="jenis_legalitas_jaminan_id[]"/>
|
|
||||||
@else
|
|
||||||
<input type="checkbox" value="{{ $row->code }}" name="jenis_legalitas_jaminan_id[]"/>
|
|
||||||
@endif
|
|
||||||
<span class="switch-label">
|
|
||||||
{{ $row->name }}
|
|
||||||
</span>
|
|
||||||
</label>
|
|
||||||
@endforeach
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="flex justify-end">
|
|
||||||
<button type="submit" class="btn btn-primary">
|
|
||||||
Save
|
|
||||||
</button>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</div>
|
||||||
|
@else
|
||||||
|
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
|
||||||
|
<label class="form-label max-w-56">
|
||||||
|
Code
|
||||||
|
</label>
|
||||||
|
<div class="flex flex-wrap items-baseline w-full">
|
||||||
|
<input class="input @error('code') border-danger bg-danger-light @enderror" type="text"
|
||||||
|
name="code" value="{{ $ijin_usaha->code ?? old('code') }}">
|
||||||
|
@error('code')
|
||||||
|
<em class="alert text-danger text-sm">{{ $message }}</em>
|
||||||
|
@enderror
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
@endif
|
||||||
|
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
|
||||||
|
<label class="form-label max-w-56">
|
||||||
|
Name
|
||||||
|
</label>
|
||||||
|
<div class="flex flex-wrap items-baseline w-full">
|
||||||
|
<input class="input @error('name') border-danger bg-danger-light @enderror" type="text"
|
||||||
|
name="name" value="{{ $jenisJaminan->name ?? '' }}">
|
||||||
|
@error('name')
|
||||||
|
<em class="alert text-danger text-sm">{{ $message }}</em>
|
||||||
|
@enderror
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
|
||||||
|
<label class="form-label max-w-56">
|
||||||
|
Jenis Legalitas Jaminan
|
||||||
|
</label>
|
||||||
|
<div class="grid grid-cols-3 lg:grid-cols-4 w-full gap-2.5">
|
||||||
|
@foreach ($jenisLegalitasJaminan as $row)
|
||||||
|
<label class="switch">
|
||||||
|
@if (isset($jenisJaminan->jenis_legalitas_jaminan_id))
|
||||||
|
<input type="checkbox" @if (in_array($row->code, json_decode($jenisJaminan->jenis_legalitas_jaminan_id, true))) {{ 'checked' }} @endif
|
||||||
|
value="{{ $row->code }}" name="jenis_legalitas_jaminan_id[]" />
|
||||||
|
@else
|
||||||
|
<input type="checkbox" value="{{ $row->code }}"
|
||||||
|
name="jenis_legalitas_jaminan_id[]" />
|
||||||
|
@endif
|
||||||
|
<span class="switch-label">
|
||||||
|
{{ $row->name }}
|
||||||
|
</span>
|
||||||
|
</label>
|
||||||
|
@endforeach
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="flex justify-end">
|
||||||
|
<button type="submit" class="btn btn-primary">
|
||||||
|
Save
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
</div>
|
</div>
|
||||||
@endsection
|
@endsection
|
||||||
|
|||||||
90
resources/views/kjpp/create.blade.php
Normal file
90
resources/views/kjpp/create.blade.php
Normal file
@@ -0,0 +1,90 @@
|
|||||||
|
@extends('layouts.main')
|
||||||
|
|
||||||
|
@section('breadcrumbs')
|
||||||
|
{{ Breadcrumbs::render(request()->route()->getName()) }}
|
||||||
|
@endsection
|
||||||
|
|
||||||
|
@section('content')
|
||||||
|
<div class="w-full grid gap-5 lg:gap-7.5 mx-auto">
|
||||||
|
@if (isset($kjpp->id))
|
||||||
|
<form action="{{ route('kjpp.update', $kjpp->id) }}" method="POST">
|
||||||
|
<input type="hidden" name="id" value="{{ $kjpp->id }}">
|
||||||
|
@method('PUT')
|
||||||
|
@else
|
||||||
|
<form method="POST" action="{{ route('basicdata.kjpp.store') }}">
|
||||||
|
@endif
|
||||||
|
@csrf
|
||||||
|
<div class="card pb-2.5">
|
||||||
|
<div class="card-header" id="basic_settings">
|
||||||
|
<h3 class="card-title">
|
||||||
|
{{ isset($kjpp->id) ? 'Edit' : 'Tambah' }} KJPP
|
||||||
|
</h3>
|
||||||
|
<div class="flex items-center gap-2">
|
||||||
|
<a href="{{ route('basicdata.kjpp.index') }}" class="btn btn-xs btn-info"><i
|
||||||
|
class="ki-filled ki-exit-left"></i>
|
||||||
|
Back</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="card-body grid gap-5">
|
||||||
|
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
|
||||||
|
<label class="form-label max-w-56">
|
||||||
|
Nomor KJPP
|
||||||
|
</label>
|
||||||
|
<div class="flex flex-wrap items-baseline w-full">
|
||||||
|
<input class="input @error('nomor') border-danger bg-danger-light @enderror" type="text"
|
||||||
|
name="nomor" value="{{ $kjpp->nomor ?? old('nomor') }}">
|
||||||
|
@error('nomor')
|
||||||
|
<em class="alert text-danger text-sm">{{ $message }}</em>
|
||||||
|
@enderror
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
|
||||||
|
<label class="form-label max-w-56">
|
||||||
|
Nama KJPP
|
||||||
|
</label>
|
||||||
|
<div class="flex flex-wrap items-baseline w-full">
|
||||||
|
<input class="input @error('nama_kjpp') border-danger bg-danger-light @enderror" type="text"
|
||||||
|
name="nama_kjpp" value="{{ $kjpp->nama_kjpp ?? old('nama_kjpp') }}">
|
||||||
|
@error('nama_kjpp')
|
||||||
|
<em class="alert text-danger text-sm">{{ $message }}</em>
|
||||||
|
@enderror
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
|
||||||
|
<label class="form-label max-w-56">Kantor Cabang</label>
|
||||||
|
<div class="flex flex-wrap items-baseline w-full">
|
||||||
|
<select
|
||||||
|
class="input tomselect w-full @error('cabang_id') border-danger bg-danger-light @enderror select2"
|
||||||
|
name="cabang_id">
|
||||||
|
<option value="">Select Kantor Cabang</option>
|
||||||
|
@if (isset($branch))
|
||||||
|
@foreach ($branch as $branches)
|
||||||
|
<option value="{{ $branches->id }}">{{ $branches->name }}</option>
|
||||||
|
@endforeach
|
||||||
|
@endif
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
|
||||||
|
<label class="form-label max-w-56">
|
||||||
|
Nomor Ijin Usaha
|
||||||
|
</label>
|
||||||
|
<div class="flex flex-wrap items-baseline w-full">
|
||||||
|
<input class="input @error('nomor_ijin_usaha') border-danger bg-danger-light @enderror"
|
||||||
|
type="text" name="nomor_ijin_usaha"
|
||||||
|
value="{{ $kjpp->nomor_ijin_usaha ?? old('nomor_ijin_usaha') }}">
|
||||||
|
@error('nomor_ijin_usaha')
|
||||||
|
<em class="alert text-danger text-sm">{{ $message }}</em>
|
||||||
|
@enderror
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="flex justify-end">
|
||||||
|
<button type="submit" class="btn btn-primary">
|
||||||
|
Save
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
@endsection
|
||||||
@@ -193,6 +193,16 @@ Breadcrumbs::for('basicdata.kjpp', function (BreadcrumbTrail $trail) {
|
|||||||
$trail->push('KJPP', route('basicdata.kjpp.index'));
|
$trail->push('KJPP', route('basicdata.kjpp.index'));
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Breadcrumbs::for('basicdata.kjpp.create', function (BreadcrumbTrail $trail) {
|
||||||
|
$trail->parent('basicdata.kjpp');
|
||||||
|
$trail->push('Tambah KJPP', route('basicdata.kjpp.create'));
|
||||||
|
});
|
||||||
|
|
||||||
|
Breadcrumbs::for('basicdata.kjpp.edit', function (BreadcrumbTrail $trail) {
|
||||||
|
$trail->parent('basicdata.kjpp');
|
||||||
|
$trail->push('Edit KJPP');
|
||||||
|
});
|
||||||
|
|
||||||
Breadcrumbs::for('basicdata.ijin_usaha', function (BreadcrumbTrail $trail) {
|
Breadcrumbs::for('basicdata.ijin_usaha', function (BreadcrumbTrail $trail) {
|
||||||
$trail->parent('basicdata');
|
$trail->parent('basicdata');
|
||||||
$trail->push('Ijin Usaha', route('basicdata.ijin_usaha.index'));
|
$trail->push('Ijin Usaha', route('basicdata.ijin_usaha.index'));
|
||||||
|
|||||||
Reference in New Issue
Block a user