Project management related changes
This commit is contained in:
44
scratch/patch_board2.py
Normal file
44
scratch/patch_board2.py
Normal file
@@ -0,0 +1,44 @@
|
||||
import re
|
||||
|
||||
with open('kifi-app/lib/features/projects/presentation/project_board_screen.dart', 'r') as f:
|
||||
content = f.read()
|
||||
|
||||
# Replace old Card with TaskCard
|
||||
old_card = """ ...tasks.map((t) => Card(
|
||||
margin: const EdgeInsets.symmetric(horizontal: 16, vertical: 8),
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.all(12.0),
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Text(t.title, style: const TextStyle(fontWeight: FontWeight.bold)),
|
||||
if (t.isBillable) ...[
|
||||
const SizedBox(height: 8),
|
||||
Container(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 8, vertical: 4),
|
||||
decoration: BoxDecoration(color: Colors.green[50], borderRadius: BorderRadius.circular(4)),
|
||||
child: const Text('Billable', style: TextStyle(color: Colors.green, fontSize: 12)),
|
||||
)
|
||||
]
|
||||
],
|
||||
),
|
||||
),
|
||||
)),"""
|
||||
|
||||
new_card = """ ...tasks.map((t) => TaskCard(
|
||||
task: t,
|
||||
onGenerateInvoice: () {
|
||||
// TODO: Navigate to AddInvoiceScreen with task data
|
||||
},
|
||||
)),"""
|
||||
|
||||
content = content.replace(old_card, new_card)
|
||||
|
||||
# Add import
|
||||
content = content.replace(
|
||||
'import \'widgets/add_task_sheet.dart\';',
|
||||
'import \'widgets/add_task_sheet.dart\';\nimport \'widgets/task_card.dart\';'
|
||||
)
|
||||
|
||||
with open('kifi-app/lib/features/projects/presentation/project_board_screen.dart', 'w') as f:
|
||||
f.write(content)
|
||||
Reference in New Issue
Block a user