Merge branch 'progress_note' into 'development'

Progress note

See merge request Cloud_Solution/doctor_app_flutter!560
merge-requests/561/merge
Mohammad Aljammal 5 years ago
commit 61d5f886ed

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

@ -48,9 +48,7 @@ class DoctorReplyScreen extends StatelessWidget {
children: children:
model.listDoctorWorkingHoursTable.map((reply) { model.listDoctorWorkingHoursTable.map((reply) {
return InkWell( return InkWell(
onTap: reply.status != 2 onTap: () {
? null
: () {
Navigator.push( Navigator.push(
context, context,
MaterialPageRoute( 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/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/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/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/errors/dr_app_embedded_error.dart';
import 'package:doctor_app_flutter/widgets/shared/loader/gif_loader_dialog_utils.dart'; import 'package:doctor_app_flutter/widgets/shared/loader/gif_loader_dialog_utils.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
@ -171,6 +172,7 @@ class _ProgressNoteState extends State<ProgressNoteScreen> {
onTap: () async { onTap: () async {
showMyDialog( showMyDialog(
context: context, context: context,
actionName: "cancel",
confirmFun: () async { confirmFun: () async {
GifLoaderDialogUtils GifLoaderDialogUtils
.showMyDialog( .showMyDialog(
@ -241,7 +243,7 @@ class _ProgressNoteState extends State<ProgressNoteScreen> {
), ),
InkWell( InkWell(
onTap: () async { onTap: () async {
showMyDialog(context: context, confirmFun: () async{ showMyDialog(context: context, actionName: "verify",confirmFun: () async{
GifLoaderDialogUtils GifLoaderDialogUtils
.showMyDialog(context); .showMyDialog(context);
UpdateNoteReqModel reqModel = 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( showDialog(
context: context, context: context,
child: Center( child: Center(
@ -409,10 +411,7 @@ class _ProgressNoteState extends State<ProgressNoteScreen> {
.of(context) .of(context)
.size .size
.width * 0.8, .width * 0.8,
height: MediaQuery height: 200,
.of(context)
.size
.height * 0.5,
child: AppScaffold( child: AppScaffold(
isShowAppBar: false, isShowAppBar: false,
body: Container( body: Container(
@ -424,23 +423,36 @@ class _ProgressNoteState extends State<ProgressNoteScreen> {
crossAxisAlignment: CrossAxisAlignment.center, crossAxisAlignment: CrossAxisAlignment.center,
children: [ children: [
// SizedBox(height: 20,), // 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( Container(
padding: EdgeInsets.all(20), padding: EdgeInsets.all(20),
color: Colors.white, color: Colors.white,
child: Expanded(
child: AppText( child: AppText(
'Are you sure you want to do this action?', 'Are you sure you want $actionName this order?',
fontSize: 15, fontSize: 15,
textAlign: TextAlign.center, textAlign: TextAlign.center,
), ),
), ),
),
SizedBox(height: MediaQuery SizedBox(height: 8,),
.of(context) DividerWithSpacesAround(),
.size FractionallySizedBox(
.height * 0.2,), widthFactor: 0.75,
Row( child: Row(
mainAxisAlignment: MainAxisAlignment.center, mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [ children: [
FlatButton( FlatButton(
child: AppText( child: AppText(
@ -461,6 +473,7 @@ class _ProgressNoteState extends State<ProgressNoteScreen> {
}) })
], ],
),
) )
], ],
), ),

@ -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/patiant_info_model.dart';
import 'package:doctor_app_flutter/models/patient/progress_note_request.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/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/helpers.dart';
import 'package:doctor_app_flutter/util/translations_delegate_base.dart'; import 'package:doctor_app_flutter/util/translations_delegate_base.dart';
import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/app_scaffold_widget.dart';
@ -117,7 +118,7 @@ class _UpdateNoteOrderState extends State<UpdateNoteOrder> {
setState(() { setState(() {
isSubmitted = true; isSubmitted = true;
}); });
if (progressNoteController.text.isNotEmpty) { if (progressNoteController.text.trim().isNotEmpty) {
GifLoaderDialogUtils.showMyDialog(context); GifLoaderDialogUtils.showMyDialog(context);
Map profile = await sharedPref.getObj(DOCTOR_PROFILE); Map profile = await sharedPref.getObj(DOCTOR_PROFILE);
@ -159,7 +160,7 @@ class _UpdateNoteOrderState extends State<UpdateNoteOrder> {
if (widget.patientModel.state == ViewState.ErrorLocal) { if (widget.patientModel.state == ViewState.ErrorLocal) {
Helpers.showErrorToast( Helpers.showErrorToast(
Helpers.generateContactAdminMsg()); widget.patientModel.error );
} else { } else {
ProgressNoteRequest progressNoteRequest = ProgressNoteRequest progressNoteRequest =
ProgressNoteRequest( ProgressNoteRequest(
@ -173,9 +174,11 @@ class _UpdateNoteOrderState extends State<UpdateNoteOrder> {
await widget.patientModel.getPatientProgressNote( await widget.patientModel.getPatientProgressNote(
progressNoteRequest.toJson()); progressNoteRequest.toJson());
} }
GifLoaderDialogUtils.hideDialog(context); GifLoaderDialogUtils.hideDialog(context);
DrAppToastMsg.showSuccesToast("Your Order added Successfully");
Navigator.of(context).pop(); 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:flutter/material.dart';
import 'package:font_awesome_flutter/font_awesome_flutter.dart'; import 'package:font_awesome_flutter/font_awesome_flutter.dart';
import 'package:provider/provider.dart'; import 'package:provider/provider.dart';
import 'package:url_launcher/url_launcher.dart';
class DoctorReplyWidget extends StatefulWidget { class DoctorReplyWidget extends StatefulWidget {
final ListGtMyPatientsQuestions reply; final ListGtMyPatientsQuestions reply;
@ -104,6 +105,7 @@ class _DoctorReplyWidgetState extends State<DoctorReplyWidget> {
], ],
), ),
Row( Row(
crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
Expanded( Expanded(
child: AppText( child: AppText(
@ -113,6 +115,18 @@ class _DoctorReplyWidgetState extends State<DoctorReplyWidget> {
fontFamily: 'Poppins', fontFamily: 'Poppins',
), ),
), ),
Container(
margin: EdgeInsets.symmetric(horizontal: 4),
child: InkWell(
onTap: () {
launch("tel://" +widget.reply.mobileNumber);
},
child: Icon(
Icons.phone,
color: Colors.black87,
),
),
),
SizedBox( SizedBox(
width: 4, width: 4,
), ),
@ -220,7 +234,7 @@ class _DoctorReplyWidgetState extends State<DoctorReplyWidget> {
Container( Container(
width: MediaQuery.of(context).size.width * 0.5, width: MediaQuery.of(context).size.width * 0.5,
child: RichText( child: RichText(
maxLines: 2, maxLines: 3,
overflow: TextOverflow.ellipsis, overflow: TextOverflow.ellipsis,
text: new TextSpan( text: new TextSpan(
style: new TextStyle( style: new TextStyle(
@ -228,7 +242,7 @@ class _DoctorReplyWidgetState extends State<DoctorReplyWidget> {
color: Colors.black), color: Colors.black),
children: <TextSpan>[ children: <TextSpan>[
new TextSpan( new TextSpan(
text: TranslationBase.of(context).doctorResponse + " : ", text:"Patient Question :" ,//TranslationBase.of(context).doctorResponse + " : ",
style: style:
TextStyle(fontSize: 14, fontFamily: 'Poppins', color: Color(0xFF575757),fontWeight: FontWeight.bold)), TextStyle(fontSize: 14, fontFamily: 'Poppins', color: Color(0xFF575757),fontWeight: FontWeight.bold)),
new TextSpan( new TextSpan(
@ -244,10 +258,10 @@ class _DoctorReplyWidgetState extends State<DoctorReplyWidget> {
],) ],)
], ],
), ),
Container( // Container(
alignment: projectViewModel.isArabic?Alignment.centerLeft:Alignment.centerRight, // alignment: projectViewModel.isArabic?Alignment.centerLeft:Alignment.centerRight,
child: Icon(FontAwesomeIcons.arrowRight, // child: Icon(FontAwesomeIcons.arrowRight,
size: 20, color: Colors.black),) // size: 20, color: Colors.black),)
], ],
), ),
// onTap: onTap, // onTap: onTap,

Loading…
Cancel
Save