@bigbinary/neeto-team-members-frontend 2.3.0 → 2.3.1
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/README.md +1 -1
- package/dist/index.cjs.js +49 -56
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +49 -56
- package/dist/index.esm.js.map +1 -1
- package/package.json +6 -4
- package/types.d.ts +59 -0
package/dist/index.esm.js
CHANGED
|
@@ -4221,11 +4221,11 @@ instance.use(Browser).use(initReactI18next).init({
|
|
|
4221
4221
|
});
|
|
4222
4222
|
|
|
4223
4223
|
const hasPermission = function () {
|
|
4224
|
-
var _window$globalProps
|
|
4224
|
+
var _window$globalProps;
|
|
4225
4225
|
|
|
4226
4226
|
let permissions = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : "";
|
|
4227
4227
|
const type = typeof permissions;
|
|
4228
|
-
const userPermissions = (
|
|
4228
|
+
const userPermissions = ((_window$globalProps = window.globalProps) === null || _window$globalProps === void 0 ? void 0 : _window$globalProps.permissions) ?? [];
|
|
4229
4229
|
|
|
4230
4230
|
if (Object.is(type, "string")) {
|
|
4231
4231
|
return userPermissions.includes(permissions);
|
|
@@ -9326,14 +9326,14 @@ const COLUMN_DATA = [{
|
|
|
9326
9326
|
title: instance.t("helpers.noOfRows"),
|
|
9327
9327
|
dataIndex: "rows_count",
|
|
9328
9328
|
key: "rows_count",
|
|
9329
|
-
render: rows_count => rows_count
|
|
9329
|
+
render: rows_count => rows_count ?? "-",
|
|
9330
9330
|
width: 120,
|
|
9331
9331
|
align: "center"
|
|
9332
9332
|
}, {
|
|
9333
9333
|
title: instance.t("helpers.uploaded"),
|
|
9334
9334
|
dataIndex: "uploaded_by",
|
|
9335
9335
|
key: "uploaded_by",
|
|
9336
|
-
render: (uploaded_by, row) =>
|
|
9336
|
+
render: (uploaded_by, row) => `${uploaded_by} at ${new Date(row.created_at).toLocaleString("en-US", DATETIME_OPTIONS)}`
|
|
9337
9337
|
}];
|
|
9338
9338
|
const SAMPLE_ROW_DATA = [{
|
|
9339
9339
|
key: "1",
|
|
@@ -9413,13 +9413,13 @@ const Csv = _ref => {
|
|
|
9413
9413
|
const BASE_URL = "team_members";
|
|
9414
9414
|
const INVITATIONS_URL = "neeto_invitations";
|
|
9415
9415
|
|
|
9416
|
-
const fetch$3 = params => axios.get(
|
|
9416
|
+
const fetch$3 = params => axios.get(`${INVITATIONS_URL}/invite_links`, {
|
|
9417
9417
|
params
|
|
9418
9418
|
});
|
|
9419
9419
|
|
|
9420
|
-
const create$2 = payload => axios.post(
|
|
9420
|
+
const create$2 = payload => axios.post(`${INVITATIONS_URL}/invite_links`, payload);
|
|
9421
9421
|
|
|
9422
|
-
const destroy$1 = (id, payload) => axios.delete(
|
|
9422
|
+
const destroy$1 = (id, payload) => axios.delete(`${INVITATIONS_URL}/invite_links/${id}`, payload);
|
|
9423
9423
|
|
|
9424
9424
|
const inviteLinksApi = {
|
|
9425
9425
|
fetch: fetch$3,
|
|
@@ -9427,9 +9427,9 @@ const inviteLinksApi = {
|
|
|
9427
9427
|
destroy: destroy$1
|
|
9428
9428
|
};
|
|
9429
9429
|
|
|
9430
|
-
const DEFAULT_STALE_TIME =
|
|
9430
|
+
const DEFAULT_STALE_TIME = 60_000; // 1 minute
|
|
9431
9431
|
|
|
9432
|
-
const INVITATIONS_STALE_TIME =
|
|
9432
|
+
const INVITATIONS_STALE_TIME = 3_600_000; //1 hour
|
|
9433
9433
|
|
|
9434
9434
|
const QUERY_KEYS = {
|
|
9435
9435
|
TEAMS: "neeto-team-members-teams",
|
|
@@ -9485,8 +9485,8 @@ var dist$1 = {exports: {}};
|
|
|
9485
9485
|
} (dist$1));
|
|
9486
9486
|
|
|
9487
9487
|
const renderTime = time => {
|
|
9488
|
-
if (time.days) return
|
|
9489
|
-
return
|
|
9488
|
+
if (time.days) return `${time.days}d ${time.hours}h`;else if (time.hours) return `${time.hours}h ${time.minutes}m`;
|
|
9489
|
+
return `${time.minutes}m ${time.seconds}s`;
|
|
9490
9490
|
};
|
|
9491
9491
|
|
|
9492
9492
|
const Timer = _ref => {
|
|
@@ -9532,7 +9532,7 @@ const InviteLink = _ref => {
|
|
|
9532
9532
|
const showInviteLink = inviteLink && new Date(inviteLink.expiresAt) > new Date();
|
|
9533
9533
|
|
|
9534
9534
|
const handleCopyInviteLink = () => {
|
|
9535
|
-
navigator.clipboard.writeText(
|
|
9535
|
+
navigator.clipboard.writeText(`${window.location.host}/neeto_invitations/${inviteLink.id}`);
|
|
9536
9536
|
Toastr.info(instance.t("helpers.copiedToClipboard"));
|
|
9537
9537
|
};
|
|
9538
9538
|
|
|
@@ -9690,7 +9690,7 @@ const Invitations = _ref => {
|
|
|
9690
9690
|
|
|
9691
9691
|
var index$2 = withReactQuery(Invitations);
|
|
9692
9692
|
|
|
9693
|
-
const fetch$2 = () => axios.get(
|
|
9693
|
+
const fetch$2 = () => axios.get(`${BASE_URL}/permissions`);
|
|
9694
9694
|
|
|
9695
9695
|
const permissionsApi = {
|
|
9696
9696
|
fetch: fetch$2
|
|
@@ -9708,13 +9708,13 @@ const useFetchPermissions = function () {
|
|
|
9708
9708
|
}, options));
|
|
9709
9709
|
};
|
|
9710
9710
|
|
|
9711
|
-
const fetch$1 = () => axios.get(
|
|
9711
|
+
const fetch$1 = () => axios.get(`${BASE_URL}/organization_roles`);
|
|
9712
9712
|
|
|
9713
|
-
const create$1 = payload => axios.post(
|
|
9713
|
+
const create$1 = payload => axios.post(`${BASE_URL}/organization_roles`, payload);
|
|
9714
9714
|
|
|
9715
|
-
const update$1 = (id, payload) => axios.patch(
|
|
9715
|
+
const update$1 = (id, payload) => axios.patch(`${BASE_URL}/organization_roles/${id}`, payload);
|
|
9716
9716
|
|
|
9717
|
-
const destroy = (id, payload) => axios.delete(
|
|
9717
|
+
const destroy = (id, payload) => axios.delete(`${BASE_URL}/organization_roles/${id}`, {
|
|
9718
9718
|
data: payload
|
|
9719
9719
|
});
|
|
9720
9720
|
|
|
@@ -11192,14 +11192,12 @@ const renderSearchProps = (searchString, setSearchString) => ({
|
|
|
11192
11192
|
return setSearchString(value);
|
|
11193
11193
|
}
|
|
11194
11194
|
});
|
|
11195
|
-
const renderBreadcrumbs = (breadcrumbs, membersPageUrl) => breadcrumbs
|
|
11195
|
+
const renderBreadcrumbs = (breadcrumbs, membersPageUrl) => breadcrumbs ?? [{
|
|
11196
11196
|
text: instance.t("metaNames.member", PLURAL),
|
|
11197
|
-
link: membersPageUrl
|
|
11197
|
+
link: membersPageUrl ?? "/members"
|
|
11198
11198
|
}];
|
|
11199
11199
|
|
|
11200
11200
|
const AddRoleButton = _ref => {
|
|
11201
|
-
var _permissions$create, _permissions$create2;
|
|
11202
|
-
|
|
11203
11201
|
let onClick = _ref.onClick,
|
|
11204
11202
|
permissions = _ref.permissions;
|
|
11205
11203
|
|
|
@@ -11208,7 +11206,7 @@ const AddRoleButton = _ref => {
|
|
|
11208
11206
|
|
|
11209
11207
|
return /*#__PURE__*/React.createElement(Tooltip, {
|
|
11210
11208
|
content: t("tooltips.noPermissionToAddRole"),
|
|
11211
|
-
disabled: (
|
|
11209
|
+
disabled: (permissions === null || permissions === void 0 ? void 0 : permissions.create) ?? hasPermission(MANAGE_MEMBER_PERMISSIONS),
|
|
11212
11210
|
position: "bottom"
|
|
11213
11211
|
}, /*#__PURE__*/React.createElement("span", null, /*#__PURE__*/React.createElement(Button, {
|
|
11214
11212
|
icon: Plus,
|
|
@@ -11217,7 +11215,7 @@ const AddRoleButton = _ref => {
|
|
|
11217
11215
|
what: t("common.role", SINGULAR).toLocaleLowerCase()
|
|
11218
11216
|
}),
|
|
11219
11217
|
onClick: onClick,
|
|
11220
|
-
disabled: !((
|
|
11218
|
+
disabled: !((permissions === null || permissions === void 0 ? void 0 : permissions.create) ?? hasPermission(MANAGE_MEMBER_PERMISSIONS)),
|
|
11221
11219
|
"data-cy": "new-role-button"
|
|
11222
11220
|
})));
|
|
11223
11221
|
};
|
|
@@ -11532,6 +11530,7 @@ const DEFAULT_MANAGE_ROLE_VALUES = {
|
|
|
11532
11530
|
};
|
|
11533
11531
|
|
|
11534
11532
|
const renderRolesTooltipContent = roleName => Object.is(roleName, "Admin") ? instance.t("tooltips.editAdminRoleNotAllowed") : instance.t("tooltips.noPermissionToEditRoles");
|
|
11533
|
+
const removeDuplicates = array => [...new Set(array)];
|
|
11535
11534
|
|
|
11536
11535
|
const Row = _ref => {
|
|
11537
11536
|
let _ref$allPermissionsOf = _ref.allPermissionsOfCategory,
|
|
@@ -11548,7 +11547,7 @@ const Row = _ref => {
|
|
|
11548
11547
|
|
|
11549
11548
|
const handleSubmit = (role, checked) => {
|
|
11550
11549
|
const permissionIds = allPermissionIdsOfCategory.length > 0 ? allPermissionIdsOfCategory : [permission.id];
|
|
11551
|
-
const modifiedRole = modify("permissionIds", () => checked ? [...role.permissionIds, ...permissionIds] : role.permissionIds.filter(id => !permissionIds.includes(id)), role);
|
|
11550
|
+
const modifiedRole = modify("permissionIds", () => checked ? removeDuplicates([...role.permissionIds, ...permissionIds]) : role.permissionIds.filter(id => !permissionIds.includes(id)), role);
|
|
11552
11551
|
updateRole({
|
|
11553
11552
|
id: role.id,
|
|
11554
11553
|
payload: {
|
|
@@ -11564,20 +11563,20 @@ const Row = _ref => {
|
|
|
11564
11563
|
"ntm-roles-table__row--highlighted": !!allPermissionsOfCategory
|
|
11565
11564
|
})
|
|
11566
11565
|
}, roles.map((role, index) => {
|
|
11567
|
-
var _config$permissions
|
|
11566
|
+
var _config$permissions, _config$permissions2;
|
|
11568
11567
|
|
|
11569
11568
|
return /*#__PURE__*/React.createElement("div", {
|
|
11570
11569
|
key: index,
|
|
11571
11570
|
className: "ntm-roles-table__cell"
|
|
11572
11571
|
}, /*#__PURE__*/React.createElement(Tooltip, {
|
|
11573
11572
|
content: renderRolesTooltipContent(role.name),
|
|
11574
|
-
disabled: ((
|
|
11573
|
+
disabled: ((config === null || config === void 0 ? void 0 : (_config$permissions = config.permissions) === null || _config$permissions === void 0 ? void 0 : _config$permissions.update) ?? DEFAULT_PERMISSION) && !identical(role.name, "Admin"),
|
|
11575
11574
|
position: "top"
|
|
11576
11575
|
}, /*#__PURE__*/React.createElement("div", {
|
|
11577
11576
|
className: "ntm-roles-table-cell__checkbox-wrapper"
|
|
11578
11577
|
}, /*#__PURE__*/React.createElement(Checkbox, {
|
|
11579
11578
|
className: "ntm-roles-table-cell__checkbox",
|
|
11580
|
-
disabled: identical(role.name, "Admin") || !((
|
|
11579
|
+
disabled: identical(role.name, "Admin") || !((config === null || config === void 0 ? void 0 : (_config$permissions2 = config.permissions) === null || _config$permissions2 === void 0 ? void 0 : _config$permissions2.update) ?? DEFAULT_PERMISSION),
|
|
11581
11580
|
checked: isCheckboxChecked(role),
|
|
11582
11581
|
onChange: _ref2 => {
|
|
11583
11582
|
let checked = _ref2.target.checked;
|
|
@@ -11614,11 +11613,11 @@ const TableHeader = _ref => {
|
|
|
11614
11613
|
}, /*#__PURE__*/React.createElement("div", {
|
|
11615
11614
|
className: "ntm-roles-table__header"
|
|
11616
11615
|
}, roles === null || roles === void 0 ? void 0 : roles.map((role, index) => {
|
|
11617
|
-
var _config$permissions
|
|
11616
|
+
var _config$permissions, _config$permissions2, _config$permissions3, _config$permissions4;
|
|
11618
11617
|
|
|
11619
11618
|
const hasSystemRole = Object.is(role.kind, "system");
|
|
11620
11619
|
return /*#__PURE__*/React.createElement("div", {
|
|
11621
|
-
key:
|
|
11620
|
+
key: `ntm-roles-${index}`,
|
|
11622
11621
|
className: "ntm-roles-table__cell"
|
|
11623
11622
|
}, /*#__PURE__*/React.createElement("div", {
|
|
11624
11623
|
className: "ntm-roles-table-header-cell__container"
|
|
@@ -11633,7 +11632,7 @@ const TableHeader = _ref => {
|
|
|
11633
11632
|
icon: MenuHorizontal
|
|
11634
11633
|
}, /*#__PURE__*/React.createElement(Tooltip, {
|
|
11635
11634
|
content: t("tooltips.noPermissionToEditRoles"),
|
|
11636
|
-
disabled: (
|
|
11635
|
+
disabled: (config === null || config === void 0 ? void 0 : (_config$permissions = config.permissions) === null || _config$permissions === void 0 ? void 0 : _config$permissions.update) ?? DEFAULT_PERMISSION,
|
|
11637
11636
|
position: "top"
|
|
11638
11637
|
}, /*#__PURE__*/React.createElement("li", {
|
|
11639
11638
|
className: "ntm-dropdown__item"
|
|
@@ -11643,12 +11642,12 @@ const TableHeader = _ref => {
|
|
|
11643
11642
|
isEdit: true,
|
|
11644
11643
|
selectedRole: role
|
|
11645
11644
|
}),
|
|
11646
|
-
disabled: !((
|
|
11645
|
+
disabled: !((config === null || config === void 0 ? void 0 : (_config$permissions2 = config.permissions) === null || _config$permissions2 === void 0 ? void 0 : _config$permissions2.update) ?? DEFAULT_PERMISSION),
|
|
11647
11646
|
style: "text",
|
|
11648
11647
|
className: "ntm-dropdown__button"
|
|
11649
11648
|
}))), !hasSystemRole && /*#__PURE__*/React.createElement(Tooltip, {
|
|
11650
11649
|
content: t("tooltips.noPermissionToRemoveRoles"),
|
|
11651
|
-
disabled: (
|
|
11650
|
+
disabled: (config === null || config === void 0 ? void 0 : (_config$permissions3 = config.permissions) === null || _config$permissions3 === void 0 ? void 0 : _config$permissions3.delete) ?? DEFAULT_PERMISSION,
|
|
11652
11651
|
position: "bottom"
|
|
11653
11652
|
}, /*#__PURE__*/React.createElement("li", {
|
|
11654
11653
|
className: "ntm-dropdown__item"
|
|
@@ -11658,7 +11657,7 @@ const TableHeader = _ref => {
|
|
|
11658
11657
|
isDelete: true,
|
|
11659
11658
|
selectedRole: role
|
|
11660
11659
|
}),
|
|
11661
|
-
disabled: !((
|
|
11660
|
+
disabled: !((config === null || config === void 0 ? void 0 : (_config$permissions4 = config.permissions) === null || _config$permissions4 === void 0 ? void 0 : _config$permissions4.delete) ?? DEFAULT_PERMISSION),
|
|
11662
11661
|
style: "danger-text",
|
|
11663
11662
|
className: "ntm-dropdown__button"
|
|
11664
11663
|
}))))));
|
|
@@ -11856,9 +11855,9 @@ const renderDescription = permissions => permissions === null || permissions ===
|
|
|
11856
11855
|
});
|
|
11857
11856
|
const getSearchWrapperStyle = () => {
|
|
11858
11857
|
const scrollBarWidth = getScrollBarWidth();
|
|
11859
|
-
document.documentElement.style.setProperty("--ntm-roles-table-default-scroll",
|
|
11858
|
+
document.documentElement.style.setProperty("--ntm-roles-table-default-scroll", `${scrollBarWidth}px`);
|
|
11860
11859
|
return {
|
|
11861
|
-
marginBottom:
|
|
11860
|
+
marginBottom: `${scrollBarWidth}px`
|
|
11862
11861
|
};
|
|
11863
11862
|
};
|
|
11864
11863
|
|
|
@@ -11995,7 +11994,7 @@ const Table = _ref => {
|
|
|
11995
11994
|
};
|
|
11996
11995
|
|
|
11997
11996
|
const Roles = _ref => {
|
|
11998
|
-
var _config$permissions
|
|
11997
|
+
var _config$permissions, _config$permissions2;
|
|
11999
11998
|
|
|
12000
11999
|
let config = _ref.config;
|
|
12001
12000
|
|
|
@@ -12016,13 +12015,13 @@ const Roles = _ref => {
|
|
|
12016
12015
|
|
|
12017
12016
|
const _useFetchRoles = useFetchRoles({
|
|
12018
12017
|
onSuccess: roles => setFilteredRoles(roles),
|
|
12019
|
-
enabled: (
|
|
12018
|
+
enabled: (config === null || config === void 0 ? void 0 : (_config$permissions = config.permissions) === null || _config$permissions === void 0 ? void 0 : _config$permissions.view) ?? DEFAULT_PERMISSION
|
|
12020
12019
|
}),
|
|
12021
12020
|
roles = _useFetchRoles.data,
|
|
12022
12021
|
isRolesLoading = _useFetchRoles.isLoading;
|
|
12023
12022
|
|
|
12024
12023
|
const _useFetchPermissions = useFetchPermissions({
|
|
12025
|
-
enabled: (
|
|
12024
|
+
enabled: (config === null || config === void 0 ? void 0 : (_config$permissions2 = config.permissions) === null || _config$permissions2 === void 0 ? void 0 : _config$permissions2.view) ?? DEFAULT_PERMISSION
|
|
12026
12025
|
}),
|
|
12027
12026
|
permissions = _useFetchPermissions.data,
|
|
12028
12027
|
isPermissionsLoading = _useFetchPermissions.isLoading;
|
|
@@ -12068,13 +12067,13 @@ Roles.defaultProps = {
|
|
|
12068
12067
|
};
|
|
12069
12068
|
var index$1 = withReactQuery(Roles);
|
|
12070
12069
|
|
|
12071
|
-
const fetch = params => axios.get(
|
|
12070
|
+
const fetch = params => axios.get(`${BASE_URL}/teams`, {
|
|
12072
12071
|
params
|
|
12073
12072
|
});
|
|
12074
12073
|
|
|
12075
|
-
const create = payload => axios.post(
|
|
12074
|
+
const create = payload => axios.post(`${BASE_URL}/teams`, payload);
|
|
12076
12075
|
|
|
12077
|
-
const update = (id, payload) => axios.put(
|
|
12076
|
+
const update = (id, payload) => axios.put(`${BASE_URL}/teams/${id}`, payload);
|
|
12078
12077
|
|
|
12079
12078
|
const teamsApi = {
|
|
12080
12079
|
fetch,
|
|
@@ -12145,8 +12144,6 @@ const useDebounce = function (value) {
|
|
|
12145
12144
|
};
|
|
12146
12145
|
|
|
12147
12146
|
const Header = _ref => {
|
|
12148
|
-
var _permissions$create, _permissions$create2;
|
|
12149
|
-
|
|
12150
12147
|
let _ref$metaName = _ref.metaName,
|
|
12151
12148
|
metaName = _ref$metaName === void 0 ? "" : _ref$metaName,
|
|
12152
12149
|
_ref$onClick = _ref.onClick,
|
|
@@ -12154,7 +12151,7 @@ const Header = _ref => {
|
|
|
12154
12151
|
permissions = _ref.permissions;
|
|
12155
12152
|
return /*#__PURE__*/React.createElement(Tooltip, {
|
|
12156
12153
|
content: instance.t("tooltips.noPermissionToAddMember"),
|
|
12157
|
-
disabled: (
|
|
12154
|
+
disabled: (permissions === null || permissions === void 0 ? void 0 : permissions.create) ?? hasPermission(MANAGE_MEMBER_PERMISSIONS),
|
|
12158
12155
|
position: "bottom"
|
|
12159
12156
|
}, /*#__PURE__*/React.createElement("span", null, /*#__PURE__*/React.createElement(Button, {
|
|
12160
12157
|
icon: Plus,
|
|
@@ -12162,7 +12159,7 @@ const Header = _ref => {
|
|
|
12162
12159
|
label: instance.t("common.add_", {
|
|
12163
12160
|
what: instance.t(metaName, SINGULAR).toLocaleLowerCase()
|
|
12164
12161
|
}),
|
|
12165
|
-
disabled: !((
|
|
12162
|
+
disabled: !((permissions === null || permissions === void 0 ? void 0 : permissions.create) ?? hasPermission(MANAGE_MEMBER_PERMISSIONS)),
|
|
12166
12163
|
onClick: onClick
|
|
12167
12164
|
})));
|
|
12168
12165
|
};
|
|
@@ -12268,11 +12265,7 @@ const isCurrentUserEmail = email => {
|
|
|
12268
12265
|
return (user === null || user === void 0 ? void 0 : user.email) === email;
|
|
12269
12266
|
};
|
|
12270
12267
|
|
|
12271
|
-
const isDropDownButtonDisabled = (email, permissions) =>
|
|
12272
|
-
var _permissions$update;
|
|
12273
|
-
|
|
12274
|
-
return !((_permissions$update = permissions === null || permissions === void 0 ? void 0 : permissions.update) !== null && _permissions$update !== void 0 ? _permissions$update : hasPermission(MANAGE_MEMBER_PERMISSIONS)) || isCurrentUserEmail(email);
|
|
12275
|
-
};
|
|
12268
|
+
const isDropDownButtonDisabled = (email, permissions) => !((permissions === null || permissions === void 0 ? void 0 : permissions.update) ?? hasPermission(MANAGE_MEMBER_PERMISSIONS)) || isCurrentUserEmail(email);
|
|
12276
12269
|
|
|
12277
12270
|
const getDropDownTooltipContent = email => isCurrentUserEmail(email) ? instance.t("tooltips.editCurrentUserNotAllowed") : instance.t("tooltips.noPermissionToEditMembers");
|
|
12278
12271
|
|
|
@@ -12353,7 +12346,7 @@ const getColumnData = _ref3 => {
|
|
|
12353
12346
|
width: "10%"
|
|
12354
12347
|
}];
|
|
12355
12348
|
};
|
|
12356
|
-
const renderHeaderTitle = (filterStatus, metaName) => instance.t(
|
|
12349
|
+
const renderHeaderTitle = (filterStatus, metaName) => instance.t(`common.${toLower(filterStatus)}_`, {
|
|
12357
12350
|
what: instance.t(metaName, PLURAL).toLocaleLowerCase()
|
|
12358
12351
|
});
|
|
12359
12352
|
const renderUpdateAlertTitle = (member, metaName, config) => {
|
|
@@ -12398,7 +12391,7 @@ const handlePageChange = (setFilters, filter) => (page, results) => {
|
|
|
12398
12391
|
page,
|
|
12399
12392
|
results
|
|
12400
12393
|
};
|
|
12401
|
-
window.history.replaceState({}, "",
|
|
12394
|
+
window.history.replaceState({}, "", `?${getSearchParams(pageParams, filter)}`);
|
|
12402
12395
|
setFilters(mergeLeft(pageParams));
|
|
12403
12396
|
};
|
|
12404
12397
|
const renderPaginationProps = size => ({
|
|
@@ -12513,7 +12506,7 @@ const ManageMember = _ref => {
|
|
|
12513
12506
|
counter: COUNTER_PROPS,
|
|
12514
12507
|
filterInvalidEmails: FILTER_INVALID_EMAILS,
|
|
12515
12508
|
disabled: selectedMember,
|
|
12516
|
-
label:
|
|
12509
|
+
label: `${instance.t("common.email", PLURAL)}*`,
|
|
12517
12510
|
placeholder: instance.t("placeholders.email"),
|
|
12518
12511
|
helpText: instance.t("helpers.enterMultipleEmails")
|
|
12519
12512
|
}), /*#__PURE__*/React.createElement(Select, {
|
|
@@ -12577,7 +12570,7 @@ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (O
|
|
|
12577
12570
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty$2(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
12578
12571
|
|
|
12579
12572
|
const TeamMembers = _ref => {
|
|
12580
|
-
var _config$permissions
|
|
12573
|
+
var _config$permissions, _config$permissions2;
|
|
12581
12574
|
|
|
12582
12575
|
let metaName = _ref.metaName,
|
|
12583
12576
|
config = _ref.config;
|
|
@@ -12603,7 +12596,7 @@ const TeamMembers = _ref => {
|
|
|
12603
12596
|
search: debouncedSearch.trim(),
|
|
12604
12597
|
category: filters.category.toLowerCase()
|
|
12605
12598
|
}), {
|
|
12606
|
-
enabled: (
|
|
12599
|
+
enabled: (config === null || config === void 0 ? void 0 : (_config$permissions = config.permissions) === null || _config$permissions === void 0 ? void 0 : _config$permissions.view) ?? DEFAULT_PERMISSION
|
|
12607
12600
|
}),
|
|
12608
12601
|
team = _useFetchMembers.data,
|
|
12609
12602
|
isMembersLoading = _useFetchMembers.isLoading,
|
|
@@ -12614,7 +12607,7 @@ const TeamMembers = _ref => {
|
|
|
12614
12607
|
const roles = response.organizationRoles || response.data.organizationRoles;
|
|
12615
12608
|
return pluck("name", roles).sort((a, b) => a.localeCompare(b));
|
|
12616
12609
|
},
|
|
12617
|
-
enabled: (
|
|
12610
|
+
enabled: (config === null || config === void 0 ? void 0 : (_config$permissions2 = config.permissions) === null || _config$permissions2 === void 0 ? void 0 : _config$permissions2.view) ?? DEFAULT_PERMISSION
|
|
12618
12611
|
}),
|
|
12619
12612
|
roles = _useFetchRoles.data,
|
|
12620
12613
|
isRolesLoading = _useFetchRoles.isLoading;
|