Skip to content

Commit

Permalink
Merge pull request #929 from bcgov/feature/sdcCollectionsUpdate
Browse files Browse the repository at this point in the history
EDX-1310 Created constants for CollectionCodeType
  • Loading branch information
mightycox authored Jul 27, 2023
2 parents 3ace6a9 + 42de1b7 commit 4648923
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 4 deletions.
9 changes: 5 additions & 4 deletions frontend/src/components/sdcCollection/StepThreeUploadData.vue
Original file line number Diff line number Diff line change
Expand Up @@ -219,6 +219,7 @@ import { useSdcCollectionStore } from '../../store/modules/sdcCollection';
import Spinner from '../common/Spinner.vue';
import ConfirmationDialog from '../util/ConfirmationDialog.vue';
import {DateTimeFormatter, LocalDate, ResolverStyle} from '@js-joda/core';
import {COLLECTIONCODETYPE} from '../../utils/constants/CollectionCodeType';
export default {
name: 'StepThreeUploadData',
Expand Down Expand Up @@ -316,13 +317,13 @@ export default {
getLink() {
let collectionLink = '';
let collectionCodeType = this.currentCollectionTypeCode;
if (collectionCodeType === 'September') {
if (collectionCodeType === COLLECTIONCODETYPE.SEPTEMBER) {
collectionLink = 'https://www2.gov.bc.ca/gov/content/education-training/k-12/administration/program-management/data-collections/september';
} else if (collectionCodeType === 'February') {
} else if (collectionCodeType === COLLECTIONCODETYPE.FEBRUARY) {
collectionLink = 'https://www2.gov.bc.ca/gov/content/education-training/k-12/administration/program-management/data-collections/february';
} else if (collectionCodeType === 'May') {
} else if (collectionCodeType === COLLECTIONCODETYPE.MAY) {
collectionLink = 'https://www2.gov.bc.ca/gov/content/education-training/k-12/administration/program-management/data-collections/may';
} else if (collectionCodeType === 'July') {
} else if (collectionCodeType === COLLECTIONCODETYPE.JULY) {
collectionLink = 'https://www2.gov.bc.ca/gov/content/education-training/k-12/administration/program-management/data-collections/summer-learning';
}
return collectionLink;
Expand Down
11 changes: 11 additions & 0 deletions frontend/src/utils/constants/CollectionCodeType.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
export const COLLECTIONCODETYPE = Object.freeze({

FEBRUARY: 'February',

MAY: 'May',

JULY: 'July',

SEPTEMBER: 'September',
}
);

0 comments on commit 4648923

Please sign in to comment.