Skip to content

Commit

Permalink
Merge pull request #179 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 76087fc + 4948c19 commit 604dad2
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}

/**
Expand Down Expand Up @@ -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,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -259,6 +259,9 @@ export default {
// handle error
console.log(error);
});
},
handleFedCapUpdate(event) {
this.updateFedCap = event.detail.updateFedCap;
}
},
beforeUnmount() {
Expand Down
17 changes: 8 additions & 9 deletions Modules/Ministry/App/Http/Controllers/AttestationController.php
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}

/**
Expand All @@ -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,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,6 @@ export default {
},
handleFedCapUpdate(event) {
this.updateFedCap = event.detail.updateFedCap;
console.log("updateFedCap updated:", this.updateFedCap);
}
},
beforeUnmount() {
Expand Down
2 changes: 1 addition & 1 deletion public/mix-manifest.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down

0 comments on commit 604dad2

Please sign in to comment.