@sgcloud-sgsistemas/base 1.0.20 → 1.0.21
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/mobiage-base.min.css +2 -0
- package/dist/mobiage-base.min.css.map +1 -0
- package/dist/mobiage-base.min.js +8 -0
- package/dist/mobiage-base.min.js.map +1 -0
- package/package.json +1 -1
- package/src/helper/namespaces/{sessionstoragebase.ts → sessionstorage.ts} +1 -1
- package/src/modules/topbar/components/search/controllers/search.controller.js +2 -2
- package/src/modules/topbar/components/user/controllers/user.controller.js +7 -7
- package/src/modules/topbar/controllers/topbar.controller.js +4 -4
- package/src/modules/topbar/styles/topbar.style.scss +0 -3
- package/src/modules/topbar/templates/topbar.template.html +1 -1
package/package.json
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { SessionStorage } from "../../../../../helper/namespaces/sessionstorage";
|
|
2
2
|
|
|
3
3
|
const controller = function ($scope, $timeout, mbSidemenuService, hotkeys) {
|
|
4
4
|
$scope.searchValue = '';
|
|
@@ -273,7 +273,7 @@ const controller = function ($scope, $timeout, mbSidemenuService, hotkeys) {
|
|
|
273
273
|
$scope.onFocusInput = () => { };
|
|
274
274
|
|
|
275
275
|
$scope.isCompanyInvalid = () => {
|
|
276
|
-
return
|
|
276
|
+
return SessionStorage.getItem("isCompanyInvalid")
|
|
277
277
|
};
|
|
278
278
|
|
|
279
279
|
this.$onInit = () => {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { SessionStorage } from "../../../../../helper/namespaces/sessionstorage";
|
|
2
2
|
import Swal from 'sweetalert2'
|
|
3
3
|
|
|
4
4
|
const controller = function ($scope, $timeout, mbUserService, $state) {
|
|
@@ -195,8 +195,8 @@ const controller = function ($scope, $timeout, mbUserService, $state) {
|
|
|
195
195
|
let result = (await mbUserService.validTime(
|
|
196
196
|
$scope.user.otherOrganizations[$scope.organizationSelected].organizationHierarchyCode ||
|
|
197
197
|
$scope.user.otherOrganizations[$scope.organizationSelected].hierarchyCode,
|
|
198
|
-
|
|
199
|
-
|
|
198
|
+
SessionStorage.getItem('user').login,
|
|
199
|
+
SessionStorage.getItem('user').token
|
|
200
200
|
)).data
|
|
201
201
|
if(!result.valid){
|
|
202
202
|
$scope.outOfHourAccess(result.nextAccess || 'Próximo acesso: nunca. Entre em contato com o superior.')
|
|
@@ -225,9 +225,9 @@ const controller = function ($scope, $timeout, mbUserService, $state) {
|
|
|
225
225
|
this.$onInit = () => {
|
|
226
226
|
mbUserService.setComponentCallback((user) => { $scope.user = user; });
|
|
227
227
|
mbUserService.setUser(this.config);
|
|
228
|
-
mbUserService.initAppUrl(
|
|
228
|
+
mbUserService.initAppUrl(SessionStorage.getItem('LoginConfiguration').appUrl);
|
|
229
229
|
$scope.user = mbUserService.getUser();
|
|
230
|
-
if (
|
|
230
|
+
if (SessionStorage.getItem('currentCompany')) {
|
|
231
231
|
$scope.setCompanyInfo()
|
|
232
232
|
} else {
|
|
233
233
|
$scope.setCompanyInfoRecursive()
|
|
@@ -237,7 +237,7 @@ const controller = function ($scope, $timeout, mbUserService, $state) {
|
|
|
237
237
|
|
|
238
238
|
$scope.setCompanyInfoRecursive = () => {
|
|
239
239
|
$timeout(() => {
|
|
240
|
-
if (
|
|
240
|
+
if (SessionStorage.getItem('currentCompany')) {
|
|
241
241
|
$scope.setCompanyInfo()
|
|
242
242
|
} else {
|
|
243
243
|
$scope.setCompanyInfoRecursive()
|
|
@@ -246,7 +246,7 @@ const controller = function ($scope, $timeout, mbUserService, $state) {
|
|
|
246
246
|
}
|
|
247
247
|
|
|
248
248
|
$scope.setCompanyInfo = () => {
|
|
249
|
-
$scope.currentCompany =
|
|
249
|
+
$scope.currentCompany = SessionStorage.getItem('currentCompany').data
|
|
250
250
|
$scope.menu = {info:[
|
|
251
251
|
{title: 'Usuário', text: $scope.user.name},
|
|
252
252
|
{title: 'Nome abreviado', text: $scope.currentCompany.shortName},
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { SessionStorage } from "../../../helper/namespaces/sessionstorage";
|
|
2
2
|
|
|
3
3
|
const controller = function (mbSidemenuService) {
|
|
4
4
|
const vm = this;
|
|
@@ -16,13 +16,13 @@ const controller = function (mbSidemenuService) {
|
|
|
16
16
|
}
|
|
17
17
|
|
|
18
18
|
vm.isOnline = () => {
|
|
19
|
-
const onlineStatus = JSON.parse(
|
|
19
|
+
const onlineStatus = JSON.parse(SessionStorage.getItem('online-status'))
|
|
20
20
|
return onlineStatus && onlineStatus.online
|
|
21
21
|
}
|
|
22
22
|
|
|
23
23
|
vm.changeStatusOnline = () => {
|
|
24
|
-
const onlineStatus = JSON.parse(
|
|
25
|
-
|
|
24
|
+
const onlineStatus = JSON.parse(SessionStorage.getItem('online-status'))
|
|
25
|
+
SessionStorage.setItem('online-status', JSON.stringify({change: true, online: !(onlineStatus && onlineStatus.online)}))
|
|
26
26
|
}
|
|
27
27
|
};
|
|
28
28
|
|
|
@@ -58,7 +58,7 @@
|
|
|
58
58
|
ng-click="vm.config.usersBirthday.onClick(vm.config.usersBirthday.users)"
|
|
59
59
|
ng-if="vm.config.showBirthday">
|
|
60
60
|
<i class="fas fa-gift" tabindex="-1"></i>
|
|
61
|
-
<div class="mb-tn-number
|
|
61
|
+
<div class="mb-tn-number"
|
|
62
62
|
tabindex="-1"
|
|
63
63
|
ng-show="vm.config.usersBirthday.count(vm.config.usersBirthday.users) > 0">
|
|
64
64
|
{{ vm.config.usersBirthday.count(vm.config.usersBirthday.users) }}
|