fix skit2
This commit is contained in:
@@ -17,4 +17,70 @@ class KelulusanController extends Controller
|
||||
|
||||
return view('kelulusan.index',compact('api_url','auth_user'));
|
||||
}
|
||||
|
||||
public function mintakatalaluansemula(Request $request)
|
||||
{
|
||||
|
||||
if(Hash::check($request->passsemula, Auth::user()->password))
|
||||
{
|
||||
return "True";
|
||||
}
|
||||
else
|
||||
{
|
||||
return "False";
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public function updatekelulusan(Request $request)
|
||||
{
|
||||
$auth_user = Auth::user();
|
||||
|
||||
$api_url = config('api.url');
|
||||
|
||||
$norujukan = $request->norujukan;
|
||||
|
||||
|
||||
if($request->pembatalan == null)
|
||||
{
|
||||
$updatelulus = Http::put(config('api.url') . '/api/UpdateKelulusanKomen/' . $request->kodcaw . '/' . $norujukan,[
|
||||
"komen" => $request->komenkelulusan,
|
||||
'siri' => $request->siri
|
||||
])->json();
|
||||
|
||||
$updatelulus = Http::put(config('api.url') . '/api/UpdateKelulusan/' . $request->kodcaw . '/' . $norujukan,[
|
||||
'sahkan' => 1,
|
||||
'namaoperasi' => $request->namaoperasi,
|
||||
'siri' => $request->siri
|
||||
])->json();
|
||||
|
||||
if($updatelulus)
|
||||
{
|
||||
event(new NotifikasiKelulusan($norujukan,"lulus",$request->siri,$request->komenkelulusan,$request->teller));
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$updatelulus = Http::put(config('api.url') . '/api/UpdateKelulusanKomen/' . $request->kodcaw . '/' . $norujukan,[
|
||||
"komen" => $request->komenkelulusan,
|
||||
'siri' => $request->siri
|
||||
])->json();
|
||||
|
||||
$updatelulus = Http::put(config('api.url') . '/api/UpdateKelulusan/' . $request->kodcaw . '/' . $norujukan,[
|
||||
'sahkan' => 2,
|
||||
'namaoperasi' => $request->namaoperasi,
|
||||
'siri' => $request->siri
|
||||
])->json();
|
||||
|
||||
if($updatelulus)
|
||||
{
|
||||
event(new NotifikasiKelulusan($norujukan,"batal",$request->siri,$request->komenkelulusan,$request->teller));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
return response()->json($updatelulus,200);
|
||||
}
|
||||
}
|
||||
|
||||
Generated
+13
@@ -5129,6 +5129,11 @@
|
||||
"integrity": "sha512-2lMlY1Yc1+CUy0gw4H95uNN7vjbpoED7NNRSBHE25nWfLBdmMzFCsPshlzbxHz+gYMcBEUN8V4pU16prcdPSgA==",
|
||||
"dev": true
|
||||
},
|
||||
"moment": {
|
||||
"version": "2.29.1",
|
||||
"resolved": "https://registry.npmjs.org/moment/-/moment-2.29.1.tgz",
|
||||
"integrity": "sha512-kHmoybcPV8Sqy59DwNDY3Jefr64lK/by/da0ViFcuA4DH0vQg5Q6Ze5VimxkfQNSC+Mls/Kx53s7TjP1RhFEDQ=="
|
||||
},
|
||||
"ms": {
|
||||
"version": "2.1.2",
|
||||
"resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz",
|
||||
@@ -7555,6 +7560,14 @@
|
||||
"vue-style-loader": "^4.1.0"
|
||||
}
|
||||
},
|
||||
"vue-moment": {
|
||||
"version": "4.1.0",
|
||||
"resolved": "https://registry.npmjs.org/vue-moment/-/vue-moment-4.1.0.tgz",
|
||||
"integrity": "sha512-Gzisqpg82ItlrUyiD9d0Kfru+JorW2o4mQOH06lEDZNgxci0tv/fua1Hl0bo4DozDV2JK1r52Atn/8QVCu8qQw==",
|
||||
"requires": {
|
||||
"moment": "^2.19.2"
|
||||
}
|
||||
},
|
||||
"vue-property-decorator": {
|
||||
"version": "9.1.2",
|
||||
"resolved": "https://registry.npmjs.org/vue-property-decorator/-/vue-property-decorator-9.1.2.tgz",
|
||||
|
||||
@@ -41,6 +41,7 @@
|
||||
"vue-axios": "^3.4.0",
|
||||
"vue-class-component": "^7.2.6",
|
||||
"vue-content-placeholders": "^0.2.1",
|
||||
"vue-moment": "^4.1.0",
|
||||
"vue-property-decorator": "^9.1.2",
|
||||
"vue-pusher": "^1.1.0",
|
||||
"vue-router": "^3.5.3",
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 27 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 2.8 KiB |
Vendored
+6215
File diff suppressed because it is too large
Load Diff
@@ -4,31 +4,33 @@
|
||||
|
||||
<div class="bg-white md:items-center md:justify-between shadow rounded-lg p-4 md:p-6 xl:p-8 my-6">
|
||||
|
||||
<div v-for="index in 2" :key="index" class="flex flex-wrap w-full">
|
||||
<template v-if="showkelulusan.data.length > 0">
|
||||
<div v-for="(kelulusan,index) in showkelulusan.data" :key="index" class="flex flex-wrap w-full">
|
||||
<div class="w-full border rounded-l p-4">
|
||||
|
||||
<div class="flex flex-wrap mb-4">
|
||||
<p class="font-bold text-xl w-1/3">KB2210232-00032</p>
|
||||
<p class="font-bold text-md w-1/3 text-red-500 justify-center flex text-center">[Auto Tawarruq] Pembiayaan Melebihi Margin 75%</p>
|
||||
<p class="font-bold text-xl w-1/3 text-gray-500 flex justify-end">Ar-Rahn Kota Bharu 2</p>
|
||||
<p class="font-bold text-xl w-1/3">{{ kelulusan.kelulusanall[0].norujukan }}</p>
|
||||
<p class="font-bold text-md w-1/3 text-red-500 justify-center flex text-center">{{ kelulusan.kelulusanall[0].status }}</p>
|
||||
<p class="font-bold text-xl w-1/3 text-gray-500 flex justify-end">Ar-Rahn {{ kelulusan.cawangan }}</p>
|
||||
</div>
|
||||
<div class="flex flex-wrap">
|
||||
<p class="font-bold text-green-500 w-1/2">PC/PPC: <span class="text-black font-normal text-md capitalize">wan ramlah binti azam baki</span></p>
|
||||
<p class="w-1/4 text-sm text-gray-700">Pembiayaan: RM100,400.00</p>
|
||||
<p class="w-1/4 text-sm text-gray-700">Nilai Marhun: RM100,400.00</p>
|
||||
<p class="font-bold text-green-500 w-1/2">PC/PPC: <span class="text-black font-normal text-md capitalize">{{ kelulusan.kelulusanall[0].khazanah }}</span></p>
|
||||
<p class="w-1/4 text-sm text-gray-700">Pembiayaan: RM{{ changeFormat(kelulusan.kelulusanall[0].jumpinj) }}</p>
|
||||
<p class="w-1/4 text-sm text-gray-700">Nilai Marhun: RM{{ changeFormat(kelulusan.kelulusanall[0].nilaimarhun) }}</p>
|
||||
</div>
|
||||
<div class="flex flex-wrap">
|
||||
<p class="font-bold text-green-500 w-1/2">Teller: <span class="text-black font-normal text-md capitalize">mohd rusyaidi bin ruseli</span></p>
|
||||
<p class="w-1/4 text-sm text-gray-700">Margin: 78%</p>
|
||||
<p class="w-1/4 text-sm text-gray-700">Berat: 100.00 gram</p>
|
||||
<p class="font-bold text-green-500 w-1/2">Teller: <span class="text-black font-normal text-md capitalize">{{ kelulusan.kelulusanall[0].teller }}</span></p>
|
||||
<p class="w-1/4 text-sm text-gray-700">Margin: {{ kelulusan.kelulusanall[0].margin }}%</p>
|
||||
<p class="w-1/4 text-sm text-gray-700">Berat: {{ kelulusan.kelulusanall[0].berat }} gm</p>
|
||||
</div>
|
||||
<div class="flex flex-wrap">
|
||||
<p class="font-bold text-green-500 w-3/4">Komen: <span class="text-black font-normal text-md w-1/4">Tiada Komen</span></p>
|
||||
<p class="font-bold text-green-500 w-3/4">Komen: <span class="text-black font-normal text-md w-1/4">{{ kelulusan.kelulusanall[0].komen }}</span></p>
|
||||
|
||||
</div>
|
||||
<!-- <p class="font-bold text-xl">KB2210232-00032</p> -->
|
||||
|
||||
<div class="mx-auto flex justify-between mb-auto text-sm text-gray-500 mt-4">
|
||||
10 Jul 2018, 05:56PM
|
||||
<!-- 10 Jul 2018, 05:56PM -->
|
||||
{{ kelulusan.kelulusanall[0].tarikh | moment("calendar") }}
|
||||
|
||||
<div class="pl-4">
|
||||
<button class="bg-green-500 hover:bg-green-700 text-white font-bold py-1 px-6 border border-green-700 rounded mr-1" @click.prevent="ApproveFunc"><i class="fas fa-thumbs-up mr-1 text-md"></i> Lulus</button>
|
||||
@@ -37,6 +39,17 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<pagination :data="paginate" @clickEvent_="getKelulusanList"></pagination>
|
||||
</template>
|
||||
<template v-else>
|
||||
<div class="flex place-content-center w-full">
|
||||
<div class="grid mx-auto">
|
||||
<img src="/img/approval.jpg" class="h-40 w-40 mx-auto" alt="Windster Logo">
|
||||
<i class="text-center">Tiada data untuk kelulusan pada waktu ini..<br> Sila tekan refresh semula untuk melihat kelulusan latest.</i>
|
||||
<button class="p-4 bg-blue-400 rounded text-white w-2/4 mx-auto mt-4" @click.prevent="RedirectHome">Laman Utama</button>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
</div>
|
||||
|
||||
@@ -45,20 +58,52 @@
|
||||
</template>
|
||||
<script>
|
||||
import modal from '../components/util/KomenModal.vue'
|
||||
import pagination from '../components/pagination.vue'
|
||||
|
||||
const formatter = new Intl.NumberFormat('en-US', {
|
||||
minimumFractionDigits: 2
|
||||
});
|
||||
|
||||
export default {
|
||||
components: {
|
||||
// pagination,
|
||||
pagination,
|
||||
modal,
|
||||
// deletemodal
|
||||
|
||||
},
|
||||
data(){
|
||||
return{
|
||||
currentPage: 1,
|
||||
showkelulusan:[],
|
||||
paginate:{}
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.getKelulusanList(this.currentPage)
|
||||
},
|
||||
methods:{
|
||||
changeFormat: function(data){
|
||||
return formatter.format(data)
|
||||
},
|
||||
getKelulusanList(pageNumber){
|
||||
this.axios.get(this.$hostname + '/admin/ListOperasi/Paginate',{
|
||||
params: {
|
||||
page: pageNumber
|
||||
}
|
||||
}).then(response => {
|
||||
this.showkelulusan = response.data
|
||||
this.paginate = response.data
|
||||
this.currentPage = pageNumber
|
||||
});
|
||||
},
|
||||
ApproveFunc:function(){
|
||||
this.$refs.modal.showModal = true;
|
||||
},
|
||||
DisapproveFunc:function(){
|
||||
console.log('taklulus');
|
||||
},
|
||||
RedirectHome:function(){
|
||||
return window.location.href = '/';
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Vendored
+1
-1
@@ -80,7 +80,6 @@ window.Vue = require('vue').default;
|
||||
window.Alpine = Alpine;
|
||||
|
||||
Vue.use(Vuex)
|
||||
|
||||
const options = {
|
||||
transition: "Vue-Toastification__fade",
|
||||
position: "top-right",
|
||||
@@ -108,6 +107,7 @@ Vue.use(VueContentPlaceholders)
|
||||
Vue.use(VueSweetalert2);
|
||||
Vue.use(VueFriendlyIframe)
|
||||
|
||||
Vue.use(require('vue-moment'));
|
||||
|
||||
Alpine.start()
|
||||
|
||||
|
||||
@@ -60,7 +60,7 @@ export default {
|
||||
},
|
||||
methods: {
|
||||
toggleModal: function(){
|
||||
this.showModal = !this.showModal;
|
||||
this.showModal = false;
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,33 +3,31 @@
|
||||
<div id="notification" ref="notification" class="notification cursor-pointer" v-on:click="toggleDropdown()"></div>
|
||||
<div ref="popoverDropdownRef" v-bind:class="{'hidden': !dropdownShow, 'block': dropdownShow}" class="origin-top-right w-96 right-0 mt-2 w-56 rounded-md shadow-lg bg-white ring-1 ring-black ring-opacity-5 focus:outline-none" role="menu" aria-orientation="vertical" aria-labelledby="menu-button" tabindex="-1">
|
||||
<div class="py-1 px-2" role="none">
|
||||
<div class="text-gray-700 block px-2 py-5 text-sm hover:bg-yellow-500 cursor-pointer">
|
||||
<div class="justify-between flex">
|
||||
<div class="w-4/6">
|
||||
<p class="font-bold -mt-4">Ar-Rahn Kota Bharu 2</p>
|
||||
<p class="font-bold text-sm text-red-500">[Auto Tawarruq] Pembiayaan Melebihi Margin 75%</p>
|
||||
<p class="-mb-4 text-sm">4 hours ago</p>
|
||||
</div>
|
||||
<div class="w-2/6">
|
||||
<p class="font-bold -mt-4">KB2000201-0232</p>
|
||||
<template v-if="showkelulusan.data.length > 0">
|
||||
<div v-for="(kelulusan,index) in showkelulusan.data" :key="index" class="text-gray-700 block px-2 py-5 text-sm hover:bg-yellow-500 cursor-pointer">
|
||||
<div class="justify-between flex">
|
||||
<div class="w-4/6">
|
||||
<p class="font-bold -mt-4">Ar-Rahn {{ kelulusan.cawangan }}</p>
|
||||
<p class="font-bold text-sm text-red-500">{{ kelulusan.kelulusanall[0].status }}</p>
|
||||
<!-- <p class="-mb-4 text-sm">4 hours ago</p> -->
|
||||
</div>
|
||||
<div class="w-3/6">
|
||||
<p class="font-bold -mt-4 justify-end flex">{{ kelulusan.kelulusanall[0].norujukan }}</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<hr>
|
||||
<div class="text-gray-700 block px-2 py-5 text-sm hover:bg-yellow-500 cursor-pointer">
|
||||
<div class="justify-between flex">
|
||||
<div class="w-4/6">
|
||||
<p class="font-bold -mt-4">Ar-Rahn Kota Bharu 2</p>
|
||||
<p class="font-bold text-sm text-red-500">[Auto Tawarruq] Pembiayaan Melebihi Margin 75%</p>
|
||||
<p class="-mb-4 text-sm">4 hours ago</p>
|
||||
</div>
|
||||
<div class="w-2/6">
|
||||
<p class="font-bold -mt-4">KB2000201-0232</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<hr>
|
||||
</template>
|
||||
|
||||
<!-- <a class="text-gray-700 block px-4 py-2 text-sm hover:bg-yellow-500 cursor-pointer" role="menuitem" tabindex="-1" id="menu-item-0">a<br><b>a</b></a> -->
|
||||
<template v-else>
|
||||
<div class="flex place-content-center w-full">
|
||||
<div class="grid mx-auto mb-4">
|
||||
<img src="/img/notify.jpg" class="h-20 w-20 mx-auto" alt="Windster Logo">
|
||||
<i class="text-center text-sm">Anda tidak mempunyai <br>sebarang pemberitahuan masa sekarang..</i>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
</div>
|
||||
</div>
|
||||
<!-- <button @click="Clicked">Increment Notifications</button> -->
|
||||
@@ -38,14 +36,6 @@
|
||||
<style scoped>
|
||||
/* Page Styles */
|
||||
|
||||
.container {
|
||||
/* position: absolute; */
|
||||
/* top: 50%; */
|
||||
/* left: 50%; */
|
||||
/* margin-right: 50%; */
|
||||
/* transform: translate(-50%, -50%); */
|
||||
/* text-align: center; */
|
||||
}
|
||||
|
||||
button {
|
||||
display: block;
|
||||
@@ -69,15 +59,17 @@ button:hover {
|
||||
display: inline-block;
|
||||
position: relative;
|
||||
padding: 0.6em;
|
||||
background: #3498db;
|
||||
border-radius: 0.2em;
|
||||
/* background: #3498db; */
|
||||
border-radius: 25px;
|
||||
/* color: #3498db; */
|
||||
border-radius: 1em;
|
||||
font-size: 1.3em;
|
||||
box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
|
||||
/* box-shadow: 0 0 10px rgba(0, 0, 0, 0.2); */
|
||||
}
|
||||
|
||||
.notification::before,
|
||||
.notification::after {
|
||||
color: #fff;
|
||||
color: #3498db;
|
||||
text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
|
||||
}
|
||||
|
||||
@@ -90,16 +82,17 @@ button:hover {
|
||||
|
||||
.notification::after {
|
||||
font-family: Arial;
|
||||
font-size: 0.7em;
|
||||
font-size: 0.6em;
|
||||
font-weight: 700;
|
||||
position: absolute;
|
||||
top: -15px;
|
||||
right: -15px;
|
||||
top: -8px;
|
||||
right: -13px;
|
||||
padding: 5px 8px;
|
||||
line-height: 100%;
|
||||
border: 2px #fff solid;
|
||||
border-radius: 60px;
|
||||
background: #3498db;
|
||||
color:#fff;
|
||||
opacity: 0;
|
||||
content: attr(data-count);
|
||||
opacity: 0;
|
||||
@@ -152,9 +145,14 @@ export default {
|
||||
data(){
|
||||
return {
|
||||
dropdownShow: false,
|
||||
currentPage: 1,
|
||||
showkelulusan:[],
|
||||
paginate:{}
|
||||
}
|
||||
},
|
||||
|
||||
created() {
|
||||
this.getKelulusanList(this.currentPage)
|
||||
},
|
||||
mounted(){
|
||||
document.addEventListener('click', this.onClick);
|
||||
|
||||
@@ -165,39 +163,55 @@ export default {
|
||||
// console.log(localStorage.getItem("books"))
|
||||
el.setAttribute('data-count', count);
|
||||
el.classList.add('show-count');
|
||||
console.log('test1');
|
||||
}else{
|
||||
el.classList.remove('show-count');
|
||||
console.log('test2');
|
||||
}
|
||||
|
||||
var channel = this.$pusher.subscribe('operasi-notify');
|
||||
|
||||
channel.bind('operasi-event', ({ cawangan,khazanah }) => {
|
||||
var el = this.$refs.notification;
|
||||
var count = Number(localStorage.getItem("data-count")) || 0;
|
||||
console.log(count)
|
||||
localStorage.setItem('data-count',count + 1);
|
||||
el.setAttribute('data-count', count+1);
|
||||
el.classList.remove('notify');
|
||||
(function(){
|
||||
return el.offsetWidth;
|
||||
})();
|
||||
el.classList.add('notify');
|
||||
// if(count > 0){
|
||||
el.classList.add('show-count');
|
||||
// }
|
||||
});
|
||||
},
|
||||
beforeDestroy() {
|
||||
document.removeEventListener('click', this.onClick);
|
||||
},
|
||||
methods:{
|
||||
async toggleDropdown() {
|
||||
this.dropdownShow = true;
|
||||
createPopper(this.$refs.notification, this.$refs.popoverDropdownRef, {
|
||||
placement: "bottom-end",
|
||||
modifiers: [{
|
||||
name: "preventOverflow",
|
||||
}]
|
||||
});
|
||||
this.dropdownShow = true;
|
||||
createPopper(this.$refs.notification, this.$refs.popoverDropdownRef, {
|
||||
placement: "bottom-end",
|
||||
modifiers: [{
|
||||
name: "preventOverflow",
|
||||
}]
|
||||
});
|
||||
},
|
||||
Clicked:function(data){
|
||||
var el = this.$refs.notification;
|
||||
var count = Number(localStorage.getItem("data-count")) || 0;
|
||||
console.log(count)
|
||||
localStorage.setItem('data-count',count + 1);
|
||||
el.setAttribute('data-count', count+1);
|
||||
el.classList.remove('notify');
|
||||
(function(){
|
||||
return el.offsetWidth;
|
||||
})();
|
||||
el.classList.add('notify');
|
||||
// if(count > 0){
|
||||
el.classList.add('show-count');
|
||||
// }
|
||||
var el = this.$refs.notification;
|
||||
var count = Number(localStorage.getItem("data-count")) || 0;
|
||||
console.log(count)
|
||||
localStorage.setItem('data-count',count + 1);
|
||||
el.setAttribute('data-count', count+1);
|
||||
el.classList.remove('notify');
|
||||
(function(){
|
||||
return el.offsetWidth;
|
||||
})();
|
||||
el.classList.add('notify');
|
||||
// if(count > 0){
|
||||
el.classList.add('show-count');
|
||||
// }
|
||||
},
|
||||
DropdownShow:function(){
|
||||
},
|
||||
@@ -209,21 +223,27 @@ export default {
|
||||
let buttonSearch = document.getElementById('notification');
|
||||
|
||||
if (isClickInside || searchInside || buttonSearch.contains(event.target)) {
|
||||
|
||||
localStorage.setItem('data-count',0);
|
||||
localStorage.setItem('data-count',0);
|
||||
el.setAttribute('data-count', 0);
|
||||
el.classList.remove('show-count');
|
||||
this.dropdownShow = true
|
||||
|
||||
}
|
||||
else{
|
||||
|
||||
this.dropdownShow = false
|
||||
|
||||
|
||||
}
|
||||
|
||||
},
|
||||
getKelulusanList(pageNumber){
|
||||
this.axios.get(this.$hostname + '/admin/ListOperasi/Paginate',{
|
||||
params: {
|
||||
page: pageNumber
|
||||
}
|
||||
}).then(response => {
|
||||
this.showkelulusan = response.data
|
||||
this.paginate = response.data
|
||||
this.currentPage = pageNumber
|
||||
});
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@@ -150,10 +150,11 @@
|
||||
</div>
|
||||
@endif
|
||||
@else
|
||||
@if(Auth::user()->roles == 'operasi')
|
||||
<div class="mr-4">
|
||||
<notify-component></notify-component>
|
||||
</div>
|
||||
|
||||
@endif
|
||||
<logout-component csrftoken="{{ csrf_token() }}" :route={{ json_encode(route('logout')) }}></logout-component>
|
||||
|
||||
<form id="logout-form" action="logout" method="POST" class="d-none">
|
||||
|
||||
Reference in New Issue
Block a user