/**========================================================= * Module: SettingsController.js * Handles app setting =========================================================*/ (function () { 'use strict'; angular.module('naut') .controller('SettingsController', SettingsController) .config(['msalAuthenticationServiceProvider', function (msalProvider) { msalProvider.init({ clientID: 'dc10a864-9cb6-4b16-bd95-76ac06d9b6ab', authority: 'https://login.microsoftonline.com/5a0b86e1-3af7-4d16-a63e-afe55beab795', tokenReceivedCallback: function (errorDesc, token, error, tokenType) { if (error) { console.log("error received: in callback " + error) } //callback juga dihandle di core.controller }, optionalParams: { validateAuthority: true, redirectUri: window.location.origin+window.location.pathname+'#/page/portal', navigateToLoginRequestUrl : true, unprotectedResources : [], storeAuthStateInCookie: true }, routeProtectionConfig: { popUp: true, consentScopes: ["user.read"] } }); }]); function SettingsController($scope, settings, $rootScope) { // Restore/Save layout settings settings.loadAndWatch(); // Set scope for panel settings $scope.themes = settings.availableThemes(); $scope.setTheme = settings.setTheme; $rootScope.backendAddressIP = 'https://eproc.astra.co.id'; $rootScope.cmAppLink = 'https://eproc.astra.co.id/promisecmclient/dashboard.promise'; $rootScope.fileUploadSize = '10485760'; $rootScope.fileTypeImg = 'jpg,jpeg,png,img,gif'; $rootScope.fileTypeDoc = 'pdf,xls,xlsx,doc,docx,txt,jpg,jpeg,png,zip'; $rootScope.backendAddress = $rootScope.backendAddressIP + "/promisews"; $rootScope.salt = 'bfcd13d88b8f05a3b91c7f77dc20c366'; $rootScope.iv = '4bf264874e8e0b0f46e55616f2c76187'; $rootScope.passphrase = 'uWo5rx!y'; $rootScope.uploadBackendAddress = $rootScope.backendAddress + "/procurement/file/upload"; $rootScope.viewUploadBackendAddress = $rootScope.backendAddress + "/file/view"; $rootScope.forumAppLink = $rootScope.backendAddressIP + "/forum/"; $rootScope.cartList = []; // Vendor Update Status Constanta $rootScope.vendorStatus = { daftar: 0, approve: 1, blackList: 2 } } SettingsController.$inject = ['$scope', 'settings', '$rootScope']; })();