Membuat Menu Tender di Data Penawaran: Tambah Data Penawaran dan Detail Data Penawaran

This commit is contained in:
2024-10-04 17:25:41 +07:00
parent b64b44539c
commit f0c2f873c4
9 changed files with 341 additions and 139 deletions

View File

@@ -1,3 +1,35 @@
@php
function formatTanggalIndonesia($date)
{
$carbonDate = \Carbon\Carbon::parse($date);
$indonesianMonths = [
'Januari',
'Februari',
'Maret',
'April',
'Mei',
'Juni',
'Juli',
'Agustus',
'September',
'Oktober',
'November',
'Desember',
];
$month = $indonesianMonths[$carbonDate->month - 1];
return $carbonDate->format('d') . ' ' . $month . ' ' . $carbonDate->format('Y');
}
function formatRupiah($number)
{
// Convert to float if the input is a string
$number = (float) $number;
return 'Rp ' . number_format($number, 2, ',', '.');
}
@endphp
@extends('layouts.main')
@section('breadcrumbs')
@@ -25,7 +57,7 @@
</label>
<div class="flex flex-wrap items-baseline w-full">
<p class="flex w-full text-gray-600 font-medium text-sm">
{{ $penawaran->nomor_registrasi }}
{{ $penawaran->nomor_registrasi ?? '' }}
</p>
</div>
<label class="form-label max-w-56">
@@ -33,7 +65,7 @@
</label>
<div class="flex flex-wrap items-baseline w-full">
<p class="flex w-full text-gray-600 font-medium text-sm">
{{ $penawaran->code }}
{{ $penawaran->code ?? '' }}
</p>
</div>
</div>
@@ -42,19 +74,9 @@
Nama KJPP Sebelumnya
</label>
<div class="flex flex-wrap items-baseline w-full">
@if (isset($penawaran->nama_kjpp_sebelumnya) && !empty(json_decode($penawaran->nama_kjpp_sebelumnya, true)))
<div class="flex flex-row space-x-4 text-gray-600 font-medium text-sm gap-1">
@foreach (json_decode($penawaran->nama_kjpp_sebelumnya, true) as $penawaran_code)
@php
$kjpp = $kjpps->firstWhere('name', $penawaran_code);
@endphp
@if ($kjpp)
<div
class="flex flex-row space-x-4 text-white font-medium text-sm badge badge-dark dark-mode:badge dark-mode:text-gray-600 badge-xs">
{{ $kjpp->name }}
</div>
@endif
@endforeach
@if (isset($penawaran->nama_kjpp_sebelumnya) && !empty($penawaran->nama_kjpp_sebelumnya))
<div class="flex flex-row space-x-4 text-gray-600 font-medium text-sm">
{{ $penawaran->nama_kjpp_sebelumnya }}
</div>
@else
<div class="flex flex-row space-x-4 text-gray-600 font-medium text-sm">
@@ -66,15 +88,6 @@
Biaya KJPP Sebelumnya
</label>
<p class="flex w-full text-gray-600 font-medium text-sm">
@php
function formatRupiah($number)
{
// Convert to float if the input is a string
$number = (float) $number;
return 'Rp ' . number_format($number, 2, ',', '.');
}
@endphp
@if (isset($penawaran->biaya_kjpp_sebelumnya))
{{ formatRupiah($penawaran->biaya_kjpp_sebelumnya) }}
@else
@@ -82,7 +95,100 @@
@endif
</p>
</div>
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
<label class="form-label max-w-56">
Tanggal Penilaian Sebelumnya
</label>
@if (isset($penawaran->tanggal_penilaian_sebelumnya) && !empty($penawaran->tanggal_penilaian_sebelumnya))
<p class="flex w-full text-gray-600 font-medium text-sm">
{{ formatTanggalIndonesia($penawaran->tanggal_penilaian_sebelumnya) }}
</p>
@else
<p class="flex w-full text-gray-600 font-medium text-sm">
Tidak Ada
</p>
@endif
</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>
<p class="flex w-full text-gray-600 font-medium text-sm">
@if (isset($tujuan_penilaian_kjpp))
@foreach ($tujuan_penilaian_kjpp as $tpk)
{{ $tpk->name }}
@endforeach
@else
Tidak Ada
@endif
</p>
<label class="form-label max-w-56">
Jenis Laporan
</label>
<p class="flex w-full text-gray-600 font-medium text-sm">
@if (isset($jenis_laporan))
@foreach ($jenis_laporan as $jl)
{{ $jl->name }}
@endforeach
@else
Tidak Ada
@endif
</p>
</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>
<p class="flex w-full text-gray-600 font-medium text-sm">
{{ formatTanggalIndonesia($penawaran->start_date) }} -
{{ formatTanggalIndonesia($penawaran->end_date) }}
</p>
</div>
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
<label class="form-label max-w-56">
Catatan
</label>
@if (isset($penawaran->catatan))
<p class="flex w-full text-gray-600 font-medium text-sm">
{{ $penawaran->catatan }}
</p>
@else
<p class="flex w-full text-gray-600 font-medium text-sm">
Tidak Ada
</p>
@endif
</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-row space-x-4 text-gray-600 font-medium text-sm gap-1">
@if (isset($kjpps) && !empty(json_decode($kjpps, true)))
@foreach ($kjpps as $kjpp)
@if (isset($kjpp))
<div
class="flex flex-row space-x-4 text-white font-medium text-sm badge badge-dark dark-mode:badge dark-mode:text-gray-600 badge-xs">
{{ $kjpp->name }}</div>
@endif
@endforeach
@else
<div class="flex flex-row space-x-4 text-gray-600 font-medium text-sm">Tidak Ada</div>
@endif
</div>
</div>
<div class="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
<label class="form-label max-w-56">
Status
</label>
@if (isset($penawaran->status))
<p class="flex w-full text-gray-600 font-medium text-sm">
{{ $penawaran->status }}
</p>
@else
<p class="flex w-full text-gray-600 font-medium text-sm">
Tidak Ada
</p>
@endif
</div>
</div>
</div>
</div>
@endsection
@endsection