third commit

This commit is contained in:
hafifierahman
2021-11-29 17:02:24 +08:00
parent 874cbe1604
commit 491a2ab61c
13 changed files with 12287 additions and 235 deletions
@@ -0,0 +1,24 @@
<?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Auth;
use Illuminate\Support\Facades\Session;
use Illuminate\Support\Facades\Http;
use Carbon\Carbon;
class PelangganController extends Controller
{
public function AdminPelanggan()
{
$api_url = config('api.url');
$auth_user = Auth::user();
$cawangan_info = Http::get(config('api.url') . '/api/cawangan/'. $auth_user['cawangan'])->json();
$cawangan=Http::get(config('api.url').'/api/cawangan/detail/'.$auth_user['cawangan'])->json();
$cawangan_detail=$cawangan[0];
return view('pelanggan.pelanggan',compact('api_url','cawangan_info','auth_user'));
}
}
+213
View File
@@ -0,0 +1,213 @@
<?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Auth;
use Illuminate\Support\Facades\Session;
use Illuminate\Support\Facades\Http;
use Carbon\Carbon;
class PetiBesiController extends Controller
{
// public function __construct()
// {
// $this->middleware('auth');
// }
public function periksaAliranTunai(Request $request)
{
$auth_user = Auth::user();
$current = Carbon::now();
$current = new Carbon();
$alirantunai = Http::get(config('api.url') . '/api/GetTunaiByTarikh/' . $request->kodcaw,['kodlaluan' => $request->teller, 'tarikh' => $request->tarikh])->json();
$keluar = $alirantunai['keluar'];
$baki = $alirantunai['baki'];
$masuk = $alirantunai['masuk'];
$bakiawal = $alirantunai['bakiawal'];
$pendahuluan = $alirantunai['tambah'];
$serahan = $alirantunai['kurang'];
$addtunai = Http::get(config('api.url') . '/api/getAddTunaiDateKodlaluan/' . $request->kodcaw,['kodlaluan' => $request->teller, 'tarikh' => $request->tarikh])->json();
$gadai = Http::get(config('api.url'). '/api/gadai/laporan/'. $request->kodcaw .'/'. $request->tarikh)->json();
$tebus = Http::get(config('api.url'). '/api/tebus/laporan/'. $request->kodcaw .'/'. $request->tarikh)->json();
$ansuran = Http::get(config('api.url'). '/api/ansuran/laporan/'. $request->kodcaw,['tarikh' => $request->tarikh])->json();
$tuntutbaki = Http::get(config('api.url'). '/api/TuntutBakiTarikhTeller/'. $request->kodcaw,['teller' => $request->teller, 'tarikh' => $request->tarikh])->json();
$advansur = Http::get(config('api.url').'/api/AdvansurSearchByTarikh/'.$request->kodcaw,['kodlaluan' => $request->teller, 'tarikh' => $request->tarikh ])->json();
$lelong = Http::get(config('api.url').'/api/lelong/tarikh/'.$request->kodcaw,['tarikh' => $request->tarikh])->json();
$lelongan = 0;
if(strtoupper($request->teller) === 'LELONG')
{
$lelongan = floatval($lelong);
}else{
$lelongan = 0;
}
$totalserahan = 0;
$totalpendahuluan = 0;
foreach($addtunai as $index1=>$at)
{
if($at['tambah'] > 0)
{
$totalpendahuluan += $at['tambah'];
}
if($at['kurang'] > 0)
{
$totalserahan += $at['kurang'];
}
}
$totalgadai = 0;
$totalgadaibarcodescanned = 0;
foreach($gadai as $index1=>$gad)
{
if($gad['teller'] === $request->teller)
{
if($gad['semakbarcode'] == 'Lulus')
$totalgadaibarcodescanned += $gad['pinjaman'];
$totalgadai += $gad['pinjaman'];
}
}
$totaltebus = 0;
$totaltebusbarcodescanned = 0;
foreach($tebus as $index1=>$teb)
{
if($teb['teller'] === $request->teller)
{
if($teb['tagterima'] === 1){
if($teb['jenistebus'] === 'S')
{
$totaltebusbarcodescanned += $teb['gadaibakipjm'] + $teb['bakiupah'];
}else{
$totaltebusbarcodescanned += $teb['bakipjm'];
}
}
if($teb['jenistebus'] === 'S')
{
$totaltebus += $teb['gadaibakipjm'] + $teb['bakiupah'];
}else{
$totaltebus += $teb['bakipjm'];
}
}
}
$totalansuran = 0;
foreach($ansuran as $index1=>$ans)
{
if($ans['teller'] === $request->teller)
$totalansuran += $ans['duit_masuk'];
}
$totalupahlama = 0;
foreach($advansur as $index1=>$upahlama)
{
$totalupahlama += $upahlama['upahDibayar'];
}
$totaltuntutbaki = 0;
$bakilelong = 0;
$rugilelong = 0;
foreach($tuntutbaki as $index1=>$tb)
{
if($tb['jenis'] == 'T')
{
$bakilelong += $tb['jumlah'];
}else{
$rugilelong += -($tb['jumlah']);
}
$totaltuntutbaki += $tb['jumlah'];
}
$penebusan = floatval($totaltebus) + floatval($totalansuran) + floatval($totalupahlama);
$penebusanbarcodescanned = floatval($totaltebusbarcodescanned) + floatval($totalansuran) + floatval($totalupahlama);
$gadaian = floatval($totalgadai);
if(strtoupper($request->teller) === 'LELONG'){
$penebusanbarcodescanned = floatval($lelongan);
$bakisemasa = floatval($bakiawal) + floatval($lelongan) - floatval($totalserahan);
}else{
$bakisemasa = floatval($bakiawal) + floatval($totalpendahuluan) + floatval($penebusan) - (floatval($gadaian) + floatval($totalserahan)) - floatval($totaltuntutbaki);
}
$errorpendahuluan = false; $errorserahan = false; $errorpenebusan = false; $errorgadaian = false; $errorbaki = false;
if(number_format($penebusanbarcodescanned,2) !== number_format($masuk,2))
$errorpenebusan = true;
if(number_format(round($bakisemasa,2),2) !== number_format(round($baki,2),2))
$errorbaki = true;
if(number_format($totalpendahuluan,2) != number_format($pendahuluan,2))
$errorpendahuluan = true;
if(number_format($totalserahan,2) != number_format($serahan,2))
$errorserahan = true;
if(number_format($totalgadaibarcodescanned,2) != number_format($keluar,2))
$errorgadaian = true;
if($errorpenebusan === false && $errorgadaian === false && $errorbaki === false)
{
return response('sama');
}else{
$arraykemaskini = ['pendahuluan' => round($totalpendahuluan,2),'serahan' => round($totalserahan,2), 'penebusan' => round($penebusanbarcodescanned,2), 'gadaian' => round($totalgadaibarcodescanned,2), 'bakisemasa' => round($bakisemasa,2),'bakiawal' => round($bakiawal,2)];
return response()->json($arraykemaskini);
}
}
public function kemaskiniAliranTunai(Request $request)
{
$auth_user = Auth::user();
$alirantunai = Http::get(config('api.url') . '/api/GetTunaiByTarikh/' . $request->kodcaw,['kodlaluan' => $request->teller, 'tarikh' => $request->tarikh])->json();
$keluar = $alirantunai['keluar'];
$baki = $alirantunai['baki'];
$masuk = $alirantunai['masuk'];
$bakiawal = $alirantunai['bakiawal'];
$pendahuluan = $alirantunai['tambah'];
$serahan = $alirantunai['kurang'];
$updateTunai = Http::put( config('api.url').'/api/updateTunaiGTByTarikh/'.$request->kodcaw, [
'kodlaluan' => $request->teller,
'tarikh' => $request->tarikh,
'keluar'=> $request->gadaian,
'masuk'=> $request->penebusan,
'bakiakhir'=> $request->bakiakhir
]);
if($updateTunai->status() == 200)
{
return response('berjaya');
}else{
return response('gagal');
}
}
public function AdminPetiBesi()
{
$api_url = config('api.url');
$auth_user = Auth::user();
$cawangan_info = Http::get(config('api.url') . '/api/cawangan/'. $auth_user['cawangan'])->json();
$cawangan=Http::get(config('api.url').'/api/cawangan/detail/'.$auth_user['cawangan'])->json();
$cawangan_detail=$cawangan[0];
$petibesi = Http::get(config('api.url') . '/api/VaultController/all/'. $auth_user['cawangan'])->json();
return view('petibesi.petibesi',compact('api_url','cawangan_info','auth_user','petibesi'));
}
}
+10418 -36
View File
File diff suppressed because it is too large Load Diff
+1198 -138
View File
File diff suppressed because it is too large Load Diff
+1
View File
@@ -39,6 +39,7 @@ Vue.component('sidebar', require('./components/Sidebar.vue').default)
Vue.component('breadcrumb', require('./components/Breadcrumb.vue').default)
Vue.component('dashboard', require('./pages/dashboard.vue').default)
Vue.component('tunai-component', require('./components/Tunai.vue').default)
Vue.component('petibesi-component', require('./components/Petibesi.vue').default)
Vue.component('cawangan-component', require('./components/cawangan.vue').default)
Vue.component('modal-component', require('./components/util/Modal.vue').default)
+29 -44
View File
@@ -2,41 +2,38 @@
<div>
<ol class="list-reset flex text-grey-dark mb-4 rounded">
<li class="bg-gray-500 py-2 px-4 rounded text-white">
<a href="#" class=""
><i class="far fa-folder mr-2"></i>
Home</a
>
<a href="#"><i class="far fa-folder mr-2"></i>Home</a>
</li>
<li class="mt-2"><span class="mx-2"><i class="fas fa-angle-double-right"></i></span></li>
<li class="bg-gray-500 py-2 px-4 rounded text-white">
<template v-for="(item,i) in items">
<template v-if="(items.length-1) == i">
<li class="bg-yellow-600 py-2 px-4 rounded text-white" :key="'last' + i">
<a href="">
<i class="mr-2" :class="item.icon"></i>
{{ item.title }}</a>
</li>
</template>
<template v-else>
<li class="bg-gray-500 py-2 px-4 rounded text-white" :key="i">
<a href="#"><i class="mr-2" :class="item.icon"></i> {{ item.title }}</a>
</li>
<li class="mt-2" :key="'A' + i">
<span class="mx-2"><i class="fas fa-angle-double-right"></i></span>
</li>
</template>
</template>
<!-- <li class="bg-gray-500 py-2 px-4 rounded text-white">
<a href="#" class=""><i class="far fa-folder mr-2"></i> Library</a>
</li>
<li class="mt-2"><span class="mx-2"><i class="fas fa-angle-double-right"></i></span></li>
<li class="bg-yellow-600 py-2 px-4 rounded text-white">
<a href="">
<svg
xmlns="http://www.w3.org/2000/svg"
fill="none"
viewBox="0 0 24 24"
class="w-4 h-4 stroke-current inline mr-1"
>
<path
stroke-linecap="round"
stroke-linejoin="round"
stroke-width="2"
d="M9 13h6m-3-3v6m5 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z"
></path>
<!---->
<!---->
<!---->
<!---->
<!---->
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" class="w-4 h-4 stroke-current inline mr-1">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 13h6m-3-3v6m5 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z"></path>
</svg>
Dashboard</a
>
</li>
Dashboard</a>
</li> -->
</ol>
</div>
</template>
@@ -49,25 +46,13 @@ export default{
type: Array,
default: () => [
{
title: "Totam",
content:
"Lorem ipsum dolor sit amet consectetur adipisicing elit. Aliquid, deleniti. Dolore corporis quidem sequi repellat cupiditate, possimus, excepturi praesentium iste ad voluptatem modi adipisci nulla laborum fugiat nemo placeat tempore numquam. Delectus quae ratione veniam excepturi quisquam nihil libero numquam.",
title: "Library",
icon:"far fa-folder"
},
{
title: "Natus",
content:
"Laboriosam aperiam corrupti veniam numquam sint ipsam deleniti iusto esse omnis cumque incidunt provident nisi fugiat consequatur, recusandae perspiciatis nobis atque, molestiae aliquid quaerat et delectus sequi sed? Fugit deleniti perspiciatis, laborum necessitatibus unde fugiat. Mollitia fugit ducimus consequatur veritatis?",
},
{
title: "Tempora",
content:
"Praesentium odit consectetur deleniti quae possimus reprehenderit magni! Quos officiis, perferendis dolores, quo assumenda possimus quibusdam quaerat similique quas deserunt qui alias aut provident. Eos dolorem magni fugit blanditiis, natus rerum inventore dignissimos quia, sunt consequatur neque quis adipisci. Dicta.",
},
{
title: "Eaque",
content:
"Impedit omnis autem labore obcaecati atque ea, non delectus iusto nemo enim possimus. Commodi deleniti perspiciatis iure laboriosam doloribus hic neque, sed possimus pariatur totam quis quos earum incidunt voluptate blanditiis veniam quibusdam id vel optio? Commodi dolores nulla minus?",
}
title: "Dashboard",
icon:"fas fa-columns"
}
]
}
},
+286
View File
@@ -0,0 +1,286 @@
<template>
<div class="container mx-auto px-5 my-10">
<modal ref="modal"></modal>
<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">
Keluar
</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">
Masuk
</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">
Panjar
</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">
Baki Akhir
</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="(petibesi,i) in active" :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)">
</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="petibesi.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="petibesi.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="petibesi.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="petibesi.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="petibesi.pendahuluan">
</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="petibesi.serahan">
</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="petibesi.totpanjar">
</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="petibesi.bakiakhir">
</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 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="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>
</div>
</article>
</div>
</template>
<script>
import { ChevronLeftIcon, ChevronRightIcon } from '@vue-hero-icons/solid'
import modal from './util/Modal.vue'
export default {
components: {
ChevronLeftIcon,
ChevronRightIcon,
modal
},
props: {
petibesi: {
type: Array
}
},
data() {
return {
index: 0,
leftToRight: true,
alirantunai:[],
perPage: 5,
totalPage: 0,
currentPage: 1,
lastPage: 5,
activePage: 1
};
},
computed:{
active() {
let jumsplit = this.activePage*this.perPage
let mulaPage = jumsplit - (this.perPage)
this.currentPage = mulaPage+1
this.lastPage = jumsplit
let vault = this.petibesi.slice(mulaPage, jumsplit)
return vault
}
},
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')
{
alert('sama')
}else{
this.alirantunai = response.data;
this.$refs.modal.showModal = true;
this.$refs.modal.serahan = this.alirantunai.serahan;
this.$refs.modal.bakiawal = this.alirantunai.bakiawal;
this.$refs.modal.bakiakhir = this.alirantunai.bakisemasa;
this.$refs.modal.pendahuluan = this.alirantunai.pendahuluan;
this.$refs.modal.penebusan = this.alirantunai.penebusan;
this.$refs.modal.gadaian = this.alirantunai.gadaian;
}
});
}
}
}
</script>
+39 -12
View File
@@ -39,7 +39,7 @@
<table class="min-w-full leading-normal">
<thead>
<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
@@ -71,11 +71,11 @@
</tr>
</thead>
<tbody>
<tr v-for="(tunai,i) in active" :key="i">
<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">
<p class="text-gray-900 whitespace-no-wrap" v-text="(i+1+active.mulaPage)">
</p>
</div>
</div>
@@ -168,7 +168,12 @@
{{ ' ' }}
to
{{ ' ' }}
<span class="font-medium">{{ this.perPage }}</span>
<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
{{ ' ' }}
@@ -185,12 +190,24 @@
</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" -->
<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">
1
<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-for="(row,i) in rows" :key="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">
<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> -->
<!-- <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>
@@ -255,7 +272,9 @@ export default {
alirantunai:[],
perPage: 5,
totalPage: 0,
currentPage: 1
currentPage: 1,
lastPage: 5,
activePage: 1
};
},
// created: function() {
@@ -265,11 +284,15 @@ export default {
computed: {
active() {
// Dynamically return the active "item", based on $data.index
let tunaidibahagi = this.$props.arraytunai[this.$data.index]
let pecahantunai = tunaidibahagi.slice(0, this.perPage)
let jumsplit = this.activePage*this.perPage
let mulaPage = jumsplit - (this.perPage);
return pecahantunai
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
@@ -280,10 +303,14 @@ export default {
},
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){
+1 -1
View File
@@ -7,7 +7,7 @@
<div class="pt-6 px-4">
<breadcrumb></breadcrumb>
<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 ">
+2 -2
View File
@@ -129,7 +129,7 @@
</li>
</a>
<a href="#">
<a href="{{ route('admin.petibesi') }}">
<li class="flex w-full justify-between text-gray-600 hover:text-yellow-500 cursor-pointer items-center mb-6">
<div class="flex items-center">
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-safe2" viewBox="0 0 16 16">
@@ -141,7 +141,7 @@
</li>
</a>
<a href="#">
<a href="{{ route('admin.pelanggan') }}">
<li class="flex w-full justify-between text-gray-600 hover:text-yellow-500 cursor-pointer items-center mb-6">
<div class="flex items-center">
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-person-bounding-box" viewBox="0 0 16 16">
@@ -0,0 +1,55 @@
@extends('layouts.app')
@section('content')
<div class="bg-gray-900 opacity-50 hidden fixed inset-0 z-10" id="sidebarBackdrop"></div>
<div id="main-content" class="h-full w-full bg-gray-50 relative overflow-y-auto">
<main>
<div class="pt-6 px-4">
<breadcrumb :items="[{ 'title' : 'Pelanggan', 'icon' : 'fas fa-users' }]"></breadcrumb>
<div class="flex items-center mx-auto">
<div class="bg-white justify-content-center">
<input type="text" class="px-6 py-6 w-96 border rounded" placeholder="Enter anything"/>
</div>
</div>
</div>
</main>
<footer class="bg-white md:flex md:items-center md:justify-between shadow rounded-lg p-4 md:p-6 xl:p-8 my-6 mx-4">
<ul class="flex items-center flex-wrap mb-6 md:mb-0">
<li><a href="#" class="text-sm font-normal text-gray-500 hover:underline mr-4 md:mr-6">Terms and conditions</a></li>
<li><a href="#" class="text-sm font-normal text-gray-500 hover:underline mr-4 md:mr-6">Privacy Policy</a></li>
<li><a href="#" class="text-sm font-normal text-gray-500 hover:underline mr-4 md:mr-6">Licensing</a></li>
<li><a href="#" class="text-sm font-normal text-gray-500 hover:underline mr-4 md:mr-6">Cookie Policy</a></li>
<li><a href="#" class="text-sm font-normal text-gray-500 hover:underline">Contact</a></li>
</ul>
<div class="flex sm:justify-center space-x-6">
<a href="#" class="text-gray-500 hover:text-gray-900">
<svg class="h-5 w-5" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true">
<path fill-rule="evenodd" d="M22 12c0-5.523-4.477-10-10-10S2 6.477 2 12c0 4.991 3.657 9.128 8.438 9.878v-6.987h-2.54V12h2.54V9.797c0-2.506 1.492-3.89 3.777-3.89 1.094 0 2.238.195 2.238.195v2.46h-1.26c-1.243 0-1.63.771-1.63 1.562V12h2.773l-.443 2.89h-2.33v6.988C18.343 21.128 22 16.991 22 12z" clip-rule="evenodd" />
</svg>
</a>
<a href="#" class="text-gray-500 hover:text-gray-900">
<svg class="h-5 w-5" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true">
<path fill-rule="evenodd" d="M12.315 2c2.43 0 2.784.013 3.808.06 1.064.049 1.791.218 2.427.465a4.902 4.902 0 011.772 1.153 4.902 4.902 0 011.153 1.772c.247.636.416 1.363.465 2.427.048 1.067.06 1.407.06 4.123v.08c0 2.643-.012 2.987-.06 4.043-.049 1.064-.218 1.791-.465 2.427a4.902 4.902 0 01-1.153 1.772 4.902 4.902 0 01-1.772 1.153c-.636.247-1.363.416-2.427.465-1.067.048-1.407.06-4.123.06h-.08c-2.643 0-2.987-.012-4.043-.06-1.064-.049-1.791-.218-2.427-.465a4.902 4.902 0 01-1.772-1.153 4.902 4.902 0 01-1.153-1.772c-.247-.636-.416-1.363-.465-2.427-.047-1.024-.06-1.379-.06-3.808v-.63c0-2.43.013-2.784.06-3.808.049-1.064.218-1.791.465-2.427a4.902 4.902 0 011.153-1.772A4.902 4.902 0 015.45 2.525c.636-.247 1.363-.416 2.427-.465C8.901 2.013 9.256 2 11.685 2h.63zm-.081 1.802h-.468c-2.456 0-2.784.011-3.807.058-.975.045-1.504.207-1.857.344-.467.182-.8.398-1.15.748-.35.35-.566.683-.748 1.15-.137.353-.3.882-.344 1.857-.047 1.023-.058 1.351-.058 3.807v.468c0 2.456.011 2.784.058 3.807.045.975.207 1.504.344 1.857.182.466.399.8.748 1.15.35.35.683.566 1.15.748.353.137.882.3 1.857.344 1.054.048 1.37.058 4.041.058h.08c2.597 0 2.917-.01 3.96-.058.976-.045 1.505-.207 1.858-.344.466-.182.8-.398 1.15-.748.35-.35.566-.683.748-1.15.137-.353.3-.882.344-1.857.048-1.055.058-1.37.058-4.041v-.08c0-2.597-.01-2.917-.058-3.96-.045-.976-.207-1.505-.344-1.858a3.097 3.097 0 00-.748-1.15 3.098 3.098 0 00-1.15-.748c-.353-.137-.882-.3-1.857-.344-1.023-.047-1.351-.058-3.807-.058zM12 6.865a5.135 5.135 0 110 10.27 5.135 5.135 0 010-10.27zm0 1.802a3.333 3.333 0 100 6.666 3.333 3.333 0 000-6.666zm5.338-3.205a1.2 1.2 0 110 2.4 1.2 1.2 0 010-2.4z" clip-rule="evenodd" />
</svg>
</a>
<a href="#" class="text-gray-500 hover:text-gray-900">
<svg class="h-5 w-5" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true">
<path d="M8.29 20.251c7.547 0 11.675-6.253 11.675-11.675 0-.178 0-.355-.012-.53A8.348 8.348 0 0022 5.92a8.19 8.19 0 01-2.357.646 4.118 4.118 0 001.804-2.27 8.224 8.224 0 01-2.605.996 4.107 4.107 0 00-6.993 3.743 11.65 11.65 0 01-8.457-4.287 4.106 4.106 0 001.27 5.477A4.072 4.072 0 012.8 9.713v.052a4.105 4.105 0 003.292 4.022 4.095 4.095 0 01-1.853.07 4.108 4.108 0 003.834 2.85A8.233 8.233 0 012 18.407a11.616 11.616 0 006.29 1.84" />
</svg>
</a>
<a href="#" class="text-gray-500 hover:text-gray-900">
<svg class="h-5 w-5" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true">
<path fill-rule="evenodd" d="M12 2C6.477 2 2 6.484 2 12.017c0 4.425 2.865 8.18 6.839 9.504.5.092.682-.217.682-.483 0-.237-.008-.868-.013-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.029-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.202 2.398.1 2.651.64.7 1.028 1.595 1.028 2.688 0 3.848-2.339 4.695-4.566 4.943.359.309.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.019 10.019 0 0022 12.017C22 6.484 17.522 2 12 2z" clip-rule="evenodd" />
</svg>
</a>
<a href="#" class="text-gray-500 hover:text-gray-900">
<svg class="h-5 w-5" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true">
<path fill-rule="evenodd" d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10c5.51 0 10-4.48 10-10S17.51 2 12 2zm6.605 4.61a8.502 8.502 0 011.93 5.314c-.281-.054-3.101-.629-5.943-.271-.065-.141-.12-.293-.184-.445a25.416 25.416 0 00-.564-1.236c3.145-1.28 4.577-3.124 4.761-3.362zM12 3.475c2.17 0 4.154.813 5.662 2.148-.152.216-1.443 1.941-4.48 3.08-1.399-2.57-2.95-4.675-3.189-5A8.687 8.687 0 0112 3.475zm-3.633.803a53.896 53.896 0 013.167 4.935c-3.992 1.063-7.517 1.04-7.896 1.04a8.581 8.581 0 014.729-5.975zM3.453 12.01v-.26c.37.01 4.512.065 8.775-1.215.25.477.477.965.694 1.453-.109.033-.228.065-.336.098-4.404 1.42-6.747 5.303-6.942 5.629a8.522 8.522 0 01-2.19-5.705zM12 20.547a8.482 8.482 0 01-5.239-1.8c.152-.315 1.888-3.656 6.703-5.337.022-.01.033-.01.054-.022a35.318 35.318 0 011.823 6.475 8.4 8.4 0 01-3.341.684zm4.761-1.465c-.086-.52-.542-3.015-1.659-6.084 2.679-.423 5.022.271 5.314.369a8.468 8.468 0 01-3.655 5.715z" clip-rule="evenodd" />
</svg>
</a>
</div>
@endsection
@@ -0,0 +1,14 @@
@extends('layouts.app')
@section('content')
<div id="main-content" class="h-full w-full bg-gray-50 relative overflow-y-auto">
<main>
<div class="pt-6 px-4">
<breadcrumb :items="[{ 'title' : 'Peti Besi', 'icon' : 'fas fa-toolbox' }]"></breadcrumb>
<petibesi-component :petibesi="{{ json_encode($petibesi) }}"></petibesi-component>
</div>
</main>
</div>
@endsection
+7 -2
View File
@@ -31,6 +31,11 @@ Route::get('/home', [App\Http\Controllers\HomeController::class, 'index'])->name
//Tunai
Route::get('alirantunai',['as'=>'admin.alirantunai','uses'=>'App\Http\Controllers\AliranTunaiController@AdminAliranTunai'])->middleware('auth');
//Peti Besi
Route::get('petibesi',['as'=>'admin.petibesi','uses'=>'App\Http\Controllers\PetiBesiController@AdminPetiBesi'])->middleware('auth');
//Pelanggan
Route::get('pelanggan',['as'=>'admin.pelanggan','uses'=>'App\Http\Controllers\PelangganController@AdminPelanggan'])->middleware('auth');
//Kemaskini Aliran Tunai
Route::get('/periksaalirantunai',['as'=>'periksa.alirantunai','uses'=>'App\Http\Controllers\AliranTunaiController@periksaAliranTunai'])->middleware('auth');
Route::get('/kemaskinialirantunai',['as'=>'kemaskini.alirantunai','uses'=>'App\Http\Controllers\AliranTunaiController@kemaskiniAliranTunai'])->middleware('auth');
Route::get('/periksaalirantunai',['as'=>'periksa.alirantunai','uses'=>'App\Http\Controllers\AliranTunaiController@periksaAliranTunai']);
Route::get('/kemaskinialirantunai',['as'=>'kemaskini.alirantunai','uses'=>'App\Http\Controllers\AliranTunaiController@kemaskiniAliranTunai']);