Menyelesaikan Menu KJPP

This commit is contained in:
2024-09-25 17:14:48 +07:00
parent 33ba88a276
commit 87a466385e
12 changed files with 360 additions and 70 deletions

View File

@@ -58,7 +58,7 @@
@if (isset($kjpp))
@foreach ($branch as $branches)
<option value="{{ $branches->name }}"
{{ old('jenis_kantor', $branches->name) == $branches->name ? 'selected' : '' }}>
{{ old('jenis_kantor', $kjpp->jenis_kantor) == $branches->name ? 'selected' : '' }}>
{{ $branches->name }}
</option>
@endforeach
@@ -85,7 +85,7 @@
@if (isset($kjpp))
@foreach ($ijin_usaha as $branches)
<option value="{{ $branches->code }}"
{{ old('nomor_ijin_usaha', $branches->code) == $branches->code ? 'selected' : '' }}>
{{ old('nomor_ijin_usaha', $kjpp->nomor_ijin_usaha) == $branches->code ? 'selected' : '' }}>
{{ $branches->code }}
</option>
@endforeach
@@ -351,11 +351,11 @@
@if (isset($kjpp->ijin_usaha_id))
<input type="checkbox"
@if (in_array($row->code, old('ijin_usaha_id', json_decode($kjpp->ijin_usaha_id, true)))) {{ 'checked' }} @endif
value="{{ $row->code }}" name="ijin_usaha[]" />
value="{{ $row->code }}" name="ijin_usaha_id[]" />
@else
<input type="checkbox"
@if (in_array($row->code, old('ijin_usaha_id', []))) {{ 'checked' }} @endif
value="{{ $row->code }}" name="ijin_usaha[]" />
value="{{ $row->code }}" name="ijin_usaha_id[]" />
@endif
<span class="switch-label">
{{ $row->name }}
@@ -366,7 +366,7 @@
</div>
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
<label class="form-label max-w-56">
Jenis Jaminan
Pengalaman (Jenis Aset)
</label>
<div class="grid grid-cols-3 lg:grid-cols-4 w-full gap-2.5">
@foreach ($jenis_aset as $row)
@@ -374,11 +374,11 @@
@if (isset($kjpp->jenis_aset_id))
<input type="checkbox"
@if (in_array($row->code, old('jenis_aset_id', json_decode($kjpp->jenis_aset_id, true)))) {{ 'checked' }} @endif
value="{{ $row->code }}" name="jenis_jaminan[]" />
value="{{ $row->code }}" name="jenis_aset_id[]" />
@else
<input type="checkbox"
@if (in_array($row->code, old('jenis_aset_id', []))) {{ 'checked' }} @endif
value="{{ $row->code }}" name="jenis_jaminan[]" />
value="{{ $row->code }}" name="jenis_aset_id[]" />
@endif
<span class="switch-label">
{{ $row->name }}
@@ -392,6 +392,15 @@
Attachment
</label>
<div class="flex flex-wrap items-baseline w-full">
@if (isset($kjpp) && $kjpp->attachment)
<div class="mb-2">
<p class="flex w-full text-gray-600 font-medium text-sm">Lihat File:</p>
<a href="{{ asset('storage/uploads_pdf/' . $kjpp->attachment) }}"
class="btn btn-link" target="_blank">
{{ $kjpp->attachment }}
</a>
</div>
@endif
<input class="file-input @error('attachment') border-danger @enderror" name="attachment"
type="file" />
@error('attachment')

View File

