@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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sgcloud-sgsistemas/base",
3
- "version": "1.0.20",
3
+ "version": "1.0.21",
4
4
  "description": "Base para os sistemas da mobiage",
5
5
  "repository": {
6
6
  "type": "private",
@@ -1,6 +1,6 @@
1
1
  import CryptoJS from 'crypto-js'
2
2
 
3
- export namespace SessionStorageBase {
3
+ export namespace SessionStorage {
4
4
  const CIPHER_SECRET = process.env.CIPHER_SECRET
5
5
 
6
6
  export function setItem(key, value) {
@@ -1,4 +1,4 @@
1
- import { SessionStorageBase } from "../../../../../helper/namespaces/sessionstoragebase";
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 SessionStorageBase.getItem("isCompanyInvalid")
276
+ return SessionStorage.getItem("isCompanyInvalid")
277
277
  };
278
278
 
279
279
  this.$onInit = () => {
@@ -1,4 +1,4 @@
1
- import { SessionStorageBase } from "../../../../../helper/namespaces/sessionstoragebase";
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
- SessionStorageBase.getItem('user').login,
199
- SessionStorageBase.getItem('user').token
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(SessionStorageBase.getItem('LoginConfiguration').appUrl);
228
+ mbUserService.initAppUrl(SessionStorage.getItem('LoginConfiguration').appUrl);
229
229
  $scope.user = mbUserService.getUser();
230
- if (SessionStorageBase.getItem('currentCompany')) {
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 (SessionStorageBase.getItem('currentCompany')) {
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 = SessionStorageBase.getItem('currentCompany').data
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 { SessionStorageBase } from "../../../helper/namespaces/sessionstoragebase";
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(SessionStorageBase.getItem('online-status'))
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(SessionStorageBase.getItem('online-status'))
25
- SessionStorageBase.setItem('online-status', JSON.stringify({change: true, online: !(onlineStatus && onlineStatus.online)}))
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
 
@@ -201,9 +201,6 @@
201
201
  font-weight: 700;
202
202
  color: white;
203
203
  }
204
- .right {
205
- right: -8px!important;
206
- }
207
204
  .mb-tn-number, i.bell {
208
205
  transition: transform 350ms ease;
209
206
  }
@@ -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 right"
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) }}