add yg baru
This commit is contained in:
@@ -13,11 +13,11 @@
|
||||
</div>
|
||||
|
||||
<div class="flex flex-nowrap">
|
||||
<div class="w-3/4 h-4 bg-gray-200 rounded-full">
|
||||
<div class="bg-yellow-600 text-xs font-medium text-yellow-100 text-center p-0.5 leading-none rounded-l-full rounded-r-full" v-bind:style="{ width: (percentcumgadai > 100) ? 100 : percentcumgadai + '%' }"> {{ this.percentcumgadai }}%</div>
|
||||
</div>
|
||||
<div class="w-3/4 h-4 bg-gray-200 rounded-full">
|
||||
<div class="bg-yellow-600 text-xs font-medium text-yellow-100 text-center p-0.5 leading-none rounded-l-full rounded-r-full" v-bind:style="{ width: (percentcumgadai > 100) ? 100 : percentcumgadai + '%' }"> {{ this.percentcumgadai }}%</div>
|
||||
</div>
|
||||
|
||||
<div class="w-1/4 grid grid-rows-2">
|
||||
<div class="xl:w-2/5 2xl:w-1/4 grid grid-rows-2">
|
||||
<span class="text-sm ml-2 font-bold -mt-0.5 xs:invisible">RM {{ gadaianremaining }}</span>
|
||||
<!-- <span class="text-xs leading-none font-bold text-gray-900 mx-auto flex place-self-center -mt-3 ml-12">remaining.. </span> -->
|
||||
</div>
|
||||
@@ -26,12 +26,12 @@
|
||||
<div class="flex pt-2 -mt-2">
|
||||
<div class="grid grid-rows-2 ml-1 mt-2 w-1/2">
|
||||
<div class="flex">
|
||||
<span class="text-sm leading-none font-bold text-gray-700 w-1/4 uppercase"> Harian</span>
|
||||
<span class="text-sm leading-none font-bold text-gray-700x xl:w-2/5 2xl:w-1/4 uppercase"> Harian</span>
|
||||
<span class="text-sm leading-none font-bold text-gray-700 mr-2">:</span>
|
||||
<span class="text-sm leading-none font-bold text-gray-700">RM {{ gadaianharian }}</span>
|
||||
</div>
|
||||
<div class="flex">
|
||||
<span class="text-sm leading-none font-bold text-yellow-700 w-1/4 uppercase"> Bajet</span>
|
||||
<span class="text-sm leading-none font-bold text-yellow-700 xl:w-2/5 2xl:w-1/4 uppercase"> Bajet</span>
|
||||
<span class="text-sm leading-none font-bold text-gray-700 mr-2">:</span>
|
||||
<span class="text-sm leading-none font-bold text-yellow-900"> RM {{ bajetgadaian }} </span>
|
||||
</div>
|
||||
@@ -79,7 +79,7 @@
|
||||
<div class="bg-yellow-600 text-xs font-medium text-yellow-100 text-center p-0.5 leading-none rounded-l-full rounded-r-full" v-bind:style="{ width: (percentcumtebus > 100) ? 100 : percentcumtebus + '%' }"> {{ percentcumtebus }}%</div>
|
||||
</div>
|
||||
|
||||
<div class="w-1/4 grid grid-rows-2">
|
||||
<div class="xl:w-2/5 2xl:w-1/4 grid grid-rows-2">
|
||||
<span class="text-sm ml-2 font-bold -mt-0.5">RM {{ tebusremaining }}</span>
|
||||
<!-- <span class="text-xs leading-none font-bold text-gray-900 mx-auto flex place-self-center -mt-3 ml-12">remaining.. </span> -->
|
||||
|
||||
@@ -92,12 +92,12 @@
|
||||
<!-- <span class="text-sm leading-none font-bold text-gray-700"><i class="fas fa-calendar-day"></i> RM {{ penebusanharian }}</span>
|
||||
<span class="text-sm leading-none font-bold text-yellow-900"><i class="fas fa-chart-pie"></i> RM {{ bajetpenebusan }} </span> -->
|
||||
<div class="flex">
|
||||
<span class="text-sm leading-none font-bold text-gray-700 w-1/4 uppercase"> Harian</span>
|
||||
<span class="text-sm leading-none font-bold text-gray-700 xl:w-2/5 2xl:w-1/4 uppercase"> Harian</span>
|
||||
<span class="text-sm leading-none font-bold text-gray-700 mr-2">:</span>
|
||||
<span class="text-sm leading-none font-bold text-gray-700">RM {{ penebusanharian }}</span>
|
||||
</div>
|
||||
<div class="flex">
|
||||
<span class="text-sm leading-none font-bold text-yellow-700 w-1/4 uppercase"> Bajet</span>
|
||||
<span class="text-sm leading-none font-bold text-yellow-700 xl:w-2/5 2xl:w-1/4 uppercase"> Bajet</span>
|
||||
<span class="text-sm leading-none font-bold text-gray-700 mr-2">:</span>
|
||||
<span class="text-sm leading-none font-bold text-yellow-900"> RM {{ bajetpenebusan }} </span>
|
||||
</div>
|
||||
@@ -144,7 +144,7 @@
|
||||
<div class="bg-yellow-600 text-xs font-medium text-yellow-100 text-center p-0.5 leading-none rounded-l-full rounded-r-full" v-bind:style="{ width: (percentcumkeuntungan > 100) ? 100 : percentcumkeuntungan + '%' }"> {{percentcumkeuntungan}}%</div>
|
||||
</div>
|
||||
|
||||
<div class="w-1/4 grid grid-rows-2">
|
||||
<div class="xl:w-2/5 2xl:w-1/4 grid grid-rows-2">
|
||||
<span class="text-sm ml-2 font-bold -mt-0.5">RM {{ keuntunganremaining }}</span>
|
||||
<!-- <span class="text-xs leading-none font-bold text-gray-900 mx-auto flex place-self-center -mt-3 ml-12">remaining.. </span> -->
|
||||
|
||||
@@ -158,12 +158,12 @@
|
||||
<!-- <span class="text-sm leading-none font-bold text-gray-700"><i class="fas fa-calendar-day"></i> RM {{ keuntunganharian }}</span>
|
||||
<span class="text-sm leading-none font-bold text-yellow-900"><i class="fas fa-chart-pie"></i> RM {{ bajetkeuntungan }} </span> -->
|
||||
<div class="flex">
|
||||
<span class="text-sm leading-none font-bold text-gray-700 w-1/4 uppercase"> Harian</span>
|
||||
<span class="text-sm leading-none font-bold text-gray-700 xl:w-2/5 2xl:w-1/4 uppercase"> Harian</span>
|
||||
<span class="text-sm leading-none font-bold text-gray-700 mr-2">:</span>
|
||||
<span class="text-sm leading-none font-bold text-gray-700">RM {{ keuntunganharian }}</span>
|
||||
</div>
|
||||
<div class="flex">
|
||||
<span class="text-sm leading-none font-bold text-yellow-700 w-1/4 uppercase"> Bajet</span>
|
||||
<span class="text-sm leading-none font-bold text-yellow-700 xl:w-2/5 2xl:w-1/4 uppercase"> Bajet</span>
|
||||
<span class="text-sm leading-none font-bold text-gray-700 mr-2">:</span>
|
||||
<span class="text-sm leading-none font-bold text-yellow-900"> RM {{ bajetkeuntungan }} </span>
|
||||
</div>
|
||||
|
||||
@@ -2,20 +2,20 @@
|
||||
<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="#"><i class="far fa-folder mr-2"></i>Home</a>
|
||||
<a :href="redirectHome()"><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>
|
||||
<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="">
|
||||
<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>
|
||||
<a :href="redirectUrl(item.url)"><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>
|
||||
@@ -23,17 +23,6 @@
|
||||
</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>
|
||||
Dashboard</a>
|
||||
</li> -->
|
||||
</ol>
|
||||
</div>
|
||||
</template>
|
||||
@@ -47,15 +36,25 @@ export default{
|
||||
default: () => [
|
||||
{
|
||||
title: "Library",
|
||||
icon:"far fa-folder"
|
||||
icon:"far fa-folder",
|
||||
url:document.location.origin
|
||||
},
|
||||
{
|
||||
title: "Dashboard",
|
||||
icon:"fas fa-columns"
|
||||
icon:"fas fa-columns",
|
||||
url:document.location.origin
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
methods:{
|
||||
redirectHome: function(){
|
||||
return '/';
|
||||
},
|
||||
redirectUrl: function(url){
|
||||
return url;
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
<template>
|
||||
<div class="mx-auto">
|
||||
<a v-if="route === 'ada'" class="text-yellow-200 rounded bg-gray-400 px-6 py-3 font-bold mr-4 uppercase md:invisible xl:visible">
|
||||
<a v-if="route === 'ada'" class="text-yellow-200 rounded bg-gray-400 px-6 py-3 font-bold mr-4 uppercase sm:invisible lg:visible xl:visible">
|
||||
CAWANGAN :
|
||||
<select v-model="caw" @change="tukarcawangan" class="rounded-md border bg-gray-400 font-bold border-gray-400 focus:outline-none rounded-md focus:ring-1 ring-cyan-500 uppercase">
|
||||
<option v-for="(caw,i) in cawangan" :key="i" :value="caw.kodcaw">{{ caw.details_caw }}</option>
|
||||
</select>
|
||||
</a>
|
||||
<a v-if="route === 'tiada'" class="text-yellow-200 rounded bg-gray-400 px-6 py-3 font-bold mr-4 uppercase md:invisible xl:visible">
|
||||
<a v-if="route === 'tiada'" class="text-yellow-200 rounded bg-gray-400 px-6 py-3 font-bold mr-4 uppercase sm:invisible lg:visible xl:visible">
|
||||
CAWANGAN : {{ this.namacawangan(this.caw) }}
|
||||
</a>
|
||||
<a class="text-yellow-200 rounded bg-gray-400 px-4 py-3 font-bold mr-4 uppercase md:invisible xl:visible">
|
||||
@@ -47,7 +47,6 @@
|
||||
// this.sethostname(this.caw)
|
||||
this.pembahagiancawangan(this.caw)
|
||||
this.$forceUpdate();
|
||||
console.log(this.$hostname)
|
||||
if(this.akaun =='no')
|
||||
location.reload();
|
||||
|
||||
@@ -101,7 +100,6 @@
|
||||
case '011412':{
|
||||
// this.$hostname = 'http://api2.arrahn'
|
||||
this.sethostname('http://api2.arrahn')
|
||||
console.log(this.$hostname)
|
||||
break;
|
||||
}
|
||||
case '011229':
|
||||
@@ -110,10 +108,10 @@
|
||||
case '011231':
|
||||
case '011232':
|
||||
case '011234':
|
||||
case '011237':
|
||||
case '011233':{
|
||||
// this.$hostname = 'http://api3.arrahn'
|
||||
this.sethostname('http://api3.arrahn')
|
||||
console.log(this.$hostname)
|
||||
break;
|
||||
}
|
||||
default: this.sethostname('http://localhost:8000')
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
<content-placeholders-text :lines="3" />
|
||||
</content-placeholders> -->
|
||||
<apexchart
|
||||
width="500" type="bar"
|
||||
type="bar"
|
||||
:options="chartOptions" :series="series">
|
||||
</apexchart>
|
||||
</div>
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
</content-placeholders> -->
|
||||
<div>
|
||||
<apexchart
|
||||
width="500" type="bar"
|
||||
type="bar"
|
||||
:options="chartOptions" :series="series">
|
||||
</apexchart>
|
||||
</div>
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
<content-placeholders-text :lines="3" />
|
||||
</content-placeholders> -->
|
||||
<apexchart
|
||||
width="500" type="bar"
|
||||
type="bar"
|
||||
:options="chartOptions" :series="series">
|
||||
</apexchart>
|
||||
</div>
|
||||
|
||||
@@ -120,9 +120,7 @@
|
||||
<div class="flex items-center">
|
||||
<div class="ml-3">
|
||||
<button @click="action(petibesi.tarikh,petibesi.kodcaw)" 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">
|
||||
|
||||
<i width="16" height="16" class="animate-spin fas fa-spinner" v-if="submitStatus === 'PENDING'" id="tekan-action"></i>
|
||||
<svg v-else xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-card-checklist" viewBox="0 0 16 16">
|
||||
<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>
|
||||
@@ -137,6 +135,11 @@
|
||||
<pagination :data="paginate" @clickEvent_="getPetibesi"></pagination>
|
||||
|
||||
</article>
|
||||
|
||||
<div v-if="showLoader" class="fixed inset-0 z-30 h-full w-full" id="loading">
|
||||
<i class="animate-spin fas fa-circle-notch fixed fa-4x m-auto text-yellow-500" style="left:50% !important;top:50% !important;"></i>
|
||||
</div>
|
||||
<div v-if="showLoader" class="opacity-25 fixed inset-0 z-30 bg-black"></div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -173,7 +176,7 @@ export default {
|
||||
showpetibesi:[],
|
||||
paginate:{},
|
||||
activePage: 1,
|
||||
submitStatus:''
|
||||
showLoader:false
|
||||
};
|
||||
},
|
||||
created() {
|
||||
@@ -217,9 +220,10 @@ export default {
|
||||
});
|
||||
},
|
||||
action(tarikh,kodcaw){
|
||||
this.submitStatus = 'PENDING';
|
||||
this.showLoader = true;
|
||||
axios.get('/api/check/periksapetibesi', {
|
||||
params: {
|
||||
hostname:this.$hostname,
|
||||
tarikh: tarikh,
|
||||
kodcaw: kodcaw
|
||||
|
||||
@@ -228,11 +232,11 @@ export default {
|
||||
|
||||
if(response.data === 'sama')
|
||||
{
|
||||
this.showLoader = false;
|
||||
this.$toast("Nilai Tunai sama dengan nilat tunai")
|
||||
this.submitStatus = 'okay';
|
||||
}else{
|
||||
this.aliranpetibesi = response.data;
|
||||
|
||||
this.showLoader = false;
|
||||
this.$refs.modal.showModal = true;
|
||||
this.$refs.modal.tarikh = tarikh;
|
||||
this.$refs.modal.kodcaw = kodcaw;
|
||||
@@ -243,8 +247,6 @@ export default {
|
||||
this.$refs.modal.serteller = formatter.format(this.aliranpetibesi.serahanteller);
|
||||
this.$refs.modal.serahan = formatter.format(this.aliranpetibesi.serahanpkb);
|
||||
this.$refs.modal.pendahuluan = formatter.format(this.aliranpetibesi.pendahuluanpkb);
|
||||
|
||||
this.submitStatus = 'okay';
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
@@ -156,6 +156,11 @@
|
||||
|
||||
</article>
|
||||
</transition>
|
||||
<div v-if="showLoader" class="fixed inset-0 z-30 h-full w-full" id="loading">
|
||||
<i class="animate-spin fas fa-circle-notch fixed fa-4x m-auto text-yellow-500" style="left:50% !important;top:50% !important;"></i>
|
||||
</div>
|
||||
<div v-if="showLoader" class="opacity-25 fixed inset-0 z-30 bg-black"></div>
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -187,7 +192,7 @@ export default {
|
||||
currentPage: 1,
|
||||
lastPage: 5,
|
||||
activePage: 1,
|
||||
// kodcaw:'',
|
||||
showLoader:false,
|
||||
items:[],
|
||||
kodlaluan:''
|
||||
};
|
||||
@@ -222,8 +227,10 @@ export default {
|
||||
},
|
||||
|
||||
action(tarikhteller,kodcawteller,tel){
|
||||
this.showLoader = true;
|
||||
axios.get('/api/check/periksaalirantunai', {
|
||||
params: {
|
||||
hostname:this.$hostname,
|
||||
tarikh: tarikhteller,
|
||||
kodcaw: kodcawteller,
|
||||
teller: tel
|
||||
@@ -233,11 +240,12 @@ export default {
|
||||
|
||||
if(response.data === 'sama')
|
||||
{
|
||||
this.showLoader = false;
|
||||
this.$toast("Nilai Tunai sama dengan nilat tunai");
|
||||
|
||||
}else{
|
||||
this.alirantunai = response.data;
|
||||
console.log(tarikhteller)
|
||||
this.showLoader = false;
|
||||
this.$refs.modal.showModal = true;
|
||||
this.$refs.modal.serahan = formatter.format(this.alirantunai.serahan);
|
||||
this.$refs.modal.bakiawal = formatter.format(this.alirantunai.bakiawal);
|
||||
|
||||
@@ -116,6 +116,8 @@ export default {
|
||||
methods: {
|
||||
toggleModal: function(){
|
||||
this.showModal = !this.showModal;
|
||||
this.arrayCustomer = [];
|
||||
this.specCust = [];
|
||||
},
|
||||
async toggleDropdown() {
|
||||
|
||||
@@ -143,7 +145,7 @@ export default {
|
||||
{
|
||||
if(this.hasNumber(inputvalue))
|
||||
{
|
||||
this.axios.get(this.$hostname + '/admin/searchByIC', {
|
||||
this.axios.get(this.$api1 + '/admin/searchByIC', {
|
||||
params: {
|
||||
ic: inputvalue,
|
||||
kodcaw: this.$kodcaw
|
||||
@@ -158,7 +160,7 @@ export default {
|
||||
|
||||
|
||||
}else{
|
||||
this.axios.get(this.$hostname + '/admin/searchByName', {
|
||||
this.axios.get(this.$api1 + '/admin/searchByName', {
|
||||
params: {
|
||||
nama: inputvalue,
|
||||
kodcaw: this.$kodcaw
|
||||
|
||||
@@ -1,152 +1,72 @@
|
||||
<template>
|
||||
<div>
|
||||
<button @click="show = true">Click</button>
|
||||
|
||||
<!-- This example requires Tailwind CSS v2.0+ -->
|
||||
<transition leave-active-class="duration-300">
|
||||
<div
|
||||
v-show="show"
|
||||
class="fixed z-10 inset-0 overflow-y-auto"
|
||||
aria-labelledby="modal-title"
|
||||
role="dialog"
|
||||
aria-modal="true"
|
||||
>
|
||||
<div
|
||||
class="flex items-end justify-center min-h-screen pt-4 px-4 pb-20 text-center sm:block sm:p-0"
|
||||
>
|
||||
<!--
|
||||
Background overlay, show/hide based on modal state.
|
||||
|
||||
Entering: "ease-out duration-300"
|
||||
From: "opacity-0"
|
||||
To: "opacity-100"
|
||||
Leaving: "ease-in duration-200"
|
||||
From: "opacity-100"
|
||||
To: "opacity-0"
|
||||
-->
|
||||
<transition name="ease-out-overlay">
|
||||
<div
|
||||
v-show="show"
|
||||
class="fixed inset-0 bg-gray-500 bg-opacity-75 transition-opacity"
|
||||
></div>
|
||||
</transition>
|
||||
|
||||
<!-- This element is to trick the browser into centering the modal contents. -->
|
||||
<span
|
||||
class="hidden sm:inline-block sm:align-middle sm:h-screen"
|
||||
aria-hidden="true"
|
||||
>​</span
|
||||
>
|
||||
|
||||
<!--
|
||||
Modal panel, show/hide based on modal state.
|
||||
|
||||
Entering: "ease-out duration-300"
|
||||
From: "opacity-0 translate-y-4 sm:translate-y-0 sm:scale-95"
|
||||
To: "opacity-100 translate-y-0 sm:scale-100"
|
||||
Leaving: "ease-in duration-200"
|
||||
From: "opacity-100 translate-y-0 sm:scale-100"
|
||||
To: "opacity-0 translate-y-4 sm:translate-y-0 sm:scale-95"
|
||||
-->
|
||||
<transition name="ease-out-modal">
|
||||
<div
|
||||
v-show="show"
|
||||
class="inline-block align-bottom bg-white rounded-lg text-left overflow-hidden shadow-xl transform transition-all sm:my-8 sm:align-middle sm:max-w-lg sm:w-full"
|
||||
>
|
||||
<div class="bg-white px-4 pt-5 pb-4 sm:p-6 sm:pb-4">
|
||||
<div class="sm:flex sm:items-start">
|
||||
<div
|
||||
class="mx-auto flex-shrink-0 flex items-center justify-center h-12 w-12 rounded-full bg-red-100 sm:mx-0 sm:h-10 sm:w-10"
|
||||
>
|
||||
<!-- Heroicon name: outline/exclamation -->
|
||||
<svg
|
||||
class="h-6 w-6 text-red-600"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
fill="none"
|
||||
viewBox="0 0 24 24"
|
||||
stroke="currentColor"
|
||||
>
|
||||
<path
|
||||
stroke-linecap="round"
|
||||
stroke-linejoin="round"
|
||||
stroke-width="2"
|
||||
d="M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z"
|
||||
/>
|
||||
</svg>
|
||||
<div>
|
||||
<transition name="modal-fade">
|
||||
<!-- Delete Product Modal -->
|
||||
<div v-if="showDelete" class="overflow-x-hidden overflow-y-auto fixed inset-0 z-50 outline-none focus:outline-none justify-center items-center flex" id="popup-modal">
|
||||
<div class="relative px-4 w-full max-w-xl h-full md:h-auto">
|
||||
<!-- Modal content -->
|
||||
<div class="relative bg-white rounded-lg shadow dark:bg-gray-700">
|
||||
<!-- Modal header -->
|
||||
<div class="flex justify-end p-2">
|
||||
<button v-on:click="showDelete = false" type="button" class="text-gray-400 bg-transparent hover:bg-gray-200 hover:text-gray-900 rounded-lg text-sm p-1.5 ml-auto inline-flex items-center dark:hover:bg-gray-800 dark:hover:text-white">
|
||||
<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="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>
|
||||
</div>
|
||||
<div class="mt-3 text-center sm:mt-0 sm:ml-4 sm:text-left">
|
||||
<h3
|
||||
class="text-lg leading-6 font-medium text-gray-900"
|
||||
id="modal-title"
|
||||
>
|
||||
Deactivate account
|
||||
</h3>
|
||||
<div class="mt-2">
|
||||
<p class="text-sm text-gray-500">
|
||||
Are you sure you want to deactivate your account? All of
|
||||
your data will be permanently removed. This action
|
||||
cannot be undone.
|
||||
</p>
|
||||
</div>
|
||||
<!-- Modal body -->
|
||||
<div class="p-6 pt-0 text-center">
|
||||
<svg class="mx-auto mb-4 w-14 h-14 text-gray-400 dark:text-gray-200" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 8v4m0 4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"></path></svg>
|
||||
<h3 class="mb-3 text-lg font-normal text-gray-500 dark:text-gray-400">Padam nama ini dalam senarai hitam?</h3>
|
||||
<h3 class=" text-lg font-bold text-blue-500 dark:text-red-400">{{ this.nama }}</h3>
|
||||
<h3 class="mb-5 text-lg font-bold text-blue-500 dark:text-red-400">{{ this.nokp }}</h3>
|
||||
<button v-on:click="deleteBlacklist()" type="button" class="text-white bg-red-600 hover:bg-red-800 focus:ring-4 focus:ring-red-300 font-medium rounded-lg text-sm inline-flex items-center px-5 py-2.5 text-center mr-2">
|
||||
Setuju
|
||||
</button>
|
||||
<button v-on:click="showDelete = false" type="button" class="text-gray-500 bg-white hover:bg-gray-100 focus:ring-4 focus:ring-gray-300 rounded-lg border border-gray-200 text-sm font-medium px-5 py-2.5 hover:text-gray-900 focus:z-10 dark:bg-gray-700 dark:text-gray-300 dark:border-gray-500 dark:hover:text-white dark:hover:bg-gray-600">Batal</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div
|
||||
class="bg-gray-50 px-4 py-3 sm:px-6 sm:flex sm:flex-row-reverse"
|
||||
>
|
||||
<button
|
||||
@click="show = false"
|
||||
type="button"
|
||||
class="w-full inline-flex justify-center rounded-md border border-transparent shadow-sm px-4 py-2 bg-red-600 text-base font-medium text-white hover:bg-red-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-red-500 sm:ml-3 sm:w-auto sm:text-sm"
|
||||
>
|
||||
Deactivate
|
||||
</button>
|
||||
<button
|
||||
type="button"
|
||||
class="mt-3 w-full inline-flex justify-center rounded-md border border-gray-300 shadow-sm px-4 py-2 bg-white text-base font-medium text-gray-700 hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500 sm:mt-0 sm:ml-3 sm:w-auto sm:text-sm"
|
||||
>
|
||||
Cancel
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</transition>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</transition>
|
||||
</div>
|
||||
|
||||
<div v-if="showDelete" class="opacity-25 fixed inset-0 z-40 bg-black"></div>
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: "delmodal",
|
||||
|
||||
data() {
|
||||
return {
|
||||
show: false,
|
||||
};
|
||||
showDelete: false,
|
||||
deleteid: 0,
|
||||
nama:'',
|
||||
nokp:''
|
||||
}
|
||||
},
|
||||
};
|
||||
</script>
|
||||
<style lang="postcss" scoped>
|
||||
.badge {
|
||||
@apply inline-block bg-gray-200 rounded-full px-3 py-1 text-sm font-semibold text-gray-700;
|
||||
&:hover {
|
||||
@apply bg-gray-300;
|
||||
methods: {
|
||||
async deleteBlacklist(){
|
||||
let response = await this.EngineDelete(this.deleteid)
|
||||
if(response.data === 1)
|
||||
{
|
||||
this.showDelete = !this.showDelete;
|
||||
this.$toast.success('Berjaya! nama tersebut berjaya disenarai putih.')
|
||||
setTimeout(()=>{
|
||||
this.$emit('clickDelete_', 1)
|
||||
},1000);
|
||||
}else{
|
||||
this.$toast.danger('Tidak Berjaya! memadamkan nama tersebut.')
|
||||
}
|
||||
},
|
||||
EngineDelete(id){
|
||||
return this.axios.post(this.$api1 + '/admin/DeleteBlacklist',
|
||||
{
|
||||
id: id
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
.ease-out-overlay-enter-active,
|
||||
.ease-out-overlay-leave-active {
|
||||
@apply opacity-100 duration-300;
|
||||
}
|
||||
|
||||
.ease-out-overlay-enter, .ease-out-overlay-leave-to /* .fade-leave-active below version 2.1.8 */ {
|
||||
@apply opacity-0 duration-200;
|
||||
}
|
||||
|
||||
.ease-out-modal-enter-active,
|
||||
.ease-out-modal-leave-active {
|
||||
@apply opacity-100 translate-y-0 sm:scale-100 duration-300;
|
||||
}
|
||||
|
||||
.ease-out-modal-enter, .ease-out-modal-leave-to /* .fade-leave-active below version 2.1.8 */ {
|
||||
@apply ease-in opacity-0 translate-y-4 sm:translate-y-0 sm:scale-95 duration-200;
|
||||
}
|
||||
</style>
|
||||
@@ -1,6 +1,7 @@
|
||||
<template>
|
||||
<div>
|
||||
|
||||
<transition name="modal-fade">
|
||||
<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-->
|
||||
@@ -135,6 +136,7 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</transition>
|
||||
<transition
|
||||
enter-active-class="transition-all transform duration-200 ease-out"
|
||||
>
|
||||
@@ -172,6 +174,7 @@ export default {
|
||||
// console.log(this.kodcaw + this.kodlaluan + this.tarikh)
|
||||
axios.put('/api/check/kemaskinialirantunai',
|
||||
{
|
||||
hostname:this.$hostname,
|
||||
kodcaw: this.kodcaw,
|
||||
teller: this.kodlaluan,
|
||||
tarikh: this.tarikh,
|
||||
@@ -200,4 +203,4 @@ export default {
|
||||
}
|
||||
},
|
||||
}
|
||||
</script>
|
||||
</script>
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
<template>
|
||||
<div>
|
||||
<transition name="modal-fade">
|
||||
<div v-if="showModal" class="overflow-x-hidden overflow-y-auto fixed inset-0 z-50 outline-none focus:outline-none justify-center items-center flex">
|
||||
<div class="relative w-auto my-6 mx-auto max-w-6xl">
|
||||
<!--content-->
|
||||
@@ -22,13 +23,11 @@
|
||||
Status
|
||||
</label>
|
||||
<div class="relative">
|
||||
<!-- <select v-model="referencestatus" 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 v-for="(stat,i) in status" :key="i">{{ stat }}</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> -->
|
||||
<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="referencestatus" type="text" placeholder="Paid">
|
||||
<!-- <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="referencestatus" type="text" placeholder="Paid"> -->
|
||||
<div class="flex items-center flex-shrink-0 text-sm px-2">
|
||||
<div class="px-2 py-1 rounded-l-md bg-gray-200 text-gray-600 cursor-pointer">TRANSACTION</div>
|
||||
<div class="px-2 py-1 rounded-r-md bg-green-400 text-white cursor-pointer">{{ this.referencestatus }}</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<label class="block uppercase tracking-wide text-gray-700 text-xs font-bold mb-2 mt-3">
|
||||
@@ -50,6 +49,7 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</transition>
|
||||
<div v-if="showModal" class="opacity-25 fixed inset-0 z-40 bg-black"></div>
|
||||
</div>
|
||||
</template>
|
||||
@@ -94,7 +94,7 @@ export default {
|
||||
},
|
||||
postData: function(){
|
||||
|
||||
return this.axios.post(this.$hostname + '/admin/simpanStatus',
|
||||
return this.axios.post(this.$api1 + '/admin/simpanStatus',
|
||||
{
|
||||
id: this.statusid,
|
||||
status: this.referencestatus,
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<div>
|
||||
|
||||
<transition name="modal-fade">
|
||||
<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-->
|
||||
@@ -146,6 +146,7 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</transition>
|
||||
<div v-if="showModal" class="opacity-25 fixed inset-0 z-40 bg-black"></div>
|
||||
</div>
|
||||
</template>
|
||||
@@ -176,7 +177,7 @@ export default {
|
||||
|
||||
axios.put('/api/check/kemaskinipetibesi',
|
||||
{
|
||||
|
||||
hostname:this.$hostname,
|
||||
tarikh: this.tarikh,
|
||||
kodcaw: this.kodcaw,
|
||||
bakiawal: this.bakiawal.replace(/[^0-9.-]+/g,""),
|
||||
@@ -189,12 +190,10 @@ export default {
|
||||
|
||||
}).then(response => {
|
||||
|
||||
console.log(response.data);
|
||||
if(response.data == 'berjaya')
|
||||
{
|
||||
this.showModal = false;
|
||||
this.$toast.success("Kemaskini Sudah Berjaya!")
|
||||
// vm.$forceUpdate();
|
||||
|
||||
setTimeout("window.location.reload()", 3000);
|
||||
}else{
|
||||
|
||||
Reference in New Issue
Block a user