diff --git a/i18n/en.pot b/i18n/en.pot index df4b323c..ca52dff8 100644 --- a/i18n/en.pot +++ b/i18n/en.pot @@ -5,8 +5,8 @@ msgstr "" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n != 1)\n" -"POT-Creation-Date: 2023-12-12T13:36:05.060Z\n" -"PO-Revision-Date: 2023-12-12T13:36:05.060Z\n" +"POT-Creation-Date: 2024-02-08T17:31:59.581Z\n" +"PO-Revision-Date: 2024-02-08T17:31:59.581Z\n" msgid "Yes" msgstr "Yes" @@ -50,15 +50,52 @@ msgstr "There was an error fetching this form." msgid "Cancel without saving" msgstr "Cancel without saving" +msgid "Basic information" +msgstr "Basic information" + +msgid "Name" +msgstr "Name" + +msgid "Code" +msgstr "Code" + +msgid "Used in analytics reports." +msgstr "Used in analytics reports." + msgid "Error updating group" msgstr "Error updating group" msgid "Error creating group" msgstr "Error creating group" +msgid "User management" +msgstr "User management" + +msgid "Add or remove users from this group." +msgstr "Add or remove users from this group." + +msgid "" +"To add a user to this group, go to the User section and edit the user group " +"settings for a specific user." +msgstr "" +"To add a user to this group, go to the User section and edit the user group " +"settings for a specific user." + msgid "Attributes" msgstr "Attributes" +msgid "User group management" +msgstr "User group management" + +msgid "This group can manage other user groups. Add managed user groups below." +msgstr "This group can manage other user groups. Add managed user groups below." + +msgid "Available user groups" +msgstr "Available user groups" + +msgid "Managed user groups" +msgstr "Managed user groups" + msgid "Name is already taken" msgstr "Name is already taken" @@ -95,12 +132,6 @@ msgstr "Error updating role" msgid "Error creating role" msgstr "Error creating role" -msgid "Basic information" -msgstr "Basic information" - -msgid "Name" -msgstr "Name" - msgid "Description" msgstr "Description" @@ -481,9 +512,6 @@ msgstr "Available user roles" msgid "User roles this user is assigned" msgstr "User roles this user is assigned" -msgid "Available user groups" -msgstr "Available user groups" - msgid "User groups this user is a member of" msgstr "User groups this user is a member of" diff --git a/src/components/GroupForm/createRequestBody.js b/src/components/GroupForm/createRequestBody.js index bba73bc0..632a15fb 100644 --- a/src/components/GroupForm/createRequestBody.js +++ b/src/components/GroupForm/createRequestBody.js @@ -3,12 +3,11 @@ import { getAttributeValues } from '../../attributes.js' const ATTRIBUTE_VALUES = 'attributeValues' export const createPostRequestBody = ({ values, attributes }) => { - const { name, code, members, managedGroups } = values + const { name, code, managedGroups } = values return { name, code, - users: members.additions.map(({ id }) => ({ id })), managedGroups: managedGroups.map(id => ({ id })), attributeValues: getAttributeValues({ attributes, values }), } @@ -23,7 +22,7 @@ export const createJsonPatchRequestBody = ({ key => dirtyFields[key] ) const patch = dirtyFieldsArray.reduce((acc, key) => { - if (key !== 'members' && !key.startsWith(ATTRIBUTE_VALUES)) { + if (!key.startsWith(ATTRIBUTE_VALUES)) { const value = key === 'managedGroups' ? values[key].map(id => ({ id })) @@ -52,23 +51,5 @@ export const createJsonPatchRequestBody = ({ }) } - if (dirtyFields.members) { - const { additions, removals } = values.members - for (const addition of additions) { - patch.push({ - op: 'add', - path: '/users/-', - value: { id: addition.id }, - }) - } - for (const removal of removals) { - patch.push({ - op: 'remove-by-id', - path: '/users', - id: removal.id, - }) - } - } - return patch }