diff --git a/lib/pages/MyItemsPages/my_items_detail_screen.dart b/lib/pages/MyItemsPages/my_items_detail_screen.dart index bdfe95b..b7f9fb1 100755 --- a/lib/pages/MyItemsPages/my_items_detail_screen.dart +++ b/lib/pages/MyItemsPages/my_items_detail_screen.dart @@ -57,7 +57,7 @@ class _ItemDetailScreenState extends State { appBar: AppBar( titleSpacing: -10, title: Text( - 'My Items', + 'Items', style: TextStyle( color: Colors.white, ), diff --git a/lib/widgets/MyItemsScreens/Detail/my_items_detail_box_widget.dart b/lib/widgets/MyItemsScreens/Detail/my_items_detail_box_widget.dart index d631ab7..353dcbe 100755 --- a/lib/widgets/MyItemsScreens/Detail/my_items_detail_box_widget.dart +++ b/lib/widgets/MyItemsScreens/Detail/my_items_detail_box_widget.dart @@ -425,6 +425,31 @@ class ItemDetailsDataBox extends StatelessWidget { ), ), ), + SizedBox( + height: 10, + ), + InkWell( + onTap: () async => await launch( + 'https://cssd-doc.com/Show/Item/${datas.id.toString()}', + ), + child: Container( + padding: EdgeInsets.symmetric(vertical: 10), + width: double.infinity * 2 / 3, + decoration: BoxDecoration( + color: Colors.black, + borderRadius: BorderRadius.circular(5), + ), + child: Center( + child: Text( + 'Show More Details', + style: TextStyle( + fontSize: 5.0 * _deviceBlockSize, + color: Colors.white, + ), + ), + ), + ), + ), ], ), ), @@ -437,15 +462,19 @@ class ItemDetailsDataBox extends StatelessWidget { // datas.hospital.contains(userData['medical_center']) || // (userData['roles']?.contains('User'))) // ? - TransferDestroyButton( - deviceBlockSize: _deviceBlockSize, - firstColor: kDarkBlue, - secondColor: kDarkBlueSub, - text: 'Transfer', - onTap: () { - push(); - }, - ), + if (userData['roles']?.contains('Admin') || + userData['roles']?.contains('Supervisor') || + (userData['roles']?.contains('User') && + (userData['name']?.contains(datas.userName.toString())))) + TransferDestroyButton( + deviceBlockSize: _deviceBlockSize, + firstColor: kDarkBlue, + secondColor: kDarkBlueSub, + text: 'Transfer', + onTap: () { + push(); + }, + ), // : datas.packageId != "null" // ? TransferDestroyButton( // deviceBlockSize: _deviceBlockSize, @@ -457,11 +486,13 @@ class ItemDetailsDataBox extends StatelessWidget { // }, // ) // : Container(), - if (datas.repair == 0) - if (datas.packageId == "null") - SizedBox( - height: 10.0, - ), + if (userData['roles']?.contains('Admin') || + userData['roles']?.contains('Supervisor')) + if (datas.repair == 0) + if (datas.packageId == "null") + SizedBox( + height: 10.0, + ), if (datas.repair == 0) (userData['roles']?.contains('Admin') || (userData['roles']?.contains('Supervisor') && @@ -810,28 +841,6 @@ class ItemDetailsDataBox extends StatelessWidget { ) : Container() : Container(), - SizedBox( - height: 20.0, - ), - InkWell( - onTap: () async => await launch( - 'https://cssd-doc.com/Show/Item/${datas.id.toString()}', - ), - child: Container( - padding: EdgeInsets.symmetric(vertical: 20), - width: double.infinity, - decoration: BoxDecoration( - color: Color.fromRGBO(230, 230, 230, 1), - borderRadius: BorderRadius.circular(25), - ), - child: Center( - child: Text( - 'Show More Details', - style: TextStyle(fontWeight: FontWeight.w700), - ), - ), - ), - ), SizedBox( height: 30, ),