2 Commits

Author SHA1 Message Date
0d937fb643 Update Node.js to v24
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone/pr Build is passing
2025-07-21 00:18:13 +00:00
365d7589b1 Force refresh of expenses editor
All checks were successful
continuous-integration/drone/push Build is passing
2025-07-20 19:55:18 +02:00
3 changed files with 12 additions and 3 deletions

View File

@@ -12,7 +12,7 @@ steps:
# Frontend
- name: web_build
image: node:23
image: node:24
depends_on:
- fetch
volumes:

View File

@@ -36,8 +36,8 @@ class ScanScreen extends HookConsumerWidget {
restartScan() async {
try {
final val = ref.refresh(_scanDocumentProvider);
Logger.root.info("Load again startup result: $val");
ref.invalidate(_scanDocumentProvider);
Logger.root.info("Load again startup");
} catch (e, s) {
Logger.root.shout("Failed to try again startup loading! $e $s");
}

View File

@@ -40,6 +40,15 @@ class ExpenseEditor extends HookConsumerWidget {
final (:pending, :snapshot, :hasError) = useAsyncTask();
// Force refresh of field if required
final previousData = useState<BaseExpenseInfo?>(null);
if (initialData != previousData.value) {
previousData.value = initialData;
labelController.text = initialData?.label ?? "";
costController.text = initialData?.cost.toString() ?? "";
timeController.value = initialData?.time ?? DateTime.now();
}
// Clear cost value
handleClearCost() {
costController.text = "";