added cawangan block by array

This commit is contained in:
hafifierahman
2024-12-30 20:16:05 +08:00
12 changed files with 171 additions and 111 deletions
+48 -31
View File
@@ -12,7 +12,7 @@
<div class="container">
<div class="row justify-content-center">
<div class="col-md-12 col-lg-12">
<div class="card">
<nav aria-label="breadcrumb">
<ol class="breadcrumb pb-3">
<li class="breadcrumb-item"><a href="{{ route('home') }}">Home</a></li>
@@ -89,10 +89,8 @@
</div>
</div>
<div class="col-md-6">
<div class="form-group row">
<div class="form-group row">
<div class="col-md-4">
<b>No Telefon</b>
</div>
@@ -119,32 +117,50 @@
</div>
</div>
</div>
<div class="col-md-12 mt-md-3 justify-content-between form-group row">
<div class="btn-group btn-group-toggle col-md-6" data-toggle="buttons">
<label class="btn btn-primary">
<input type="radio" name="options" id="option1" value="belum_tebus" autocomplete="off" checked>Pembiayaan Belum Selesai
</label>
<label class="btn btn-primary">
<input type="radio" name="options" id="option2" value="sudah_tebus" autocomplete="off">Pembiayaan Sudah Selesai
</label>
<label class="btn btn-primary">
<input type="radio" name="options" id="option3" value="lelong" autocomplete="off">Lelong
</label>
</div>
<div class='col-md-3'>
<button class='btn btn-primary' data-toggle="modal" data-target="#customer_detail">Maklumat Pelanggan</button>
</div>
@if(config('redeemoption.enable_specific_block') == 0 || Auth::user()->cawangan !== config('redeemoption.cawangan_block'))
<div class="col-md-3 text-right">
<a class="btn btn-primary" style="margin-right:-50px" id="daftar_gadai">Daftar Pembiayaan</a>
</div>
@endif
</div>
</div>
<div class="card">
<!-- footer card -->
<div class="mr-4 form-group d-flex justify-content-end">
<button class="btn btn-primary button-spacing" data-toggle="modal" data-target="#customer_detail">Maklumat Pelanggan</button>
</div>
</div>
</div>
<!-- button -->
<div class="col-md-10 mt-md-2 justify-content-between form-group row">
<div class="btn-group btn-group-toggle d-flex flex-fill" data-toggle="buttons">
<label class="btn btn-secondary flex-fill">
<input type="radio" name="options" id="option1" value="belum_tebus" autocomplete="off" checked>
Pembiayaan Belum Selesai
</label>
<label class="btn btn-secondary flex-fill">
<input type="radio" name="options" id="option2" value="sudah_tebus" autocomplete="off">
Pembiayaan Sudah Selesai
</label>
<label class="btn btn-secondary flex-fill">
<input type="radio" name="options" id="option3" value="lelong" autocomplete="off">
Lelong
</label>
</div>
</div>
<!-- card -->
<div class="col-md-12 col-lg-12">
<div class="card">
<div class="card-body">
<nav class="mb-3">
<!-- button -->
<div class="mr-2 form-group d-flex justify-content-end">
@if(!in_array(Auth::user()->cawangan, config('redeemoption.cawangan_block', [])))
<a class="btn btn-primary button-spacing" id="daftar_gadai">Daftar Pembiayaan</a>
@endif
</div>
<div class="nav nav-tabs" id="nav-tab" role="tablist">
@php
$activate_tab = request()->session()->pull('activate_tab', 'SAG_lama');
@@ -256,6 +272,7 @@
</div>
</div>
</div>
</div>
<!-- Modal -->
<div class="modal fade" id="customer_detail" tabindex="-1" aria-labelledby="customer_detailLabel" aria-hidden="true">
@@ -1619,7 +1636,7 @@
});
}
function ubahPembiayaanSemulaErrorHandling()
async function ubahPembiayaanSemulaErrorHandling()
{
let selected = document.querySelector('#navtawarruqdannottawarruq input[type="radio"][name="belum"]:checked')
@@ -1640,7 +1657,7 @@
return true;
}
let isPS = checkPS(selected.value)
let isPS = await checkPS(selected.value)
if(isPS === true){
Swal.fire({
@@ -1655,9 +1672,9 @@
return false;
}
function ubahfunc(e){
async function ubahfunc(e){
let isError = ubahPembiayaanSemulaErrorHandling()
let isError = await ubahPembiayaanSemulaErrorHandling()
if(isError){
return;
}