From b432f8f5176f5364ac6435c588b1b3e4a2c0691c Mon Sep 17 00:00:00 2001 From: HMS17 <84345306+HMS17@users.noreply.github.com> Date: Tue, 21 Jun 2022 14:42:48 -0400 Subject: [PATCH 1/7] [BI-1199] - Modal file selection, first pass --- src/assets/scss/main.scss | 5 + src/breeding-insight/model/FileType.ts | 33 +++++++ .../germplasm/GermplasmListsTable.vue | 62 ++++++++++++- src/components/modals/SelectModal.vue | 92 +++++++++++++++++++ 4 files changed, 187 insertions(+), 5 deletions(-) create mode 100644 src/breeding-insight/model/FileType.ts create mode 100644 src/components/modals/SelectModal.vue diff --git a/src/assets/scss/main.scss b/src/assets/scss/main.scss index 611cc89fc..ca82e91e2 100644 --- a/src/assets/scss/main.scss +++ b/src/assets/scss/main.scss @@ -677,4 +677,9 @@ th.activesort.sortcolumn, th.sortcolumn:hover { padding-bottom: 0; } } +} + +.modal-radio { + display:block; + vertical-align: middle; } \ No newline at end of file diff --git a/src/breeding-insight/model/FileType.ts b/src/breeding-insight/model/FileType.ts new file mode 100644 index 000000000..830339a8a --- /dev/null +++ b/src/breeding-insight/model/FileType.ts @@ -0,0 +1,33 @@ +/* + * See the NOTICE file distributed with this work for additional information + * regarding copyright ownership. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +export class FileType { + //todo check if all properties needed + static xls = new FileType("xls", ".xls", "application/vnd.ms-excel"); + static xlsx = new FileType("xlsx", ".xlsx", "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"); + static csv = new FileType("csv", ".csv", "text/csv"); + + name: string; + extension: string; + mimeType: string; + + constructor(name: string, extension: string, mimeType: string) { + this.name = name; + this.extension = extension; + this.mimeType = mimeType; + } +} \ No newline at end of file diff --git a/src/components/germplasm/GermplasmListsTable.vue b/src/components/germplasm/GermplasmListsTable.vue index 37baa1fcc..db870fa73 100644 --- a/src/components/germplasm/GermplasmListsTable.vue +++ b/src/components/germplasm/GermplasmListsTable.vue @@ -17,6 +17,33 @@