|
|
|
|
@ -9,12 +9,11 @@ import '../../core/viewModel/project_view_model.dart';
|
|
|
|
|
import '../../core/viewModel/schedule_view_model.dart';
|
|
|
|
|
import '../../icons_app/doctor_app_icons.dart';
|
|
|
|
|
import '../../utils/date-utils.dart';
|
|
|
|
|
import '../../utils/dr_app_toast_msg.dart';
|
|
|
|
|
import '../../utils/translations_delegate_base_utils.dart';
|
|
|
|
|
import '../../widgets/shared/app_scaffold_widget.dart';
|
|
|
|
|
import '../../widgets/shared/errors/error_message.dart';
|
|
|
|
|
import '../base/base_view.dart';
|
|
|
|
|
import '../patients/register_patient/CustomEditableText.dart';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class DoctorSchedulePage extends StatefulWidget {
|
|
|
|
|
@override
|
|
|
|
|
@ -27,19 +26,16 @@ class _DoctorSchedulePageState extends State<DoctorSchedulePage> {
|
|
|
|
|
double currentPage = 0;
|
|
|
|
|
int selectedindex = 0;
|
|
|
|
|
List weeks = [];
|
|
|
|
|
// List<DoctorScheduleResponse> doctorScheduleResponse = [];
|
|
|
|
|
int weekMS = 604800 * 1000;
|
|
|
|
|
// DoctorList? doctorList;
|
|
|
|
|
|
|
|
|
|
List<String> freeSlots = [];
|
|
|
|
|
bool isPageChange = false;
|
|
|
|
|
String fromDate = DateFormat('yyyy-MM-dd').format(DateTime.now());
|
|
|
|
|
String toDate =
|
|
|
|
|
DateFormat('yyyy-MM-dd').format(DateTime.now().add(Duration(days: 30)));
|
|
|
|
|
// AppSharedPreferences sharedPref = AppSharedPreferences();
|
|
|
|
|
|
|
|
|
|
int pageNo=1;
|
|
|
|
|
@override
|
|
|
|
|
void initState() {
|
|
|
|
|
// this.doctorList = widget.doctorList;
|
|
|
|
|
|
|
|
|
|
super.initState();
|
|
|
|
|
}
|
|
|
|
|
@ -91,14 +87,21 @@ class _DoctorSchedulePageState extends State<DoctorSchedulePage> {
|
|
|
|
|
IconButton(
|
|
|
|
|
onPressed: () {
|
|
|
|
|
|
|
|
|
|
model.getDoctorRota(fromDate, toDate,);
|
|
|
|
|
if(pageNo >1) {
|
|
|
|
|
pageNo--;
|
|
|
|
|
model.getDoctorRota(fromDate, toDate,
|
|
|
|
|
pageNo: pageNo);
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
icon: SvgPicture.asset(
|
|
|
|
|
'assets/images/svgs/prev.svg',
|
|
|
|
|
height: 25,
|
|
|
|
|
width: 10)),
|
|
|
|
|
IconButton(
|
|
|
|
|
onPressed: () {},
|
|
|
|
|
onPressed: () {
|
|
|
|
|
pageNo++;
|
|
|
|
|
model.getDoctorRota(fromDate, toDate, pageNo: pageNo);
|
|
|
|
|
},
|
|
|
|
|
icon: SvgPicture.asset(
|
|
|
|
|
'assets/images/svgs/next.svg',
|
|
|
|
|
height: 25,
|
|
|
|
|
|