This commit is contained in:
fifi97
2021-12-19 09:38:13 +08:00
parent c4b893d809
commit fd6db94385
19 changed files with 2248 additions and 1014 deletions
@@ -63,7 +63,7 @@ class LoginController extends Controller
$api_url = config('api.url');
if($auth_user['roles'] == 'admin'){
if($auth_user['roles'] == 'admin' && $auth_user['operasi'] == 'operasi'){
$user = User::find($auth_user['id']);
$user->cawangan = $request->cawangan;
$user->save();
+1 -11
View File
@@ -33,18 +33,8 @@ class HomeController extends Controller
$harini = Carbon::now();
$harini = new Carbon;
$arrayPembiayaan = array(['name' => 'Pembiayaan (RM)','data' => []]);
$arrayPenyelesaian = array(['name' => 'Penebusan (RM)','data' => []]);
$arrayKeuntungan = array(['name' => 'Actual','data' => []]);
//Hari Ini
$ringkasanharian = Http::get(config('api.url'). '/api/gadai/laporan/ringkasanharian/'. $auth_user['cawangan'],['tarikh' => $harini->toDateString()])->json();
$ringkasanharian = $ringkasanharian[0];
$keseluruhanupahharian = $ringkasanharian['lelongupahsimpan'] + $ringkasanharian['tebus'][0]['upahsimpan'] + $ringkasanharian['advansur'][0]['upahsimpan'];
return view('home',compact('ringkasanharian','keseluruhanupahharian'));
return view('home');
}
+1 -1
View File
@@ -31,7 +31,7 @@ class PelangganController extends Controller
$cawangan=Http::get(config('api.url').'/api/cawangan/detail/'.$auth_user['cawangan'])->json();
$cawangan_detail=$cawangan[0];
$customer_info = Http::get(config('api.url') . '/api/customers/'. $id)->json();
$customer_info = Http::get(config('api.url') . '/admin/Customers/'. $id)->json();
return view('pelanggan.detailspelanggan',compact('api_url','cawangan_info','auth_user','customer_info'));
}
+1391 -680
View File
File diff suppressed because it is too large Load Diff
+2
View File
@@ -78,6 +78,8 @@ Vue.component('online-component', require('./Online/Online.vue').default)
Vue.component('details-pelanggan', require('./pages/Detailspelanggan.vue').default)
Vue.component('harian-component', require('./components/Analisa/Harian.vue').default)
+137
View File
@@ -0,0 +1,137 @@
<template>
<div class="mb-4 w-full grid grid-cols-1 md:grid-cols-2 xl:grid-cols-3 gap-4">
<div class="bg-white shadow rounded-lg p-4 sm:p-6 xl:p-8 ">
<div class="flex items-center">
<div class="flex-shrink-0">
<span class="text-2xl sm:text-3xl leading-none font-bold text-gray-900">RM {{ gadaianharian }}</span>
<h3 class="text-base font-normal text-gray-500">Pembiayaan Hari Ini</h3>
</div>
<div class="ml-5 w-0 flex items-center justify-end flex-1 text-green-500 text-base font-bold">
{{ percentgadaian }}%
<svg class="w-5 h-5" fill="currentColor" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg">
<path fill-rule="evenodd" d="M5.293 7.707a1 1 0 010-1.414l4-4a1 1 0 011.414 0l4 4a1 1 0 01-1.414 1.414L11 5.414V17a1 1 0 11-2 0V5.414L6.707 7.707a1 1 0 01-1.414 0z" clip-rule="evenodd"></path>
</svg>
</div>
</div>
</div>
<div class="bg-white shadow rounded-lg p-4 sm:p-6 xl:p-8 ">
<div class="flex items-center">
<div class="flex-shrink-0">
<span class="text-2xl sm:text-3xl leading-none font-bold text-gray-900">RM {{ penebusanharian }}</span>
<h3 class="text-base font-normal text-gray-500">Penebusan Hari Ini</h3>
</div>
<div class="ml-5 w-0 flex items-center justify-end flex-1 text-green-500 text-base font-bold">
{{ percentpenebusan }}%
<svg class="w-5 h-5" fill="currentColor" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg">
<path fill-rule="evenodd" d="M5.293 7.707a1 1 0 010-1.414l4-4a1 1 0 011.414 0l4 4a1 1 0 01-1.414 1.414L11 5.414V17a1 1 0 11-2 0V5.414L6.707 7.707a1 1 0 01-1.414 0z" clip-rule="evenodd"></path>
</svg>
</div>
</div>
</div>
<div class="bg-white shadow rounded-lg p-4 sm:p-6 xl:p-8 ">
<div class="flex items-center">
<div class="flex-shrink-0">
<span class="text-2xl sm:text-3xl leading-none font-bold text-gray-900">RM {{ keuntunganharian }}</span>
<h3 class="text-base font-normal text-gray-500">Keuntungan Hari Ini</h3>
</div>
<div class="ml-5 w-0 flex items-center justify-end flex-1 text-red-500 text-base font-bold">
{{ percentkeuntungan }}%
<svg class="w-5 h-5" fill="currentColor" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg">
<path fill-rule="evenodd" d="M14.707 12.293a1 1 0 010 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 111.414-1.414L9 14.586V3a1 1 0 012 0v11.586l2.293-2.293a1 1 0 011.414 0z" clip-rule="evenodd"></path>
</svg>
</div>
</div>
</div>
</div>
</template>
<script>
const formatter = new Intl.NumberFormat('en-US', {
minimumFractionDigits: 2
});
export default {
props:{
kodcaw: String
},
data() {
return {
keuntunganharian:0,
percentkeuntungan:0,
penebusanharian:0,
percentpenebusan:0,
gadaianharian:0,
percentgadaian:0
};
},
created() {
this.getDataPembiayaan()
this.getDataPenebusan()
this.getDataKeuntungan()
},
methods: {
getDataPembiayaan() {
this.axios.get('http://localhost:8000/admin/pembiayaanToday', {
params: {
kodcaw: this.$props.kodcaw
}
}).then(response => {
this.gadaianharian = formatter.format(response.data[0].gadaiToday)
this.percentgadaian = response.data[0].percentDiff.toFixed(2)
}).catch(error => {
console.log(error)
})
},
getDataPenebusan(){
this.axios.get('http://localhost:8000/admin/penebusanToday', {
params: {
kodcaw: this.$props.kodcaw
}
}).then(response => {
this.penebusanharian = formatter.format(response.data[0].tebusToday)
this.percentpenebusan = response.data[0].percentDiff.toFixed(2)
}).catch(error => {
console.log(error)
})
},
getDataKeuntungan(){
this.axios.get('http://localhost:8000/admin/keuntunganToday', {
params: {
kodcaw: this.$props.kodcaw
}
}).then(response => {
this.keuntunganharian = formatter.format(response.data[0].upahToday)
this.percentkeuntungan = response.data[0].percentDiff.toFixed(2)
}).catch(error => {
console.log(error)
})
}
},
mounted () {
var channel = this.$pusher.subscribe('gadai-notify');
channel.bind('trigger-gadai', ({ response }) => {
// console.log(`${response}`);
this.getDataPembiayaan()
});
var channel = this.$pusher.subscribe('tebus-notify');
channel.bind('trigger-tebus', ({ response }) => {
// console.log(`${response}`);
this.getDataPenebusan()
});
var channel = this.$pusher.subscribe('keuntungan-notify');
channel.bind('trigger-keuntungan', ({ response }) => {
// console.log(`${response}`);
this.getDataKeuntungan()
});
}
}
</script>
+1
View File
@@ -6,6 +6,7 @@
<a class="text-yellow-200 rounded bg-gray-400 px-4 py-3 font-bold mr-4 uppercase md:invisible xl:visible">
<i v-if="this.roles == 'admin'" class="fas fa-1x fa-user-lock"></i>
<i v-if="this.roles == 'akaun'" class="fas fa-1x fa-calculator"></i>
<i v-if="this.roles == 'operasi'" class="fas fa-1x fa-user-cog"></i>
</a>
</div>
</template>
+1 -1
View File
@@ -11,7 +11,7 @@
<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" role="none">
<a v-for="(cust,i) in arrayCustomer" :key="i" class="text-gray-700 block px-4 py-2 text-sm hover:bg-yellow-500" role="menuitem" tabindex="-1" id="menu-item-0" :href="Urlredirect({ cust: cust.kpbaru })" v-on:click="ClickUrl($event)">{{ cust.nama }}<br><b>{{ (cust.kpbaru) ? cust.kpbaru : cust.kplama }}</b></a>
<a v-for="(cust,i) in arrayCustomer" :key="i" class="text-gray-700 block px-4 py-2 text-sm hover:bg-yellow-500" role="menuitem" tabindex="-1" id="menu-item-0" :href="Urlredirect({ cust: cust.id })" v-on:click="ClickUrl($event)">{{ cust.nama }}<br><b>{{ (cust.kpbaru) ? cust.kpbaru : cust.kplama }}</b></a>
</div>
</div>
</div>
+354
View File
@@ -0,0 +1,354 @@
<template>
<div class="container mx-auto px-5 my-10">
<modal ref="modal"></modal>
<nav>
<ul class="flex flex-wrap -ml-2 -mt-2">
<li v-for="(item, index) in $props.items" :key="index" class="mt-2 pl-2">
<button
:class="[
'relative px-4 py-2 overflow-hidden',
'transition-colors duration-200',
'bg-black text-white',
'hover:bg-gray-400 hover:text-black'
]"
:disabled="$data.index === index"
@click="setItem(index)"
v-text="item.kodlaluan"
/>
</li>
</ul>
</nav>
<transition
enter-active-class="transition-all transform duration-200 ease-out"
leave-active-class="transition-all transform duration-200 ease-in"
:enter-class="`${
$data.leftToRight ? '-translate-x-10' : 'translate-x-10'
} opacity-0`"
enter-to-class="translate-0 opacity-100"
leave-class="translate-0 opacity-100"
:leave-to-class="`${
$data.leftToRight ? 'translate-x-10' : '-translate-x-10'
} opacity-0`"
mode="out-in"
>
<article
:key="$data.index"
class="mt-12 lg:mt-16 prose prose-sm lg:prose-lg"
>
<table class="min-w-full leading-normal">
<thead class="text-center">
<tr>
<th class="px-5 py-3 border-b-2 border-gray-200 bg-gray-100 text-left text-xs font-semibold text-gray-600 uppercase tracking-wider">
Bil
</th>
<th class="px-5 py-3 border-b-2 border-gray-200 bg-gray-100 text-left text-xs font-semibold text-gray-600 uppercase tracking-wider">
Tarikh
</th>
<th class="px-5 py-3 border-b-2 border-gray-200 bg-gray-100 text-left text-xs font-semibold text-gray-600 uppercase tracking-wider">
B/F
</th>
<th class="px-5 py-3 border-b-2 border-gray-200 bg-gray-100 text-left text-xs font-semibold text-gray-600 uppercase tracking-wider">
Pendahuluan
</th>
<th class="px-5 py-3 border-b-2 border-gray-200 bg-gray-100 text-left text-xs font-semibold text-gray-600 uppercase tracking-wider">
Serahan
</th>
<th class="px-5 py-3 border-b-2 border-gray-200 bg-gray-100 text-left text-xs font-semibold text-gray-600 uppercase tracking-wider">
Gadaian
</th>
<th class="px-5 py-3 border-b-2 border-gray-200 bg-gray-100 text-left text-xs font-semibold text-gray-600 uppercase tracking-wider">
Penebusan
</th>
<th class="px-5 py-3 border-b-2 border-gray-200 bg-gray-100 text-left text-xs font-semibold text-gray-600 uppercase tracking-wider">
C/F
</th>
<th class="px-5 py-3 border-b-2 border-gray-200 bg-gray-100 text-left text-xs font-semibold text-gray-600 uppercase tracking-wider">
Act
</th>
</tr>
</thead>
<tbody>
<tr v-for="(tunai,i) in active.pecahantunai" :key="i">
<td class="px-5 py-5 border-b border-gray-200 bg-white text-sm">
<div class="flex items-center">
<div class="ml-3">
<p class="text-gray-900 whitespace-no-wrap" v-text="(i+1+active.mulaPage)">
</p>
</div>
</div>
</td>
<td class="px-5 py-5 border-b border-gray-200 bg-white text-sm">
<div class="flex items-center">
<div class="ml-3">
<p class="text-gray-900 whitespace-no-wrap" v-text="tunai.tarikh">
</p>
</div>
</div>
</td>
<td class="px-5 py-5 border-b border-gray-200 bg-white text-sm">
<div class="flex items-center">
<div class="ml-3">
<p class="text-gray-900 whitespace-no-wrap" v-text="formatterfunction(tunai.bakiawal)">
</p>
</div>
</div>
</td>
<td class="px-5 py-5 border-b border-gray-200 bg-white text-sm">
<div class="flex items-center">
<div class="ml-3">
<p class="text-gray-900 whitespace-no-wrap" v-text="formatterfunction(tunai.tambah)">
</p>
</div>
</div>
</td>
<td class="px-5 py-5 border-b border-gray-200 bg-white text-sm">
<div class="flex items-center">
<div class="ml-3">
<p class="text-gray-900 whitespace-no-wrap" v-text="formatterfunction(tunai.kurang)">
</p>
</div>
</div>
</td>
<td class="px-5 py-5 border-b border-gray-200 bg-white text-sm">
<div class="flex items-center">
<div class="ml-3">
<p class="text-gray-900 whitespace-no-wrap" v-text="formatterfunction(tunai.keluar)">
</p>
</div>
</div>
</td>
<td class="px-5 py-5 border-b border-gray-200 bg-white text-sm">
<div class="flex items-center">
<div class="ml-3">
<p class="text-gray-900 whitespace-no-wrap" v-text="formatterfunction(tunai.masuk)">
</p>
</div>
</div>
</td>
<td class="px-5 py-5 border-b border-gray-200 bg-white text-sm">
<div class="flex items-center">
<div class="ml-3">
<p class="text-gray-900 whitespace-no-wrap" v-text="formatterfunction(tunai.baki)">
</p>
</div>
</div>
</td>
<td class="px-5 py-5 border-b border-gray-200 bg-white text-sm">
<div class="flex items-center">
<div class="ml-3">
<button @click="action(tunai.tarikh,tunai.kodcaw,tunai.kodlaluan)" class="border border-yellow-600 text-yellow-600 font-montserrat py-2 px-4 font-medium rounded-xl hover:bg-yellow-600 hover:text-white transition-all duration-300"><svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-card-checklist" viewBox="0 0 16 16">
<path d="M14.5 3a.5.5 0 0 1 .5.5v9a.5.5 0 0 1-.5.5h-13a.5.5 0 0 1-.5-.5v-9a.5.5 0 0 1 .5-.5h13zm-13-1A1.5 1.5 0 0 0 0 3.5v9A1.5 1.5 0 0 0 1.5 14h13a1.5 1.5 0 0 0 1.5-1.5v-9A1.5 1.5 0 0 0 14.5 2h-13z"/>
<path d="M7 5.5a.5.5 0 0 1 .5-.5h5a.5.5 0 0 1 0 1h-5a.5.5 0 0 1-.5-.5zm-1.496-.854a.5.5 0 0 1 0 .708l-1.5 1.5a.5.5 0 0 1-.708 0l-.5-.5a.5.5 0 1 1 .708-.708l.146.147 1.146-1.147a.5.5 0 0 1 .708 0zM7 9.5a.5.5 0 0 1 .5-.5h5a.5.5 0 0 1 0 1h-5a.5.5 0 0 1-.5-.5zm-1.496-.854a.5.5 0 0 1 0 .708l-1.5 1.5a.5.5 0 0 1-.708 0l-.5-.5a.5.5 0 0 1 .708-.708l.146.147 1.146-1.147a.5.5 0 0 1 .708 0z"/>
</svg>
</button>
</div>
</div>
</td>
</tr>
</tbody>
</table>
<div class="bg-white px-4 py-3 flex items-center justify-between border-t border-gray-200 sm:px-6">
<div class="flex-1 flex justify-between sm:hidden">
<a href="#" class="relative inline-flex items-center px-4 py-2 border border-gray-300 text-sm font-medium rounded-md text-gray-700 bg-white hover:bg-gray-50">
Previous
</a>
<a href="#" class="ml-3 relative inline-flex items-center px-4 py-2 border border-gray-300 text-sm font-medium rounded-md text-gray-700 bg-white hover:bg-gray-50">
Next
</a>
</div>
<div class="hidden sm:flex-1 sm:flex sm:items-center sm:justify-between">
<div>
<p class="text-sm text-gray-700">
Showing
{{ ' ' }}
<span class="font-medium">{{ this.currentPage }}</span>
{{ ' ' }}
to
{{ ' ' }}
<template v-if="this.totalPage <= this.perPage">
<span class="font-medium">{{ this.totalPage }}</span>
</template>
<template v-else>
<span class="font-medium">{{ this.lastPage }}</span>
</template>
{{ ' ' }}
of
{{ ' ' }}
<span class="font-medium">{{ this.totalPage }}</span>
{{ ' ' }}
results
</p>
</div>
<div>
<nav class="relative z-0 inline-flex rounded-md shadow-sm -space-x-px" aria-label="Pagination">
<a href="#" class="relative inline-flex items-center px-2 py-2 rounded-l-md border border-gray-300 bg-white text-sm font-medium text-gray-500 hover:bg-gray-50">
<span class="sr-only">Previous</span>
<ChevronLeftIcon class="h-5 w-5" aria-hidden="true" />
</a>
<!-- Current: "z-10 bg-indigo-50 border-indigo-500 text-indigo-600", Default: "bg-white border-gray-300 text-gray-500 hover:bg-gray-50" -->
<template v-for="(row,i) in rows">
<a v-if="(i+1) == activePage" :key="i" href="#" aria-current="page" class="z-10 bg-indigo-50 border-indigo-500 text-indigo-600 relative inline-flex items-center px-4 py-2 border text-sm font-medium">
{{ activePage }}
</a>
<a v-if="(i+1) > activePage && (i+1) < activePage + 3" :key="'A'+i" @click="setActive(i)" href="#" class="bg-white border-gray-300 text-gray-500 hover:bg-gray-50 relative inline-flex items-center px-4 py-2 border text-sm font-medium">
{{ i + 1 }}
</a>
<span v-if="(i+1) == activePage + 3" :key="'B'+i" class="relative inline-flex items-center px-4 py-2 border border-gray-300 bg-white text-sm font-medium text-gray-700">
...
</span>
<a v-else-if="(i+1) > (rows-3)" :key="'C' + i" @click="setActive(i)" href="#" class="bg-white border-gray-300 text-gray-500 hover:bg-gray-50 relative inline-flex items-center px-4 py-2 border text-sm font-medium">
{{ i + 1}}
</a>
</template>
<!-- <a href="#" class="bg-white border-gray-300 text-gray-500 hover:bg-gray-50 relative inline-flex items-center px-4 py-2 border text-sm font-medium">
{{ i+1 }}
</a> -->
<!-- <a href="#" class="bg-white border-gray-300 text-gray-500 hover:bg-gray-50 hidden md:inline-flex relative items-center px-4 py-2 border text-sm font-medium">
3
</a>
<span class="relative inline-flex items-center px-4 py-2 border border-gray-300 bg-white text-sm font-medium text-gray-700">
...
</span>
<a href="#" class="bg-white border-gray-300 text-gray-500 hover:bg-gray-50 hidden md:inline-flex relative items-center px-4 py-2 border text-sm font-medium">
8
</a>
<a href="#" class="bg-white border-gray-300 text-gray-500 hover:bg-gray-50 relative inline-flex items-center px-4 py-2 border text-sm font-medium">
9
</a>
<a href="#" class="bg-white border-gray-300 text-gray-500 hover:bg-gray-50 relative inline-flex items-center px-4 py-2 border text-sm font-medium">
10
</a> -->
<a href="#" class="relative inline-flex items-center px-2 py-2 rounded-r-md border border-gray-300 bg-white text-sm font-medium text-gray-500 hover:bg-gray-50">
<span class="sr-only">Next</span>
<ChevronRightIcon class="h-5 w-5" aria-hidden="true" />
</a>
</nav>
</div>
</div>
<!-- <pagination :data="active"></pagination> -->
</div>
<!-- <h1 v-text="active.kodlaluan" />
<p v-text="active.kodlaluan" /> -->
</article>
</transition>
</div>
</template>
<script>
import { ChevronLeftIcon, ChevronRightIcon } from '@vue-hero-icons/solid'
import modal from './util/Modal.vue'
import pagination from './pagination.vue'
const formatter = new Intl.NumberFormat('en-US', {
minimumFractionDigits: 2
});
export default {
components: {
ChevronLeftIcon,
ChevronRightIcon,
modal,
pagination
},
props: {
items: {
type: Array
},
arraytunai: {
type: Array
}
},
data() {
return {
index: 0,
leftToRight: true,
alirantunai:[],
perPage: 5,
totalPage: 0,
currentPage: 1,
lastPage: 5,
activePage: 1
};
},
// created: function() {
// console.log(this.items);
// console.log(this.arraytunai);
// },
computed: {
active() {
let tunaidibahagi = this.$props.arraytunai[this.$data.index]
let jumsplit = this.activePage*this.perPage
let mulaPage = jumsplit - (this.perPage);
this.currentPage = mulaPage+1
this.lastPage = jumsplit
let pecahantunai = tunaidibahagi.slice(mulaPage, jumsplit)
return {pecahantunai,mulaPage,jumsplit}
},
rows() {
this.totalPage = this.$props.arraytunai[this.$data.index].length
let totaldibahagi = parseInt(this.totalPage/this.perPage)
return totaldibahagi
}
},
methods: {
setActive(index){
this.activePage = index + 1
},
setItem(index) {
// Update LTR before changing $data.index
this.$data.leftToRight = index > this.$data.index;
this.$data.index = index;
this.activePage = 1;
},
action(tarikhteller,kodcawteller,tel){
axios.get('/api/check/periksaalirantunai', {
params: {
tarikh: tarikhteller,
kodcaw: kodcawteller,
teller: tel
}
}).then(response => {
if(response.data === 'sama')
{
this.$toast("Nilai Tunai sama dengan nilat tunai");
}else{
this.alirantunai = response.data;
this.$refs.modal.showModal = true;
this.$refs.modal.serahan = formatter.format(this.alirantunai.serahan);
this.$refs.modal.bakiawal = formatter.format(this.alirantunai.bakiawal);
this.$refs.modal.bakiakhir = formatter.format(this.alirantunai.bakisemasa);
this.$refs.modal.pendahuluan = formatter.format(this.alirantunai.pendahuluan);
this.$refs.modal.penebusan = formatter.format(this.alirantunai.penebusan);
this.$refs.modal.gadaian = formatter.format(this.alirantunai.gadaian);
}
});
},
formatterfunction: function(value){
return formatter.format(value)
}
}
}
</script>
+43 -111
View File
@@ -1,6 +1,7 @@
<template>
<div class="container mx-auto px-5 my-10">
<modal ref="modal"></modal>
<modal ref="modal" @clickEvent_="getTunai"></modal>
<nav>
<ul class="flex flex-wrap -ml-2 -mt-2">
<li v-for="(item, index) in $props.items" :key="index" class="mt-2 pl-2">
@@ -12,7 +13,7 @@
'hover:bg-gray-400 hover:text-black'
]"
:disabled="$data.index === index"
@click="setItem(index)"
@click="setItem(index,item.kodlaluan)"
v-text="item.kodlaluan"
/>
</li>
@@ -71,11 +72,11 @@
</tr>
</thead>
<tbody>
<tr v-for="(tunai,i) in active.pecahantunai" :key="i">
<tr v-for="(tunai,i) in showtunai.data" :key="i">
<td class="px-5 py-5 border-b border-gray-200 bg-white text-sm">
<div class="flex items-center">
<div class="ml-3">
<p class="text-gray-900 whitespace-no-wrap" v-text="(i+1+active.mulaPage)">
<p class="text-gray-900 whitespace-no-wrap" v-text="(showtunai.from + i)">
</p>
</div>
</div>
@@ -159,80 +160,7 @@
Next
</a>
</div>
<div class="hidden sm:flex-1 sm:flex sm:items-center sm:justify-between">
<div>
<p class="text-sm text-gray-700">
Showing
{{ ' ' }}
<span class="font-medium">{{ this.currentPage }}</span>
{{ ' ' }}
to
{{ ' ' }}
<template v-if="this.totalPage <= this.perPage">
<span class="font-medium">{{ this.totalPage }}</span>
</template>
<template v-else>
<span class="font-medium">{{ this.lastPage }}</span>
</template>
{{ ' ' }}
of
{{ ' ' }}
<span class="font-medium">{{ this.totalPage }}</span>
{{ ' ' }}
results
</p>
</div>
<div>
<nav class="relative z-0 inline-flex rounded-md shadow-sm -space-x-px" aria-label="Pagination">
<a href="#" class="relative inline-flex items-center px-2 py-2 rounded-l-md border border-gray-300 bg-white text-sm font-medium text-gray-500 hover:bg-gray-50">
<span class="sr-only">Previous</span>
<ChevronLeftIcon class="h-5 w-5" aria-hidden="true" />
</a>
<!-- Current: "z-10 bg-indigo-50 border-indigo-500 text-indigo-600", Default: "bg-white border-gray-300 text-gray-500 hover:bg-gray-50" -->
<template v-for="(row,i) in rows">
<a v-if="(i+1) == activePage" :key="i" href="#" aria-current="page" class="z-10 bg-indigo-50 border-indigo-500 text-indigo-600 relative inline-flex items-center px-4 py-2 border text-sm font-medium">
{{ activePage }}
</a>
<a v-if="(i+1) > activePage && (i+1) < activePage + 3" :key="'A'+i" @click="setActive(i)" href="#" class="bg-white border-gray-300 text-gray-500 hover:bg-gray-50 relative inline-flex items-center px-4 py-2 border text-sm font-medium">
{{ i + 1 }}
</a>
<span v-if="(i+1) == activePage + 3" :key="'B'+i" class="relative inline-flex items-center px-4 py-2 border border-gray-300 bg-white text-sm font-medium text-gray-700">
...
</span>
<a v-else-if="(i+1) > (rows-3)" :key="'C' + i" @click="setActive(i)" href="#" class="bg-white border-gray-300 text-gray-500 hover:bg-gray-50 relative inline-flex items-center px-4 py-2 border text-sm font-medium">
{{ i + 1}}
</a>
</template>
<!-- <a href="#" class="bg-white border-gray-300 text-gray-500 hover:bg-gray-50 relative inline-flex items-center px-4 py-2 border text-sm font-medium">
{{ i+1 }}
</a> -->
<!-- <a href="#" class="bg-white border-gray-300 text-gray-500 hover:bg-gray-50 hidden md:inline-flex relative items-center px-4 py-2 border text-sm font-medium">
3
</a>
<span class="relative inline-flex items-center px-4 py-2 border border-gray-300 bg-white text-sm font-medium text-gray-700">
...
</span>
<a href="#" class="bg-white border-gray-300 text-gray-500 hover:bg-gray-50 hidden md:inline-flex relative items-center px-4 py-2 border text-sm font-medium">
8
</a>
<a href="#" class="bg-white border-gray-300 text-gray-500 hover:bg-gray-50 relative inline-flex items-center px-4 py-2 border text-sm font-medium">
9
</a>
<a href="#" class="bg-white border-gray-300 text-gray-500 hover:bg-gray-50 relative inline-flex items-center px-4 py-2 border text-sm font-medium">
10
</a> -->
<a href="#" class="relative inline-flex items-center px-2 py-2 rounded-r-md border border-gray-300 bg-white text-sm font-medium text-gray-500 hover:bg-gray-50">
<span class="sr-only">Next</span>
<ChevronRightIcon class="h-5 w-5" aria-hidden="true" />
</a>
</nav>
</div>
</div>
<!-- <pagination :data="active"></pagination> -->
<pagination :data="paginate" @clickEvent_="getTunai"></pagination>
</div>
<!-- <h1 v-text="active.kodlaluan" />
@@ -273,47 +201,37 @@ export default {
index: 0,
leftToRight: true,
alirantunai:[],
paginate:{},
showtunai:[],
perPage: 5,
totalPage: 0,
currentPage: 1,
lastPage: 5,
activePage: 1
activePage: 1,
kodcaw:'KB2',
kodlaluan:''
};
},
// created: function() {
// console.log(this.items);
// console.log(this.arraytunai);
// },
computed: {
active() {
let tunaidibahagi = this.$props.arraytunai[this.$data.index]
let jumsplit = this.activePage*this.perPage
let mulaPage = jumsplit - (this.perPage);
this.currentPage = mulaPage+1
this.lastPage = jumsplit
let pecahantunai = tunaidibahagi.slice(mulaPage, jumsplit)
return {pecahantunai,mulaPage,jumsplit}
},
rows() {
this.totalPage = this.$props.arraytunai[this.$data.index].length
let totaldibahagi = parseInt(this.totalPage/this.perPage)
return totaldibahagi
}
created() {
this.kodlaluan = this.$props.items[0].kodlaluan
this.getTunai(this.currentPage)
},
methods: {
active(){
},
setActive(index){
this.activePage = index + 1
},
setItem(index) {
setItem(index,kod) {
// Update LTR before changing $data.index
this.$data.leftToRight = index > this.$data.index;
this.$data.index = index;
this.activePage = 1;
this.kodlaluan = kod;
this.getTunai(0)
},
action(tarikhteller,kodcawteller,tel){
@@ -332,7 +250,7 @@ export default {
}else{
this.alirantunai = response.data;
console.log(tarikhteller)
this.$refs.modal.showModal = true;
this.$refs.modal.serahan = formatter.format(this.alirantunai.serahan);
this.$refs.modal.bakiawal = formatter.format(this.alirantunai.bakiawal);
@@ -340,15 +258,29 @@ export default {
this.$refs.modal.pendahuluan = formatter.format(this.alirantunai.pendahuluan);
this.$refs.modal.penebusan = formatter.format(this.alirantunai.penebusan);
this.$refs.modal.gadaian = formatter.format(this.alirantunai.gadaian);
this.$refs.modal.kodlaluan = tel;
this.$refs.modal.kodcaw = kodcawteller;
this.$refs.modal.tarikh = tarikhteller;
this.$refs.modal.pageNumber = this.currentPage;
}
});
},
},
formatterfunction: function(value){
return formatter.format(value)
}
}
getTunai(pageNumber){
this.axios.get('http://localhost:8000/admin/getTunaiPaginate/' + this.kodcaw,{
params: {
page: pageNumber,
kodlaluan: this.kodlaluan
}
}).then(response => {
this.showtunai = response.data
this.paginate = response.data
this.currentPage = pageNumber
});
},
formatterfunction: function(value){
return formatter.format(value)
}
}
}
</script>
+21 -18
View File
@@ -1,6 +1,6 @@
<template>
<div v-if="data" class="bg-white px-4 py-3 flex items-center justify-between border-t border-gray-200 sm:px-6">
<div v-if="data.total > 0" class="flex-1 flex justify-between sm:hidden">
<!-- <div v-if="data.total > 0" class="flex-1 flex justify-between sm:hidden">
<button @click.prevent="getPreviousPage"
class="relative inline-flex items-center px-4 py-2 border border-gray-300 text-sm font-medium rounded-md bg-white"
:class="data.current_page == 1 ? 'text-gray-400 cursor-not-allowed': 'text-gray-700 hover:bg-gray-50' ">
@@ -8,12 +8,12 @@
</button>
<button @click.prevent="getNextPage"
class="ml-3 relative inline-flex items-center px-4 py-2 border border-gray-300 text-sm font-medium rounded-md bg-white"
:class="data.current_page >= data.total_pages ? 'text-gray-400 cursor-not-allowed': 'text-gray-700 hover:bg-gray-50' ">
:class="data.current_page >= data.last_page ? 'text-gray-400 cursor-not-allowed': 'text-gray-700 hover:bg-gray-50' ">
Next
</button>
</div>
</div> -->
<div v-if="data.total > 0" class="hidden sm:flex-1 sm:flex sm:items-center sm:justify-between">
<div v-if="data.total > 0" class="hidden sm:flex-1 sm:flex flex sm:items-center sm:justify-between ">
<div>
<p class="text-sm text-gray-700">
Showing
@@ -49,8 +49,8 @@
<!-- <a href="#" aria-current="page"
class="z-10 bg-indigo-50 border-indigo-500 text-indigo-600 relative inline-flex items-center px-4 py-2 border text-sm font-medium">
A
</a> -->
</a>
-->
<div v-for="(page, index) in range" :key="index">
<button v-if="page != '...' " @click.prevent="getPage(page)"
class="bg-white border-gray-300 text-gray-500 hidden md:inline-flex relative items-center px-4 py-2 border text-sm font-medium"
@@ -65,9 +65,9 @@
<button @click.prevent="getNextPage"
class="relative inline-flex items-center px-2 py-2 rounded-r-md border border-gray-300 bg-white text-sm font-medium text-gray-500 hover:bg-gray-50"
:class="{'text-gray-300 cursor-not-allowed': data.current_page >= data.total_pages}">
:class="{'text-gray-300 cursor-not-allowed': data.current_page >= data.last_page}">
<span class="sr-only">Next</span>
<svg class="h-5 w-5" :class="{'text-gray-400': data.current_page >= data.total_pages}" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor"
<svg class="h-5 w-5" :class="{'text-gray-400': data.current_page >= data.last_page}" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor"
aria-hidden="true">
<path fill-rule="evenodd"
d="M7.293 14.707a1 1 0 010-1.414L10.586 10 7.293 6.707a1 1 0 011.414-1.414l4 4a1 1 0 010 1.414l-4 4a1 1 0 01-1.414 0z"
@@ -91,22 +91,25 @@
range: []
}
},
// setup(props,context){
// console.log(props.data)
// },
computed: {
to: function() {
if(this.data.current_page < this.data.total_pages) {
if(this.data.current_page < this.data.last_page) {
return this.data.current_page > 1 ?
(this.data.current_page - 1) * this.data.count + 1 : 1
(this.data.current_page - 1) * this.data.per_page + 1 : 1
}
else {
return this.data.total - this.data.count + 1
return this.data.from
}
},
from: function() {
if(this.data.current_page < this.data.total_pages)
return this.data.count * this.data.current_page
if(this.data.current_page < this.data.last_page)
return this.data.per_page * this.data.current_page
else
return this.total
return this.data.total
},
total: function() {
return this.data.total
@@ -124,15 +127,15 @@
methods: {
organisePageLinks() {
this.range = []
for (let i = 1; i <= this.data.total_pages; i++) {
for (let i = 1; i <= this.data.last_page; i++) {
if (
i == 1 || // first page
i == this.data.total_pages || // last page
i == this.data.last_page || // last page
i == this.data.current_page || // current page
i == this.data.current_page - 1 || // page before current
i == this.data.current_page + 1 || // page after current
(i <= 3 && this.data.current_page < 3) || // "filler" links at start
(i >= this.data.total_pages - 3 && this.data.current_page > this.data.total_pages - 3) // "filler" links at end
(i >= this.data.last_page - 3 && this.data.current_page > this.data.last_page - 3) // "filler" links at end
) {
let index = this.range.length
if (index > 0 && this.range[index - 1] < i - 1) {
@@ -151,7 +154,7 @@
this.getPage(this.data.current_page - 1)
},
getNextPage() {
if(this.data.current_page < this.data.total_pages)
if(this.data.current_page < this.data.last_page)
this.getPage(this.data.current_page + 1)
}
}
+84 -21
View File
@@ -1,7 +1,7 @@
<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 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-screen 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">
@@ -21,49 +21,71 @@
<!-- <p class="my-4 text-blueGray-500 text-lg leading-relaxed">
</p> -->
<h3 class="font-bold mb-3 text-center text-2xl border-4 border-red-500 mx-auto w-2/4 py-2 rounded-lg"><b class="text-red-500">Formula </b> <span class="mx-2"><i class="fas fa-angle-double-right"></i></span> AW + PE + TS - GA - SE = AK</h3>
<div class="flex flex-no-wrap">
<div class="bg-blue-300 text-white h-26 flex-auto rounded-2xl ml-2">
<fieldset class="border-4 border-solid border-gray-600 p-3 mb-2">
<legend class="text-xl">Legends Tunai</legend>
<div class="flex flex-wrap">
<div class="w-1/4">
<p><b>AW</b> <span class="mx-2"><i class="fas fa-angle-double-right"></i></span> Baki Awal</p>
<p><b>PE</b> <span class="mx-2"><i class="fas fa-angle-double-right"></i></span> Pendahuluan</p>
<p><b>TS</b> <span class="mx-2"><i class="fas fa-angle-double-right"></i></span> Penebusan</p>
</div>
<div class="w-1/4">
<p><b>AK</b> <span class="mx-2"><i class="fas fa-angle-double-right"></i></span> Baki Akhir</p>
<p><b>SE</b> <span class="mx-2"><i class="fas fa-angle-double-right"></i></span> Serahan</p>
<p><b>GA</b> <span class="mx-2"><i class="fas fa-angle-double-right"></i></span> Gadaian</p>
</div>
<div class="w-2/4 my-auto">
<h3 class="font-bold mb-3 text-center text-xl border-2 border-red-500 py-2 rounded-lg"><b class="text-red-500">Formula </b> <span class="mx-2"><i class="fas fa-angle-double-right"></i></span> AW + PE + TS - GA - SE = AK</h3>
</div>
</div>
</fieldset>
<div class="flex flex-wrap -mx-3 mb-3">
<div class="bg-blue-300 text-white h-26 flex-auto rounded-2xl ml-2 w-1/3">
<div class="flex flex-row">
<div class="bg-blue-500 px-3 py-6 rounded-l-2xl">
<h2 class="font-bold text-lg">AW</h2>
</div>
<div class="my-auto mx-auto">
<p class="font-bold uppercase text-black text-2xl">{{ this.bakiawal }}</p>
</div>
<div class="my-auto mx-auto">
<p class="font-bold uppercase text-black text-2xl">{{ this.bakiawal }}</p>
</div>
</div>
</div>
<div class="bg-blue-300 text-white h-26 flex-auto rounded-2xl ml-2">
<div class="bg-blue-300 text-white h-26 flex-auto rounded-2xl ml-2 w-1/3">
<div class="flex flex-row">
<div class="bg-blue-500 px-3 py-6 rounded-l-2xl">
<h2 class="font-bold text-lg">AK</h2>
</div>
<div class="my-auto mx-auto">
<p class="font-bold uppercase text-black text-2xl">{{ this.bakiakhir }}</p>
</div>
</div>
</div>
</div>
<div class="flex flex-wrap mt-3">
<div class="bg-green-300 text-white h-26 flex-auto rounded-2xl ml-2">
<div class="flex flex-wrap -mx-3 mb-3">
<div class="bg-green-300 text-white h-26 flex-auto rounded-2xl ml-2 w-1/3">
<div class="flex flex-row">
<div class="bg-green-500 px-4 py-6 rounded-l-2xl">
<h2 class="font-bold text-lg">PE</h2>
</div>
<div class="my-auto mx-auto">
<p class="font-bold uppercase text-black text-2xl">{{ this.pendahuluan }}</p>
</div>
</div>
</div>
<div class="bg-red-300 text-white h-26 flex-auto rounded-2xl ml-2">
<div class="bg-red-300 text-white h-26 flex-auto rounded-2xl ml-2 w-1/3">
<div class="flex flex-row">
<div class="bg-red-500 px-4 py-6 rounded-l-2xl">
<h2 class="font-bold text-lg">SE</h2>
@@ -75,8 +97,8 @@
</div>
</div>
<div class="flex flex-wrap mt-3">
<div class="bg-green-300 text-white h-26 flex-auto rounded-2xl ml-2">
<div class="flex flex-wrap -mx-3 mb-3">
<div class="bg-green-300 text-white h-26 flex-auto rounded-2xl ml-2 w-1/3">
<div class="flex flex-row">
<div class="bg-green-500 px-4 py-6 rounded-l-2xl">
<h2 class="font-bold text-lg">TS</h2>
@@ -87,7 +109,7 @@
</div>
</div>
<div class="bg-red-300 text-white h-26 flex-auto rounded-2xl ml-2">
<div class="bg-red-300 text-white h-26 flex-auto rounded-2xl ml-2 w-1/3">
<div class="flex flex-row">
<div class="bg-red-500 px-4 py-6 rounded-l-2xl">
<h2 class="font-bold text-lg">GA</h2>
@@ -106,14 +128,18 @@
<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>
<button class="bg-blue-500 hover:bg-blue-700 text-white font-bold py-2 px-4 border border-blue-700 rounded" type="button" v-on:click="toggleModal()">
<button class="bg-blue-500 hover:bg-blue-700 text-white font-bold py-2 px-4 border border-blue-700 rounded" type="button" v-on:click="kemaskinifunc()">
Kemaskini
</button>
</div>
</div>
</div>
</div>
<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>
@@ -123,18 +149,55 @@ export default {
data() {
return {
showModal: false,
tarikh: Date,
kodcaw: '',
kodlaluan:'',
bakiawal: 0,
bakiakhir: 0,
pendahuluan: 0,
serahan: 0,
penebusan: 0,
gadaian: 0
gadaian: 0,
pageNumber: 1
}
},
created(){
console.log(this.kodcaw)
},
methods: {
toggleModal: function(){
this.showModal = !this.showModal;
},
kemaskinifunc: function(){
// console.log(this.kodcaw + this.kodlaluan + this.tarikh)
axios.put('/api/check/kemaskinialirantunai',
{
kodcaw: this.kodcaw,
teller: this.kodlaluan,
tarikh: this.tarikh,
gadaian: this.gadaian.replace(/[^0-9.-]+/g,""),
penebusan: this.penebusan.replace(/[^0-9.-]+/g,""),
bakiakhir: this.bakiakhir.replace(/[^0-9.-]+/g,"")
}).then(response => {
if(response.data == 'berjaya')
{
this.showModal = false;
this.$toast.success("Kemaskini Sudah Berjaya!")
// vm.$forceUpdate();
this.$emit('clickEvent_', this.pageNumber)
// setTimeout("window.location.reload()", 3000);
}else{
this.showModal = false;
this.$toast.error("Kemaskini tidak berjaya")
}
});
}
}
},
}
</script>
+38 -18
View File
@@ -22,14 +22,34 @@
</p> -->
<h3 class="font-bold mb-3 text-center text-2xl border-4 border-red-500 mx-auto w-2/4 py-2 rounded-lg"><b class="text-red-500">Formula </b> <span class="mx-2"><i class="fas fa-angle-double-right"></i></span> AW + ST + PE - PT - SE - PJ = AK</h3>
<!-- <h3 class="font-bold mb-3 text-center text-2xl border-4 border-red-500 mx-auto w-2/4 py-2 rounded-lg"><b class="text-red-500">Formula </b> <span class="mx-2"><i class="fas fa-angle-double-right"></i></span> AW + ST + PE - PT - SE - PJ = AK</h3> -->
<fieldset class="border-4 border-solid border-gray-600 p-3 mb-2">
<legend class="text-xl">Legends Tunai</legend>
<div class="flex flex-wrap">
<div class="w-1/4">
<p><b>BWL</b> <span class="mx-2"><i class="fas fa-angle-double-right"></i></span> Baki Awal</p>
<p><b>PHQ</b> <span class="mx-2"><i class="fas fa-angle-double-right"></i></span> Pendahuluan HQ</p>
<p><b>STL</b> <span class="mx-2"><i class="fas fa-angle-double-right"></i></span> Serahan Teller</p>
<p><b>BAK</b> <span class="mx-2"><i class="fas fa-angle-double-right"></i></span> Baki Akhir</p>
</div>
<div class="w-1/4">
<p><b>PTL</b> <span class="mx-2"><i class="fas fa-angle-double-right"></i></span> Pendahuluan Teller</p>
<p><b>SHQ</b> <span class="mx-2"><i class="fas fa-angle-double-right"></i></span> Serahan HQ</p>
<p><b>PJR</b> <span class="mx-2"><i class="fas fa-angle-double-right"></i></span> Panjar</p>
</div>
<div class="w-2/4 my-auto">
<h3 class="font-bold mb-3 text-center text-xl border-2 border-red-500 py-2 rounded-lg"><b class="text-red-500">Formula </b> <span class="mx-2"><i class="fas fa-angle-double-right"></i></span> AW + ST + PE - PT - SE - PJ = AK</h3>
</div>
</div>
<div class="flex flex-no-wrap">
<div class="bg-blue-300 text-white h-26 flex-auto rounded-2xl ml-2">
</fieldset>
<div class="flex flex-wrap -mx-3 mb-3">
<div class="bg-blue-300 text-white h-26 flex-auto rounded-2xl ml-2 w-1/3">
<div class="flex flex-row">
<div class="bg-blue-500 px-3 py-6 rounded-l-2xl">
<h2 class="font-bold text-lg">AW</h2>
<h2 class="font-bold text-lg">BWL</h2>
</div>
<div class="my-auto mx-auto">
<p class="font-bold uppercase text-black text-2xl">{{ this.bakiawal }}</p>
@@ -37,10 +57,10 @@
</div>
</div>
<div class="bg-red-300 text-white h-26 flex-auto rounded-2xl ml-2">
<div class="bg-red-300 text-white h-26 flex-auto rounded-2xl ml-2 w-1/3">
<div class="flex flex-row">
<div class="bg-red-500 px-3 py-6 rounded-l-2xl">
<h2 class="font-bold text-lg">PT</h2>
<h2 class="font-bold text-lg">PTL</h2>
</div>
<div class="my-auto mx-auto">
<p class="font-bold uppercase text-black text-2xl">{{ this.pendteller }}</p>
@@ -49,12 +69,12 @@
</div>
</div>
<div class="flex flex-wrap mt-3">
<div class="bg-green-300 text-white h-26 flex-auto rounded-2xl ml-2">
<div class="flex flex-wrap -mx-3 mb-3">
<div class="bg-green-300 text-white h-26 flex-auto rounded-2xl ml-2 w-1/3">
<div class="flex flex-row">
<div class="bg-green-500 px-4 py-6 rounded-l-2xl">
<h2 class="font-bold text-lg">ST</h2>
<h2 class="font-bold text-lg">STL</h2>
</div>
<div class="my-auto mx-auto">
@@ -63,10 +83,10 @@
</div>
</div>
<div class="bg-red-300 text-white h-26 flex-auto rounded-2xl ml-2">
<div class="bg-red-300 text-white h-26 flex-auto rounded-2xl ml-2 w-1/3">
<div class="flex flex-row">
<div class="bg-red-500 px-4 py-6 rounded-l-2xl">
<h2 class="font-bold text-lg">SE</h2>
<h2 class="font-bold text-lg">SHQ</h2>
</div>
<div class="my-auto mx-auto">
<p class="font-bold uppercase text-black text-2xl">{{ this.serahan }}</p>
@@ -75,11 +95,11 @@
</div>
</div>
<div class="flex flex-wrap mt-3">
<div class="bg-green-300 text-white h-26 flex-auto rounded-2xl ml-2">
<div class="flex flex-wrap -mx-3 mb-3">
<div class="bg-green-300 text-white h-26 flex-auto rounded-2xl ml-2 w-1/3">
<div class="flex flex-row">
<div class="bg-green-500 px-4 py-6 rounded-l-2xl">
<h2 class="font-bold text-lg">PE</h2>
<h2 class="font-bold text-lg">PHQ</h2>
</div>
<div class="my-auto mx-auto">
<p class="font-bold uppercase text-black text-2xl">{{ this.pendahuluan }}</p>
@@ -87,10 +107,10 @@
</div>
</div>
<div class="bg-red-300 text-white h-26 flex-auto rounded-2xl ml-2">
<div class="bg-red-300 text-white h-26 flex-auto rounded-2xl ml-2 w-1/3">
<div class="flex flex-row">
<div class="bg-red-500 px-4 py-6 rounded-l-2xl">
<h2 class="font-bold text-lg">PJ</h2>
<h2 class="font-bold text-lg">PJR</h2>
</div>
<div class="my-auto mx-auto">
<p class="font-bold uppercase text-black text-2xl">{{ this.panjar }}</p>
@@ -99,11 +119,11 @@
</div>
</div>
<div class="flex flex-wrap mt-3">
<div class="flex flex-wrap -mx-3 mb-3">
<div class="bg-green-300 text-white h-26 flex-auto rounded-2xl ml-2">
<div class="flex flex-row">
<div class="bg-green-500 px-4 py-6 rounded-l-2xl">
<h2 class="font-bold text-lg">AK</h2>
<h2 class="font-bold text-lg">BAK</h2>
</div>
<div class="my-auto mx-auto">
<p class="font-bold uppercase text-black text-2xl">{{ this.bakiakhir }}</p>
+153 -28
View File
@@ -15,7 +15,7 @@
<label class="block uppercase tracking-wide text-gray-700 text-xs font-bold mb-2">
Ic No
</label>
<input :class="{ 'border border-red-500 focus:border-red-500': $v.name.$error }" class="appearance-none block w-full bg-gray-200 text-gray-700 border border-gray-200 rounded py-3 px-4 leading-tight focus:outline-none focus:bg-white focus:border-gray-500" v-model.trim="$v.icno.$model" type="text" >
<input :class="{ 'border border-red-500 focus:border-red-500': $v.icno.$error }" class="appearance-none block w-full bg-gray-200 text-gray-700 border border-gray-200 rounded py-3 px-4 leading-tight focus:outline-none focus:bg-white focus:border-gray-500" v-model.trim="$v.icno.$model" type="text" >
<div class="text-red-500 text-xs italic" v-if="!$v.icno.required">Field is required</div>
<div class="text-red-500 text-xs italic" v-if="!$v.icno.minLength">Name must have at least {{$v.name.$params.minLength.min}} letters.</div>
</div>
@@ -25,20 +25,23 @@
<label class="block uppercase tracking-wide text-gray-700 text-xs font-bold mb-2">
No tel 1
</label>
<input :class="{ 'border border-red-500 focus:border-red-500': $v.name.$error }" class="appearance-none block w-full bg-gray-200 border border-gray-200 text-gray-700 rounded py-3 px-4 mb-3 leading-tight focus:outline-none focus:bg-white focus:border-gray-500" v-model.trim="$v.notel1.$model" type="text" placeholder="Jane">
<input :class="{ 'border border-red-500 focus:border-red-500': $v.notel1.$error }" class="appearance-none block w-full bg-gray-200 border border-gray-200 text-gray-700 rounded py-3 px-4 mb-3 leading-tight focus:outline-none focus:bg-white focus:border-gray-500" v-model.trim="$v.notel1.$model" type="text" placeholder="Jane">
<p class="text-red-500 text-xs italic" v-if="!$v.notel1.required">Please fill out this field.</p>
</div>
<div class="w-full md:w-1/3 px-3">
<label class="block uppercase tracking-wide text-gray-700 text-xs font-bold mb-2">
No tel 2
</label>
<input :class="{ 'border border-red-500 focus:border-red-500': $v.name.$error }" class="appearance-none block w-full bg-gray-200 text-gray-700 border border-gray-200 rounded py-3 px-4 leading-tight focus:outline-none focus:bg-white focus:border-gray-500" v-model.trim="$v.notel2.$model" type="text">
<input :class="{ 'border border-red-500 focus:border-red-500': $v.notel2.$error }" class="appearance-none block w-full bg-gray-200 text-gray-700 border border-gray-200 rounded py-3 px-4 leading-tight focus:outline-none focus:bg-white focus:border-gray-500" v-model.trim="$v.notel2.$model" type="text">
<!-- <div class="text-red-500 text-xs italic" v-if="!$v.notel2.required">Field is required</div> -->
<div class="text-red-500 text-xs italic" v-if="!$v.notel2.minLength">Name must have at least {{$v.name.$params.minLength.min}} letters.</div>
</div>
<div class="w-full md:w-1/3 px-3">
<label class="block uppercase tracking-wide text-gray-700 text-xs font-bold mb-2">
No Pelanggan
</label>
<input :class="{ 'border border-red-500 focus:border-red-500': $v.name.$error }" class="appearance-none block w-full bg-gray-200 text-gray-700 border border-gray-200 rounded py-3 px-4 leading-tight focus:outline-none focus:bg-white focus:border-gray-500" v-model.trim="$v.nopel.$model" type="text">
<input :class="{ 'border border-red-500 focus:border-red-500': $v.nopel.$error }" class="appearance-none block w-full bg-gray-200 text-gray-700 border border-gray-200 rounded py-3 px-4 leading-tight focus:outline-none focus:bg-white focus:border-gray-500" v-model.trim="$v.nopel.$model" type="text">
<div class="text-red-500 text-xs italic" v-if="!$v.nopel.required">Field is required</div>
</div>
</div>
<div class="flex flex-wrap -mx-3 mb-6">
@@ -46,7 +49,9 @@
<label class="block uppercase tracking-wide text-gray-700 text-xs font-bold mb-2">
Alamat
</label>
<textarea :class="{ 'border border-red-500 focus:border-red-500': $v.name.$error }" class="h-32 appearance-none block w-full bg-gray-200 text-gray-700 border border-gray-200 rounded py-3 px-4 mb-3 leading-tight focus:outline-none focus:bg-white focus:border-gray-500" v-model.trim="$v.alamat.$model" type="password"></textarea>
<textarea :class="{ 'border border-red-500 focus:border-red-500': $v.alamat.$error }" class="h-32 appearance-none block w-full bg-gray-200 text-gray-700 border border-gray-200 rounded py-3 px-4 mb-3 leading-tight focus:outline-none focus:bg-white focus:border-gray-500" v-model.trim="$v.alamat.$model" type="password"></textarea>
<div class="text-red-500 text-xs italic" v-if="!$v.alamat.required">Field is required</div>
<div class="text-red-500 text-xs italic" v-if="!$v.alamat.minLength">Name must have at least {{$v.name.$params.minLength.min}} letters.</div>
</div>
<div class="w-full md:w-1/3 px-3">
<div class="flex flex-wrap -mx-3 mb-6">
@@ -55,20 +60,24 @@
Poskod
</label>
<div class="relative">
<input :class="{ 'border border-red-500 focus:border-red-500': $v.name.$error }" class="appearance-none block w-full bg-gray-200 text-gray-700 border border-gray-200 rounded py-3 px-4 leading-tight focus:outline-none focus:bg-white focus:border-gray-500" v-model.trim="$v.poskod.$model" type="text" placeholder="90210" @change="triggerPoskod($event.target.value)">
<input :class="{ 'border border-red-500 focus:border-red-500': $v.poskod.$error }" class="appearance-none block w-full bg-gray-200 text-gray-700 border border-gray-200 rounded py-3 px-4 leading-tight focus:outline-none focus:bg-white focus:border-gray-500" v-model.trim="$v.poskod.$model" type="text" placeholder="90210" @change="triggerPoskod($event.target.value)">
<div class="text-red-500 text-xs italic" v-if="!$v.poskod.required">Field is required</div>
<div class="text-red-500 text-xs italic" v-if="!$v.poskod.minLength">Name must have at least {{$v.name.$params.minLength.min}} letters.</div>
</div>
<label class="block uppercase tracking-wide text-gray-700 text-xs font-bold mb-2 mt-2">
Daerah
</label>
<div class="relative">
<input readonly :class="{ 'border border-red-500 focus:border-red-500': $v.name.$error }" class="appearance-none block w-full bg-gray-200 text-gray-700 border border-gray-200 rounded py-3 px-4 leading-tight focus:outline-none focus:border-gray-500" v-model.trim="$v.koddaerah.$model" type="text" placeholder="Albuquerque">
<input readonly :class="{ 'border border-red-500 focus:border-red-500': $v.koddaerah.$error }" class="appearance-none block w-full bg-gray-200 text-gray-700 border border-gray-200 rounded py-3 px-4 leading-tight focus:outline-none focus:border-gray-500" v-model.trim="$v.koddaerah.$model" type="text" placeholder="Albuquerque">
<div class="text-red-500 text-xs italic" v-if="!$v.koddaerah.required">Field is required</div>
</div>
</div>
<div class="md:w-1/2 pl-2">
<label class="block uppercase tracking-wide text-gray-700 text-xs font-bold mb-2">
Negeri
</label>
<input readonly class="appearance-none block w-full bg-gray-200 text-gray-700 border border-gray-200 rounded py-3 px-4 leading-tight focus:outline-none focus:border-gray-500" v-model.trim="$v.kodnegeri.$model" type="text" placeholder="Albuquerque">
<input readonly :class="{ 'border border-red-500 focus:border-red-500': $v.kodnegeri.$error }" class="appearance-none block w-full bg-gray-200 text-gray-700 border border-gray-200 rounded py-3 px-4 leading-tight focus:outline-none focus:border-gray-500" v-model.trim="$v.kodnegeri.$model" type="text" placeholder="Albuquerque">
<div class="text-red-500 text-xs italic" v-if="!$v.kodnegeri.required">Field is required</div>
</div>
</div>
</div>
@@ -79,6 +88,30 @@
<textarea class="h-32 appearance-none block w-full bg-gray-200 text-gray-700 border border-gray-200 rounded py-3 px-4 mb-3 leading-tight focus:outline-none focus:bg-white focus:border-gray-500" v-model.trim="$v.nota.$model" type="password"></textarea>
</div>
</div>
<div class="flex flex-wrap -mx-3 mb-6">
<div class="w-full md:w-1/3 px-3 mb-6 md:mb-0">
<label class="block uppercase tracking-wide text-gray-700 text-xs font-bold mb-2" for="grid-state">
Bank
</label>
<div class="relative">
<select v-model="selectbank" class="block appearance-none w-full bg-gray-200 border border-gray-200 text-gray-700 py-3 px-4 pr-8 rounded leading-tight focus:outline-none focus:bg-white focus:border-gray-500">
<option :value="''" disabled>Pilih Jenis Bank</option>
<option v-for="(bank,i) in jenisbank" :key="i" :value="bank.abbreviation">{{ bank.name }}</option>
</select>
<div class="pointer-events-none absolute inset-y-0 right-0 flex items-center px-2 text-gray-700">
<svg class="fill-current h-4 w-4" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20"><path d="M9.293 12.95l.707.707L15.657 8l-1.414-1.414L10 10.828 5.757 6.586 4.343 8z"/></svg>
</div>
</div>
</div>
<div class="md:w-1/3 pl-2">
<label class="block uppercase tracking-wide text-gray-700 text-xs font-bold mb-2">
No Akaun
</label>
<input :readonly="selectbank == ''" :class="{ 'focus:outline-none focus:border-gray-500 focus:bg-white focus:border-gray-500' : selectbank !== '' }" class="appearance-none block w-full bg-gray-200 text-gray-700 border border-gray-200 rounded py-3 px-4 leading-tight" type="text">
</div>
</div>
<div class="flex items-center justify-between mt-4">
@@ -107,6 +140,16 @@ export default {
},
data() {
return {
nameasal: this.customer.nama,
icnoasal: (this.customer.kpbaru) ? this.customer.kpbaru : this.customer.kplama,
notel1asal: this.customer.telefon,
notel2asal: this.customer.telefon2,
nopelasal: this.customer.nopelanggan,
alamatasal: this.customer.alamat1,
notaasal: this.customer.nota,
poskodasal: this.customer.poskod,
selectbankasal: (this.customer.kodbank) ? this.customer.kodbank : '',
noakaunbankasal: this.customer.noakaun,
name: this.customer.nama,
icno: (this.customer.kpbaru) ? this.customer.kpbaru : this.customer.kplama,
notel1: this.customer.telefon,
@@ -117,16 +160,25 @@ export default {
poskod: this.customer.poskod,
koddaerah: '',
kodnegeri: '',
submitStatus: ''
selectbank: (this.customer.kodbank) ? this.customer.kodbank : '',
noakaunbank: this.customer.noakaun,
jenisbank:[],
submitStatus: '',
responsepostdata: 0
}
},
setup: (props, context) => {
// console.log(props.customer)
},
created() {
this.axios.get('http://localhost:8000/api/poskod/' + this.poskod).then(response => {
this.koddaerahCall(response.data.kodnegeri,response.data.koddaerah)
});
this.axios.get('http://localhost:8000/api/bank/').then(response => {
this.jenisbank = response.data
});
},
methods: {
koddaerahCall: function(negeri,daerah) {
@@ -139,12 +191,59 @@ export default {
});
},
bankaccount(){
this.axios.get('http://localhost:8000/api/bank/').then(response => {
this.jenisbank = response.data
return response.data
});
},
triggerPoskod: function(value){
this.axios.get('http://localhost:8000/api/poskod/' + value).then(response => {
this.koddaerahCall(response.data.kodnegeri,response.data.koddaerah)
});
},
checkAsaldanTukar(){
let sama = 0;
if(this.nameasal == this.name)
sama++;
if(this.icnoasal == this.icno)
sama++;
if(this.notel1asal == this.notel1)
sama++;
if(this.notel2asal == this.notel2)
sama++;
if(this.nopelasal == this.nopel)
sama++;
if(this.alamatasal == this.alamat)
sama++;
if(this.notaasal == this.nota)
sama++;
if(this.poskodasal == this.poskod)
sama++;
if(this.selectbankasal == this.selectbank)
sama++;
if(this.noakaunbankasal == this.noakaunbank)
sama++;
if(sama == 10)
{
return false;
}else{
return true;
}
},
submit() {
console.log('submit!')
this.$v.$touch()
@@ -153,26 +252,50 @@ export default {
} else {
// do your submit logic here
this.submitStatus = 'PENDING'
setTimeout(() => {
let kesamaan = this.checkAsaldanTukar()
// console.log(kesamaan)
if(kesamaan == false)
{
this.$toast.info('Tiada penukaran dibuat')
this.submitStatus = 'OK'
this.$toast.success('Berjaya dikemaskini!')
}, 500)
}else{
let result = this.PostData()
let pro1 = Promise.resolve(result)
let self = this
pro1.then(function(response) {
if(response.data == 1)
{
setTimeout(() => {
self.submitStatus = 'OK'
self.$toast.success('Berjaya dikemaskini!')
}, 500)
}else{
self.$toast.error('Error occured')
}
}, function(e) {
console.error(e); // TypeError: Throwing
});
}
}
},
PostData(){
this.axios.post('http://localhost:8000/api/customers/information/update/admin',
async PostData(){
let response = await this.axios.put('http://localhost:8000/api/customers/information/update/admin',
{
icno: icno,
ic_asal: ic_asal,
telefon1: telefon1,
telefon2: telefon2,
kodbank: kodbank,
noakaun: noakaun,
nota: nota,
nama: nama,
alamat: alamat,
poskod: poskod
icno: this.icno,
ic_asal: this.icnoasal,
telefon1: this.notel1,
telefon2: this.notel2,
kodbank: this.selectbank,
noakaun: this.noakaunbank,
nota: this.nota,
nama: this.name,
alamat: this.alamat,
poskod: this.poskod
});
return response
}
},
validations: {
@@ -192,22 +315,24 @@ export default {
minLength: minLength(4)
},
nopel: {
minLength: minLength(4)
required
},
alamat: {
required,
minLength: minLength(4)
},
nota: {
minLength: minLength(4)
},
poskod: {
required,
minLength: minLength(4)
},
koddaerah: {
minLength: minLength(4)
required
},
kodnegeri: {
minLength: minLength(4)
required
}
}
+11 -75
View File
@@ -1,85 +1,21 @@
@extends('layouts.app')
@section('content')
<div class="container bg-gray-200">
{{-- <div class="row justify-content-center">
<div class="col-md-8">
<div class="card">
<div class="card-header">{{ __('Login') }}</div>
<div class="card-body">
<form method="POST" action="{{ route('login') }}">
@csrf
<div class="form-group row">
<label for="email" class="col-md-4 col-form-label text-md-right">{{ __('E-Mail Address') }}</label>
<div class="col-md-6">
<input id="email" type="email" class="form-control @error('email') is-invalid @enderror" name="email" value="{{ old('email') }}" required autocomplete="email" autofocus>
@error('email')
<span class="invalid-feedback" role="alert">
<strong>{{ $message }}</strong>
</span>
@enderror
</div>
</div>
<div class="form-group row">
<label for="password" class="col-md-4 col-form-label text-md-right">{{ __('Password') }}</label>
<div class="col-md-6">
<input id="password" type="password" class="form-control @error('password') is-invalid @enderror" name="password" required autocomplete="current-password">
@error('password')
<span class="invalid-feedback" role="alert">
<strong>{{ $message }}</strong>
</span>
@enderror
</div>
</div>
<div class="form-group row">
<div class="col-md-6 offset-md-4">
<div class="form-check">
<input class="form-check-input" type="checkbox" name="remember" id="remember" {{ old('remember') ? 'checked' : '' }}>
<label class="form-check-label" for="remember">
{{ __('Remember Me') }}
</label>
</div>
</div>
</div>
<div class="form-group row mb-0">
<div class="col-md-8 offset-md-4">
<button type="submit" class="btn btn-primary">
{{ __('Login') }}
</button>
@if (Route::has('password.request'))
<a class="btn btn-link" href="{{ route('password.request') }}">
{{ __('Forgot Your Password?') }}
</a>
@endif
</div>
</div>
</form>
</div>
</div>
</div>
</div> --}}
<div class="bg-gray-200">
<div class="p-20 flex flex-col-reverse md:flex-row items-center justify-center">
<div class="p-20 items-center justify-center">
<div class="content text-3xl text-center md:text-left">
{{-- <h1 class="text-5xl text-blue-500 font-bold">Facebook</h1> --}}
{{-- <div class="content text-3xl text-center md:text-left">
<h1 class="text-5xl text-blue-500 font-bold">Facebook</h1>
<img src="{{ asset('img/logo_arrahn_baru.png') }}" width="400">
<p>Pajak Gadai Islam.</p>
</div>
</div> --}}
<div class="container mx-auto flex flex-col items-center">
<form class="shadow-lg w-1/3 p-4 flex flex-col bg-white rounded-lg" method="POST" action="{{ route('login') }}">
<img class="mx-auto" src="{{ asset('img/logo_arrahn_baru.png') }}" width="200">
@csrf
@if (Session::has('error'))
@@ -94,7 +30,7 @@
<p>{{ Session::get('error') }}</p>
</div>
</div>
@endif
@endif
<label class="block text-gray-700 text-sm font-bold mb-2">Emel</label>
<div class="mb-4">
@@ -123,7 +59,7 @@
<a class="text-blue-400 text-center my-2">Forgot Pasword?</a>
</form>
<p class="text-center text-sm my-4">
<span class="font-semibold text-center w-full">Pajak Gadai</span> Koperasi Permodalan Kelantan Berhad
Permodalan Kelantan Berhad
</p>
</div>
</div>
+2 -45
View File
@@ -9,50 +9,7 @@
<breadcrumb :items="[{ 'title' : 'Dashboard', 'icon' : 'fas fa-columns' }]"></breadcrumb>
<div class="mb-4 w-full grid grid-cols-1 md:grid-cols-2 xl:grid-cols-3 gap-4">
<div class="bg-white shadow rounded-lg p-4 sm:p-6 xl:p-8 ">
<div class="flex items-center">
<div class="flex-shrink-0">
<span class="text-2xl sm:text-3xl leading-none font-bold text-gray-900">RM {{ ($ringkasanharian['gadai'][0]['jumlahpinjaman']) ? number_format($ringkasanharian['gadai'][0]['jumlahpinjaman'],2) : "0.00" }}</span>
<h3 class="text-base font-normal text-gray-500">Pembiayaan Hari Ini</h3>
</div>
{{-- <div class="ml-5 w-0 flex items-center justify-end flex-1 text-green-500 text-base font-bold">
14.6%
<svg class="w-5 h-5" fill="currentColor" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg">
<path fill-rule="evenodd" d="M5.293 7.707a1 1 0 010-1.414l4-4a1 1 0 011.414 0l4 4a1 1 0 01-1.414 1.414L11 5.414V17a1 1 0 11-2 0V5.414L6.707 7.707a1 1 0 01-1.414 0z" clip-rule="evenodd"></path>
</svg>
</div> --}}
</div>
</div>
<div class="bg-white shadow rounded-lg p-4 sm:p-6 xl:p-8 ">
<div class="flex items-center">
<div class="flex-shrink-0">
<span class="text-2xl sm:text-3xl leading-none font-bold text-gray-900">RM {{ ($ringkasanharian['tebus'][0]['jumlahpinjaman']) ? number_format($ringkasanharian['tebus'][0]['jumlahpinjaman'],2) : "0.00" }}</span>
<h3 class="text-base font-normal text-gray-500">Penebusan Hari Ini</h3>
</div>
{{-- <div class="ml-5 w-0 flex items-center justify-end flex-1 text-green-500 text-base font-bold">
32.9%
<svg class="w-5 h-5" fill="currentColor" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg">
<path fill-rule="evenodd" d="M5.293 7.707a1 1 0 010-1.414l4-4a1 1 0 011.414 0l4 4a1 1 0 01-1.414 1.414L11 5.414V17a1 1 0 11-2 0V5.414L6.707 7.707a1 1 0 01-1.414 0z" clip-rule="evenodd"></path>
</svg>
</div> --}}
</div>
</div>
<div class="bg-white shadow rounded-lg p-4 sm:p-6 xl:p-8 ">
<div class="flex items-center">
<div class="flex-shrink-0">
<span class="text-2xl sm:text-3xl leading-none font-bold text-gray-900">RM {{ number_format($keseluruhanupahharian,2) }}</span>
<h3 class="text-base font-normal text-gray-500">Keuntungan Hari Ini</h3>
</div>
{{-- <div class="ml-5 w-0 flex items-center justify-end flex-1 text-red-500 text-base font-bold">
-2.7%
<svg class="w-5 h-5" fill="currentColor" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg">
<path fill-rule="evenodd" d="M14.707 12.293a1 1 0 010 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 111.414-1.414L9 14.586V3a1 1 0 012 0v11.586l2.293-2.293a1 1 0 011.414 0z" clip-rule="evenodd"></path>
</svg>
</div> --}}
</div>
</div>
</div>
<harian-component kodcaw="{{ Auth::user()->cawangan }}"></harian-component>
<div class="w-full grid grid-cols-1 xl:grid-cols-2 2xl:grid-cols-3 gap-4">
<div class="bg-white shadow rounded-lg p-4 sm:p-6 xl:p-8 2xl:col-span-1">
@@ -74,7 +31,7 @@
<div class="flex items-center justify-between mb-4">
<div class="flex-shrink-0">
{{-- <span class="text-2xl sm:text-3xl leading-none font-bold text-gray-900">$45,385</span> --}}
<h3 class="text-base font-normal text-gray-500">Penyelesaian Bulanan</h3>
<h3 class="text-base font-normal text-gray-500">Penebusan Bulanan</h3>
</div>
{{-- <div class="flex items-center justify-end flex-1 text-green-500 text-base font-bold">
12.5%
+4 -2
View File
@@ -202,13 +202,14 @@
<a href="#">Contact</a> --}}
</div>
@auth
<nav class="bg-white border-b border-gray-200 z-30 w-full sticky">
<div class="px-3 py-3 lg:px-5 lg:pl-3">
<div class="flex items-center justify-between">
<div class="flex items-center justify-start">
@auth
<button id="toggleSidebarMobile" @if(Auth::user()->roles == 'admin') onclick="openNav()" @endif aria-expanded="true" aria-controls="sidebar" class=" mr-2 text-gray-600 hover:text-gray-900 cursor-pointer p-2 hover:bg-gray-100 focus:bg-gray-100 focus:ring-2 focus:ring-gray-100 rounded">
<svg id="toggleSidebarMobileHamburger" class="w-6 h-6" fill="currentColor" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg">
<path fill-rule="evenodd" d="M3 5a1 1 0 011-1h12a1 1 0 110 2H4a1 1 0 01-1-1zM3 10a1 1 0 011-1h6a1 1 0 110 2H4a1 1 0 01-1-1zM3 15a1 1 0 011-1h12a1 1 0 110 2H4a1 1 0 01-1-1z" clip-rule="evenodd"></path>
@@ -217,7 +218,7 @@
<path fill-rule="evenodd" d="M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z" clip-rule="evenodd"></path>
</svg>
</button>
@endauth
<a href="#" class="text-xl font-bold flex items-center lg:ml-2.5">
<img src="{{ asset('img/icon_pkb.png') }}" class="h-6 mr-2" alt="Windster Logo">
<span class="self-center whitespace-nowrap">Ar-Rahn</span>
@@ -276,6 +277,7 @@
</div>
</div>
</nav>
@endauth
<main class="py-4 px-4">
@yield('content')
+1 -1
View File
@@ -21,7 +21,7 @@ Route::middleware('auth:sanctum')->get('/user', function (Request $request) {
Route::group(['prefix' => 'check'], function () {
Route::get('/periksaalirantunai', 'App\Http\Controllers\AliranTunaiController@periksaAliranTunai');
Route::get('/periksapetibesi', 'App\Http\Controllers\PetiBesiController@periksaPetiBesi');
Route::get('/kemaskinialirantunai', 'App\Http\Controllers\AliranTunaiController@kemaskiniAliranTunai');
Route::put('/kemaskinialirantunai', 'App\Http\Controllers\AliranTunaiController@kemaskiniAliranTunai');
Route::put('/kemaskinipetibesi', 'App\Http\Controllers\PetiBesiController@kemaskiniPetiBesi');
});
+2 -1
View File
@@ -14,7 +14,8 @@ use Illuminate\Support\Facades\Route;
*/
Route::get('/', function () {
return view('welcome');
// return view('home');
return redirect()->route('login');
});
// Auth::routes();