Merge pull request #138 from DeimosPr4/US-56-completar-registro-de-inquilino
completar registro de inquilino
This commit is contained in:
		
						commit
						fd19e1f0cb
					
				| 
						 | 
				
			
			@ -367,8 +367,4 @@ export class AppController {
 | 
			
		|||
  html(@Body('email') email: string, @Body('name') name: string) {
 | 
			
		||||
    return this.appService.html(email, name);
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
  
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -9,9 +9,8 @@ import { map } from 'rxjs/operators';
 | 
			
		|||
export class ReportsService {
 | 
			
		||||
  constructor(
 | 
			
		||||
    @InjectModel(Report.name)
 | 
			
		||||
    private readonly reportModel: Model<ReportDocument>,
 | 
			
		||||
  ) //
 | 
			
		||||
  {}
 | 
			
		||||
    private readonly reportModel: Model<ReportDocument>, //
 | 
			
		||||
  ) {}
 | 
			
		||||
 | 
			
		||||
  async create(report: ReportDocument): Promise<Report> {
 | 
			
		||||
    return this.reportModel.create(report);
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -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,7 +53,23 @@ 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">
 | 
			
		||||
            <div className="field col-12 md:col-6">
 | 
			
		||||
              <label htmlFor="nombre">Nombre</label>
 | 
			
		||||
              <InputText type="text" className="form-control" id="nombre" />
 | 
			
		||||
            </div>
 | 
			
		||||
            <div className="field col-12 md:col-6">
 | 
			
		||||
              <label htmlFor="apellidos">Apellidos</label>
 | 
			
		||||
              <InputText type="text" className="form-control" id="apellidos" />
 | 
			
		||||
            </div>
 | 
			
		||||
            <div className="field col-12 md:col-6">
 | 
			
		||||
              <label htmlFor="identificacion">Identificación</label>
 | 
			
		||||
              <InputText
 | 
			
		||||
                type="text"
 | 
			
		||||
                className="form-control"
 | 
			
		||||
                id="identificacion"
 | 
			
		||||
              />
 | 
			
		||||
            </div>
 | 
			
		||||
            <div className="field col-12 md:col-6">
 | 
			
		||||
              <label htmlFor="correo_electronico">Correo electrónico</label>
 | 
			
		||||
              <InputText
 | 
			
		||||
                type="email"
 | 
			
		||||
| 
						 | 
				
			
			@ -56,7 +77,7 @@ const Inquilinos = () => {
 | 
			
		|||
                id="correo_electronico"
 | 
			
		||||
              />
 | 
			
		||||
            </div>
 | 
			
		||||
            <div className="p-field col-12 md:col-6">
 | 
			
		||||
            <div className="field col-12 md:col-6">
 | 
			
		||||
              <label htmlFor="numero_vivienda">Número de Vivienda</label>
 | 
			
		||||
              <Dropdown
 | 
			
		||||
                id="numero_vivienda"
 | 
			
		||||
| 
						 | 
				
			
			@ -64,6 +85,14 @@ const Inquilinos = () => {
 | 
			
		|||
                options={communitiesList}
 | 
			
		||||
              />
 | 
			
		||||
            </div>
 | 
			
		||||
            <div className="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>
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue