Project management related changes

This commit is contained in:
2026-08-24 22:57:06 +05:30
parent 71b2389221
commit 2a106a8716
67 changed files with 3565 additions and 80 deletions

View File

@@ -0,0 +1,21 @@
import re
with open('kifi-app/lib/features/sales/presentation/invoice_builder_screen.dart', 'r') as f:
content = f.read()
# Replace the wrong definition back to what it might have been... oh wait, my first script just modified `void _buildAddLineItemDialog` which didn't exist so it failed!
# Which means `content = content.replace(old_def, new_def)` did nothing, but `isProjectMode` was inserted manually? Wait! No, my script inserted `isProjectMode` but not `ref.read`!
# Ah, I replaced `Consumer(builder: (context, dialogRef, _))` with `if (!isProjectMode) Consumer(...)`. That's why `isProjectMode` is undefined!
def fix_it():
global content
# Let's just find `void _showAddItemDialog() {`
old_def = " void _showAddItemDialog() {"
new_def = " void _showAddItemDialog() {\n final isProjectMode = ref.read(projectModeProvider);"
content = content.replace(old_def, new_def)
fix_it()
with open('kifi-app/lib/features/sales/presentation/invoice_builder_screen.dart', 'w') as f:
f.write(content)