change the status of replay

merge-requests/811/head
Elham Rababh 3 years ago
parent ce6ec576dd
commit 1f3d1f68fb

@ -2549,19 +2549,24 @@ const Map<String, Map<String, String>> localizedValues = {
},
"patientArrived":{
"en":"Patient Arrived",
"ar":"تم الاتصال"
"ar":"وصل المريض"
},
"calledAndNoResponse":{
"en":"Called And No Response",
"ar":"تم الاتصال"
"ar":"تم الاتصال ولا يوجد رد"
},
"underProcess":{
"en":"Under Process",
"ar":"تم الاتصال"
"ar":"تحت التجهيز"
},
"textResponse":{
"en":"Text Response",
"ar":"تم الاتصال"
"ar":"استجابة النص"
}
,
"requestType":{
"en":"Request Type",
"ar":"نوع الطلب"
}
};

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

@ -295,14 +295,14 @@ class _DoctorReplayChatState extends State<DoctorReplayChat> {
crossAxisAlignment: CrossAxisAlignment.end,
children: [
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
.w500,
color: Color(0xFF2B353E),
fontSize: SizeConfig.getTextMultiplierBasedOnWidth() *2.8,
),
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,
fontFamily: 'Poppins',
color: Color(0xFF2B353E),

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

@ -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