mirror of
https://gitlab.com/CIEFWorldwideSdnBhd/exchange-2.0.git
synced 2026-08-27 16:34:00 +00:00
add rows limit
This commit is contained in:
@@ -11,75 +11,40 @@
|
||||
<div class="col-2 fs-10 text-right">Balance</div>
|
||||
</div>
|
||||
|
||||
<list-component key="2" section="topUp" :endpoint="route('api.transaction.wallet.list')" :options="{status_in: [2, 3], owner_type: 'App\\Models\\Wallet', owner_id: wallet_id, per_page: 30}">
|
||||
<list-component :key="key" section="topUp" :endpoint="route('api.transaction.wallet.list')" :options="{status_in: [2, 3], owner_type: 'App\\Models\\Wallet', owner_id: wallet_id, per_page: showingTransactionCount}">
|
||||
<template slot="list" slot-scope="{data}">
|
||||
<customer-wallet-transaction-component :data="data" :deciamls="deciamls"></customer-wallet-transaction-component>
|
||||
</template>
|
||||
</list-component>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- <div class="row align-items-center justify-content-center p-t-50 p-b-50" v-if="!company.wallet || !company.wallet.transactions.length">
|
||||
<div class="col-10">
|
||||
<div class="row align-items-center justify-content-center hint-text">
|
||||
<div class="col-4 hint-text"><img src="/images/not-found-illustration.png" class="w-100 hint-text"></div>
|
||||
</div>
|
||||
<div class="row text-center">
|
||||
<div class="col">
|
||||
<div class="row m-t-20">
|
||||
<div class="col">
|
||||
<p class="all-caps no-margin fs-11" style="letter-spacing: 2px;">Nothing To Show Here</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row m-t-5 align-items-center justify-content-center">
|
||||
<div class="col">
|
||||
<small class="fs-9 muted all-caps font-lato" style="letter-spacing: 2px">There is no results found, Try adjusting your filters to find what you are looking for.</small>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div> -->
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
export default {
|
||||
props: {
|
||||
// company: {
|
||||
// type: Object,
|
||||
// required: true
|
||||
// },
|
||||
deciamls: {
|
||||
type: Number,
|
||||
required: true
|
||||
},
|
||||
showingTransactionCount: {
|
||||
required: true
|
||||
},
|
||||
wallet_id: {
|
||||
type: Number,
|
||||
required: true
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
// remainingBalance(index) {
|
||||
// let tempBalance = 0;
|
||||
|
||||
// if(this.company.wallet){
|
||||
// let transactions = this.company.wallet.transactions.slice().reverse();
|
||||
// transactions.slice(0, transactions.length - index).map(function(transaction) {
|
||||
// [1, 11].includes(transaction.type) ? tempBalance -= (transaction.amount) : tempBalance += (transaction.amount);
|
||||
// return tempBalance
|
||||
// }, 0);
|
||||
// }
|
||||
|
||||
// return this.formatValue(tempBalance);
|
||||
// },
|
||||
// formatValue(value) {
|
||||
// if (this.deciamls != 2) {
|
||||
// return (Math.round((parseFloat(value) + Number.EPSILON) * 100000) / 100000).toLocaleString('en-US', { minimumFractionDigits: 5, maximumFractionDigits: 5 });
|
||||
// }
|
||||
|
||||
// return (Math.round((parseFloat(value) + Number.EPSILON) * 100) / 100).toFixed(2).toString().replace(/\B(?=(\d{3})+(?!\d))/g, ",")
|
||||
// }
|
||||
data(){
|
||||
return {
|
||||
key: 1,
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
showingTransactionCount() {
|
||||
this.key ++;
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
+47
-33
@@ -1,56 +1,65 @@
|
||||
<template>
|
||||
<div class="row">
|
||||
<div class="col">
|
||||
<loading-component style="height: 200px; top: 0;" key="1" color="success" v-show="isLoading"></loading-component>
|
||||
<div class="row" v-if="company">
|
||||
<div class="row">
|
||||
<div class="col-8">
|
||||
<div class="row p-b-5 b-b b-grey m-b-10 m-l-0 m-r-0">
|
||||
<div class="col no-padding">
|
||||
<h6>Wallet Transaction History</h6>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row m-t-15 m-b-15">
|
||||
<div class="row m-t-10 m-b-10">
|
||||
<div class="col">
|
||||
<span class="btn btn-md fs-11 bg-primary text-white fs-12 bold" :class="[{'bg-primary-darker': showingPreciseAmount}]" @click="showingPreciseAmount=!showingPreciseAmount">{{ showingPreciseAmount ? 'Showing Precise Wallet Transaction' : 'Show Precise Wallet Transaction'}}</span>
|
||||
<a :href="route('wallet.details-export', company.reference, showingPreciseAmount)" target="_blank" class="btn btn-md btn-primary fs-11"><i class="fa fa-download m-r-5"></i>{{ showingPreciseAmount ? 'Download Precise Transaction' : 'Download Transaction'}}</a>
|
||||
<div class="d-flex align-items-center h-100">
|
||||
<span class="btn btn-md fs-11 bg-primary text-white fs-12 bold m-r-5" :class="[{'bg-primary-darker': showingPreciseAmount}]" @click="showingPreciseAmount=!showingPreciseAmount">{{ showingPreciseAmount ? 'Showing Precise Wallet Transaction' : 'Show Precise Wallet Transaction'}}</span>
|
||||
<a v-if="company" :href="route('wallet.details-export', company.reference, showingPreciseAmount)" target="_blank" class="btn btn-md btn-primary fs-11"><i class="fa fa-download m-r-5"></i>{{ showingPreciseAmount ? 'Download Precise Transaction' : 'Download Transaction'}}</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-2">
|
||||
<validation-wrapper-component selectable :validator="$v.showingTransactionCount">
|
||||
<label>Showing Rows</label>
|
||||
<select-component :options="[5, 10, 20, 30, 50]" v-model="showingTransactionCount"></select-component>
|
||||
</validation-wrapper-component>
|
||||
</div>
|
||||
</div>
|
||||
<div v-show="!showingPreciseAmount">
|
||||
<customer-transaction-component :company="company" :deciamls="2" :wallet_id="wallet_id"></customer-transaction-component>
|
||||
<customer-transaction-component :deciamls="2" :wallet_id="wallet_id" :showingTransactionCount="showingTransactionCount"></customer-transaction-component>
|
||||
</div>
|
||||
<div v-show="showingPreciseAmount">
|
||||
<customer-transaction-component :company="company" :deciamls="5" :wallet_id="wallet_id"></customer-transaction-component>
|
||||
<customer-transaction-component :deciamls="5" :wallet_id="wallet_id" :showingTransactionCount="showingTransactionCount"></customer-transaction-component>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-3 m-l-15">
|
||||
<wallet-component :data="company" :creditable=true></wallet-component>
|
||||
<div class="row m-t-20">
|
||||
<div class="col">
|
||||
<div class="row m-b-10">
|
||||
<div class="col">
|
||||
<div class="font-head fs-10 all-caps">Top Up Records</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row" v-if="company.wallet">
|
||||
<div class="col">
|
||||
<wallet-top-up-history-component v-for="item in company.wallet.top_up_records" v-bind:key="item.id" :data="item"></wallet-top-up-history-component>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row align-items-center justify-content-center p-t-50 p-b-50" v-if="!company.wallet || !company.wallet.top_up_records.length">
|
||||
<div class="col-10">
|
||||
<div class="row align-items-center justify-content-center hint-text">
|
||||
<div class="col-4 hint-text"><img src="/images/not-found-illustration.png" class="w-100 hint-text"></div>
|
||||
<div v-if="!isLoading">
|
||||
<wallet-component :data="company" :creditable=true></wallet-component>
|
||||
<div class="row m-t-20">
|
||||
<div class="col">
|
||||
<div class="row m-b-10">
|
||||
<div class="col">
|
||||
<div class="font-head fs-10 all-caps">Top Up Records</div>
|
||||
</div>
|
||||
<div class="row text-center">
|
||||
<div class="col">
|
||||
<div class="row m-t-20">
|
||||
<div class="col">
|
||||
<p class="all-caps no-margin fs-11" style="letter-spacing: 2px;">Nothing To Show Here</p>
|
||||
</div>
|
||||
<div class="row" v-if="company.wallet">
|
||||
<div class="col">
|
||||
<wallet-top-up-history-component v-for="item in company.wallet.top_up_records" v-bind:key="item.id" :data="item"></wallet-top-up-history-component>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row align-items-center justify-content-center p-t-50 p-b-50" v-if="!company.wallet || !company.wallet.top_up_records.length">
|
||||
<div class="col-10">
|
||||
<div class="row align-items-center justify-content-center hint-text">
|
||||
<div class="col-4 hint-text"><img src="/images/not-found-illustration.png" class="w-100 hint-text"></div>
|
||||
</div>
|
||||
<div class="row text-center">
|
||||
<div class="col">
|
||||
<div class="row m-t-20">
|
||||
<div class="col">
|
||||
<p class="all-caps no-margin fs-11" style="letter-spacing: 2px;">Nothing To Show Here</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row m-t-5 align-items-center justify-content-center">
|
||||
<div class="col">
|
||||
<small class="fs-9 muted all-caps font-lato" style="letter-spacing: 2px">There is no results found, Try adjusting your filters to find what you are looking for.</small>
|
||||
<div class="row m-t-5 align-items-center justify-content-center">
|
||||
<div class="col">
|
||||
<small class="fs-9 muted all-caps font-lato" style="letter-spacing: 2px">There is no results found, Try adjusting your filters to find what you are looking for.</small>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -59,6 +68,7 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<loading-component style="height: 200px; top: 0;" key="1" color="success" v-show="isLoading"></loading-component>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -82,6 +92,7 @@ export default {
|
||||
isLoading: true,
|
||||
company: null,
|
||||
showingPreciseAmount: false,
|
||||
showingTransactionCount: 10,
|
||||
attention: false
|
||||
}
|
||||
},
|
||||
@@ -97,6 +108,9 @@ export default {
|
||||
}
|
||||
}
|
||||
},
|
||||
validations: {
|
||||
showingTransactionCount: { },
|
||||
},
|
||||
created(){
|
||||
this.$store.dispatch('updateListQueue', {'name': this.section});
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user