mirror of
https://github.com/Paris-est-Ludique/intranet.git
synced 2025-09-11 22:06:29 +02:00
Add gSheet specific entity write
This commit is contained in:
@@ -5,7 +5,7 @@ import { Helmet } from "react-helmet"
|
||||
|
||||
import { AppState, AppThunk } from "../../store"
|
||||
import { fetchMembreDataIfNeed } from "../../store/membre"
|
||||
import { MembreInfo } from "../../components"
|
||||
import { MembreInfo, MembreSet } from "../../components"
|
||||
import styles from "./styles.module.scss"
|
||||
|
||||
export type Props = RouteComponentProps<{ id: string }>
|
||||
@@ -28,7 +28,12 @@ const MembrePage = ({ match }: Props): JSX.Element => {
|
||||
if (membreInfo.readyStatus === "failure" || !membreInfo.entity)
|
||||
return <p>Oops! Failed to load data.</p>
|
||||
|
||||
return <MembreInfo item={membreInfo.entity} />
|
||||
return (
|
||||
<div>
|
||||
<MembreInfo item={membreInfo.entity} />
|
||||
<MembreSet dispatch={dispatch} membre={membreInfo.entity} />
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
return (
|
||||
|
@@ -14,22 +14,71 @@ exports[`<MembrePage /> renders the <Info /> if loading was successful 1`] = `
|
||||
<div
|
||||
class="Membre"
|
||||
>
|
||||
<div
|
||||
class="MembreCard"
|
||||
>
|
||||
<h4>
|
||||
Membre Info
|
||||
</h4>
|
||||
<ul>
|
||||
<li>
|
||||
Prénom:
|
||||
Amélie
|
||||
</li>
|
||||
<li>
|
||||
Nom:
|
||||
Aupeix
|
||||
</li>
|
||||
</ul>
|
||||
<div>
|
||||
<div
|
||||
class="MembreCard"
|
||||
>
|
||||
<h4>
|
||||
Membre Info
|
||||
</h4>
|
||||
<ul>
|
||||
<li>
|
||||
Prénom:
|
||||
Amélie
|
||||
</li>
|
||||
<li>
|
||||
Nom:
|
||||
Aupeix
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<section
|
||||
class="MembreList"
|
||||
>
|
||||
<h2>
|
||||
Modifier un membre
|
||||
</h2>
|
||||
<form>
|
||||
<label
|
||||
for="postPrenom"
|
||||
>
|
||||
Prenom:
|
||||
<input
|
||||
id="postPrenom"
|
||||
name="postPrenom"
|
||||
type="text"
|
||||
value="Amélie"
|
||||
/>
|
||||
</label>
|
||||
<label
|
||||
for="postNom"
|
||||
>
|
||||
Nom:
|
||||
<input
|
||||
id="postNom"
|
||||
name="postNom"
|
||||
type="text"
|
||||
value="Aupeix"
|
||||
/>
|
||||
</label>
|
||||
<label
|
||||
for="postMajeur"
|
||||
>
|
||||
Majeur:
|
||||
<input
|
||||
id="postMajeur"
|
||||
name="postMajeur"
|
||||
type="text"
|
||||
value="1"
|
||||
/>
|
||||
</label>
|
||||
<button
|
||||
type="button"
|
||||
>
|
||||
Save changes
|
||||
</button>
|
||||
</form>
|
||||
</section>
|
||||
</div>
|
||||
</div>
|
||||
`;
|
||||
|
Reference in New Issue
Block a user