diff --git a/src/scripts/app/metadata.js b/src/scripts/app/metadata.js index 5f60362..763eda7 100644 --- a/src/scripts/app/metadata.js +++ b/src/scripts/app/metadata.js @@ -2,7 +2,7 @@ import { ErrorOverlay } from '../components/overlay.js'; import { FileHelper } from '../helpers/file-helper.js'; import { StringHelper } from '../helpers/string-helper.js'; import { TypeHelper } from '../helpers/type-helper.js'; -import { Stages } from '../data/stages.js'; +import { Stage } from '../models/stage.js'; import { Configuration } from './configuration.js'; const fs = nw.require('fs'); @@ -21,7 +21,7 @@ const readAppDataFile = new Promise((resolve, reject) => { }); export class Metadata { - #stages = Object.values(Stages); + #stages = Object.values(Stage); #metadataRootFolder = '.metadata'; #metadataFilename = 'data.json'; #inputDataPath; diff --git a/src/scripts/data/stages.js b/src/scripts/models/stage.js similarity index 70% rename from src/scripts/data/stages.js rename to src/scripts/models/stage.js index 8795795..8228dc8 100644 --- a/src/scripts/data/stages.js +++ b/src/scripts/models/stage.js @@ -1,4 +1,4 @@ -export const Stages = { +export const Stage = { CONCENTRIC: 'concentric', ECCENTRIC: 'eccentric' }; diff --git a/src/scripts/participants-selection.js b/src/scripts/participants-selection.js index c49672f..1179f12 100644 --- a/src/scripts/participants-selection.js +++ b/src/scripts/participants-selection.js @@ -12,7 +12,7 @@ import { Loader } from './components/loader.js'; import { ErrorOverlay } from './components/overlay'; import { getAllParticipants } from './utils/participants'; import { Metadata } from './app/metadata.js'; -import { Stages } from './data/stages.js'; +import { Stage } from './models/stage.js'; import { PathHelper } from './helpers/path-helper.js'; import { StringHelper } from './helpers/string-helper'; import { Switch } from './utils/switch'; @@ -108,7 +108,7 @@ const sessionStage = PathHelper.sanitizePath( sessionStorage.getItem('stage').toString().toLowerCase().trim() ); -let stage = sessionStage === undefined ? Stages.CONCENTRIC : sessionStage; +let stage = sessionStage === undefined ? Stage.CONCENTRIC : sessionStage; let participantItems; let isAllSelected = false; diff --git a/src/scripts/results.js b/src/scripts/results.js index f1ebe31..1d1a73e 100644 --- a/src/scripts/results.js +++ b/src/scripts/results.js @@ -6,7 +6,7 @@ import { createPopper } from '@popperjs/core'; import { Menu } from './components/menu.js'; import { Router } from './routes/router.js'; import { Metadata } from './app/metadata.js'; -import { Stages } from './data/stages.js'; +import { Stage } from './models/stage.js'; import { PathHelper } from './helpers/path-helper'; import { ErrorOverlay } from './components/overlay'; import { FileHelper } from './helpers/file-helper'; @@ -190,7 +190,7 @@ const getRelevantRatioCoords = analysis => { let antagonist = appData.muscles.find(item => item.id === antagonistID).label; let agonist = appData.muscles.find(item => item.id === agonistID).label; - if (!(stage === Stages.CONCENTRIC)) { + if (!(stage === Stage.CONCENTRIC)) { antagonist = appData.muscles.find(item => item.id === agonistID).label; agonist = appData.muscles.find(item => item.id === antagonistID).label; }