Skip to content

Commit

Permalink
Merge branch 'main' into release-1.1
Browse files Browse the repository at this point in the history
  • Loading branch information
weskubo-cgi authored Oct 18, 2024
2 parents 1fdba2e + 3933ec7 commit c2a6d0e
Show file tree
Hide file tree
Showing 10 changed files with 196 additions and 64 deletions.
119 changes: 71 additions & 48 deletions backend/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions backend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,10 @@
"cors": "^2.8.5",
"cron": "^1.8.2",
"dotenv": "^8.0.0",
"express": "^4.21.0",
"express": "^4.21.1",
"express-prometheus-middleware": "^0.8.5",
"express-rate-limit": "^7.4.0",
"express-session": "^1.17.1",
"express-session": "^1.18.1",
"express-validator": "^7.1.0",
"fast-safe-stringify": "^2.0.7",
"form-data": "^4.0.0",
Expand Down
14 changes: 7 additions & 7 deletions frontend/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
"eslint-plugin-vue": "^9.27.0",
"happy-dom": "^12.8.0",
"prettier": "^3.3.3",
"vite": "^4.4.9",
"vite": "^4.5.5",
"vitest": "^0.34.6"
}
}
61 changes: 61 additions & 0 deletions frontend/src/components/funding/FundingAllocationTab.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
<template>
<v-container fluid class="pa-0">
<div class="my-2">View or submit a change for your centre's current monthly funding allocations. Funds can be re-allocated based on the rules below.</div>
<v-row v-if="hasPermission(PERMISSIONS.SUBMIT_CHANGE_REQUEST)" no-gutters class="my-4 pr-2 justify-end">
<AppButton :loading="loading" @click="toggleAssistanceRequestDialog()">Request to Re-allocate Funds</AppButton>
</v-row>
<h2 class="mb-2">Funding Re-Allocation Rules</h2>
<AppAlertBanner type="info">Note: Total funds re-allocated cannot be more than the base funding for each envelope.</AppAlertBanner>
<FundingSearchCard :loading="loading" :select-single-facility="true" :show-date-filter="false" class="my-6" @search="loadFundingDetails" />
<NewRequestDialog
class="pa-0"
:show="showAssistanceRequestDialog"
:default-facility="selectedFacility"
:default-request-category-id="getRequestCategoryIdByName(REQUEST_CATEGORY_NAMES.FUNDING_ENVELOPE_CR)"
@close="toggleAssistanceRequestDialog" />
</v-container>
</template>

<script>
import { mapState } from 'pinia'
import FundingSearchCard from '@/components/funding/FundingSearchCard.vue'
import NewRequestDialog from '@/components/messages/NewRequestDialog.vue'
import AppAlertBanner from '@/components/ui/AppAlertBanner.vue'
import AppButton from '@/components/ui/AppButton.vue'
import { useAppStore } from '@/stores/app'
import alertMixin from '@/mixins/alertMixin.js'
import permissionsMixin from '@/mixins/permissionsMixin'
import { REQUEST_CATEGORY_NAMES } from '@/utils/constants'
export default {
name: 'FundingAllocationTab',
components: { AppAlertBanner, AppButton, FundingSearchCard, NewRequestDialog },
mixins: [alertMixin, permissionsMixin],
data() {
return {
loading: false,
showAssistanceRequestDialog: false,
selectedFacility: null,
}
},
computed: {
...mapState(useAppStore, ['getRequestCategoryIdByName']),
},
created() {
this.REQUEST_CATEGORY_NAMES = REQUEST_CATEGORY_NAMES
},
methods: {
loadFundingDetails(searchQueries) {
this.selectedFacility = searchQueries?.facilities
},
toggleAssistanceRequestDialog() {
this.showAssistanceRequestDialog = !this.showAssistanceRequestDialog
},
},
}
</script>
Loading

0 comments on commit c2a6d0e

Please sign in to comment.