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

38
scratch/patch_board.py Normal file
View File

@@ -0,0 +1,38 @@
import re
with open('kifi-app/lib/features/projects/presentation/project_board_screen.dart', 'r') as f:
content = f.read()
# Add button for "To Do" column
content = content.replace(
'_buildColumn(\'To Do\', todo),',
'_buildColumn(\'To Do\', todo, showAdd: true),'
)
content = content.replace(
'Widget _buildColumn(String title, List tasks) {',
'Widget _buildColumn(String title, List tasks, {bool showAdd = false}) {'
)
add_button_code = """
if (showAdd)
Padding(
padding: const EdgeInsets.symmetric(horizontal: 16),
child: TextButton.icon(
icon: const Icon(Icons.add),
label: const Text('Add Task'),
onPressed: () {
showModalBottomSheet(
context: context,
isScrollControlled: true,
backgroundColor: Colors.transparent,
builder: (_) => AddTaskSheet(projectId: widget.project.id),
);
},
),
),
const SizedBox(height: 16),
"""
content = content.replace(' const SizedBox(height: 16),\n ],\n ),\n );\n }', add_button_code + ' ],\n ),\n );\n }')
with open('kifi-app/lib/features/projects/presentation/project_board_screen.dart', 'w') as f:
f.write(content)