Skip to content

Commit

Permalink
Ofmcc 3478 cr refresh issue (#269)
Browse files Browse the repository at this point in the history
* Added emit to allow logic on close.

* Updated when refresh happens.

---------

Co-authored-by: weskubo-cgi <[email protected]>
  • Loading branch information
weskubo-cgi and weskubo-cgi authored Jul 3, 2024
1 parent ed0e678 commit bdeefe8
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 11 deletions.
14 changes: 7 additions & 7 deletions frontend/src/components/messages/NewRequestDialog.vue
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,7 @@
:show="showNewRequestConfirmationDialog"
:isInvokedFromMessages="isInvokedFromMessages"
:return-to="returnTo"
@close="handleCloseConfirmationDialog" />
@close="toggleNewRequestConfirmationDialog" />
</v-container>
</template>

Expand Down Expand Up @@ -349,7 +349,7 @@ export default {
default: 'home',
},
},
emits: ['close', 'close-confirmation'],
emits: ['close', 'submitPhoneEmail'],
data() {
return {
isFormComplete: false,
Expand Down Expand Up @@ -650,6 +650,11 @@ export default {
await this.createReplyAssistanceRequest(assistanceRequest.assistanceRequestId)
}
this.toggleNewRequestConfirmationDialog()
// Emit an event so the parent can refresh its data
if (this.isSubCategoryChecked(REQUEST_SUB_CATEGORY_NAMES.ORGANIZATION_PHONE_EMAIL) || this.isSubCategoryChecked(REQUEST_SUB_CATEGORY_NAMES.FACILITY_PHONE_EMAIL)) {
this.$emit('submitPhoneEmail')
}
} catch (error) {
this.setFailureAlert('Failed to submit change request', error)
} finally {
Expand All @@ -659,11 +664,6 @@ export default {
}
},
handleCloseConfirmationDialog() {
this.toggleNewRequestConfirmationDialog()
this.$emit('close-confirmation')
},
toggleNewRequestConfirmationDialog() {
this.showNewRequestConfirmationDialog = !this.showNewRequestConfirmationDialog
},
Expand Down
4 changes: 2 additions & 2 deletions frontend/src/views/account-mgmt/ManageFacilityView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@
:defaultRequestCategoryId="getRequestCategoryIdByName(REQUEST_CATEGORY_NAMES.ACCOUNT_MAINTENANCE)"
:defaultFacility="facility"
@close="toggleChangeRequestDialog"
@close-confirmation="handleCloseConfirmation" />
@submit-phone-email="handleCRSubmit" />
<UnableToSubmitCrDialog :show="showUnableToSubmitCrDialog" :displayType="preventChangeRequestType" @close="toggleUnableToSubmitCrDialog" />
</v-container>
</template>
Expand Down Expand Up @@ -390,7 +390,7 @@ export default {
this.showChangeRequestDialog = !this.showChangeRequestDialog
},
handleCloseConfirmation() {
handleCRSubmit() {
this.loadData()
},
Expand Down
4 changes: 2 additions & 2 deletions frontend/src/views/account-mgmt/ManageOrganizationView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@
:show="showChangeRequestDialog"
:defaultRequestCategoryId="getRequestCategoryIdByName(REQUEST_CATEGORY_NAMES.ACCOUNT_MAINTENANCE)"
@close="toggleChangeRequestDialog"
@close-confirmation="handleCloseConfirmation" />
@submit-phone-email="handleCRSubmit" />
<UnableToSubmitCrDialog :show="showUnableToSubmitCrDialog" :displayType="preventChangeRequestType" @close="toggleUnableToSubmitCrDialog" />
</v-container>
</template>
Expand Down Expand Up @@ -186,7 +186,7 @@ export default {
this.showChangeRequestDialog = !this.showChangeRequestDialog
},
handleCloseConfirmation() {
handleCRSubmit() {
this.loadData()
},
Expand Down

0 comments on commit bdeefe8

Please sign in to comment.