Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
F
frontend
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
31
Issues
31
List
Boards
Labels
Service Desk
Milestones
Operations
Operations
Incidents
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
My SU
frontend
Commits
c77c4102
Commit
c77c4102
authored
Mar 02, 2021
by
TJHeeringa
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Various fixes
parent
4014ead8
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
22 additions
and
14 deletions
+22
-14
src/App/Components/Forms/GroupForm.js
src/App/Components/Forms/GroupForm.js
+8
-4
src/App/Components/Tables/ExtremeTable.js
src/App/Components/Tables/ExtremeTable.js
+3
-0
src/App/Pages/Groups/Board/GroupDetail.js
src/App/Pages/Groups/Board/GroupDetail.js
+9
-9
src/App/Pages/Groups/Board/GroupMemberManagement.js
src/App/Pages/Groups/Board/GroupMemberManagement.js
+2
-1
No files found.
src/App/Components/Forms/GroupForm.js
View file @
c77c4102
...
...
@@ -57,11 +57,13 @@ export const GroupForm = ({ group, parentable_groups, handleGroupChange, update,
};
const
postGroup
=
(
group
)
=>
{
let
groupToBePosted
=
group
;
delete
groupToBePosted
[
"
permissions
"
];
return
API
.
callv3
({
url
:
"
/groups
"
,
method
:
"
POST
"
,
object
:
group
,
//
json_or_form_data: "form-data",
object
:
group
ToBePosted
,
json_or_form_data
:
"
form-data
"
,
on_succes
:
(
data
)
=>
{
alerthandler
.
handleAlertHandler
(
"
green
"
,
"
Save successful
"
);
onSucces
(
data
);
...
...
@@ -73,11 +75,13 @@ export const GroupForm = ({ group, parentable_groups, handleGroupChange, update,
};
const
patchGroup
=
(
group
)
=>
{
let
groupToBePatched
=
group
;
delete
groupToBePatched
[
"
permissions
"
];
return
API
.
callv3
({
url
:
group
.
url
,
method
:
"
PATCH
"
,
object
:
group
,
//
json_or_form_data: "form-data",
object
:
group
ToBePatched
,
json_or_form_data
:
"
form-data
"
,
on_succes
:
(
data
)
=>
{
alerthandler
.
handleAlertHandler
(
"
green
"
,
"
Save successful
"
);
onSucces
(
data
);
...
...
src/App/Components/Tables/ExtremeTable.js
View file @
c77c4102
...
...
@@ -360,6 +360,9 @@ const ExtremeTable = (props) => {
showAddCommand
=
{
allowAdd
}
showEditCommand
=
{
allowEdit
}
showDeleteCommand
=
{
allowDelete
}
messages
=
{{
deleteCommand
:
"
Detail
"
}}
/>
)
;
}
if
(
showSelect
)
{
...
...
src/App/Pages/Groups/Board/GroupDetail.js
View file @
c77c4102
...
...
@@ -44,22 +44,22 @@ export const GroupDetail = ({ association, groups, initialFormType, url, onUpdat
url
:
group
.
url
,
method
:
"
PATCH
"
,
object
:
{
permissions
:
newPermissions
},
on
Succes
s
:
onSuccess
,
on
F
ailure
:
onFailure
on
_succe
s
:
onSuccess
,
on
_f
ailure
:
onFailure
});
};
const
grantBoardPermissions
=
()
=>
{
changeBoardPermissions
(
[
"
board
"
],
alerthandler
.
handleAlertHandler
(
"
success
"
,
"
Granted group board permissions
"
),
alerthandler
.
handleAlertHandler
(
"
red
"
,
"
Granting group board permissions failed
"
),
()
=>
alerthandler
.
handleAlertHandler
(
"
success
"
,
"
Granted group board permissions
"
),
()
=>
alerthandler
.
handleAlertHandler
(
"
red
"
,
"
Granting group board permissions failed
"
)
);
};
const
revokeBoardPermissions
=
()
=>
{
changeBoardPermissions
(
[],
alerthandler
.
handleAlertHandler
(
"
success
"
,
"
Revoked group board permissions
"
),
alerthandler
.
handleAlertHandler
(
"
red
"
,
"
Revoking group board permissions failed
"
),
()
=>
alerthandler
.
handleAlertHandler
(
"
success
"
,
"
Revoked group board permissions
"
),
()
=>
alerthandler
.
handleAlertHandler
(
"
red
"
,
"
Revoking group board permissions failed
"
)
);
};
...
...
@@ -80,9 +80,9 @@ export const GroupDetail = ({ association, groups, initialFormType, url, onUpdat
<
Typography
variant
=
{
"
h5
"
}
>
Group
Info
<
/Typography
>
<
div
>
{
group
.
board_group
&&
(
group
.
current_board
?
<
Button
onClick
=
{
grantBoardPermissions
}
>
Grant
board
permissions
<
/Button
>
:
<
Button
onClick
=
{
revokeBoardPermissions
}
>
Revoke
board
permissions
<
/Button
>
(
group
.
permissions
.
includes
(
"
board
"
)
?
<
Button
onClick
=
{
revokeBoardPermissions
}
>
Revoke
board
permissions
<
/Button
>
:
<
Button
onClick
=
{
grantBoardPermissions
}
>
Grant
board
permissions
<
/Button
>
)
}
&
nbsp
;
...
...
src/App/Pages/Groups/Board/GroupMemberManagement.js
View file @
c77c4102
...
...
@@ -57,7 +57,8 @@ const GroupMemberManagement = ({ association }) => {
date_left
:
member_profile
.
date_left
,
duty
:
member_profile
.
duty
,
email
:
member_profile
.
email
,
order
:
member_profile
.
order
order
:
member_profile
.
order
,
description
:
member_profile
.
description
,
}));
// Replace null values with undefined to prevent error later on
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment