@sgcloud-sgsistemas/base 1.0.18 → 1.0.20
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 +1 -1
- package/src/helper/namespaces/{sessionstorage.ts → sessionstoragebase.ts} +1 -1
- package/src/modules/side-menu/components/hotbar/hotbar.ts +16 -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 +3 -0
- package/src/modules/topbar/templates/topbar.template.html +1 -1
package/package.json
CHANGED
|
@@ -63,6 +63,9 @@ class HotbarController {
|
|
|
63
63
|
if (this.sgElement.find(ev.target).length == 0 && this.openedIndexSub != undefined) {
|
|
64
64
|
$(this.modules[this.openedIndexSub]).removeClass('force-open-sub')
|
|
65
65
|
this.openedIndexSub = undefined
|
|
66
|
+
try{
|
|
67
|
+
this.$scope.$digest()
|
|
68
|
+
}catch{}
|
|
66
69
|
}
|
|
67
70
|
}
|
|
68
71
|
|
|
@@ -200,24 +203,36 @@ class HotbarController {
|
|
|
200
203
|
if (this.openedIndexSub) $(this.modules[this.openedIndexSub]).removeClass('force-open-sub')
|
|
201
204
|
$(element).addClass('force-open-sub')
|
|
202
205
|
this.openedIndexSub = index
|
|
203
|
-
|
|
206
|
+
} else {
|
|
204
207
|
const quickMenuSize: number = this.config.quickMenu!.links.length
|
|
205
208
|
this.__onClickSubModule(-1, index - 1)
|
|
206
209
|
this.currentIndexSelection = (this.currentIndexSelection + index) % (quickMenuSize + 1)
|
|
207
210
|
}
|
|
211
|
+
try{
|
|
212
|
+
this.$scope.$digest()
|
|
213
|
+
}catch{}
|
|
208
214
|
}
|
|
209
215
|
|
|
210
216
|
private reloadComponent() {
|
|
211
217
|
const menuState: boolean = this.open;
|
|
212
218
|
this.open = false;
|
|
213
219
|
this.forceHide = true;
|
|
220
|
+
try{
|
|
221
|
+
this.$scope.$digest()
|
|
222
|
+
}catch{}
|
|
214
223
|
this.$timeout((): void => {
|
|
215
224
|
this.ngifHide = true;
|
|
216
225
|
this.forceHide = false;
|
|
226
|
+
try{
|
|
227
|
+
this.$scope.$digest()
|
|
228
|
+
}catch{}
|
|
217
229
|
this.$timeout((): void => {
|
|
218
230
|
this.$timeout((): void => {
|
|
219
231
|
this.ngifHide = false;
|
|
220
232
|
this.open = menuState;
|
|
233
|
+
try{
|
|
234
|
+
this.$scope.$digest()
|
|
235
|
+
}catch{}
|
|
221
236
|
});
|
|
222
237
|
});
|
|
223
238
|
}, 300);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { SessionStorageBase } from "../../../../../helper/namespaces/sessionstoragebase";
|
|
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 SessionStorageBase.getItem("isCompanyInvalid")
|
|
277
277
|
};
|
|
278
278
|
|
|
279
279
|
this.$onInit = () => {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { SessionStorageBase } from "../../../../../helper/namespaces/sessionstoragebase";
|
|
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
|
+
SessionStorageBase.getItem('user').login,
|
|
199
|
+
SessionStorageBase.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(SessionStorageBase.getItem('LoginConfiguration').appUrl);
|
|
229
229
|
$scope.user = mbUserService.getUser();
|
|
230
|
-
if (
|
|
230
|
+
if (SessionStorageBase.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 (SessionStorageBase.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 = SessionStorageBase.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 { SessionStorageBase } from "../../../helper/namespaces/sessionstoragebase";
|
|
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(SessionStorageBase.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(SessionStorageBase.getItem('online-status'))
|
|
25
|
+
SessionStorageBase.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 right"
|
|
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) }}
|