|
|
|
@ -28,7 +28,9 @@ abstract class AuthenticationRepo {
|
|
|
|
int? patientShareRequestID,
|
|
|
|
int? patientShareRequestID,
|
|
|
|
int? responseID,
|
|
|
|
int? responseID,
|
|
|
|
bool isSwitchUser = false,
|
|
|
|
bool isSwitchUser = false,
|
|
|
|
int? patientID});
|
|
|
|
int? patientID,
|
|
|
|
|
|
|
|
int? loginType
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
Future<Either<Failure, GenericApiModel<dynamic>>> checkIfUserAgreed({required dynamic commonAuthanticatedRequest});
|
|
|
|
Future<Either<Failure, GenericApiModel<dynamic>>> checkIfUserAgreed({required dynamic commonAuthanticatedRequest});
|
|
|
|
|
|
|
|
|
|
|
|
@ -192,6 +194,7 @@ class AuthenticationRepoImp implements AuthenticationRepo {
|
|
|
|
int? responseID,
|
|
|
|
int? responseID,
|
|
|
|
bool isSwitchUser = false,
|
|
|
|
bool isSwitchUser = false,
|
|
|
|
int? patientID,
|
|
|
|
int? patientID,
|
|
|
|
|
|
|
|
int? loginType
|
|
|
|
}) async {
|
|
|
|
}) async {
|
|
|
|
if (isRegister) {
|
|
|
|
if (isRegister) {
|
|
|
|
newRequest["activationCode"] = activationCode ?? "0000";
|
|
|
|
newRequest["activationCode"] = activationCode ?? "0000";
|
|
|
|
@ -215,12 +218,19 @@ class AuthenticationRepoImp implements AuthenticationRepo {
|
|
|
|
Map<String, dynamic> switchRequest = {};
|
|
|
|
Map<String, dynamic> switchRequest = {};
|
|
|
|
if (isSwitchUser) {
|
|
|
|
if (isSwitchUser) {
|
|
|
|
switchRequest = newRequest.toJson();
|
|
|
|
switchRequest = newRequest.toJson();
|
|
|
|
switchRequest['SuperUser'] = patientID;
|
|
|
|
|
|
|
|
switchRequest['PatientID'] = responseID;
|
|
|
|
switchRequest['PatientID'] = responseID;
|
|
|
|
switchRequest['IsSilentLogin'] = true;
|
|
|
|
switchRequest['IsSilentLogin'] = true;
|
|
|
|
switchRequest['LogInTokenID'] = null;
|
|
|
|
switchRequest['LogInTokenID'] = null;
|
|
|
|
switchRequest['DeviceToken'] = null;
|
|
|
|
|
|
|
|
switchRequest['SearchType'] = 2;
|
|
|
|
switchRequest['SearchType'] = 2;
|
|
|
|
|
|
|
|
if(loginType != 0) {
|
|
|
|
|
|
|
|
switchRequest['SuperUser'] = patientID;
|
|
|
|
|
|
|
|
switchRequest['DeviceToken'] = null;
|
|
|
|
|
|
|
|
}else{
|
|
|
|
|
|
|
|
switchRequest['LoginType'] = 2;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
final endpoint = isFormFamilyFile
|
|
|
|
final endpoint = isFormFamilyFile
|
|
|
|
|