Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- invoiceApp.controller('masterReportConrtoller', ['$scope', '$location', 'authService', 'usSpinnerService', 'dateService', 'settingsService','$rootScope',
- function ($scope, $location, authService, usSpinnerService, dateService, settingsService, $rootScope )
- ////Is User Valid
- ////
- //$rootScope.$on("masterReportConrtoller", function () {
- // $scope.parentmethod();
- // });
- //$scope.parentmethod = function () {
- // //
- $scope.masterReportConrtoller.getUserDetails = function () {
- debugger;
- settingsService.getUserDetails().then(function (response) {
- var loginData = {
- userName: response.d.user.Email,
- password: response.d.user.UserPassword
- };
- authService.login(loginData).then(function (response) {
- debugger;
- $scope.Limit = response.d.organization.Limit;
- });
- $scope.Limit = response.d.organization.Limit;
- $scope.DocumentUsage = response.d.organization.DocumentUsage;
- $scope.ExpirationDate = $scope.DateConvertfromJson(response.d.organization.ExpirationDate);
- var fullDate = new Date();
- if (fullDate <= $scope.ExpirationDate) {
- $scope.ISvalidUser = false;
- $rootScope.$broadcast('masterReportConrtoller', false);
- }
- else {
- $rootScope.$broadcast('masterReportConrtoller', true);
- }
- });
- }
- }]);
- invoiceApp.controller('InvoiceController', ['$scope', '$location', '$cookieStore', 'documentService', 'dialogs', 'usSpinnerService', 'settingsService', 'associatedEmailsService', '$rootScope',
- function ($scope, $location, $cookieStore, documentService, dialogs, usSpinnerService, settingsService, associatedEmailsService, $rootScope) {
- $rootScope.$on('masterReportConrtoller');}
- $state.go('state2', { someParam : 'broken magic' });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement