survey question cont.

design_3.0_cx_module
Sikander Saleem 3 weeks ago
parent bcfa23bad3
commit 1cc5ebd9fb

@ -8,9 +8,9 @@ class URLs {
static const host1 = "https://atomsmuat.hmg.com"; // local UAT url
// static const host1 = "http://10.201.111.125:9495"; // temporary Server UAT url
static String _baseUrl = "$_host/mobile";
// static String _baseUrl = "$_host/mobile";
// static final String _baseUrl = "$_host/v2/mobile"; // new V2 apis
static final String _baseUrl = "$_host/v2/mobile"; // new V2 apis
// static final String _baseUrl = "$_host/v4/mobile"; // for asset inventory on UAT
// static final String _baseUrl = "$_host/mobile"; // host local UAT
// static final String _baseUrl = "$_host/v3/mobile"; // v3 for production CM,PM,TM

@ -87,7 +87,7 @@ class _ServiceRequestDetailMainState extends State<ServiceRequestDetailMain> {
IconButton(
icon: const Icon(Icons.feedback_rounded),
onPressed: () {
Navigator.push(context, CupertinoPageRoute(builder: (context) => SurveyPage(moduleId: 1, requestId: widget.requestId)));
Navigator.push(context, CupertinoPageRoute(builder: (context) => SurveyPage(moduleId: 1, requestId: widget.requestId, surveyId: 6)));
},
),
IconButton(

@ -217,7 +217,7 @@ class ChatProvider with ChangeNotifier, DiagnosticableTreeMixin {
chatHubConnection = await getHubConnection();
await chatHubConnection.start();
if (kDebugMode) {
// logger.i("Hub Conn: Startedddddddd");
print("Hub Conn: Startedddddddd");
}
// chatHubConnection.on("OnDeliveredChatUserAsync", onMsgReceived);
// chatHubConnection.on("OnGetChatConversationCount", onNewChatConversion);
@ -231,7 +231,7 @@ class ChatProvider with ChangeNotifier, DiagnosticableTreeMixin {
HubConnection hub;
HttpConnectionOptions httpOp = HttpConnectionOptions(skipNegotiation: false, logMessageContent: true);
hub = HubConnectionBuilder()
.withUrl(URLs.chatHubUrlChat + "?UserId=AppState().chatDetails!.response!.id&source=Desktop&access_token=AppState().chatDetails!.response!.token", options: httpOp)
.withUrl("${URLs.chatHubUrl}?UserId=${chatLoginResponse!.userId}&source=Desktop&access_token=${chatLoginResponse!.token}", options: httpOp)
.withAutomaticReconnect(retryDelays: <int>[2000, 5000, 10000, 20000]).build();
return hub;
}
@ -246,7 +246,7 @@ class ChatProvider with ChangeNotifier, DiagnosticableTreeMixin {
// chatHubConnection.on("OnUpdateUserChatHistoryWindowsAsync", updateChatHistoryWindow);
// chatHubConnection.on("OnGetUserChatHistoryNotDeliveredAsync", chatNotDelivered);
// chatHubConnection.on("OnUpdateUserChatHistoryStatusAsync", updateUserChatStatus);
chatHubConnection.on("OnGetGroupUserStatusAsync", getGroupUserStatus);
// chatHubConnection.on("OnGetGroupUserStatusAsync", getGroupUserStatus);
//
// {"type":1,"target":"","arguments":[[{"id":217869,"userName":"Sultan.Khan","email":"Sultan.Khan@cloudsolutions.com.sa","phone":null,"title":"Sultan.Khan","userStatus":1,"image":null,"unreadMessageCount":0,"userAction":3,"isPin":false,"isFav":false,"isAdmin":false,"rKey":null,"totalCount":0,"isHuaweiDevice":false,"deviceToken":null},{"id":15153,"userName":"Tamer.Fanasheh","email":"Tamer.F@cloudsolutions.com.sa","phone":null,"title":"Tamer Fanasheh","userStatus":2,"image":null,"unreadMessageCount":0,"userAction":3,"isPin":false,"isFav":false,"isAdmin":true,"rKey":null,"totalCount":0,"isHuaweiDevice":false,"deviceToken":null}]]}

@ -1,5 +1,6 @@
import 'package:flutter/material.dart';
import 'package:flutter/rendering.dart';
import 'package:provider/provider.dart';
import 'package:test_sa/extensions/context_extension.dart';
import 'package:test_sa/extensions/int_extensions.dart';
import 'package:test_sa/extensions/string_extensions.dart';
@ -12,11 +13,14 @@ import 'package:test_sa/new_views/common_widgets/app_filled_button.dart';
import 'package:test_sa/new_views/common_widgets/app_text_form_field.dart';
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 surveyId;
SurveyPage({Key? key, required this.moduleId, required this.requestId}) : super(key: key);
SurveyPage({Key? key, required this.moduleId, required this.requestId, required this.surveyId}) : super(key: key);
@override
_SurveyPageState createState() {
@ -35,8 +39,8 @@ class _SurveyPageState extends State<SurveyPage> {
getSurveyQuestion();
}
void getSurveyQuestion(){
void getSurveyQuestion() {
Provider.of<SurveyProvider>(context, listen: false).getQuestionnaire(widget.surveyId);
}
@override

Loading…
Cancel
Save