diff --git a/src/main/webapp/src/pages/admin/MemberPage.jsx b/src/main/webapp/src/pages/admin/MemberPage.jsx index 99e9770..3373412 100644 --- a/src/main/webapp/src/pages/admin/MemberPage.jsx +++ b/src/main/webapp/src/pages/admin/MemberPage.jsx @@ -20,7 +20,6 @@ export function MemberPage() { const handleSubmit = (event) => { event.preventDefault(); - setLoading(1) const formData = new FormData(); @@ -72,22 +71,151 @@ export function MemberPage() { } } + const handleSubmitPerm = (event) => { + + } + return <>

Page membre

{data - ? + ?
+
+
+ + +
+
+ + +
+ + +
+
+
+
: error && } } -function MemberForm({data, handleSubmit}) { +function PhotoCard({data}) { + return
+
Licence n°{data.licence}
+
+
+ avatar +
+
+
; +} + +function InformationForm({handleSubmit, data}) { + return
+
+
Information
+
+ + + + + + +
+ +
+ + +
+
+ + +
+
+
+
+ +
+
+
+
+
; +} + +function PremForm({handleSubmitPerm}) { + return
+
+
Permission
+
+
+
+
FFSAF intra
+ +
+
+
SAFCA
+ + + +
+
+
+
+ +
+
+
+
+
; +} + +function LicenceCard() { + return
+
+
Licence
+
+

Web Design

+
+
+
; +} + +function SelectCard() { + return
+
+
Sélection en équipe de France
+
+

Web Design

+ +
+
+
; +} + +function CompteInfo({userData}) { + const creatAccount = () => { toast.promise( - apiAxios.put(`/compte/${data.id}/init`), + apiAxios.put(`/compte/${userData.id}/init`), { pending: 'Création du compte en cours', success: 'Compte créé avec succès 🎉', @@ -96,137 +224,53 @@ function MemberForm({data, handleSubmit}) { ) } - return
-
-
-
-
Licence n°{data.licence}
-
+ return
+
Compte
+
+ {userData.userId + ? + : <> +
- avatar +
Ce membre ne dispose pas de compte...
-
-
-
Compte
-
- {data.userId - ? - : <> -
-
-
Ce membre ne dispose pas de compte...
-
-
-
-
- -
-
- } -
-
-
-
-
-
-
Information
-
- - - - - - -
- -
- - -
-
- - -
-
-
-
- -
-
+
+
+
- -
-
-
-
Licence
-
-

Web Design

-
-
-
-
-
-
Sélection en équipe de France
-
-

Web Design

- -
-
-
-
-
+ }
+ } -function CompteInfo({userId}) { +function CompteInfoContent({userData}) { const setLoading = useLoadingSwitcher() - const {data, error} = useFetch(`/compte/${userId}`, setLoading, 1) + const {data, error} = useFetch(`/compte/${userData.userId}`, setLoading, 1) return <> {data - ? + ? <> +
+
+
Identifiant: {data.login}
+
+
+
+
+
Activer:
+
+
+
+
+
Email vérifié:
+
+
+ : error && - } - -} - -function CompteInfoContent({data}) { - return <> -
-
-
Identifiant: {data.login}
-
-
-
-
-
Activer:
-
-
-
-
-
Email vérifié:
-
-
- + } } function BirthDayField({inti_date, inti_category}) { @@ -286,4 +330,24 @@ function TextField({name, text, value, placeholder, type = "text"}) { name={name} aria-describedby={name} defaultValue={value} required/>
+} + +function CheckField({name, text, value, row = false}) { + return <>{ + row ? +
+
+
+ + +
+
+
+ :
+ + +
+ } + } \ No newline at end of file