From bf820f1113c8a297d7f59ece1f67f89cedc8bbaa Mon Sep 17 00:00:00 2001 From: Kal Marsh Date: Tue, 28 Jan 2025 10:56:24 -0800 Subject: [PATCH] prevents creation of pal while switching periods --- .../assets/js/Layouts/Authenticated.vue | 11 +++- .../resources/assets/js/Layouts/NavBar.vue | 1 + .../assets/js/Pages/Attestations.vue | 18 +++++- .../assets/js/Layouts/Authenticated.vue | 12 +++- .../resources/assets/js/Layouts/NavBar.vue | 1 + .../assets/js/Pages/Attestations.vue | 23 +++++++- public/mix-manifest.json | 59 ++++++++++--------- 7 files changed, 89 insertions(+), 36 deletions(-) diff --git a/Modules/Institution/resources/assets/js/Layouts/Authenticated.vue b/Modules/Institution/resources/assets/js/Layouts/Authenticated.vue index 0c84f4df..ff9cb818 100644 --- a/Modules/Institution/resources/assets/js/Layouts/Authenticated.vue +++ b/Modules/Institution/resources/assets/js/Layouts/Authenticated.vue @@ -2,7 +2,7 @@
- +
@@ -37,11 +37,20 @@ export default { showingNavigationDropdown: ref(false), searchType: '', searchData: '', + updateFedCap: ref(false), } }, methods: { emitSearch: function (data){ this.$emit('search', data); + }, + updateFCap() { + this.updateFedCap = !this.updateFedCap; + + //dispatch a global event + window.dispatchEvent(new CustomEvent('update-fed-cap', { + detail: { updateFedCap: this.updateFedCap } + })); } }, mounted() { diff --git a/Modules/Institution/resources/assets/js/Layouts/NavBar.vue b/Modules/Institution/resources/assets/js/Layouts/NavBar.vue index 115828c0..c4b176a2 100644 --- a/Modules/Institution/resources/assets/js/Layouts/NavBar.vue +++ b/Modules/Institution/resources/assets/js/Layouts/NavBar.vue @@ -128,6 +128,7 @@ export default { methods: { updateFedCap: function (e){ if(e.target.value !== ''){ + this.$emit('update'); this.selectedFedCapGuid = e.target.value; let data = { fed_cap_guid: e.target.value diff --git a/Modules/Institution/resources/assets/js/Pages/Attestations.vue b/Modules/Institution/resources/assets/js/Pages/Attestations.vue index 375e19a1..d1b4b644 100644 --- a/Modules/Institution/resources/assets/js/Pages/Attestations.vue +++ b/Modules/Institution/resources/assets/js/Pages/Attestations.vue @@ -16,6 +16,7 @@
+
 
@@ -184,7 +185,8 @@ export default { editRow: '', showNewModal: false, showEditModal: false, - capStat: '' + capStat: '', + updateFedCap: false } }, @@ -259,9 +261,23 @@ export default { }); } }, + beforeUnmount() { + window.removeEventListener('update-fed-cap', this.handleFedCapUpdate); + }, mounted() { this.attestationList = this.results.data; + window.addEventListener('update-fed-cap', this.handleFedCapUpdate); this.fetchCapStats(); }, } + diff --git a/Modules/Ministry/resources/assets/js/Layouts/Authenticated.vue b/Modules/Ministry/resources/assets/js/Layouts/Authenticated.vue index 0c84f4df..505179a4 100644 --- a/Modules/Ministry/resources/assets/js/Layouts/Authenticated.vue +++ b/Modules/Ministry/resources/assets/js/Layouts/Authenticated.vue @@ -2,7 +2,7 @@
- +
@@ -37,15 +37,23 @@ export default { showingNavigationDropdown: ref(false), searchType: '', searchData: '', + updateFedCap: ref(false), } }, methods: { emitSearch: function (data){ this.$emit('search', data); + }, + updateFCap() { + this.updateFedCap = !this.updateFedCap; + + //dispatch a global event + window.dispatchEvent(new CustomEvent('update-fed-cap', { + detail: { updateFedCap: this.updateFedCap } + })); } }, mounted() { - } } diff --git a/Modules/Ministry/resources/assets/js/Layouts/NavBar.vue b/Modules/Ministry/resources/assets/js/Layouts/NavBar.vue index a381ecf1..6932c9c3 100644 --- a/Modules/Ministry/resources/assets/js/Layouts/NavBar.vue +++ b/Modules/Ministry/resources/assets/js/Layouts/NavBar.vue @@ -117,6 +117,7 @@ export default { methods: { updateFedCap: function (e){ if(e.target.value !== ''){ + this.$emit('update'); this.selectedFedCapGuid = e.target.value; let data = { fed_cap_guid: e.target.value diff --git a/Modules/Ministry/resources/assets/js/Pages/Attestations.vue b/Modules/Ministry/resources/assets/js/Pages/Attestations.vue index 933caa63..80c0b6c5 100644 --- a/Modules/Ministry/resources/assets/js/Pages/Attestations.vue +++ b/Modules/Ministry/resources/assets/js/Pages/Attestations.vue @@ -16,6 +16,7 @@
+
 
Attestations @@ -117,7 +118,8 @@ export default { attestationList: '', editRow: '', showNewModal: false, - showEditModal: false + showEditModal: false, + updateFedCap: false } }, @@ -154,12 +156,27 @@ export default { }); }, 10); }, + handleFedCapUpdate(event) { + this.updateFedCap = event.detail.updateFedCap; + console.log("updateFedCap updated:", this.updateFedCap); + } }, - computed: { - + beforeUnmount() { + window.removeEventListener('update-fed-cap', this.handleFedCapUpdate); }, mounted() { this.attestationList = this.results.data; + window.addEventListener('update-fed-cap', this.handleFedCapUpdate); }, } + diff --git a/public/mix-manifest.json b/public/mix-manifest.json index 2ce13dce..55c2de7b 100644 --- a/public/mix-manifest.json +++ b/public/mix-manifest.json @@ -1,31 +1,32 @@ { - "/js/app.js": "/js/app.js", - "/css/app.css": "/css/app.css", - "/images/2022/BC_PSEFS_H_CMYK_pos.png": "/images/2022/BC_PSEFS_H_CMYK_pos.png", - "/images/2022/BC_PSEFS_H_CMYK_rev.png": "/images/2022/BC_PSEFS_H_CMYK_rev.png", - "/images/2022/BC_PSEFS_H_GRY_pos.png": "/images/2022/BC_PSEFS_H_GRY_pos.png", - "/images/2022/BC_PSEFS_H_RGB_pos.png": "/images/2022/BC_PSEFS_H_RGB_pos.png", - "/images/2022/BC_PSEFS_H_RGB_rev.png": "/images/2022/BC_PSEFS_H_RGB_rev.png", - "/images/2022/BC_PSEFS_H_Solid_pos.png": "/images/2022/BC_PSEFS_H_Solid_pos.png", - "/images/2022/BC_PSEFS_H_Solid_rev.png": "/images/2022/BC_PSEFS_H_Solid_rev.png", - "/images/bc-logo-grey.gif": "/images/bc-logo-grey.gif", - "/images/bc_lg_logo.png": "/images/bc_lg_logo.png", - "/images/bc_no_bg.png": "/images/bc_no_bg.png", - "/images/bc_sq_logo.png": "/images/bc_sq_logo.png", - "/images/bceid_rev.png": "/images/bceid_rev.png", - "/images/favicon.ico": "/images/favicon.ico", - "/images/gov_bc_logo.svg": "/images/gov_bc_logo.svg", - "/images/logo.png": "/images/logo.png", - "/images/signature/DO NOT REMOVE FILES IN HERE.txt": "/images/signature/DO NOT REMOVE FILES IN HERE.txt", - "/images/signature/v1.png": "/images/signature/v1.png", - "/fonts/ArialUnicodeMS.ttf": "/fonts/ArialUnicodeMS.ttf", - "/fonts/DejaVuSans.ttf": "/fonts/DejaVuSans.ttf", - "/fonts/customfontpack.eot": "/fonts/customfontpack.eot", - "/fonts/customfontpack.svg": "/fonts/customfontpack.svg", - "/fonts/customfontpack.ttf": "/fonts/customfontpack.ttf", - "/fonts/customfontpack.woff": "/fonts/customfontpack.woff", - "/fonts/texgyreadventor-regular-webfont.eot": "/fonts/texgyreadventor-regular-webfont.eot", - "/fonts/texgyreadventor-regular-webfont.svg": "/fonts/texgyreadventor-regular-webfont.svg", - "/fonts/texgyreadventor-regular-webfont.ttf": "/fonts/texgyreadventor-regular-webfont.ttf", - "/fonts/texgyreadventor-regular-webfont.woff": "/fonts/texgyreadventor-regular-webfont.woff" + "/js/app.js": "/js/app.js?id=ee2798f1e076b0f96a032ea42f70228f", + "/css/app.css": "/css/app.css?id=9b47939281311d158492df87d1af22b4", + "/images/2022/BC_PSEFS_H_CMYK_pos.png": "/images/2022/BC_PSEFS_H_CMYK_pos.png?id=d34e0966092a58e4f6b3395381f4ae0a", + "/images/2022/BC_PSEFS_H_CMYK_rev.png": "/images/2022/BC_PSEFS_H_CMYK_rev.png?id=1bd8fccdd579fe5b96cb19b14c94366e", + "/images/2022/BC_PSEFS_H_GRY_pos.png": "/images/2022/BC_PSEFS_H_GRY_pos.png?id=96ac94ecfca5b0be5b1f86a2da5c72e3", + "/images/2022/BC_PSEFS_H_RGB_pos.png": "/images/2022/BC_PSEFS_H_RGB_pos.png?id=b88c145567f8f08a45385774203b2b32", + "/images/2022/BC_PSEFS_H_RGB_rev.png": "/images/2022/BC_PSEFS_H_RGB_rev.png?id=b5c74577d7f73bde019f4495967865bf", + "/images/2022/BC_PSEFS_H_Solid_pos.png": "/images/2022/BC_PSEFS_H_Solid_pos.png?id=cc7a1adedacbeb4d1d11a91e1e88a283", + "/images/2022/BC_PSEFS_H_Solid_rev.png": "/images/2022/BC_PSEFS_H_Solid_rev.png?id=54758fa9d9431ef0fdf48b681b42957f", + "/images/attestation_sign.png": "/images/attestation_sign.png?id=73b4478b73127c3eba8b36f61abef94b", + "/images/bc-logo-grey.gif": "/images/bc-logo-grey.gif?id=b69559004ca28d2fcbcd8374b909483f", + "/images/bc_lg_logo.png": "/images/bc_lg_logo.png?id=adf67c1e7c8b8d000645d8188bc45aca", + "/images/bc_no_bg.png": "/images/bc_no_bg.png?id=a9c19e97a0925b18b971e620f62de6d3", + "/images/bc_sq_logo.png": "/images/bc_sq_logo.png?id=c74bdc1e9922859f9d7bbe3d4a858963", + "/images/bceid_rev.png": "/images/bceid_rev.png?id=0e7c1ff1cbe33e5de69823fb1eed959e", + "/images/favicon.ico": "/images/favicon.ico?id=43a128733ec5311870baf48167389f62", + "/images/gov_bc_logo.svg": "/images/gov_bc_logo.svg?id=c7d7d5fbcb3b207557455dd09198f755", + "/images/logo.png": "/images/logo.png?id=a07b02408a0138bd442273d637c0f590", + "/images/signature/DO NOT REMOVE FILES IN HERE.txt": "/images/signature/DO NOT REMOVE FILES IN HERE.txt?id=fce9e400d526c635d0d7772f79922149", + "/images/signature/v1.png": "/images/signature/v1.png?id=73b4478b73127c3eba8b36f61abef94b", + "/fonts/ArialUnicodeMS.ttf": "/fonts/ArialUnicodeMS.ttf?id=ce6e7b245c55e940e11c2a34a80a6c8d", + "/fonts/DejaVuSans.ttf": "/fonts/DejaVuSans.ttf?id=efb9ee2304e7bb4e51e96f74c0b92924", + "/fonts/customfontpack.eot": "/fonts/customfontpack.eot?id=63c01848cae6d7780cf04ef009d6c4f8", + "/fonts/customfontpack.svg": "/fonts/customfontpack.svg?id=5c2ed132dcfc841ec3be95cf83c56503", + "/fonts/customfontpack.ttf": "/fonts/customfontpack.ttf?id=e12a8f10403f7d50f9acab444934f9ce", + "/fonts/customfontpack.woff": "/fonts/customfontpack.woff?id=23250a3dc387fb4e4cbdaff7ba5c17cb", + "/fonts/texgyreadventor-regular-webfont.eot": "/fonts/texgyreadventor-regular-webfont.eot?id=8a9b2362ef1dd7b1d9cacdf2599c282e", + "/fonts/texgyreadventor-regular-webfont.svg": "/fonts/texgyreadventor-regular-webfont.svg?id=761f2c18049e654079d09a8940ea4b84", + "/fonts/texgyreadventor-regular-webfont.ttf": "/fonts/texgyreadventor-regular-webfont.ttf?id=d03e674faa5e1bbb18c42832970dfa92", + "/fonts/texgyreadventor-regular-webfont.woff": "/fonts/texgyreadventor-regular-webfont.woff?id=59f4e7415ea00842a7e31e8b3c5e8b2c" }