Skip to content

Commit

Permalink
upload result v3
Browse files Browse the repository at this point in the history
  • Loading branch information
Wellheor1 committed Jul 3, 2024
1 parent 0ab79f8 commit ec45efb
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 3 deletions.
2 changes: 2 additions & 0 deletions l2-frontend/src/components/UploadFile.vue
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,8 @@ const changeType = () => {
currentFileForms.value = getForms(String(selectedType.value), props.formsFile, props.uploadResult);
if (currentFileForms.value.length > 0) {
selectedForm.value = currentFileForms.value[0].id;
} else {
selectedForm.value = null;
}
};
Expand Down
2 changes: 1 addition & 1 deletion l2-frontend/src/components/types-and-forms-file.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ export default function typesAndForms() {
});
// todo - режим UploadResult - получать по расширению файла - только функции связанные с сохранением результата (анализаторы)
// todo - UploadResult + forms - получать только выбранные isResult функции
const getForms = (type: string, forms: string[] = [], onlyResult = false): formsFile[] => {
const getForms = (type: string, forms: string[] = null, onlyResult = false): formsFile[] => {
let result: formsFile[] = [];
if (forms && forms.length > 0) {
for (const form of forms) {
Expand Down
12 changes: 10 additions & 2 deletions l2-frontend/src/ui-cards/LaboratoryHeader.vue
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,15 @@
<ul class="nav navbar-nav">
<LoadFile />
</ul>
<UploadFileModal title="Прикрепить результат" :types-file="['PDF']" :upload-result="true" />
<ul class="nav navbar-nav">
<li>
<UploadFileModal
title="Прикрепить результат"
:types-file="['PDF', 'XLSX']"
:upload-result="true"
/>
</li>
</ul>
</div>
</template>

Expand All @@ -46,7 +54,7 @@ import LaboratorySelector from '@/ui-cards/LaboratorySelector.vue';
import ExecutionList from '@/ui-cards/ExecutionList.vue';
import LaboratoryJournal from '@/ui-cards/LaboratoryJournal.vue';
import LaboratoryPrintResults from '@/ui-cards/LaboratoryPrintResults.vue';
import UploadFileModal from "@/modals/UploadFileModal.vue";
import UploadFileModal from '@/modals/UploadFileModal.vue';
export default {
name: 'LaboratoryHeader',
Expand Down

0 comments on commit ec45efb

Please sign in to comment.