diff --git a/src/lib/components/dictionary/test/config/test-form-config.js b/src/lib/components/dictionary/test/config/test-form-config.js index 0ac6e67..49a9aae 100644 --- a/src/lib/components/dictionary/test/config/test-form-config.js +++ b/src/lib/components/dictionary/test/config/test-form-config.js @@ -74,7 +74,7 @@ export const testCalSchema = z }); export const testGroupSchema = z.object({ - Member: z.string().optional() + Members: z.string().optional() }); export const refNumSchema = z @@ -219,7 +219,7 @@ export const testCalInitialForm = { export const testGroupInitialForm = { TestGrpID: '', TestSiteID: '', - Member: '', + Members: [], } export const refNumInitialForm = { @@ -284,7 +284,7 @@ export const testCalDefaultErrors = { }; export const testGroupDefaultErrors = { - Member: null, + Members: 'fdsa', } export const refNumDefaultErrors = { @@ -1062,6 +1062,11 @@ export function buildTestPayload({ mainForm, activeFormStates, testType, refNumD } else if (key === 'refTxt' && refTxtData?.length > 0) { payload[key] = refTxtData; + } else if(key === 'group') { + payload[key] = { + ...state.form, + Members: state.form?.Members?.map((m) => m.value).filter(Boolean) ?? [] + }; } else if (state?.form) { payload[key] = { ...state.form diff --git a/src/lib/components/dictionary/test/page/create-page.svelte b/src/lib/components/dictionary/test/page/create-page.svelte index b09f8e8..d915c66 100644 --- a/src/lib/components/dictionary/test/page/create-page.svelte +++ b/src/lib/components/dictionary/test/page/create-page.svelte @@ -123,6 +123,9 @@ map: mapFormState }; case 'GROUP': + return { + group: groupFormState + } case 'TITLE': default: return {}; diff --git a/src/lib/components/dictionary/test/page/tabs/group.svelte b/src/lib/components/dictionary/test/page/tabs/group.svelte index 75ecc4f..9dd05a5 100644 --- a/src/lib/components/dictionary/test/page/tabs/group.svelte +++ b/src/lib/components/dictionary/test/page/tabs/group.svelte @@ -1,25 +1,34 @@