Feature_Global_Project_Selection #47

Merged
vaibhav.surve merged 22 commits from Feature_Global_Project_Selection into main 2025-06-17 10:09:58 +00:00
2 changed files with 228 additions and 219 deletions
Showing only changes of commit daf132c3b5 - Show all commits

View File

@ -252,8 +252,8 @@ class _CommentTaskBottomSheetState extends State<CommentTaskBottomSheet>
child: ListView.separated( child: ListView.separated(
scrollDirection: Axis.horizontal, scrollDirection: Axis.horizontal,
itemCount: images.length, itemCount: images.length,
separatorBuilder: (_, __) => separatorBuilder: (context, index) =>
MySpacing.width(12), SizedBox(height: 12),
itemBuilder: (context, index) { itemBuilder: (context, index) {
final file = images[index]; final file = images[index];
return Stack( return Stack(
@ -445,11 +445,13 @@ class _CommentTaskBottomSheetState extends State<CommentTaskBottomSheet>
return SizedBox( return SizedBox(
height: 300, height: 300,
child: ListView.builder( child: ListView.builder(
padding: const EdgeInsets.symmetric(
vertical:
8), // Added padding around the list
itemCount: comments.length, itemCount: comments.length,
itemBuilder: (context, index) { itemBuilder: (context, index) {
final comment = comments[index]; final comment = comments[index];
final commentText = final commentText = comment['text'] ?? '-';
comment['text'] ?? '-';
final commentedBy = final commentedBy =
comment['commentedBy'] ?? 'Unknown'; comment['commentedBy'] ?? 'Unknown';
final relativeTime = final relativeTime =
@ -466,19 +468,18 @@ class _CommentTaskBottomSheetState extends State<CommentTaskBottomSheet>
]; ];
return Container( return Container(
margin: EdgeInsets.symmetric( margin: const EdgeInsets.symmetric(
vertical: 0, horizontal: 0), vertical: 8), // Spacing between items
padding: EdgeInsets.all(12), padding: const EdgeInsets.all(12),
decoration: BoxDecoration( decoration: BoxDecoration(
color: Colors.grey.shade200, color: Colors.grey.shade200,
borderRadius: borderRadius: BorderRadius.circular(12),
BorderRadius.circular(12),
), ),
child: Row( child: Row(
crossAxisAlignment: crossAxisAlignment:
CrossAxisAlignment.start, CrossAxisAlignment.start,
children: [ children: [
SizedBox(width: 12), const SizedBox(width: 12),
Expanded( Expanded(
child: Column( child: Column(
crossAxisAlignment: crossAxisAlignment:
@ -487,8 +488,7 @@ class _CommentTaskBottomSheetState extends State<CommentTaskBottomSheet>
// 🔹 Top Row: Avatar + Name + Time // 🔹 Top Row: Avatar + Name + Time
Row( Row(
crossAxisAlignment: crossAxisAlignment:
CrossAxisAlignment CrossAxisAlignment.center,
.center,
children: [ children: [
Avatar( Avatar(
firstName: commentedBy firstName: commentedBy
@ -504,7 +504,7 @@ class _CommentTaskBottomSheetState extends State<CommentTaskBottomSheet>
: '', : '',
size: 32, size: 32,
), ),
SizedBox(width: 12), const SizedBox(width: 12),
Expanded( Expanded(
child: Row( child: Row(
mainAxisAlignment: mainAxisAlignment:
@ -514,22 +514,21 @@ class _CommentTaskBottomSheetState extends State<CommentTaskBottomSheet>
MyText.bodyMedium( MyText.bodyMedium(
commentedBy, commentedBy,
fontWeight: 700, fontWeight: 700,
color: Colors color:
.black87, Colors.black87,
), ),
MyText.bodySmall( MyText.bodySmall(
relativeTime, relativeTime,
fontSize: 12, fontSize: 12,
color: Colors color:
.black54, Colors.black54,
), ),
], ],
), ),
), ),
], ],
), ),
const SizedBox(height: 12),
SizedBox(height: 12),
// 🔹 Comment text below attachments // 🔹 Comment text below attachments
Row( Row(
mainAxisAlignment: mainAxisAlignment:
@ -541,9 +540,9 @@ class _CommentTaskBottomSheetState extends State<CommentTaskBottomSheet>
fontWeight: 500, fontWeight: 500,
color: Colors.black87, color: Colors.black87,
), ),
]), ],
SizedBox(height: 12), ),
const SizedBox(height: 12),
// 🔹 Attachments row: full width below top row // 🔹 Attachments row: full width below top row
if (imageUrls.isNotEmpty) ...[ if (imageUrls.isNotEmpty) ...[
Row( Row(
@ -555,20 +554,20 @@ class _CommentTaskBottomSheetState extends State<CommentTaskBottomSheet>
Icons Icons
.attach_file_outlined, .attach_file_outlined,
size: 18, size: 18,
color: Colors color:
.grey[700]), Colors.grey[700]),
MyText.bodyMedium( MyText.bodyMedium(
'Attachments', 'Attachments',
fontWeight: 600, fontWeight: 600,
color: color: Colors.black87,
Colors.black87,
), ),
]), ],
SizedBox(height: 8), ),
const SizedBox(height: 8),
SizedBox( SizedBox(
height: 60, height: 60,
child: ListView.separated( child: ListView.separated(
padding: EdgeInsets padding: const EdgeInsets
.symmetric( .symmetric(
horizontal: 0), horizontal: 0),
scrollDirection: scrollDirection:
@ -583,8 +582,7 @@ class _CommentTaskBottomSheetState extends State<CommentTaskBottomSheet>
return GestureDetector( return GestureDetector(
onTap: () { onTap: () {
showDialog( showDialog(
context: context: context,
context,
barrierColor: barrierColor:
Colors Colors
.black54, .black54,
@ -605,7 +603,8 @@ class _CommentTaskBottomSheetState extends State<CommentTaskBottomSheet>
decoration: decoration:
BoxDecoration( BoxDecoration(
borderRadius: borderRadius:
BorderRadius.circular( BorderRadius
.circular(
12), 12),
color: Colors color: Colors
.grey[ .grey[
@ -616,7 +615,8 @@ class _CommentTaskBottomSheetState extends State<CommentTaskBottomSheet>
.black26, .black26,
blurRadius: blurRadius:
6, 6,
offset: Offset( offset:
Offset(
2, 2,
2), 2),
), ),
@ -625,7 +625,8 @@ class _CommentTaskBottomSheetState extends State<CommentTaskBottomSheet>
child: child:
ClipRRect( ClipRRect(
borderRadius: borderRadius:
BorderRadius.circular( BorderRadius
.circular(
12), 12),
child: Image child: Image
.network( .network(
@ -637,7 +638,8 @@ class _CommentTaskBottomSheetState extends State<CommentTaskBottomSheet>
stackTrace) => stackTrace) =>
Container( Container(
color: Colors color: Colors
.grey[300], .grey[
300],
child: Icon( child: Icon(
Icons Icons
.broken_image, .broken_image,
@ -647,7 +649,7 @@ class _CommentTaskBottomSheetState extends State<CommentTaskBottomSheet>
), ),
), ),
), ),
Positioned( const Positioned(
right: 4, right: 4,
bottom: 4, bottom: 4,
child: Icon( child: Icon(
@ -661,12 +663,13 @@ class _CommentTaskBottomSheetState extends State<CommentTaskBottomSheet>
), ),
); );
}, },
separatorBuilder: (_, separatorBuilder:
__) => (_, __) =>
SizedBox(width: 12), const SizedBox(
width: 12),
), ),
), ),
SizedBox(height: 12), const SizedBox(height: 12),
], ],
], ],
), ),
@ -674,7 +677,8 @@ class _CommentTaskBottomSheetState extends State<CommentTaskBottomSheet>
], ],
), ),
); );
}), },
),
); );
}, },
), ),

View File

@ -124,7 +124,12 @@ class _DailyProgressReportFilterState extends State<DailyProgressReportFilter> {
), ),
child: const Text('Apply Filter'), child: const Text('Apply Filter'),
onPressed: () { onPressed: () {
Navigator.pop(context, {}); WidgetsBinding.instance.addPostFrameCallback((_) {
Navigator.pop(context, {
'startDate': widget.controller.startDateTask,
'endDate': widget.controller.endDateTask,
});
});
}, },
), ),
), ),