@sgcloud-sgsistemas/base 1.3.3 → 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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sgcloud-sgsistemas/base",
3
- "version": "1.3.3",
3
+ "version": "1.3.5",
4
4
  "description": "Base para os sistemas da mobiage",
5
5
  "repository": {
6
6
  "type": "private",
@@ -6,7 +6,9 @@
6
6
  'hover':vm.openedIndexSub == undefined,
7
7
  }">
8
8
  <modules ng-if="!vm.ngifHide">
9
- <module main="true" ng-click="vm.onClickMain()">
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="$first && !!module.children && !module.children.length">
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="$first && !!module.children && module.children.length"
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="!$first">
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)">
@@ -29,6 +29,7 @@ type Module = {
29
29
  icon?: string;
30
30
  children?: SubModule[];
31
31
  hide?: boolean;
32
+ isFavoritesModule?: boolean;
32
33
  };
33
34
 
34
35
  type SubModule = ({
@@ -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
- $scope.user.otherOrganizations[$scope.organizationSelected].organizationHierarchyCode ||
197
- $scope.user.otherOrganizations[$scope.organizationSelected].hierarchyCode,
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($scope.user.otherOrganizations[$scope.organizationSelected]);
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: 10px 15px 10px 10px;
859
+ padding: 14px 15px 14px 10px;
859
860
  align-items: center;
860
861
  flex-direction: row;
861
862
  font-weight: 700;
@@ -62,7 +62,7 @@
62
62
  tabindex="-1"
63
63
  ng-click="vm.config.usersBirthday.onClick(vm.config.usersBirthday.users)"
64
64
  ng-if="vm.config.showBirthday">
65
- <i class="fas fa-gift" tabindex="-1"></i>
65
+ <i class="fas fa-gift" uib-tooltip="Aniversariantes" tooltip-append-to-body="true" tooltip-placement="bottom" tabindex="-1"></i>
66
66
  <div class="mb-tn-number right"
67
67
  tabindex="-1"
68
68
  ng-show="vm.config.usersBirthday.count(vm.config.usersBirthday.users) > 0">
@@ -70,7 +70,7 @@
70
70
  </div>
71
71
  </div>
72
72
 
73
- <mb-topbar-notifications tabindex="-1"></mb-topbar-notifications>
73
+ <mb-topbar-notifications tabindex="-1" uib-tooltip="Notificações" tooltip-append-to-body="true" tooltip-placement="bottom"></mb-topbar-notifications>
74
74
 
75
75
  <div class="sg-mode-on-wrapper"
76
76
  tabindex="-1"