notis_call function

This commit is contained in:
nishaMuhd
2024-01-14 14:11:05 +08:00
parent 06396e236c
commit 5e19ec952d
6 changed files with 1060 additions and 2 deletions
@@ -0,0 +1,328 @@
@extends('layouts.app_callcenter')
<style>
.radiostyle .radio-green {
background-color: #27ae60;
color: white;
box-shadow: 5px 10px #888888;
width: 200px;
margin-right: 5px;
transition: 0.5s ease;
}
.radiostyle .radio-red {
background-color: #e74c3c;
color: white;
width: 200px;
margin-right: 5px;
box-shadow: 5px 10px #888888;
transition: 0.5s ease;
}
.radiostyle .radio-yellow {
background-color: #3498db;
color: white;
width: 200px;
margin-right: 5px;
box-shadow: 5px 10px #888888;
transition: 0.5s ease;
}
.radiostyle .radio-green:hover {
box-shadow: 5px 5px #888888;
}
.radiostyle .radio-red:hover {
box-shadow: 5px 5px #888888;
}
.radiostyle .radio-yellow:hover {
box-shadow: 5px 5px #888888;
}
.radiostyle .radio-green input[type="radio"]:checked {
box-shadow: 5px 10px #888888;
}
.radiostyle .radio-yellow input[type="radio"]:checked {
box-shadow: 5px 10px #888888;
}
.radiostyle .radio-red input[type="radio"]:checked {
box-shadow: 5px 10px #888888;
}
</style>
<style>
#details {
font-family: Arial, Helvetica, sans-serif;
border-collapse: collapse;
width: 100%;
}
#details td,
#details th {
padding: 8px;
font-size: 12px;
}
#details tr:nth-child(even) {
background-color: #ffffff;
}
#details tr:hover {
background-color: #ddd;
}
#details th {
padding-top: 12px;
font-style: bold;
padding-bottom: 12px;
text-align: left;
padding: 4px;
color: black;
}
</style>
@section('content')
<div class="container-fluid">
<div class="row">
<div class="col-md-12">
<div class="card">
<nav aria-label="breadcrumb">
<ol class="breadcrumb pb-3">
<li class="breadcrumb-item"><a href="{{ route('home') }}">Home</a></li>
<li class="breadcrumb-item"><a href="{{ route('arcc.notisperingatankedua') }}">Notis Peringatan Kedua</a></li>
<li class="breadcrumb-item"><a href="{{ route('arcc.rekodnotisperingatankedua') }}">Rekod Notis Peringatan Kedua</a></li>
<li class="breadcrumb-item active" aria-current="page">Mengikut Cawangan</li>
<li class="breadcrumb-item active" aria-current="page">{{$cawangan_info['details_caw']}}</li>
<li class="breadcrumb-item active" aria-current="page">Notis JBG</li>
</ol>
</nav>
<div class="card-body text-center">
<div class="row form-group">
<div class="col-md-2">
</div>
<div class="col-md-10">
</div>
</div>
@if ($message = Session::get('success'))
<div class="alert alert-success">
<p>{{ $message }}</p>
</div>
@elseif ($message = Session::get('failed'))
<div class="alert alert-danger">
<p>{{ $message }}</p>
</div>
@endif
<div class="container-fluid">
<form id="exportpdf" action="" target="_blank" method="POST">
@csrf
<input type="hidden" name="type" id="typedonwload" value="">
<input type='hidden' name="radaktif" value="aktif">
<input type='hidden' name="notisid" value="{{$notisid}}">
<input type='hidden' name="kodcaw" value="{{$kodcaw}}">
<table class="table table-striped table-hover" id="details">
<thead>
<th>Bil</th>
<th>Status</th>
<th>Nama</th>
<th>No. KP</th>
<th>No. Telefon</th>
<th>Norujukan</th>
<th>Tempoh</th>
<th>Baki Pembiayaan (RM)</th>
<th>Keuntungan 6Bulan (RM)</th>
<th>Amaun Telah Bayar (RM)</th>
<th>Keuntungan Semasa (RM)</th>
<th>Tarikh Matang</th>
<th>Tarikh Tamat Kontrak</th>
<th>Tarikh Panggilan</th>
<th>Nota</th>
<th>Tindakan</th>
</thead>
@php
$counter = 1;
$totalpinjaman = 0;
@endphp
@foreach ($bycawnotisjbg['rekod'] as $index => $item)
@php
$totalpinjaman += $item['listsag'][0]['pinjaman'];
if ($item['listnotis'][0]['statuscall'] == 0) {
$status = 'Belum Hubungi';
} elseif ($item['listnotis'][0]['statuscall'] == 1) {
$status = 'Berjaya Hubungi';
} else {
$status = 'Tidak Dapat Hubungi';
}
$nota = $item['listnotis'][0]['remark1'];
@endphp
<tr>
<td>{{ $loop->iteration }}</td>
<td style="white-space: nowrap">{{ $status ?? '-' }}</td>
<td style="white-space: nowrap;">{{ $item['info']['nama'] ?? '-' }}</td>
@php
$nokp = $item['info']['kpbaru'] ?? $item['info']['kplama'];
@endphp
<td>{{ $nokp }}<input type="hidden" name="nokp[]" value="{{ $nokp }}"></td>
<td>{{ $item['info']['telefon'] ?? '-' }}<input type="hidden" name="telefon[]" value="{{ $item['info']['telefon'] ?? ''}}"></td>
<td style="white-space: nowrap;">@foreach($item['listsag'] as $item1){{ $item1['norujukan']}}<br>@endforeach</td>
<td>@foreach($item['listsag'] as $item1){{ $item1['jbg']}}<br>@endforeach</td>
<td align='right' style="white-space: nowrap;">@foreach($item['listsag'] as $item1){{number_format($item1['bakipjm'], 2, '.', ',')}}<br>@endforeach</td>
<td align='right' style="white-space: nowrap;">@foreach($item['listsag'] as $item1){{number_format($item1['bakiupah'], 2, '.', ',')}}<br>@endforeach</td>
<td align='right' style="white-space: nowrap;">@foreach($item['listsag'] as $item1){{number_format($item1['hargajualan']-$item1['bakihargajualan'], 2, '.', ',')}}<br>@endforeach</td>
<td align='right' style="white-space: nowrap;">@foreach($item['listsag'] as $item1){{number_format($item1['keuntungan'], 2, '.', ',')}}<br>@endforeach<br></td>
<td align='right' style="white-space: nowrap;"><b> @foreach($item['listsag'] as $item1)
@if($item1['t_matang'] == null)
@else
@php
$myDateTime = DateTime::createFromFormat('Y-m-d', $item1['t_matang']);
$formattedtmatang = $myDateTime->format('d-m-Y');
echo($formattedtmatang);
@endphp
@endif
<br>
@endforeach
<br>
</b></td>
<td align='right' style="white-space: nowrap;"><b> @foreach($item['listsag'] as $item1)
@if($item1['t_matang1'] == null)
@else
@php
$myDateTime = DateTime::createFromFormat('Y-m-d', $item1['t_matang1']);
$formattedtmatang1 = $myDateTime->format('d-m-Y');
echo($formattedtmatang1);
@endphp
@endif
<br>
@endforeach
<br>
</b></td>
<td align='right' style="white-space: nowrap;"><b> @foreach($item['listnotis'] as $item1)
@if($item1['tarikhcall1'] == null)
@else
@php
$myDateTime = DateTime::createFromFormat('Y-m-d', $item1['tarikhcall1']);
$formattedweddingdate = $myDateTime->format('d-m-Y');
echo($formattedweddingdate);
@endphp
@endif
<br>
@endforeach
<br>
</b></td>
<td align="left">{{$nota ?? ' '}}</td>
<!-- <td style="white-space: nowrap;"><a href="{{ route('arcc.detsagcallbyjbg2', [ 'kodcaw' => $kodcaw, 'notisid' => $notisid, 'nokp' => $item['nokp'] ]) }}" class="btn btn-info text-white">Hubungi</a></td> -->
<td>
@if ($item['listnotis'][0]['statuscall'] == 0 || $item['listnotis'][0]['statuscall'] == 9)
<a href="{{ route('arcc.detsagcallbyjbg2', [ 'kodcaw' => $kodcaw, 'notisid' => $notisid, 'nokp' => $nokp ]) }}" class="btn btn-info text-white">Hubungi</a>
<!-- <td style="white-space: nowrap;"><button type="button" style="margin:auto" class="btn btn-primary" onclick="callcustomer()">Hubungi</td> -->
@else
-
@endif
</td>
</tr>
@php $counter++; @endphp
@endforeach
</table>
</form>
</div>
</div>
</div>
</div>
</div>
</div>
<script>
var tablelelongbid = $('#details').DataTable({
"columnDefs": [{
"targets": 0,
"target": '_blank',
"orderable": false
},
{
"targets": 5,
"orderable": false
}
],
// order: [[1, 'asc']],
// // "ordering": false,
"info": false,
"lengthChange": false,
"pageLength": 9999999,
dom: 'Bfrtip',
buttons: [
// {
// className: 'btn btn-outline-success pl-4 pr-4 btn-sm export',
// target: "_blank",
// titleAttr: 'Export to Excel',
// text: '<h8><b>EXCEL</b></h8>',
// action: function ( e, dt, node, config ) {
// $('#typedonwload').val('excel');
// $("#exportpdf").submit();
// // window.open("_blank");
// }
// },
// {
// className: 'btn btn-outline-danger pl-4 pr-4 btn-sm export',
// titleAttr: 'Export to PDF',
// text: '<h8><b>PDF</b></h8>',
// action: function ( e, dt, node, config ) {
// $('#typedonwload').val('pdf');
// $("#exportpdf").submit();
// }
// },
// {
// className: 'btn btn-outline-info pl-4 pr-4 btn-sm export',
// target: "_blank",
// titleAttr: 'Blast Whatsapp',
// text: '<h8><b>WHATSAPP & SMS</b></h8>',
// action: function ( e, dt, node, config ) {
// // $('#typedonwload').val('whatsapp');
// // $("#exportpdf").submit();
// $("#exportpdf").click(function() {
// $('[data-toggle="tooltip"]').tooltip()
// alert("ADAKAH ANDA PASTI?");
// $('#typedonwload').val('whatsapp');
// $("#exportpdf").submit();
// });
// }
// }
]
});
$('.export').tooltip();
$('.export').removeClass('dt-button');
</script>
@endsection
@@ -0,0 +1,296 @@
@extends('layouts.app_callcenter')
@section('content')
<div class="container-fluid">
<div class="row justify-content-center">
<div class="col-md-12 col-lg-12">
<nav aria-label="breadcrumb">
<ol class="breadcrumb pb-3">
<li class="breadcrumb-item"><a href="{{ route('home') }}">Home</a></li>
<li class="breadcrumb-item"><a href="{{ route('arcc.notisperingatankedua') }}">Notis Peringatan Kedua</a></li>
<li class="breadcrumb-item"><a href="{{ route('arcc.rekodnotisperingatankedua') }}">Rekod Notis Peringatan Kedua</a></li>
<li class="breadcrumb-item active" aria-current="page">Mengikut Cawangan</li>
<li class="breadcrumb-item active" aria-current="page">{{$cawangan_info['details_caw']}}</li>
<li class="breadcrumb-item active" aria-current="page">Notis JBG</li>
</ol>
</nav>
<form id="kemaskiniform" action="" target="_blank" method="POST">
@csrf
<input type="hidden" name="type" id="typedonwload" value="">
<input type='hidden' name="radaktif" value="aktif">
<input type='hidden' name="notisid" id="notisid" value="{{$notisid}}">
<input type='hidden' name="kodcaw" id="kodcaw" value="{{$kodcaw}}">
<input type='hidden' name="nokp" id="nokp" value="{{$nokp}}">
<div class="form-group row col-md-12">
<div class="col-md-6">
<div class="form-group row">
<div class="col-md-4">
<b>Nama</b>
</div>
<div class="col-md-8">
<input type="text" class="form-control" name="name" id="name" readonly value="{{ $bysagnotisjbgCustomer['nama'] }}">
</div>
</div>
</div>
<div class="col-md-6">
<div class="form-group row">
<div class="col-md-4">
<b>No Kad Pengenalan</b>
</div>
<div class="col-md-8">
@php
if($bysagnotisjbgCustomer['kpbaru'] != null){
$noic = $bysagnotisjbgCustomer['kpbaru'];
}else{
$noic = $bysagnotisjbgCustomer['kplama'];
}
@endphp
<input type="text" class="form-control" name="noic" id="noic" readonly value="{{ $noic }}">
</div>
</div>
</div>
<div class="col-md-6">
<div class="form-group row">
<div class="col-md-4">
<b>No Telefon</b>
</div>
<div class="col-md-8">
<input type="text" class="form-control" name="telefon" id="telefon" readonly value="{{ $bysagnotisjbgCustomer['telefon'] ? $bysagnotisjbgCustomer['telefon'] : '' }}">
</div>
</div>
<div class="form-group row">
<div class="col-md-4">
<b>Status Panggilan</b>
</div>
<div class="col-md-7">
<select name="statuscall" class="form-control" id="statuscall">
@foreach ($bysagnotisjbg['getstatusremark'] as $index => $remark)
@if ($remark['statuscall'] == 0)
<option value="0" selected>Belum Hubungi</option>
<option value="1">Berjaya Hubungi</option>
<option value="9">Tidak Dapat Hubungi</option>
@elseif($remark['statuscall'] == 1)
<option value="0" >Belum Hubungi</option>
<option value="1" selected>Berjaya Hubungi</option>
<option value="9">Tidak Dapat Hubungi</option>
@else
<option value="0" >Belum Hubungi</option>
<option value="1">Berjaya Hubungi</option>
<option value="9" selected>Tidak Dapat Hubungi</option>
@endif
@endforeach
</select>
</div>
</div>
</div>
<div class="col-md-6">
<div class="form-group row">
<div class="col-md-4">
<b>Alamat </b>
</div>
<div class="col-md-8">
<input type="text" class="form-control" name="alamat" id="alamat" readonly value="{{$bysagnotisjbgCustomer['alamat1'] }}">
</div>
</div>
<div class="form-group row">
<div class="col-md-4">
<b>Nota</b>
</div>
<div class="col-md-8">
@foreach($bysagnotisjbg['getstatusremark'] as $index => $remark)
<textarea type="text" class="form-control" name="remark" id="remark">{{ $remark['remark1'] }}</textarea>
@endforeach
</div>
</div>
</div>
</div>
<div class="card">
<div class="card-body">
<div class="container-fluid">
<table class="table table-striped table-hover" id="details">
<thead>
<th>Bil</th>
<!-- <th>Status</th> -->
<th>Norujukan</th>
<th>Tempoh</th>
<th>Baki Pembiayaan (RM)</th>
<th>Keuntungan 6Bulan (RM)</th>
<th>Amaun Telah Bayar (RM)</th>
<th>Keuntungan Semasa (RM)</th>
<th>Tarikh Matang</th>
<th>Tarikh Tamat Kontrak</th>
<th>Tarikh Panggilan</th>
<th>Nota</th>
</thead>
@php
$counter = 1;
$totalpinjaman = 0;
@endphp
@foreach ($bysagnotisjbg['rekodnotis'] as $index => $item)
@php
$totalpinjaman += $item['listsag'][0]['pinjaman'];
if ($item['listnotis'][0]['tarikhcall1'] == null) {
$status = 'Belum';
} else {
$status = 'Selesai';
}
@endphp
<tr>
<td>@foreach($item['listsag'] as $item1){{ $loop->iteration }}<br>@endforeach</td>
<!-- <td style="white-space: nowrap">{{ $status ?? '-' }}</td> -->
<td style="white-space: nowrap;">@foreach($item['listsag'] as $item1){{ $item1['norujukan']}}<br>@endforeach</td>
<td>@foreach($item['listsag'] as $item1){{ $item1['jbg']}}<br>@endforeach</td>
<td align='right' style="white-space: nowrap;">@foreach($item['listsag'] as $item1){{number_format($item1['bakipjm'], 2, '.', ',')}}<br>@endforeach</td>
<td align='right' style="white-space: nowrap;">@foreach($item['listsag'] as $item1){{number_format($item1['bakiupah'], 2, '.', ',')}}<br>@endforeach</td>
<td align='right' style="white-space: nowrap;">@foreach($item['listsag'] as $item1){{number_format($item1['hargajualan']-$item1['bakihargajualan'], 2, '.', ',')}}<br>@endforeach</td>
<td align='right' style="white-space: nowrap;">@foreach($item['listsag'] as $item1){{number_format($item1['keuntungan'], 2, '.', ',')}}<br>@endforeach<br></td>
<td align='right' style="white-space: nowrap;"><b> @foreach($item['listsag'] as $item1)
@if($item1['t_matang'] == null)
@else
@php
$myDateTime = DateTime::createFromFormat('Y-m-d', $item1['t_matang']);
$formattedtmatang = $myDateTime->format('d-m-Y');
echo($formattedtmatang);
@endphp
@endif
<br>
@endforeach
<br>
</b></td>
<td align='right' style="white-space: nowrap;"><b> @foreach($item['listsag'] as $item1)
@if($item1['t_matang1'] == null)
@else
@php
$myDateTime = DateTime::createFromFormat('Y-m-d', $item1['t_matang1']);
$formattedtmatang1 = $myDateTime->format('d-m-Y');
echo($formattedtmatang1);
@endphp
@endif
<br>
@endforeach
<br>
</b></td>
<td align='right' style="white-space: nowrap;"><b> @foreach($item['listnotis'] as $item1)
@if($item1['tarikhcall1'] == null)
@else
@php
$myDateTime = DateTime::createFromFormat('Y-m-d', $item1['tarikhcall1']);
$formattedweddingdate = $myDateTime->format('d-m-Y');
echo($formattedweddingdate);
@endphp
@endif
<br>
@endforeach
<br>
</b></td>
<td align="right">@foreach($item['listnotis'] as $item1){{ $item1['remark1']}}<br>@endforeach</td>
</tr>
@php $counter++; @endphp
@endforeach
</table>
</div>
</div>
</div>
</form>
<div class="mr-5 form-group float-right">
<button type="button" class="btn btn-primary" onclick="kemaskinihubungi()" id="btnsave">Kemaskini</button>
</div>
</div>
</div>
</div>
<script>
var api_url = "{{ $api_url }}";
// var kodcaw = "{{ $kodcaw }}";
// var notisid = "{{ $notisid }}";
//var nokp = "{{ $noic }}";
var staf = "{{ Auth::user()->name }}";
$("#kemaskiniform").submit(function(event) {
event.preventDefault();
var nokp = $('#nokp').val();
var telefon = $('#telefon').val();
var nota = $('#remark').val();
var nama = $('#nama').val();
var alamat = $('#alamat').val();
var notisid = $('#notisid').val();
var kodcaw = $('#kodcaw').val();
var statuscall = $('#statuscall').val();
let caller = "{{ Auth::user()->name }}";
$.ajax({
method:"put",
url: api_url + "/arcc/updatecall/"+ kodcaw + "/" + notisid + "/" + nokp,
data:{
'nota':nota,
'statuscall':statuscall,
'caller':caller
// 'notisid':notisid,
// 'kodcaw':kodcaw,
// 'nokp':nokp
},
success: function(success){
if(success){
Swal.fire({
icon: 'success',
title: 'Berjaya',
text: 'Berjaya mengemaskini maklumat notis JBG'
}).then((result) => {
if (result.isConfirmed) {
location.reload();
}
});
}else{
Swal.fire({
icon: 'error',
title: 'Tidak Berjaya',
text: 'Tidak berjaya mengemaskini maklumat notis JBG',
allowEscapeKey : false,
allowOutsideClick: false,
});
}
},
error: function (request, status, error) {
alert(request.responseText);
}
});
});
function kemaskinihubungi(){
$('#telefon').attr('readonly', true);
$('#telefon2').attr('readonly', true);
// $('#nota').attr('readonly', true);
$('#nama').attr('readonly', true);
$('#alamat').attr('readonly', true);
$('#kemaskiniform').trigger('submit');
}
</script>
@endsection
@@ -147,7 +147,9 @@
<td style="white-space: nowrap;">@if($item['totalsag'] == 0)<a style="color: #e74c3c; nowrap">{{number_format($item['totalbakipjm'],2)}}</a>@else {{number_format($item['totalbakipjm'],2)}}@endif</td>
<td style="white-space: nowrap;">
{{-- <a href="{{ route('arcc.bycawnotisperingatankedua', [ 'kodcaw' => $item['namacaw'][$index]['kodcaw'], 'notisid' => $notisid ]) }}" class="btn btn-info text-white">Lihat</a> --}}
<a href="{{ route('arcc.kemaskininotisperingatankeduabycaw', [ 'kodcaw' => $item['namacaw'][$index]['kodcaw'],'notisid' => $notisid] ) }}" class="btn btn-warning text-white">Kemaskini</a></td>
<a href="{{ route('arcc.kemaskininotisperingatankeduabycaw', [ 'kodcaw' => $item['namacaw'][$index]['kodcaw'],'notisid' => $notisid] ) }}" class="btn btn-warning text-white">Kemaskini</a>
<a href="{{ route('arcc.bycawnotisjbg2', [ 'kodcaw' => $item['namacaw'][$index]['kodcaw'], 'notisid' => $notisid ]) }}" class="btn btn-info text-white">Notis JBG</a></td>
</tr>
@endforeach
</table>
@@ -0,0 +1,253 @@
<!doctype html>
<html lang="{{ str_replace('_', '-', app()->getLocale()) }}">
<head>
<meta charset="utf-8">
<link rel="icon" href="{{ asset('img/icon_pkb.png') }}">
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- CSRF Token -->
<meta name="csrf-token" content="{{ csrf_token() }}">
<title>SISTEM AR-RAHN</title>
<!-- Scripts -->
<script src="{{ asset('js/app.js') }}" defer></script>
<script src="{{ asset('vendor/adminlte/dist/js/adminlte.js') }}" defer></script>
<!-- Fonts -->
<link rel="dns-prefetch" href="//fonts.gstatic.com">
<link href="https://fonts.googleapis.com/css?family=Nunito" rel="stylesheet">
<!-- Styles -->
<link href="{{ asset('css/app.css') }}" rel="stylesheet">
<link href="{{ asset('css/main.css') }}" rel="stylesheet">
<link href="{{ asset('vendor/adminlte/dist/css/adminlte.css') }}" rel="stylesheet">
<link href="{{ asset('vendor/fontawesome-free/css/all.css') }}" rel="stylesheet">
<link href="{{ asset('vendor/DataTables/datatables.min.css') }}" rel="stylesheet">
<link rel="stylesheet" href="https://code.ionicframework.com/ionicons/2.0.1/css/ionicons.min.css">
<link rel="stylesheet" href="{{ asset('vendor/bootstrap/css/bootstrap.min.css') }}">
<link href="{{ asset('css/select2.min.css') }}" rel="stylesheet" />
<link rel="stylesheet" href="{{ asset('vendor/datepicker/css/bootstrap-datepicker.min.css') }}"/>
<link href="{{ asset('css/material.css') }}" rel="stylesheet">
<script src="{{ asset('js/jquery.min.js') }}"></script>
<script src="{{ asset('vendor/bootstrap/js/bootstrap.min.js') }}"></script>
<script src="{{ asset('js/select2.min.js') }}"></script>
<script src="{{ asset('js/numeral.min.js') }}"></script>
<script src="{{ asset('js/sweetalert.min.js') }}"></script>
<script src="{{ asset('js/popper.min.js') }}"></script>
<script src="{{ asset('vendor/DataTables/datatables.min.js') }}"></script>
<script src="{{ asset('vendor/datepicker/js/bootstrap-datepicker.min.js') }}"></script>
{{-- jquery validation --}}
<script src="{{ asset('js/jquery.validate.min.js') }}"></script>
<script src="{{ asset('js/additional-methods.min.js') }}"></script>
{{-- Pusher --}}
<script src="{{ asset('js/pusher.min.js') }}"></script>
<script>
function startTime() {
var today = new Date();
var d = today.getDate();
var mon = today.getMonth()+1;
var y = today.getFullYear()
var h = today.getHours();
var m = today.getMinutes();
var s = today.getSeconds();
m = checkTime(m);
s = checkTime(s);
document.getElementById('displaytime').innerHTML =
d + "/" + mon + "/" + y + " " +h + ":" + m + ":" + s;
var t = setTimeout(startTime, 500);
}
function checkTime(i) {
if (i < 10) {i = "0" + i}; // add zero in front of numbers < 10
return i;
}
</script>
<style>
.custom-radio {
font-size:18px;
margin:20px 20px 20px 20px;
display: inline-flex !important;
flex-direction: column;
align-items: flex-start !important;
}
</style>
</head>
<body onload="startTime()" style="background-color:#BAC1C9;">
<div id="app">
<nav class="navbar navbar-expand-md navbar-light bg-white shadow-sm" style="height:100px;">
<div class="container">
<a class="navbar-brand" href="#" style="cursor:not-allowed;">
<img src="{{ asset('img/icon_pkb.png') }}" class="logo-arrahn-header" alt="Logo Ar Rahn" />
</a>
<div class="col-2">
<div style="color:#eb2f06;font-weight:bold;" id="displaytime"></div>
</div>
<div class="col-2 row mx-auto text-center justify-content-center">
<div class="navbar-brand ml-3 col-4">
<b class="text-secondary">Bahagian : </b><span class="text-uppercase" style="color:#1abc9c;font-weight:bold;">{{ Auth::user()->roles }}</span>
</div>
</div>
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="{{ __('Toggle navigation') }}">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbarSupportedContent">
<!-- Left Side Of Navbar -->
<ul class="navbar-nav mr-auto">
</ul>
<!-- Right Side Of Navbar -->
<ul class="navbar-nav ml-auto">
<li class="nav-item dropdown" style="margin-right:10px;">
<a id="navbarDropdown" class="nav-link " href="#" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false" v-pre>
<i id="bell" class="fa fa-bell"></i>
</a>
<div class="dropdown-menu dropdown-menu-right" aria-labelledby="navbarDropdown">
<div id="divbiasa">
<a class="dropdown-item" id="gadailinkz" href="#">
Tiada Notifikasi
</a>
</div>
</div>
</li>
<script>
var audio = new Audio("{{ asset('sound/3.wav') }}");
audio.muted = true;
// Enable pusher logging - don't include this in production
Pusher.logToConsole = false;
var pusher = new Pusher("{{ env('PUSHER_APP_KEY') }}", {
cluster: 'ap1',
encrypted: true
});
var channel = pusher.subscribe('operasi-notify');
channel.bind('operasi-event', function(data) {
let message = JSON.stringify(data);
$('#bell').css("color", "red");
$('#linkz').text(data.namateller + " Pohon Kelulusan");
$("#linkz").attr("href", "{{ url('kelulusan') }}");
if(window.location.pathname === '/operasi/kelulusan')
{
location.reload();
}else{
audio.play();
audio.muted = false;
var countlagu = 1;
audio.onended = function() {
if(countlagu <= 3){
countlagu++;
this.play();
}
}
}
const Toast = Swal.mixin({
toast: true,
position: 'top-end',
showConfirmButton: false,
timer: 5000,
timerProgressBar: true,
didOpen: (toast) => {
toast.addEventListener('mouseenter', Swal.stopTimer)
toast.addEventListener('mouseleave', Swal.resumeTimer)
}
})
Toast.fire({
icon: 'error',
title: 'Kelulusan Dipohon Sekarang!'
})
});
$("#navbarDropdown").click(function(){
$('#bell').css("color", "grey");
});
</script>
<!-- Authentication Links -->
@guest
<li class="nav-item">
<a class="nav-link" href="{{ route('login') }}">{{ __('Login') }}</a>
</li>
@if (Route::has('register'))
<li class="nav-item">
<a class="nav-link" href="{{ route('register') }}">{{ __('Register') }}</a>
</li>
@endif
@else
<li class="nav-item dropdown">
<a id="navbarDropdown" style="color:#1abc9c;font-weight:bold;" class="nav-link dropdown-toggle" onclick="trigbiasa()" href="#" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false" v-pre>
{{ Auth::user()->name }}
</a>
<div class="dropdown-menu dropdown-menu-right" aria-labelledby="navbarDropdown">
<a class="dropdown-item" href="{{ route('profile') }}">
{{ __('Profile') }}
</a>
<a class="dropdown-item" href="{{ route('logout') }}"
onclick="event.preventDefault();
document.getElementById('logout-form').submit();">
{{ __('Logout') }}
</a>
<form id="logout-form" action="{{ route('logout') }}" method="POST" class="d-none">
@csrf
</form>
</div>
</li>
@endguest
</ul>
</div>
</div>
</nav>
@if(session()->has('iklan') && session()->get('iklan') == 0)
<div class="toast" role="alert" aria-live="assertive" aria-atomic="true" style="position: absolute; top: 1rem; right: 1rem; width:100%;z-index:1;" data-autohide="false">
<div class="toast-header">
<i class="text-danger fa-2x fa fa-exclamation-triangle mr-2"></i>
<strong class="mr-auto text-danger fa-2x">Amaran</strong>
{{-- <small>11 mins ago</small> --}}
<button type="button" class="ml-2 mb-1 close" data-dismiss="toast" aria-label="Close">
<span aria-hidden="true">&times;</span>
</button>
</div>
<div class="toast-body">
<b style="font-size:18px;">sila tukar kata laluan asal dengan segera!</b>
</div>
</div>
<script>
$('.toast').toast('show');
</script>
@endif
<main class="py-4">
@yield('content')
</main>
</div>
@yield('footer')
</body>
</html>