@@ -70,6 +70,10 @@ export default {
id: {
type: Number,
required: true
+ },
+ wallet_id: {
+ type: Number,
+ required: true
}
},
data(){
diff --git a/resources/assets/vue/components/wallets/elements/CustomerWalletTransactionComponent.vue b/resources/assets/vue/components/wallets/elements/CustomerWalletTransactionComponent.vue
new file mode 100644
index 00000000..bf9864e1
--- /dev/null
+++ b/resources/assets/vue/components/wallets/elements/CustomerWalletTransactionComponent.vue
@@ -0,0 +1,35 @@
+
+
+
{{data.created_at}}
+
+
{{[5, 9].includes(parseFloat(data.type)) ? formatValue(data.amount) : ''}}
+
{{[1, 11].includes(parseFloat(data.type)) ? '- ' + (formatValue(data.amount)) : ''}}
+
{{formatValue(data.running_balance)}}
+
+
+
\ No newline at end of file
diff --git a/resources/views/pages/wallet/transactions.blade.php b/resources/views/pages/wallet/transactions.blade.php
index ce31dec6..af89c443 100644
--- a/resources/views/pages/wallet/transactions.blade.php
+++ b/resources/views/pages/wallet/transactions.blade.php
@@ -1,5 +1,5 @@
\ No newline at end of file
diff --git a/routes/web.php b/routes/web.php
index 4c4fc328..093de5ff 100644
--- a/routes/web.php
+++ b/routes/web.php
@@ -227,8 +227,10 @@ Route::get('/fix_bills', function () {
})->name('products.random');
Route::get('/wallet/{marking}/details', function ($marking) {
- $id = \App\Models\Company::where('reference', '=', $marking)->first()->id;
- return view('pages.wallet.index', ['id' => $id]);
+ $company = \App\Models\Company::where('reference', '=', $marking)->first();
+ $id = $company->id;
+ $wallet_id = $company->wallets()->first()->id;
+ return view('pages.wallet.index', ['id' => $id, 'wallet_id' => $wallet_id]);
})->name('wallet.details');
Route::get('/wallet/{marking}/{is_precise}/export', 'Exports\ExportCustomersWalletTransactionToExcelController@export')->name('wallet.details-export');