fix ksit2
This commit is contained in:
@@ -59,16 +59,14 @@ class LoginController extends Controller
|
||||
'password' => 'required|string',
|
||||
]);
|
||||
|
||||
|
||||
$credentials = $request->only('email', 'password');
|
||||
|
||||
if (Auth::guard('web')->attempt($credentials)) {
|
||||
$auth_user = Auth::guard('web')->user();
|
||||
$api_url = config('api.url');
|
||||
if($auth_user['roles'] == 'operasi' || $auth_user['roles'] == 'admin'){
|
||||
|
||||
if($auth_user['roles'] === 'operasi' || $auth_user['roles'] === 'admin'){
|
||||
return redirect()->route('home');
|
||||
}else if($auth_user['roles'] == 'akaun'){
|
||||
}else if($auth_user['roles'] === 'akaun'){
|
||||
return redirect()->route('akaun.home');
|
||||
}
|
||||
else{
|
||||
|
||||
@@ -15,17 +15,17 @@ class HomeController extends Controller
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
// public function __construct()
|
||||
// {
|
||||
// $this->middleware('auth');
|
||||
// }
|
||||
public function __construct()
|
||||
{
|
||||
$this->middleware('auth');
|
||||
}
|
||||
|
||||
/**
|
||||
* Show the application dashboard.
|
||||
*
|
||||
* @return \Illuminate\Contracts\Support\Renderable
|
||||
*/
|
||||
public function index()
|
||||
public function indexhome()
|
||||
{
|
||||
$auth_user = Auth::user();
|
||||
$api_url = config('api.url');
|
||||
@@ -33,7 +33,6 @@ class HomeController extends Controller
|
||||
$harini = Carbon::now();
|
||||
$harini = new Carbon;
|
||||
|
||||
|
||||
return view('home');
|
||||
}
|
||||
|
||||
|
||||
Generated
+53
-10552
File diff suppressed because it is too large
Load Diff
@@ -39,6 +39,7 @@
|
||||
"vue-axios": "^3.4.0",
|
||||
"vue-class-component": "^7.2.6",
|
||||
"vue-content-placeholders": "^0.2.1",
|
||||
"vue-iframes": "0.0.19",
|
||||
"vue-property-decorator": "^9.1.2",
|
||||
"vue-pusher": "^1.1.0",
|
||||
"vue-router": "^3.5.3",
|
||||
|
||||
Vendored
+1964
-145
File diff suppressed because one or more lines are too long
@@ -1,5 +1,6 @@
|
||||
<template>
|
||||
<div class="container">
|
||||
<!-- <modal ref="modal"></modal> -->
|
||||
|
||||
<div class="flex w-full">
|
||||
<div class="w-1/2 p-8 mx-auto">
|
||||
@@ -10,7 +11,7 @@
|
||||
|
||||
<span class="text-center mx-auto text-white font-bold">Laporan Imbang Duga</span>
|
||||
</div>
|
||||
<form method="get" id="formimbangduga" :action="Urlredirect()">
|
||||
<form method="get" ref="formimbangduga" :action="Urlredirect()" target="iframe_laporan">
|
||||
<div class="rounded bg-white shadow p-6">
|
||||
<div class="pb-6">
|
||||
<label for="username" class="font-semibold text-gray-700 block pb-1">Tarikh</label>
|
||||
@@ -19,53 +20,102 @@
|
||||
<input :value="jenisgenerate" type="hidden" name="jenis" />
|
||||
<span style="background-color: #F9FAFB" class="text-gray-600 border border-2 rounded-l px-4 py-2 whitespace-no-wrap">Mula</span>
|
||||
<input id="tarikhmula" name="datetimepicker1" class="border border-2 border-l-0 rounded-r px-4 py-2 w-80r mr-2" type="date" />
|
||||
<button @click.prevent="generatepdf" class=" mr-2 border border-yellow-600 text-yellow-600 font-montserrat py-2 px-8 font-medium rounded-xl hover:bg-yellow-600 hover:text-white transition-all duration-300"><i class="fas fa-file-pdf mr-2"></i>PDF</button>
|
||||
<button @click.prevent="generateview" class="border border-yellow-600 text-yellow-600 font-montserrat py-2 px-8 font-medium rounded-xl hover:bg-yellow-600 hover:text-white transition-all duration-300"><i class="fas fa-eye mr-2"></i>View</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<!-- <iframe class="overflow-x-hidden overflow-y-auto fixed inset-0 z-50 outline-none focus:outline-none justify-center items-center flex bg-white" name="iframe_laporan" width="500" height="500"></iframe> -->
|
||||
<div v-if="showModal" class="overflow-x-hidden overflow-y-auto fixed inset-0 z-50 outline-none focus:outline-none justify-center items-center flex">
|
||||
<div class="relative w-1/2 my-6 mx-auto max-w-6xl">
|
||||
<!--content-->
|
||||
<div class="border-0 rounded-lg shadow-lg relative flex flex-col w-full bg-white outline-none focus:outline-none">
|
||||
<!--header-->
|
||||
<div class="relative p-6" style="height: 80vh;">
|
||||
|
||||
<vue-iframe
|
||||
:src="Urlredirect()"
|
||||
allow="camera *; geolocation *; microphone *; autoplay *"
|
||||
frame-id="iframe_laporan"
|
||||
@load="onLoad"
|
||||
@iframe-load="loaded"
|
||||
name="iframe_laporan"
|
||||
width="500px"
|
||||
height="300px"
|
||||
scrolling="true"
|
||||
/>
|
||||
|
||||
</div>
|
||||
<!--footer-->
|
||||
<div class="flex items-center justify-end p-6 border-t border-solid border-blueGray-200 rounded-b">
|
||||
<button @click.prevent="generatepdf" class="bg-gray-500 hover:bg-gray-700 text-white font-bold py-1 px-3 border border-gray-700 rounded mr-1" :disabled="pendingStatus == 'none'">{{ (pendingStatus == 'loading') ? '' : '' }}<i class="fas fa-file-pdf mr-2"></i>Cetak</button>
|
||||
<button class="bg-gray-500 hover:bg-gray-700 text-white font-bold py-1 px-3 border border-gray-700 rounded mr-1" type="button" v-on:click="toggleModal()" :disabled="pendingStatus == 'none'">
|
||||
<i class="fas fa-window-close mr-2"></i>Tutup
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div v-if="showModal" class="opacity-25 fixed inset-0 z-40 bg-black"></div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
||||
export default {
|
||||
data(){
|
||||
return{
|
||||
jenisgenerate:'none',
|
||||
kodcaw: ''
|
||||
kodcaw: '',
|
||||
showModal:false,
|
||||
myIframe: null,
|
||||
iframesrc:'',
|
||||
pendingStatus:'none'
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
async generatepdf(){
|
||||
await this.setJenis('pdf');
|
||||
|
||||
Vue.swal({
|
||||
title: 'Memuatkan...',
|
||||
allowEscapeKey : false,
|
||||
allowOutsideClick: false,
|
||||
showCancelButton: false,
|
||||
showConfirmButton: false
|
||||
// Vue.swal({
|
||||
// title: 'Memuatkan...',
|
||||
// allowEscapeKey : false,
|
||||
// allowOutsideClick: false,
|
||||
// showCancelButton: false,
|
||||
// showConfirmButton: false
|
||||
|
||||
});
|
||||
// });
|
||||
this.$refs.formimbangduga.submit()
|
||||
|
||||
document.getElementById("formimbangduga").submit();
|
||||
},
|
||||
async generateview(){
|
||||
await this.setJenis('view');
|
||||
|
||||
Vue.swal({
|
||||
title: 'Memuatkan...',
|
||||
allowEscapeKey : false,
|
||||
allowOutsideClick: false,
|
||||
showCancelButton: false,
|
||||
showConfirmButton: false
|
||||
// Vue.swal({
|
||||
// title: 'Memuatkan...',
|
||||
// allowEscapeKey : false,
|
||||
// allowOutsideClick: false,
|
||||
// showCancelButton: false,
|
||||
// showConfirmButton: false
|
||||
|
||||
});
|
||||
// });
|
||||
|
||||
this.showModal = true;
|
||||
|
||||
},
|
||||
toggleModal: function(){
|
||||
this.showModal = !this.showModal;
|
||||
},
|
||||
onLoad(frame) {
|
||||
this.$refs.formimbangduga.submit()
|
||||
this.myIframe = frame.contentWindow
|
||||
},
|
||||
loaded(frame){
|
||||
|
||||
document.getElementById("formimbangduga").submit();
|
||||
},
|
||||
Urlredirect: function() {
|
||||
return window.route('cetak.imbangduga')
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
</router-link>
|
||||
<span class="text-center mx-auto text-white font-bold">Laporan Lejer Am</span>
|
||||
</div>
|
||||
<form method="get" id="formlejeram" target="_blank" :action="Urlredirect()">
|
||||
<form method="get" ref="formlejeram" target="iframe_laporan" :action="Urlredirect()">
|
||||
<div class="rounded bg-white shadow p-6">
|
||||
<div class="pb-6">
|
||||
<div class="flex place-content-center mb-2">
|
||||
@@ -22,7 +22,6 @@
|
||||
</div>
|
||||
|
||||
<div class="flex justify-end mt-10">
|
||||
<button @click.prevent="generatepdf" class=" mr-2 border border-yellow-600 text-yellow-600 font-montserrat py-2 px-8 font-medium rounded-xl hover:bg-yellow-600 hover:text-white transition-all duration-300"><i class="fas fa-file-pdf mr-2"></i>PDF</button>
|
||||
<button @click.prevent="generateview" class="border border-yellow-600 text-yellow-600 font-montserrat py-2 px-8 font-medium rounded-xl hover:bg-yellow-600 hover:text-white transition-all duration-300"><i class="fas fa-eye mr-2"></i>View</button>
|
||||
</div>
|
||||
</div>
|
||||
@@ -30,6 +29,40 @@
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div v-if="showModal" class="overflow-x-hidden overflow-y-auto fixed inset-0 z-50 outline-none focus:outline-none justify-center items-center flex">
|
||||
<div class="relative w-1/2 my-6 mx-auto max-w-6xl">
|
||||
<!--content-->
|
||||
<div class="border-0 rounded-lg shadow-lg relative flex flex-col w-full bg-white outline-none focus:outline-none">
|
||||
<!--header-->
|
||||
<div class="relative p-6" style="height: 80vh;">
|
||||
|
||||
<vue-iframe
|
||||
:src="Urlredirect()"
|
||||
allow="camera *; geolocation *; microphone *; autoplay *"
|
||||
frame-id="iframe_laporan"
|
||||
@load="onLoad"
|
||||
@iframe-load="loaded"
|
||||
name="iframe_laporan"
|
||||
width="500px"
|
||||
height="300px"
|
||||
scrolling="true"
|
||||
/>
|
||||
|
||||
</div>
|
||||
<!--footer-->
|
||||
<div class="flex items-center justify-end p-6 border-t border-solid border-blueGray-200 rounded-b">
|
||||
<button @click.prevent="generatepdf" class=" mr-2 border border-yellow-600 text-yellow-600 font-montserrat py-2 px-8 font-medium rounded-xl hover:bg-yellow-600 hover:text-white transition-all duration-300"><i class="fas fa-file-pdf mr-2"></i>PDF</button>
|
||||
|
||||
<button class="bg-gray-500 hover:bg-gray-700 text-white font-bold py-1 px-3 border border-gray-700 rounded mr-1" type="button" v-on:click="toggleModal()">
|
||||
Tutup
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div v-if="showModal" class="opacity-25 fixed inset-0 z-40 bg-black"></div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -38,7 +71,10 @@ export default {
|
||||
data(){
|
||||
return{
|
||||
jenisgenerate:'none',
|
||||
kodcaw:''
|
||||
kodcaw:'',
|
||||
showModal:false,
|
||||
myIframe: null,
|
||||
iframesrc:''
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
@@ -59,17 +95,31 @@ export default {
|
||||
async generateview(){
|
||||
await this.setJenis('view');
|
||||
|
||||
Vue.swal({
|
||||
title: 'Memuatkan...',
|
||||
allowEscapeKey : false,
|
||||
allowOutsideClick: false,
|
||||
showCancelButton: false,
|
||||
showConfirmButton: false,
|
||||
timer: 8000,
|
||||
// Vue.swal({
|
||||
// title: 'Memuatkan...',
|
||||
// allowEscapeKey : false,
|
||||
// allowOutsideClick: false,
|
||||
// showCancelButton: false,
|
||||
// showConfirmButton: false,
|
||||
// timer: 8000,
|
||||
|
||||
});
|
||||
// });
|
||||
this.showModal = true;
|
||||
|
||||
document.getElementById("formlejeram").submit();
|
||||
this.$refs.formlejeram.submit()
|
||||
|
||||
},
|
||||
toggleModal: function(){
|
||||
this.showModal = !this.showModal;
|
||||
},
|
||||
onLoad(frame) {
|
||||
this.$refs.formlejeram.submit()
|
||||
this.myIframe = frame.contentWindow
|
||||
console.log('loaded')
|
||||
|
||||
},
|
||||
loaded(frame){
|
||||
console.log('asdas')
|
||||
},
|
||||
Urlredirect: function() {
|
||||
return window.route('cetak.lejeram')
|
||||
|
||||
Vendored
+2
-1
@@ -19,11 +19,12 @@ import router from './routes'
|
||||
import Vuelidate from 'vuelidate'
|
||||
import datetime from 'vuejs-datetimepicker';
|
||||
import VueContentPlaceholders from 'vue-content-placeholders'
|
||||
|
||||
import VueIframe from 'vue-iframes'
|
||||
import VueSweetalert2 from 'vue-sweetalert2';
|
||||
import 'sweetalert2/dist/sweetalert2.min.css';
|
||||
|
||||
Vue.use(VueSweetalert2);
|
||||
Vue.use(VueIframe)
|
||||
|
||||
require('./bootstrap');
|
||||
|
||||
|
||||
@@ -7,21 +7,8 @@
|
||||
<!--content-->
|
||||
<div class="border-0 rounded-lg shadow-lg relative flex flex-col w-full bg-white outline-none focus:outline-none">
|
||||
<!--header-->
|
||||
<!-- <div class="flex items-start bg-gray-200 justify-between p-5 border-b border-solid border-blueGray-200 rounded-t">
|
||||
<h3 class="text-3xl font-semibold">
|
||||
Pemeriksaan Aliran Tunai
|
||||
</h3>
|
||||
<button class="p-1 ml-auto border-0 text-black opacity-5 float-right text-3xl leading-none font-semibold outline-none focus:outline-none" v-on:click="toggleModal()">
|
||||
<span class=" text-black opacity-5 h-6 w-6 text-2xl block outline-none focus:outline-none">
|
||||
×
|
||||
</span>
|
||||
</button>
|
||||
</div> -->
|
||||
<!--body-->
|
||||
<div class="relative p-6 flex-auto">
|
||||
<!-- <p class="my-4 text-blueGray-500 text-lg leading-relaxed">
|
||||
|
||||
</p> -->
|
||||
|
||||
<h3 class="text-center text-3xl font-semibold">
|
||||
Daftar Senarai Hitam
|
||||
@@ -90,7 +77,6 @@
|
||||
<transition
|
||||
enter-active-class="transition-all transform duration-200 ease-out"
|
||||
>
|
||||
<div v-if="showModal" class="opacity-25 fixed inset-0 z-40 bg-black"></div>
|
||||
</transition>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -0,0 +1,102 @@
|
||||
<template>
|
||||
<div>
|
||||
<div v-if="showModal" class="overflow-x-hidden overflow-y-auto fixed inset-0 z-50 outline-none focus:outline-none justify-center items-center flex">
|
||||
<div class="relative w-auto my-6 mx-auto max-w-6xl">
|
||||
<!--content-->
|
||||
<div class="border-0 rounded-lg shadow-lg relative flex flex-col w-full bg-white outline-none focus:outline-none">
|
||||
<!--header-->
|
||||
<div class="flex items-start bg-gray-200 justify-between p-5 border-b border-solid border-blueGray-200 rounded-t">
|
||||
<h3 class="text-xl font-semibold">
|
||||
Laporan
|
||||
</h3>
|
||||
<button class="p-1 ml-auto border-0 text-black opacity-5 float-right text-3xl leading-none font-semibold outline-none focus:outline-none" v-on:click="toggleModal()">
|
||||
<span class=" text-black opacity-5 h-6 w-6 text-2xl block outline-none focus:outline-none">
|
||||
X
|
||||
</span>
|
||||
</button>
|
||||
</div>
|
||||
<!--body-->
|
||||
<div class="relative p-6 flex-auto">
|
||||
|
||||
<!-- <iframe name="iframe_laporan"></iframe> -->
|
||||
<vue-iframe
|
||||
|
||||
allow="camera *; geolocation *; microphone *; autoplay *"
|
||||
frame-id="frame_laporan"
|
||||
@load="onLoad"
|
||||
name="iframe_laporan"
|
||||
width="500px"
|
||||
height="500px"
|
||||
/>
|
||||
|
||||
</div>
|
||||
<!--footer-->
|
||||
<div class="flex items-center justify-end p-6 border-t border-solid border-blueGray-200 rounded-b">
|
||||
<button class="bg-gray-500 hover:bg-gray-700 text-white font-bold py-2 px-4 border border-gray-700 rounded mr-1" type="button" v-on:click="toggleModal()">
|
||||
Batal
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div v-if="showModal" class="opacity-25 fixed inset-0 z-40 bg-black"></div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import datetime from 'vuejs-datetimepicker';
|
||||
|
||||
export default {
|
||||
name: "modal",
|
||||
components:{
|
||||
datetime
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
showModal: false,
|
||||
referencestatus: 'PAID',
|
||||
status: [
|
||||
'PAID',
|
||||
'UNSUCCESSFUL',
|
||||
'NOT PAID'
|
||||
],
|
||||
statusid: 0,
|
||||
datepaidat:'',
|
||||
myIframe: null
|
||||
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
toggleModal: function(){
|
||||
this.showModal = !this.showModal;
|
||||
},
|
||||
onLoad(frame) {
|
||||
|
||||
this.$emit('clickLaporan_');
|
||||
this.myIframe = frame.contentWindow
|
||||
},
|
||||
// async simpan(){
|
||||
|
||||
// let response = await this.postData()
|
||||
|
||||
// if(response.data === 1)
|
||||
// {
|
||||
// this.showModal = !this.showModal;
|
||||
// this.$toast.success('Berjaya menukar status!')
|
||||
// setTimeout(()=>{
|
||||
// this.$emit('togtable')
|
||||
// },1000);
|
||||
// }
|
||||
// },
|
||||
// postData: function(){
|
||||
|
||||
// return this.axios.post(this.$hostname + '/admin/simpanStatus',
|
||||
// {
|
||||
// id: this.statusid,
|
||||
// status: this.referencestatus,
|
||||
// paidat: this.datepaidat
|
||||
// });
|
||||
// }
|
||||
}
|
||||
}
|
||||
</script>
|
||||
+6
-5
@@ -13,10 +13,10 @@ use Illuminate\Support\Facades\Route;
|
||||
|
|
||||
*/
|
||||
|
||||
Route::get('/', function () {
|
||||
// return view('home');
|
||||
return redirect()->route('login');
|
||||
});
|
||||
// Route::get('/', function () {
|
||||
// // return view('home');
|
||||
// return redirect()->route('login');
|
||||
// });
|
||||
|
||||
// Auth::routes();
|
||||
Route::get('logs', [\Rap2hpoutre\LaravelLogViewer\LogViewerController::class, 'index']);
|
||||
@@ -28,7 +28,8 @@ Route::post('logout', ['as' => 'logout', 'uses' => 'App\Http\Controllers\Auth\Lo
|
||||
Route::get('login', 'App\Http\Controllers\Auth\LoginController@login')->name('login');
|
||||
Route::post('login', 'App\Http\Controllers\Auth\LoginController@authenticate');
|
||||
|
||||
Route::get('/home', [App\Http\Controllers\HomeController::class, 'index'])->name('home')->middleware(['roleChecker:admin,null,operasi']);
|
||||
Route::get('/', [App\Http\Controllers\HomeController::class,'indexhome'])->name('home');
|
||||
Route::get('/home', [App\Http\Controllers\HomeController::class, 'indexhome'])->name('home')->middleware(['roleChecker:admin,null,operasi']);
|
||||
Route::get('/akaunhome', [App\Http\Controllers\HomeController::class, 'indexakaun'])->name('akaun.home')->middleware(['roleChecker:admin,akaun,operasi']);
|
||||
|
||||
//Tunai
|
||||
|
||||
Reference in New Issue
Block a user