survey notification finalized.

design_3.0_cx_module
Sikander Saleem 2 weeks ago
parent 186987c5ce
commit c5b4325aec

@ -9,6 +9,7 @@ import 'package:test_sa/controllers/notification/notification_manger.dart';
import 'package:test_sa/models/device/device_transfer.dart';
import 'package:test_sa/models/new_models/gas_refill_model.dart';
import 'package:test_sa/modules/cm_module/views/service_request_detail_main_view.dart';
import 'package:test_sa/modules/cx_module/survey/survey_page.dart';
import 'package:test_sa/modules/pm_module/ppm_wo/ppm_details_page.dart';
import 'package:test_sa/modules/pm_module/recurrent_wo/recurrent_work_order_view.dart';
import 'package:test_sa/views/pages/device_transfer/device_transfer_details.dart';
@ -120,6 +121,9 @@ class FirebaseNotificationManger {
break;
case "12":
serviceClass = RecurrentWorkOrderView(taskId: int.parse(messageData["requestNumber"].toString()));
case "17":
serviceClass = SurveyPage(surveyId: int.parse(messageData["requestNumber"].toString()));
//Didn't handle task request yet...
// case 6:
// serviceClass = TaskRequestDetailsView(

@ -13,7 +13,7 @@ class SystemNotificationModel {
String? modifiedOn;
String? priorityName;
String? statusName;
int ? transactionType;
int? transactionType;
SystemNotificationModel(
{this.userId,
@ -29,7 +29,7 @@ class SystemNotificationModel {
this.createdOn,
this.modifiedOn,
this.priorityName,
this.transactionType,
this.transactionType,
this.statusName});
SystemNotificationModel.fromJson(Map<String, dynamic>? json) {

@ -85,12 +85,6 @@ class _ServiceRequestDetailMainState extends State<ServiceRequestDetailMain> {
Navigator.pop(context);
},
actions: [
IconButton(
icon: const Icon(Icons.feedback_rounded),
onPressed: () {
Navigator.push(context, CupertinoPageRoute(builder: (context) => SurveyPage(moduleId: 1, requestId: widget.requestId, surveyId: 5)));
},
),
Selector<ServiceRequestDetailProvider, bool>(
selector: (_, myModel) => myModel.isLoading, // Selects only the userName
builder: (_, isLoading, __) {

@ -18,11 +18,13 @@ import 'package:test_sa/new_views/common_widgets/default_app_bar.dart';
import 'survey_provider.dart';
class SurveyPage extends StatefulWidget {
int moduleId;
int requestId;
// int moduleId;
// int requestId;
int surveyId;
SurveyPage({Key? key, required this.moduleId, required this.requestId, required this.surveyId}) : super(key: key);
SurveyPage({Key? key,
// required this.moduleId, required this.requestId,
required this.surveyId}) : super(key: key);
@override
_SurveyPageState createState() {

@ -37,12 +37,11 @@ class _NotificationsPageState extends State<NotificationsPage> with TickerProvid
stateCode: _notificationsProvider.stateCode,
onRefresh: () async {
_notificationsProvider.reset();
await _notificationsProvider.getSystemNotifications(
user: _userProvider.user!,resetProvider: true
await _notificationsProvider.getSystemNotifications(user: _userProvider.user!, resetProvider: true
// host: _settingProvider.host,
// hospitalId: _userProvider.user.clientId,
);
// host: _settingProvider.host,
// hospitalId: _userProvider.user.clientId,
);
},
child: NotificationsList(
nextPage: _notificationsProvider.nextPage,

@ -28,14 +28,14 @@ class NotificationItem extends StatelessWidget {
label: notification.priorityName,
textColor: AppColor.getRequestStatusTextColorByName(context, notification.priorityName!),
backgroundColor: AppColor.getRequestStatusColorByName(context, notification.priorityName!),
).toShimmer(isShow: isLoading,context: context),
).toShimmer(isShow: isLoading, context: context),
8.width,
if ((notification.statusName ?? "").isNotEmpty && notification.sourceName != "Asset Transfer")
StatusLabel(
label: notification.statusName ?? "",
textColor: AppColor.getRequestStatusTextColorByName(context, notification.statusName ?? ""),
backgroundColor: AppColor.getRequestStatusColorByName(context, notification.statusName ?? ""),
).toShimmer(isShow: isLoading,context: context),
).toShimmer(isShow: isLoading, context: context),
],
),
8.height,
@ -47,7 +47,7 @@ class NotificationItem extends StatelessWidget {
style: AppTextStyles.heading6.copyWith(
color: context.isDark ? AppColor.neutral30 : AppColor.neutral50,
),
).toShimmer(isShow: isLoading,context: context).expanded,
).toShimmer(isShow: isLoading, context: context).expanded,
8.width,
Text(
notification.createdOn?.toServiceRequestCardFormat ?? "",
@ -55,7 +55,7 @@ class NotificationItem extends StatelessWidget {
style: AppTextStyles.tinyFont.copyWith(
color: context.isDark ? AppColor.neutral20 : AppColor.neutral50,
),
).toShimmer(isShow: isLoading,context: context),
).toShimmer(isShow: isLoading, context: context),
],
),
Text(
@ -63,7 +63,7 @@ class NotificationItem extends StatelessWidget {
style: AppTextStyles.bodyText2.copyWith(
color: context.isDark ? AppColor.neutral10 : const Color(0xFF757575),
),
).toShimmer(isShow: isLoading,context: context),
).toShimmer(isShow: isLoading, context: context),
],
).onPress(() {
onPressed(notification);

Loading…
Cancel
Save