Skip to content

Commit

Permalink
Merge branch 'develop' into bug/BI-711
Browse files Browse the repository at this point in the history
  • Loading branch information
HMS17 authored Sep 17, 2021
2 parents dd65ea1 + add6303 commit 06f68f3
Show file tree
Hide file tree
Showing 4 changed files with 41 additions and 20 deletions.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "bi-web",
"version": "v0.4.0+154",
"version": "v0.4.0+156",
"private": true,
"scripts": {
"build": "node $npm_package_config_task_path/build.js --dev-audit-level=critical --prod-audit-level=none",
Expand Down Expand Up @@ -85,5 +85,5 @@
"vue-cli-plugin-axios": "0.0.4",
"vue-template-compiler": "^2.6.10"
},
"versionInfo": "https://github.com/Breeding-Insight/bi-web/commit/c844a2adadf300738dde3ee777a648613416e1c2"
"versionInfo": "https://github.com/Breeding-Insight/bi-web/commit/ada688a7b8cbc12ed5075e1cdd6439175ae32f11"
}
12 changes: 6 additions & 6 deletions src/components/layouts/UserSideBarLayout.vue
Original file line number Diff line number Diff line change
Expand Up @@ -179,9 +179,9 @@
<router-link
v-bind:to="{name: 'traits', params: {programId: activeProgram.id}}"
v-bind:class="{ 'is-active': traitsActive }"
:id="traitsMenuId"
:id="ontologyMenuId"
>
Traits
Ontology
<MoreVerticalIcon
v-if="!traitsActive"
class="is-pulled-right"
Expand All @@ -194,7 +194,7 @@
<ul v-show="traitsActive">
<li>
<router-link v-bind:to="{name: 'traits-list', params: {programId: activeProgram.id}}">
Trait List
Ontology List
</router-link>
</li>
<li>
Expand All @@ -206,12 +206,12 @@
v-if="$ability.can('create', 'Trait')"
>
<router-link v-bind:to="{name: 'traits-import', params: {programId: activeProgram.id}}">
Import Traits
Import Ontology
</router-link>
</li>
<li>
<router-link v-bind:to="{name: 'traits-archived', params: {programId: activeProgram.id}}">
Archived Traits
Archived Ontology
</router-link>
</li>
</ul>
Expand Down Expand Up @@ -307,7 +307,7 @@

private homeMenuId: string = "usersidebarlayout-home-menu";
private importFileMenuId: string = "usersidebarlayout-import-file-menu";
private traitsMenuId: string = "usersidebarlayout-traits-menu";
private ontologyMenuId: string = "usersidebarlayout-ontology-menu";
private programManagementMenuId: string = "usersidebarlayout-program-management-menu";
private brAPIMenuId: string = "usersidebarlayout-brapi-menu";

Expand Down
43 changes: 32 additions & 11 deletions src/components/trait/TraitListsTable.vue
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
</div>
</WarningModal>

<div class="columns has-text-right mb-0">
<div class="columns has-text-right mb-0 buttons">
<div class="column">
<button
v-if="$ability.can('create', 'Trait')"
Expand All @@ -61,7 +61,23 @@
/>
</span>
<span>
New Trait
New Term
</span>
</button>
<button
v-if="$ability.can('create', 'Trait')"
v-show="!newTraitActive & traits.length > 0"
class="button is-primary has-text-weight-bold"
v-on:click="$router.push({name: 'traits-import', params: {programId: activeProgram.id}})"
>
<span class="icon is-small">
<PlusCircleIcon
size="1.5x"
aria-hidden="true"
/>
</span>
<span>
Import Batch File
</span>
</button>
</div>
Expand Down Expand Up @@ -116,17 +132,22 @@
v-if="!data.active && data.active !== undefined">
Archived
</b-button>
{{ data.traitName }}
{{ data.observationVariableName }}
</TableColumn>
<TableColumn name="level" v-bind:label="'Level'" v-bind:visible="!traitSidePanelState.collapseColumns">
{{ data.programObservationLevel.name }}
<TableColumn name="trait" v-bind:label="'Trait'" v-bind:visible="!collapseColumns">
{{ StringFormatters.toStartCase(data.traitDescription) }}
</TableColumn>
<TableColumn name="method" v-bind:label="'Method'" v-bind:visible="!traitSidePanelState.collapseColumns">
{{ StringFormatters.toStartCase(data.method.methodClass) }}
{{ data.method.description + " " + StringFormatters.toStartCase(data.method.methodClass) }}
</TableColumn>
<TableColumn name="scale" v-bind:label="'Scale'" v-bind:visible="!traitSidePanelState.collapseColumns">
<TableColumn name="scaleClass" v-bind:label="'Scale Class'" v-bind:visible="!traitSidePanelState.collapseColumns">
{{ TraitStringFormatters.getScaleTypeString(data.scale) }}
</TableColumn>
</TableColumn>
<TableColumn name="unit" v-bind:label="'Unit'" v-bind:visible="!traitSidePanelState.collapseColumns">
<template v-if="data.scale.dataType==='NUMERICAL'">
{{ data.scale.scaleName }}
</template>
</TableColumn>
</template>

<!--
Expand Down Expand Up @@ -158,15 +179,15 @@
<template v-slot:emptyMessage>
<EmptyTableMessage
v-bind:button-view-toggle="!newTraitActive"
v-bind:button-text="'New Trait'"
v-bind:button-text="'New Term'"
v-on:newClick="activateNewTraitForm"
v-bind:create-enabled="$ability.can('create', 'Trait')"
>
<p class="has-text-weight-bold">
No traits are currently defined for this program.
No ontology terms are currently defined for this program.
</p>
<p v-if="$ability.can('create', 'Trait')">
Create new traits by clicking "New Trait" or navigating to "Import Traits".
Create new ontology terms by clicking "New Term" or navigating to "Import Ontology".
</p>
</EmptyTableMessage>
</template>
Expand Down
2 changes: 1 addition & 1 deletion src/views/trait/TraitsList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

<template>
<div class="traits-list">
<h1 class="title">All Traits</h1>
<h1 class="title">Ontology</h1>
<TraitListsTable
v-on:show-success-notification="$emit('show-success-notification', $event)"
v-on:show-error-notification="$emit('show-error-notification', $event)"
Expand Down

0 comments on commit 06f68f3

Please sign in to comment.