You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
53 lines
1.8 KiB
Dart
53 lines
1.8 KiB
Dart
import 'package:diplomaticquarterapp/config/config.dart';
|
|
import 'package:diplomaticquarterapp/config/shared_pref_kay.dart';
|
|
import 'package:diplomaticquarterapp/core/service/base_service.dart';
|
|
import 'package:diplomaticquarterapp/models/Authentication/authenticated_user.dart';
|
|
import 'package:diplomaticquarterapp/models/Request.dart';
|
|
import 'package:diplomaticquarterapp/services/authentication/auth_provider.dart';
|
|
import 'package:diplomaticquarterapp/uitl/app_shared_preferences.dart';
|
|
|
|
class MyInvoicesService extends BaseService {
|
|
AppSharedPreferences sharedPref = AppSharedPreferences();
|
|
AppGlobal appGlobal = new AppGlobal();
|
|
|
|
AuthenticatedUser authUser = new AuthenticatedUser();
|
|
AuthProvider authProvider = new AuthProvider();
|
|
|
|
Future<Map> getAllDentalAppointments(int projectID,
|
|
context) async {
|
|
Map<String, dynamic> request;
|
|
var languageID =
|
|
await sharedPref.getStringWithDefaultValue(APP_LANGUAGE, 'ar');
|
|
Request req = appGlobal.getPublicRequest();
|
|
request = {
|
|
"LanguageID": languageID == 'ar' ? 1 : 2,
|
|
"IPAdress": "10.20.10.20",
|
|
"VersionID": req.VersionID,
|
|
"Channel": req.Channel,
|
|
"generalid": 'Cs2020@2016\$2958',
|
|
"PatientOutSA": authUser.outSA,
|
|
"DeviceTypeID": req.DeviceTypeID,
|
|
"SessionID": null,
|
|
"PatientID": authUser.patientID,
|
|
"License": true,
|
|
"IsRegistered": true,
|
|
"ProjectID": projectID,
|
|
"PatientTypeID":authUser.patientIdentificationType,
|
|
"PatientType":authUser.patientType,
|
|
"isDentalAllowedBackend": false
|
|
};
|
|
|
|
dynamic localRes;
|
|
|
|
await baseAppClient.post(GET_ALL_APPOINTMENTS_FOR_DENTAL_CLINIC,
|
|
onSuccess: (response, statusCode) async {
|
|
localRes = response;
|
|
}, onFailure: (String error, int statusCode) {
|
|
throw error;
|
|
}, body: request);
|
|
return Future.value(
|
|
localRes
|
|
);
|
|
}
|
|
|
|
} |