Skip to content

Commit d8ad09f

Browse files
committed
Fix group management
1 parent f8a7b7e commit d8ad09f

File tree

4 files changed

+36
-12
lines changed

4 files changed

+36
-12
lines changed

license.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
eyJhbGciOiJFZERTQSIsImtpZCI6IjIwMjItMDgtMTIiLCJ0eXAiOiJKV1QifQ.eyJpc3MiOiJtYWNoaW5lQGNvZGVyLmNvbSIsImV4cCI6MTY3MTQ3OTgyOCwibmJmIjoxNjY1MDg2MjI1LCJpYXQiOjE2NjUwODYyMzQsImxpY2Vuc2VfZXhwaXJlcyI6MTY3MDI3MDIyOCwiYWNjb3VudF90eXBlIjoic2FsZXNmb3JjZSIsImFjY291bnRfaWQiOiIwMDExVTAwMDAxTWVQaW9RQUYiLCJ0cmlhbCI6ZmFsc2UsInZlcnNpb24iOjMsImZlYXR1cmVzIjp7InVzZXJfbGltaXQiOjAsImF1ZGl0X2xvZyI6MSwiYnJvd3Nlcl9vbmx5IjoxLCJzY2ltIjoxLCJ3b3Jrc3BhY2VfcXVvdGEiOjEsInJiYWMiOjF9fQ.wCVLOmifUVXvyq8Wos7iS6vN0GilIaaAOQhEMnsrkyGCE57jNC46KH1kHdJf8l6ZduxgJC7blHqRCkigJz-GDw

site/src/components/UserAutocomplete/UserAutocomplete.tsx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -156,6 +156,10 @@ export const useInlineStyle = makeStyles(() => {
156156
inline: {
157157
width: "300px",
158158

159+
"& .MuiFormControl-root": {
160+
margin: 0,
161+
},
162+
159163
"& .MuiInputBase-root": {
160164
// Match button small height
161165
height: 36,

site/src/pages/GroupsPage/GroupPage.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,7 @@ export const GroupPage: React.FC = () => {
9191
const { group, permissions } = state.context
9292
const isLoading = group === undefined || permissions === undefined
9393
const canUpdateGroup = permissions ? permissions.canUpdateGroup : false
94+
console.log(state.value)
9495

9596
return (
9697
<>

site/src/xServices/groups/groupXService.ts

Lines changed: 30 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -59,24 +59,42 @@ export const groupMachine = createMachine(
5959
type: "parallel",
6060
states: {
6161
data: {
62-
invoke: {
63-
src: "loadGroup",
64-
onDone: {
65-
actions: ["assignGroup"],
62+
initial: "loading",
63+
states: {
64+
loading: {
65+
invoke: {
66+
src: "loadGroup",
67+
onDone: {
68+
actions: ["assignGroup"],
69+
target: "success",
70+
},
71+
onError: {
72+
actions: ["displayLoadGroupError"],
73+
},
74+
},
6675
},
67-
onError: {
68-
actions: ["displayLoadGroupError"],
76+
success: {
77+
type: "final",
6978
},
7079
},
7180
},
7281
permissions: {
73-
invoke: {
74-
src: "loadPermissions",
75-
onDone: {
76-
actions: ["assignPermissions"],
82+
initial: "loading",
83+
states: {
84+
loading: {
85+
invoke: {
86+
src: "loadPermissions",
87+
onDone: {
88+
actions: ["assignPermissions"],
89+
target: "success",
90+
},
91+
onError: {
92+
actions: ["displayLoadPermissionsError"],
93+
},
94+
},
7795
},
78-
onError: {
79-
actions: ["displayLoadPermissionsError"],
96+
success: {
97+
type: "final",
8098
},
8199
},
82100
},

0 commit comments

Comments
 (0)