|
|
|
|
@ -40,6 +40,10 @@ class _ServiceRequestDetailsPageState extends State<ServiceRequestDetailsPage> {
|
|
|
|
|
@override
|
|
|
|
|
void initState() {
|
|
|
|
|
super.initState();
|
|
|
|
|
getServiceRequest();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void getServiceRequest() {
|
|
|
|
|
loading = true;
|
|
|
|
|
setState(() {});
|
|
|
|
|
WidgetsFlutterBinding.ensureInitialized().addPostFrameCallback((timeStamp) async {
|
|
|
|
|
@ -86,7 +90,8 @@ class _ServiceRequestDetailsPageState extends State<ServiceRequestDetailsPage> {
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
8.height,
|
|
|
|
|
Text(serviceRequest.deviceEnName?.cleanupWhitespace?.capitalizeFirstOfEach, style: AppTextStyles.heading5.copyWith(color: context.isDark ? AppColor.neutral30 : AppColor.neutral50)),
|
|
|
|
|
Text(serviceRequest.deviceEnName?.cleanupWhitespace?.capitalizeFirstOfEach,
|
|
|
|
|
style: AppTextStyles.heading5.copyWith(color: context.isDark ? AppColor.neutral30 : AppColor.neutral50)),
|
|
|
|
|
8.height,
|
|
|
|
|
Text(
|
|
|
|
|
'${context.translation.assetNumber}: ${serviceRequest.device.assetNumber}',
|
|
|
|
|
@ -235,16 +240,16 @@ class _ServiceRequestDetailsPageState extends State<ServiceRequestDetailsPage> {
|
|
|
|
|
label: context.translation.firstAction,
|
|
|
|
|
maxWidth: true,
|
|
|
|
|
onPressed: () async {
|
|
|
|
|
// Navigator.of(context).push(
|
|
|
|
|
// MaterialPageRoute(builder: (_) => CreateServiceRequestPage(serviceRequest: serviceRequest)),
|
|
|
|
|
// );
|
|
|
|
|
await showModalBottomSheet(
|
|
|
|
|
bool shouldReloadData = (await showModalBottomSheet(
|
|
|
|
|
context: context,
|
|
|
|
|
useSafeArea: true,
|
|
|
|
|
isScrollControlled: true,
|
|
|
|
|
backgroundColor: Colors.transparent,
|
|
|
|
|
builder: (context) => FirstActionBottomSheet(request: serviceRequest),
|
|
|
|
|
);
|
|
|
|
|
)) as bool;
|
|
|
|
|
if (shouldReloadData ?? false) {
|
|
|
|
|
getServiceRequest();
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
)
|
|
|
|
|
: AppFilledButton(
|
|
|
|
|
|