Add gSheet specific entity write

This commit is contained in:
forceoranj
2021-11-14 23:23:29 +01:00
parent c33b9d8f79
commit b76fbc78ff
22 changed files with 457 additions and 101 deletions

View File

@@ -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 (

View File

@@ -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>
`;