|
|
|
|
@ -100,173 +100,171 @@ class PatientSickLeaveScreen extends StatelessWidget {
|
|
|
|
|
? Expanded(
|
|
|
|
|
child: FractionallySizedBox(
|
|
|
|
|
widthFactor: 0.95,
|
|
|
|
|
child: Expanded(
|
|
|
|
|
child: ListView.builder(
|
|
|
|
|
scrollDirection: Axis.vertical,
|
|
|
|
|
shrinkWrap: true,
|
|
|
|
|
itemCount: model.getAllSIckLeavePatient.length,
|
|
|
|
|
itemBuilder: (BuildContext ctxt, int index) {
|
|
|
|
|
SickLeavePatientModel item =
|
|
|
|
|
model.getAllSIckLeavePatient[index];
|
|
|
|
|
return Column(
|
|
|
|
|
children: [
|
|
|
|
|
CardWithBgWidget(
|
|
|
|
|
padding: 0,
|
|
|
|
|
marginLeft: 10,
|
|
|
|
|
marginSymmetric: 10,
|
|
|
|
|
hasBorder: false,
|
|
|
|
|
bgColor: Colors.black,
|
|
|
|
|
widget: Container(
|
|
|
|
|
color: Colors.white,
|
|
|
|
|
padding: EdgeInsets.all(20),
|
|
|
|
|
child: InkWell(
|
|
|
|
|
child: Column(
|
|
|
|
|
children: [
|
|
|
|
|
Row(
|
|
|
|
|
crossAxisAlignment:
|
|
|
|
|
CrossAxisAlignment.start,
|
|
|
|
|
mainAxisAlignment:
|
|
|
|
|
MainAxisAlignment.start,
|
|
|
|
|
children: [
|
|
|
|
|
Expanded(
|
|
|
|
|
// width: MediaQuery.of(context).size.width*0.51,
|
|
|
|
|
child: AppText(
|
|
|
|
|
Helpers.capitalize(
|
|
|
|
|
item.doctorName ?? ""),
|
|
|
|
|
fontSize: 18,
|
|
|
|
|
color: Color(0xff2e303a),
|
|
|
|
|
fontWeight: FontWeight.w700,
|
|
|
|
|
fontFamily: 'Poppins',
|
|
|
|
|
textOverflow:
|
|
|
|
|
TextOverflow.ellipsis,
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
]),
|
|
|
|
|
SizedBox(
|
|
|
|
|
height: 10,
|
|
|
|
|
),
|
|
|
|
|
Row(
|
|
|
|
|
child: ListView.builder(
|
|
|
|
|
scrollDirection: Axis.vertical,
|
|
|
|
|
shrinkWrap: true,
|
|
|
|
|
itemCount: model.getAllSIckLeavePatient.length,
|
|
|
|
|
itemBuilder: (BuildContext ctxt, int index) {
|
|
|
|
|
SickLeavePatientModel item =
|
|
|
|
|
model.getAllSIckLeavePatient[index];
|
|
|
|
|
return Column(
|
|
|
|
|
children: [
|
|
|
|
|
CardWithBgWidget(
|
|
|
|
|
padding: 0,
|
|
|
|
|
marginLeft: 10,
|
|
|
|
|
marginSymmetric: 10,
|
|
|
|
|
hasBorder: false,
|
|
|
|
|
bgColor: Colors.black,
|
|
|
|
|
widget: Container(
|
|
|
|
|
color: Colors.white,
|
|
|
|
|
padding: EdgeInsets.all(20),
|
|
|
|
|
child: InkWell(
|
|
|
|
|
child: Column(
|
|
|
|
|
children: [
|
|
|
|
|
Row(
|
|
|
|
|
crossAxisAlignment:
|
|
|
|
|
CrossAxisAlignment.start,
|
|
|
|
|
mainAxisAlignment:
|
|
|
|
|
MainAxisAlignment.start,
|
|
|
|
|
children: [
|
|
|
|
|
ClipRRect(
|
|
|
|
|
borderRadius:
|
|
|
|
|
BorderRadius.circular(50.0),
|
|
|
|
|
child: CachedNetworkImage(
|
|
|
|
|
imageUrl: item
|
|
|
|
|
.doctorImageURL ??
|
|
|
|
|
"https://hmgwebservices.com/Images/MobileImages/DUBAI/unkown.png",
|
|
|
|
|
height: 30,
|
|
|
|
|
width: 30,
|
|
|
|
|
errorWidget:
|
|
|
|
|
(context, url, error) =>
|
|
|
|
|
AppText(
|
|
|
|
|
'No Image',
|
|
|
|
|
fontSize: 10,
|
|
|
|
|
),
|
|
|
|
|
Expanded(
|
|
|
|
|
// width: MediaQuery.of(context).size.width*0.51,
|
|
|
|
|
child: AppText(
|
|
|
|
|
Helpers.capitalize(
|
|
|
|
|
item.doctorName ?? ""),
|
|
|
|
|
fontSize: 18,
|
|
|
|
|
color: Color(0xff2e303a),
|
|
|
|
|
fontWeight: FontWeight.w700,
|
|
|
|
|
fontFamily: 'Poppins',
|
|
|
|
|
textOverflow:
|
|
|
|
|
TextOverflow.ellipsis,
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
SizedBox(
|
|
|
|
|
width: 10,
|
|
|
|
|
]),
|
|
|
|
|
SizedBox(
|
|
|
|
|
height: 10,
|
|
|
|
|
),
|
|
|
|
|
Row(
|
|
|
|
|
children: [
|
|
|
|
|
ClipRRect(
|
|
|
|
|
borderRadius:
|
|
|
|
|
BorderRadius.circular(50.0),
|
|
|
|
|
child: CachedNetworkImage(
|
|
|
|
|
imageUrl: item
|
|
|
|
|
.doctorImageURL ??
|
|
|
|
|
"https://hmgwebservices.com/Images/MobileImages/DUBAI/unkown.png",
|
|
|
|
|
height: 30,
|
|
|
|
|
width: 30,
|
|
|
|
|
errorWidget:
|
|
|
|
|
(context, url, error) =>
|
|
|
|
|
AppText(
|
|
|
|
|
'No Image',
|
|
|
|
|
fontSize: 10,
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
Column(
|
|
|
|
|
children: [
|
|
|
|
|
CustomRow(
|
|
|
|
|
label: TranslationBase.of(
|
|
|
|
|
context)
|
|
|
|
|
.daysSickleave +
|
|
|
|
|
": ",
|
|
|
|
|
labelSize: SizeConfig
|
|
|
|
|
.getTextMultiplierBasedOnWidth() *
|
|
|
|
|
3.3,
|
|
|
|
|
valueSize: SizeConfig
|
|
|
|
|
.getTextMultiplierBasedOnWidth() *
|
|
|
|
|
4,
|
|
|
|
|
value: (item.sickLeaveDays
|
|
|
|
|
.toString() !=
|
|
|
|
|
null &&
|
|
|
|
|
item.sickLeaveDays
|
|
|
|
|
.toString() !=
|
|
|
|
|
"null")
|
|
|
|
|
? item.sickLeaveDays
|
|
|
|
|
.toString()
|
|
|
|
|
: item.noOfDays
|
|
|
|
|
.toString(),
|
|
|
|
|
),
|
|
|
|
|
CustomRow(
|
|
|
|
|
label: TranslationBase.of(
|
|
|
|
|
context)
|
|
|
|
|
.startDate +
|
|
|
|
|
' ' ??
|
|
|
|
|
"",
|
|
|
|
|
labelSize: SizeConfig
|
|
|
|
|
.getTextMultiplierBasedOnWidth() *
|
|
|
|
|
3.3,
|
|
|
|
|
valueSize: SizeConfig
|
|
|
|
|
.getTextMultiplierBasedOnWidth() *
|
|
|
|
|
4,
|
|
|
|
|
value: AppDateUtils
|
|
|
|
|
.getDayMonthYearDateFormatted(
|
|
|
|
|
item.startDate.contains(
|
|
|
|
|
"/Date(")
|
|
|
|
|
? AppDateUtils
|
|
|
|
|
.convertStringToDate(
|
|
|
|
|
item
|
|
|
|
|
.startDate)
|
|
|
|
|
: DateTime.parse(
|
|
|
|
|
item.startDate),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
SizedBox(
|
|
|
|
|
width: 10,
|
|
|
|
|
),
|
|
|
|
|
Column(
|
|
|
|
|
children: [
|
|
|
|
|
CustomRow(
|
|
|
|
|
label: TranslationBase.of(
|
|
|
|
|
context)
|
|
|
|
|
.daysSickleave +
|
|
|
|
|
": ",
|
|
|
|
|
labelSize: SizeConfig
|
|
|
|
|
.getTextMultiplierBasedOnWidth() *
|
|
|
|
|
3.3,
|
|
|
|
|
valueSize: SizeConfig
|
|
|
|
|
.getTextMultiplierBasedOnWidth() *
|
|
|
|
|
4,
|
|
|
|
|
value: (item.sickLeaveDays
|
|
|
|
|
.toString() !=
|
|
|
|
|
null &&
|
|
|
|
|
item.sickLeaveDays
|
|
|
|
|
.toString() !=
|
|
|
|
|
"null")
|
|
|
|
|
? item.sickLeaveDays
|
|
|
|
|
.toString()
|
|
|
|
|
: item.noOfDays
|
|
|
|
|
.toString(),
|
|
|
|
|
),
|
|
|
|
|
CustomRow(
|
|
|
|
|
label: TranslationBase.of(
|
|
|
|
|
context)
|
|
|
|
|
.startDate +
|
|
|
|
|
' ' ??
|
|
|
|
|
"",
|
|
|
|
|
labelSize: SizeConfig
|
|
|
|
|
.getTextMultiplierBasedOnWidth() *
|
|
|
|
|
3.3,
|
|
|
|
|
valueSize: SizeConfig
|
|
|
|
|
.getTextMultiplierBasedOnWidth() *
|
|
|
|
|
4,
|
|
|
|
|
value: AppDateUtils
|
|
|
|
|
.getDayMonthYearDateFormatted(
|
|
|
|
|
item.startDate.contains(
|
|
|
|
|
"/Date(")
|
|
|
|
|
? AppDateUtils
|
|
|
|
|
.convertStringToDate(
|
|
|
|
|
item
|
|
|
|
|
.startDate)
|
|
|
|
|
: DateTime.parse(
|
|
|
|
|
item.startDate),
|
|
|
|
|
),
|
|
|
|
|
CustomRow(
|
|
|
|
|
label: TranslationBase.of(
|
|
|
|
|
context)
|
|
|
|
|
.endDate +
|
|
|
|
|
' ' ??
|
|
|
|
|
"",
|
|
|
|
|
labelSize: SizeConfig
|
|
|
|
|
.getTextMultiplierBasedOnWidth() *
|
|
|
|
|
3.3,
|
|
|
|
|
valueSize: SizeConfig
|
|
|
|
|
.getTextMultiplierBasedOnWidth() *
|
|
|
|
|
4,
|
|
|
|
|
value: AppDateUtils
|
|
|
|
|
.getDayMonthYearDateFormatted(
|
|
|
|
|
item.startDate.contains(
|
|
|
|
|
"/Date(")
|
|
|
|
|
? AppDateUtils
|
|
|
|
|
.convertStringToDate(
|
|
|
|
|
item.endDate ??
|
|
|
|
|
"")
|
|
|
|
|
.add(
|
|
|
|
|
Duration(
|
|
|
|
|
days: item
|
|
|
|
|
.noOfDays ??
|
|
|
|
|
item.sickLeaveDays),
|
|
|
|
|
)
|
|
|
|
|
: DateTime.parse(
|
|
|
|
|
item.startDate ??
|
|
|
|
|
"")
|
|
|
|
|
.add(
|
|
|
|
|
Duration(
|
|
|
|
|
days:
|
|
|
|
|
item.noOfDays ??
|
|
|
|
|
""),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
CustomRow(
|
|
|
|
|
label: TranslationBase.of(
|
|
|
|
|
context)
|
|
|
|
|
.endDate +
|
|
|
|
|
' ' ??
|
|
|
|
|
"",
|
|
|
|
|
labelSize: SizeConfig
|
|
|
|
|
.getTextMultiplierBasedOnWidth() *
|
|
|
|
|
3.3,
|
|
|
|
|
valueSize: SizeConfig
|
|
|
|
|
.getTextMultiplierBasedOnWidth() *
|
|
|
|
|
4,
|
|
|
|
|
value: AppDateUtils
|
|
|
|
|
.getDayMonthYearDateFormatted(
|
|
|
|
|
item.startDate.contains(
|
|
|
|
|
"/Date(")
|
|
|
|
|
? AppDateUtils
|
|
|
|
|
.convertStringToDate(
|
|
|
|
|
item.endDate ??
|
|
|
|
|
"")
|
|
|
|
|
.add(
|
|
|
|
|
Duration(
|
|
|
|
|
days: item
|
|
|
|
|
.noOfDays ??
|
|
|
|
|
item.sickLeaveDays),
|
|
|
|
|
)
|
|
|
|
|
: DateTime.parse(
|
|
|
|
|
item.startDate ??
|
|
|
|
|
"")
|
|
|
|
|
.add(
|
|
|
|
|
Duration(
|
|
|
|
|
days:
|
|
|
|
|
item.noOfDays ??
|
|
|
|
|
""),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
crossAxisAlignment:
|
|
|
|
|
CrossAxisAlignment.start,
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
crossAxisAlignment:
|
|
|
|
|
CrossAxisAlignment.start,
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
);
|
|
|
|
|
}),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
);
|
|
|
|
|
}),
|
|
|
|
|
),
|
|
|
|
|
)
|
|
|
|
|
: patient.patientStatusType != 43
|
|
|
|
|
|