|
|
|
|
@ -146,14 +146,12 @@ class _GasRefillDetailsPageState extends State<GasRefillDetailsPage> {
|
|
|
|
|
infoText(label: context.translation.floor, value: gasRefillModel.floor?.name),
|
|
|
|
|
infoText(label: context.translation.department, value: gasRefillModel.department?.name),
|
|
|
|
|
infoText(label: context.translation.requestedQuantity, value: gasRefillModel.gasRefillDetails?[0].requestedQty.toString()),
|
|
|
|
|
//need to confirm contact info form backend..
|
|
|
|
|
const Divider().defaultStyle(context),
|
|
|
|
|
context.translation.contactInfo.heading6(context).custom(color: context.isDark ? AppColor.neutral30 : AppColor.neutral50),
|
|
|
|
|
infoText(label: context.translation.employeeId, value: gasRefillModel.employeeId),
|
|
|
|
|
infoText(label: context.translation.name, value: gasRefillModel.name),
|
|
|
|
|
const Divider().defaultStyle(context),
|
|
|
|
|
context.translation.workOrderDetails.heading6(context).custom(color: context.isDark ? AppColor.neutral30 : AppColor.neutral50),
|
|
|
|
|
infoText(label: context.translation.deliveredQuantity, value: gasRefillModel.gasRefillDetails![0].deliverdQty.toString()),
|
|
|
|
|
_contactPersonInfo(),
|
|
|
|
|
if (gasRefillModel.gasRefillDetails?[0].deliverdQty != null) ...[
|
|
|
|
|
const Divider().defaultStyle(context),
|
|
|
|
|
context.translation.workOrderDetails.heading6(context).custom(color: context.isDark ? AppColor.neutral30 : AppColor.neutral50),
|
|
|
|
|
infoText(label: context.translation.deliveredQuantity, value: gasRefillModel.gasRefillDetails![0].deliverdQty.toString()),
|
|
|
|
|
],
|
|
|
|
|
if (gasRefillModel.techComment?.isNotEmpty ?? false) infoText(label: context.translation.technicalComment, value: gasRefillModel.techComment),
|
|
|
|
|
8.height,
|
|
|
|
|
if (gasRefillModel.comment?.isNotEmpty ?? false) ...[
|
|
|
|
|
@ -197,6 +195,42 @@ class _GasRefillDetailsPageState extends State<GasRefillDetailsPage> {
|
|
|
|
|
).toShadowContainer(context, padding: 0);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
Widget _contactPersonInfo() {
|
|
|
|
|
if (_model.gasRefillContactPerson != null && _model.gasRefillContactPerson!.isNotEmpty) {
|
|
|
|
|
return Column(
|
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
|
children: [
|
|
|
|
|
const Divider().defaultStyle(context),
|
|
|
|
|
Text(
|
|
|
|
|
"Contact Info".addTranslation,
|
|
|
|
|
style: AppTextStyles.heading6.copyWith(
|
|
|
|
|
color: context.isDark ? AppColor.neutral30 : AppColor.neutral50,
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
..._model.gasRefillContactPerson!.asMap().entries.map((entry) {
|
|
|
|
|
final index = entry.key;
|
|
|
|
|
final person = entry.value;
|
|
|
|
|
final isLast = index == _model.gasRefillContactPerson!.length - 1;
|
|
|
|
|
|
|
|
|
|
return Column(
|
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
|
children: [
|
|
|
|
|
const SizedBox(height: 8),
|
|
|
|
|
infoText(label: context.translation.employeeId, value: person.employeeId),
|
|
|
|
|
infoText(label: context.translation.name, value: person.name),
|
|
|
|
|
infoText(label: context.translation.email, value: person.email),
|
|
|
|
|
infoText(label: context.translation.phoneNumber, value: person.mobilePhone),
|
|
|
|
|
infoText(label: context.translation.extensionNo, value: person.extension),
|
|
|
|
|
if (!isLast && _model.gasRefillContactPerson!.length > 1) const Divider().defaultStyle(context),
|
|
|
|
|
],
|
|
|
|
|
);
|
|
|
|
|
}).toList(),
|
|
|
|
|
],
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
return const SizedBox();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
Widget infoText({
|
|
|
|
|
String? label,
|
|
|
|
|
String? value,
|
|
|
|
|
|