add extra info to registration

This commit is contained in:
Eduardo Quiros 2022-07-26 20:13:47 -06:00
parent 0479a162c1
commit b00233cd3b
No known key found for this signature in database
GPG Key ID: B77F36C3F12720B4
1 changed files with 21 additions and 0 deletions

View File

@ -20,8 +20,13 @@ const Inquilinos = () => {
}, []);
function registrarInquilino() {
let data = {
dni: document.getElementById('identificacion').value,
name: document.getElementById('nombre').value,
last_name: document.getElementById('apellidos').value,
phone: document.getElementById('telefono').value,
email: document.getElementById('correo_electronico').value,
community_id: document.getElementById('numero_vivienda').value,
password: document.getElementById('password').value,
user_type: '3',
status: '1',
};
@ -48,6 +53,18 @@ const Inquilinos = () => {
<div className="card">
<h5 className="card-header">Registrar Inquilino</h5>
<div className="p-fluid formgrid grid">
<div className="p-field col-12 md:col-6">
<label htmlFor="nombre">Nombre</label>
<InputText type="text" className="form-control" id="nombre"/>
</div>
<div className="p-field col-12 md:col-6">
<label htmlFor="apellidos">Apellidos</label>
<InputText type="text" className="form-control" id="apellidos"/>
</div>
<div className="p-field col-12 md:col-6">
<label htmlFor="identificacion">Identificación</label>
<InputText type="text" className="form-control" id="identificacion"/>
</div>
<div className="p-field col-12 md:col-6">
<label htmlFor="correo_electronico">Correo electrónico</label>
<InputText
@ -64,6 +81,10 @@ const Inquilinos = () => {
options={communitiesList}
/>
</div>
<div className="p-field col-12 md:col-6">
<label htmlFor="identificacion">Identificación</label>
<InputText type="password" className="form-control" id="identificacion"/>
</div>
<Button label="Registrar" onClick={registrarInquilino} />
</div>
</div>