Skip to content

Commit

Permalink
Merge pull request #178 from bcgov/dev
Browse files Browse the repository at this point in the history
prevents creation of pal while switching periods
  • Loading branch information
kmarshgov authored Jan 28, 2025
2 parents 892782e + bf820f1 commit 76087fc
Show file tree
Hide file tree
Showing 7 changed files with 89 additions and 36 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<div>

<div class="min-h-screen bg-gray-100">
<NavBar v-bind="$attrs" />
<NavBar @update="updateFCap" v-bind="$attrs" />

<main>
<div class="mt-3">
Expand Down Expand Up @@ -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() {
Expand Down
1 change: 1 addition & 0 deletions Modules/Institution/resources/assets/js/Layouts/NavBar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
18 changes: 17 additions & 1 deletion Modules/Institution/resources/assets/js/Pages/Attestations.vue
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
</div>
</div>
<div class="col-md-9">
<div v-if="updateFedCap" class="above">&nbsp;</div>
<div class="card mb-3">
<div class="card-header">
<div class="row">
Expand Down Expand Up @@ -184,7 +185,8 @@ export default {
editRow: '',
showNewModal: false,
showEditModal: false,
capStat: ''
capStat: '',
updateFedCap: false
}
},
Expand Down Expand Up @@ -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();
},
}
</script>
<style scoped>
.above{
display: block;
position: absolute;
width: 100%;
height: 100%;
background: #efefef7d;
z-index: 111;
}
</style>
12 changes: 10 additions & 2 deletions Modules/Ministry/resources/assets/js/Layouts/Authenticated.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<div>

<div class="min-h-screen bg-gray-100">
<NavBar v-bind="$attrs" />
<NavBar @update="updateFCap" v-bind="$attrs" />

<main>
<div class="mt-3">
Expand Down Expand Up @@ -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() {
}
}
</script>
1 change: 1 addition & 0 deletions Modules/Ministry/resources/assets/js/Layouts/NavBar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
23 changes: 20 additions & 3 deletions Modules/Ministry/resources/assets/js/Pages/Attestations.vue
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
</div>
</div>
<div class="col-md-9">
<div v-if="updateFedCap" class="above">&nbsp;</div>
<div class="card mb-3">
<div class="card-header">
Attestations
Expand Down Expand Up @@ -117,7 +118,8 @@ export default {
attestationList: '',
editRow: '',
showNewModal: false,
showEditModal: false
showEditModal: false,
updateFedCap: false
}
},
Expand Down Expand Up @@ -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);
},
}
</script>
<style scoped>
.above{
display: block;
position: absolute;
width: 100%;
height: 100%;
background: #efefef7d;
z-index: 111;
}
</style>
59 changes: 30 additions & 29 deletions public/mix-manifest.json
Original file line number Diff line number Diff line change
@@ -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"
}

0 comments on commit 76087fc

Please sign in to comment.