From 4fa0a48d3622ec7ec190921619021b5a874aec52 Mon Sep 17 00:00:00 2001 From: Roberto Guido Date: Sun, 26 Nov 2023 11:35:58 +0100 Subject: [PATCH] aggiornamento riga stato quota quando aggiornata/aggiunta. closes #233 --- .../Http/Controllers/MovementsController.php | 1 + code/resources/views/movement/modal.blade.php | 1 - .../views/user/partials/fee_row.blade.php | 22 +++++++++++++------ 3 files changed, 16 insertions(+), 8 deletions(-) diff --git a/code/app/Http/Controllers/MovementsController.php b/code/app/Http/Controllers/MovementsController.php index d4192656..28100ad9 100644 --- a/code/app/Http/Controllers/MovementsController.php +++ b/code/app/Http/Controllers/MovementsController.php @@ -197,6 +197,7 @@ public function show(Request $request, $id) return view('movement.modal', [ 'dom_id' => $dom_id, 'obj' => null, + 'extra' => $request->input('extra', []), 'default' => Movement::generate($type, $sender, $target, $amount), ]); } diff --git a/code/resources/views/movement/modal.blade.php b/code/resources/views/movement/modal.blade.php index 8bb5e299..61ff1b60 100644 --- a/code/resources/views/movement/modal.blade.php +++ b/code/resources/views/movement/modal.blade.php @@ -36,7 +36,6 @@ - diff --git a/code/resources/views/user/partials/fee_row.blade.php b/code/resources/views/user/partials/fee_row.blade.php index c829928f..42cef8c1 100644 --- a/code/resources/views/user/partials/fee_row.blade.php +++ b/code/resources/views/user/partials/fee_row.blade.php @@ -2,6 +2,7 @@ id); $new_fee_url = route('movements.show', [ 'movement' => 0, @@ -11,7 +12,8 @@ 'sender_type' => get_class($user), 'target_id' => $user->gas, 'target_type' => get_class($user->gas), - 'amount' => $user->gas->getConfig('annual_fee_amount') + 'amount' => $user->gas->getConfig('annual_fee_amount'), + 'extra' => ['reload-portion' => '#' . $row_random_id], ]); $user_status = $user->plainStatus(); @@ -22,17 +24,23 @@ $classes[] = 'hidden'; } - if ($user->fee) { - $classes[] = 'holding-movement-' . $user->fee->id; - } - if ($user->expiredFee()) { $classes[] = 'table-danger'; } + if ($user->fee) { + $modify_fee_url = route('movements.show', [ + 'movement' => $user->fee->id, + 'dom_id' => $dom_id, + 'extra' => ['reload-portion' => '#' . $row_random_id], + ]); + + $classes[] = 'holding-movement-' . $user->fee->id; + } + ?> - + {!! $user->printableName() !!} @@ -65,7 +73,7 @@ @if($user->fee) - + @endif