Skip to content

Commit

Permalink
Fixed: Clinical Feature Flag was Undefined
Browse files Browse the repository at this point in the history
  • Loading branch information
bencap committed Nov 21, 2024
1 parent b29770f commit 2b4c5ff
Show file tree
Hide file tree
Showing 9 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion .env.dev
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
VITE_API_URL=http://localhost:8002/api/v1
VITE_APP_URL=https://127.0.0.1:8081
VITE_SITE_TITLE=MaveDB (local API)
CLINICAL_FEATURES_ENABLED=false
VITE_CLINICAL_FEATURES_ENABLED=false
2 changes: 1 addition & 1 deletion .env.live
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
VITE_API_URL=https://api.mavedb.org/api/v1
VITE_APP_URL=https://mavedb.org
VITE_SITE_TITLE=MaveDB
CLINICAL_FEATURES_ENABLED=false
VITE_CLINICAL_FEATURES_ENABLED=false
2 changes: 1 addition & 1 deletion .env.preview
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
VITE_API_URL=https://api.mavedb.org/api/v1
VITE_APP_URL=https://preview.mavedb.org
VITE_SITE_TITLE=MaveDB (Preview Build)
CLINICAL_FEATURES_ENABLED=true
VITE_CLINICAL_FEATURES_ENABLED=true
2 changes: 1 addition & 1 deletion .env.prodapi
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
VITE_API_URL=https://api.mavedb.org/api/v1
VITE_APP_URL=https://127.0.0.1:8081
VITE_SITE_TITLE=MaveDB (prod API)
CLINICAL_FEATURES_ENABLED=false
VITE_CLINICAL_FEATURES_ENABLED=false
2 changes: 1 addition & 1 deletion .env.staging
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
VITE_API_URL=https://api.staging.mavedb.org/api/v1
VITE_APP_URL=https://staging.mavedb.org
VITE_SITE_TITLE=MaveDB (Staging)
CLINICAL_FEATURES_ENABLED=false
VITE_CLINICAL_FEATURES_ENABLED=false
4 changes: 2 additions & 2 deletions src/components/ScoreSetHistogram.vue
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ export default defineComponent({
},
hasTabBar: function() {
return config.CLINICAL_FEATURES_ENABLED && this.vizOptions.length > 1
return this.config.CLINICAL_FEATURES_ENABLED && this.vizOptions.length > 1
},
showControls: function() {
Expand Down Expand Up @@ -362,7 +362,7 @@ export default defineComponent({
}
let ranges = []
if (config.CLINICAL_FEATURES_ENABLED) {
if (this.config.CLINICAL_FEATURES_ENABLED) {
switch (this.scoreSet.urn) {
case 'urn:mavedb:00000097-0-1':
ranges = [{
Expand Down
2 changes: 1 addition & 1 deletion src/components/screens/ScoreSetView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -457,7 +457,7 @@ export default {
)
},
evidenceStrengths: function() {
if (config.CLINICAL_FEATURES_ENABLED) {
if (this.config.CLINICAL_FEATURES_ENABLED) {
return {
'urn:mavedb:00000050-a-1': {
oddsOfPathogenicity: {
Expand Down
2 changes: 1 addition & 1 deletion src/config.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ declare namespace Config {
let apiBaseUrl: string
let appBaseUrl: string
let orcidClientId: string
let CLINICAL_FEATURES_ENABLED: string
let CLINICAL_FEATURES_ENABLED: boolean

}

Expand Down
2 changes: 1 addition & 1 deletion src/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@ export default {
apiBaseUrl: import.meta.env.VITE_API_URL,
appBaseUrl: import.meta.env.VITE_APP_URL,
orcidClientId: 'APP-GXFVWWJT8H0F50WD',
CLINICAL_FEATURES_ENABLED: import.meta.env.CLINICAL_FEATURES_ENABLED
CLINICAL_FEATURES_ENABLED: import.meta.env.VITE_CLINICAL_FEATURES_ENABLED === "true",
}

0 comments on commit 2b4c5ff

Please sign in to comment.