diff --git a/app/api/materials/[id]/route.ts b/app/api/materials/[id]/route.ts
index cb4c217..fb6c98e 100644
--- a/app/api/materials/[id]/route.ts
+++ b/app/api/materials/[id]/route.ts
@@ -169,7 +169,7 @@ export async function GET(
reportKind: true,
certificateTestedOn: true,
certificateNumber: true,
- certificateUsageInstructions: true,
+ certificateExpiresOn: true,
reportUsageRules: true,
liveDate: true,
liveHost: true,
@@ -251,7 +251,7 @@ export async function GET(
reportKind: true,
certificateTestedOn: true,
certificateNumber: true,
- certificateUsageInstructions: true,
+ certificateExpiresOn: true,
reportUsageRules: true,
liveDate: true,
liveHost: true,
@@ -387,7 +387,7 @@ export async function GET(
reportKind: materialWithUser.reportKind || null,
certificateTestedOn: materialWithUser.certificateTestedOn || null,
certificateNumber: materialWithUser.certificateNumber || null,
- certificateUsageInstructions: materialWithUser.certificateUsageInstructions || null,
+ certificateExpiresOn: materialWithUser.certificateExpiresOn || null,
reportUsageRules: materialWithUser.reportUsageRules || null,
categoryName: materialWithUser.categoryName,
sceneName: materialWithUser.sceneName,
@@ -481,7 +481,7 @@ export async function GET(
reportKind: materialWithUser.reportKind || null,
certificateTestedOn: materialWithUser.certificateTestedOn || null,
certificateNumber: materialWithUser.certificateNumber || null,
- certificateUsageInstructions: materialWithUser.certificateUsageInstructions || null,
+ certificateExpiresOn: materialWithUser.certificateExpiresOn || null,
reportUsageRules: materialWithUser.reportUsageRules || null,
categoryName: materialWithUser.categoryName,
sceneName: materialWithUser.sceneName,
@@ -617,7 +617,7 @@ export async function PUT(
...(formData.has('reportKind') ? { reportKind: formData.get('reportKind') as string | null } : {}),
...(formData.has('certificateTestedOn') ? { certificateTestedOn: formData.get('certificateTestedOn') as string | null } : {}),
...(formData.has('certificateNumber') ? { certificateNumber: formData.get('certificateNumber') as string | null } : {}),
- ...(formData.has('certificateUsageInstructions') ? { certificateUsageInstructions: formData.get('certificateUsageInstructions') as string | null } : {}),
+ ...(formData.has('certificateExpiresOn') ? { certificateExpiresOn: formData.get('certificateExpiresOn') as string | null } : {}),
...(formData.has('reportUsageRules') ? { reportUsageRules: formData.get('reportUsageRules') as string | null } : {}),
categoryName: formData.get('categoryName') as string | null,
sceneName: formData.get('sceneName') as string | null,
diff --git a/app/api/materials/share/route.ts b/app/api/materials/share/route.ts
index a570f58..714725a 100644
--- a/app/api/materials/share/route.ts
+++ b/app/api/materials/share/route.ts
@@ -128,7 +128,7 @@ export async function GET(request: NextRequest) {
reportKind: true,
certificateTestedOn: true,
certificateNumber: true,
- certificateUsageInstructions: true,
+ certificateExpiresOn: true,
reportUsageRules: true,
liveDate: true,
liveHost: true,
@@ -364,7 +364,7 @@ export async function GET(request: NextRequest) {
reportKind: (material as any).reportKind || null,
certificateTestedOn: (material as any).certificateTestedOn || null,
certificateNumber: (material as any).certificateNumber || null,
- certificateUsageInstructions: (material as any).certificateUsageInstructions || null,
+ certificateExpiresOn: (material as any).certificateExpiresOn || null,
reportUsageRules: (material as any).reportUsageRules || null,
isAiGenerated: Boolean((material as any).isAiGenerated),
taskDetailSourceType: (material as any).taskDetailSourceType || null,
diff --git a/app/api/materials/update/route.ts b/app/api/materials/update/route.ts
index 87d80af..59aab30 100644
--- a/app/api/materials/update/route.ts
+++ b/app/api/materials/update/route.ts
@@ -48,7 +48,7 @@ export async function PUT(request: NextRequest) {
...(formData.has('reportKind') ? { reportKind: formData.get('reportKind') as string | null } : {}),
...(formData.has('certificateTestedOn') ? { certificateTestedOn: formData.get('certificateTestedOn') as string | null } : {}),
...(formData.has('certificateNumber') ? { certificateNumber: formData.get('certificateNumber') as string | null } : {}),
- ...(formData.has('certificateUsageInstructions') ? { certificateUsageInstructions: formData.get('certificateUsageInstructions') as string | null } : {}),
+ ...(formData.has('certificateExpiresOn') ? { certificateExpiresOn: formData.get('certificateExpiresOn') as string | null } : {}),
...(formData.has('reportUsageRules') ? { reportUsageRules: formData.get('reportUsageRules') as string | null } : {}),
categoryName: formData.get('categoryName') as string | null,
sceneName: formData.get('sceneName') as string | null,
diff --git a/app/api/materials/upload/certificate-report/init/route.test.ts b/app/api/materials/upload/certificate-report/init/route.test.ts
index e2f47af..59f2d64 100644
--- a/app/api/materials/upload/certificate-report/init/route.test.ts
+++ b/app/api/materials/upload/certificate-report/init/route.test.ts
@@ -22,7 +22,7 @@ const input = {
platformName: '品牌',
certificateTestedOn: '2027-09-23',
certificateNumber: 'CMA-2026-001',
- certificateUsageInstructions: '使用前核对送检主体',
+ certificateExpiresOn: '2028-09-23',
reportUsageRules: '完整说明\n第二行',
}
@@ -50,7 +50,7 @@ describe('检测报告初始化', () => {
reportKind: '原材料',
certificateTestedOn: new Date('2027-09-23T00:00:00.000Z'),
certificateNumber: 'CMA-2026-001',
- certificateUsageInstructions: '使用前核对送检主体',
+ certificateExpiresOn: new Date('2028-09-23T00:00:00.000Z'),
reportUsageRules: '完整说明\n第二行',
platformName: '品牌',
}),
@@ -62,4 +62,10 @@ describe('检测报告初始化', () => {
expect(response.status).toBe(400)
expect(prisma.material.create).not.toHaveBeenCalled()
})
+
+ test('到期时间早于检测日期时不写入素材', async () => {
+ const response = await POST(request({ ...input, certificateExpiresOn: '2027-09-22' }))
+ expect(response.status).toBe(400)
+ expect(prisma.material.create).not.toHaveBeenCalled()
+ })
})
diff --git a/app/api/materials/upload/certificate-report/init/route.ts b/app/api/materials/upload/certificate-report/init/route.ts
index f5b5c36..c5baa8a 100644
--- a/app/api/materials/upload/certificate-report/init/route.ts
+++ b/app/api/materials/upload/certificate-report/init/route.ts
@@ -23,7 +23,7 @@ export async function POST(request: NextRequest) {
reportTitle,
certificateTestedOn: body.certificateTestedOn,
certificateNumber: body.certificateNumber,
- certificateUsageInstructions: body.certificateUsageInstructions,
+ certificateExpiresOn: body.certificateExpiresOn,
reportUsageRules: body.reportUsageRules,
platformName,
})
diff --git a/app/edit/[id]/page.tsx b/app/edit/[id]/page.tsx
index 2b60632..b8495a1 100644
--- a/app/edit/[id]/page.tsx
+++ b/app/edit/[id]/page.tsx
@@ -7,7 +7,7 @@ import Header from '@/components/Header'
import SearchableUserSelect from '@/components/SearchableUserSelect'
import { useConfirmActionDialog } from '@/components/ConfirmActionDialog'
import TaskReferenceFields from '@/components/upload/TaskReferenceFields'
-import CertificateTestDatePicker from '@/components/upload/CertificateTestDatePicker'
+import CertificateDatePicker from '@/components/upload/CertificateDatePicker'
import {
canManuallyReplacePreview,
getSelectableMaterialTypeOptions,
@@ -38,7 +38,7 @@ interface Material {
reportKind?: string | null
certificateTestedOn?: string | Date | null
certificateNumber?: string | null
- certificateUsageInstructions?: string | null
+ certificateExpiresOn?: string | null
reportUsageRules?: string | null
liveDate?: Date | string | null
liveHost?: string | null
@@ -111,7 +111,7 @@ export default function EditMaterialPage({ params }: { params: { id: string } })
const [reportKind, setReportKind] = useState('')
const [certificateTestedOn, setCertificateTestedOn] = useState('')
const [certificateNumber, setCertificateNumber] = useState('')
- const [certificateUsageInstructions, setCertificateUsageInstructions] = useState('')
+ const [certificateExpiresOn, setCertificateExpiresOn] = useState('')
const [reportUsageRules, setReportUsageRules] = useState('')
const [liveDate, setLiveDate] = useState('')
const [liveHost, setLiveHost] = useState('')
@@ -163,7 +163,7 @@ export default function EditMaterialPage({ params }: { params: { id: string } })
reportKind,
certificateTestedOn,
certificateNumber,
- certificateUsageInstructions,
+ certificateExpiresOn,
reportUsageRules,
categoryName,
sceneName,
@@ -191,7 +191,7 @@ export default function EditMaterialPage({ params }: { params: { id: string } })
reportKind,
certificateTestedOn,
certificateNumber,
- certificateUsageInstructions,
+ certificateExpiresOn,
reportUsageRules,
sceneName,
taskDetailRequesterUserId,
@@ -306,7 +306,7 @@ export default function EditMaterialPage({ params }: { params: { id: string } })
setReportKind(data.reportKind || '')
setCertificateTestedOn(data.certificateTestedOn ? String(data.certificateTestedOn).slice(0, 10) : '')
setCertificateNumber(data.certificateNumber || '')
- setCertificateUsageInstructions(data.certificateUsageInstructions || '')
+ setCertificateExpiresOn(data.certificateExpiresOn ? String(data.certificateExpiresOn).slice(0, 10) : '')
setReportUsageRules(data.reportUsageRules || (isCertificateReportMaterialType(data.materialType) ? DEFAULT_CERTIFICATE_REPORT_USAGE_RULES : ''))
setLiveDate(data.liveDate ? String(data.liveDate).slice(0, 10) : '')
setLiveHost(data.liveHost || '')
@@ -349,7 +349,7 @@ export default function EditMaterialPage({ params }: { params: { id: string } })
reportKind: data.reportKind || '',
certificateTestedOn: data.certificateTestedOn ? String(data.certificateTestedOn).slice(0, 10) : '',
certificateNumber: data.certificateNumber || '',
- certificateUsageInstructions: data.certificateUsageInstructions || '',
+ certificateExpiresOn: data.certificateExpiresOn ? String(data.certificateExpiresOn).slice(0, 10) : '',
reportUsageRules: data.reportUsageRules || (isCertificateReportMaterialType(data.materialType) ? DEFAULT_CERTIFICATE_REPORT_USAGE_RULES : ''),
categoryName: data.categoryName || '',
sceneName: data.sceneName || '',
@@ -526,7 +526,7 @@ export default function EditMaterialPage({ params }: { params: { id: string } })
reportTitle,
certificateTestedOn,
certificateNumber,
- certificateUsageInstructions,
+ certificateExpiresOn,
reportUsageRules,
platformName,
}, material?.materialType === materialType ? material?.platformName || '' : '')
@@ -592,7 +592,7 @@ export default function EditMaterialPage({ params }: { params: { id: string } })
formData.append('reportKind', reportKind)
formData.append('certificateTestedOn', certificateTestedOn)
formData.append('certificateNumber', certificateNumber)
- formData.append('certificateUsageInstructions', certificateUsageInstructions)
+ formData.append('certificateExpiresOn', certificateExpiresOn)
formData.append('reportUsageRules', reportUsageRules)
}
if (materialType === '直播切片') {
@@ -1065,17 +1065,17 @@ export default function EditMaterialPage({ params }: { params: { id: string } })
-
+
请按报告标注的检测日期选择
-
- setCertificateNumber(event.target.value)} maxLength={120} className="input-apple" required />
+
+
-
-
diff --git a/app/share/[id]/page.test.tsx b/app/share/[id]/page.test.tsx
index 0bc2152..980f5c5 100644
--- a/app/share/[id]/page.test.tsx
+++ b/app/share/[id]/page.test.tsx
@@ -270,8 +270,9 @@ describe('certificate report share page', () => {
render(
)
expect(await screen.findByText('CMA-2026-001')).toBeInTheDocument()
expect(screen.getByText('2027-09-23')).toBeInTheDocument()
- expect(screen.queryByText('2028-09-23')).not.toBeInTheDocument()
- expect(screen.getByText('使用前核对主体')).toBeInTheDocument()
+ expect(screen.getByText('2028-09-23')).toBeInTheDocument()
+ expect(screen.queryByRole('heading', { name: '证书使用说明' })).not.toBeInTheDocument()
+ expect(screen.queryByText('使用前核对主体')).not.toBeInTheDocument()
expect(screen.getByRole('heading', { name: '检测报告使用规则说明' }).nextElementSibling?.textContent)
.toBe('第一段\n第二段')
})
diff --git a/app/share/[id]/page.tsx b/app/share/[id]/page.tsx
index 3b1ffdf..7551882 100644
--- a/app/share/[id]/page.tsx
+++ b/app/share/[id]/page.tsx
@@ -41,7 +41,7 @@ interface Material {
reportKind?: string | null
certificateTestedOn?: string | null
certificateNumber?: string | null
- certificateUsageInstructions?: string | null
+ certificateExpiresOn?: string | null
reportUsageRules?: string | null
liveDate?: string | Date | null
liveHost?: string | null
@@ -2085,6 +2085,10 @@ export default function SharePage() {
证书检测日期
{material.certificateTestedOn ? String(material.certificateTestedOn).slice(0, 10) : '待补充'}
+
+
证书到期时间
+
{material.certificateExpiresOn ? String(material.certificateExpiresOn).slice(0, 10) : '待补充'}
+
证书编号
{material.certificateNumber || '待补充'}
@@ -2244,15 +2248,9 @@ export default function SharePage() {
{isCertificateReportMaterialType(material.materialType) && (
-
-
-
证书使用说明
-
{material.certificateUsageInstructions || '待补充'}
-
-
-
检测报告使用规则说明
-
{material.reportUsageRules || '待补充'}
-
+
+
检测报告使用规则说明
+
{material.reportUsageRules || '待补充'}
)}
diff --git a/components/upload/CertificateTestDatePicker.test.tsx b/components/upload/CertificateDatePicker.test.tsx
similarity index 61%
rename from components/upload/CertificateTestDatePicker.test.tsx
rename to components/upload/CertificateDatePicker.test.tsx
index 43381f6..a0f8f33 100644
--- a/components/upload/CertificateTestDatePicker.test.tsx
+++ b/components/upload/CertificateDatePicker.test.tsx
@@ -1,9 +1,27 @@
import { fireEvent, render, screen } from '@testing-library/react'
-import CertificateTestDatePicker from '@/components/upload/CertificateTestDatePicker'
+import CertificateDatePicker from '@/components/upload/CertificateDatePicker'
+
+describe('CertificateDatePicker', () => {
+ test('检测日期和到期时间分别选择,日历使用独立的名称和状态', () => {
+ const onTested = jest.fn()
+ const onExpires = jest.fn()
+ render(<>
+
+
+ >)
+ const expires = screen.getByRole('button', { name: /证书到期时间/ })
+ fireEvent.click(expires)
+ expect(screen.getByRole('dialog', { name: '选择证书到期时间' })).toBeInTheDocument()
+ fireEvent.click(expires)
+ expect(screen.queryByRole('dialog')).not.toBeInTheDocument()
+ fireEvent.click(expires)
+ fireEvent.click(screen.getByRole('button', { name: '2027年9月24日' }))
+ expect(onExpires).toHaveBeenCalledWith('2027-09-24')
+ expect(onTested).not.toHaveBeenCalled()
+ })
-describe('CertificateTestDatePicker', () => {
test('日历图标可反复展开和收起,Escape 也会关闭', () => {
- render(
)
+ render(
)
const trigger = screen.getByRole('button', { name: /证书检测日期/ })
const icon = trigger.querySelector('svg')
@@ -25,7 +43,7 @@ describe('CertificateTestDatePicker', () => {
test('按日历选择日期时返回统一格式,并关闭日历', () => {
const onChange = jest.fn()
- render(
)
+ render(
)
fireEvent.click(screen.getByRole('button', { name: /证书检测日期/ }))
expect(screen.getByText('2026年9月')).toBeInTheDocument()
@@ -39,7 +57,7 @@ describe('CertificateTestDatePicker', () => {
test('点击日历外部会关闭,不改动已选择的日期', () => {
const onChange = jest.fn()
- render(
)
+ render(
)
fireEvent.click(screen.getByRole('button', { name: /证书检测日期/ }))
fireEvent.pointerDown(document.body)
@@ -50,7 +68,7 @@ describe('CertificateTestDatePicker', () => {
test('可以直接切换年份和月份选择较远的检测日期', () => {
const onChange = jest.fn()
- render(
)
+ render(
)
fireEvent.click(screen.getByRole('button', { name: /证书检测日期/ }))
fireEvent.click(screen.getByRole('button', { name: '选择年份和月份' }))
diff --git a/components/upload/CertificateTestDatePicker.tsx b/components/upload/CertificateDatePicker.tsx
similarity index 96%
rename from components/upload/CertificateTestDatePicker.tsx
rename to components/upload/CertificateDatePicker.tsx
index 186e572..802cf06 100644
--- a/components/upload/CertificateTestDatePicker.tsx
+++ b/components/upload/CertificateDatePicker.tsx
@@ -12,14 +12,15 @@ function parseDate(value: string): Date | null {
return isValid(date) && format(date, 'yyyy-MM-dd') === value ? date : null
}
-interface CertificateTestDatePickerProps {
+interface CertificateDatePickerProps {
id: string
+ label: string
value: string
onChange: (value: string) => void
disabled?: boolean
}
-export default function CertificateTestDatePicker({ id, value, onChange, disabled = false }: CertificateTestDatePickerProps) {
+export default function CertificateDatePicker({ id, label, value, onChange, disabled = false }: CertificateDatePickerProps) {
const containerRef = useRef
(null)
const triggerRef = useRef(null)
const calendarRef = useRef(null)
@@ -91,7 +92,7 @@ export default function CertificateTestDatePicker({ id, value, onChange, disable
id={id}
type="button"
disabled={disabled}
- aria-label={`证书检测日期,${selectedDate ? format(selectedDate, 'yyyy年M月d日') : '未选择'}`}
+ aria-label={`${label},${selectedDate ? format(selectedDate, 'yyyy年M月d日') : '未选择'}`}
aria-haspopup="dialog"
aria-expanded={isOpen}
aria-controls={`${id}-calendar`}
@@ -102,7 +103,7 @@ export default function CertificateTestDatePicker({ id, value, onChange, disable
className="input-apple flex min-h-[50px] items-center justify-between gap-3 text-left disabled:cursor-not-allowed disabled:opacity-60"
>
- {selectedDate ? format(selectedDate, 'yyyy年M月d日') : '选择检测日期'}
+ {selectedDate ? format(selectedDate, 'yyyy年M月d日') : '选择日期'}
@@ -112,7 +113,7 @@ export default function CertificateTestDatePicker({ id, value, onChange, disable
ref={calendarRef}
id={`${id}-calendar`}
role="dialog"
- aria-label="选择证书检测日期"
+ aria-label={`选择${label}`}
className="absolute left-1/2 top-full z-40 mt-2 w-[320px] max-w-[calc(100vw-3rem)] -translate-x-1/2 rounded-[12px] border border-[#e7e8ea] bg-white p-3 text-[#1a1c1d] shadow-[0_12px_28px_rgba(26,28,29,0.10)]"
>
diff --git a/components/upload/CertificateReportUploader.test.tsx b/components/upload/CertificateReportUploader.test.tsx
new file mode 100644
index 0000000..6280d9a
--- /dev/null
+++ b/components/upload/CertificateReportUploader.test.tsx
@@ -0,0 +1,44 @@
+import { fireEvent, render, screen, waitFor } from '@testing-library/react'
+import CertificateReportUploader from './CertificateReportUploader'
+import { chunkUpload } from '@/lib/chunk-upload'
+import { DEFAULT_CERTIFICATE_REPORT_USAGE_RULES } from '@/lib/certificate-report'
+
+jest.mock('@/lib/chunk-upload', () => ({ chunkUpload: jest.fn() }))
+
+test.each(['成品', '原材料'])('%s上传只提交一段说明,并分别提交检测日期和到期时间', async (kind) => {
+ const originalFetch = global.fetch
+ jest.useFakeTimers().setSystemTime(new Date('2026-09-27T12:00:00'))
+ const { container } = render(
)
+ try {
+ expect(screen.getByLabelText('成品')).toBeChecked()
+ fireEvent.click(screen.getByLabelText(kind))
+ fireEvent.change(screen.getByLabelText(/报告名称 \/ 检测对象/), { target: { value: '板材检测报告' } })
+ fireEvent.change(screen.getByLabelText('品类 *'), { target: { value: '板材' } })
+ fireEvent.change(screen.getByLabelText('证书编号 *'), { target: { value: 'CMA-001' } })
+ fireEvent.click(screen.getByRole('button', { name: /证书检测日期/ }))
+ fireEvent.click(screen.getByRole('button', { name: '2026年9月23日' }))
+ fireEvent.click(screen.getByRole('button', { name: /证书到期时间/ }))
+ fireEvent.click(screen.getByRole('button', { name: '选择年份和月份' }))
+ fireEvent.click(screen.getByRole('button', { name: '下一年' }))
+ fireEvent.click(screen.getByRole('button', { name: '9月' }))
+ fireEvent.click(screen.getByRole('button', { name: '2027年9月23日' }))
+ expect(screen.queryByLabelText('证书使用说明 *')).not.toBeInTheDocument()
+ expect(screen.getAllByRole('textbox').filter((input) => input.tagName === 'TEXTAREA')).toHaveLength(1)
+ expect(screen.getByLabelText('检测报告使用规则说明 *')).toHaveValue(DEFAULT_CERTIFICATE_REPORT_USAGE_RULES)
+ const pdf = new File(['%PDF-1.4'], '报告.pdf', { type: 'application/pdf' })
+ fireEvent.change(container.querySelector('input[type="file"]')!, { target: { files: [pdf] } })
+ jest.useRealTimers()
+ global.fetch = jest.fn().mockResolvedValue({ ok: true, json: async () => ({ materialId: 'report-1' }) })
+ ;(chunkUpload as jest.Mock).mockResolvedValue({ uploadId: 'file-1' })
+ fireEvent.click(screen.getByRole('button', { name: '创建分享素材' }))
+ await waitFor(() => expect(global.fetch).toHaveBeenCalledTimes(2))
+ const [url, init] = (global.fetch as jest.Mock).mock.calls[0]
+ expect(url).toBe('/api/materials/upload/certificate-report/init')
+ const payload = JSON.parse(init.body)
+ expect(payload).toMatchObject({ reportKind: kind, certificateTestedOn: '2026-09-23', certificateExpiresOn: '2027-09-23', reportUsageRules: DEFAULT_CERTIFICATE_REPORT_USAGE_RULES })
+ expect(payload).not.toHaveProperty('certificateUsageInstructions')
+ } finally {
+ jest.useRealTimers()
+ global.fetch = originalFetch
+ }
+})
diff --git a/components/upload/CertificateReportUploader.tsx b/components/upload/CertificateReportUploader.tsx
index 12f6f61..2aff6cc 100644
--- a/components/upload/CertificateReportUploader.tsx
+++ b/components/upload/CertificateReportUploader.tsx
@@ -9,7 +9,7 @@ import {
detectFileKindFromName,
validateCertificateReportMetadata,
} from '@/lib/certificate-report'
-import CertificateTestDatePicker from '@/components/upload/CertificateTestDatePicker'
+import CertificateDatePicker from '@/components/upload/CertificateDatePicker'
import { FileUp } from 'lucide-react'
import { dropZoneIdleClass, fieldControlClass, fieldHintClass, fieldLabelClass, inkButtonClass, outlineButtonClass, uploadAreaButtonClass } from './upload-field-styles'
@@ -41,7 +41,7 @@ export default function CertificateReportUploader({
const [reportKind, setReportKind] = useState
(CERTIFICATE_REPORT_KIND.FINISHED)
const [certificateTestedOn, setCertificateTestedOn] = useState('')
const [certificateNumber, setCertificateNumber] = useState('')
- const [certificateUsageInstructions, setCertificateUsageInstructions] = useState('')
+ const [certificateExpiresOn, setCertificateExpiresOn] = useState('')
const [reportUsageRules, setReportUsageRules] = useState(DEFAULT_CERTIFICATE_REPORT_USAGE_RULES)
const [productCategoryName, setProductCategoryName] = useState('')
const [platformName, setPlatformName] = useState('')
@@ -126,7 +126,7 @@ export default function CertificateReportUploader({
reportTitle,
certificateTestedOn,
certificateNumber,
- certificateUsageInstructions,
+ certificateExpiresOn,
reportUsageRules,
platformName,
})
@@ -160,7 +160,7 @@ export default function CertificateReportUploader({
reportKind,
certificateTestedOn,
certificateNumber: certificateNumber.trim(),
- certificateUsageInstructions: certificateUsageInstructions.trim(),
+ certificateExpiresOn,
reportUsageRules: reportUsageRules.trim(),
productCategoryName: productCategoryName.trim(),
platformName: platformName.trim(),
@@ -313,8 +313,9 @@ export default function CertificateReportUploader({
-
+