|
|
|
|
@ -21,67 +21,67 @@ class GasRefillItemView extends StatelessWidget {
|
|
|
|
|
|
|
|
|
|
@override
|
|
|
|
|
Widget build(BuildContext context) {
|
|
|
|
|
if(requestData!=null) {
|
|
|
|
|
if (requestData != null) {
|
|
|
|
|
return Column(
|
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
|
children: [
|
|
|
|
|
Row(
|
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
|
children: [
|
|
|
|
|
StatusLabel(
|
|
|
|
|
label: requestData!.priorityName!,
|
|
|
|
|
textColor: AppColor.getRequestStatusTextColorByName(context, requestData!.priorityName!),
|
|
|
|
|
backgroundColor: AppColor.getRequestStatusColorByName(context, requestData!.priorityName!),
|
|
|
|
|
),
|
|
|
|
|
8.width,
|
|
|
|
|
StatusLabel(
|
|
|
|
|
label: requestData!.statusName!,
|
|
|
|
|
textColor: AppColor.getRequestStatusTextColorByName(context, requestData!.statusName!),
|
|
|
|
|
backgroundColor: AppColor.getRequestStatusColorByName(context, requestData!.statusName!),
|
|
|
|
|
),
|
|
|
|
|
1.width.expanded,
|
|
|
|
|
Text(requestData!.transactionDate?.toServiceRequestCardFormat ?? "",
|
|
|
|
|
textAlign: TextAlign.end, style: AppTextStyles.tinyFont.copyWith(color: context.isDark ? AppColor.neutral10 : AppColor.neutral50)),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
8.height,
|
|
|
|
|
context.translation.gasRefillRequest.heading5(context),
|
|
|
|
|
// '${context.translation.gasType}: ${request.gasType}'.bodyText(context), // todo ask ahmed
|
|
|
|
|
// '${context.translation.site}: ${request.site?.cleanupWhitespace.capitalizeFirstOfEach}'.bodyText(context),// todo ask ahmed
|
|
|
|
|
'${context.translation.requestNo}: ${requestData!.requestNo}'.bodyText(context),
|
|
|
|
|
8.height,
|
|
|
|
|
Row(
|
|
|
|
|
mainAxisSize: MainAxisSize.min,
|
|
|
|
|
children: [
|
|
|
|
|
Text(
|
|
|
|
|
context.translation.viewDetails,
|
|
|
|
|
style: AppTextStyles.bodyText.copyWith(
|
|
|
|
|
color: AppColor.blueStatus(context),
|
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
|
children: [
|
|
|
|
|
Row(
|
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
|
children: [
|
|
|
|
|
StatusLabel(
|
|
|
|
|
label: requestData!.priorityName!,
|
|
|
|
|
textColor: AppColor.getRequestStatusTextColorByName(context, requestData!.priorityName!),
|
|
|
|
|
backgroundColor: AppColor.getRequestStatusColorByName(context, requestData!.priorityName!),
|
|
|
|
|
),
|
|
|
|
|
8.width,
|
|
|
|
|
StatusLabel(
|
|
|
|
|
label: requestData!.statusName!,
|
|
|
|
|
textColor: AppColor.getRequestStatusTextColorByName(context, requestData!.statusName!),
|
|
|
|
|
backgroundColor: AppColor.getRequestStatusColorByName(context, requestData!.statusName!),
|
|
|
|
|
),
|
|
|
|
|
1.width.expanded,
|
|
|
|
|
Text(requestData!.transactionDate?.toServiceRequestCardFormat ?? "",
|
|
|
|
|
textAlign: TextAlign.end, style: AppTextStyles.tinyFont.copyWith(color: context.isDark ? AppColor.neutral10 : AppColor.neutral50)),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
8.height,
|
|
|
|
|
(requestData?.typeTransaction ?? context.translation.gasRefillRequest).heading5(context),
|
|
|
|
|
// '${context.translation.gasType}: ${request.gasType}'.bodyText(context), // todo ask ahmed
|
|
|
|
|
// '${context.translation.site}: ${request.site?.cleanupWhitespace.capitalizeFirstOfEach}'.bodyText(context),// todo ask ahmed
|
|
|
|
|
'${context.translation.requestNo}: ${requestData!.requestNo}'.bodyText(context),
|
|
|
|
|
8.height,
|
|
|
|
|
Row(
|
|
|
|
|
mainAxisSize: MainAxisSize.min,
|
|
|
|
|
children: [
|
|
|
|
|
Text(
|
|
|
|
|
context.translation.viewDetails,
|
|
|
|
|
style: AppTextStyles.bodyText.copyWith(
|
|
|
|
|
color: AppColor.blueStatus(context),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
4.width,
|
|
|
|
|
Icon(
|
|
|
|
|
Icons.arrow_forward,
|
|
|
|
|
color: AppColor.blueStatus(context),
|
|
|
|
|
size: 14,
|
|
|
|
|
)
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
).toShadowContainer(context, withShadow: showShadow).onPress(() {
|
|
|
|
|
Navigator.of(context).push(
|
|
|
|
|
MaterialPageRoute(
|
|
|
|
|
builder: (_) => GasRefillDetailsPage(
|
|
|
|
|
priority: requestData!.priorityName,
|
|
|
|
|
date: requestData!.transactionDate!,
|
|
|
|
|
model: GasRefillModel(id: requestData!.id),
|
|
|
|
|
),
|
|
|
|
|
4.width,
|
|
|
|
|
Icon(
|
|
|
|
|
Icons.arrow_forward,
|
|
|
|
|
color: AppColor.blueStatus(context),
|
|
|
|
|
size: 14,
|
|
|
|
|
)
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
).toShadowContainer(context, withShadow: showShadow).onPress(() {
|
|
|
|
|
Navigator.of(context).push(
|
|
|
|
|
MaterialPageRoute(
|
|
|
|
|
builder: (_) => GasRefillDetailsPage(
|
|
|
|
|
priority: requestData!.priorityName,
|
|
|
|
|
date: requestData!.transactionDate!,
|
|
|
|
|
model: GasRefillModel(id: requestData!.id),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
);
|
|
|
|
|
});
|
|
|
|
|
);
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if(requestDetails!=null) {
|
|
|
|
|
if (requestDetails != null) {
|
|
|
|
|
return Column(
|
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
|
children: [
|
|
|
|
|
@ -100,11 +100,12 @@ class GasRefillItemView extends StatelessWidget {
|
|
|
|
|
backgroundColor: AppColor.getRequestStatusColorByName(context, requestDetails!.status!),
|
|
|
|
|
),
|
|
|
|
|
1.width.expanded,
|
|
|
|
|
Text(requestDetails!.date?.toServiceRequestCardFormat ?? "", textAlign: TextAlign.end, style: AppTextStyles.tinyFont.copyWith(color: context.isDark ? AppColor.neutral10 : AppColor.neutral50)),
|
|
|
|
|
Text(requestDetails!.date?.toServiceRequestCardFormat ?? "",
|
|
|
|
|
textAlign: TextAlign.end, style: AppTextStyles.tinyFont.copyWith(color: context.isDark ? AppColor.neutral10 : AppColor.neutral50)),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
8.height,
|
|
|
|
|
context.translation.gasRefillRequest.heading5(context),
|
|
|
|
|
(requestDetails?.nameOfType ?? context.translation.gasRefillRequest).heading5(context),
|
|
|
|
|
'${context.translation.gasType}: ${requestDetails!.gasType}'.bodyText(context),
|
|
|
|
|
'${context.translation.site}: ${requestDetails!.site?.cleanupWhitespace?.capitalizeFirstOfEach}'.bodyText(context),
|
|
|
|
|
'${context.translation.requestNo}: ${requestDetails!.requestNo}'.bodyText(context),
|
|
|
|
|
|