@sgcloud-sgsistemas/base 1.3.4 → 1.3.5
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/modules/side-menu/components/hotbar/hotbar.html +6 -4
- package/src/modules/side-menu/components/hotbar/interface/config.ts +1 -0
- package/src/modules/topbar/components/user/controllers/user.controller.js +12 -3
- package/src/modules/topbar/components/user/styles/user.style.scss +2 -1
package/package.json
CHANGED
|
@@ -6,7 +6,9 @@
|
|
|
6
6
|
'hover':vm.openedIndexSub == undefined,
|
|
7
7
|
}">
|
|
8
8
|
<modules ng-if="!vm.ngifHide">
|
|
9
|
-
<module main="true"
|
|
9
|
+
<module main="true"
|
|
10
|
+
ng-if="!vm.config.quickMenu || vm.config.quickMenu.enabled !== false"
|
|
11
|
+
ng-click="vm.onClickMain()">
|
|
10
12
|
<div>
|
|
11
13
|
<i class="{{vm.config.quickMenu.icon || 'fas fa-times'}}"></i>
|
|
12
14
|
<label>{{vm.config.quickMenu.buttonText}}</label>
|
|
@@ -38,7 +40,7 @@
|
|
|
38
40
|
|
|
39
41
|
<sub-module id="sg-hotbar-sub-modules-{{$index}}"
|
|
40
42
|
class="favorite-module"
|
|
41
|
-
ng-if="
|
|
43
|
+
ng-if="module.isFavoritesModule && !!module.children && !module.children.length">
|
|
42
44
|
<div>
|
|
43
45
|
<label ng-click="vm.goToFavoritesConfig()">
|
|
44
46
|
Não há favoritos configurados
|
|
@@ -49,7 +51,7 @@
|
|
|
49
51
|
<sub-module id="sg-hotbar-sub-modules-{{$index}}"
|
|
50
52
|
class="favorite-module"
|
|
51
53
|
ng-style="::vm.getSubModuleStyle($index)"
|
|
52
|
-
ng-if="
|
|
54
|
+
ng-if="module.isFavoritesModule && !!module.children && module.children.length"
|
|
53
55
|
ng-class="{'has-forced-hover': vm.openedFavoriteGroupIndex !== undefined }">
|
|
54
56
|
<div ng-repeat="favoriteGroup in module.children"
|
|
55
57
|
ng-if="!favoriteGroup.hide && favoriteGroup.children"
|
|
@@ -70,7 +72,7 @@
|
|
|
70
72
|
|
|
71
73
|
<sub-module ng-style="::vm.getSubModuleStyle($index)"
|
|
72
74
|
id="sg-hotbar-sub-modules-{{$index}}"
|
|
73
|
-
ng-if="
|
|
75
|
+
ng-if="!module.isFavoritesModule">
|
|
74
76
|
<div ng-repeat="subModule in module.children"
|
|
75
77
|
ng-if="!subModule.hide"
|
|
76
78
|
ng-click="vm.onSubModuleSelected(subModule, false, $event)">
|
|
@@ -188,13 +188,22 @@ const controller = function ($scope, $timeout, mbUserService, $state) {
|
|
|
188
188
|
|
|
189
189
|
$scope.changeOrganization = async () => {
|
|
190
190
|
if ($scope.organizationSelected !== undefined) {
|
|
191
|
+
const selectedOrganization = $scope.user.otherOrganizations[$scope.organizationSelected];
|
|
192
|
+
const confirmation = await Swal.fire({
|
|
193
|
+
text: `Deseja trocar para a empresa "${selectedOrganization.name}"?`,
|
|
194
|
+
showCancelButton: true,
|
|
195
|
+
confirmButtonText: 'Sim',
|
|
196
|
+
cancelButtonText: 'Não',
|
|
197
|
+
reverseButtons: true
|
|
198
|
+
});
|
|
199
|
+
if (!confirmation.isConfirmed) return;
|
|
191
200
|
if (!$scope.user.changeOrganizationAction) {
|
|
192
201
|
mbUserService.setUser(this.config);
|
|
193
202
|
$scope.user = mbUserService.getUser();
|
|
194
203
|
}
|
|
195
204
|
let result = (await mbUserService.validTime(
|
|
196
|
-
|
|
197
|
-
|
|
205
|
+
selectedOrganization.organizationHierarchyCode ||
|
|
206
|
+
selectedOrganization.hierarchyCode,
|
|
198
207
|
SessionStorageBase.getItem('user').login,
|
|
199
208
|
SessionStorageBase.getItem('user').token
|
|
200
209
|
)).data
|
|
@@ -202,7 +211,7 @@ const controller = function ($scope, $timeout, mbUserService, $state) {
|
|
|
202
211
|
$scope.outOfHourAccess(result.nextAccess || 'Próximo acesso: nunca. Entre em contato com o superior.')
|
|
203
212
|
return
|
|
204
213
|
} else {
|
|
205
|
-
$scope.user.changeOrganizationAction(
|
|
214
|
+
$scope.user.changeOrganizationAction(selectedOrganization);
|
|
206
215
|
}
|
|
207
216
|
}
|
|
208
217
|
};
|
|
@@ -852,10 +852,11 @@
|
|
|
852
852
|
}
|
|
853
853
|
.mb-tu-m-ca-company {
|
|
854
854
|
width: 100%;
|
|
855
|
+
min-height: 64px;
|
|
855
856
|
display: flex;
|
|
856
857
|
justify-content: flex-start;
|
|
857
858
|
font-size: 14px;
|
|
858
|
-
padding:
|
|
859
|
+
padding: 14px 15px 14px 10px;
|
|
859
860
|
align-items: center;
|
|
860
861
|
flex-direction: row;
|
|
861
862
|
font-weight: 700;
|