Laser clinic changes

Dev_3.3_MedicalReportCR
haroon amjad 1 year ago
parent 6b121e7f39
commit fb9a4d5297

@ -1,5 +1,6 @@
import 'dart:collection';
import 'package:diplomaticquarterapp/core/model/hospitals/hospitals_model.dart';
import 'package:diplomaticquarterapp/core/viewModels/project_view_model.dart';
import 'package:diplomaticquarterapp/models/Appointments/DoctorListResponse.dart';
import 'package:diplomaticquarterapp/models/Appointments/laser_body_parts.dart';
@ -17,7 +18,9 @@ import 'package:flutter/material.dart';
import 'package:provider/provider.dart';
class LaserClinic extends StatefulWidget {
LaserClinic({Key key}) : super(key: key);
HospitalsModel selectedHospital;
LaserClinic({this.selectedHospital});
@override
_LaserClinicState createState() {
@ -66,7 +69,7 @@ class _LaserClinicState extends State<LaserClinic> with SingleTickerProviderStat
GifLoaderDialogUtils.showMyDialog(context);
DoctorsListService service = new DoctorsListService();
service.getLaserBodyPartsList(laserCategoryId).then((res) {
service.getLaserBodyPartsList(laserCategoryId, widget.selectedHospital.iD).then((res) {
GifLoaderDialogUtils.hideDialog(context);
if (res['MessageStatus'] == 1) {
if (res['Laser_GetBodyPartsByCategoryList'].length != 0) {

@ -240,7 +240,7 @@ class _SearchByClinicState extends State<SearchByClinic> {
dropdownValue =
clincs.clinicID.toString() + "-" + clincs.isLiveCareClinicAndOnline.toString() + "-" + clincs.liveCareClinicID.toString() + "-" + clincs.liveCareServiceID.toString();
if (dropdownValue == "253-false-0-0") {
Navigator.push(context, FadePage(page: LaserClinic()));
// Navigator.push(context, FadePage(page: LaserClinic()));
} else if (!isDentalSelectedAndSupported()) {
projectDropdownValue = "";
if (!nearestAppo) getDoctorsList(context);
@ -333,7 +333,7 @@ class _SearchByClinicState extends State<SearchByClinic> {
selectedHospital = newValue;
projectDropdownValue = newValue.mainProjectID.toString();
if (dropdownValue.split("-")[0] == "253") {
Navigator.push(context, FadePage(page: LaserClinic()));
Navigator.push(context, FadePage(page: LaserClinic(selectedHospital: selectedHospital)));
} else {
getDoctorsList(context);
}
@ -461,9 +461,7 @@ class _SearchByClinicState extends State<SearchByClinic> {
bool isDentalSelectedAndSupported() {
if (dropdownValue != null)
return dropdownValue != "" && (dropdownValue.split("-")[0] == "17"
// || dropdownValue.split("-")[0] == "253"
) && isMobileAppDentalAllow;
return dropdownValue != "" && (dropdownValue.split("-")[0] == "17" || dropdownValue.split("-")[0] == "253") && isMobileAppDentalAllow;
else
return false;
}

@ -1612,11 +1612,12 @@ class DoctorsListService extends BaseService {
return Future.value(localRes);
}
Future<Map> getLaserBodyPartsList(int laserCategoryID) async {
Future<Map> getLaserBodyPartsList(int laserCategoryID, int projectID) async {
Map<String, dynamic> request;
request = {
"LaserCategoryID": laserCategoryID,
"ProjectID": projectID,
};
dynamic localRes;
await baseAppClient.post(LASER_BODY_PARTS, onSuccess: (response, statusCode) async {

Loading…
Cancel
Save