<commit_before>app.controller("SigninController", ["$scope", "$uibModal", "$window", "AlertService", "SigninService", "GetCurrentService", function($scope, $uibModal, $window, AlertService, SigninService, GetCurrentService) {
	$scope.signinData = {};

	$scope.openSigninModal = function() {
		var signinModalInstance = $uibModal.open({
			templateUrl: "../../js/views/signin-modal.php",
			controller: "SigninModal",
			resolve: {
				signinData: function() {
					return ($scope.signinData);
				}
			}
		});
		signinModalInstance.result.then(function(signinData) {
			$scope.signinData = signinData;
			SigninService.signin(signinData)
				.then(function(reply) {
					if(reply.status === 200) {
						AlertService.addAlert({type: "success", msg: reply.message});
						//three potential cases here: receiving volunteer, receiving admin, giving admin
						//Receiving volunteer redirects to the listing page, the other two go to their respective landing pages
						GetCurrentService.fetchVolCurrent()
							.then(function(result) {
								if(result.data.status === 200) {
									if(result.data.data.volIsAdmin === true) {
										GetCurrentService.fetchOrgCurrent()
											.then(function(result) {
												if(result.data.status === 200) {
													if(result.data.data.orgType === "G") {
														//giving admin
													} else if(result.data.data.orgType === "R") {
														//receiving admin
														$window.location.assign("../../php/template/login-landing-page.php")
													}
												} else {
													AlertService.addAlert({type: "danger", msg: reply.message});
												}
											});
									} else {
										//receiving volunteer
										$window.location.assign("../../php/template/listing-receive-view.php")
									}
								} else {<commit_msg>redirect should work for giving organizations https://app.asana.com/0/60990639151493/70723740899547<commit_after>app.controller("SigninController", ["$scope", "$uibModal", "$window", "AlertService", "SigninService", "GetCurrentService", function($scope, $uibModal, $window, AlertService, SigninService, GetCurrentService) {
	$scope.signinData = {};

	$scope.openSigninModal = function() {
		var signinModalInstance = $uibModal.open({
			templateUrl: "../../js/views/signin-modal.php",
			controller: "SigninModal",
			resolve: {
				signinData: function() {
					return ($scope.signinData);
				}
			}
		});
		signinModalInstance.result.then(function(signinData) {
			$scope.signinData = signinData;
			SigninService.signin(signinData)
				.then(function(reply) {
					if(reply.status === 200) {
						AlertService.addAlert({type: "success", msg: reply.message});
						//three potential cases here: receiving volunteer, receiving admin, giving admin
						//Receiving volunteer redirects to the listing page, the other two go to their respective landing pages
						GetCurrentService.fetchVolCurrent()
							.then(function(result) {
								if(result.data.status === 200) {
									if(result.data.data.volIsAdmin === true) {
										GetCurrentService.fetchOrgCurrent()
											.then(function(result) {
												if(result.data.status === 200) {
													if(result.data.data.orgType === "G") {
														//giving admin
														$window.location.assign("../../php/template/login-landing-giver.php")
													} else if(result.data.data.orgType === "R") {
														//receiving admin
														$window.location.assign("../../php/template/login-landing-page.php")
													}
												} else {
													AlertService.addAlert({type: "danger", msg: reply.message});
												}
											});
									} else {
										//receiving volunteer
										$window.location.assign("../../php/template/listing-receive-view.php")
									}
								} else {
{'fraction_non_alphanumeric': 0.14690451206715635, 'fraction_numerical': 0.012329485834207765, 'mean_word_length': 2.5502793296089385, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 1, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1208197', 'n_tokens_mistral': 1671, 'n_tokens_neox': 1104, 'n_words': 197}