Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main' into deploy-with-cert
Browse files Browse the repository at this point in the history
  • Loading branch information
SoLetsDev committed Sep 13, 2023
2 parents b5b3448 + 7c44f88 commit 21681f7
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 14 deletions.
6 changes: 3 additions & 3 deletions backend/src/routes/changeRequest.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ router.get('/:changeRequestId', passport.authenticate('jwt', {session: false}),i
* Update Change Request
*/

router.patch('/:changeRequestId', //passport.authenticate('jwt', {session: false}),isValidBackendToken,
router.patch('/:changeRequestId', passport.authenticate('jwt', {session: false}),isValidBackendToken,
[param('changeRequestId', 'URL param: [changeRequestId] is required').not().isEmpty()], (req, res) => {
validationResult(req).throw();
return updateChangeRequest(req, res);
Expand Down Expand Up @@ -143,11 +143,11 @@ router.delete('/mtfi/:mtfiId/', passport.authenticate('jwt', {session: false}),i
});


/**
/**
* Update Change Request MTFI
*/

router.patch('/mtfi/:mtfiId/', //passport.authenticate('jwt', {session: false}),isValidBackendToken,
router.patch('/mtfi/:mtfiId/', passport.authenticate('jwt', {session: false}),isValidBackendToken,
[param('mtfiId', 'URL param: [mtfiId] is required').not().isEmpty()], (req, res) => {
validationResult(req).throw();
return updateChangeRequestMTFI(req, res);
Expand Down
2 changes: 1 addition & 1 deletion backend/src/routes/facility.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ router.get('/ccfri/:ccfriId', passport.authenticate('jwt', {session: false}),isV
* Get Parent Fees for a facility
*
*/
router.get('/fees/:facilityId/year/:programYearId', // passport.authenticate('jwt', {session: false}),isValidBackendToken,
router.get('/fees/:facilityId/year/:programYearId', passport.authenticate('jwt', {session: false}),isValidBackendToken,
[param('facilityId', 'URL param: [facilityId] is required').not().isEmpty(),
param('programYearId', 'URL param: [programYearId] is required').not().isEmpty()], (req, res) => {
validationResult(req).throw();
Expand Down
9 changes: 4 additions & 5 deletions frontend/src/components/mtfi/CurrentFeeVerification.vue
Original file line number Diff line number Diff line change
Expand Up @@ -596,7 +596,10 @@ export default {
},
async next() {
// this.rfi3percentCategories = await this.getCcfriOver3percent(this.currentPcfCcfri);
if (!this.isReadOnly && !this.loading) {
this.$store.commit('ccfriApp/model', this.model);
await this.save(false);
}
//always check for RFI regardless of new or renewal state
this.rfi3percentCategories = await this.getCcfriOver3percent(this.currentPcfCcfri);
console.log('rfi3percentCategories length ', this.rfi3percentCategories.length);
Expand Down Expand Up @@ -651,10 +654,6 @@ export default {
//this.model = this.$store.state.ccfriApp.model ?? model;
},
async beforeRouteLeave(_to, _from, next) {
if (!this.isReadOnly && !this.loading) {
this.$store.commit('ccfriApp/model', this.model);
this.save(false);
}
next();
},
components: {NavButton}
Expand Down
7 changes: 4 additions & 3 deletions frontend/src/components/requestChanges/ReportChanges.vue
Original file line number Diff line number Diff line change
Expand Up @@ -352,10 +352,11 @@ export default {
//change in backend, only returns 1 at a time rn
let action = changeActions.find(el => el.changeType == "NEW_FACILITY");
if (action.facilities) {
if (action?.facilities) {
action.facilities.forEach(fac => {
if (fac.facilityName){
str = str + `${fac.facilityName}, `;
const facilityUserProfileList = this.userProfileList?.find(item => item.facilityId === fac.facilityId);
if (facilityUserProfileList?.facilityName) {
str = str + `${facilityUserProfileList?.facilityName}, `;
}
});
}
Expand Down
5 changes: 3 additions & 2 deletions frontend/src/components/util/NavBar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ export default {
...mapGetters('navBar', ['isChangeRequest']),
...mapGetters('auth', ['userInfo']),
...mapGetters('reportChanges', ['isCREceweComplete', 'isCRLicenseComplete', 'changeRequestStatus', 'getChangeNotificationActionId', 'isChangeNotificationFormComplete']),
...mapState('reportChanges',['mtfiFacilities']),
...mapState('reportChanges',['mtfiFacilities','userProfileChangeRequests','changeRequestId']),
...mapGetters('ccfriApp', ['getCCFRIById']),
navRefresh() {
return this.$route.name + this.$route.params.urlGuid;
Expand Down Expand Up @@ -215,7 +215,8 @@ export default {
let checkbox; //true will show checkmark, false will not
let linkName;
if (this.isChangeRequest) {
checkbox = this.changeRequestStatus === 'SUBMITTED' && !this.unlockDeclaration;
const currentCR = this.userProfileChangeRequests.find(item => item.changeRequestId === this.changeRequestId);
checkbox = this.changeRequestStatus === 'SUBMITTED' && !currentCR?.unlockDeclaration;
if(this.changeType===CHANGE_TYPES.NEW_FACILITY){
linkName = 'Summary and Declaration New Facility';
}
Expand Down
4 changes: 4 additions & 0 deletions frontend/src/store/modules/summaryDeclaration.js
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,10 @@ export default {
checkSession();
try {
let payload = (await ApiService.apiAxios.get(ApiRoutes.APPLICATION_DECLARATION + '/' + rootState.application.applicationId)).data;
if (payload && rootState.application.unlockDeclaration) {
payload.agreeConsentCertify = null;
payload.orgContactName = null;
}
commit('model', payload);
} catch (error) {
console.log(`Failed to get Declaration - ${error}`);
Expand Down

0 comments on commit 21681f7

Please sign in to comment.