diff --git a/admin/app/controllers/settings/costcenter/cost-file.controller.js b/admin/app/controllers/settings/costcenter/cost-file.controller.js index 1691fefc..0cad0e27 100644 --- a/admin/app/controllers/settings/costcenter/cost-file.controller.js +++ b/admin/app/controllers/settings/costcenter/cost-file.controller.js @@ -1,6 +1,17 @@ 'use strict'; -app.controller('CostFileController', function ($scope, $common, $cookies, $translate, $uibModal, $interval, CostFileService, toaster, SweetAlert) { +app.controller('CostFileController', function ( + $scope, + $window, + $common, + $translate, + $uibModal, + $interval, + CostFileService, + toaster, + SweetAlert) { + + $scope.cur_user = JSON.parse($window.localStorage.getItem("currentUser")); $scope.getAllCostFiles = function () { CostFileService.getAllCostFiles(function (error, data) { @@ -18,7 +29,7 @@ app.controller('CostFileController', function ($scope, $common, $cookies, $trans acceptedFiles: '.xlsx', dictDefaultMessage: 'Click(or Drop) to add files', maxFilesize: '100', - headers: { "User-UUID": $cookies.get("user_uuid"), "Token": $cookies.get("token") } + headers: { "User-UUID": $scope.cur_user.uuid, "Token": $scope.cur_user.token } }; $scope.dzCallbacks = {