@sgcloud-sgsistemas/base 1.3.6 → 1.3.8

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.6",
3
+ "version": "1.3.8",
4
4
  "description": "Base para os sistemas da mobiage",
5
5
  "repository": {
6
6
  "type": "private",
@@ -39,7 +39,8 @@
39
39
  bottom: auto;
40
40
  width: 100%;
41
41
  max-width: 900px;
42
- height: 60px;
42
+ min-height: 60px;
43
+ max-height: 80px;
43
44
  padding-top: 10px;
44
45
  transform: translateX(-50%);
45
46
  z-index: 23800;
@@ -150,6 +151,8 @@
150
151
  }
151
152
 
152
153
  &.mb-n-float {
154
+ min-height: 60px;
155
+ max-height: 80px;
153
156
  border-radius: 5px;
154
157
  opacity: 0;
155
158
  transform: perspective(400px) translateY(-30%);
@@ -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;