Skip to content

feat: add edit function for past submissions including answers and ti…#58

Merged
folkiesss merged 1 commit into
chore/bun-containerfrom
bun-feat/edit-submision
May 26, 2026
Merged

feat: add edit function for past submissions including answers and ti…#58
folkiesss merged 1 commit into
chore/bun-containerfrom
bun-feat/edit-submision

Conversation

@Kafiling

Copy link
Copy Markdown
Owner

…mestamps

@vercel

vercel Bot commented May 19, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
daycare-service-eicr Error Error May 21, 2026 4:06pm

@Kafiling

Copy link
Copy Markdown
Owner Author

summary of all changes made:

Files created:

lib/scoring.ts — calculateTotalScore extracted as a shared utility (pure JS, usable on both server and client)
app/(main)/patient/[id]/history/[submissionId]/_actions/updateSubmission.ts — Server action that recalculates score + evaluation result + triggers group reassignment via assign_patient_to_multiple_groups RPC
app/(main)/patient/[id]/history/[submissionId]/EditSubmissionClient.tsx — Client component with view/edit toggle, datetime picker (Bangkok-aware), and QuestionRenderer for each answer
Files modified:

app/(main)/patient/[id]/history/[submissionId]/page.tsx — Now just fetches data server-side and passes it to EditSubmissionClient
app/(main)/patient/[id]/[formId]/[questionId]/page.tsx — Removed 100-line inline calculateTotalScore and replaced with the import from lib/scoring

@folkiesss
folkiesss force-pushed the bun-feat/edit-submision branch from b1aa17c to 65960b3 Compare May 21, 2026 16:05
@folkiesss
folkiesss force-pushed the chore/bun-container branch 11 times, most recently from eabe4fe to dd8d76d Compare May 26, 2026 08:29
@folkiesss
folkiesss merged commit ddf65e0 into chore/bun-container May 26, 2026
2 of 3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants