|
|
|
@ -22,15 +22,7 @@ class VisitItem extends StatelessWidget {
|
|
|
|
@override
|
|
|
|
@override
|
|
|
|
Widget build(BuildContext context) {
|
|
|
|
Widget build(BuildContext context) {
|
|
|
|
UserProvider userProvider = Provider.of<UserProvider>(context);
|
|
|
|
UserProvider userProvider = Provider.of<UserProvider>(context);
|
|
|
|
return Container(
|
|
|
|
return Row(
|
|
|
|
decoration: ShapeDecoration(
|
|
|
|
|
|
|
|
color: Colors.white,
|
|
|
|
|
|
|
|
shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(20)),
|
|
|
|
|
|
|
|
shadows: const [BoxShadow(color: Color(0x07000000), blurRadius: 14, offset: Offset(0, 0), spreadRadius: 0)],
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
padding: const EdgeInsets.all(16),
|
|
|
|
|
|
|
|
margin: EdgeInsets.only(bottom: 8.toScreenHeight),
|
|
|
|
|
|
|
|
child: Row(
|
|
|
|
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
children: [
|
|
|
|
children: [
|
|
|
|
Column(
|
|
|
|
Column(
|
|
|
|
@ -86,16 +78,17 @@ class VisitItem extends StatelessWidget {
|
|
|
|
).expanded,
|
|
|
|
).expanded,
|
|
|
|
8.width,
|
|
|
|
8.width,
|
|
|
|
Column(
|
|
|
|
Column(
|
|
|
|
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.end,
|
|
|
|
children: [
|
|
|
|
children: [
|
|
|
|
if (userProvider.user.type == UsersTypes.engineer && visit.status.value != 5 && visit.status.value != 3)
|
|
|
|
if (userProvider.user.type == UsersTypes.engineer && visit.status.id != 270)
|
|
|
|
context.translation.edit.toSvgAsset(height: 48, width: 48).onPress(() {
|
|
|
|
"edit".toSvgAsset(height: 48, width: 48).onPress(() {
|
|
|
|
Navigator.of(context).push(MaterialPageRoute(builder: (_) => EditPentry(visit: visit, pentry: visit.pentry)));
|
|
|
|
Navigator.of(context).push(MaterialPageRoute(builder: (_) => EditPentry(visit: visit, pentry: visit.pentry)));
|
|
|
|
}),
|
|
|
|
}),
|
|
|
|
|
|
|
|
if (userProvider.user.type == UsersTypes.engineer && visit.status.id != 270) 8.height,
|
|
|
|
Text(visit.createdOn != null ? visit.createdOn.toServiceRequestCardFormat : "", textAlign: TextAlign.end, style: AppTextStyles.tinyFont.copyWith(color: const Color(0xFF3B3D4A))),
|
|
|
|
Text(visit.createdOn != null ? visit.createdOn.toServiceRequestCardFormat : "", textAlign: TextAlign.end, style: AppTextStyles.tinyFont.copyWith(color: const Color(0xFF3B3D4A))),
|
|
|
|
],
|
|
|
|
],
|
|
|
|
)
|
|
|
|
)
|
|
|
|
],
|
|
|
|
],
|
|
|
|
),
|
|
|
|
).toShadowContainer(context).paddingOnly(bottom: 8);
|
|
|
|
);
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|