Skip to content

Commit

Permalink
added changes for edx-1310
Browse files Browse the repository at this point in the history
  • Loading branch information
angadhsingh1 committed Jul 26, 2023
1 parent e79fa48 commit 8b94e66
Show file tree
Hide file tree
Showing 4 changed files with 102 additions and 75 deletions.
138 changes: 69 additions & 69 deletions frontend/src/components/sdcCollection/SDCCollectionSummary.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<template>
<v-container
<v-container
class="containerSetup"
fluid
>
Expand Down Expand Up @@ -38,54 +38,54 @@
:active="isLoading"
/>
</v-col>
</v-row>
</v-row>
<v-row v-else>
<div
v-if="isCollectionOpen()"
class="border"
>
<v-row>
<v-col cols="4">
<DoughnutChart :incoming-chart-data="incomingChartData" />
</v-col>
<v-col cols="8">
<h2 class="subjectHeading">
Student Level Data (1701)
</h2>
<p>{{ currentCollectionTypeCode }} 2022 Collection</p>
</v-col>
</v-row>
<v-row justify="space-around">
<v-col
cols="4"
class="steps"
>
<span>{{ noOfStepsCompleted }} / {{ totalStepsInCollection }} Steps Complete</span>
</v-col>
<v-col
cols="8"
class="navigate"
>
<a
class="ml-1"
@click="startCollection()"
>Continue</a>
<v-icon
small
color="#1976d2"
v-if="isCollectionOpen()"
class="border"
>
<v-row>
<v-col cols="4">
<DoughnutChart :incoming-chart-data="incomingChartData" />
</v-col>
<v-col cols="8">
<h2 class="subjectHeading">
Student Level Data (1701)
</h2>
<p>{{ currentCollectionTypeCode }} 2022 Collection</p>
</v-col>
</v-row>
<v-row justify="space-around">
<v-col
cols="4"
class="steps"
>
mdi-arrow-right
</v-icon>
</v-col>
</v-row>
</div>
<div v-else>
<p>Currently, there are no open collections.</p>
</div>
<span>{{ noOfStepsCompleted }} / {{ totalStepsInCollection }} Steps Complete</span>
</v-col>
<v-col
cols="8"
class="navigate"
>
<a
class="ml-1"
@click="startCollection()"
>Continue</a>
<v-icon
small
color="#1976d2"
>
mdi-arrow-right
</v-icon>
</v-col>
</v-row>
</div>
<div v-else>
<p>Currently, there are no open collections.</p>
</div>
</v-row>
</v-container>
</template>

<script>
import ApiService from '../../common/apiService';
import {ApiRoutes} from '../../utils/constants';
Expand Down Expand Up @@ -160,36 +160,36 @@ export default {
}
};
</script>
<style scoped>
<style scoped>
.containerSetup{
padding-right: 10em !important;
padding-left: 10em !important;
}
@media screen and (max-width: 1200px) {
.containerSetup{
padding-right: 10em !important;
padding-left: 10em !important;
}
@media screen and (max-width: 1200px) {
.containerSetup{
padding-right: 3em !important;
padding-left: 3em !important;
}
}
.border {
border: 2px solid grey;
border-radius: 5px;
padding: 35px;
margin-bottom: 2em;
margin-top: 2em;
width: 70%;
padding-right: 3em !important;
padding-left: 3em !important;
}
}
.border {
border: 2px solid grey;
border-radius: 5px;
padding: 35px;
margin-bottom: 2em;
margin-top: 2em;
width: 70%;
}
.steps {
text-align: center;
}
.steps {
text-align: center;
}
.navigate {
text-align: end;
}
</style>
.navigate {
text-align: end;
}
</style>
8 changes: 4 additions & 4 deletions frontend/src/components/sdcCollection/SDCCollectionView.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<template>
<v-container
<v-container
class="containerSetup"
fluid
>
Expand Down Expand Up @@ -54,7 +54,7 @@
:active="isLoading"
/>
</v-col>
</v-row>
</v-row>
<v-row v-else>
<v-col cols="2">
<StepperComponent
Expand Down Expand Up @@ -147,7 +147,7 @@ export default {
padding-right: 3em !important;
padding-left: 3em !important;
}
}
</style>
}
</style>


29 changes: 27 additions & 2 deletions frontend/src/components/sdcCollection/StepThreeUploadData.vue
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,17 @@
:loading="isReadingFile"
:click-action="handleFileImport"
/>
<div class="mt-2">
More information on the
<a
:href="getLink"
target="_blank"
rel="noopener noreferrer"
style="color: rgb(56, 89, 138);"
>
1701 submission requirements.
</a>
</div>
</v-col>
</v-row>
<v-row>
Expand Down Expand Up @@ -270,7 +281,7 @@ export default {
};
},
computed: {
...mapState(useSdcCollectionStore, ['currentStepInCollectionProcess']),
...mapState(useSdcCollectionStore, ['currentCollectionTypeCode','currentStepInCollectionProcess']),
collectionOpenDate() {
return LocalDate.parse(this.schoolCollectionObject.collectionOpenDate.substring(0,19), DateTimeFormatter.ofPattern('uuuu-MM-dd\'T\'HH:mm:ss'));
},
Expand Down Expand Up @@ -301,7 +312,21 @@ export default {
return true;
}
return this.fileReportDate.isBefore(this.collectionOpenDate.minusDays(30)) || this.fileReportDate.isAfter(this.collectionCloseDate.plusDays(30));
}
},
getLink() {
let collectionLink = '';
let collectionCodeType = this.currentCollectionTypeCode;
if (collectionCodeType === 'September') {
collectionLink = 'https://www2.gov.bc.ca/gov/content/education-training/k-12/administration/program-management/data-collections/september';
} else if (collectionCodeType === 'February') {
collectionLink = 'https://www2.gov.bc.ca/gov/content/education-training/k-12/administration/program-management/data-collections/february';
} else if (collectionCodeType === 'May') {
collectionLink = 'https://www2.gov.bc.ca/gov/content/education-training/k-12/administration/program-management/data-collections/may';
} else if (collectionCodeType === 'July') {
collectionLink = 'https://www2.gov.bc.ca/gov/content/education-training/k-12/administration/program-management/data-collections/summer-learning';
}
return collectionLink;
},
},
watch: {
uploadFileValue() {
Expand Down
2 changes: 2 additions & 0 deletions frontend/src/store/modules/sdcCollection.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import { defineStore } from 'pinia';
import {SDC_STEPS} from '../../utils/institute/SdcSteps';
import ApiService from '../../common/apiService';
import { ApiRoutes } from '../../utils/constants';
import {capitalize} from "lodash";

export const useSdcCollectionStore = defineStore('sdcCollection', {
id: 'sdcCollection',
Expand Down Expand Up @@ -130,6 +131,7 @@ export const useSdcCollectionStore = defineStore('sdcCollection', {
if(this.schoolCollection == null) {
const response = await ApiService.apiAxios.get(ApiRoutes.sdc.BASE_URL + '/' + schoolCollectionId);
this.setSchoolCollection(response.data);
this.setCurrentCollectionTypeCode(capitalize(response.data.collectionTypeCode));
this.setCollectionMetaData(response.data.sdcSchoolCollectionStatusCode);
}
},
Expand Down

0 comments on commit 8b94e66

Please sign in to comment.