Revert "Finadev (pull request #122)"
This commit is contained in:
@@ -11,13 +11,12 @@ class OperasiNotice implements ShouldBroadcast
|
||||
{
|
||||
use Dispatchable, InteractsWithSockets, SerializesModels;
|
||||
|
||||
public $cawangan,$namakhazanah,$group_id;
|
||||
public $cawangan,$namakhazanah;
|
||||
|
||||
public function __construct($cawangan,$namakhazanah,$group_id)
|
||||
public function __construct($cawangan,$namakhazanah)
|
||||
{
|
||||
$this->cawangan = $cawangan;
|
||||
$this->namakhazanah = $namakhazanah;
|
||||
$this->group_id = $group_id;
|
||||
}
|
||||
|
||||
public function broadcastOn()
|
||||
|
||||
@@ -662,7 +662,7 @@ class KhazanahController extends Controller
|
||||
|
||||
}
|
||||
|
||||
event(new OperasiNotice($auth_user['cawangan'],$auth_user['name'],$auth_user['group_id']));
|
||||
event(new OperasiNotice($auth_user['cawangan'],$auth_user['name']));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -29,7 +29,7 @@ class OperasiController extends Controller
|
||||
$api_url = config('api.url');
|
||||
$cawangan_info = Http::withOptions(['verify' => config('app.api_verify')])->get(config('api.url') . '/api/cawangan/'. $auth_user['cawangan'])->json();
|
||||
|
||||
$kelulusan = Http::withOptions(['verify' => config('app.api_verify')])->get(config('api.url') . '/api/ListOperasi/', ['group_id'=> $auth_user['group_id'] ])->json();
|
||||
$kelulusan = Http::withOptions(['verify' => config('app.api_verify')])->get(config('api.url') . '/api/ListOperasi/')->json();
|
||||
|
||||
$arraykelulusan = [];
|
||||
|
||||
|
||||
@@ -1,34 +0,0 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class AddGroupIdToUsersTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::table('users', function (Blueprint $table) {
|
||||
//
|
||||
$table->integer('group_id');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::table('users', function (Blueprint $table) {
|
||||
//
|
||||
$table->dropColumn(['group_id']);
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -1402,21 +1402,20 @@
|
||||
$.each(data,function(index,bayaran){
|
||||
|
||||
var urlroute = '{{ route("resit.ansuran", ":id") }}';
|
||||
// var bayaranteller;
|
||||
var bayaranteller;
|
||||
|
||||
// if(bayaran['teller'] = 'Online'){
|
||||
// bayaranteller = 'ON'; }
|
||||
|
||||
// else {
|
||||
// bayaranteller = 'KT';
|
||||
// }
|
||||
if(bayaran['teller'] != 'Online')
|
||||
bayaranteller = 'KT';
|
||||
|
||||
if(bayaran['teller'] == 'Online')
|
||||
bayaranteller = 'ON';
|
||||
|
||||
urlroute = urlroute.replace(':id', bayaran['id']);
|
||||
historybayarandatatable.row.add([
|
||||
counter,
|
||||
bayaran['created_at'],
|
||||
"RM " + bayaran['duit_masuk'],
|
||||
//bayaranteller,
|
||||
bayaranteller,
|
||||
'<a class="btn btn-info" target="_blank" href='+ urlroute +'>Cetak</a>'
|
||||
]).draw();
|
||||
counter = counter + 1;
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
<!doctype html>
|
||||
<html lang="{{ str_replace('_', '-', app()->getLocale()) }}">
|
||||
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<link rel="icon" href="{{ asset('img/icon_pkb.png') }}">
|
||||
@@ -39,19 +38,19 @@
|
||||
<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 mon = today.getMonth()+1;
|
||||
var y = today.getFullYear()
|
||||
var h = today.getHours();
|
||||
var m = today.getMinutes();
|
||||
@@ -59,29 +58,26 @@
|
||||
m = checkTime(m);
|
||||
s = checkTime(s);
|
||||
document.getElementById('displaytime').innerHTML =
|
||||
d + "/" + mon + "/" + y + " " + h + ":" + m + ":" + s;
|
||||
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
|
||||
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>
|
||||
<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;">
|
||||
@@ -89,34 +85,30 @@
|
||||
<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">
|
||||
<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>
|
||||
<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') }}">
|
||||
<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>
|
||||
<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>
|
||||
|
||||
@@ -130,7 +122,7 @@
|
||||
</li>
|
||||
|
||||
<script>
|
||||
let authgroup = "{{ Auth::user()->group_id }}"
|
||||
|
||||
var audio = new Audio("{{ asset('sound/3.wav') }}");
|
||||
audio.muted = true;
|
||||
|
||||
@@ -144,61 +136,50 @@
|
||||
|
||||
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') }}");
|
||||
|
||||
let message = JSON.stringify(data);
|
||||
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)
|
||||
}
|
||||
})
|
||||
|
||||
console.log(authgroup, data.group_id);
|
||||
|
||||
if (authgroup == data.group_id) {
|
||||
|
||||
console.log(authgroup, data.group_id);
|
||||
|
||||
$('#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!'
|
||||
})
|
||||
|
||||
}
|
||||
});
|
||||
Toast.fire({
|
||||
icon: 'error',
|
||||
title: 'Kelulusan Dipohon Sekarang!'
|
||||
})
|
||||
});
|
||||
|
||||
|
||||
$("#navbarDropdown").click(function() {
|
||||
$('#bell').css("color", "grey");
|
||||
});
|
||||
$("#navbarDropdown").click(function(){
|
||||
$('#bell').css("color", "grey");
|
||||
});
|
||||
|
||||
|
||||
|
||||
|
||||
</script>
|
||||
</script>
|
||||
|
||||
|
||||
|
||||
@@ -214,9 +195,7 @@
|
||||
@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>
|
||||
<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>
|
||||
|
||||
@@ -225,40 +204,39 @@
|
||||
{{ __('Profile') }}
|
||||
</a>
|
||||
<a class="dropdown-item" href="{{ route('logout') }}"
|
||||
onclick="event.preventDefault();
|
||||
onclick="event.preventDefault();
|
||||
document.getElementById('logout-form').submit();">
|
||||
{{ __('Logout') }}
|
||||
</a>
|
||||
|
||||
<form id="logout-form" action="{{ route('logout') }}" method="POST"
|
||||
class="d-none">
|
||||
<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">
|
||||
@if(session()->has('iklan') && session()->get('iklan') == 0)
|
||||
|
||||
<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">×</span>
|
||||
</button>
|
||||
</div>
|
||||
<div class="toast-body">
|
||||
<b style="font-size:18px;">sila tukar kata laluan asal dengan segera!</b>
|
||||
</div>
|
||||
<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">×</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>
|
||||
@@ -272,5 +250,4 @@
|
||||
</div>
|
||||
@yield('footer')
|
||||
</body>
|
||||
|
||||
</html>
|
||||
|
||||
@@ -43,7 +43,7 @@
|
||||
<th>Bil</th>
|
||||
<th>Tarikh Bayaran</th>
|
||||
<th>Bayaran</th>
|
||||
{{-- <th>Jenis Bayaran</th> --}}
|
||||
<th>Jenis Bayaran</th>
|
||||
<th>Action</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
Reference in New Issue
Block a user