|
|
|
@ -103,6 +103,7 @@ class FirebaseNotificationManger {
|
|
|
|
Widget? serviceClass;
|
|
|
|
Widget? serviceClass;
|
|
|
|
|
|
|
|
|
|
|
|
String? transactionType = messageData["transactionType"]?.toString();
|
|
|
|
String? transactionType = messageData["transactionType"]?.toString();
|
|
|
|
|
|
|
|
bool IsOldNotification = messageData["IsOldNotification"]?.toString() == null;
|
|
|
|
|
|
|
|
|
|
|
|
if (transactionType == null) {
|
|
|
|
if (transactionType == null) {
|
|
|
|
return;
|
|
|
|
return;
|
|
|
|
@ -142,6 +143,40 @@ class FirebaseNotificationManger {
|
|
|
|
return;
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (IsOldNotification) {
|
|
|
|
|
|
|
|
switch (transactionType) {
|
|
|
|
|
|
|
|
case "1":
|
|
|
|
|
|
|
|
serviceClass = PpmDetailsPage(requestId: int.parse(messageData["requestNumber"].toString()));
|
|
|
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
case "3":
|
|
|
|
|
|
|
|
serviceClass = CMDetailPage(requestId: int.parse(messageData["requestNumber"].toString()), moduleId: 1);
|
|
|
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
case "8":
|
|
|
|
|
|
|
|
serviceClass = CMDetailPage(requestId: int.parse(messageData["requestNumber"].toString()), moduleId: 1);
|
|
|
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
case "11":
|
|
|
|
|
|
|
|
serviceClass = CMDetailPage(requestId: int.parse(messageData["requestNumber"].toString()), moduleId: 1);
|
|
|
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
case "7":
|
|
|
|
|
|
|
|
serviceClass = DeviceTransferDetails(model: DeviceTransfer(id: int.parse(messageData["requestNumber"].toString())), moduleId: 3);
|
|
|
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
case "9":
|
|
|
|
|
|
|
|
serviceClass = GasRefillDetailsPage(
|
|
|
|
|
|
|
|
priority: messageData["priority"],
|
|
|
|
|
|
|
|
date: messageData["createdOn"],
|
|
|
|
|
|
|
|
moduleId: 2,
|
|
|
|
|
|
|
|
model: GasRefillModel(id: int.parse(messageData["requestNumber"].toString())),
|
|
|
|
|
|
|
|
);
|
|
|
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
case "12":
|
|
|
|
|
|
|
|
serviceClass = RecurrentWorkOrderView(taskId: int.parse(messageData["requestNumber"].toString()));
|
|
|
|
|
|
|
|
case "17":
|
|
|
|
|
|
|
|
serviceClass = SurveyPage(surveyId: int.parse(messageData["requestNumber"].toString()));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
default:
|
|
|
|
|
|
|
|
serviceClass = const Scaffold(appBar: DefaultAppBar(), body: Center(child: NoDataFound()));
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
} else {
|
|
|
|
switch (transactionType) {
|
|
|
|
switch (transactionType) {
|
|
|
|
case "1":
|
|
|
|
case "1":
|
|
|
|
serviceClass = CMDetailPage(requestId: int.parse(messageData["requestNumber"].toString()), moduleId: 1);
|
|
|
|
serviceClass = CMDetailPage(requestId: int.parse(messageData["requestNumber"].toString()), moduleId: 1);
|
|
|
|
@ -208,6 +243,7 @@ class FirebaseNotificationManger {
|
|
|
|
default:
|
|
|
|
default:
|
|
|
|
serviceClass = const Scaffold(appBar: DefaultAppBar(), body: Center(child: NoDataFound()));
|
|
|
|
serviceClass = const Scaffold(appBar: DefaultAppBar(), body: Center(child: NoDataFound()));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
Navigator.of(context).push(MaterialPageRoute(builder: (_) => serviceClass!));
|
|
|
|
Navigator.of(context).push(MaterialPageRoute(builder: (_) => serviceClass!));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|