system-praktyk-front/src/provider/dummy/report.ts
2021-01-11 23:03:25 +01:00

84 lines
2.3 KiB
TypeScript

import { Report, ReportSchema } from "@/data/report";
import { Stateful } from "@/data";
const choices = [1, 2, 3, 4, 5].map(n => ({
pl: `Wybór ${n}`,
en: `Choice ${n}`
}))
export const sampleReportSchema: ReportSchema = [
{
type: "short-text",
id: "short",
description: {
en: "Text field, with <strong>HTML</strong> description",
pl: "Pole tekstowe, z opisem w formacie <strong>HTML</strong>"
},
label: {
en: "Text Field",
pl: "Pole tekstowe",
},
},
{
type: "long-text",
id: "long",
description: {
en: "Long text field, with <strong>HTML</strong> description",
pl: "Długie pole tekstowe, z opisem w formacie <strong>HTML</strong>"
},
label: {
en: "Long Text Field",
pl: "Długie Pole tekstowe",
},
},
{
type: "radio",
id: "radio",
description: {
en: "single choice field, with <strong>HTML</strong> description",
pl: "Pole jednokrotnego wyboru, z opisem w formacie <strong>HTML</strong>"
},
choices,
label: {
en: "Single choice field",
pl: "Pole jednokrotnego wyboru",
},
},
{
type: "select",
id: "select",
description: {
en: "select field, with <strong>HTML</strong> description",
pl: "Pole jednokrotnego wyboru z selectboxem, z opisem w formacie <strong>HTML</strong>"
},
choices,
label: {
en: "Select field",
pl: "Pole jednokrotnego wyboru (selectbox)",
},
},
{
type: "checkbox",
id: "multi",
description: {
en: "Multiple choice field, with <strong>HTML</strong> description",
pl: "Pole wielokrotnego wyboru, z opisem w formacie <strong>HTML</strong>"
},
choices,
label: {
en: "Multi choice field",
pl: "Pole wielokrotnego wyboru",
},
},
]
export const emptyReport: Report = {
fields: {
"field_short": "Testowa wartość",
"field_select": choices[0],
"field_multi": [ choices[1], choices[2] ],
},
comment: "",
state: "draft",
}