Merge branch 'Features#add-year-dashborad' into 'main'
Features#add year dashborad See merge request online-sistem1/admin-portal!36
This commit is contained in:
@@ -22,8 +22,11 @@ class AliranTunaiController extends Controller
|
||||
$current = Carbon::now();
|
||||
$current = new Carbon();
|
||||
|
||||
$alirantunai = Http::get($request->hostname . '/admin/GetTunaiByTarikh/' . $request->kodcaw,['kodlaluan' => $request->teller, 'tarikh' => $request->tarikh])->json(); //
|
||||
// dd($alirantunai);
|
||||
$alirantunaisebelum = Http::get($request->hostname . '/admin/GetTunaiByTarikhSebelum/' . $request->kodcaw,['kodlaluan' => $request->teller, 'tarikh' => $request->tarikh])->json();
|
||||
$alirantunai = Http::get($request->hostname . '/admin/GetTunaiByTarikh/' . $request->kodcaw,['kodlaluan' => $request->teller, 'tarikh' => $request->tarikh])->json();
|
||||
|
||||
$sebelumbakiakhir = (sizeof($alirantunaisebelum) > 0) ? $alirantunaisebelum['baki'] : 0;
|
||||
|
||||
$keluar = $alirantunai['keluar'];
|
||||
$baki = $alirantunai['baki'];
|
||||
$masuk = $alirantunai['masuk'];
|
||||
@@ -135,9 +138,9 @@ class AliranTunaiController extends Controller
|
||||
|
||||
if(strtoupper($request->teller) === 'LELONG'){
|
||||
$penebusanbarcodescanned = floatval($lelongan);
|
||||
$bakisemasa = floatval($bakiawal) + floatval($lelongan) - floatval($totalserahan);
|
||||
$bakisemasa = floatval($sebelumbakiakhir) + floatval($lelongan) - floatval($totalserahan);
|
||||
}else{
|
||||
$bakisemasa = floatval($bakiawal) + floatval($totalpendahuluan) + floatval($penebusan) - (floatval($gadaian) + floatval($totalserahan)) - floatval($totaltuntutbaki);
|
||||
$bakisemasa = floatval($sebelumbakiakhir) + floatval($totalpendahuluan) + floatval($penebusan) - (floatval($gadaian) + floatval($totalserahan)) - floatval($totaltuntutbaki);
|
||||
}
|
||||
|
||||
$errorpendahuluan = false; $errorserahan = false; $errorpenebusan = false; $errorgadaian = false; $errorbaki = false;
|
||||
@@ -161,7 +164,7 @@ class AliranTunaiController extends Controller
|
||||
{
|
||||
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)];
|
||||
$arraykemaskini = ['pendahuluan' => round($totalpendahuluan,2),'serahan' => round($totalserahan,2), 'penebusan' => round($penebusanbarcodescanned,2), 'gadaian' => round($totalgadaibarcodescanned,2), 'bakisemasa' => round($bakisemasa,2),'bakiawal' => round($sebelumbakiakhir,2)];
|
||||
return response()->json($arraykemaskini);
|
||||
}
|
||||
}
|
||||
@@ -170,16 +173,8 @@ class AliranTunaiController extends Controller
|
||||
{
|
||||
$auth_user = Auth::user();
|
||||
|
||||
$alirantunai = Http::get($request->hostname . '/admin/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::post( $request->hostname.'/admin/updateTunaiGTByTarikh/'.$request->kodcaw, [
|
||||
'bakiawal' => $request->bakiawal,
|
||||
'kodlaluan' => $request->teller,
|
||||
'tarikh' => $request->tarikh,
|
||||
'keluar'=> $request->gadaian,
|
||||
|
||||
@@ -0,0 +1,20 @@
|
||||
<?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 Illuminate\Support\Facades\Storage;
|
||||
use Carbon\Carbon;
|
||||
|
||||
class PenggunaController extends Controller
|
||||
{
|
||||
public function index(){
|
||||
$api_url = config('api.url');
|
||||
$auth_user = Auth::user()->toArray();
|
||||
|
||||
return view('pengguna.index',compact('api_url','auth_user'));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,40 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Controllers;
|
||||
|
||||
use App\Models\User;
|
||||
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Support\Facades\Auth;
|
||||
use Illuminate\Support\Facades\Session;
|
||||
use Illuminate\Support\Facades\Http;
|
||||
use Illuminate\Support\Facades\Storage;
|
||||
use Illuminate\Support\Facades\Hash;
|
||||
use Carbon\Carbon;
|
||||
|
||||
class ProfileController extends Controller
|
||||
{
|
||||
public function changepassword(Request $request){
|
||||
$api_url = config('api.url');
|
||||
|
||||
$request->validate([
|
||||
'current_password' => 'required',
|
||||
'new_password' => 'required|min:9',
|
||||
]);
|
||||
|
||||
|
||||
$user = User::where('email',$request->email)->first();
|
||||
|
||||
if (Hash::check($request->current_password, $user->password)) {
|
||||
$user->password = Hash::make($request->new_password);
|
||||
$user->save();
|
||||
|
||||
return response('success',200);
|
||||
} else {
|
||||
return response('wrongpass',401);
|
||||
}
|
||||
// return view('pengguna.index',compact('api_url','auth_user'));
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
@@ -99,7 +99,6 @@ export default {
|
||||
}).then( response => {
|
||||
this.arrayBajet = response.data
|
||||
this.showLoader = false;
|
||||
console.log(this.arrayBajet)
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,71 @@
|
||||
<template>
|
||||
<div>
|
||||
<harian-component></harian-component>
|
||||
|
||||
<div class="w-full flex justify-center items-center">
|
||||
<div class="p-2.5 -mt-3 font-bold">TAHUN : </div>
|
||||
<select v-model="selected" class="w-1/12 bg-white mb-2 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500">
|
||||
<option value="2022">2022</option>
|
||||
<option value="2023">2023</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="w-full grid grid-cols-1 xl:grid-cols-3 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">
|
||||
<div class="flex items-center justify-between mb-4">
|
||||
<div class="flex-shrink-0">
|
||||
<h3 class="text-base font-normal text-gray-500">Pembiayaan Bulanan</h3>
|
||||
</div>
|
||||
</div>
|
||||
<div class="mx-auto mt-10"><pemb-chart ref="pemb"></pemb-chart></div>
|
||||
</div>
|
||||
<div class="bg-white shadow rounded-lg p-4 sm:p-6 xl:p-8 2xl:col-span-1">
|
||||
<div class="flex items-center justify-between mb-4">
|
||||
<div class="flex-shrink-0">
|
||||
<h3 class="text-base font-normal text-gray-500">Penebusan Bulanan</h3>
|
||||
</div>
|
||||
</div>
|
||||
<div class="mx-auto mt-10"><peny-chart ref="peny"></peny-chart></div>
|
||||
</div>
|
||||
|
||||
<div class="bg-white shadow rounded-lg p-4 sm:p-6 xl:p-8 2xl:col-span-1">
|
||||
<div class="flex items-center justify-between mb-4">
|
||||
<div class="flex-shrink-0">
|
||||
<h3 class="text-base font-normal text-gray-500">Keuntungan Bulanan</h3>
|
||||
</div>
|
||||
</div>
|
||||
<div class="mx-auto mt-10"><keun-chart ref="keun"></keun-chart></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<tahunan-component ref="tahunan"></tahunan-component>
|
||||
|
||||
<aging-component></aging-component>
|
||||
|
||||
<bilangan-component ref="bilangan"></bilangan-component>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
selected: '2023',
|
||||
}
|
||||
},
|
||||
created(){
|
||||
this.selected = this.$tahun;
|
||||
},
|
||||
watch: {
|
||||
selected: function (val, oldVal) {
|
||||
this.settahun(val);
|
||||
this.$refs.pemb.getDataPembiayaan();
|
||||
this.$refs.peny.getDataPenebusan();
|
||||
this.$refs.keun.getDatakeuntungan();
|
||||
this.$refs.bilangan.getData();
|
||||
this.$refs.tahunan.getDataPembiayaan();
|
||||
this.$refs.tahunan.getDataPenebusan();
|
||||
this.$refs.tahunan.getDataKeuntungan();
|
||||
}
|
||||
},
|
||||
}
|
||||
</script>>
|
||||
@@ -95,7 +95,6 @@ export default {
|
||||
page: pageNumber
|
||||
}
|
||||
}).then(response => {
|
||||
console.log(response.data)
|
||||
this.showkelulusan = response.data
|
||||
this.paginate = response.data
|
||||
this.currentPage = pageNumber
|
||||
@@ -104,7 +103,6 @@ export default {
|
||||
},
|
||||
ApproveFunc: async function (noruj, kcaw, tel, sir) {
|
||||
let boolkatalaluan = 0;
|
||||
console.log(noruj, kcaw, tel, sir)
|
||||
const {
|
||||
value: katalaluan
|
||||
} = await this.$swal({
|
||||
|
||||
@@ -0,0 +1,214 @@
|
||||
<template>
|
||||
<div>
|
||||
<ul class="flex hidden rounded-lg divide-x divide-gray-200 shadow sm:flex dark:divide-gray-700 mb-4">
|
||||
<li class="w-full">
|
||||
<button id="profile" type="button"
|
||||
:class="{'bg-gray-300 text-gray-900 hover:bg-gray-300': this.showprofile}"
|
||||
class="inline-block relative py-4 px-4 w-full text-sm font-medium text-center text-gray-500 rounded-l-lg focus:z-20 active hover:bg-gray-50 dark:bg-gray-700 dark:text-white"
|
||||
aria-current="page" @click="TabsAndPills($event)">Profil Pengguna</button>
|
||||
</li>
|
||||
<li class="w-full">
|
||||
<button id="password" type="button"
|
||||
:class="{'bg-gray-300 text-gray-900 hover:bg-gray-300': this.showpassword}"
|
||||
class="inline-block relative py-4 px-4 w-full text-sm font-medium text-center text-gray-500 hover:text-gray-700 hover:bg-gray-50 focus:z-20 dark:text-gray-400 dark:hover:text-white dark:bg-gray-800 dark:hover:bg-gray-700 dark:text-white"
|
||||
@click="TabsAndPills($event)">Katalaluan</button>
|
||||
</li>
|
||||
</ul>
|
||||
<div id="tabs-1" v-if="showprofile">
|
||||
|
||||
<form class="mx-auto my-16 bg-white p-4 rounded">
|
||||
<div class="grid grid-cols-2">
|
||||
<div class="mb-4 p-2">
|
||||
<label for="name" class="block text-gray-700 text-sm font-bold mb-2">Name</label>
|
||||
<input type="text" id="name" disabled :value="user.name"
|
||||
class="shadow appearance-none border rounded w-full py-2 px-3 text-gray-700 leading-tight focus:outline-none focus:shadow-outline" />
|
||||
</div>
|
||||
<div class="mb-4 p-2">
|
||||
<label for="email" class="block text-gray-700 text-sm font-bold mb-2">Email</label>
|
||||
<input type="email" id="email" disabled :value="user.email"
|
||||
class="shadow appearance-none border rounded w-full py-2 px-3 text-gray-700 leading-tight focus:outline-none focus:shadow-outline" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="grid grid-cols-2">
|
||||
<div class="mb-4 p-2">
|
||||
<label for="no_kp" class="block text-gray-700 text-sm font-bold mb-2">No KP</label>
|
||||
<input type="text" id="no_kp" disabled :value="user.no_kp"
|
||||
class="shadow appearance-none border rounded w-full py-2 px-3 text-gray-700 leading-tight focus:outline-none focus:shadow-outline" />
|
||||
</div>
|
||||
<div class="mb-4 p-2">
|
||||
<label for="no_telefon" class="block text-gray-700 text-sm font-bold mb-2">No Telefon</label>
|
||||
<input type="tel" id="no_telefon" disabled :value="user.no_telefon"
|
||||
class="shadow appearance-none border rounded w-full py-2 px-3 text-gray-700 leading-tight focus:outline-none focus:shadow-outline" />
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<div id="tabs-2" v-if="showpassword">
|
||||
<form class="max-w-md mx-auto my-16 bg-white p-4 rounded" @submit.prevent="submit" novalidate>
|
||||
<div class="mb-4">
|
||||
<label for="currentpass" class="block text-gray-700 text-sm font-bold mb-2">Katalaluan Lama</label>
|
||||
<input type="password"
|
||||
:class="{ 'border border-red-500 focus:border-red-500': $v.currentPassword.$error }"
|
||||
v-model.trim="$v.currentPassword.$model" id="currentpass"
|
||||
class="shadow appearance-none border rounded w-full py-2 px-3 text-gray-700 leading-tight focus:outline-none focus:shadow-outline" />
|
||||
<span class="text-red-500 text-xs italic" v-if="!$v.currentPassword.required">Kata laluan
|
||||
diperlukan</span>
|
||||
</div>
|
||||
<div class="mb-4">
|
||||
<label for="newpass" class="block text-gray-700 text-sm font-bold mb-2">Katalaluan Baru</label>
|
||||
<input type="password"
|
||||
:class="{ 'border border-red-500 focus:border-red-500': $v.newPassword.$error }"
|
||||
v-model.trim="$v.newPassword.$model"
|
||||
class="shadow appearance-none border rounded w-full py-2 px-3 text-gray-700 leading-tight focus:outline-none focus:shadow-outline" />
|
||||
<div>
|
||||
<span class="text-red-500 text-xs italic" v-if="!$v.newPassword.required">Kata laluan
|
||||
diperlukan</span>
|
||||
<span class="text-red-500 text-xs italic" v-if="newPassword && !$v.newPassword.valid">Katalaluan
|
||||
harus sekurang-kurangnya mengandungi Satu Huruf Besar, Satu Huruf Kecil, Satu Nombor dan
|
||||
Satu Special Character </span>
|
||||
<span class="text-red-500 text-xs italic"
|
||||
v-if="newPassword && $v.newPassword.valid && !$v.newPassword.minLength">Katalaluan mestilah
|
||||
sekurang-kurangnya 9 aksara</span>
|
||||
<span class="text-red-500 text-xs italic"
|
||||
v-if="newPassword && !$v.newPassword.maxLength">Katalaluan mestilah maksimum 19
|
||||
aksara</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="mb-4">
|
||||
<label for="confirmpass" class="block text-gray-700 text-sm font-bold mb-2">Sahkan Katalaluan Baru
|
||||
</label>
|
||||
<input type="password"
|
||||
:class="{ 'border border-red-500 focus:border-red-500': $v.confirmPassword.$error }"
|
||||
v-model.trim="$v.confirmPassword.$model" id="confirmpass"
|
||||
class="shadow appearance-none border rounded w-full py-2 px-3 text-gray-700 leading-tight focus:outline-none focus:shadow-outline" />
|
||||
<div>
|
||||
<span class="text-red-500 text-xs italic" v-if="!$v.confirmPassword.required">Pengesahan
|
||||
Katalaluan diperlukan</span>
|
||||
<span class="text-red-500 text-xs italic"
|
||||
v-if="confirmPassword && !$v.confirmPassword.sameAsPassword">Katalaluan dan Sahkan
|
||||
Katalaluan haruslah sama</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="flex items-center justify-between">
|
||||
<span class="invisible">arrahn</span>
|
||||
<button type="submit" :disabled="this.isDisabled"
|
||||
:class="this.isDisabled ? 'bg-blue-200' : 'bg-blue-500 hover:bg-blue-700'"
|
||||
class=" text-white font-bold py-2 px-4 rounded focus:outline-none focus:shadow-outline">
|
||||
<span>Tukar</span>
|
||||
</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import {
|
||||
assertExpressionStatement
|
||||
} from '@babel/types';
|
||||
import {
|
||||
required,
|
||||
minLength,
|
||||
between,
|
||||
maxLength,
|
||||
sameAs
|
||||
} from 'vuelidate/lib/validators'
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
showprofile: true,
|
||||
showpassword: false,
|
||||
submitStatus: '',
|
||||
user: this.$attrs.user,
|
||||
newPassword: "",
|
||||
currentPassword: "",
|
||||
confirmPassword: "",
|
||||
submitted: false,
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.submitted = true;
|
||||
return this.$v.$touch();
|
||||
},
|
||||
computed: {
|
||||
isDisabled() {
|
||||
return this.$v.$invalid;
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
TabsAndPills: function (event) {
|
||||
let targetId = event.currentTarget.id
|
||||
|
||||
event.preventDefault()
|
||||
if (targetId === 'profile' && this.showprofile === false) {
|
||||
this.showprofile = true
|
||||
this.showpassword = false
|
||||
}
|
||||
|
||||
if (targetId === 'password' && this.showpassword === false) {
|
||||
this.showprofile = false
|
||||
this.showpassword = true
|
||||
}
|
||||
},
|
||||
submit: function () {
|
||||
this.submitted = true;
|
||||
this.$v.$touch();
|
||||
if (this.$v.$invalid) {
|
||||
this.$toast.warning('Masukkan data dalam kotak yang disediakan.')
|
||||
return false;
|
||||
} else {
|
||||
let self = this
|
||||
|
||||
return this.axios.post('/api/changepass', {
|
||||
current_password: this.currentPassword,
|
||||
new_password: this.newPassword,
|
||||
email: this.user.email
|
||||
}).then((response) => {
|
||||
if(response.data == 'success'){
|
||||
self.$toast.success('Kemaskini Katalaluan berjaya.')
|
||||
}
|
||||
|
||||
}).catch(function (error) {
|
||||
if (error.response) {
|
||||
// console.log(error.response.data);
|
||||
// console.log(error.response.status);
|
||||
// console.log(error.response.headers);
|
||||
if(error.response.status == 401){
|
||||
// console.log('tidak sama la');
|
||||
self.$toast.error('Masukkan katalaluan yang betul.')
|
||||
}
|
||||
} else if (error.request) {
|
||||
// console.log(error.request);
|
||||
} else {
|
||||
// console.log('Error', error.message);
|
||||
}
|
||||
// console.log(error.config);
|
||||
});
|
||||
alert("Form Valid");
|
||||
}
|
||||
}
|
||||
},
|
||||
validations: {
|
||||
newPassword: {
|
||||
required,
|
||||
valid: function (value) {
|
||||
const containsUppercase = /[A-Z]/.test(value)
|
||||
const containsLowercase = /[a-z]/.test(value)
|
||||
const containsNumber = /[0-9]/.test(value)
|
||||
const containsSpecial = /[#?!@$%^&*-]/.test(value)
|
||||
return containsUppercase && containsLowercase && containsNumber && containsSpecial
|
||||
},
|
||||
minLength: minLength(9),
|
||||
maxLength: maxLength(19),
|
||||
},
|
||||
currentPassword: {
|
||||
required
|
||||
},
|
||||
confirmPassword: {
|
||||
required,
|
||||
sameAsPassword: sameAs("newPassword")
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
</script>
|
||||
Vendored
+20
-1
@@ -133,11 +133,13 @@ Vue.prototype.$userroles = document.querySelector("meta[name='user_roles']").get
|
||||
|
||||
let initial = 'KB2';
|
||||
let initialhostname = 'http://api.arrahn/';
|
||||
let initialtahun = new Date().getFullYear();
|
||||
|
||||
const store = new Vuex.Store({
|
||||
state: {
|
||||
$kodcaw: 'KB2',
|
||||
$hostname: 'http://api.arrahn/'
|
||||
$hostname: 'http://api.arrahn/',
|
||||
$tahun: new Date().getFullYear()
|
||||
},
|
||||
plugins: [createPersistedState()],
|
||||
mutations: {
|
||||
@@ -147,9 +149,14 @@ const store = new Vuex.Store({
|
||||
update$hostname: function(state, newHostname) {
|
||||
state.$hostname = newHostname;
|
||||
},
|
||||
update$tahun: function(state, newTahun) {
|
||||
state.$tahun = newTahun;
|
||||
},
|
||||
reset (state) {
|
||||
state.$kodcaw = initial;
|
||||
state.$hostname = initialhostname;
|
||||
state.$tahun = initialtahun;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@@ -166,6 +173,11 @@ Vue.mixin({
|
||||
get: function () {
|
||||
return store.state.$hostname
|
||||
},
|
||||
},
|
||||
$tahun: {
|
||||
get: function () {
|
||||
return store.state.$tahun
|
||||
},
|
||||
}
|
||||
},
|
||||
methods:{
|
||||
@@ -176,6 +188,9 @@ Vue.mixin({
|
||||
sethostname: function(newHostname) {
|
||||
return store.commit('update$hostname', newHostname);
|
||||
},
|
||||
settahun: function(newTahun) {
|
||||
return store.commit('update$tahun', newTahun);
|
||||
},
|
||||
setLogout: function(){
|
||||
return store.commit('reset');
|
||||
}
|
||||
@@ -184,6 +199,8 @@ Vue.mixin({
|
||||
|
||||
|
||||
//Chart
|
||||
Vue.component('dashboard-component', require('./Dashboard/index.vue').default)
|
||||
|
||||
Vue.component('pemb-chart', require('./components/Chart/PembiayaanChart.vue').default)
|
||||
Vue.component('peny-chart', require('./components/Chart/PenyelesaianChart.vue').default)
|
||||
Vue.component('keun-chart', require('./components/Chart/KeuntunganChart.vue').default)
|
||||
@@ -236,6 +253,8 @@ Vue.component('audit-component', require('./Audit/Home.vue').default)
|
||||
|
||||
//Tetapan
|
||||
Vue.component('tetapan-component', require('./Tetapan/index.vue').default)
|
||||
Vue.component('pengguna-component', require('./Pengguna/index.vue').default)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -266,7 +266,6 @@ export default {
|
||||
kodcaw: this.$kodcaw
|
||||
}
|
||||
}).then(response => {
|
||||
console.log(this.$api1)
|
||||
this.keuntunganharian = formatter.format(response.data[0].upahToday),
|
||||
this.bajetkeuntungan = formatter.format(response.data[0].bajetharian.toFixed(2)),
|
||||
this.percentkeuntungan = response.data[0].percentDiff,
|
||||
@@ -286,7 +285,6 @@ export default {
|
||||
channel.bind('trigger-gadai', ({
|
||||
cawangan
|
||||
}) => {
|
||||
console.log(`${cawangan}`);
|
||||
|
||||
if (this.$kodcaw === cawangan)
|
||||
this.getDataPembiayaan()
|
||||
@@ -297,7 +295,6 @@ export default {
|
||||
channel.bind('trigger-tebus', ({
|
||||
cawangan
|
||||
}) => {
|
||||
console.log(`${cawangan}`);
|
||||
|
||||
if (this.$kodcaw === cawangan)
|
||||
this.getDataPenebusan()
|
||||
@@ -308,7 +305,6 @@ export default {
|
||||
channel.bind('trigger-keuntungan', ({
|
||||
cawangan
|
||||
}) => {
|
||||
console.log(`${cawangan}`);
|
||||
|
||||
if (this.$kodcaw === cawangan)
|
||||
this.getDataKeuntungan()
|
||||
|
||||
@@ -82,13 +82,13 @@ export default {
|
||||
this.getDataPembiayaan()
|
||||
this.getDataPenebusan()
|
||||
this.getDataKeuntungan()
|
||||
console.log('tahunan' + this.$hostname);
|
||||
},
|
||||
methods: {
|
||||
getDataPembiayaan() {
|
||||
this.axios.get(this.$hostname + '/admin/pembiayaanTahunan', {
|
||||
params: {
|
||||
kodcaw: this.$kodcaw
|
||||
kodcaw: this.$kodcaw,
|
||||
year: this.$tahun
|
||||
}
|
||||
}).then(response => {
|
||||
this.pembiayaanterkumpul = formatter.format(response.data[0].total);
|
||||
@@ -104,7 +104,8 @@ export default {
|
||||
getDataPenebusan(){
|
||||
this.axios.get(this.$hostname + '/admin/penebusanTahunan', {
|
||||
params: {
|
||||
kodcaw: this.$kodcaw
|
||||
kodcaw: this.$kodcaw,
|
||||
year: this.$tahun
|
||||
}
|
||||
}).then(response => {
|
||||
this.penebusanterkumpul = formatter.format(response.data[0].total);
|
||||
@@ -120,7 +121,8 @@ export default {
|
||||
getDataKeuntungan(){
|
||||
this.axios.get(this.$hostname + '/admin/keuntunganTahunan', {
|
||||
params: {
|
||||
kodcaw: this.$kodcaw
|
||||
kodcaw: this.$kodcaw,
|
||||
year: this.$tahun
|
||||
}
|
||||
}).then(response => {
|
||||
this.keuntunganterkumpul = formatter.format(response.data[0].total);
|
||||
|
||||
@@ -136,12 +136,14 @@ export default {
|
||||
this.axios.all([
|
||||
axios.get(this.$hostname + `/admin/bilangan/gadai`, {
|
||||
params: {
|
||||
kodcaw: this.$kodcaw
|
||||
kodcaw: this.$kodcaw,
|
||||
year: this.$tahun
|
||||
}
|
||||
}),
|
||||
axios.get(this.$hostname + `/admin/bilangan/tebus`, {
|
||||
params: {
|
||||
kodcaw: this.$kodcaw
|
||||
kodcaw: this.$kodcaw,
|
||||
year: this.$tahun
|
||||
}
|
||||
})
|
||||
])
|
||||
|
||||
@@ -103,7 +103,8 @@ export default {
|
||||
getDatakeuntungan () {
|
||||
this.axios.get(this.$hostname + '/admin/keuntunganBulanan', {
|
||||
params: {
|
||||
kodcaw: this.$kodcaw
|
||||
kodcaw: this.$kodcaw,
|
||||
year: this.$tahun
|
||||
}
|
||||
}).then(response => {
|
||||
|
||||
|
||||
@@ -104,7 +104,8 @@ export default {
|
||||
getDataPembiayaan () {
|
||||
this.axios.get(this.$hostname + '/admin/pembiayaanBulanan', {
|
||||
params: {
|
||||
kodcaw: this.$kodcaw
|
||||
kodcaw: this.$kodcaw,
|
||||
year: this.$tahun
|
||||
}
|
||||
}).then(response => {
|
||||
|
||||
|
||||
@@ -101,7 +101,8 @@ export default {
|
||||
getDataPenebusan(){
|
||||
this.axios.get(this.$hostname + '/admin/penebusanBulanan', {
|
||||
params: {
|
||||
kodcaw: this.$kodcaw
|
||||
kodcaw: this.$kodcaw,
|
||||
year: this.$tahun
|
||||
}
|
||||
}).then(response => {
|
||||
|
||||
|
||||
@@ -212,7 +212,6 @@ export default {
|
||||
methods: {
|
||||
getItems(){
|
||||
// $teller = Http::get( config('api.url') .'/api/get/tellerwork/'. $auth_user['cawangan'])->json();
|
||||
console.log('kodcaw',this.$kodcaw)
|
||||
return this.axios.get(this.$hostname + '/api/get/tellerwork/' + this.$kodcaw);
|
||||
|
||||
},
|
||||
|
||||
@@ -119,11 +119,9 @@ export default {
|
||||
FuncHantar: function () {
|
||||
|
||||
if (this.submitStatus == 'PENDING') {
|
||||
console.log(this.submitStatus);
|
||||
event.target.disabled = true;
|
||||
return;
|
||||
} else {
|
||||
console.log(this.submitStatus);
|
||||
event.target.disabled = false;
|
||||
}
|
||||
|
||||
|
||||
@@ -163,9 +163,6 @@ export default {
|
||||
pageNumber: 1
|
||||
}
|
||||
},
|
||||
created(){
|
||||
console.log(this.kodcaw)
|
||||
},
|
||||
methods: {
|
||||
toggleModal: function(){
|
||||
this.showModal = !this.showModal;
|
||||
@@ -178,6 +175,7 @@ export default {
|
||||
kodcaw: this.kodcaw,
|
||||
teller: this.kodlaluan,
|
||||
tarikh: this.tarikh,
|
||||
bakiawal: this.bakiawal.replace(/[^0-9.-]+/g,""),
|
||||
gadaian: this.gadaian.replace(/[^0-9.-]+/g,""),
|
||||
penebusan: this.penebusan.replace(/[^0-9.-]+/g,""),
|
||||
bakiakhir: this.bakiakhir.replace(/[^0-9.-]+/g,"")
|
||||
|
||||
@@ -175,7 +175,6 @@ export default {
|
||||
channel.bind('operasi-event', ({ cawangan,khazanah }) => {
|
||||
var el = this.$refs.notification;
|
||||
var count = Number(localStorage.getItem("data-count")) || 0;
|
||||
console.log(count)
|
||||
localStorage.setItem('data-count',count + 1);
|
||||
el.setAttribute('data-count', count+1);
|
||||
el.classList.remove('notify');
|
||||
@@ -204,7 +203,6 @@ export default {
|
||||
Clicked:function(data){
|
||||
var el = this.$refs.notification;
|
||||
var count = Number(localStorage.getItem("data-count")) || 0;
|
||||
console.log(count)
|
||||
localStorage.setItem('data-count',count + 1);
|
||||
el.setAttribute('data-count', count+1);
|
||||
el.classList.remove('notify');
|
||||
|
||||
@@ -148,11 +148,9 @@ export default {
|
||||
|
||||
if(this.submitStatus == 'PENDING')
|
||||
{
|
||||
console.log(this.submitStatus);
|
||||
event.target.disabled = true;
|
||||
return;
|
||||
}else{
|
||||
console.log(this.submitStatus);
|
||||
event.target.disabled = false;
|
||||
}
|
||||
|
||||
|
||||
@@ -131,7 +131,6 @@ export default {
|
||||
}
|
||||
}).then(response => {
|
||||
|
||||
console.log(response.data)
|
||||
this.showblacklist = response.data
|
||||
this.paginate = response.data
|
||||
});
|
||||
|
||||
@@ -147,27 +147,31 @@
|
||||
|
||||
<div class="flex justify-center mt-10 mb-10">
|
||||
<div class="mx-2 radio">
|
||||
<input type="radio" id="belumtebus" name="radpendser" value="belum_tebus" class="hidden focus:bg-gray-500" v-model="selected">
|
||||
<input type="radio" id="belumtebus" :disabled="loading" name="radpendser" value="belum_tebus" class="hidden focus:bg-gray-500" v-model="selected">
|
||||
<label for="belumtebus" class="cursor-pointer text-gray-500 focus:bg-gray-500 hover:bg-gray-200 focus:outline-none border px-10 py-4 border-solid border-gray-500 rounded">Belum Tebus</label>
|
||||
</div>
|
||||
|
||||
<div class="mx-2 radio cursor-pointer">
|
||||
<input type="radio" id="sudahtebus" name="radpendser" value="sudah_tebus" class="hidden focus:bg-gray-500" v-model="selected">
|
||||
<input type="radio" id="sudahtebus" :disabled="loading" name="radpendser" value="sudah_tebus" class="hidden focus:bg-gray-500" v-model="selected">
|
||||
<label for="sudahtebus" class="cursor-pointer text-gray-500 focus:bg-gray-500 hover:bg-gray-200 focus:outline-none border px-10 py-4 border-solid border-gray-500 rounded">Sudah Tebus</label>
|
||||
</div>
|
||||
|
||||
<div class="mx-2 radio cursor-pointer">
|
||||
<input type="radio" id="lelong" name="radpendser" value="lelong" class="hidden focus:bg-gray-500" v-model="selected">
|
||||
<input type="radio" id="lelong" :disabled="loading" name="radpendser" value="lelong" class="hidden focus:bg-gray-500" v-model="selected">
|
||||
<label for="lelong" class="cursor-pointer text-gray-500 focus:bg-gray-500 hover:bg-gray-200 focus:outline-none border px-10 py-4 border-solid border-gray-500 rounded">Lelong</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="flex justify-end mb-2">
|
||||
<div v-if="loading" class="h-50 w-full mt-8" id="loading">
|
||||
<i class="animate-spin fas fa-circle-notch flex items-center fa-4x m-auto justify-center text-yellow-500" ></i>
|
||||
</div>
|
||||
|
||||
<div v-if="loading == false" class="flex justify-end mb-2">
|
||||
<input v-model="search" class="border border-2 rounded px-4 py-2 w-80r mr-2 " type="text" />
|
||||
<button @click.prevent="searchsag" class="mr-2 border border-yellow-600 text-yellow-600 font-montserrat py-2 px-8 font-medium rounded-xl hover:bg-yellow-600 hover:text-white transition-all duration-300"><i class="fas fa-search mr-2"></i>Cari</button>
|
||||
</div>
|
||||
|
||||
<div v-if="selected=='belum_tebus'">
|
||||
<div v-if="selected=='belum_tebus' && loading == false">
|
||||
<table class="min-w-full leading-normal">
|
||||
<thead class="text-center">
|
||||
<tr>
|
||||
@@ -297,7 +301,7 @@
|
||||
|
||||
</div>
|
||||
|
||||
<div v-if="selected=='sudah_tebus'">
|
||||
<div v-if="selected=='sudah_tebus' && loading == false">
|
||||
<table class="min-w-full leading-normal">
|
||||
<thead class="text-center">
|
||||
<tr>
|
||||
@@ -414,7 +418,7 @@
|
||||
<pagination :data="sudahtebuspaginate" @clickEvent_="getDataSenaraiSAG"></pagination>
|
||||
</div>
|
||||
|
||||
<div v-if="selected=='lelong'">
|
||||
<div v-if="selected=='lelong' && loading == false">
|
||||
<table class="min-w-full leading-normal">
|
||||
<thead class="text-center">
|
||||
<tr>
|
||||
@@ -620,7 +624,8 @@ export default {
|
||||
sudahtebuspaginate: {},
|
||||
belumtebuspaginate: {},
|
||||
lelongpaginate: {},
|
||||
search: ''
|
||||
search: '',
|
||||
loading:false
|
||||
}
|
||||
},
|
||||
setup: (props, context) => {
|
||||
@@ -637,7 +642,8 @@ export default {
|
||||
},
|
||||
watch: {
|
||||
selected: function (val, oldVal) {
|
||||
this.showsag = false;
|
||||
this.showsag = true;
|
||||
this.loading = true;
|
||||
this.getDataSenaraiSAG(this.currentPage);
|
||||
}
|
||||
},
|
||||
@@ -708,7 +714,6 @@ export default {
|
||||
}
|
||||
},
|
||||
submit() {
|
||||
console.log('submit!')
|
||||
this.$v.$touch()
|
||||
if (this.$v.$invalid) {
|
||||
this.$toast.error('Sila isi butiran yang disediakan dengan betul!')
|
||||
@@ -789,6 +794,7 @@ export default {
|
||||
this.lelongpaginate = response.data;
|
||||
}
|
||||
|
||||
this.loading = false;
|
||||
this.showsag = true;
|
||||
});
|
||||
},
|
||||
|
||||
@@ -50,12 +50,10 @@ export default {
|
||||
});
|
||||
},
|
||||
async PostData(){
|
||||
console.log(this.content);
|
||||
let response = await this.axios.put(this.$hostname + '/admin/notislelong/update/' + this.$kodcaw,
|
||||
{
|
||||
content: this.content
|
||||
});
|
||||
console.log(response);
|
||||
return response
|
||||
}
|
||||
}
|
||||
|
||||
@@ -20,7 +20,6 @@ export default {
|
||||
},
|
||||
created() {
|
||||
this.axios.get(this.$hostname + '/api/details/notislelong/' + this.$kodcaw).then(response => {
|
||||
console.log(response.data)
|
||||
this.content = response.data[0].para3;
|
||||
});
|
||||
},
|
||||
@@ -55,7 +54,6 @@ export default {
|
||||
{
|
||||
content: this.content
|
||||
});
|
||||
console.log(response);
|
||||
return response
|
||||
}
|
||||
}
|
||||
|
||||
Vendored
+2
-1
@@ -26,6 +26,7 @@ import Prestasi from './Akaun/Prestasi'
|
||||
import SerahGadai from './Akaun/SerahGadai'
|
||||
import SerahTebus from './Akaun/SerahTebus'
|
||||
import Online from './Akaun/Online'
|
||||
import Dashboard from './Dashboard/index'
|
||||
|
||||
|
||||
|
||||
@@ -60,7 +61,7 @@ Vue.use(VueRouter)
|
||||
export default new VueRouter({
|
||||
routes:[
|
||||
{ path: '/online', component: OnlineHome },
|
||||
|
||||
{ path:'/home', component: Dashboard},
|
||||
{ path: '/akaunhome', component: Home },
|
||||
{ path: '/akaunhome/lejeram', component: Lejeram },
|
||||
{ path: '/akaunhome/imbangduga', component: Imbangduga },
|
||||
|
||||
@@ -11,45 +11,7 @@
|
||||
|
||||
{{-- @if(Auth::user()->roles == 'operasi')<a href="{{ route('bajet') }}" class="bg-blue-500 hover:bg-blue-700 text-white font-bold py-2 px-4 rounded mb-4">KEMASKINI BAJET</a>@endif --}}
|
||||
|
||||
|
||||
<harian-component kodcaw="{{ Auth::user()->cawangan }}"></harian-component>
|
||||
|
||||
<div class="w-full grid grid-cols-1 xl:grid-cols-3 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">
|
||||
<div class="flex items-center justify-between mb-4">
|
||||
<div class="flex-shrink-0">
|
||||
<h3 class="text-base font-normal text-gray-500">Pembiayaan Bulanan</h3>
|
||||
</div>
|
||||
</div>
|
||||
<div class="mx-auto mt-10"><pemb-chart kodcaw={{ Auth::user()->cawangan }}></pemb-chart></div>
|
||||
</div>
|
||||
<div class="bg-white shadow rounded-lg p-4 sm:p-6 xl:p-8 2xl:col-span-1">
|
||||
<div class="flex items-center justify-between mb-4">
|
||||
<div class="flex-shrink-0">
|
||||
<h3 class="text-base font-normal text-gray-500">Penebusan Bulanan</h3>
|
||||
</div>
|
||||
</div>
|
||||
<div class="mx-auto mt-10"><peny-chart kodcaw={{ Auth::user()->cawangan }}></peny-chart></div>
|
||||
</div>
|
||||
|
||||
<div class="bg-white shadow rounded-lg p-4 sm:p-6 xl:p-8 2xl:col-span-1">
|
||||
<div class="flex items-center justify-between mb-4">
|
||||
<div class="flex-shrink-0">
|
||||
<h3 class="text-base font-normal text-gray-500">Keuntungan Bulanan</h3>
|
||||
</div>
|
||||
</div>
|
||||
<div class="mx-auto mt-10"><keun-chart kodcaw={{ Auth::user()->cawangan }}></keun-chart></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<tahunan-component kodcaw={{ Auth::user()->cawangan }}></tahunan-component>
|
||||
|
||||
<aging-component></aging-component>
|
||||
|
||||
<bilangan-component kodcaw={{ Auth::user()->cawangan }}></bilangan-component>
|
||||
|
||||
|
||||
|
||||
<dashboard-component kodcaw="{{ Auth::user()->cawangan }}"></dashboard-component>
|
||||
</div>
|
||||
</main>
|
||||
@include('layouts.footer')
|
||||
|
||||
@@ -165,7 +165,7 @@
|
||||
@endif
|
||||
<logout-component csrftoken="{{ csrf_token() }}" :route={{ json_encode(route('logout')) }}></logout-component>
|
||||
|
||||
<form id="logout-form" action="logout" method="POST" class="d-none">
|
||||
<form id="logout-form" action="{{ route('logout') }}" method="POST" class="d-none">
|
||||
{{-- <input type="hidden" name="_token" :value="this.$props.csrftoken" /> --}}
|
||||
@csrf
|
||||
</form>
|
||||
|
||||
@@ -317,8 +317,9 @@
|
||||
<hr class="mb-2">
|
||||
|
||||
|
||||
<a href="#" class="hover:bg-yellow-300 rounded mb-2 mr-2">
|
||||
<li class="flex w-full justify-between text-red-600 cursor-pointer items-center ">
|
||||
<a href="{{ route('pengguna') }}"
|
||||
class="rounded mb-2 mr-2 {{ Route::is('pengguna') || Route::is('pengguna.*') ? 'bg-gray-200 rounded text-white-500' : 'hover:bg-yellow-300 ' }}">
|
||||
<li class="flex w-full justify-between text-gray-600 hover:text-gray-500 cursor-pointer items-center ">
|
||||
<div class="flex items-center">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor"
|
||||
class="bi bi-person-workspace" viewBox="0 0 16 16">
|
||||
@@ -347,7 +348,7 @@
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div class="absolute inset-x-0 bottom-0 mb-10 items-center mx-auto flex xl:hidden 2xl:flex">
|
||||
{{-- <div class="absolute inset-x-0 bottom-0 mb-10 items-center mx-auto flex xl:hidden 2xl:flex">
|
||||
<button onclick="closeNav()"
|
||||
class="m-auto bg-yellow-600 hover:bg-gray-400 text-gray-800 font-bold py-2 px-8 rounded inline-flex items-center">
|
||||
<li class="flex w-full justify-between text-white cursor-pointer items-center ">
|
||||
@@ -357,5 +358,5 @@
|
||||
</div>
|
||||
</li>
|
||||
</button>
|
||||
</div>
|
||||
</div> --}}
|
||||
</div>
|
||||
|
||||
@@ -0,0 +1,18 @@
|
||||
|
||||
@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' : 'Pengguna', 'icon' : 'fas fa-globe-asia' }]"></breadcrumb>
|
||||
|
||||
<pengguna-component :user="{{ json_encode($auth_user) }}"></pengguna-component>
|
||||
|
||||
</div>
|
||||
</main>
|
||||
@include('layouts.footer')
|
||||
@endsection
|
||||
@@ -30,5 +30,9 @@ Route::group(['prefix' => 'check'], function () {
|
||||
Route::post('/kelulusan/pb', 'App\Http\Controllers\KelulusanController@updatePB');
|
||||
Route::get('/muatturun', 'App\Http\Controllers\KelulusanController@download');
|
||||
|
||||
Route::get('/profileinfo','App\Http\Controllers\ProfileController@showProfileInformation');
|
||||
|
||||
});
|
||||
|
||||
Route::post('/changepass','App\Http\Controllers\ProfileController@changepassword');
|
||||
|
||||
|
||||
+2
-1
@@ -132,7 +132,8 @@ Route::get('/audit/cetakan', ['as'=>'audit.cetak','uses'=>'App\Http\Controllers\
|
||||
//Tetapan Server
|
||||
Route::get('/tetapan',['as'=>'tetapan','uses'=>'App\Http\Controllers\TetapanController@index'])->middleware(['roleChecker:null,null,operasi']);
|
||||
|
||||
|
||||
//Pengguna
|
||||
Route::get('/pengguna',['as'=>'pengguna','uses'=>'App\Http\Controllers\PenggunaController@index'])->middleware(['roleChecker:admin,akaun,operasi']);
|
||||
|
||||
|
||||
Route::get('{any}', function () {
|
||||
|
||||
Reference in New Issue
Block a user