diff --git a/Modules/Institution/App/Http/Controllers/AttestationController.php b/Modules/Institution/App/Http/Controllers/AttestationController.php index 0b941414..2e18aeb6 100644 --- a/Modules/Institution/App/Http/Controllers/AttestationController.php +++ b/Modules/Institution/App/Http/Controllers/AttestationController.php @@ -34,8 +34,7 @@ class AttestationController extends Controller public function __construct() { - $this->fedCaps = FedCap::active()->get(); - $this->countries = Country::select('name')->where('active', true)->get(); +// $this->fedCaps = FedCap::active()->get(); } /** @@ -93,6 +92,7 @@ public function index() $warning_message = "Your institution has reached the maximum attestations cap. You can't issue a new attestation or it will be automatically converted as a Draft."; } + $this->countries = Country::select('name')->where('active', true)->get(); return Inertia::render('Institution::Attestations', [ 'error' => null, 'warning' => $warning_message, diff --git a/Modules/Institution/resources/assets/js/Pages/Attestations.vue b/Modules/Institution/resources/assets/js/Pages/Attestations.vue index d1b4b644..7a3aec96 100644 --- a/Modules/Institution/resources/assets/js/Pages/Attestations.vue +++ b/Modules/Institution/resources/assets/js/Pages/Attestations.vue @@ -259,6 +259,9 @@ export default { // handle error console.log(error); }); + }, + handleFedCapUpdate(event) { + this.updateFedCap = event.detail.updateFedCap; } }, beforeUnmount() { diff --git a/Modules/Ministry/App/Http/Controllers/AttestationController.php b/Modules/Ministry/App/Http/Controllers/AttestationController.php index d04577f8..e6f9a521 100644 --- a/Modules/Ministry/App/Http/Controllers/AttestationController.php +++ b/Modules/Ministry/App/Http/Controllers/AttestationController.php @@ -30,14 +30,7 @@ class AttestationController extends Controller public function __construct() { - $this->fedCaps = FedCap::active()->get(); - $this->countries = Country::select('name') - ->where('active', true) - ->get(); - $this->institutions = Institution::whereHas('activeCaps') - ->active() - ->with('activeCaps') - ->get(); +// $this->fedCaps = FedCap::active()->get(); } /** @@ -46,7 +39,13 @@ public function __construct() public function index(Request $request) { $attestations = $this->paginateAtte(); - + $this->countries = Country::select('name') + ->where('active', true) + ->get(); + $this->institutions = Institution::whereHas('activeCaps') + ->active() + ->with('activeCaps') + ->get(); return Inertia::render('Ministry::Attestations', [ 'status' => true, 'results' => $attestations, diff --git a/Modules/Ministry/resources/assets/js/Pages/Attestations.vue b/Modules/Ministry/resources/assets/js/Pages/Attestations.vue index 80c0b6c5..48b80596 100644 --- a/Modules/Ministry/resources/assets/js/Pages/Attestations.vue +++ b/Modules/Ministry/resources/assets/js/Pages/Attestations.vue @@ -158,7 +158,6 @@ export default { }, handleFedCapUpdate(event) { this.updateFedCap = event.detail.updateFedCap; - console.log("updateFedCap updated:", this.updateFedCap); } }, beforeUnmount() { diff --git a/public/mix-manifest.json b/public/mix-manifest.json index 55c2de7b..56f3634c 100644 --- a/public/mix-manifest.json +++ b/public/mix-manifest.json @@ -1,5 +1,5 @@ { - "/js/app.js": "/js/app.js?id=ee2798f1e076b0f96a032ea42f70228f", + "/js/app.js": "/js/app.js?id=3dec1d5796d595fda4d890f25d858a59", "/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",