Revert "Finadev (pull request #122)"
This commit is contained in:
@@ -11,13 +11,12 @@ class OperasiNotice implements ShouldBroadcast
|
|||||||
{
|
{
|
||||||
use Dispatchable, InteractsWithSockets, SerializesModels;
|
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->cawangan = $cawangan;
|
||||||
$this->namakhazanah = $namakhazanah;
|
$this->namakhazanah = $namakhazanah;
|
||||||
$this->group_id = $group_id;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public function broadcastOn()
|
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');
|
$api_url = config('api.url');
|
||||||
$cawangan_info = Http::withOptions(['verify' => config('app.api_verify')])->get(config('api.url') . '/api/cawangan/'. $auth_user['cawangan'])->json();
|
$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 = [];
|
$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){
|
$.each(data,function(index,bayaran){
|
||||||
|
|
||||||
var urlroute = '{{ route("resit.ansuran", ":id") }}';
|
var urlroute = '{{ route("resit.ansuran", ":id") }}';
|
||||||
// var bayaranteller;
|
var bayaranteller;
|
||||||
|
|
||||||
// if(bayaran['teller'] = 'Online'){
|
if(bayaran['teller'] != 'Online')
|
||||||
// bayaranteller = 'ON'; }
|
bayaranteller = 'KT';
|
||||||
|
|
||||||
// else {
|
if(bayaran['teller'] == 'Online')
|
||||||
// bayaranteller = 'KT';
|
bayaranteller = 'ON';
|
||||||
// }
|
|
||||||
|
|
||||||
urlroute = urlroute.replace(':id', bayaran['id']);
|
urlroute = urlroute.replace(':id', bayaran['id']);
|
||||||
historybayarandatatable.row.add([
|
historybayarandatatable.row.add([
|
||||||
counter,
|
counter,
|
||||||
bayaran['created_at'],
|
bayaran['created_at'],
|
||||||
"RM " + bayaran['duit_masuk'],
|
"RM " + bayaran['duit_masuk'],
|
||||||
//bayaranteller,
|
bayaranteller,
|
||||||
'<a class="btn btn-info" target="_blank" href='+ urlroute +'>Cetak</a>'
|
'<a class="btn btn-info" target="_blank" href='+ urlroute +'>Cetak</a>'
|
||||||
]).draw();
|
]).draw();
|
||||||
counter = counter + 1;
|
counter = counter + 1;
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
<!doctype html>
|
<!doctype html>
|
||||||
<html lang="{{ str_replace('_', '-', app()->getLocale()) }}">
|
<html lang="{{ str_replace('_', '-', app()->getLocale()) }}">
|
||||||
|
|
||||||
<head>
|
<head>
|
||||||
<meta charset="utf-8">
|
<meta charset="utf-8">
|
||||||
<link rel="icon" href="{{ asset('img/icon_pkb.png') }}">
|
<link rel="icon" href="{{ asset('img/icon_pkb.png') }}">
|
||||||
@@ -51,7 +50,7 @@
|
|||||||
function startTime() {
|
function startTime() {
|
||||||
var today = new Date();
|
var today = new Date();
|
||||||
var d = today.getDate();
|
var d = today.getDate();
|
||||||
var mon = today.getMonth() + 1;
|
var mon = today.getMonth()+1;
|
||||||
var y = today.getFullYear()
|
var y = today.getFullYear()
|
||||||
var h = today.getHours();
|
var h = today.getHours();
|
||||||
var m = today.getMinutes();
|
var m = today.getMinutes();
|
||||||
@@ -59,29 +58,26 @@
|
|||||||
m = checkTime(m);
|
m = checkTime(m);
|
||||||
s = checkTime(s);
|
s = checkTime(s);
|
||||||
document.getElementById('displaytime').innerHTML =
|
document.getElementById('displaytime').innerHTML =
|
||||||
d + "/" + mon + "/" + y + " " + h + ":" + m + ":" + s;
|
d + "/" + mon + "/" + y + " " +h + ":" + m + ":" + s;
|
||||||
var t = setTimeout(startTime, 500);
|
var t = setTimeout(startTime, 500);
|
||||||
}
|
}
|
||||||
|
|
||||||
function checkTime(i) {
|
function checkTime(i) {
|
||||||
if (i < 10) {
|
if (i < 10) {i = "0" + i}; // add zero in front of numbers < 10
|
||||||
i = "0" + i
|
|
||||||
}; // add zero in front of numbers < 10
|
|
||||||
return i;
|
return i;
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style>
|
<style>
|
||||||
.custom-radio {
|
.custom-radio {
|
||||||
font-size: 18px;
|
font-size:18px;
|
||||||
margin: 20px 20px 20px 20px;
|
margin:20px 20px 20px 20px;
|
||||||
display: inline-flex !important;
|
display: inline-flex !important;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
align-items: flex-start !important;
|
align-items: flex-start !important;
|
||||||
}
|
}
|
||||||
</style>
|
|
||||||
</head>
|
|
||||||
|
|
||||||
|
</style>
|
||||||
|
</head>
|
||||||
<body onload="startTime()" style="background-color:#BAC1C9;">
|
<body onload="startTime()" style="background-color:#BAC1C9;">
|
||||||
<div id="app">
|
<div id="app">
|
||||||
<nav class="navbar navbar-expand-md navbar-light bg-white shadow-sm" style="height:100px;">
|
<nav class="navbar navbar-expand-md navbar-light bg-white shadow-sm" style="height:100px;">
|
||||||
@@ -90,19 +86,16 @@
|
|||||||
<img src="{{ asset('img/icon_pkb.png') }}" class="logo-arrahn-header" alt="Logo Ar Rahn" />
|
<img src="{{ asset('img/icon_pkb.png') }}" class="logo-arrahn-header" alt="Logo Ar Rahn" />
|
||||||
</a>
|
</a>
|
||||||
|
|
||||||
<div class="col-2">
|
<div class="col-2">
|
||||||
<div style="color:#eb2f06;font-weight:bold;" id="displaytime"></div>
|
<div style="color:#eb2f06;font-weight:bold;" id="displaytime"></div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-2 row mx-auto text-center justify-content-center">
|
<div class="col-2 row mx-auto text-center justify-content-center">
|
||||||
<div class="navbar-brand ml-3 col-4">
|
<div class="navbar-brand ml-3 col-4">
|
||||||
<b class="text-secondary">Bahagian : </b><span class="text-uppercase"
|
<b class="text-secondary">Bahagian : </b><span class="text-uppercase" style="color:#1abc9c;font-weight:bold;">{{ Auth::user()->roles }}</span>
|
||||||
style="color:#1abc9c;font-weight:bold;">{{ Auth::user()->roles }}</span>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<button class="navbar-toggler" type="button" data-toggle="collapse"
|
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="{{ __('Toggle navigation') }}">
|
||||||
data-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false"
|
|
||||||
aria-label="{{ __('Toggle navigation') }}">
|
|
||||||
<span class="navbar-toggler-icon"></span>
|
<span class="navbar-toggler-icon"></span>
|
||||||
</button>
|
</button>
|
||||||
|
|
||||||
@@ -115,8 +108,7 @@
|
|||||||
<!-- Right Side Of Navbar -->
|
<!-- Right Side Of Navbar -->
|
||||||
<ul class="navbar-nav ml-auto">
|
<ul class="navbar-nav ml-auto">
|
||||||
<li class="nav-item dropdown" style="margin-right:10px;">
|
<li class="nav-item dropdown" style="margin-right:10px;">
|
||||||
<a id="navbarDropdown" class="nav-link " href="#" role="button"
|
<a id="navbarDropdown" class="nav-link " href="#" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false" v-pre>
|
||||||
data-toggle="dropdown" aria-haspopup="true" aria-expanded="false" v-pre>
|
|
||||||
<i id="bell" class="fa fa-bell"></i>
|
<i id="bell" class="fa fa-bell"></i>
|
||||||
</a>
|
</a>
|
||||||
|
|
||||||
@@ -130,7 +122,7 @@
|
|||||||
</li>
|
</li>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
let authgroup = "{{ Auth::user()->group_id }}"
|
|
||||||
var audio = new Audio("{{ asset('sound/3.wav') }}");
|
var audio = new Audio("{{ asset('sound/3.wav') }}");
|
||||||
audio.muted = true;
|
audio.muted = true;
|
||||||
|
|
||||||
@@ -144,59 +136,48 @@
|
|||||||
|
|
||||||
var channel = pusher.subscribe('operasi-notify');
|
var channel = pusher.subscribe('operasi-notify');
|
||||||
channel.bind('operasi-event', function(data) {
|
channel.bind('operasi-event', function(data) {
|
||||||
|
let message = JSON.stringify(data);
|
||||||
|
|
||||||
let message = JSON.stringify(data);
|
$('#bell').css("color", "red");
|
||||||
|
$('#linkz').text(data.namateller + " Pohon Kelulusan");
|
||||||
|
$("#linkz").attr("href", "{{ url('kelulusan') }}");
|
||||||
|
|
||||||
console.log(authgroup, data.group_id);
|
if(window.location.pathname === '/operasi/kelulusan')
|
||||||
|
{
|
||||||
if (authgroup == data.group_id) {
|
location.reload();
|
||||||
|
}else{
|
||||||
console.log(authgroup, data.group_id);
|
audio.play();
|
||||||
|
audio.muted = false;
|
||||||
$('#bell').css("color", "red");
|
var countlagu = 1;
|
||||||
$('#linkz').text(data.namateller + " Pohon Kelulusan");
|
audio.onended = function() {
|
||||||
$("#linkz").attr("href", "{{ url('kelulusan') }}");
|
if(countlagu <= 3){
|
||||||
|
countlagu++;
|
||||||
if (window.location.pathname === '/operasi/kelulusan') {
|
this.play();
|
||||||
location.reload();
|
}
|
||||||
} else {
|
}
|
||||||
audio.play();
|
}
|
||||||
audio.muted = false;
|
const Toast = Swal.mixin({
|
||||||
var countlagu = 1;
|
toast: true,
|
||||||
audio.onended = function() {
|
position: 'top-end',
|
||||||
if (countlagu <= 3) {
|
showConfirmButton: false,
|
||||||
countlagu++;
|
timer: 5000,
|
||||||
this.play();
|
timerProgressBar: true,
|
||||||
}
|
didOpen: (toast) => {
|
||||||
}
|
toast.addEventListener('mouseenter', Swal.stopTimer)
|
||||||
}
|
toast.addEventListener('mouseleave', Swal.resumeTimer)
|
||||||
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");
|
|
||||||
});
|
|
||||||
|
|
||||||
|
Toast.fire({
|
||||||
|
icon: 'error',
|
||||||
|
title: 'Kelulusan Dipohon Sekarang!'
|
||||||
|
})
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
$("#navbarDropdown").click(function(){
|
||||||
|
$('#bell').css("color", "grey");
|
||||||
|
});
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
@@ -214,9 +195,7 @@
|
|||||||
@endif
|
@endif
|
||||||
@else
|
@else
|
||||||
<li class="nav-item dropdown">
|
<li class="nav-item dropdown">
|
||||||
<a id="navbarDropdown" style="color:#1abc9c;font-weight:bold;"
|
<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>
|
||||||
class="nav-link dropdown-toggle" onclick="trigbiasa()" href="#" role="button"
|
|
||||||
data-toggle="dropdown" aria-haspopup="true" aria-expanded="false" v-pre>
|
|
||||||
{{ Auth::user()->name }}
|
{{ Auth::user()->name }}
|
||||||
</a>
|
</a>
|
||||||
|
|
||||||
@@ -225,13 +204,12 @@
|
|||||||
{{ __('Profile') }}
|
{{ __('Profile') }}
|
||||||
</a>
|
</a>
|
||||||
<a class="dropdown-item" href="{{ route('logout') }}"
|
<a class="dropdown-item" href="{{ route('logout') }}"
|
||||||
onclick="event.preventDefault();
|
onclick="event.preventDefault();
|
||||||
document.getElementById('logout-form').submit();">
|
document.getElementById('logout-form').submit();">
|
||||||
{{ __('Logout') }}
|
{{ __('Logout') }}
|
||||||
</a>
|
</a>
|
||||||
|
|
||||||
<form id="logout-form" action="{{ route('logout') }}" method="POST"
|
<form id="logout-form" action="{{ route('logout') }}" method="POST" class="d-none">
|
||||||
class="d-none">
|
|
||||||
@csrf
|
@csrf
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
@@ -243,22 +221,22 @@
|
|||||||
</div>
|
</div>
|
||||||
</nav>
|
</nav>
|
||||||
|
|
||||||
@if (session()->has('iklan') && session()->get('iklan') == 0)
|
@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>
|
<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">
|
||||||
<strong class="mr-auto text-danger fa-2x">Amaran</strong>
|
<div class="toast-header">
|
||||||
{{-- <small>11 mins ago</small> --}}
|
|
||||||
<button type="button" class="ml-2 mb-1 close" data-dismiss="toast" aria-label="Close">
|
<i class="text-danger fa-2x fa fa-exclamation-triangle mr-2"></i>
|
||||||
<span aria-hidden="true">×</span>
|
<strong class="mr-auto text-danger fa-2x">Amaran</strong>
|
||||||
</button>
|
{{-- <small>11 mins ago</small> --}}
|
||||||
</div>
|
<button type="button" class="ml-2 mb-1 close" data-dismiss="toast" aria-label="Close">
|
||||||
<div class="toast-body">
|
<span aria-hidden="true">×</span>
|
||||||
<b style="font-size:18px;">sila tukar kata laluan asal dengan segera!</b>
|
</button>
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
|
<div class="toast-body">
|
||||||
|
<b style="font-size:18px;">sila tukar kata laluan asal dengan segera!</b>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
<script>
|
<script>
|
||||||
$('.toast').toast('show');
|
$('.toast').toast('show');
|
||||||
</script>
|
</script>
|
||||||
@@ -272,5 +250,4 @@
|
|||||||
</div>
|
</div>
|
||||||
@yield('footer')
|
@yield('footer')
|
||||||
</body>
|
</body>
|
||||||
|
|
||||||
</html>
|
</html>
|
||||||
|
|||||||
@@ -43,7 +43,7 @@
|
|||||||
<th>Bil</th>
|
<th>Bil</th>
|
||||||
<th>Tarikh Bayaran</th>
|
<th>Tarikh Bayaran</th>
|
||||||
<th>Bayaran</th>
|
<th>Bayaran</th>
|
||||||
{{-- <th>Jenis Bayaran</th> --}}
|
<th>Jenis Bayaran</th>
|
||||||
<th>Action</th>
|
<th>Action</th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
|
|||||||
Reference in New Issue
Block a user