feat(emergencies): umbral de disputas configurable por emergencia#254
Open
nopestack wants to merge 1 commit into
Open
feat(emergencies): umbral de disputas configurable por emergencia#254nopestack wants to merge 1 commit into
nopestack wants to merge 1 commit into
Conversation
…obalEmergency#169) Permite que coordinadores y operadores fijen un umbral de reportes de validez por emergencia (PUT /emergencies/:id/resource-dispute-threshold), sobreescribiendo el umbral global RESOURCE_DISPUTE_THRESHOLD cuando está definido. Si el campo es null, se cae de nuevo al global. - Migración 0042: columna resource_dispute_threshold (nullable integer) - Emergency.setResourceDisputeThreshold() + getter en el dominio - Nuevo puerto EmergencyDisputeThresholdReader + adaptador Drizzle (cross-context, patrón aceptado) - Caso de uso SetEmergencyDisputeThreshold con tests - ReportResourceValidity lee el umbral por emergencia antes de comparar - Permiso emergency:configure añadido al catálogo; concedido a platform_operator y emergency_coordinator - Endpoint PUT :emergencyId/resource-dispute-threshold con guard PermissionGuard - schema.ts regenerado con el nuevo endpoint
|
@nopestack is attempting to deploy a commit to the GlobalEmergency Team on Vercel. A member of the Team first needs to authorize it. |
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.
Closes #169
Resumen
Permite fijar un umbral de reportes de validez de recursos por emergencia, sobrescribiendo el global (
RESOURCE_DISPUTE_THRESHOLD) cuando esté definido.0042_emergency_dispute_threshold.sql: columna nullableresource_dispute_threshold integerenemergencies.Emergency): getterresourceDisputeThreshold, métodosetResourceDisputeThreshold(threshold: number | null), propagado en snapshot.EmergencyDisputeThresholdReaderen el contextoresources+ adaptadorDrizzleEmergencyDisputeThresholdReaderenshared/(mismo patrón cross-context queDrizzleEmergencyStatusReader).SetEmergencyDisputeThresholdcon tests en español.ReportResourceValidity: antes de compararfreshDistinct, consulta el lector por emergencia; si devuelvenull, cae al umbral global.emergency:configureañadido al catálogo de permisos y concedido aplatform_operatoryemergency_coordinator.PUT /emergencies/:emergencyId/resource-dispute-threshold(204 No Content) protegido conPermissionGuard + @RequirePermission('emergency:configure').packages/api-client/src/schema.tsregenerado conpnpm gen:api.Plan de pruebas
SetEmergencyDisputeThreshold: set positivo, limpiar a null, emergencia no encontradaReportResourceValidity: umbral por emergencia dispara a los 2 reportes; null cae al global de 3nest build) pasa sin errores