init title lokasi, dan penambahan api
This commit is contained in:
@@ -0,0 +1,118 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Controllers\Api\V1;
|
||||
|
||||
use App\Http\Controllers\Controller;
|
||||
use App\Models\TransaksiParkir;
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Support\Facades\Log;
|
||||
|
||||
class ParkingOperationController extends Controller
|
||||
{
|
||||
/**
|
||||
* Display a listing of the resource.
|
||||
*
|
||||
* @return \Illuminate\Http\Response
|
||||
*/
|
||||
public function index()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Show the form for creating a new resource.
|
||||
*
|
||||
* @return \Illuminate\Http\Response
|
||||
*/
|
||||
public function create()
|
||||
{
|
||||
//
|
||||
}
|
||||
|
||||
/**
|
||||
* Store a newly created resource in storage.
|
||||
*
|
||||
* @param \Illuminate\Http\Request $request
|
||||
* @return \Illuminate\Http\Response
|
||||
*/
|
||||
public function store(Request $request)
|
||||
{
|
||||
$transaksi = $this->show($request->input('transaksi'))->getData();
|
||||
|
||||
// dd($transaksi)->status;
|
||||
// dd($transaksi->getData());
|
||||
Log::info(get_class($transaksi));
|
||||
dd(get_class($transaksi));
|
||||
// if ($transaksi->status === true && $transaksi->member === false) {
|
||||
// }
|
||||
return;
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Display the specified resource.
|
||||
*
|
||||
* @param int $id
|
||||
* @return \Illuminate\Http\Response
|
||||
*/
|
||||
public function show($id)
|
||||
{
|
||||
$transaksi = TransaksiParkir::where('no_pol','LIKE', '%' .$id . '%')->first();
|
||||
|
||||
if (!$transaksi) {
|
||||
return response()->json([
|
||||
'status' => false,
|
||||
'message' => 'Kendaraan belum masuk atau transaksi tidak ditemukan'
|
||||
]);
|
||||
}
|
||||
|
||||
$isMember = $transaksi->status_transaksi == '3' ? true : false;
|
||||
|
||||
return response()->json([
|
||||
'status' => true,
|
||||
'member' => $isMember,
|
||||
'data' => [
|
||||
'id' => $transaksi->id,
|
||||
'no_pol' => $transaksi->no_pol,
|
||||
'id_kendaraan' => $transaksi->id_mobil,
|
||||
'waktu_masuk' => $transaksi->waktu_masuk,
|
||||
'status' => $transaksi->status,
|
||||
'status_transaksi' => $transaksi->status_transaksi
|
||||
]
|
||||
]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Show the form for editing the specified resource.
|
||||
*
|
||||
* @param int $id
|
||||
* @return \Illuminate\Http\Response
|
||||
*/
|
||||
public function edit($id)
|
||||
{
|
||||
//
|
||||
}
|
||||
|
||||
/**
|
||||
* Update the specified resource in storage.
|
||||
*
|
||||
* @param \Illuminate\Http\Request $request
|
||||
* @param int $id
|
||||
* @return \Illuminate\Http\Response
|
||||
*/
|
||||
public function update(Request $request, $id)
|
||||
{
|
||||
//
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove the specified resource from storage.
|
||||
*
|
||||
* @param int $id
|
||||
* @return \Illuminate\Http\Response
|
||||
*/
|
||||
public function destroy($id)
|
||||
{
|
||||
//
|
||||
}
|
||||
}
|
||||
@@ -62,7 +62,7 @@ public function show($id)
|
||||
// } else (
|
||||
// $condition = where('no_pol', $id);
|
||||
// )
|
||||
// $vehicle = JenisMobil::all();
|
||||
// $vehicle = VehicleItem::all();
|
||||
// $data = TransaksiParkir::select('no_pol','waktu_masuk','waktu_keluar','jm.nama as vehicle','id_kendaraan','np.nama as gateIn', 'id_pintu_masuk','jm.nama as vehiclename')
|
||||
// ->leftJoin('jenis_mobil as jm', 'jm.id', '=', 'transaksi_parkir.id_kendaraan')
|
||||
// ->leftJoin('nama_pos as np', 'np.id', '=', 'transaksi_parkir.id_pintu_masuk')
|
||||
@@ -76,7 +76,7 @@ public function show($id)
|
||||
// ]);
|
||||
Log::info('ID: ' . $id);
|
||||
|
||||
$vehicle = JenisMobil::all();
|
||||
$vehicle = VehicleItem::all();
|
||||
|
||||
$query = TransaksiParkir::select(
|
||||
'no_pol',
|
||||
|
||||
@@ -0,0 +1,90 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Controllers\Http\Setup\Vehicle;
|
||||
|
||||
use App\Http\Controllers\Controller;
|
||||
use App\Models\VehicleItem;
|
||||
use Illuminate\Http\Request;
|
||||
|
||||
class MasterVehicleController extends Controller
|
||||
{
|
||||
/**
|
||||
* Display a listing of the resource.
|
||||
*
|
||||
* @return \Illuminate\Http\Response
|
||||
*/
|
||||
public function index()
|
||||
{
|
||||
$vehicle = VehicleItem::orderBy('id')->get();
|
||||
|
||||
// dd($vehicle);
|
||||
|
||||
return view ('setup.vehicle.vehicle', compact('vehicle'));
|
||||
}
|
||||
|
||||
/**
|
||||
* Show the form for creating a new resource.
|
||||
*
|
||||
* @return \Illuminate\Http\Response
|
||||
*/
|
||||
public function create()
|
||||
{
|
||||
//
|
||||
}
|
||||
|
||||
/**
|
||||
* Store a newly created resource in storage.
|
||||
*
|
||||
* @param \Illuminate\Http\Request $request
|
||||
* @return \Illuminate\Http\Response
|
||||
*/
|
||||
public function store(Request $request)
|
||||
{
|
||||
//
|
||||
}
|
||||
|
||||
/**
|
||||
* Display the specified resource.
|
||||
*
|
||||
* @param int $id
|
||||
* @return \Illuminate\Http\Response
|
||||
*/
|
||||
public function show($id)
|
||||
{
|
||||
//
|
||||
}
|
||||
|
||||
/**
|
||||
* Show the form for editing the specified resource.
|
||||
*
|
||||
* @param int $id
|
||||
* @return \Illuminate\Http\Response
|
||||
*/
|
||||
public function edit($id)
|
||||
{
|
||||
//
|
||||
}
|
||||
|
||||
/**
|
||||
* Update the specified resource in storage.
|
||||
*
|
||||
* @param \Illuminate\Http\Request $request
|
||||
* @param int $id
|
||||
* @return \Illuminate\Http\Response
|
||||
*/
|
||||
public function update(Request $request, $id)
|
||||
{
|
||||
//
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove the specified resource from storage.
|
||||
*
|
||||
* @param int $id
|
||||
* @return \Illuminate\Http\Response
|
||||
*/
|
||||
public function destroy($id)
|
||||
{
|
||||
//
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,130 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Controllers\Http\Setup\Vehicle;
|
||||
|
||||
use App\Http\Controllers\Controller;
|
||||
use App\Models\MasterTarif;
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Support\Facades\DB;
|
||||
use Illuminate\Support\Facades\Log;
|
||||
|
||||
class ModifiedVehiclepriceController extends Controller
|
||||
{
|
||||
/**
|
||||
* Display a listing of the resource.
|
||||
*
|
||||
* @return \Illuminate\Http\Response
|
||||
*/
|
||||
public function index()
|
||||
{
|
||||
//
|
||||
}
|
||||
|
||||
/**
|
||||
* Show the form for creating a new resource.
|
||||
*
|
||||
* @return \Illuminate\Http\Response
|
||||
*/
|
||||
public function create()
|
||||
{
|
||||
//
|
||||
}
|
||||
|
||||
/**
|
||||
* Store a newly created resource in storage.
|
||||
*
|
||||
* @param \Illuminate\Http\Request $request
|
||||
* @return \Illuminate\Http\Response
|
||||
*/
|
||||
public function store(Request $request)
|
||||
{
|
||||
//
|
||||
}
|
||||
|
||||
/**
|
||||
* Display the specified resource.
|
||||
*
|
||||
* @param int $id
|
||||
* @return \Illuminate\Http\Response
|
||||
*/
|
||||
public function show($id)
|
||||
{
|
||||
// Log::info($id);
|
||||
$id = str($id);
|
||||
$vehicleRates = DB::table('tarif')->where('id_mobil', $id)->first();
|
||||
|
||||
Log::info(json_encode($vehicleRates));
|
||||
return $vehicleRates;
|
||||
}
|
||||
|
||||
/**
|
||||
* Show the form for editing the specified resource.
|
||||
*
|
||||
* @param int $id
|
||||
* @return \Illuminate\Http\Response
|
||||
*/
|
||||
public function edit($id)
|
||||
{
|
||||
//
|
||||
}
|
||||
|
||||
/**
|
||||
* Update the specified resource in storage.
|
||||
*
|
||||
* @param \Illuminate\Http\Request $request
|
||||
* @param int $id
|
||||
* @return \Illuminate\Http\Response
|
||||
*/
|
||||
public function update(Request $request, $id)
|
||||
{
|
||||
// Log::info($request->all());
|
||||
// $id = $request->id_mobil;
|
||||
|
||||
$dataQuery = MasterTarif::find($id);
|
||||
try {
|
||||
|
||||
Log::info($request->all());
|
||||
|
||||
$dataQuery->fill($request->all());
|
||||
|
||||
if (! $dataQuery->isDirty()) {
|
||||
// if($dataQuery->isDirty()) {
|
||||
return response()->json([
|
||||
'status' => false,
|
||||
'message' => 'Tidak ada perubahan data'
|
||||
]);
|
||||
// }
|
||||
|
||||
}
|
||||
Log::info('Data yang di simpan' . json_encode($dataQuery->getDirty()));
|
||||
$dataQuery->save();
|
||||
|
||||
return response()->json([
|
||||
'status' => true,
|
||||
'message' => 'Data berhasil di ubah'
|
||||
]);
|
||||
} catch (\Throwable $th) {
|
||||
//throw $th;
|
||||
Log::info('Data yang di simpan' . json_encode($dataQuery->getDirty()));
|
||||
|
||||
// Log::info($request->all());
|
||||
|
||||
return response()->json([
|
||||
'status' => false,
|
||||
'message' => 'Gagal menyimpan data ' . $th->getMessage(),
|
||||
]);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove the specified resource from storage.
|
||||
*
|
||||
* @param int $id
|
||||
* @return \Illuminate\Http\Response
|
||||
*/
|
||||
public function destroy($id)
|
||||
{
|
||||
//
|
||||
}
|
||||
}
|
||||
@@ -1,22 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class JenisMobil extends Model
|
||||
{
|
||||
use HasFactory;
|
||||
|
||||
protected $table = 'jenis_mobil';
|
||||
|
||||
protected $casts = [
|
||||
'id' => 'string',
|
||||
];
|
||||
|
||||
protected $fillable = [
|
||||
'nama','short_cut'
|
||||
];
|
||||
|
||||
}
|
||||
@@ -0,0 +1,30 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class MasterTarif extends Model
|
||||
{
|
||||
use HasFactory;
|
||||
|
||||
protected $table = 'tarif';
|
||||
protected $primaryKey = 'id_mobil'; // Primary key tabel
|
||||
public $timestamps = false;
|
||||
|
||||
|
||||
protected $fillable = [
|
||||
'id_mobil', 'tarif', 'tarif_interval','interval',
|
||||
'waktu_tarif', 'waktu_gratis', 'bayar_dimuka', 'denda','maksimum',
|
||||
'tanggal','tarif2','waktu2','tarif_period','max_per_hari',
|
||||
'min_per_hari','time_base','tarif_inap','batas_min_inap',
|
||||
'max_kena_charge','tarif_member','tarif_voucher','voucher_frek',
|
||||
'voucher_time','voucher_base','voucher_base_time','asuransi_incl',
|
||||
'denda_only_casual','frek_interval','frek_waktu2','free_for_validasi',
|
||||
'time_base_maks','free_pos_default','tarif_valet','start_time_member_charge',
|
||||
'stop_time_member_charge','min_time_tarif_member','type_tarif_member','tarif3',
|
||||
'waktu3','frek_waktu3','denda_member','valet_extra_time','extra_charge_value',
|
||||
'extra_charge_time','denda_only'
|
||||
];
|
||||
}
|
||||
@@ -26,6 +26,6 @@ public function stiker_details ()
|
||||
// Relasi ke tabel jenis_mobil
|
||||
public function vehicle()
|
||||
{
|
||||
return $this->belongsTo(JenisMobil::class, 'id', 'jenis_mobil');
|
||||
return $this->belongsTo(VehicleItem::class, 'id', 'jenis_mobil');
|
||||
}
|
||||
}
|
||||
|
||||
@@ -7,12 +7,19 @@
|
||||
|
||||
class VehicleItem extends Model
|
||||
{
|
||||
protected $connection = 'pgsql_second';
|
||||
// protected $connection = 'pgsql_second';
|
||||
protected $table = 'jenis_mobil';
|
||||
protected $primaryKey = 'id';
|
||||
public $timestamps = false;
|
||||
protected $keyType = 'string';
|
||||
|
||||
use HasFactory;
|
||||
|
||||
protected $fillable = [
|
||||
'id', 'nama', 'tanggal', 'short_cut', 'orang', 'validasi', 'need_access'
|
||||
];
|
||||
|
||||
public function VehiclePrice () {
|
||||
return $this->hasOne(MasterTarif::class, 'id', 'id_mobil');
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,86 @@
|
||||
<?php
|
||||
|
||||
namespace App\Services\Parking;
|
||||
|
||||
use App\Models\MasterTarif;
|
||||
use App\Models\VehicleItem;
|
||||
use Illuminate\Support\Facades\Log;
|
||||
|
||||
class RateParkingService
|
||||
{
|
||||
public function calc ($transaksi, $times)
|
||||
{
|
||||
$duration = $times; ## Parse lama parkir berdasarkan detik
|
||||
$tarifVehicle = MasterTarif::find($transaksi);
|
||||
$parkingPrice = 0; //Tarif pertama
|
||||
Log::info("\n" . '------------------======== Starting tarif Begin ==============----------------------');
|
||||
Log::info('Mulai perhitungan tarif dengan durasi : ' . $duration .' (Rp. '. $parkingPrice .')');
|
||||
|
||||
// Grace Periode
|
||||
if ($duration < $tarifVehicle->waktu_gratis) {
|
||||
Log::info('GP Rules : ');
|
||||
return $parkingPrice;
|
||||
} else if ( $tarifVehicle->waktu_gratis !== 0 && $tarifVehicle->tarif_periode !== 0) {
|
||||
Log::info('GP Rules : ');
|
||||
$parkingPrice = $parkingPrice + $tarifVehicle->tarif_period;
|
||||
$duration = $duration - $tarifVehicle->waktu_gratis;
|
||||
Log::info('Setelah GP : ' . $parkingPrice . ' Durasi parkir : ' . $duration);
|
||||
}
|
||||
|
||||
## Hitung Tarif pertama
|
||||
$firstPrice = 0;
|
||||
$firstDuration = $tarifVehicle->frek_interval * ($tarifVehicle->interval * 60);
|
||||
Log::info('Firstime rules : ' . $firstDuration);
|
||||
// if ($duration >= $firstDuration) {
|
||||
do {
|
||||
$duration -= ($tarifVehicle->interval * 60);
|
||||
$parkingPrice += $tarifVehicle->tarif_interval;
|
||||
$firstPrice++;
|
||||
} while ($firstPrice < $tarifVehicle->frek_interval);
|
||||
Log::info('Tarif jam pertama : ' . $parkingPrice . ' Sisa durasi : ' . $duration);
|
||||
// }
|
||||
|
||||
// Log::info($firstDuration);
|
||||
## Hitung tarif kedua
|
||||
$secondPrice = 1;
|
||||
// Log::info($tarifVehicle->frek_waktu2 . ' - ' . $tarifVehicle->waktu2);
|
||||
$secondDuration = $tarifVehicle->frek_waktu2 * ($tarifVehicle->waktu2 * 60);
|
||||
if ($duration >= $secondDuration) {
|
||||
Log::info('');
|
||||
Log::info('Secondtime rules : ' . $secondDuration);
|
||||
do {
|
||||
$duration -= ($tarifVehicle->waktu2 * 60);
|
||||
$parkingPrice += $tarifVehicle->tarif_interval;
|
||||
$secondPrice++;
|
||||
} while ($secondPrice < $tarifVehicle->frek_waktu2);
|
||||
|
||||
Log::info('Tarif jam kedua : ' . $parkingPrice . ' Sisa durasi : ' . $duration);
|
||||
}
|
||||
|
||||
$nextDuration = 0;
|
||||
$lastDuration = $tarifVehicle->waktu_tarif * 60;
|
||||
if ($duration <= $lastDuration && $duration > 0) {
|
||||
Log::info('');
|
||||
Log::info('Sisa Durasi ' . $duration);
|
||||
do {
|
||||
$duration -= ($tarifVehicle->waktu_tarif * 60);
|
||||
$parkingPrice += $tarifVehicle->tarif;
|
||||
// $nextDuration++;
|
||||
} while ($duration > 0);
|
||||
Log::info('Tarif jam berikutnya : ' . $parkingPrice . ' Sisa durasi : ' . $duration);
|
||||
}
|
||||
|
||||
Log::info('Tarif Parkir Anda : ' . $parkingPrice . ' Sisa durasi : ' . $duration);
|
||||
|
||||
|
||||
// if ($tarifVehicle->time_base_maks == 1) {
|
||||
// if ($parkingPrice > $tarifVehicle->maksimum) {
|
||||
// $parkingPrice = $tarifVehicle->maksimum;
|
||||
// }
|
||||
// }
|
||||
|
||||
|
||||
|
||||
return $parkingPrice;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,160 @@
|
||||
$(document).ready(function () {
|
||||
|
||||
$(document).on('click', '.hardware-button', function () {
|
||||
let row = $(this).closest('tr');
|
||||
|
||||
// kalau sudah ada baris edit, hapus dulu
|
||||
$('.edit-row').remove();
|
||||
|
||||
let id = $(this).data('id');
|
||||
let nama = $(this).data('nama');
|
||||
$.ajax({
|
||||
url: "{{ route('hardware.show', '') }}/" + id,
|
||||
type: 'GET',
|
||||
success: function (r) {
|
||||
console.log(r);
|
||||
|
||||
let colSpan = row.children('td').length;
|
||||
|
||||
// Field yang mau ditampilkan (pilih sendiri mau yang mana)
|
||||
let fields = [
|
||||
['printer1_avail', 'Printer Status'],
|
||||
['printer1_conn', 'Printer Connection'],
|
||||
['printer1_spd', 'Printer Speed/Baudrate'],
|
||||
['video1_avail', 'Kamera Status'],
|
||||
['video1_conn', 'Kamera URL/Path'],
|
||||
['sound_avail', 'Sound Status'],
|
||||
['bg_avail', 'BGate Status'],
|
||||
['bg_conn', 'BGate Connection'],
|
||||
['bank_reader_avail', 'Reader BANK Status'],
|
||||
['bank_reader_comm', 'Reader BANK Connection'],
|
||||
['bank_reader_key', 'Reader BANK Key/Parameter'],
|
||||
];
|
||||
|
||||
let rows = '';
|
||||
|
||||
for (let i = 0; i < fields.length; i ++) {
|
||||
|
||||
let f1 = fields[i];
|
||||
|
||||
rows += `
|
||||
<tr>
|
||||
<td class="fw-semibold text-muted text-label"><strong>${f1[1]}</strong></td>
|
||||
<td>
|
||||
<span class="view-mode">${formatValue(f1[0], r[f1[0]])}</span>
|
||||
<input type="text"
|
||||
class="form-control form-control-sm edit-mode d-none"
|
||||
data-key="${f1[0]}"
|
||||
value="${r[f1[0]] ?? ''}">
|
||||
</td>
|
||||
</tr>
|
||||
`;
|
||||
}
|
||||
|
||||
let editHtml = `
|
||||
<tr class="edit-row" data-id="${id}">
|
||||
<td colspan="${colSpan}">
|
||||
<div class="card shadow-sm">
|
||||
<div class="card-header d-flex justify-content-between align-items-center">
|
||||
<strong>Hardware Configuration</strong>
|
||||
<div>
|
||||
<button class="btn btn-sm btn-primary btn-edit">Edit</button>
|
||||
<button class="btn btn-sm btn-success btn-save d-none">Save</button>
|
||||
<button class="btn btn-sm btn-secondary btn-cancel d-none">Cancel</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card-body p-2">
|
||||
<table class="table table-bordered table-sm align-middle mb-0">
|
||||
<thead class="table-light">
|
||||
<tr>
|
||||
<th width="15%">Setting</th>
|
||||
<th width="85%">Value</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
${rows}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
`;
|
||||
|
||||
row.after(editHtml);
|
||||
},
|
||||
error: function (xhr) {
|
||||
console.error(xhr.responseText);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
// MODE EDIT
|
||||
$(document).on('click', '.btn-edit', function () {
|
||||
|
||||
$('.view-mode').addClass('d-none');
|
||||
$('.edit-mode').removeClass('d-none');
|
||||
|
||||
$('.btn-edit').addClass('d-none');
|
||||
$('.btn-save, .btn-cancel').removeClass('d-none');
|
||||
});
|
||||
|
||||
// CANCEL
|
||||
$(document).on('click', '.btn-cancel', function () {
|
||||
|
||||
$('.edit-mode').addClass('d-none');
|
||||
$('.view-mode').removeClass('d-none');
|
||||
|
||||
$('.btn-save, .btn-cancel').addClass('d-none');
|
||||
$('.btn-edit').removeClass('d-none');
|
||||
});
|
||||
|
||||
// SAVE
|
||||
$(document).on('click', '.btn-save', function () {
|
||||
|
||||
let dataToSend = {};
|
||||
|
||||
$('.edit-mode').each(function () {
|
||||
let key = $(this).data('key');
|
||||
dataToSend[key] = $(this).val();
|
||||
});
|
||||
|
||||
console.log(dataToSend);
|
||||
let gateId = $('.edit-row').data('id');
|
||||
|
||||
$.ajax({
|
||||
url: "{{ route('hardware.update', '') }}/" + gateId,
|
||||
type: "PUT",
|
||||
data: {
|
||||
_token: "{{ csrf_token() }}",
|
||||
data: dataToSend
|
||||
},
|
||||
success: function () {
|
||||
|
||||
$('.edit-mode').each(function () {
|
||||
let val = $(this).val();
|
||||
$(this).siblings('.view-mode').text(val);
|
||||
});
|
||||
|
||||
$('.btn-cancel').click();
|
||||
alert('Berhasil disimpan 🔥');
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
function formatValue(key, value) {
|
||||
|
||||
// kalau field *_avail kita kasih badge
|
||||
if (key.includes('_avail')) {
|
||||
|
||||
if (value == 1) {
|
||||
return `<span class="badge rounded-pill bg-success px-3">ON</span>`;
|
||||
} else {
|
||||
return `<span class="badge rounded-pill bg-danger px-3">OFF</span>`;
|
||||
}
|
||||
}
|
||||
|
||||
// default
|
||||
return value ?? '-';
|
||||
}
|
||||
});
|
||||
@@ -0,0 +1,117 @@
|
||||
$(document).ready(function () {
|
||||
|
||||
$.validator.addClassRules('no-spinner-time', {
|
||||
required: true,
|
||||
min: 1
|
||||
});
|
||||
|
||||
$.validator.messages.min = "Nilai tidak boleh 0";
|
||||
|
||||
$('#show-tarif').validate({
|
||||
errorClass: 'text-danger',
|
||||
|
||||
highlight: function(element) {
|
||||
$(element).addClass('is-invalid');
|
||||
},
|
||||
|
||||
unhighlight: function(element) {
|
||||
$(element).removeClass('is-invalid');
|
||||
},
|
||||
|
||||
errorPlacement: function(error, element) {
|
||||
error.insertAfter(element);
|
||||
}
|
||||
});
|
||||
|
||||
$(document).on('click', '.vehicle-price', function () {
|
||||
|
||||
|
||||
let id = $(this).data('id');
|
||||
let nama = $(this).data('nama');
|
||||
console.log(id);
|
||||
|
||||
let url = "{{ route('vehicle-price.show',':id') }}";
|
||||
url = url.replace(':id', id);
|
||||
|
||||
$.ajax({
|
||||
url: '/setup/master/price/' + id,
|
||||
type: 'GET',
|
||||
success: function (r) {
|
||||
console.log(r);
|
||||
$('#id_mobil').val(r.id_mobil);
|
||||
$('.title').text('Ubah Tarif Kendaraan ' + nama);
|
||||
$('#waktu_gratis').val(r.waktu_gratis); // waktu kurang dari n pertama
|
||||
$('#tarif_period').val(r.tarif_period); // adalah
|
||||
$('#frek_interval').val(r.frek_interval); // 1
|
||||
$('#interval').val(r.interval); // X n menit pertama
|
||||
$('#tarif_interval').val(r.tarif_interval); // adalah Rp.
|
||||
$('#bayar_dimuka').val(r.bayar_dimuka).trigger('change');
|
||||
$('#asuransi_incl').val(r.asuransi_incl);
|
||||
$('#frek_waktu2').val(r.frek_waktu2); // waktu 1
|
||||
$('#waktu2').val(r.waktu2); // xn menit berikutnya
|
||||
$('#tarif2').val(r.tarif2); // adalah Rp.
|
||||
$('#tarif').val(r.tarif); // tarif berikut nya
|
||||
$('#waktu_tarif').val(r.waktu_tarif); // per n menit
|
||||
$('#maksimum').val(r.maksimum);
|
||||
if(r.time_base == 1) {
|
||||
$('#maks_cond').val(r.time_base_maks).show();
|
||||
$('#maksimum-cond').val(0).trigger('change');
|
||||
$('.maks_cond_day').hide();
|
||||
$('#maks_cond_day').hide();
|
||||
} else {
|
||||
$('#maks_cond').hide();
|
||||
$('#maksimum-cond').val(1).trigger('change');
|
||||
$('.maks_cond_day').show();
|
||||
$('#maks_cond_day').val(r.min_per_hari).show();
|
||||
}
|
||||
$('#denda').val(r.denda);
|
||||
$('#denda_member').val(r.denda_member);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
$('#maksimum-cond').on('change', function() {
|
||||
let selectMaxCond = $(this).val();
|
||||
if (selectMaxCond == 0 ) {
|
||||
$('#maks_cond').show().val(24);
|
||||
$('.maks_cond_day').hide();
|
||||
$('#maks_cond_day').val(1).hide();
|
||||
} else if (selectMaxCond == 1) {
|
||||
$('#maks_cond').hide();
|
||||
$('.maks_cond_day').show();
|
||||
$('#maks_cond_day').show().val(60);
|
||||
} else {
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
$('.simpan').on('click', function () {
|
||||
|
||||
if (!$('#show-tarif').valid()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
let vehicleRate = $('#show-tarif').serialize();
|
||||
|
||||
let id = $('#id_mobil').val();
|
||||
// let url = "{{ route('vehicle.update',':id') }}";
|
||||
let url = $(this).data('url');
|
||||
url = url.replace(':id', id);
|
||||
console.log(url);
|
||||
|
||||
$.ajax({
|
||||
url: url,
|
||||
type: 'PUT',
|
||||
headers: {
|
||||
'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')
|
||||
},
|
||||
data: vehicleRate,
|
||||
success: function(r) {
|
||||
console.log(r);
|
||||
|
||||
$('#modal-vehicle').modal('hide');
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
});
|
||||
@@ -23,7 +23,7 @@
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
|
||||
<!-- PAGE TITLE HERE -->
|
||||
<title>All New Manufacture - {{ $locationSettings->namaperusahaan }}</title>
|
||||
<title>({{ $locationSettings->namalokasi }}) - All New Manufacture ({{ $locationSettings->namaperusahaan }})</title>
|
||||
|
||||
<!-- Favicon icon -->
|
||||
<link rel="shortcut icon" type="image/png" href="{{asset('images/logo.ico') }}">
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
|
||||
<meta name="csrf-token" content="{{ csrf_token() }}">
|
||||
|
||||
<title>All New Manufacture</title>
|
||||
<title>({{ $locationSettings->namalokasi }}) - All New Manufacture</title>
|
||||
<!-- base:css -->
|
||||
<link rel="stylesheet" href="{{ asset('vendors/mdi/css/materialdesignicons.min.css') }}">
|
||||
<link rel="stylesheet" href="{{ asset('vendors/base/vendor.bundle.base.css') }}">
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
<div class="submenu">
|
||||
<ul>
|
||||
<li class="nav-item"><a class="nav-link" href="/setup/master/gate">Master Pintu/Pos</a></li>
|
||||
<li class="nav-item"><a class="nav-link" href="/transaksi/stiker">Master Kendaraan</a></li>
|
||||
<li class="nav-item"><a class="nav-link" href="/setup/master/vehicle">Master Kendaraan</a></li>
|
||||
<li class="nav-item"><a class="nav-link" href="/transaksi/member">Master Tarif</a></li>
|
||||
<li class="nav-item"><a class="nav-link" href="/transaksi/member">Master Shift</a></li>
|
||||
<hr>
|
||||
|
||||
@@ -0,0 +1,159 @@
|
||||
@extends('layouts.master')
|
||||
|
||||
@section('styles')
|
||||
<style>
|
||||
.no-spinner::-webkit-inner-spin-button,
|
||||
.no-spinner::-webkit-outer-spin-button,
|
||||
.no-spinner-time::-webkit-inner-spin-button,
|
||||
.no-spinner-time::-webkit-outer-spin-button {
|
||||
-webkit-appearance: none;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.card-body label {
|
||||
font-size: 13px;
|
||||
color: #6c757d;
|
||||
}
|
||||
|
||||
.card-body .form-control,
|
||||
.card-body .form-select {
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
#search-button {
|
||||
font-weight: 600;
|
||||
letter-spacing: .3px;
|
||||
}
|
||||
.table-garis, .garis {
|
||||
border: 0.1px solid black; /* Sets a 1px solid black border */
|
||||
border-collapse: collapse;
|
||||
}
|
||||
|
||||
.text-label {
|
||||
color: #000000;
|
||||
}
|
||||
|
||||
.tes {
|
||||
width: 100px;
|
||||
}
|
||||
/*
|
||||
.table-selectable tbody tr {
|
||||
cursor: pointer;
|
||||
transition: 0.15s;
|
||||
}
|
||||
|
||||
.table-selectable tbody tr:hover {
|
||||
background-color: #f2f6ff;
|
||||
}
|
||||
|
||||
.table-selectable tbody tr.selected {
|
||||
background-color: #0d6efd !important;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.table-selectable tbody tr.selected td {
|
||||
color: #fff !important;
|
||||
} */
|
||||
</style>
|
||||
@endsection
|
||||
|
||||
@section('content')
|
||||
<!-- partial -->
|
||||
<div class="container-fluid page-body-wrapper">
|
||||
<div class="main-panel">
|
||||
<div class="content-wrapper">
|
||||
<div class="row">
|
||||
<div class="col-2">
|
||||
</div>
|
||||
<div class="col-12 col-md-8 grid-margin justify-content-center stretch-card">
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<h4 class="card-title">Master Kendaraan dan Tarif Parkir</h4>
|
||||
<div class="table-responsive mb-2">
|
||||
<table class="table table-bordered table-selectable" id="example" data-url="{{ route('getMember') }}">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="p-3" width="5%">No.</th>
|
||||
<th style="text-align: center;">Nama Pintu - <span class="fw-bold">(Shortcut)</span></th>
|
||||
{{-- <th style="text-align: center;">Mode Pintu</th> --}}
|
||||
{{-- <th style="text-align: center;">Grace Periode</th> --}}
|
||||
{{-- <th style="text-align: center;">Manless?</th> --}}
|
||||
<th style="text-align: center;">Pengaturan</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach ($vehicle as $kendaraan)
|
||||
<tr>
|
||||
{{-- {{ dd($kendaraan) }} --}}
|
||||
|
||||
<td class="text-center">{{ $loop->iteration }}</td>
|
||||
<label for="" type="hidden" value="{{ $kendaraan->id }}" ></label>
|
||||
{{-- <td class="text-center" width="7%">{{ $pintu->id }}</td> --}}
|
||||
<td>{{ $kendaraan->nama }} <strong> - ({{ $kendaraan->short_cut }})</strong></td>
|
||||
{{-- <td width="10%">
|
||||
</td> --}}
|
||||
{{-- <td class="text-center" width="7%"><span class="d-inline-block rounded-circle
|
||||
{{ $pintu->grace_period === 1 ? 'bg-success' : 'bg-danger' }}"
|
||||
style="width:12px;height:12px;">
|
||||
</span></td>
|
||||
<td class="text-center" width="7%"><span class="d-inline-block rounded-circle
|
||||
{{ $pintu->manless === 1 ? 'bg-success' : 'bg-danger' }}"
|
||||
style="width:12px;height:12px;">
|
||||
</span>
|
||||
</td> --}}
|
||||
<td class="text-center" width="12%">
|
||||
<a class="btn btn-warning btn-sm vehicle-price" id="vehicle-price" data-bs-toggle="modal" data-id="{{ $kendaraan->id}}" data-nama="{{ $kendaraan->nama}}" data-bs-target=".bd-price-modal-lg">Tarif</a>
|
||||
{{-- <button class="btn btn-primary btn-sm hardware-button" data-id="{{ $pintu->id }}" data-nama="{{ $pintu->nama }}">Hardware</button> --}}
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="d-flex justify-content-center align-items-center mt-2">
|
||||
<div>
|
||||
<button class="btn btn-primary btn-sm add-button" data-bs-toggle="modal" data-bs-target=".bd-example-modal-lg">Tambah</button>
|
||||
{{-- </div>
|
||||
<div id="rowActions" class="d-none"> --}}
|
||||
<button class="btn btn-warning btn-sm edit-button" id="btnEdit" data-bs-toggle="modal" data-bs-target=".bd-ubah-modal-lg">Tambah</button>
|
||||
<button class="btn btn-danger btn-sm" id="btnDelete">Hapus</button>
|
||||
<button class="btn btn-info btn-sm" id="btnDetail">Detail</button>
|
||||
</div>
|
||||
</div>
|
||||
<!-- ADD MEMMBER MODAL -->
|
||||
{{-- @include('stiker.tambah-stiker')
|
||||
@include('stiker.ubah-stiker') --}}
|
||||
<!-- END MEMMBER MODAL -->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-2">
|
||||
<!-- ADD MEMMBER MODAL -->
|
||||
@include('setup.vehicle.vehicleprice')
|
||||
{{-- @include('stiker.ubah-stiker') --}}
|
||||
<!-- END MEMMBER MODAL -->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
@section('javascript')
|
||||
<!--********* Scripts *********-->
|
||||
<!-- Datatable -->
|
||||
<!--********* Scripts *********-->
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.6.4/jquery.min.js"></script>
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery-validate/1.19.5/jquery.validate.js"></script>
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/metisMenu/3.0.7/metisMenu.min.js"></script>
|
||||
<script src="{{asset ('vendor/moment/moment.min.js') }}"></script>
|
||||
<script src="{{asset ('vendor/bootstrap-daterangepicker/daterangepicker.js') }}"></script>
|
||||
<script src="{{asset ('vendor/bootstrap-select/dist/js/bootstrap-select.min.js') }}"></script>
|
||||
<script src="{{asset ('vendor/sweetalert2/dist/sweetalert2.min.js') }}"></script>
|
||||
<script src="{{asset ('js/custom.min.js') }}"></script>
|
||||
<script src="{{asset ('js/dlabnav-init.js') }}"></script>
|
||||
<script src="{{asset ('js/member/index.js') }}"></script>
|
||||
{{-- <script src="{{asset ('js/setup/vehicle-price.js') }}"></script> --}}
|
||||
<script src="{{asset ('js/setup/vehicle.js') }}"></script>
|
||||
|
||||
@endsection
|
||||
@@ -0,0 +1,249 @@
|
||||
<div class="modal fade bd-price-modal-lg" id="modal-vehicle" tabindex="-1" role="dialog" data-bs-backdrop="static" data-keyboard="false">
|
||||
<div class="modal-dialog modal-lg modal-dialog-scrollable">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h4 class="card-title fw-bold title"></h4>
|
||||
<button type="button" class="btn-close" data-bs-dismiss="modal">
|
||||
</button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div class="custom-tab-1">
|
||||
<ul class="nav nav-tabs">
|
||||
<li class="nav-item">
|
||||
<a class="nav-link active" data-bs-toggle="tab" href="#tarif"><i class="la la-user me-2"></i>Umum</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" data-bs-toggle="tab" href="#profile1"><i class="la la-home me-2"></i>Tambahan</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" data-bs-toggle="tab" href="#contact1"><i class="la la-phone me-2"></i>Spesial</a>
|
||||
</li>
|
||||
</ul>
|
||||
<form class="tambah-member" id="show-tarif" action="">
|
||||
@csrf
|
||||
<div class="tab-content">
|
||||
<div class="tab-pane fade show active" id="tarif1" role="tabpanel">
|
||||
<div class="pt-4">
|
||||
<div class="row">
|
||||
<div class="col-xl-12">
|
||||
<h4>Grace Periode</h4>
|
||||
<input type="hidden" id="id_mobil" name="id_mobil" value="">
|
||||
<div class="d-flex align-items-center mb-2">
|
||||
{{-- <div class="row g-2 align-items-center mb-2"> --}}
|
||||
<label class="me-2 mb-0">
|
||||
Tarif untuk waktu kurang dari menit ke :
|
||||
</label>
|
||||
|
||||
{{-- <div class="col-6 col-md-2"> --}}
|
||||
<input type="number" class="form-control no-spinner" name="waktu_gratis" id="waktu_gratis" style="width:60px" value="1">
|
||||
{{-- </div> --}}
|
||||
<label class="me-2 ms-4 mb-0">
|
||||
Adalah :
|
||||
</label>
|
||||
|
||||
<input type="number" class="form-control no-spinner" id="tarif_period" name="tarif_period" style="width:100px" value="0">
|
||||
</div>
|
||||
<hr>
|
||||
<h4 class="fw-bold">Jam Pertama</h4>
|
||||
<div class="d-flex align-items-center mb-2">
|
||||
<label class="me-2 mb-0">Tarif</label>
|
||||
<input type="number" class="form-control no-spinner" id="frek_interval" name="frek_interval" style="width:60px" value="1">
|
||||
<label class="me-2 ms-4 mb-0">X</label>
|
||||
<input type="number me-6 ms-4" class="form-control no-spinner-time" id="interval" name="interval" style="width:65px" value="60">
|
||||
<label class="me-2 ms-4 mb-0">Menit Pertama adalah : </label>
|
||||
<input type="number" class="form-control no-spinner" id="tarif_interval" name="tarif_interval" style="width:100px" value="0">
|
||||
</div>
|
||||
<div class="d-flex align-items-center mb-2">
|
||||
<label class="me-2 mb-0">pembayaran dilakukan di : </label>
|
||||
<select class="form-select me-2 ms-4" name="bayar_dimuka" id="bayar_dimuka" style="width:200px" >
|
||||
<option value="1">Pintu Masuk</option>
|
||||
<option value="0">Pintu Keluar</option>
|
||||
</select>
|
||||
<label class="me-2 mb-0">Dengan nilai asuransi : </label>
|
||||
<input type="number" class="form-control no-spinner" name="asuransi_incl" name="asuransi_incl" style="width:100px" value="0">
|
||||
</div>
|
||||
<hr>
|
||||
<h4 class="fw-bold">Jam Berikutnya</h4>
|
||||
<div class="d-flex align-items-center mb-2">
|
||||
<label class="me-2 mb-0">Tarif</label>
|
||||
<input type="number" class="form-control no-spinner" id="frek_waktu2" name="frek_waktu2" style="width:60px" value="1">
|
||||
<label class="me-2 ms-4 mb-0">X</label>
|
||||
<input type="number" class="form-control no-spinner-time" id="waktu2" name="waktu2" style="width:65px" value="60">
|
||||
<label class="me-2 ms-4 mb-0">Menit Berikutnya adalah : </label>
|
||||
<input type="number" class="form-control no-spinner" id="tarif2" name="tarif2" style="width:100px" value="0">
|
||||
</div>
|
||||
<div class="d-flex align-items-center mb-2">
|
||||
<label class="me-2 ms-4 mb-0">dan/atau Tarif Berikutnya adalah : </label>
|
||||
<input type="number" class="form-control no-spinner" id="tarif" name="tarif" style="width:100px" value="0">
|
||||
<label class="me-2 ms-4 mb-0">Per </label>
|
||||
<input type="number" class="form-control no-spinner-time" id="waktu_tarif" name="waktu_tarif" style="width:60px" value="60">
|
||||
<label class="me-2 ms-4 mb-0">Menit </label>
|
||||
</div>
|
||||
<hr>
|
||||
<h4 class="fw-bold">Tarif Maksimum</h4>
|
||||
<div class="d-flex align-items-center mb-2">
|
||||
<label class="me-2 mb-0">Tarif Maksimum adalah </label>
|
||||
<input type="number" class="form-control no-spinner" id="maksimum" name="maksimum" style="width:100px" value="1000">
|
||||
<label class="me-2 ms-4 mb-0">Per</label>
|
||||
<input type="number" class="form-control no-spinner-time" id="maks_cond" name="maks_cond" style="width:65px" value="24">
|
||||
<select class="form-select me-2 ms-4 no-spinner" name="maksimum-cond" id="maksimum-cond" style="width:100px" >
|
||||
<option value="0">Jam</option>
|
||||
<option value="1">Hari</option>
|
||||
</select>
|
||||
<label class="me-2 ms-4 mb-0 maks_cond_day">Minimum Menit : </label>
|
||||
<input type="number" class="form-control no-spinner-time" id="maks_cond_day" name="maks_cond_day" style="width:75px" value="24">
|
||||
</div>
|
||||
<hr>
|
||||
<h4 class="fw-bold">Denda Tiket</h4>
|
||||
<div class="d-flex align-items-center">
|
||||
<label class="me-2 mb-0">Denda Tiket Hilang untuk </label>
|
||||
<label class="me-2 mb-0 ms-4">Casual : </label>
|
||||
<input type="number" class="form-control no-spinner tes" name="denda" id="denda" value="10000">
|
||||
<label class="me-2 ms-4 mb-0">Member : </label>
|
||||
<input type="number" class="form-control no-spinner tes" id="denda_member" name="denda_member" value="60">
|
||||
</div>
|
||||
<hr>
|
||||
<div class="d-flex align-items-center">
|
||||
<input class="form-check-input" type="checkbox">Denda Hanya Berlaku Bagi Kendaaran Casual/Umum </input>
|
||||
</div>
|
||||
<div class="d-flex align-items-center mb-2">
|
||||
<input class="form-check-input" type="checkbox">Denda Tidak Memperhitungkan Lama Parkir</input>
|
||||
</div>
|
||||
</div>
|
||||
{{-- <div class="col-xl-6">
|
||||
<div class="mb-3 row">
|
||||
<label class="col-lg-3 col-form-label form-label">Jenis</label>
|
||||
<div class="col-lg-6">
|
||||
<select class="select-data form-control" name="member" id="member">
|
||||
<option selected value="">Pilih Jenis</option>
|
||||
@foreach ($memberSelect as $member)
|
||||
<option value="{{ $member->id }}">{{ $member->nama }}</option>
|
||||
@endforeach
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="mb-3 row">
|
||||
<label class="col-lg-3 col-form-label form-label">Dept</label>
|
||||
<div class="col-lg-6">
|
||||
<select class="select-data form-control" name="depart" id="department">
|
||||
<option selected value="">Pilih Departemen</option>
|
||||
@foreach ($departmentSelect as $department)
|
||||
<option value="{{ $department->kode }}">{{ $department->nama }}</option>
|
||||
@endforeach
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="mb-3 row">
|
||||
<label class="col-lg-3 col-form-label form-label">Note :</label>
|
||||
<div class="col-lg-6">
|
||||
<input type="text" class="form-control" name="note" placeholder="Catatan...">
|
||||
</div>
|
||||
</div>
|
||||
<div class="mb-3 row">
|
||||
<label class="col-lg-3 col-form-label form-label">Harga (Rp.):</label>
|
||||
<div class="col-lg-6">
|
||||
<input type="text" class="form-control" name="harga" placeholder="10.000">
|
||||
</div>
|
||||
</div>
|
||||
<div class="mb-3 row">
|
||||
<label class="col-lg-3 col-form-label form-label required">Best Skill</label>
|
||||
<div class="col-lg-6">
|
||||
<select class="default-select wide form-control" id="validationCustom05">
|
||||
<option data-display="Select">Please select</option>
|
||||
<option value="html">HTML</option>
|
||||
<option value="css">CSS</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</div> --}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="tab-pane fade" id="profile1">
|
||||
{{-- <div class="pt-4">
|
||||
<h4>Tambahkan Kendaraan</h4>
|
||||
<div class="row form-material">
|
||||
<div class="col-xl-3 col-md-6 mb-3">
|
||||
<label class="form-label">Nomer Polisi</label>
|
||||
<input type="text" class="form-control nopol-add" onkeyup="this.value = this.value.toUpperCase();" placeholder="No. Polisi">
|
||||
<div class="invalid-feedback">Nomer Polisi sudah ada</div>
|
||||
</div>
|
||||
<div class="col-xl-3 col-md-6 mb-3">
|
||||
<label class="form-label">Jenis Kendaraan :</label>
|
||||
<select class="select form-control" id="jenisVehicle">
|
||||
<option selected value="">Jenis Kendaraan</option>
|
||||
@foreach ($vehicleSelect as $kendaraan)
|
||||
<option value="{{ $kendaraan->id }}">{{ $kendaraan->nama }}</option>
|
||||
@endforeach
|
||||
</select>
|
||||
</div>
|
||||
<div class="col-xl-3 col-md-6 mb-3">
|
||||
<label class="form-label">Jenis Member :</label>
|
||||
<select class="select-data form-control member" id="jenis-member">
|
||||
</select>
|
||||
</div>
|
||||
<div class="col-xl-3 col-md-6 mb-3">
|
||||
<label class="form-label">Merk : </label>
|
||||
<input type="text" class="form-control merk" onkeyup="this.value = this.value.toUpperCase();" placeholder="Honda...">
|
||||
</div>
|
||||
<div class="col-xl-3 col-md-6 mb-3">
|
||||
<label class="form-label"></label>
|
||||
<button type="button" id="nopol-add" class="btn btn-primary btn-xs">Tambah</button>
|
||||
</div>
|
||||
<hr>
|
||||
<table class="table-bordered table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="col-2 text-center p-2">Nomer Polisi</th>
|
||||
<th class="col-2 text-center">Jenis Kendaraan</th>
|
||||
<th class="col-2 text-center">Merk Kendaraan</th>
|
||||
<th class="col-2 text-center">Type Member</th>
|
||||
<th class="col-2 text-center">Aksi</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody id="list-nopol">
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div> --}}
|
||||
</div>
|
||||
<div class="tab-pane fade" id="contact1">
|
||||
{{-- <div class="pt-4">
|
||||
<h4>Tambahkan Kartu</h4>
|
||||
<div class="row form-material">
|
||||
<div class="col-xl-6 col-md-6 mb-3">
|
||||
<label class="form-label">Nomer Kartu</label>
|
||||
<input type="text" class="form-control kartu" placeholder="01234567...">
|
||||
</div>
|
||||
<div class="col-xl-6 col-md-6 mb-3">
|
||||
<label class="form-label">Nomer Urut</label>
|
||||
<input type="text" class="form-control nourut" placeholder="01234567...">
|
||||
</div>
|
||||
<hr>
|
||||
<div class="table-responsive">
|
||||
<table class="table-bordered">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="col-5 text-center p-2" >Nomer Kartu</th>
|
||||
<th class="col-5 text-center">No. Urut</th>
|
||||
<th class="col-2 text-center">Aksi</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody id="list-card">
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div> --}}
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-primary simpan" data-url="{{ route('vehicle.update', ':id') }}">Save changes</button>
|
||||
<button type="button" class="btn btn-danger light" data-bs-dismiss="modal">Close</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
+12
-4
@@ -6,6 +6,7 @@
|
||||
use App\Http\Controllers\Api\V1\DisplayContentController;
|
||||
use App\Http\Controllers\Api\V1\LaporanController;
|
||||
use App\Http\Controllers\Api\V1\MemberinController;
|
||||
use App\Http\Controllers\Api\V1\ParkingOperationController;
|
||||
use App\Http\Controllers\Api\V1\TransaksiMember;
|
||||
use App\Http\Controllers\Api\V1\TransaksiParkir;
|
||||
|
||||
@@ -26,6 +27,13 @@
|
||||
|
||||
Route::get('location', [ConfigParameter::class, 'index']);
|
||||
|
||||
Route::prefix('v1')->group(function () {
|
||||
Route::prefix('operation')->group(function () {
|
||||
// Route::get('transaksiparkir/{id}', ParkingOperationController::class, 'inde');
|
||||
Route::resource('transaksiparkir', ParkingOperationController::class);
|
||||
});
|
||||
});
|
||||
|
||||
Route::prefix('transaksi')->group(function () {
|
||||
Route::get('stiker/telusuri', [TransaksiMember::class, 'status']);
|
||||
Route::resource('stiker', TransaksiMember::class);
|
||||
@@ -35,11 +43,11 @@
|
||||
Route::resource('member', MemberinController::class)->names('memberin');
|
||||
|
||||
Route::prefix('report')->group(function () {
|
||||
Route::post('harian', [LaporanController::class, 'harian']);
|
||||
Route::post('payment', [LaporanController::class, 'payment']);
|
||||
Route::post('harian', [LaporanController::class, 'harian']);
|
||||
Route::post('payment', [LaporanController::class, 'payment']);
|
||||
Route::post('operator', [LaporanController::class, 'operator']);
|
||||
Route::post('gate', [LaporanController::class, 'gate']);
|
||||
Route::post('daily', [LaporanController::class, 'daily']);
|
||||
Route::post('gate', [LaporanController::class, 'gate']);
|
||||
Route::post('daily', [LaporanController::class, 'daily']);
|
||||
});
|
||||
|
||||
Route::prefix('display')->group(function () {
|
||||
|
||||
@@ -18,6 +18,8 @@
|
||||
use App\Http\Controllers\StikerController;
|
||||
use App\Http\Controllers\StreamerController;
|
||||
use App\Http\Controllers\FrontOffice\FrontOfficeController;
|
||||
use App\Http\Controllers\Http\Setup\Vehicle\MasterVehicleController;
|
||||
use App\Http\Controllers\Http\Setup\Vehicle\ModifiedVehiclepriceController;
|
||||
use App\Http\Controllers\Tools\StikerExtendedController;
|
||||
use App\Http\Controllers\Tools\TransactionChangeController;
|
||||
use App\Http\Controllers\VerifyTransController;
|
||||
@@ -57,6 +59,8 @@
|
||||
Route::resource('gate', MasterGateController::class);
|
||||
Route::resource('gate-details', MasterGateParameterController::class);
|
||||
Route::resource('gate-hardware', MasterGateHardwareController::class)->names('hardware');
|
||||
Route::resource('vehicle', MasterVehicleController::class);
|
||||
Route::resource('price', ModifiedVehiclepriceController::class)->names('vehicle');
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user