Merge branch 'replay_status' into 'development'

change the status of replay

See merge request Cloud_Solution/doctor_app_flutter!811
merge-requests/813/merge
Mohammad Aljammal 5 years ago
commit fdc4e52980

@ -699,9 +699,14 @@ const Map<String, Map<String, String>> localizedValues = {
"textCopiedSuccessfully": {"en": "Text copied successfully", "ar": "تم نسخ النص بنجاح"}, "textCopiedSuccessfully": {"en": "Text copied successfully", "ar": "تم نسخ النص بنجاح"},
"roomNo": {"en": "Room No", "ar": "رقم الغرفة"}, "roomNo": {"en": "Room No", "ar": "رقم الغرفة"},
"replayCallStatus": {"en": "Called", "ar": "تم الاتصال"}, "replayCallStatus": {"en": "Called", "ar": "تم الاتصال"},
"patientArrived": {"en": "Patient Arrived", "ar": "تم الاتصال"}, "patientArrived": {"en": "Patient Arrived", "ar": "وصل المريض"},
"calledAndNoResponse": {"en": "Called And No Response", "ar": "تم الاتصال"}, "calledAndNoResponse": {"en": "Called And No Response", "ar": "تم الاتصال ولا يوجد رد"},
"underProcess": {"en": "Under Process", "ar": "تم الاتصال"}, "underProcess": {"en": "Under Process", "ar": "تحت التجهيز"},
"textResponse": {"en": "Text Response", "ar": "تم الاتصال"}, "textResponse": {"en": "Text Response", "ar": "استجابة النص"
}
,
"requestType":{
"en":"Request Type",
"ar":"نوع الطلب"},
"special": {"en": "Special", "ar": "خاص"} "special": {"en": "Special", "ar": "خاص"}
}; };

