mengubah tambah penawaran yang tadinya nama kjpp ada isinya satu menjadi banyak yang di ambil dari tabel kjpp dan membuat fitur penawaran ulang

This commit is contained in:
2024-10-05 06:54:32 +07:00
parent f0c2f873c4
commit 24cd036a07
6 changed files with 721 additions and 443 deletions

View File

@@ -0,0 +1,213 @@
@extends('layouts.main')
@section('breadcrumbs')
{{ Breadcrumbs::render(request()->route()->getName(), request()->route('id')) }}
@endsection
@section('content')
<div class="w-full grid gap-5 lg:gap-7.5 mx-auto">
<form action="{{ route('tender.penawaran.updatePenawaran', $id) }}" method="POST">
@csrf
@method('PUT')
<div class="card pb-2.5">
<div class="card-header" id="basic_settings">
<h3 class="card-title">
Data Penawaran Ulang
</h3>
<div class="flex items-center gap-2">
<a href="{{ route('tender.penawaran.show', $id) }}" class="btn btn-xs btn-primary" title="Detail">
<i class="ki-outline ki-abstract-26"></i> Detail
</a>
<a href="{{ route('tender.penawaran.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 Registrasi
</label>
<div class="flex flex-wrap items-baseline w-full">
<input class="flex w-full text-gray-600 font-medium text-sm input-custom" type="text"
name="nomor_registrasi" readonly value="{{ $penawaran->nomor_registrasi ?? '-' }}">
</div>
</div>
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
<label class="form-label max-w-56">
Nama KJPP Sebelumnya
</label>
<div class="flex flex-wrap items-baseline w-full">
<input class="flex w-full text-gray-600 font-medium text-sm input-custom" type="text"
name="nama_kjpp_sebelumnya" readonly value="{{ $penawaran->nama_kjpp_sebelumnya ?? '' }}">
</div>
</div>
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
<label class="form-label max-w-56">
Biaya KJPP Sebelumnya
</label>
<div class="flex flex-wrap items-baseline w-full">
<input class="flex w-full text-gray-600 font-medium text-sm input-custom" type="text"
name="biaya_kjpp_sebelumnya" readonly value="{{ $penawaran->biaya_kjpp_sebelumnya ?? '' }}">
</div>
<label class="form-label max-w-56">
Tanggal Penilaian Sebelumnya
</label>
<div class="flex flex-wrap items-baseline w-full">
<input class="flex w-full text-gray-600 font-medium text-sm input-custom" type="text"
name="tanggal_penilaian_sebelumnya" readonly
value="{{ $penawaran->tanggal_penilaian_sebelumnya ?? '' }}">
</div>
</div>
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
<label class="form-label max-w-56">
Nomor Penawaran
</label>
<div class="flex flex-wrap items-baseline w-full">
<input class="input border-warning bg-warning-light @error('code') border-danger @enderror"
type="text" name="code" value="{{ old('code', $penawaran->code) }}" readonly>
@error('code')
<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">
Data KJPP
</label>
<div class="flex flex-wrap items-baseline w-full">
<!-- Multi-select for KJPP -->
<select name="kjpp[]" multiple="multiple"
class="input tomselect w-full @error('kjpp') border-danger @enderror" id="kjpp_select">
<option value="">Pilih Nama KJPP</option>
@foreach ($kjpp as $row)
<option value="{{ $row->id }}"
{{ in_array($row->id, old('kjpp', $kjpps ?? [])) ? 'selected' : '' }}>
{{ $row->name }}
</option>
@endforeach
</select>
@error('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">
Tujuan Penilaian KJPP
</label>
<div class="flex flex-wrap items-baseline w-full">
<select id="tujuan_penilaian_kjpp_id"
class="select w-full @error('tujuan_penilaian_kjpp_id') border-danger @enderror"
name="tujuan_penilaian_kjpp_id">
<option value="">Pilih Tujuan Penilaian KJPP</option>
@if (isset($tujuan_penilaian_kjpp))
@foreach ($tujuan_penilaian_kjpp as $tp)
<option value="{{ $tp->id }}"
{{ old('tujuan_penilaian_kjpp_id', $penawaran->tujuan_penilaian_kjpp_id) == $tp->id ? 'selected' : '' }}>
{{ $tp->name }}
</option>
@endforeach
@endif
</select>
@error('tujuan_penilaian_kjpp_id')
<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">
Tanggal Batas Waktu
</label>
<div class="flex flex-wrap items-baseline w-full">
<input class="input @error('start_date') border-danger @enderror" type="date"
name="start_date" value="{{ old('start_date', $penawaran->start_date) }}">
@error('start_date')
<em class="alert text-danger text-sm">{{ $message }}</em>
@enderror
</div>
-
<div class="flex flex-wrap items-baseline w-full">
<input class="input @error('end_date') border-danger @enderror" type="date" name="end_date"
value="{{ old('end_date', $penawaran->end_date) }}">
@error('end_date')
<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">
Catatan
</label>
<div class="flex flex-wrap items-baseline w-full">
<textarea class="textarea @error('catatan') border-danger @enderror" name="catatan" rows="3" id="address">{{ old('catatan', $penawaran->catatan) }}</textarea>
@error('catatan')
<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 Laporan
</label>
<div class="flex flex-wrap items-baseline w-full">
<select id="jenis_laporan_id"
class="select w-full @error('jenis_laporan_id') border-danger @enderror"
name="jenis_laporan_id">
<option value="">Pilih Jenis Laporan</option>
@if (isset($jenis_laporan))
@foreach ($jenis_laporan as $jl)
<option value="{{ $jl->id }}"
{{ old('jenis_laporan_id', $penawaran->jenis_laporan_id) == $jl->id ? 'selected' : '' }}>
{{ $jl->name }}
</option>
@endforeach
@endif
</select>
@error('jenis_laporan_id')
<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">
Status
</label>
<div class="flex flex-wrap items-baseline w-full">
<select class="select w-full @error('status') border-danger @enderror" name="status">
<option value="">Pilih Status</option>
@if (isset($status))
@foreach ($status as $s)
<option value="{{ $s->name }}"
{{ $penawaran->status == $s->name ? 'selected' : '' }}>
{{ $s->name }}
</option>
@endforeach
@endif
</select>
@error('status')
<em class="alert text-danger text-sm">{{ $message }}</em>
@enderror
</div>
</div>
<div class="flex justify-end">
<button type="submit" class="btn btn-primary">
Penawaran Ulang
</button>
</div>
</div>
</div>
</form>
</div>
@endsection
@push('styles')
<style>
input.input-custom:focus {
outline: none;
box-shadow: none;
}
</style>
@endpush