Skip to content

Commit

Permalink
feat: remoce pdf proccessing code for select dropdown tckt-360
Browse files Browse the repository at this point in the history
  • Loading branch information
kalasgarov committed Nov 1, 2024
1 parent 56ca56c commit 3b06384
Show file tree
Hide file tree
Showing 4 changed files with 1 addition and 26 deletions.
11 changes: 0 additions & 11 deletions packages/forms/src/documents/document.ts
Original file line number Diff line number Diff line change
Expand Up @@ -137,17 +137,6 @@ export const addDocumentFieldsToForm = (
maxLength: 128,
},
} satisfies InputPattern);
} else if (field.type === 'SelectDropdown') {
patterns.push({
type: 'input',
id: patternId,
data: {
label: field.label,
initial: '',
required: false,
maxLength: 128,
},
} satisfies InputPattern);
} else if (field.type === 'Paragraph' || field.type === 'RichText') {
// skip purely presentational fields
} else if (field.type === 'not-supported') {
Expand Down
3 changes: 0 additions & 3 deletions packages/forms/src/documents/pdf/generate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -113,9 +113,6 @@ const setFormFieldData = (
} else if (fieldType === 'OptionList') {
const field = form.getDropdown(fieldName);
field.select(fieldValue);
} else if (fieldType === 'SelectDropdown') {
const field = form.getDropdown(fieldName);
field.select(fieldValue);
} else if (fieldType === 'RadioGroup') {
// TODO: remove this when we have a better way to handle radio groups
try {
Expand Down
3 changes: 1 addition & 2 deletions packages/forms/src/documents/pdf/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,4 @@ export type PDFFieldType =
| 'OptionList'
| 'RadioGroup'
| 'Paragraph'
| 'RichText'
| 'SelectDropdown';
| 'RichText';
10 changes: 0 additions & 10 deletions packages/forms/src/documents/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,16 +36,6 @@ export type DocumentFieldValue =
value: string;
required: boolean;
}
| {
type: 'SelectDropdown';
name: string;
options: {
value: string;
label: string;
}[];
label: string;
required: boolean;
}
| {
type: 'Paragraph';
name: string;
Expand Down

0 comments on commit 3b06384

Please sign in to comment.