Merge branch 'development' of https://gitlab.com/Cloud_Solution/doctor_app_flutter into referral_in_patient

merge-requests/566/head
Mohammad Aljammal 5 years ago
commit 4bfca919ce

@ -322,4 +322,4 @@ SPEC CHECKSUMS:
PODFILE CHECKSUM: 649616dc336b3659ac6b2b25159d8e488e042b69
COCOAPODS: 1.10.1
COCOAPODS: 1.10.0.rc.1

@ -20,6 +20,7 @@ import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:font_awesome_flutter/font_awesome_flutter.dart';
import 'package:hexcolor/hexcolor.dart';
import 'package:url_launcher/url_launcher.dart';
class DoctorReplayChat extends StatelessWidget {
@ -107,7 +108,7 @@ class DoctorReplayChat extends StatelessWidget {
SizedBox(height: 30,),
Container(
// color: Color(0xFF2B353E),
width: MediaQuery.of(context).size.width * 0.8,
width: MediaQuery.of(context).size.width * 0.9,
padding: EdgeInsets.all(10),
decoration: BoxDecoration(
color: Color(0xFF2B353E),
@ -135,7 +136,7 @@ class DoctorReplayChat extends StatelessWidget {
width: 60,
height: 60,
child: Image.asset(
1 == 1
reply.gender == 1
? 'assets/images/male_avatar.png'
: 'assets/images/female_avatar.png',
fit: BoxFit.cover,
@ -144,7 +145,7 @@ class DoctorReplayChat extends StatelessWidget {
Divider(),
SizedBox(width: 10,),
Container(
width: MediaQuery.of(context).size.width * 0.30,
width: MediaQuery.of(context).size.width * 0.35,
child: AppText(
reply.patientName
.toString(),
@ -154,7 +155,19 @@ class DoctorReplayChat extends StatelessWidget {
fontWeight: FontWeight.bold,
// fontSize: 18
),
)
),
Container(
margin: EdgeInsets.symmetric(horizontal: 4),
child: InkWell(
onTap: () {
launch("tel://" +reply.mobileNumber);
},
child: Icon(
Icons.phone,
color: Colors.white,
),
),
),
],
),
Column(
@ -218,61 +231,61 @@ class DoctorReplayChat extends StatelessWidget {
),
),
Positioned(
bottom: 0,
child: Container(
width:MediaQuery.of(context).size.width * 1,
// height: MediaQuery.of(context).size.height * 0.12,
child: Column(
mainAxisSize: MainAxisSize.min,
children: <Widget>[
FractionallySizedBox(
child: Container(
child: TextFields(
borderRadius: 0,
hintText: TranslationBase
.of(context)
.typeHereToReply,
fontSize: 13.5,
suffixIcon: FontAwesomeIcons.arrowRight,
suffixIconColor: Colors.green,
onSuffixTap: ()async {
GifLoaderDialogUtils.showMyDialog(context);
await model.replay(msgController.text, reply);
if(model.state == ViewState.ErrorLocal) {
Helpers.showErrorToast("An error happened while you are replaying");
} else {
DrAppToastMsg.showSuccesToast("Thank you for your replay ");
await previousModel.getDoctorReply();
Navigator.pop(context);
}
GifLoaderDialogUtils.hideDialog(context);
},
// hintColor: Colors.black,
fontWeight: FontWeight.w600,
maxLines: 50,
minLines: 3,
controller: msgController,
validator: (value) {
if (value == null || value == "")
return TranslationBase.of(context)
.emptyMessage;
else
return null;
}),
),
),
],
),
),
)
// Positioned(
// bottom: 0,
// child: Container(
// width:MediaQuery.of(context).size.width * 1,
// // height: MediaQuery.of(context).size.height * 0.12,
// child: Column(
// mainAxisSize: MainAxisSize.min,
// children: <Widget>[
// FractionallySizedBox(
// child: Container(
//
// child: TextFields(
// borderRadius: 0,
// hintText: TranslationBase
// .of(context)
// .typeHereToReply,
// fontSize: 13.5,
//
// suffixIcon: FontAwesomeIcons.arrowRight,
// suffixIconColor: Colors.green,
// onSuffixTap: ()async {
// GifLoaderDialogUtils.showMyDialog(context);
// await model.replay(msgController.text, reply);
// if(model.state == ViewState.ErrorLocal) {
// Helpers.showErrorToast("An error happened while you are replaying");
// } else {
// DrAppToastMsg.showSuccesToast("Thank you for your replay ");
// await previousModel.getDoctorReply();
// Navigator.pop(context);
// }
// GifLoaderDialogUtils.hideDialog(context);
//
//
//
//
// },
// // hintColor: Colors.black,
// fontWeight: FontWeight.w600,
// maxLines: 50,
// minLines: 3,
// controller: msgController,
// validator: (value) {
// if (value == null || value == "")
// return TranslationBase.of(context)
// .emptyMessage;
// else
// return null;
// }),
//
// ),
// ),
// ],
// ),
// ),
// )
],

@ -48,9 +48,7 @@ class DoctorReplyScreen extends StatelessWidget {
children:
model.listDoctorWorkingHoursTable.map((reply) {
return InkWell(
onTap: reply.status != 2
? null
: () {
onTap: () {
Navigator.push(
context,
MaterialPageRoute(

@ -9,6 +9,7 @@ import 'package:doctor_app_flutter/util/date-utils.dart';
import 'package:doctor_app_flutter/util/translations_delegate_base.dart';
import 'package:doctor_app_flutter/widgets/patients/profile/add-order/addNewOrder.dart';
import 'package:doctor_app_flutter/widgets/patients/profile/patient-profile-header-new-design-app-bar.dart';
import 'package:doctor_app_flutter/widgets/shared/divider_with_spaces_around.dart';
import 'package:doctor_app_flutter/widgets/shared/errors/dr_app_embedded_error.dart';
import 'package:doctor_app_flutter/widgets/shared/loader/gif_loader_dialog_utils.dart';
import 'package:flutter/material.dart';
@ -171,6 +172,7 @@ class _ProgressNoteState extends State<ProgressNoteScreen> {
onTap: () async {
showMyDialog(
context: context,
actionName: "cancel",
confirmFun: () async {
GifLoaderDialogUtils
.showMyDialog(
@ -241,7 +243,7 @@ class _ProgressNoteState extends State<ProgressNoteScreen> {
),
InkWell(
onTap: () async {
showMyDialog(context: context, confirmFun: () async{
showMyDialog(context: context, actionName: "verify",confirmFun: () async{
GifLoaderDialogUtils
.showMyDialog(context);
UpdateNoteReqModel reqModel =
@ -400,7 +402,7 @@ class _ProgressNoteState extends State<ProgressNoteScreen> {
);
}
showMyDialog({BuildContext context, Function confirmFun, isCancel = true}) {
showMyDialog({BuildContext context, Function confirmFun, String actionName}) {
showDialog(
context: context,
child: Center(
@ -409,10 +411,7 @@ class _ProgressNoteState extends State<ProgressNoteScreen> {
.of(context)
.size
.width * 0.8,
height: MediaQuery
.of(context)
.size
.height * 0.5,
height: 200,
child: AppScaffold(
isShowAppBar: false,
body: Container(
@ -424,43 +423,57 @@ class _ProgressNoteState extends State<ProgressNoteScreen> {
crossAxisAlignment: CrossAxisAlignment.center,
children: [
// SizedBox(height: 20,),
SizedBox(height: 10,),
Row(
mainAxisAlignment: MainAxisAlignment.center,
children: [
AppText(
"Confirm", fontWeight: FontWeight.w600,
color: Colors.black,
fontSize: 16,),
],
),
SizedBox(height: 10,),
DividerWithSpacesAround(),
SizedBox(height: 12,),
Container(
padding: EdgeInsets.all(20),
color: Colors.white,
child: Expanded(
child: AppText(
'Are you sure you want to do this action?',
fontSize: 15,
textAlign: TextAlign.center,
),
child: AppText(
'Are you sure you want $actionName this order?',
fontSize: 15,
textAlign: TextAlign.center,
),
),
SizedBox(height: MediaQuery
.of(context)
.size
.height * 0.2,),
Row(
mainAxisAlignment: MainAxisAlignment.center,
children: [
FlatButton(
child: AppText(
"Cancel", fontWeight: FontWeight.w600,
color: Colors.black,
fontSize: 16,),//Text("Cancel"),
onPressed: () {
Navigator.of(context).pop();
}),
FlatButton(
child: AppText(
"Confirm", fontWeight: FontWeight.w600,
color: Colors.red.shade700,
fontSize: 16,), //Text("Confirm", ),
onPressed: () async {
await confirmFun();
Navigator.of(context).pop();
})
],
SizedBox(height: 8,),
DividerWithSpacesAround(),
FractionallySizedBox(
widthFactor: 0.75,
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
FlatButton(
child: AppText(
"Cancel", fontWeight: FontWeight.w600,
color: Colors.black,
fontSize: 16,),//Text("Cancel"),
onPressed: () {
Navigator.of(context).pop();
}),
FlatButton(
child: AppText(
"Confirm", fontWeight: FontWeight.w600,
color: Colors.red.shade700,
fontSize: 16,), //Text("Confirm", ),
onPressed: () async {
await confirmFun();
Navigator.of(context).pop();
})
],
),
)
],
),

@ -9,6 +9,7 @@ import 'package:doctor_app_flutter/models/doctor/doctor_profile_model.dart';
import 'package:doctor_app_flutter/models/patient/patiant_info_model.dart';
import 'package:doctor_app_flutter/models/patient/progress_note_request.dart';
import 'package:doctor_app_flutter/screens/patients/profile/soap_update/shared_soap_widgets/bottom_sheet_title.dart';
import 'package:doctor_app_flutter/util/dr_app_toast_msg.dart';
import 'package:doctor_app_flutter/util/helpers.dart';
import 'package:doctor_app_flutter/util/translations_delegate_base.dart';
import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart';
@ -117,7 +118,7 @@ class _UpdateNoteOrderState extends State<UpdateNoteOrder> {
setState(() {
isSubmitted = true;
});
if (progressNoteController.text.isNotEmpty) {
if (progressNoteController.text.trim().isNotEmpty) {
GifLoaderDialogUtils.showMyDialog(context);
Map profile = await sharedPref.getObj(DOCTOR_PROFILE);
@ -159,7 +160,7 @@ class _UpdateNoteOrderState extends State<UpdateNoteOrder> {
if (widget.patientModel.state == ViewState.ErrorLocal) {
Helpers.showErrorToast(
Helpers.generateContactAdminMsg());
widget.patientModel.error );
} else {
ProgressNoteRequest progressNoteRequest =
ProgressNoteRequest(
@ -173,9 +174,11 @@ class _UpdateNoteOrderState extends State<UpdateNoteOrder> {
await widget.patientModel.getPatientProgressNote(
progressNoteRequest.toJson());
}
GifLoaderDialogUtils.hideDialog(context);
DrAppToastMsg.showSuccesToast("Your Order added Successfully");
Navigator.of(context).pop();
} else {
Helpers.showErrorToast("You cant add only spaces");
}
}),
],

@ -11,6 +11,7 @@ import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:font_awesome_flutter/font_awesome_flutter.dart';
import 'package:provider/provider.dart';
import 'package:url_launcher/url_launcher.dart';
class DoctorReplyWidget extends StatefulWidget {
final ListGtMyPatientsQuestions reply;
@ -104,6 +105,7 @@ class _DoctorReplyWidgetState extends State<DoctorReplyWidget> {
],
),
Row(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Expanded(
child: AppText(
@ -113,6 +115,18 @@ class _DoctorReplyWidgetState extends State<DoctorReplyWidget> {
fontFamily: 'Poppins',
),
),
Container(
margin: EdgeInsets.symmetric(horizontal: 4),
child: InkWell(
onTap: () {
launch("tel://" +widget.reply.mobileNumber);
},
child: Icon(
Icons.phone,
color: Colors.black87,
),
),
),
SizedBox(
width: 4,
),
@ -220,7 +234,7 @@ class _DoctorReplyWidgetState extends State<DoctorReplyWidget> {
Container(
width: MediaQuery.of(context).size.width * 0.5,
child: RichText(
maxLines: 2,
maxLines: 3,
overflow: TextOverflow.ellipsis,
text: new TextSpan(
style: new TextStyle(
@ -228,7 +242,7 @@ class _DoctorReplyWidgetState extends State<DoctorReplyWidget> {
color: Colors.black),
children: <TextSpan>[
new TextSpan(
text: TranslationBase.of(context).doctorResponse + " : ",
text:"Patient Question :" ,//TranslationBase.of(context).doctorResponse + " : ",
style:
TextStyle(fontSize: 14, fontFamily: 'Poppins', color: Color(0xFF575757),fontWeight: FontWeight.bold)),
new TextSpan(
@ -244,10 +258,10 @@ class _DoctorReplyWidgetState extends State<DoctorReplyWidget> {
],)
],
),
Container(
alignment: projectViewModel.isArabic?Alignment.centerLeft:Alignment.centerRight,
child: Icon(FontAwesomeIcons.arrowRight,
size: 20, color: Colors.black),)
// Container(
// alignment: projectViewModel.isArabic?Alignment.centerLeft:Alignment.centerRight,
// child: Icon(FontAwesomeIcons.arrowRight,
// size: 20, color: Colors.black),)
],
),
// onTap: onTap,

Loading…
Cancel
Save