fasa2lelong
This commit is contained in:
@@ -187,27 +187,6 @@
|
||||
|
||||
});
|
||||
|
||||
var channel2 = pusher.subscribe('notice-notify');
|
||||
channel2.bind('trigger-notify', function(data) {
|
||||
if(cawangankhazanah == data.cawangan)
|
||||
{
|
||||
if(data.status == 'max')
|
||||
{
|
||||
$("#notify-maksimum").removeClass("d-none");
|
||||
$("#notify-maksimum").addClass("d-block");
|
||||
$("#value-maksimum").text('RM ' + data.bakipetibesi);
|
||||
}
|
||||
|
||||
if(data.status == 'min')
|
||||
{
|
||||
$("#notify-minimum").removeClass("d-none");
|
||||
$("#notify-minimum").addClass("d-block");
|
||||
$("#value-minimum").text('RM ' + data.bakipetibesi);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
$("#navbarDropdown").click(function(){
|
||||
$('#bell').css("color", "grey");
|
||||
});
|
||||
@@ -332,14 +311,27 @@
|
||||
|
||||
|
||||
</nav>
|
||||
{{-- {{ dd(session()->has('status')) }} --}}
|
||||
<div id="notify-maksimum" style="z-index: 1" class="alert {!! (session()->has('status')) ? (session()->get('status') == 'max') ? 'd-block' : 'd-none' : 'd-none' !!} alert-warning sticky-top text-center" role="alert">
|
||||
Baki peti besi anda sekarang adalah <b id="value-maksimum"></b> dan melebihi had maksimum peti besi. Sila buat permohonan bayaran balik segera!
|
||||
</div>
|
||||
<div id="notify-minimum" style="z-index: 1" class="alert {!! (session()->has('status')) ? (session()->get('status') == 'min') ? 'd-block' : 'd-none' : 'd-none' !!} alert-danger sticky-top text-center" role="alert">
|
||||
Baki peti besi anda sekarang adalah <b id="value-minimum"></b> dan melebihi had minimum peti besi. Sila buat permohonan wang segera!
|
||||
</div>
|
||||
|
||||
@if ($auth_user['roles'] == 'ppc' || $auth_user['roles'] == 'pc')
|
||||
|
||||
@php
|
||||
$current = Carbon\Carbon::now();
|
||||
$tarikhsemasa = $current->toDateString();
|
||||
|
||||
$cawangan = App\CawanganAR::where('kodcaw',$auth_user['cawangan'])->get()->toArray();
|
||||
$getVault = Http::withOptions(['verify' => config('app.api_verify')])->get(config('api.url').'/api/TunaiDiTangan/' . $auth_user['cawangan'],['tarikh' => $tarikhsemasa])->json();
|
||||
@endphp
|
||||
@if(floatval($getVault) > $cawangan[0]['max'])
|
||||
<div id="notify-maksimum" style="z-index: 1" class="alert alert-warning sticky-top text-center" role="alert">
|
||||
Baki peti besi anda sekarang adalah <b>RM{{ number_format($getVault,2) }}</b> dan melebihi had maksimum peti besi. Sila buat permohonan bayaran balik segera!
|
||||
</div>
|
||||
@elseif(floatval($getVault) < $cawangan[0]['min'])
|
||||
<div id="notify-minimum" style="z-index: 1" class="alert alert-danger sticky-top text-center" role="alert">
|
||||
Baki peti besi anda sekarang adalah <b>RM{{ number_format($getVault,2) }}</b> dan melebihi had minimum peti besi. Sila buat permohonan wang segera!
|
||||
</div>
|
||||
@else
|
||||
@endif
|
||||
@endif
|
||||
|
||||
<main class="py-4">
|
||||
@yield('content')
|
||||
</main>
|
||||
|
||||
Reference in New Issue
Block a user