Merge branch 'replay_status' into 'development'

fix replay status

See merge request Cloud_Solution/doctor_app_flutter!821
merge-requests/822/head
Mohammad Aljammal 4 years ago
commit e334dbd221

@ -187,7 +187,7 @@ class _DoctorReplayChatState extends State<DoctorReplayChat> {
children: [
AppText(
widget.reply.createdOn !=null?AppDateUtils.getDayMonthYearDateFormatted(AppDateUtils.getDateTimeFromServerFormat(widget.reply.createdOn)):AppDateUtils.getDayMonthYearDateFormatted(DateTime.now()),
widget.reply.createdOn !=null?getFormattedDate(widget.reply.createdOn):AppDateUtils.getDayMonthYearDateFormatted(DateTime.now()),
fontWeight: FontWeight
.w500,
color: Colors.white,
@ -295,7 +295,7 @@ class _DoctorReplayChatState extends State<DoctorReplayChat> {
crossAxisAlignment: CrossAxisAlignment.end,
children: [
AppText(
widget.reply.responseDate !=null?AppDateUtils.getDayMonthYearDateFormatted(AppDateUtils.getDateTimeFromServerFormat(widget.reply.responseDate)):AppDateUtils.getDayMonthYearDateFormatted(DateTime.now()),
widget.reply.responseDate !=null?getFormattedDate(widget.reply.responseDate):AppDateUtils.getDayMonthYearDateFormatted(DateTime.now()),
fontWeight: FontWeight
.w500,
color: Color(0xFF2B353E),
@ -445,4 +445,24 @@ class _DoctorReplayChatState extends State<DoctorReplayChat> {
),
));
}
getFormattedDate(date){
return (AppDateUtils.getDateTimeFromServerFormat(
date)
.day
.toString() +
" " +
AppDateUtils.getMonth(
AppDateUtils.getDateTimeFromServerFormat(
date)
.month)
.toString()
.substring(0, 3) +
' ' +
AppDateUtils.getDateTimeFromServerFormat(
date)
.year
.toString());
}
}

@ -31,14 +31,20 @@ class _DoctorReplyWidgetState extends State<DoctorReplyWidget> {
return Container(
child: CardWithBgWidget(
bgColor:
widget.reply.status == 2 ? Colors.green[600] : Color(0xFFD02127),
bgColor: widget.reply.infoStatus == 0
? Color(0xFF2B353E)
: widget.reply.infoStatus == 4
? IN_PROGRESS_COLOR
: widget.reply.infoStatus == 3
? Color(0xFFD02127)
: Colors.green[600],
hasBorder: false,
widget: Container(
child: InkWell(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
if(widget.reply.infoStatus != 0)
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
@ -49,18 +55,29 @@ class _DoctorReplyWidgetState extends State<DoctorReplyWidget> {
color: Colors.black),
children: <TextSpan>[
new TextSpan(
text: widget.reply.status == 2
? TranslationBase.of(context).active
: widget.reply.status == 1
? TranslationBase.of(context).onHold
: TranslationBase.of(context).cancelled,
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
: '',
style: TextStyle(
color: widget.reply.status == 2
? Colors.green[600]
: Color(0xFFD02127),
color: widget.reply.infoStatus == 4
? IN_PROGRESS_COLOR
: widget.reply.infoStatus == 3
? Color(0xFFD02127)
: Colors.green[600],
fontWeight: FontWeight.w700,
fontFamily: 'Poppins',
fontSize: 2.0 * SizeConfig.textMultiplier)),
fontSize: 1.8 * SizeConfig.textMultiplier)),
],
),
),
@ -183,37 +200,13 @@ class _DoctorReplyWidgetState extends State<DoctorReplyWidget> {
label: TranslationBase.of(context).fileNumber,
value: widget.reply.patientID.toString(),
),
CustomRow(
label: TranslationBase.of(context).age + " : ",
value:
"${AppDateUtils.getAgeByBirthday(widget.reply.dateofBirth, context)}",
),
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,
height: 8,
),
],
),
@ -227,27 +220,28 @@ class _DoctorReplyWidgetState extends State<DoctorReplyWidget> {
overflow: TextOverflow.ellipsis,
text: new TextSpan(
style: new TextStyle(
fontSize:
1.3 * SizeConfig.textMultiplier,
fontSize: 1.3 * SizeConfig.textMultiplier,
color: Color(0xFF575757)),
children: <TextSpan>[
new TextSpan(
text: TranslationBase.of(context)
.requestType +
": ",
text:
TranslationBase.of(context).requestType +
": ",
style: TextStyle(
fontSize: SizeConfig
.getTextMultiplierBasedOnWidth() *
.getTextMultiplierBasedOnWidth() *
2.8,
color: Color(0xFF575757),
//TranslationBase.of(context).doctorResponse + " : ",
)),
new TextSpan(
text:
"${widget.reply.requestTypeDescription}",
"${widget.reply.requestTypeDescription}",
style: TextStyle(
fontFamily: 'Poppins',
fontSize: SizeConfig.getTextMultiplierBasedOnWidth() * 3,
fontSize: SizeConfig
.getTextMultiplierBasedOnWidth() *
3,
color: Color(0xFF2E303A),
fontWeight: FontWeight.w700,
)),

Loading…
Cancel
Save