Skip to content

Commit 991a5d1

Browse files
committed
bug: Perbaiki agar role employee hanya bisa melihat data dirinya sendiri di halaman report_screenshot_page.dart
1 parent 4b59a86 commit 991a5d1

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

lib/feature/presentation/page/report_screenshot/report_screenshot_page.dart

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -373,19 +373,21 @@ class _ReportScreenshotPageState extends State<ReportScreenshotPage> {
373373

374374
return SizedBox(
375375
height: 42,
376-
child: DropdownButtonFormField(
376+
child: DropdownButtonFormField<UserProfileResponse?>(
377377
value: selectedUser,
378378
items: listUserProfile.map((e) {
379379
return DropdownMenuItem(
380380
value: e,
381381
child: Text(e.name ?? '-'),
382382
);
383383
}).toList(),
384-
onChanged: (newValue) {
385-
setState(() {
386-
selectedUser = newValue;
387-
});
388-
},
384+
onChanged: isEnabled
385+
? (newValue) {
386+
setState(() {
387+
selectedUser = newValue;
388+
});
389+
}
390+
: null,
389391
isExpanded: true,
390392
decoration: widgetHelper.setDefaultTextFieldDecoration(
391393
filled: true,

0 commit comments

Comments
 (0)