@itilite/iui-user-management 1.4.964-beta.7 → 1.4.965

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.
@@ -1,4 +1,4 @@
1
- import { IUIAsyncSelect, IUIBox, IUILabel, IUIFileUpload, IUICheckboxButton, IUIPhone, IUISelect, IUIDatePicker, IUIInput, IUIGrid, IUIDivider, IUITypography, IUIRadio, IUIButton, IUIModal, IUISearch, IUICircularProgress, IUIAccordion, IUIAccordionSummary, IUIAccordionDetails, IUICard, IUIBackdrop, IUIBreadCrumb, IUIDropdownButton, IUIDropzone, IUIStepper, IUIIconButton, IUIFormControlLabel, IUICheckBox, IUIPrimaryRadio, IUITable, IUISkeleton, IUIProfileBox, IUIFormGroup, IUITabs } from '@itilite/iuistyles';
1
+ import { IUIAsyncSelect, IUIBox, IUILabel, IUIFileUpload, IUICheckboxButton, IUIPhone, IUISelect, IUIDatePicker, IUIInput, IUIGrid, IUIDivider, IUITypography, IUITooltip, IUIRadio, IUIButton, IUIModal, IUISearch, IUICircularProgress, IUIAccordion, IUIAccordionSummary, IUIAccordionDetails, IUICard, IUIBackdrop, IUIBreadCrumb, IUIDropdownButton, IUIDropzone, IUIStepper, IUIIconButton, IUIFormControlLabel, IUICheckBox, IUIPrimaryRadio, IUITable, IUISkeleton, IUIProfileBox, IUIFormGroup, IUITabs } from '@itilite/iuistyles';
2
2
  import React, { useState, Fragment as Fragment$1, useEffect, memo, useRef } from 'react';
3
3
  import { configs, services, utilUrls } from '@itilite/utils';
4
4
  import axios from 'axios';
@@ -3077,6 +3077,9 @@ var TravelExpenseFields = function TravelExpenseFields(props) {
3077
3077
  var paymentDetails = useSelector(function (state) {
3078
3078
  return state.userAddEdit.paymentDetails;
3079
3079
  });
3080
+ var isItiliteAdminRoleRestricted = type === 'travel' && roles.some(function (role) {
3081
+ return (role === null || role === void 0 ? void 0 : role.name) === 'travel_itilite_admin';
3082
+ });
3080
3083
  var openEditAproverModal = function openEditAproverModal() {
3081
3084
  setOpenEditAproverModalFlag(true);
3082
3085
  };
@@ -3184,7 +3187,16 @@ var TravelExpenseFields = function TravelExpenseFields(props) {
3184
3187
  }, isProfile ? /*#__PURE__*/React.createElement(UserRole, {
3185
3188
  list: roles,
3186
3189
  value: roleValue
3187
- }) : /*#__PURE__*/React.createElement(IUIRadio, {
3190
+ }) : isItiliteAdminRoleRestricted ? /*#__PURE__*/React.createElement(IUITooltip, {
3191
+ tooltipText: "To change the role, please reach out to IT team"
3192
+ }, /*#__PURE__*/React.createElement(IUIGrid, {
3193
+ item: true
3194
+ }, /*#__PURE__*/React.createElement(IUIRadio, {
3195
+ list: roles,
3196
+ value: roleValue,
3197
+ onValueChange: onRoleChange,
3198
+ disabled: true
3199
+ }))) : /*#__PURE__*/React.createElement(IUIRadio, {
3188
3200
  list: roles,
3189
3201
  value: roleValue,
3190
3202
  onValueChange: onRoleChange