Skip to content

Commit 64c58d0

Browse files
committed
restore deleted code during merge
1 parent 376d4d7 commit 64c58d0

File tree

1 file changed

+5
-12
lines changed

1 file changed

+5
-12
lines changed

src/pages/CreateRopeRecord.ts

Lines changed: 5 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -54,13 +54,11 @@ export class CreateRopeRecord {
5454
await this.formHelper.setField(this.page, fieldName, value, metadata);
5555
}
5656

57-
// Set multiple field values for a specific metadata group
58-
public async setFieldValues(
59-
fields: Record<string, string>,
60-
metadata: FormFieldMetadata[],
61-
): Promise<void> {
62-
for (const [fieldName, value] of Object.entries(fields)) {
63-
await this.setFieldValue(fieldName, value, metadata);
57+
// Central method to fill fields dynamically
58+
public async fillRopeFields(ropeInfo: Record<string, string>): Promise<void> {
59+
// Iterate over the ropeInfo object and set each field dynamically
60+
for (const [fieldName, value] of Object.entries(ropeInfo)) {
61+
await this.setFieldValue(fieldName, value, this.ropeMetadata);
6462
}
6563
}
6664

@@ -96,9 +94,4 @@ export class CreateRopeRecord {
9694
await this.openAccordionTab(tabName);
9795
}
9896
}
99-
100-
// Set field values for specific metadata groups
101-
public async setRopeInformation(fields: Record<string, string>) {
102-
await this.setFieldValues(fields, this.ropeMetadata);
103-
}
10497
}

0 commit comments

Comments
 (0)