@@ -227,13 +227,19 @@ export default {
227
227
},
228
228
totalStepsInCollection () {
229
229
if (this .isSchoolCollection ) {
230
- if (this .sdcDistrictCollectionID ){
231
- return this .currentCollectionTypeCode === ' July' ? SDC_STEPS_SUMMER_SCHOOL .length : SDC_STEPS_SCHOOL .length ;
232
- } else {
233
- return this .currentCollectionTypeCode === ' July' ? SDC_STEPS_SUMMER_INDP_SCHOOL .length : SDC_STEPS_INDP_SCHOOL .length ;
234
- }
230
+ return this .SDC_STEPS_SCHOOL_CALC .length
235
231
} else {
236
- return this .currentCollectionTypeCode === ' July' ? SDC_STEPS_SUMMER_DISTRICT .length : SDC_STEPS_DISTRICT .length ;
232
+ return this .SDC_STEPS_DISTRICT_CALC .length ;
233
+ }
234
+ },
235
+ SDC_STEPS_DISTRICT_CALC () {
236
+ return this .isSummerCollection ? SDC_STEPS_SUMMER_DISTRICT : SDC_STEPS_DISTRICT ;
237
+ },
238
+ SDC_STEPS_SCHOOL_CALC () {
239
+ if (this .sdcDistrictCollectionID ){
240
+ return this .isSummerCollection ? SDC_STEPS_SUMMER_SCHOOL : SDC_STEPS_SCHOOL ;
241
+ } else {
242
+ return this .isSummerCollection ? SDC_STEPS_SUMMER_INDP_SCHOOL : SDC_STEPS_INDP_SCHOOL ;
237
243
}
238
244
},
239
245
historicCollectionUrl () {
@@ -300,6 +306,7 @@ export default {
300
306
ApiService .apiAxios .get (url).then (response => {
301
307
if (response .data ) {
302
308
this .setCurrentCollectionTypeCode (capitalize (response .data .collectionTypeCode ));
309
+ this .isSummerCollection = this .currentCollectionTypeCode === ' July' ;
303
310
this .submissionDate = response .data .submissionDueDate ;
304
311
305
312
let instituteStatusCode;
@@ -324,24 +331,16 @@ export default {
324
331
},
325
332
getIndexOfSDCCollectionByStatusCode (statusCode ) {
326
333
if (this .isSchoolCollection ) {
327
- if (this .sdcDistrictCollectionID != null ){
328
- return SDC_STEPS_SCHOOL .find (step => step .sdcSchoolCollectionStatusCode .includes (statusCode))? .index ;
329
- } else {
330
- return SDC_STEPS_INDP_SCHOOL .find (step => step .sdcSchoolCollectionStatusCode .includes (statusCode))? .index ;
331
- }
334
+ return this .SDC_STEPS_SCHOOL_CALC .find (step => step .sdcSchoolCollectionStatusCode .includes (statusCode))? .index ;
332
335
} else {
333
- return SDC_STEPS_DISTRICT .find (step => step .sdcDistrictCollectionStatusCode .includes (statusCode))? .index ;
336
+ return this . SDC_STEPS_DISTRICT_CALC .find (step => step .sdcDistrictCollectionStatusCode .includes (statusCode))? .index ;
334
337
}
335
338
},
336
339
getStepOfSDCCollectionByStatusCode (statusCode ) {
337
340
if (this .isSchoolCollection ) {
338
- if (this .sdcDistrictCollectionID != null ){
339
- return SDC_STEPS_SCHOOL .find (step => step .sdcSchoolCollectionStatusCode .includes (statusCode))? .step ;
340
- } else {
341
- return SDC_STEPS_INDP_SCHOOL .find (step => step .sdcSchoolCollectionStatusCode .includes (statusCode))? .step ;
342
- }
341
+ return this .SDC_STEPS_SCHOOL_CALC .find (step => step .sdcSchoolCollectionStatusCode .includes (statusCode))? .step ;
343
342
} else {
344
- return SDC_STEPS_DISTRICT .find (step => step .sdcDistrictCollectionStatusCode .includes (statusCode))? .step ;
343
+ return this . SDC_STEPS_DISTRICT_CALC .find (step => step .sdcDistrictCollectionStatusCode .includes (statusCode))? .step ;
345
344
}
346
345
},
347
346
loadItems ({ page, itemsPerPage }) {
0 commit comments