diff --git a/frontend/src/routes/admin/accounts/+page.svelte b/frontend/src/routes/admin/accounts/+page.svelte index 4a972f3..4e115e3 100644 --- a/frontend/src/routes/admin/accounts/+page.svelte +++ b/frontend/src/routes/admin/accounts/+page.svelte @@ -160,550 +160,551 @@ reset(); }} /> -{:else} - +{/if} + +
Ajouter des comptes
-Ajouter des comptes
+
+
+
+ Nom
+
+
+ |
+
+
+
+ Prénom
+
+
+ |
+
+
+
+ Adresse E-Mail
+
+
+ |
+
+
+
+ Solde
+
+
+ |
+
+
+
+ Rôle
+
+
+ |
+
+
+
+ Prix
+
+
+ |
+ + |
---|
-
-
- Nom
-
+
+ |
+ {
+ // @ts-ignore
+ let name = e.target?.value;
+ accountsApi()
+ .patchAccountId(
+ account.id,
+ {
+ last_name: name
+ },
+ { withCredentials: true }
+ )
+ .then((res) => {
+ account = res.data ?? account;
+ })
+ .catch((err) => {
+ account.last_name = account.last_name ?? '';
+ });
+ }}
+ />
- |
-
-
-
- Prénom
-
+
+
+ |
+ {
+ // @ts-ignore
+ let name = e.target?.value;
+ accountsApi()
+ .patchAccountId(
+ account.id,
+ {
+ first_name: name
+ },
+ { withCredentials: true }
+ )
+ .then((res) => {
+ account = res.data ?? account;
+ })
+ .catch((err) => {
+ account.first_name = account.first_name ?? '';
+ });
+ }}
+ />
- |
-
-
-
- Adresse E-Mail
-
+
+
+ |
+
+ {
+ // @ts-ignore
+ let name = e.target?.value;
+ accountsApi()
+ .patchAccountId(
+ account.id,
+ {
+ email_address: name
+ },
+ { withCredentials: true }
+ )
+ .then((res) => {
+ account = res.data ?? account;
+ })
+ .catch((err) => {
+ account.email_address = account.email_address ?? '';
+ });
+ }}
+ />
+
+
+ |
+
- + {formatPrice(account.balance)} + |
-
-
-
+
+ |
+
- |
-
-
-
+
+ |
+
- |
-
-
-
+
+ |
+ {#if askForCard == false}
+
+ {/if}
+
+
- |
- + |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
-
- {
- // @ts-ignore
- let name = e.target?.value;
- accountsApi()
- .patchAccountId(
- account.id,
- {
- last_name: name
- },
- { withCredentials: true }
- )
- .then((res) => {
- account = res.data ?? account;
- })
- .catch((err) => {
- account.last_name = account.last_name ?? '';
- });
- }}
- />
-
- |
-
-
- {
- // @ts-ignore
- let name = e.target?.value;
- accountsApi()
- .patchAccountId(
- account.id,
- {
- first_name: name
- },
- { withCredentials: true }
- )
- .then((res) => {
- account = res.data ?? account;
- })
- .catch((err) => {
- account.first_name = account.first_name ?? '';
- });
- }}
- />
-
- |
-
-
- {
- // @ts-ignore
- let name = e.target?.value;
- accountsApi()
- .patchAccountId(
- account.id,
- {
- email_address: name
- },
- { withCredentials: true }
- )
- .then((res) => {
- account = res.data ?? account;
- })
- .catch((err) => {
- account.email_address = account.email_address ?? '';
- });
- }}
- />
-
- |
-
-
-
- - {formatPrice(account.balance)} - - |
-
-
-
-
- |
-
-
-
-
- |
-
-
-
-
-
-
- |
-
- {accounts.length} résultats -
-+ {accounts.length} résultats +
+