|
|
|
@ -1,3 +1,4 @@
|
|
|
|
|
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
|
|
|
|
|
import 'package:diplomaticquarterapp/models/Appointments/AppoimentAllHistoryResultList.dart';
|
|
|
|
|
import 'package:diplomaticquarterapp/models/Appointments/DoctorListResponse.dart';
|
|
|
|
|
import 'package:diplomaticquarterapp/models/Appointments/DoctorRateDetails.dart';
|
|
|
|
@ -5,10 +6,12 @@ import 'package:diplomaticquarterapp/pages/BookAppointment/BookConfirm.dart';
|
|
|
|
|
import 'package:diplomaticquarterapp/pages/BookAppointment/components/DocAvailableAppointments.dart';
|
|
|
|
|
import 'package:diplomaticquarterapp/services/appointment_services/GetDoctorsList.dart';
|
|
|
|
|
import 'package:diplomaticquarterapp/uitl/app_toast.dart';
|
|
|
|
|
import 'package:diplomaticquarterapp/uitl/date_uitl.dart';
|
|
|
|
|
import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart';
|
|
|
|
|
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
|
|
|
|
|
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
|
|
|
|
|
import 'package:flutter/material.dart';
|
|
|
|
|
import 'package:provider/provider.dart';
|
|
|
|
|
import 'package:rating_bar/rating_bar.dart';
|
|
|
|
|
|
|
|
|
|
import 'widgets/AppointmentActions.dart';
|
|
|
|
@ -39,13 +42,13 @@ class _AppointmentDetailsState extends State<AppointmentDetails>
|
|
|
|
|
|
|
|
|
|
@override
|
|
|
|
|
void dispose() {
|
|
|
|
|
// TODO: implement dispose
|
|
|
|
|
super.dispose();
|
|
|
|
|
_tabController.dispose();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@override
|
|
|
|
|
Widget build(BuildContext context) {
|
|
|
|
|
ProjectViewModel projectViewModel = Provider.of(context);
|
|
|
|
|
return AppScaffold(
|
|
|
|
|
appBarTitle: widget.appo.doctorNameObj,
|
|
|
|
|
isShowAppBar: true,
|
|
|
|
@ -109,7 +112,7 @@ class _AppointmentDetailsState extends State<AppointmentDetails>
|
|
|
|
|
Container(
|
|
|
|
|
margin: EdgeInsets.only(top: 10.0),
|
|
|
|
|
alignment: Alignment.center,
|
|
|
|
|
child: Text(widget.appo.clinicName,
|
|
|
|
|
child: Text(getDoctorSpeciality(widget.appo.doctorSpeciality),
|
|
|
|
|
style: TextStyle(
|
|
|
|
|
fontSize: 12.0,
|
|
|
|
|
color: Colors.grey[900],
|
|
|
|
@ -139,7 +142,9 @@ class _AppointmentDetailsState extends State<AppointmentDetails>
|
|
|
|
|
child: Text(
|
|
|
|
|
"(" +
|
|
|
|
|
widget.appo.noOfPatientsRate.toString() +
|
|
|
|
|
" Reviews)",
|
|
|
|
|
" " +
|
|
|
|
|
TranslationBase.of(context).reviews +
|
|
|
|
|
")",
|
|
|
|
|
style: TextStyle(
|
|
|
|
|
fontSize: 14.0,
|
|
|
|
|
color: Colors.blue[800],
|
|
|
|
@ -148,6 +153,17 @@ class _AppointmentDetailsState extends State<AppointmentDetails>
|
|
|
|
|
)),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
Container(
|
|
|
|
|
alignment: Alignment.center,
|
|
|
|
|
child: Text(DateUtil.getWeekDayMonthDayYearDateFormatted(
|
|
|
|
|
DateUtil.convertStringToDate(
|
|
|
|
|
widget.appo.appointmentDate),
|
|
|
|
|
projectViewModel.isArabic ? "ar" : "en")),
|
|
|
|
|
),
|
|
|
|
|
Container(
|
|
|
|
|
alignment: Alignment.center,
|
|
|
|
|
child: Text(widget.appo.startTime),
|
|
|
|
|
),
|
|
|
|
|
Container(
|
|
|
|
|
margin: EdgeInsets.only(top: 10.0),
|
|
|
|
|
child: Divider(
|
|
|
|
@ -493,6 +509,25 @@ class _AppointmentDetailsState extends State<AppointmentDetails>
|
|
|
|
|
return width;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
String getDate(String date) {
|
|
|
|
|
DateTime dateObj = DateUtil.convertStringToDate(date);
|
|
|
|
|
return DateUtil.getWeekDay(dateObj.weekday) +
|
|
|
|
|
", " +
|
|
|
|
|
dateObj.day.toString() +
|
|
|
|
|
" " +
|
|
|
|
|
DateUtil.getMonth(dateObj.month) +
|
|
|
|
|
" " +
|
|
|
|
|
dateObj.year.toString();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
String getDoctorSpeciality(List<String> docSpecial) {
|
|
|
|
|
String docSpeciality = "";
|
|
|
|
|
docSpecial.forEach((v) {
|
|
|
|
|
docSpeciality = docSpeciality + v + " ";
|
|
|
|
|
});
|
|
|
|
|
return docSpeciality;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
DoctorList getDoctorObject() {
|
|
|
|
|
DoctorList docObj = new DoctorList();
|
|
|
|
|
docObj.doctorID = widget.appo.doctorID;
|
|
|
|
|