-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
PRIV - Visualizar motivos de acceso a la HUDS #2958
base: master
Are you sure you want to change the base?
Conversation
2d47dea
to
e3f2f75
Compare
4c63956
to
311982a
Compare
src/app/modules/rup/components/huds/modal-motivo-acceso-huds.component.ts
Outdated
Show resolved
Hide resolved
311982a
to
98a88bb
Compare
Al continuar una prestación no toma el motivo de acceso a la HUDS de la DB. |
En el modal la opción 'Intervención en el proceso de cuidado del paciente' se solapa en 2 lineas, esto se corrige en 'modal-motivo-acceso-huds.html' (linea 7) -div class="w-60"- |
6101dc7
to
31d0c9a
Compare
corregido! gracias ! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Aldinho, habría que hacer unos pequeños cambios en el esquema de este nuevo recurso:
- Agregar una columna "key" para cada motivo
- Renombrar el atributo "motivo" a nombre/label que es mas representativo para como venimos usando internamente los componentes que sugieren opciones
- El atributo "descripcion" contendría texto a modo informativo para orientar al usuario (Después vemos qué, por ahora no lo utilizariamos)
- El atributo "moduloDefault" debería ser un array, para no repetir registros en caso de compartir motivo por defecto entre varios modulos
Por otro lado, almacenar del lado de la app el motivo y el detalle en un array puede ser un poco confuso en cuanto a recordar en qué posición se encuentra cada elemento o para el caso de los undefined. Sugeriría utilizar un objeto similar a
motivo: { key: string, detalle: string }
Cualquier cosita quedo a disposición
35feb59
to
996e9cc
Compare
buendi lautaro! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Holi, funciona de 10 pero dejé algunas observaciones. Trato de resumirlas en ...
- En relación al pasaje del motivo entre el modal y los otros componentes, noté que a veces se lo trata como un objeto (uso correcto) y otras veces como valores separados.
- En todos los casos la búsqueda del motivo por defecto (moduloDefault) está perfecto.
No me quería extender mucho, cualquier cosa despejamos charlando 👌🏼
preAccesoHuds(motivoAccesoHuds) { | ||
const motivo = (typeof motivoAccesoHuds !== 'string') ? motivoAccesoHuds[0] : motivoAccesoHuds; | ||
preAccesoHuds(motivoAccesoHuds: IMotivoAcceso | string) { | ||
const motivo = (typeof motivoAccesoHuds !== 'string') ? motivoAccesoHuds.motivo : motivoAccesoHuds; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
En este caso, cuando se cancela el modal para seleccionar motivo, entra con valor null y muestra error por consola
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agregado el control!
profesional: this.auth.profesional ? this.auth.profesional : null, | ||
idTurno: null, | ||
idPrestacion: null, | ||
detalleMotivo: motivoAccesoHuds[1] | ||
detalleMotivo: motivoAccesoHuds.descripcionAcceso |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Esta propiedad no debería enviarse. El uso correcto es enviar el objeto completo en la prop. "motivo" de la linea 85. De esta manera podemos estandarizar su uso y no varía en cada componente.
@@ -912,7 +929,7 @@ export class PuntoInicioComponent implements OnInit, OnDestroy { | |||
profesional: this.auth.profesional, | |||
idTurno: this.accesoHudsTurno, | |||
idPrestacion: this.accesoHudsPrestacion, | |||
detalleMotivo: (typeof motivoAccesoHuds !== 'string') ? motivoAccesoHuds[1] : '' | |||
detalleMotivo: (typeof motivoAccesoHuds !== 'string') ? motivoAccesoHuds.descripcionAcceso : null |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
misma observación que en componente anterior. Debería pasarse el objeto completo en "motivo" para estandarizar su uso.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Se mantienen las dos interfaces como se charlo. Saludos!
motivoSelect() { | ||
return this.motivoSelected === null; | ||
} | ||
|
||
notificarAccion(flag: boolean) { | ||
if (flag) { | ||
const item = this.motivosAccesoHuds.find((elem) => elem.id === this.motivoSelected); | ||
this.motivoAccesoHuds.emit([item.label, this.detalleMotivo]); | ||
this.motivo = { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Acá si no se pasa el objeto completo, al menor debería respetarse las keys de la interfaz key y label (nuevamente para estandarizar su uso y que no varía de componente a componente).
Si el problema es identificar los valores por separado en el html, se puede acceder haciendo [(ngModel)]="motivo.label"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Se mantienen las dos interfaces como se charlo. Saludos!
Requerimiento
https://proyectos.andes.gob.ar/browse/PRIV-65
Funcionalidad desarrollada
Se reemplazan los motivos de acceso a la HUDS estáticos por accesos a BD.
UserStory llegó a completarse
Requiere actualizaciones en la base de datos
Requiere actualizaciones en la API
Requiere actualizaciones en andes-test-integracion