Change some ui and accessibility for transfer & ..

This commit is contained in:
hanie.khodkari
2025-04-22 21:38:17 +03:30
parent 96f0e519d9
commit ae1dc393ed
2 changed files with 46 additions and 37 deletions
@@ -57,7 +57,7 @@ class _ItemDetailScreenState extends State<ItemDetailScreen> {
appBar: AppBar( appBar: AppBar(
titleSpacing: -10, titleSpacing: -10,
title: Text( title: Text(
'My Items', 'Items',
style: TextStyle( style: TextStyle(
color: Colors.white, color: Colors.white,
), ),
@@ -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,6 +462,10 @@ class ItemDetailsDataBox extends StatelessWidget {
// datas.hospital.contains(userData['medical_center']) || // datas.hospital.contains(userData['medical_center']) ||
// (userData['roles']?.contains('User'))) // (userData['roles']?.contains('User')))
// ? // ?
if (userData['roles']?.contains('Admin') ||
userData['roles']?.contains('Supervisor') ||
(userData['roles']?.contains('User') &&
(userData['name']?.contains(datas.userName.toString()))))
TransferDestroyButton( TransferDestroyButton(
deviceBlockSize: _deviceBlockSize, deviceBlockSize: _deviceBlockSize,
firstColor: kDarkBlue, firstColor: kDarkBlue,
@@ -457,6 +486,8 @@ class ItemDetailsDataBox extends StatelessWidget {
// }, // },
// ) // )
// : Container(), // : Container(),
if (userData['roles']?.contains('Admin') ||
userData['roles']?.contains('Supervisor'))
if (datas.repair == 0) if (datas.repair == 0)
if (datas.packageId == "null") if (datas.packageId == "null")
SizedBox( SizedBox(
@@ -810,28 +841,6 @@ class ItemDetailsDataBox extends StatelessWidget {
) )
: Container() : Container()
: 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( SizedBox(
height: 30, height: 30,
), ),