Merge branch 'fix_feedback' into 'development'

Fix feedback

See merge request Cloud_Solution/diplomatic-quarter!360
merge-requests/362/merge
Mohammad Aljammal 3 years ago
commit 10f4a30921

@ -1,5 +1,5 @@
# Uncomment this line to define a global platform for your project
# platform :ios, '11.0'
# platform :ios, '10.0'
# CocoaPods analytics sends network stats synchronously affecting flutter build latency.
ENV['COCOAPODS_DISABLE_STATS'] = 'true'

@ -220,7 +220,6 @@
9705A1C41CF9048500538489 /* Embed Frameworks */,
3B06AD1E1E4923F5004D2608 /* Thin Binary */,
EFDAD5E1235DCA1DB6187148 /* [CP] Embed Pods Frameworks */,
835BB6C21DD911F74065B670 /* [CP] Copy Pods Resources */,
);
buildRules = (
);
@ -320,23 +319,6 @@
shellPath = /bin/sh;
shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" embed_and_thin";
};
835BB6C21DD911F74065B670 /* [CP] Copy Pods Resources */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputFileListPaths = (
"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-resources-${CONFIGURATION}-input-files.xcfilelist",
);
name = "[CP] Copy Pods Resources";
outputFileListPaths = (
"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-resources-${CONFIGURATION}-output-files.xcfilelist",
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-resources.sh\"\n";
showEnvVarsInLog = 0;
};
9740EEB61CF901F6004384FC /* Run Script */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;

