Merge branch 'dev' into US-05-ModificarAdministradordeSistema
This commit is contained in:
commit
08a1b4a1a6
|
@ -82,6 +82,35 @@ export class AppController {
|
|||
);
|
||||
}
|
||||
|
||||
@Put('user/updateGuard/:id')
|
||||
updateGuard(
|
||||
@Param('id') id: string,
|
||||
@Body('dni') dni: string,
|
||||
@Body('name') name: string,
|
||||
@Body('last_name') last_name: string,
|
||||
@Body('email') email: string,
|
||||
@Body('phone') phone: number,
|
||||
@Body('password') password: string,
|
||||
@Body('user_type') user_type: string,
|
||||
@Body('status') status: string,
|
||||
@Body('date_entry') date_entry: Date,
|
||||
@Body('community_id') community_id: string,
|
||||
) {
|
||||
return this.appService.updateGuard(
|
||||
id,
|
||||
dni,
|
||||
name,
|
||||
last_name,
|
||||
email,
|
||||
phone,
|
||||
password,
|
||||
user_type,
|
||||
status,
|
||||
date_entry,
|
||||
community_id,
|
||||
);
|
||||
}
|
||||
|
||||
@Put('user/updateUser/:id')
|
||||
updateUser(
|
||||
@Param('id') id: string,
|
||||
|
|
|
@ -89,6 +89,38 @@ export class AppService {
|
|||
.pipe(map((message: string) => ({ message })));
|
||||
}
|
||||
|
||||
updateGuard(
|
||||
_id: string,
|
||||
dni: string,
|
||||
name: string,
|
||||
last_name: string,
|
||||
email: string,
|
||||
phone: number,
|
||||
password: string,
|
||||
user_type: string,
|
||||
status: string,
|
||||
date_entry: Date,
|
||||
community_id: string,
|
||||
) {
|
||||
const pattern = { cmd: 'updateGuard' };
|
||||
const payload = {
|
||||
id: _id,
|
||||
dni: dni,
|
||||
name: name,
|
||||
last_name: last_name,
|
||||
email: email,
|
||||
phone: phone,
|
||||
password: password,
|
||||
user_type: user_type,
|
||||
status: status,
|
||||
date_entry: date_entry,
|
||||
community_id: community_id,
|
||||
};
|
||||
return this.clientUserApp
|
||||
.send<string>(pattern, payload)
|
||||
.pipe(map((message: string) => ({ message })));
|
||||
}
|
||||
|
||||
//POST parameter from API
|
||||
createAdminSystem(dni: string, name: string, last_name: string, email: string, phone: number
|
||||
, user_type: string, status: string, date_entry: Date) {
|
||||
|
|
|
@ -6,3 +6,8 @@ help = "Per project developer environments"
|
|||
[[commands]]
|
||||
package = "nodejs"
|
||||
help = "Node.js"
|
||||
|
||||
[[commands]]
|
||||
package = "nodePackages.expo-cli"
|
||||
help = "Expo CLI"
|
||||
|
||||
|
|
|
@ -69,6 +69,11 @@ export class UsersController {
|
|||
return this.userService.update(user._id, user);
|
||||
}
|
||||
|
||||
@MessagePattern({ cmd: 'updateGuard' })
|
||||
updateGuard(@Payload() guard: UserDocument) {
|
||||
return this.userService.update(guard.id, guard);
|
||||
}
|
||||
|
||||
@MessagePattern({ cmd: 'removeUser' })
|
||||
remove(@Payload() id: string) {
|
||||
let dni = id['dni'];
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -47,7 +47,6 @@ const Inquilinos = () => {
|
|||
const [housesList, setHousesList] = useState([])
|
||||
const [submitted, setSubmitted] = useState(false)
|
||||
const [infoDialogVisible, setShowInfoDialog] = useState(false)
|
||||
const [cancelSaveButtonVisible, setCancelSaveButtonVisible] = useState(false)
|
||||
const toast = useRef(null)
|
||||
const dt = useRef(null)
|
||||
const [cookies] = useCookies()
|
||||
|
@ -279,7 +278,6 @@ const Inquilinos = () => {
|
|||
const cancelEdit = () => {
|
||||
setTenant(emptyTenant);
|
||||
setSaveButtonTitle('Registrar');
|
||||
setCancelSaveButtonVisible(false);
|
||||
setHouseNumber('');
|
||||
}
|
||||
|
||||
|
@ -761,7 +759,7 @@ const Inquilinos = () => {
|
|||
</div>
|
||||
<div className="col-12">
|
||||
<div className="card">
|
||||
<h5>Registro de un administrador de una comunidad de viviendas</h5>
|
||||
<h5>Registro de un Inquilino</h5>
|
||||
<div className="p-fluid formgrid grid">
|
||||
<div className="field col-12 md:col-6">
|
||||
<label htmlFor="name">Nombre</label>
|
||||
|
|
Loading…
Reference in New Issue