refactor(forms): isolate submission persistence
This commit is contained in:
+5
-2
@@ -59,6 +59,7 @@ import {
|
||||
import { isImageOnlyResponse } from "@/lib/form/question-response-type";
|
||||
import {
|
||||
buildFormSchema,
|
||||
formatQueuePosition,
|
||||
parseStoredDraft,
|
||||
prepareInitialState,
|
||||
type FormFillerClientProps,
|
||||
@@ -451,7 +452,9 @@ export function FormFillerClient({
|
||||
<span>{questions.length} คำถาม</span>
|
||||
<span>{totalAnswers} คำตอบทั้งหมด</span>
|
||||
{queueNumber !== null && (
|
||||
<Badge variant="outline">ลำดับของคุณ #{queueNumber + 1}</Badge>
|
||||
<Badge variant="outline">
|
||||
ลำดับของคุณ {formatQueuePosition(queueNumber)}
|
||||
</Badge>
|
||||
)}
|
||||
</CardDescription>
|
||||
</CardHeader>
|
||||
@@ -996,7 +999,7 @@ export function FormFillerClient({
|
||||
ส่งคำตอบแล้ว
|
||||
</AlertDialogTitle>
|
||||
<AlertDialogDescription>
|
||||
บันทึกคำตอบของคุณเรียบร้อย คำตอบของคุณอยู่ลำดับที่ #{(queueNumber ?? 0) + 1} จากทั้งหมด{" "}
|
||||
บันทึกคำตอบของคุณเรียบร้อย คำตอบของคุณอยู่ลำดับที่ {formatQueuePosition(queueNumber ?? 1)} จากทั้งหมด{" "}
|
||||
{totalAnswers} คำตอบ คุณสามารถแก้ไขได้คำตอบตอนไหนก็ได้ที่แบบฟอร์มยังเปิดอยู่
|
||||
</AlertDialogDescription>
|
||||
</AlertDialogHeader>
|
||||
|
||||
Reference in New Issue
Block a user