fix(master-land): fix master-land page
This commit is contained in:
parent
73c1dc43a6
commit
9e7b36520c
|
@ -14,8 +14,8 @@ class LandSeeder extends Seeder
|
||||||
public function run(): void
|
public function run(): void
|
||||||
{
|
{
|
||||||
$lands = [
|
$lands = [
|
||||||
['land_name' => 'Lahan 1', 'owner' => 'Pak Lahan 1', 'no_hp' => '08123456789', 'rental_price' => '2000000', 'rental_start' => '2023-05-01', 'rental_until' => '2023-06-30', 'province_code' => '11', 'regency_code' => '1101', 'district_code' => '110101', 'latitude' => '0.0', 'longitude' => '0.0'],
|
['land_name' => 'Lahan 1', 'owner' => 'Pak Lahan 1', 'no_hp' => '08123456789', 'rental_price' => '2000000', 'rental_start' => '2025-01-01', 'rental_until' => '2025-06-30', 'province_code' => '11', 'regency_code' => '1101', 'district_code' => '110101', 'latitude' => '0.0', 'longitude' => '0.0'],
|
||||||
['land_name' => 'Lahan 2', 'owner' => 'Pak Lahan 2', 'no_hp' => '08123456789', 'rental_price' => '1500000', 'rental_start' => '2023-05-01', 'rental_until' => '2023-06-30', 'province_code' => '11', 'regency_code' => '1101', 'district_code' => '110101', 'latitude' => '0.0', 'longitude' => '0.0'],
|
['land_name' => 'Lahan 2', 'owner' => 'Pak Lahan 2', 'no_hp' => '08123456789', 'rental_price' => '1500000', 'rental_start' => '2025-01-01', 'rental_until' => '2025-06-30', 'province_code' => '11', 'regency_code' => '1101', 'district_code' => '110101', 'latitude' => '0.0', 'longitude' => '0.0'],
|
||||||
];
|
];
|
||||||
|
|
||||||
foreach ($lands as $land) {
|
foreach ($lands as $land) {
|
||||||
|
|
|
@ -273,7 +273,7 @@ function deleteData(id) {
|
||||||
|
|
||||||
var perPage = 10,
|
var perPage = 10,
|
||||||
options = {
|
options = {
|
||||||
valueNames: ["id", "land_name", "status"],
|
valueNames: ["id", "land_name", "owner", "rental_price", "status"],
|
||||||
page: perPage,
|
page: perPage,
|
||||||
pagination: !0,
|
pagination: !0,
|
||||||
plugins: [ListPagination({ left: 2, right: 2 })],
|
plugins: [ListPagination({ left: 2, right: 2 })],
|
||||||
|
|
|
@ -68,7 +68,9 @@ class="ri-add-line align-bottom me-1"></i> Tambah</button>
|
||||||
No
|
No
|
||||||
</th>
|
</th>
|
||||||
<th class="sort" data-sort="land_name">Nama Lahan</th>
|
<th class="sort" data-sort="land_name">Nama Lahan</th>
|
||||||
<th class="sort" data-sort="description">Deskripsi</th>
|
<th class="sort" data-sort="owner">Pemilik</th>
|
||||||
|
<th class="sort" data-sort="rental_price">Harga Sewa</th>
|
||||||
|
<th class="sort" data-sort="length_of_ease">Lama Sewa</th>
|
||||||
<th class="sort" data-sort="action">Action</th>
|
<th class="sort" data-sort="action">Action</th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
|
@ -78,8 +80,14 @@ class="ri-add-line align-bottom me-1"></i> Tambah</button>
|
||||||
<td class="no">{{ $loop->iteration }}</td>
|
<td class="no">{{ $loop->iteration }}</td>
|
||||||
<td class="id" style="display:none;"><a href="javascript:void(0);"
|
<td class="id" style="display:none;"><a href="javascript:void(0);"
|
||||||
class="fw-medium link-primary">#VZ2101</a></td>
|
class="fw-medium link-primary">#VZ2101</a></td>
|
||||||
<td class="land_name">{{ $land->name }}</td>
|
<td class="land_name">{{ $land->land_name }}</td>
|
||||||
<td class="status"><span>{{ $land->description }}</span></td>
|
<td class="owner">{{ $land->owner }}</td>
|
||||||
|
<td class="rental_price">Rp.{{ number_format($land->rental_price) }}
|
||||||
|
</td>
|
||||||
|
<td class="status">
|
||||||
|
<span>{{ \Carbon\Carbon::parse($land->length_of_ease)->diffInDays(\Carbon\Carbon::parse($land->rental_until)) }}
|
||||||
|
Hari</span>
|
||||||
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<div class="d-flex gap-2 justify-content-center">
|
<div class="d-flex gap-2 justify-content-center">
|
||||||
<div class="edit">
|
<div class="edit">
|
||||||
|
|
Loading…
Reference in New Issue