-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathappData.ts
More file actions
70 lines (65 loc) · 1.59 KB
/
Copy pathappData.ts
File metadata and controls
70 lines (65 loc) · 1.59 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
export type FieldKey =
| "subject"
| "address"
| "customer"
| "device"
| "serialNumber"
| "details"
| "notes"
| "summary"
| "counter"
| "extra1"
| "extra2"
| "extra3";
export type FormState = Record<FieldKey, string>;
export const initialForm: FormState = {
subject: "Kitchen service call",
address: "42 Demo Street",
customer: "Acme Foods",
device: "Espresso Pro 9000",
serialNumber: "SN-2026-001",
details: "Machine stops during heating cycle.",
notes: "Customer says issue is intermittent.",
summary: "",
counter: "",
extra1: "",
extra2: "",
extra3: "",
};
export const singleLineFields: {
key: Exclude<FieldKey, "summary" | "details" | "notes">;
label: string;
}[] = [
{ key: "subject", label: "Subject" },
{ key: "address", label: "Address" },
{ key: "customer", label: "Customer" },
{ key: "device", label: "Device model" },
{ key: "serialNumber", label: "Serial number" },
{ key: "counter", label: "Usage counter" },
{ key: "extra1", label: "Extra field 1" },
{ key: "extra2", label: "Extra field 2" },
{ key: "extra3", label: "Extra field 3" },
];
export const multiLineFields: {
key: "details" | "notes" | "summary";
label: string;
minHeight: number;
}[] = [
{ key: "details", label: "Request details", minHeight: 96 },
{ key: "notes", label: "Notes", minHeight: 96 },
{ key: "summary", label: "Visit summary", minHeight: 180 },
];
export const orderedFields: FieldKey[] = [
"subject",
"address",
"customer",
"device",
"serialNumber",
"counter",
"extra1",
"extra2",
"extra3",
"details",
"notes",
"summary",
];