@ -13,7 +13,7 @@ class SickLeave {
int appointmentNo;
int admissionNo;
int actualDoctorRate;
String appointmentDate;
DateTime appointmentDate;
String clinicName;
String doctorImageURL;
String doctorName;
@ -80,7 +80,7 @@ class SickLeave {
appointmentNo = json['AppointmentNo'];
admissionNo = json['AdmissionNo'];
actualDoctorRate = json['ActualDoctorRate'];
appointmentDate = json['AppointmentDate'];
appointmentDate = DateUtil.convertStringToDate(json['AppointmentDate']);
clinicName = json['ClinicName'];
doctorImageURL = json['DoctorImageURL'];
doctorName = json['DoctorName'];

@ -4,6 +4,7 @@ import 'package:diplomaticquarterapp/config/shared_pref_kay.dart';
import 'package:diplomaticquarterapp/core/model/feedback/COC_items.dart';
import 'package:diplomaticquarterapp/core/model/feedback/request_insert_coc_item.dart';
import 'package:diplomaticquarterapp/core/service/base_service.dart';
import 'package:diplomaticquarterapp/models/Appointments/AppoimentAllHistoryResultList.dart';
import 'package:diplomaticquarterapp/pages/feedback/appointment_history.dart';
import 'package:diplomaticquarterapp/uitl/date_uitl.dart';
import 'package:diplomaticquarterapp/uitl/utils.dart';
@ -11,14 +12,14 @@ import 'package:diplomaticquarterapp/uitl/utils.dart';
class FeedbackService extends BaseService {
List<COCItem> cOCItemList = List();
RequestInsertCOCItem _requestInsertCOCItem = RequestInsertCOCItem();
List<AppointmentHistory> appointHistoryList = List();
List<AppoitmentAllHistoryResultList> appointHistoryList = List();
Future sendCOCItem(
{String title,
String details,
String cOCTypeName,
String attachment,
AppointmentHistory appointHistory}) async {
AppoitmentAllHistoryResultList appointHistory}) async {
hasError = false;
var languageID = await sharedPref.getStringWithDefaultValue(APP_LANGUAGE, 'ar');
@ -45,7 +46,7 @@ class FeedbackService extends BaseService {
if (appointHistory != null) {
body['AppoinmentNo'] = appointHistory.appointmentNo;
body['AppointmentDate'] = DateUtil.convertDateToString(appointHistory.appointmentDate);
body['AppointmentDate'] = appointHistory.appointmentDate;
body['ClinicID'] = appointHistory.clinicID;
body['ClinicName'] = appointHistory.clinicName;
body['DoctorID'] = appointHistory.doctorID;
@ -88,7 +89,7 @@ class FeedbackService extends BaseService {
onSuccess: (dynamic response, int statusCode) {
appointHistoryList = [];
response['AppoimentAllHistoryResultList'].forEach((appoint) {
appointHistoryList.add(AppointmentHistory.fromJson(appoint));
appointHistoryList.add(AppoitmentAllHistoryResultList.fromJson(appoint));
});
}, onFailure: (String error, int statusCode) {
hasError = true;

@ -2,6 +2,7 @@ import 'package:diplomaticquarterapp/core/enum/viewstate.dart';
import 'package:diplomaticquarterapp/core/model/feedback/COC_items.dart';
import 'package:diplomaticquarterapp/core/service/feedback/feedback_service.dart';
import 'package:diplomaticquarterapp/core/viewModels/base_view_model.dart';
import 'package:diplomaticquarterapp/models/Appointments/AppoimentAllHistoryResultList.dart';
import 'package:diplomaticquarterapp/pages/feedback/appointment_history.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:flutter/cupertino.dart';
@ -23,7 +24,7 @@ class FeedbackViewModel extends BaseViewModel {
List<COCItem> get cOCItemList => _feedbackService.cOCItemList;
List<AppointmentHistory> get appointHistoryList =>
List<AppoitmentAllHistoryResultList> get appointHistoryList =>
_feedbackService.appointHistoryList;
Future<bool> sendCOCItem(
@ -31,7 +32,7 @@ class FeedbackViewModel extends BaseViewModel {
String details,
String cOCTypeName,
String attachment,
AppointmentHistory appointHistory}) async {
AppoitmentAllHistoryResultList appointHistory}) async {
setState(ViewState.BusyLocal);
await _feedbackService.sendCOCItem(
title: title,

@ -2,6 +2,7 @@ import 'package:diplomaticquarterapp/config/size_config.dart';
import 'package:diplomaticquarterapp/core/model/labs/patient_lab_orders.dart';
import 'package:diplomaticquarterapp/core/model/prescriptions/prescription_report_enh.dart';
import 'package:diplomaticquarterapp/core/model/radiology/final_radiology.dart';
import 'package:diplomaticquarterapp/core/viewModels/feedback/feedback_view_model.dart';
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/models/Appointments/AppoimentAllHistoryResultList.dart';
import 'package:diplomaticquarterapp/models/Appointments/appoDetailsButtons.dart';
@ -685,7 +686,7 @@ class _AppointmentActionsState extends State<AppointmentActions> {
}
navigateToInsertComplaint() {
Navigator.push(context, FadePage(page: FeedbackHomePage()));
Navigator.push(context, FadePage(page: FeedbackHomePage(messageType: MessageType.ComplaintOnAnAppointment,appointment: widget.appo,)));
}
rateAppointment() {

@ -5,7 +5,7 @@ class AppointmentHistory {
int projectID;
int appointmentNo;
DateTime appointmentDate;
Null appointmentDateN;
dynamic appointmentDateN;
int appointmentType;
String bookDate;
int patientType;
@ -26,14 +26,14 @@ class AppointmentHistory {
String confirmedOn;
int arrivalChangedBy;
DateTime arrivedOn;
Null editedBy;
Null editedOn;
Null doctorName;
Null doctorNameN;
dynamic editedBy;
dynamic editedOn;
dynamic doctorName;
dynamic doctorNameN;
String statusDesc;
Null statusDescN;
dynamic statusDescN;
bool vitalStatus;
Null vitalSignAppointmentNo;
dynamic vitalSignAppointmentNo;
int episodeID;
int actualDoctorRate;
String clinicName;
@ -55,8 +55,8 @@ class AppointmentHistory {
bool isMedicalReportRequested;
bool isOnlineCheckedIN;
String latitude;
Null listHISGetContactLensPerscription;
Null listHISGetGlassPerscription;
dynamic listHISGetContactLensPerscription;
dynamic listHISGetGlassPerscription;
String longitude;
int nextAction;
int noOfPatientsRate;

@ -1,5 +1,7 @@
import 'dart:ui';
import 'package:diplomaticquarterapp/core/viewModels/feedback/feedback_view_model.dart';
import 'package:diplomaticquarterapp/models/Appointments/AppoimentAllHistoryResultList.dart';
import 'package:diplomaticquarterapp/pages/feedback/send_feedback_page.dart';
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
@ -10,6 +12,10 @@ import 'package:flutter/material.dart';
import 'status_feedback_page.dart';
class FeedbackHomePage extends StatefulWidget {
final AppoitmentAllHistoryResultList appointment;
final MessageType messageType;
const FeedbackHomePage({Key key, this.appointment, this.messageType= MessageType.NON}) : super(key: key);
@override
_FeedbackHomePageState createState() => _FeedbackHomePageState();
}
@ -105,7 +111,7 @@ class _FeedbackHomePageState extends State<FeedbackHomePage>
child: TabBarView(
physics: BouncingScrollPhysics(),
controller: _tabController,
children: <Widget>[SendFeedbackPage(), StatusFeedbackPage()],
children: <Widget>[SendFeedbackPage(appointment: widget.appointment,messageType: widget.messageType,), StatusFeedbackPage()],
),
)
],

@ -1,6 +1,8 @@
import 'package:diplomaticquarterapp/config/config.dart';
import 'package:diplomaticquarterapp/core/enum/viewstate.dart';
import 'package:diplomaticquarterapp/core/viewModels/feedback/feedback_view_model.dart';
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/models/Appointments/AppoimentAllHistoryResultList.dart';
import 'package:diplomaticquarterapp/pages/base/base_view.dart';
import 'package:diplomaticquarterapp/services/robo_search/event_provider.dart';
import 'package:diplomaticquarterapp/uitl/app_toast.dart';
@ -20,6 +22,7 @@ import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:font_awesome_flutter/font_awesome_flutter.dart';
import 'package:permission_handler/permission_handler.dart';
import 'package:provider/provider.dart';
import 'package:speech_to_text/speech_recognition_error.dart';
import 'dart:convert';
import 'dart:io';
@ -27,6 +30,10 @@ import 'appointment_history.dart';
import 'package:speech_to_text/speech_to_text.dart' as stt;
class SendFeedbackPage extends StatefulWidget {
final AppoitmentAllHistoryResultList appointment;
final MessageType messageType;
const SendFeedbackPage({Key key, this.appointment, this.messageType = MessageType.NON}) : super(key: key);
@override
_SendFeedbackPageState createState() => _SendFeedbackPageState();
}
@ -36,7 +43,7 @@ class _SendFeedbackPageState extends State<SendFeedbackPage> {
TextEditingController messageController = TextEditingController();
List<String> images = [];
String title;
AppointmentHistory appointHistory;
AppoitmentAllHistoryResultList appointHistory;
bool isShowListAppointHistory = true;
String message;
final formKey = GlobalKey<FormState>();
@ -73,17 +80,23 @@ class _SendFeedbackPageState extends State<SendFeedbackPage> {
setMessageType(MessageType messageType) {
setState(() {
this.messageType = messageType;
this.appointHistory = widget.appointment;
});
}
@override
void initState() {
setState(() {
this.messageType = widget.messageType;
this.appointHistory = widget.appointment;
});
requestPermissions();
super.initState();
}
@override
Widget build(BuildContext context) {
ProjectViewModel projectViewModel = Provider.of(context);
return BaseView<FeedbackViewModel>(
allowAny: true,
builder: (_, model, widget) => AppScaffold(
@ -144,14 +157,59 @@ class _SendFeedbackPageState extends State<SendFeedbackPage> {
InkWell(
onTap: () {
setState(() {
isShowListAppointHistory = true;
isShowListAppointHistory = true;
});
},
child: Container(
margin: EdgeInsets.all(8.0),
color: Colors.white,
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.circular(8)
),
child: Row(
children: <Widget>[
Container(
width: projectViewModel.isArabic ? 27 : 20,
height: projectViewModel.isArabic ? 105 : 90,
decoration: BoxDecoration(
//Colors.red[900] Color(0xff404545)
color: appointHistory.isLiveCareAppointment
? Color(0xff404545)
: !appointHistory.isInOutPatient
? Colors.red[900]
: Theme.of(context).primaryColor,
borderRadius: BorderRadius.only(
topLeft: projectViewModel.isArabic
? Radius.circular(0)
: Radius.circular(8),
bottomLeft: projectViewModel.isArabic
? Radius.circular(0)
: Radius.circular(8),
topRight: projectViewModel.isArabic
? Radius.circular(8)
: Radius.circular(0),
bottomRight: projectViewModel.isArabic
? Radius.circular(8)
: Radius.circular(0),
),
),
child: RotatedBox(
quarterTurns: 3,
child: Center(
child: Text(
appointHistory.isLiveCareAppointment
? TranslationBase.of(context).liveCare.toUpperCase()
: !appointHistory.isInOutPatient
? TranslationBase.of(context)
.inPatient
.toUpperCase()
: TranslationBase.of(context)
.outpatient
.toUpperCase(),
style: TextStyle(color: Colors.white,fontSize: 12),
),
)),
),
Expanded(
flex: 4,
child: Column(
@ -182,9 +240,7 @@ class _SendFeedbackPageState extends State<SendFeedbackPage> {
),
Texts(
DateUtil
.getMonthDayYearDateFormatted(
appointHistory
.appointmentDate),
.getMonthDayYearDateFormatted(DateUtil.convertStringToDate(appointHistory.appointmentDate)),
variant: 'caption3',
),
StarRating(
@ -278,10 +334,7 @@ class _SendFeedbackPageState extends State<SendFeedbackPage> {
bold: true,
),
Texts(
DateUtil.getMonthDayYearDateFormatted(model
.appointHistoryList[
index]
.appointmentDate),
DateUtil.getMonthDayYearDateFormatted(DateUtil.convertStringToDate(model.appointHistoryList[index].appointmentDate)),
variant: 'caption3',
),
StarRating(

@ -47,7 +47,7 @@ class _PatientSickLeavePageState extends State<PatientSickLeavePage> {
itemBuilder: (context, index) => DoctorCard(
isLiveCareAppointment: model.sickLeaveList[index].isLiveCareAppointment,
name: model.sickLeaveList[index].doctorName,
date:projectViewModel.isArabic? DateUtil.getMonthDayYearDateFormattedAr(model.sickLeaveList[index].requestDate):DateUtil.getMonthDayYearDateFormatted(model.sickLeaveList[index].requestDate),
date:projectViewModel.isArabic? DateUtil.getMonthDayYearDateFormattedAr(model.sickLeaveList[index].appointmentDate):DateUtil.getMonthDayYearDateFormatted(model.sickLeaveList[index].appointmentDate),
profileUrl: model.sickLeaveList[index].doctorImageURL,
rat: model.sickLeaveList[index].actualDoctorRate.toDouble(),
subName: model.sickLeaveList[index].projectName,

Loading…
Cancel
Save