feat: replace calendar day modal with dedicated day-view page

Calendar day clicks now navigate to /experiments/:id/day/:date
(with ?field= param). ExperimentDayView shows a sticky-column table
of all subjects with data that day, inline edit via modal, and a
session-metrics bar chart from analysis_summary. Subject name links
to /daily-statuses/:id. Backend adds ?date= filtering to
GET /experiments/:id/daily-statuses.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Experiments DB Dev
2026-04-23 12:46:35 -04:00
parent 6ecc6dc19a
commit c8f0c5f298
7 changed files with 332 additions and 380 deletions
+7 -1
View File
@@ -349,8 +349,14 @@ router.get('/:id/daily-statuses', async (req, res, next) => {
const exp = await prisma.experiment.findUnique({ where: { id: req.params.id } });
if (!exp) return res.status(404).json({ error: 'Experiment not found' });
const where = { animal: { experiment_id: req.params.id } };
if (req.query.date) {
const d = new Date(req.query.date + 'T00:00:00.000Z');
const next = new Date(d); next.setUTCDate(next.getUTCDate() + 1);
where.date = { gte: d, lt: next };
}
const statuses = await prisma.dailyStatus.findMany({
where: { animal: { experiment_id: req.params.id } },
where,
select: {
id: true,
animal_id: true,