a2n-seattle / a2n-seattle/rms-app
Default borrow time to now and return-by time to +1 day
- Lenguaje dominante
- TypeScript
- Estrellas
- 1
- Forks
- 1
- Merge medio
- 27 min
- PR fusionados (30 d)
- 4
Descripción
# Why?
**As a** user borrowing or reserving an item
**I want** sensible defaults pre-filled in the time fields
**So that** I don't have to manually enter the current date/time or compute "one day from now" for the common case.
# What?
In the borrow/reserve forms (wherever `start`/`end` time inputs are rendered — `items/[id]/page.tsx`'s reserve form and/or the basket/dashboard borrow prompts from later phases):
- Default the **borrow time** field to the current date/time.
- Default the **return-by time** field to exactly 1 day (24h) after the borrow/start time, same time-of-day.
Should apply consistently across every place a borrow/reserve time is collected (single-item reserve form, basket-style multi-select borrow/reserve prompt, one-click row actions), not just one entry point.
# Testing
Jest/RTL test asserting the default field values on initial render (e.g. mock a fixed `Date.now()` and assert the rendered `start`/`end` input values).
Guía de contribución
No hay ninguna guía de contribución indexada para este repositorio
Línea de trabajo
El issue menciona `items/[id]/page.tsx` y otros formularios de préstamo/reserva. Empieza localizando los componentes de formulario que manejan entradas de hora `start`/`end`. Usa `Date.now()` para establecer la hora de préstamo predeterminada y calcula la hora de devolución como 24 horas después. Escribe un test Jest/RTL para verificar que los valores predeterminados se renderizan correctamente en la carga inicial.
Escrito por el modelo de indexación a partir del texto del issue.
Evaluación
- Stack tecnológico
- react
- Área
- frontend
- Tipo de issue
- Nueva funcionalidad
- Dificultad
- 2/5
- Tiempo estimado
- 1-3 horas
- Estado de actividad
- Tranquilo
- Claridad
- Bien especificado
- Aptitud para principiantes
- 75/100