@ -1,7 +1,5 @@
import 'package:doctor_app_flutter/util/date-utils.dart';
class ListGtMyPatientsQuestions { class ListGtMyPatientsQuestions {
Null rowID;
String setupID; String setupID;
int projectID; int projectID;
int transactionNo; int transactionNo;
@ -9,7 +7,7 @@ class ListGtMyPatientsQuestions {
int patientID; int patientID;
int doctorID; int doctorID;
int requestType; int requestType;
DateTime requestDate; String requestDate;
String requestTime; String requestTime;
String remarks; String remarks;
int status; int status;
@ -26,12 +24,18 @@ class ListGtMyPatientsQuestions {
int infoStatus; int infoStatus;
String infoDesc; String infoDesc;
String doctorResponse; String doctorResponse;
dynamic responseDate;
int memberID;
String memberName;
String memberNameN;
String age; String age;
String genderDescription; String genderDescription;
bool isVidaCall; bool isVidaCall;
String requestTypeDescription;
ListGtMyPatientsQuestions( ListGtMyPatientsQuestions(
{this.setupID, {this.rowID,
this.setupID,
this.projectID, this.projectID,
this.transactionNo, this.transactionNo,
this.patientType, this.patientType,
@ -55,11 +59,17 @@ class ListGtMyPatientsQuestions {
this.infoStatus, this.infoStatus,
this.infoDesc, this.infoDesc,
this.doctorResponse, this.doctorResponse,
this.responseDate,
this.memberID,
this.memberName,
this.memberNameN,
this.age, this.age,
this.genderDescription, this.genderDescription,
this.isVidaCall}); this.isVidaCall,
this.requestTypeDescription});
ListGtMyPatientsQuestions.fromJson(Map<String, dynamic> json) { ListGtMyPatientsQuestions.fromJson(Map<String, dynamic> json) {
rowID = json['RowID'];
setupID = json['SetupID']; setupID = json['SetupID'];
projectID = json['ProjectID']; projectID = json['ProjectID'];
transactionNo = json['TransactionNo']; transactionNo = json['TransactionNo'];
@ -67,7 +77,7 @@ class ListGtMyPatientsQuestions {
patientID = json['PatientID']; patientID = json['PatientID'];
doctorID = json['DoctorID']; doctorID = json['DoctorID'];
requestType = json['RequestType']; requestType = json['RequestType'];
requestDate = AppDateUtils.convertStringToDate(json['RequestDate']) ; requestDate = json['RequestDate'];
requestTime = json['RequestTime']; requestTime = json['RequestTime'];
remarks = json['Remarks']; remarks = json['Remarks'];
status = json['Status']; status = json['Status'];
@ -84,13 +94,19 @@ class ListGtMyPatientsQuestions {
infoStatus = json['InfoStatus']; infoStatus = json['InfoStatus'];
infoDesc = json['InfoDesc']; infoDesc = json['InfoDesc'];
doctorResponse = json['DoctorResponse']; doctorResponse = json['DoctorResponse'];
responseDate = json['ResponseDate'];
memberID = json['MemberID'];
memberName = json['MemberName'];
memberNameN = json['MemberNameN'];
age = json['Age']; age = json['Age'];
genderDescription = json['GenderDescription']; genderDescription = json['GenderDescription'];
isVidaCall = json['IsVidaCall']; isVidaCall = json['IsVidaCall'];
requestTypeDescription = json['RequestTypeDescription'];
} }
Map<String, dynamic> toJson() { Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>(); final Map<String, dynamic> data = new Map<String, dynamic>();
data['RowID'] = this.rowID;
data['SetupID'] = this.setupID; data['SetupID'] = this.setupID;
data['ProjectID'] = this.projectID; data['ProjectID'] = this.projectID;
data['TransactionNo'] = this.transactionNo; data['TransactionNo'] = this.transactionNo;
@ -115,11 +131,14 @@ class ListGtMyPatientsQuestions {
data['InfoStatus'] = this.infoStatus; data['InfoStatus'] = this.infoStatus;
data['InfoDesc'] = this.infoDesc; data['InfoDesc'] = this.infoDesc;
data['DoctorResponse'] = this.doctorResponse; data['DoctorResponse'] = this.doctorResponse;
data['ResponseDate'] = this.responseDate;
data['MemberID'] = this.memberID;
data['MemberName'] = this.memberName;
data['MemberNameN'] = this.memberNameN;
data['Age'] = this.age; data['Age'] = this.age;
data['GenderDescription'] = this.genderDescription; data['GenderDescription'] = this.genderDescription;
data['IsVidaCall'] = this.isVidaCall; data['IsVidaCall'] = this.isVidaCall;
data['RequestTypeDescription'] = this.requestTypeDescription;
return data; return data;
} }
} }

@ -295,14 +295,14 @@ class _DoctorReplayChatState extends State<DoctorReplayChat> {
crossAxisAlignment: CrossAxisAlignment.end, crossAxisAlignment: CrossAxisAlignment.end,
children: [ children: [
AppText( AppText(
widget.reply.createdOn !=null?AppDateUtils.getDayMonthYearDateFormatted(AppDateUtils.getDateTimeFromServerFormat(widget.reply.createdOn)):AppDateUtils.getDayMonthYearDateFormatted(DateTime.now()), widget.reply.responseDate !=null?AppDateUtils.getDayMonthYearDateFormatted(AppDateUtils.getDateTimeFromServerFormat(widget.reply.responseDate)):AppDateUtils.getDayMonthYearDateFormatted(DateTime.now()),
fontWeight: FontWeight fontWeight: FontWeight
.w500, .w500,
color: Color(0xFF2B353E), color: Color(0xFF2B353E),
fontSize: SizeConfig.getTextMultiplierBasedOnWidth() *2.8, fontSize: SizeConfig.getTextMultiplierBasedOnWidth() *2.8,
), ),
AppText( AppText(
widget.reply.createdOn !=null?AppDateUtils.getHour(AppDateUtils.getDateTimeFromServerFormat(widget.reply.createdOn)):AppDateUtils.getHour(DateTime.now()), widget.reply.responseDate !=null?AppDateUtils.getHour(AppDateUtils.getDateTimeFromServerFormat(widget.reply.responseDate)):AppDateUtils.getHour(DateTime.now()),
fontSize: SizeConfig.getTextMultiplierBasedOnWidth() *2.8, fontSize: SizeConfig.getTextMultiplierBasedOnWidth() *2.8,
fontFamily: 'Poppins', fontFamily: 'Poppins',
color: Color(0xFF2B353E), color: Color(0xFF2B353E),

@ -1101,6 +1101,8 @@ class TranslationBase {
String get underProcess => localizedValues['underProcess'][locale.languageCode]; String get underProcess => localizedValues['underProcess'][locale.languageCode];
String get textResponse => localizedValues['textResponse'][locale.languageCode]; String get textResponse => localizedValues['textResponse'][locale.languageCode];
String get special => localizedValues['special'][locale.languageCode]; String get special => localizedValues['special'][locale.languageCode];
String get requestType => localizedValues['requestType'][locale.languageCode];
} }
class TranslationBaseDelegate extends LocalizationsDelegate<TranslationBase> { class TranslationBaseDelegate extends LocalizationsDelegate<TranslationBase> {

@ -8,6 +8,7 @@ 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_texts_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart';
import 'package:doctor_app_flutter/widgets/shared/card_with_bg_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/card_with_bg_widget.dart';
import 'package:doctor_app_flutter/widgets/shared/user-guid/CusomRow.dart';
import 'package:flutter/cupertino.dart'; import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:provider/provider.dart'; import 'package:provider/provider.dart';
@ -31,12 +32,9 @@ class _DoctorReplyWidgetState extends State<DoctorReplyWidget> {
return Container( return Container(
child: CardWithBgWidget( child: CardWithBgWidget(
bgColor: bgColor:
widget.reply.infoStatus == 4 widget.reply.status == 2 ? Colors.green[600] : Color(0xFFD02127),
? IN_PROGRESS_COLOR
: widget.reply.infoStatus == 3 ?Color(0xFFD02127): Colors.green[600],
hasBorder: false, hasBorder: false,
widget: Container( widget: Container(
// padding: EdgeInsets.only(left: 20, right: 0, bottom: 0),
child: InkWell( child: InkWell(
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
@ -51,12 +49,15 @@ class _DoctorReplyWidgetState extends State<DoctorReplyWidget> {
color: Colors.black), color: Colors.black),
children: <TextSpan>[ children: <TextSpan>[
new TextSpan( new TextSpan(
text: widget.reply.infoStatus ==1? TranslationBase.of(context).replayCallStatus:widget.reply.infoStatus ==2? TranslationBase.of(context).patientArrived:widget.reply.infoStatus ==3? TranslationBase.of(context).calledAndNoResponse:widget.reply.infoStatus ==4? TranslationBase.of(context).underProcess:widget.reply.infoStatus ==6? TranslationBase.of(context).textResponse:'' ,//widget.reply.status==2 ? "Active":widget.reply.status==1?"Hold":"Cancelled",//TranslationBase.of(context).replied :TranslationBase.of(context).unReplied , text: widget.reply.status == 2
? TranslationBase.of(context).active
: widget.reply.status == 1
? TranslationBase.of(context).onHold
: TranslationBase.of(context).cancelled,
style: TextStyle( style: TextStyle(
color: widget.reply.infoStatus == 4 color: widget.reply.status == 2
? IN_PROGRESS_COLOR ? Colors.green[600]
: widget.reply.infoStatus == 3 ?Color(0xFFD02127): Colors.green[600], : Color(0xFFD02127),
fontWeight: FontWeight.w700, fontWeight: FontWeight.w700,
fontFamily: 'Poppins', fontFamily: 'Poppins',
fontSize: 2.0 * SizeConfig.textMultiplier)), fontSize: 2.0 * SizeConfig.textMultiplier)),
@ -73,7 +74,7 @@ class _DoctorReplyWidgetState extends State<DoctorReplyWidget> {
.toString() + .toString() +
" " + " " +
AppDateUtils.getMonth( AppDateUtils.getMonth(
AppDateUtils.getDateTimeFromServerFormat( AppDateUtils.getDateTimeFromServerFormat(
widget.reply.createdOn) widget.reply.createdOn)
.month) .month)
.toString() .toString()
@ -88,18 +89,17 @@ class _DoctorReplyWidgetState extends State<DoctorReplyWidget> {
), ),
AppText( AppText(
AppDateUtils.getDateTimeFromServerFormat( AppDateUtils.getDateTimeFromServerFormat(
widget.reply.createdOn) widget.reply.createdOn)
.hour .hour
.toString() .toString() +
+ ":"+ ":" +
AppDateUtils.getDateTimeFromServerFormat( AppDateUtils.getDateTimeFromServerFormat(
widget.reply.createdOn) widget.reply.createdOn)
.minute .minute
.toString(), .toString(),
fontFamily: 'Poppins', fontFamily: 'Poppins',
fontWeight: FontWeight.w600, fontWeight: FontWeight.w600,
) )
], ],
), ),
], ],
@ -109,7 +109,7 @@ class _DoctorReplyWidgetState extends State<DoctorReplyWidget> {
children: [ children: [
Expanded( Expanded(
child: AppText( child: AppText(
Helpers.capitalize( widget.reply.patientName), Helpers.capitalize(widget.reply.patientName),
fontSize: SizeConfig.textMultiplier * 2.5, fontSize: SizeConfig.textMultiplier * 2.5,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
fontFamily: 'Poppins', fontFamily: 'Poppins',
@ -119,7 +119,7 @@ class _DoctorReplyWidgetState extends State<DoctorReplyWidget> {
margin: EdgeInsets.symmetric(horizontal: 4), margin: EdgeInsets.symmetric(horizontal: 4),
child: InkWell( child: InkWell(
onTap: () { onTap: () {
launch("tel://" +widget.reply.mobileNumber); launch("tel://" + widget.reply.mobileNumber);
}, },
child: Icon( child: Icon(
Icons.phone, Icons.phone,
@ -163,7 +163,6 @@ class _DoctorReplyWidgetState extends State<DoctorReplyWidget> {
fit: BoxFit.cover, fit: BoxFit.cover,
), ),
), ),
], ],
), ),
SizedBox( SizedBox(
@ -173,89 +172,91 @@ class _DoctorReplyWidgetState extends State<DoctorReplyWidget> {
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
// SizedBox(height: 10,), // SizedBox(height: 10,),
Row( Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween, mainAxisAlignment: MainAxisAlignment.spaceBetween,
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
Column( Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [
children: [ CustomRow(
label: TranslationBase.of(context).fileNumber,
value: widget.reply.patientID.toString(),
),
RichText( CustomRow(
text: new TextSpan( label: TranslationBase.of(context).age + " : ",
style: new TextStyle( value:
fontSize: 2.0 * SizeConfig.textMultiplier, "${AppDateUtils.getAgeByBirthday(widget.reply.dateofBirth, context)}",
color: Colors.black),
children: <TextSpan>[
new TextSpan(
text: TranslationBase.of(context).fileNumber,
style: TextStyle(
fontSize: 14,color: Color(0xFF575757),fontWeight: FontWeight.bold, fontFamily: 'Poppins')),
new TextSpan(
text: widget.reply.patientID.toString(),
style: TextStyle(
fontWeight: FontWeight.w700,
fontFamily: 'Poppins',
fontSize: 15)),
],
), ),
), CustomRow(
Container( width: MediaQuery.of(context).size.width * .3,
width: MediaQuery.of(context).size.width*0.45, label: TranslationBase.of(context).infoStatus +
child: RichText( ":",
text: new TextSpan( value: widget.reply.infoStatus == 1
style: new TextStyle( ? TranslationBase.of(context)
fontSize: 2.0 * SizeConfig.textMultiplier, .replayCallStatus
color: Colors.black, : widget.reply.infoStatus == 2
fontFamily: 'Poppins', ? TranslationBase.of(context)
), .patientArrived
children: <TextSpan>[ : widget.reply.infoStatus == 3
new TextSpan( ? TranslationBase.of(context)
text: TranslationBase.of(context).age + .calledAndNoResponse
" : ", : widget.reply.infoStatus == 4
style: TextStyle(fontSize: 14,color: Color(0xFF575757),fontWeight: FontWeight.bold)), ? TranslationBase.of(context)
new TextSpan( .underProcess
text: : widget.reply.infoStatus == 6
"${AppDateUtils.getAgeByBirthday(widget.reply.dateofBirth, context)}", ? TranslationBase.of(
style: TextStyle( context)
fontWeight: FontWeight.w700, .textResponse
fontSize: 15)), : '',
],
),
), ),
)
],
),
SizedBox(
height: 10,
),
],
),
],
),
], Container(
), width: MediaQuery.of(context).size.width * 0.5,
Container( child: RichText(
width: MediaQuery.of(context).size.width * 0.5, maxLines: 3,
child: RichText( overflow: TextOverflow.ellipsis,
maxLines: 3, text: new TextSpan(
overflow: TextOverflow.ellipsis, style: new TextStyle(
text: new TextSpan( fontSize:
style: new TextStyle( 1.3 * SizeConfig.textMultiplier,
fontSize: 2.0 * SizeConfig.textMultiplier, color: Color(0xFF575757)),
color: Colors.black), children: <TextSpan>[
children: <TextSpan>[ new TextSpan(
new TextSpan( text: TranslationBase.of(context)
text:"Patient Question :" ,//TranslationBase.of(context).doctorResponse + " : ", .requestType +
style: ": ",
TextStyle(fontSize: 14, fontFamily: 'Poppins', color: Color(0xFF575757),fontWeight: FontWeight.bold)), style: TextStyle(
new TextSpan( fontSize: SizeConfig
text: widget.reply?.remarks?.trim()??'', .getTextMultiplierBasedOnWidth() *
style: TextStyle( 2.8,
fontFamily: 'Poppins',
color: Color(0xFF575757), color: Color(0xFF575757),
fontSize: 12)), //TranslationBase.of(context).doctorResponse + " : ",
], )),
new TextSpan(
text:
"${widget.reply.requestTypeDescription}",
style: TextStyle(
fontFamily: 'Poppins',
fontSize: SizeConfig.getTextMultiplierBasedOnWidth() * 3,
color: Color(0xFF2E303A),
fontWeight: FontWeight.w700,
)),
],
),
), ),
), ),
), ],
],) )
], ],
), ),
// Container( // Container(

@ -6,6 +6,7 @@ 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_texts_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart';
import 'package:doctor_app_flutter/widgets/shared/card_with_bg_widget.dart'; import 'package:doctor_app_flutter/widgets/shared/card_with_bg_widget.dart';
import 'package:doctor_app_flutter/widgets/shared/user-guid/CusomRow.dart';
import 'package:flutter/cupertino.dart'; import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
@ -470,37 +471,4 @@ class PatientCard extends StatelessWidget {
} }
} }
class CustomRow extends StatelessWidget {
const CustomRow({
Key key,
this.label,
this.value,
}) : super(key: key);
final String label;
final String value;
@override
Widget build(BuildContext context) {
return Row(
children: [
AppText(
label,
fontSize: SizeConfig.getTextMultiplierBasedOnWidth() * 2.8,
color: Color(0xFF575757),
fontWeight: FontWeight.w600,
),
SizedBox(
width: 1,
),
AppText(
value,
fontSize: SizeConfig.getTextMultiplierBasedOnWidth() * 3,
color: Color(0xFF2E303A),
fontWeight: FontWeight.w700,
isCopyable: true,
),
],
);
}
}

@ -40,8 +40,8 @@ class CardWithBgWidget extends StatelessWidget {
color: bgColor ?? HexColor('#58434F'), color: bgColor ?? HexColor('#58434F'),
borderRadius: BorderRadius.only( borderRadius: BorderRadius.only(
topLeft: Radius.circular(10), topRight: Radius.circular(10),
bottomLeft: Radius.circular(10),),), bottomRight: Radius.circular(10),),),
width: 10, width: 10,
), ),
bottom: 1, bottom: 1,

@ -0,0 +1,43 @@
import 'package:doctor_app_flutter/config/size_config.dart';
import 'package:flutter/material.dart';
import '../app_texts_widget.dart';
class CustomRow extends StatelessWidget {
const CustomRow({
Key key,
this.label,
this.value, this.labelSize, this.valueSize, this.width,
}) : super(key: key);
final String label;
final String value;
final double labelSize;
final double valueSize;
final double width;
@override
Widget build(BuildContext context) {
return Row(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
AppText(
label,
fontSize: labelSize??SizeConfig.getTextMultiplierBasedOnWidth() * 2.8,
color: Color(0xFF575757),
fontWeight: FontWeight.w600,
),
SizedBox(
width: 1,
),
AppText(
value,
fontSize: valueSize??SizeConfig.getTextMultiplierBasedOnWidth() * 3,
color: Color(0xFF2E303A),
fontWeight: FontWeight.w700,
isCopyable: true,
),
],
);
}
}
Loading…
Cancel
Save