Abans del codi
This commit is contained in:
parent
6035c20831
commit
2387c9d931
16
imports/roles.ts
Normal file
16
imports/roles.ts
Normal file
@ -0,0 +1,16 @@
|
||||
export const ROLS_GLOBALS = {
|
||||
ADMINISTRADOR: 'admin',
|
||||
USUARI: 'usuari'
|
||||
}; // as const;
|
||||
|
||||
// export type GlobalRolesKeys = keyof typeof GLOBAL_ROLES;
|
||||
// export type GlobalRolesValues = (typeof GLOBAL_ROLES)[GlobalRolesKeys];
|
||||
|
||||
export const ROLS_DE_POBLE = {
|
||||
MONITOR: 'monitor_de_poble',
|
||||
ENCARREGAT: 'encarregat_de_tasques',
|
||||
VOLUNTARI: 'voluntari_de_poble'
|
||||
}; // as const;
|
||||
|
||||
// export type TeamRolesKeys = keyof typeof TEAM_ROLES;
|
||||
// export type TeamRolesValues = (typeof TEAM_ROLES)[TeamRolesKeys];
|
||||
@ -94,7 +94,7 @@ const Loguejat = () => {
|
||||
|
||||
Nosaltres hauríem de tindre opció de filtrar les necessitats per pobles i condicions (per poder vore, per exemple, totes les necessitats pendents de tots els pobles, o només les necessitats pendents d'Alaquàs)
|
||||
</div>
|
||||
: <Link to="/login">Login</Link>
|
||||
: <Link to="/login">Entra o Registra't</Link>
|
||||
;
|
||||
};
|
||||
|
||||
|
||||
@ -48,33 +48,39 @@ export const Login= () => {
|
||||
|
||||
if (isLogin) {
|
||||
return <form onSubmit={handleLogin}>
|
||||
<label htmlFor="email">E-mail</label>
|
||||
<label htmlFor="email">Correu electrònic o nom d'usuari: </label>
|
||||
<input id="email" type="email" required />
|
||||
<br />
|
||||
<label htmlFor="password">Password</label>
|
||||
<label htmlFor="password">Contrasenya: </label>
|
||||
<input id="password" type="password" required />
|
||||
<br />
|
||||
<button type="submit">Login</button>
|
||||
<button onClick={() => setIsLogin( false )}>Register a new account</button>
|
||||
<button type="submit">Entra</button>
|
||||
<button onClick={() => setIsLogin( false )}>Registra un compte nou</button>
|
||||
</form>
|
||||
}
|
||||
|
||||
return (
|
||||
<form onSubmit={handleRegistration}>
|
||||
<label htmlFor="username">Username</label>
|
||||
<label htmlFor="username">Nom d'usuari: </label>
|
||||
<input id="username" type="text" required />
|
||||
<br />
|
||||
<label htmlFor="email">E-mail</label>
|
||||
<label htmlFor="email">Correu electrònic: </label>
|
||||
<input id="email" type="email" required />
|
||||
<br />
|
||||
<label htmlFor="password">Password</label>
|
||||
<label htmlFor="password">Contrasenya: </label>
|
||||
<input id="password" type="password" required />
|
||||
<br />
|
||||
<label htmlFor="password2">Repeat password</label>
|
||||
<label htmlFor="password2">Repeteix la contrasenya: </label>
|
||||
<input id="password2" type="password" required />
|
||||
<br />
|
||||
<button type="submit">Register</button>
|
||||
<button onClick={() => setIsLogin( true )}>Login instead</button>
|
||||
<label htmlFor="tel">Telèfon: </label>
|
||||
<input id="tel" type="tel" required />
|
||||
<br />
|
||||
<label htmlFor="codi">Codi d'entrada (opcional): </label>
|
||||
<input id="codi" type="text" />
|
||||
<br />
|
||||
<button type="submit">Registrar</button>
|
||||
<button onClick={() => setIsLogin( true )}>Dialeg d'accés</button>
|
||||
</form>
|
||||
);
|
||||
};
|
||||
Loading…
Reference in New Issue
Block a user