Skip to content

Commit

Permalink
rename
Browse files Browse the repository at this point in the history
  • Loading branch information
Wellheor1 committed Jul 3, 2024
1 parent f8562d1 commit d049201
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions l2-frontend/src/components/types-and-forms-file.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ export default function typesAndForms() {
'api.laboratory.forms100.form_01': { id: 'api.laboratory.forms100.form_01', label: 'Загрузка PDF результата из QMS' },
},
});
const func = (type: string, forms = null, allowedForms: string[] = null) => {
const addForms = (type: string, forms = null, allowedForms: string[] = null) => {
const result: formsFile[] = [];
for (const form of forms) {
if (allowedForms.includes(form) && fileForms.value[type][form]) {
Expand All @@ -57,13 +57,13 @@ export default function typesAndForms() {
return [];
}
if (forms) {
result = func(type, forms, allowedForms);
result = addForms(type, forms, allowedForms);
} else if (onlyResult) {
result = func(type, isResultForm.value, allowedForms);
result = addForms(type, isResultForm.value, allowedForms);
} else {
const tmp: formsFile[] = Object.values(fileForms.value[type]);
const tmpResult = tmp.map(obj => obj.id);
result = func(type, tmpResult, allowedForms);
result = addForms(type, tmpResult, allowedForms);
}
return result;
};
Expand Down

0 comments on commit d049201

Please sign in to comment.