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