feat(resources): estados operativos preparing y assisted - #437
Merged
Conversation
Añade dos estados a PublicStatus, públicamente visibles y establecibles
vía POST /resources/:id/status:
- preparing ("En preparación"): centro que se está habilitando, aún no
operativo pero visible en el mapa para anticipar su apertura.
- assisted ("Asistido"): alojamiento para colectivos específicos.
Sin migración (public_status es columna text). Incluye visibilidad pública
(isPubliclyVisible, PUBLICLY_VISIBLE_STATUSES, get-public-resource), DTO de
cambio de estado, statusMap del controller, métricas (init del Record y total
robusto con Object.values) y el semáforo web (status-light, i18n es/en,
resource-detail, admin statusLabel, emergency-map). api-client regenerado.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Qué
Añade dos estados operativos a
PublicStatus, públicamente visibles y establecibles víaPOST /resources/:id/status:preparing("En preparación") — centro que se está habilitando, aún no operativo pero visible en el mapa para anticipar su apertura (p. ej. Talavera Ferial).assisted("Asistido") — alojamiento para colectivos específicos (p. ej. residentes evacuados).Cierra la tanda de enriquecimiento del modelo de puntos: hasta ahora "preparing"/"assisted" solo se podían reflejar como texto en la descripción.
Cambios
PublicStatus(+2 valores),isPubliclyVisible().changePublicStatusno cambia (su regla no-Hidden↔no-Hidden ya los admite).PUBLICLY_VISIBLE_STATUSES(repo) yVISIBLE(get-public-resource).UpdateResourcePublicStatusDto(enum + tipo) ystatusMapdel controller.Record<PublicStatus,number>y total robusto conObject.values().reduce(deja de enumerar claves a mano → no se rompe al añadir estados).status-light(color + label), i18nstatus_lightes/en,resource-detail,statusLabeladmin, y el union deemergency-map.public_statuses columnatext).api-clientregenerado.Gate
nest build✅ · eslint/prettier ✅ · 1637 tests api ✅ ·web build/lint/118 tests web ✅.Nota de alcance
No añadí
preparing/assistedal selector de estado del dueño (mis-puntos/status-form.tsx) — de momento son estados que fija coordinación/admin. Si quieres que el propietario pueda seleccionarlos, lo amplío.