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> {
617
617
),
618
618
),
619
619
buildWidgetCountScreen (heightImage, listFiles),
620
- buildWidgetDeleteTask (heightImage, element.id ),
620
+ buildWidgetDeleteTask (heightImage, element),
621
621
],
622
622
),
623
623
),
@@ -789,11 +789,14 @@ class _ReportScreenshotPageState extends State<ReportScreenshotPage> {
789
789
);
790
790
}
791
791
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 ()) {
794
796
return Container ();
795
797
}
796
798
799
+ final trackId = element.id;
797
800
return Align (
798
801
alignment: Alignment .center,
799
802
child: Padding (
You can’t perform that action at this time.
0 commit comments