File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed
lib/feature/presentation/page/report_screenshot Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -617,7 +617,7 @@ class _ReportScreenshotPageState extends State<ReportScreenshotPage> {
617617 ),
618618 ),
619619 buildWidgetCountScreen (heightImage, listFiles),
620- buildWidgetDeleteTask (heightImage, element.id ),
620+ buildWidgetDeleteTask (heightImage, element),
621621 ],
622622 ),
623623 ),
@@ -789,11 +789,14 @@ class _ReportScreenshotPageState extends State<ReportScreenshotPage> {
789789 );
790790 }
791791
792- Widget buildWidgetDeleteTask (double heightImage, int ? trackId) {
793- if (userRole != null && userRole == UserRole .employee) {
792+ Widget buildWidgetDeleteTask (double heightImage, ItemTrackUserResponse element) {
793+ if (userRole == UserRole .employee) {
794+ return Container ();
795+ } else if (userRole == UserRole .admin && userId != element.userId.toString ()) {
794796 return Container ();
795797 }
796798
799+ final trackId = element.id;
797800 return Align (
798801 alignment: Alignment .center,
799802 child: Padding (
You can’t perform that action at this time.
0 commit comments