@@ -136,7 +136,7 @@
title: 'Action',
render: (item, data) => {
return `<div class="flex flex-nowrap justify-center">
<a class="btn btn-sm btn-icon btn-clear btn-primary" href="basic-data/kjpp/${data.id}/show">
<a class="btn btn-sm btn-icon btn-clear btn-primary" href="basic-data/kjpp/${data.id}">
<i class="ki-filled ki-eye"></i>
</a>
<a class="btn btn-sm btn-icon btn-clear btn-info" href="basic-data/kjpp/${data.id}/edit">

View File

@@ -0,0 +1,195 @@
@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">
<div class="card pb-2.5">
<div class="card-header" id="basic_settings">
<h3 class="card-title">
Show 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">
<p class="flex w-full text-gray-600 font-medium text-sm">{{ $kjpp->code }}</p>
</div>
<label class="form-label max-w-56">
Nama KJPP
</label>
<div class="flex flex-wrap items-baseline w-full">
<p class="flex w-full text-gray-600 font-medium text-sm">{{ $kjpp->name }}</p>
</div>
</div>
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
<label class="form-label max-w-56">Jenis Kantor / Cabang</label>
<div class="flex flex-wrap items-baseline w-full">
<p class="flex w-full text-gray-600 font-medium text-sm">
@foreach ($branches as $branch)
{{ $branch->name }}
@endforeach
</p>
</div>
<label class="form-label max-w-56">Nomor Ijin Usaha</label>
<div class="flex flex-wrap items-baseline w-full">
<p class="flex w-full text-gray-600 font-medium text-sm">
@foreach ($ijin_usaha as $iu)
{{ $iu->code }}
@endforeach
</p>
</div>
</div>
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
<label class="form-label max-w-56">
Alamat Kantor
</label>
<div class="flex flex-wrap items-baseline w-full">
<p class="flex w-full text-gray-600 font-medium text-sm">{{ $kjpp->address }} , Kel.
@foreach ($villages as $village)
{{ $village->name }}
@endforeach , Kec.
@foreach ($districts as $district)
{{ $district->name }}
@endforeach ,
@foreach ($cities as $city)
{{ $city->name }}
@endforeach ,
@foreach ($provinces as $province)
{{ $province->name }}
@endforeach, Kode Pos.
@foreach ($villages as $village)
{{ $village->postal_code }}
@endforeach
</p>
</div>
</div>
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
<label class="form-label max-w-56">
Nomor Telepon Kantor
</label>
<div class="flex flex-wrap items-baseline w-full">
<p class="flex w-full text-gray-600 font-medium text-sm">{{ $kjpp->nomor_telepon_kantor }}</p>
</div>
<label class="form-label max-w-56">
Email Kantor
</label>
<div class="flex flex-wrap items-baseline w-full">
<p class="flex w-full text-gray-600 font-medium text-sm">{{ $kjpp->email_kantor }}</p>
</div>
</div>
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
<label class="form-label max-w-56">
Nama Pimpinan
</label>
<div class="flex flex-wrap items-baseline w-full">
<p class="flex w-full text-gray-600 font-medium text-sm">{{ $kjpp->nama_pimpinan }}</p>
</div>
<label class="form-label max-w-56">
Nomor HP Pimpinan
</label>
<div class="flex flex-wrap items-baseline w-full">
<p class="flex w-full text-gray-600 font-medium text-sm">{{ $kjpp->nomor_hp_pimpinan }}</p>
</div>
</div>
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
<label class="form-label max-w-56">
Nama PIC Reviewer
</label>
<div class="flex flex-wrap items-baseline w-full">
<p class="flex w-full text-gray-600 font-medium text-sm">{{ $kjpp->nama_pic_reviewer }}</p>
</div>
<label class="form-label max-w-56">
Nomor HP PIC Reviewer
</label>
<div class="flex flex-wrap items-baseline w-full">
<p class="flex w-full text-gray-600 font-medium text-sm">{{ $kjpp->nomor_hp_pic_reviewer }}</p>
</div>
</div>
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
<label class="form-label max-w-56">
Nama PIC Admin
</label>
<div class="flex flex-wrap items-baseline w-full">
<p class="flex w-full text-gray-600 font-medium text-sm">{{ $kjpp->nama_pic_admin }}</p>
</div>
<label class="form-label max-w-56">
Nomor HP PIC Admin
</label>
<div class="flex flex-wrap items-baseline w-full">
<p class="flex w-full text-gray-600 font-medium text-sm">{{ $kjpp->nomor_hp_pic_admin }}</p>
</div>
</div>
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
<label class="form-label max-w-56">
Nama PIC Marketing
</label>
<div class="flex flex-wrap items-baseline w-full">
<p class="flex w-full text-gray-600 font-medium text-sm">{{ $kjpp->nama_pic_marketing }}</p>
</div>
<label class="form-label max-w-56">
Nomor HP PIC Marketing
</label>
<div class="flex flex-wrap items-baseline w-full">
<p class="flex w-full text-gray-600 font-medium text-sm">{{ $kjpp->nomor_hp_pic_marketing }}</p>
</div>
</div>
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
<label class="form-label max-w-56">
Ijin Usaha
</label>
<div class="grid grid-cols-3 lg:grid-cols-4 w-full gap-2.5">
@foreach ($ijin_usahas as $row)
<label class="switch">
<input type="checkbox" @if (in_array($row->code, old('ijin_usaha_id', json_decode($kjpp->ijin_usaha_id, true)))) {{ 'checked' }} @endif
value="{{ $row->code }}" name="ijin_usaha_id[]" disabled="" />
<span class="switch-label">
{{ $row->name }}
</span>
</label>
@endforeach
</div>
</div>
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
<label class="form-label max-w-56">
Pengalaman (Jenis Aset)
</label>
<div class="grid grid-cols-3 lg:grid-cols-4 w-full gap-2.5">
@foreach ($jenis_jaminan as $row)
<label class="switch">
<input type="checkbox" @if (in_array($row->code, old('jenis_aset_id', json_decode($kjpp->jenis_aset_id, true)))) {{ 'checked' }} @endif
value="{{ $row->code }}" name="jenis_aset_id[]" disabled="" />
<span class="switch-label">
{{ $row->name }}
</span>
</label>
@endforeach
</div>
</div>
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
<label class="form-label max-w-56">
Attachment
</label>
<div class="flex flex-wrap items-baseline w-full">
<div class="mb-2">
<a href="{{ asset('storage/uploads_pdf/' . $kjpp->attachment) }}" class="btn btn-link"
target="_blank">
{{ $kjpp->attachment }}
</a>
</div>
</div>
</div>
</div>
</div>
</div>
@endsection