@rh-support/manage 1.0.15 → 1.0.17

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.
@@ -51,7 +51,7 @@ export const GroupUserPermissionsSelect = (props) => {
51
51
  }
52
52
  });
53
53
  function initialOptionsSelect(user) {
54
- if (user.write === true || user.org_admin === true) {
54
+ if (user.write === true) {
55
55
  return options.readWrite;
56
56
  }
57
57
  else if (user.access === true && user.write === false) {
@@ -72,6 +72,6 @@ export const GroupUserPermissionsSelect = (props) => {
72
72
  * 4. Non-org admins cannot see the manage tab itself and thus that check is not added.
73
73
  */
74
74
  return (React.createElement(React.Fragment, null,
75
- React.createElement(Select, { isDisabled: updateUsersFetch.isFetching || props.user.isOrgAdmin || !props.account.hasGroupACLs, className: "permissions-select", "aria-label": t('User permissions'), onToggle: onToggle, onSelect: onSelect, onClear: onClear, selections: option, isOpen: isOpen, "aria-labelledby": t('User permissions'), placeholderText: t('Select a permission') }, Object.keys(options).map((key) => (React.createElement(SelectOption, { key: key, value: options[key], "data-tracking-id": `group-user-permission-${key}` }, t(options[key]))))),
75
+ React.createElement(Select, { isDisabled: updateUsersFetch.isFetching || !props.account.hasGroupACLs, className: "permissions-select", "aria-label": t('User permissions'), onToggle: onToggle, onSelect: onSelect, onClear: onClear, selections: option, isOpen: isOpen, "aria-labelledby": t('User permissions'), placeholderText: t('Select a permission') }, Object.keys(options).map((key) => (React.createElement(SelectOption, { key: key, value: options[key], "data-tracking-id": `group-user-permission-${key}` }, t(options[key]))))),
76
76
  React.createElement(LoadingIndicator, { show: updateUsersFetch.isFetching, size: "xs" })));
77
77
  };
@@ -1 +1 @@
1
- {"version":3,"file":"ManageGroupUsers.d.ts","sourceRoot":"","sources":["../../../../../src/components/Groups/ManageGroupUsers/ManageGroupUsers.tsx"],"names":[],"mappings":"AAsBA,eAAO,MAAM,gBAAgB,mBAkM5B,CAAC"}
1
+ {"version":3,"file":"ManageGroupUsers.d.ts","sourceRoot":"","sources":["../../../../../src/components/Groups/ManageGroupUsers/ManageGroupUsers.tsx"],"names":[],"mappings":"AAsBA,eAAO,MAAM,gBAAgB,mBAmM5B,CAAC"}
@@ -93,9 +93,7 @@ export const ManageGroupUsers = () => {
93
93
  {
94
94
  id: 'permissions',
95
95
  title: t('Permissions'),
96
- cell: (user) => {
97
- return (React.createElement(GroupUserPermissionsSelect, { onChange: onPermissionsChange, account: loggedInUsersAccount.data, group: selectedGroup, users: data, user: user, onError: onPermissionError }));
98
- },
96
+ cell: (user) => user.isOrgAdmin ? (t('Admin/Full access')) : (React.createElement(GroupUserPermissionsSelect, { onChange: onPermissionsChange, account: loggedInUsersAccount.data, group: selectedGroup, users: data, user: user, onError: onPermissionError })),
99
97
  },
100
98
  {
101
99
  id: 'default',
@@ -1 +1 @@
1
- {"version":3,"file":"PreferencesCaseView.d.ts","sourceRoot":"","sources":["../../../../../src/components/ManagePreferences/sections/PreferencesCaseView.tsx"],"names":[],"mappings":"AAyBA,UAAU,MAAM;CAAG;AAEnB,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,MAAM,eAkRhD"}
1
+ {"version":3,"file":"PreferencesCaseView.d.ts","sourceRoot":"","sources":["../../../../../src/components/ManagePreferences/sections/PreferencesCaseView.tsx"],"names":[],"mappings":"AAyBA,UAAU,MAAM;CAAG;AAEnB,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,MAAM,eA6RhD"}
@@ -110,7 +110,7 @@ export function PreferencesCaseView(props) {
110
110
  setLocalCommentSignature(value);
111
111
  setIsCommentSignatureLoading(false);
112
112
  });
113
- const onPrefCaseViewSelect = (event, selection, isPlaceholder) => __awaiter(this, void 0, void 0, function* () {
113
+ const onPrefCaseViewSelect = (event, selection) => __awaiter(this, void 0, void 0, function* () {
114
114
  try {
115
115
  let selectedView = event.currentTarget.getAttribute('data-index');
116
116
  updateOriginalCaseView(selectedView);
@@ -120,9 +120,10 @@ export function PreferencesCaseView(props) {
120
120
  console.log(error);
121
121
  }
122
122
  });
123
- const onCommentSelect = (event, selection, isPlaceholder) => __awaiter(this, void 0, void 0, function* () {
123
+ const onCommentSelect = (event, selection) => __awaiter(this, void 0, void 0, function* () {
124
124
  try {
125
125
  yield updateCommentType(selection);
126
+ setOriginalCommentType(selection);
126
127
  }
127
128
  catch (error) {
128
129
  console.log(error);
@@ -170,6 +171,15 @@ export function PreferencesCaseView(props) {
170
171
  React.createElement(Popover, { "aria-label": "Preferred-default-case-view-popover", position: PopoverPosition.top, bodyContent: React.createElement("p", { className: 'pref-case-popover-text' },
171
172
  React.createElement(Trans, null, "Choose the default view you want to see when looking at a case")), showClose: false },
172
173
  React.createElement(InfoCircleIcon, { "aria-label": "Preferred-default-case-view-info-icon", className: "pf-u-ml-sm" }))));
174
+ // To set the case of text in dropdown
175
+ const setOptionCase = (option) => {
176
+ if (option === 'plaintext') {
177
+ return 'Plain text';
178
+ }
179
+ else if (option === 'markdown') {
180
+ return 'Markdown';
181
+ }
182
+ };
173
183
  return (React.createElement(Card, { className: "preference-card" },
174
184
  React.createElement(CardHeader, null,
175
185
  React.createElement("h3", null,
@@ -179,7 +189,7 @@ export function PreferencesCaseView(props) {
179
189
  isInternalUserPermission && (React.createElement("div", { className: "form-group" },
180
190
  React.createElement(PreferenceSelect, { onSelect: onPrefCaseViewSelect, selections: caseViewPrefSelection(), id: defaultCaseViewID, label: prefCasePopover }, caseViewTypes.map((option, index) => (React.createElement(SelectOption, Object.assign({ "data-index": index, key: index, value: option.value }, (option.description && { description: option.description })))))))),
181
191
  React.createElement("div", { className: "form-group" },
182
- React.createElement(PreferenceSelect, { onSelect: onCommentSelect, selections: originalCommentType, id: defaultCommentTitleID, label: "Default comment type" }, commentTypes.map((option, index) => (React.createElement(SelectOption, { key: index, value: option }))))),
192
+ React.createElement(PreferenceSelect, { onSelect: onCommentSelect, selections: setOptionCase(originalCommentType), id: defaultCommentTitleID, label: "Default comment type" }, commentTypes.map((option, index) => (React.createElement(SelectOption, { key: index, value: setOptionCase(option) }))))),
183
193
  React.createElement("div", { className: "form-group" },
184
194
  React.createElement("label", { htmlFor: "comment-signature-textarea" },
185
195
  React.createElement(Trans, null, "Comment signature")),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rh-support/manage",
3
- "version": "1.0.15",
3
+ "version": "1.0.17",
4
4
  "description": "Customer Support Manage App",
5
5
  "author": "Jordan Eudy <jeudy100@gmail.com>",
6
6
  "homepage": "",
@@ -109,5 +109,5 @@
109
109
  "react-i18next": ">=10.11.0",
110
110
  "react-router-dom": ">=5.1.2"
111
111
  },
112
- "gitHead": "30ff95d969e84721b15571f7dd99a617db8956f8"
112
+ "gitHead": "be6f046487e4200cfa92a657336e9ac0526103d6"
113
113
  }