Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(network): fix problems with saving of the membership fee and checking SU organisation #2207

Merged
merged 2 commits into from
Sep 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 11 additions & 7 deletions src/views/network/AntennaCriteriaCheck.vue
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@
<article class="tile is-child">
<h4 class="title">Antenna Criteria Check</h4>

<div class="notification is-warning">
The computation of the fulfilment of 'Events' is currently not working correctly. It does <strong>not</strong> yet take into account the Summer Universities organised. Please check these manually!
</div>

<div class="field">
<label class="label">Selected Agora</label>
<div class="select">
Expand Down Expand Up @@ -308,7 +312,7 @@ export default {
const promises = []
promises.push(this.fetchEvents())
promises.push(this.fetchStatutoryEvents())
promises.push(this.fetchSummerUniversities())
// promises.push(this.fetchSummerUniversities())

await Promise.all(promises)

Expand All @@ -325,12 +329,12 @@ export default {
body.latest_event = !body.latest_event || moment(event.latest_event).isAfter(moment(body.latest_event)) ? event.latest_event : body.latest_event
}

for (const event of this.summerUniversities) {
for (const organizer of event.organizing_bodies) {
const body = this.bodies.find(x => x.id === organizer.body_id)
body.latest_event = !body.latest_event || moment(event.latest_event).isAfter(moment(body.latest_event)) ? event.latest_event : body.latest_event
}
}
// for (const event of this.summerUniversities) {
// for (const organizer of event.organizing_bodies) {
// const body = this.bodies.find(x => x.id === organizer.body_id)
// body.latest_event = !body.latest_event || moment(event.latest_event).isAfter(moment(body.latest_event)) ? event.latest_event : body.latest_event
// }
// }
// ... until here

for (const body in this.bodies) {
Expand Down
12 changes: 6 additions & 6 deletions src/views/network/AntennaCriteriaModal.vue
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
<option value="null">Not set</option>
<option value="true">Yes</option>
<option value="false">No</option>
<option v-if="can.giveExceptionCommunication" value="exception">Exception</option>
<option v-if="can.setCommunicationException" value="exception">Exception</option>
</b-select>

<b-input v-model="comments.communication" placeholder="Comment" expanded />
Expand Down Expand Up @@ -58,7 +58,7 @@
</b-field>
</template>

<template v-if="can.setMembershipFeePayement">
<template v-if="can.setMembershipFee">
<b-field label="Membership fee (F)" />
<b-field grouped>
<b-select v-model="antennaCriteria.membershipFee">
Expand Down Expand Up @@ -170,10 +170,10 @@ export default {
permissions: [],
can: {
setCommunication: false,
giveExceptionCommunication: false,
setCommunicationException: false,
setBoardElection: false,
setMembersList: false,
setMembershipFeePayement: false,
setMembershipFee: false,
setEvents: false,
setAgoraAttendance: false,
setDevelopmentPlan: false,
Expand Down Expand Up @@ -228,10 +228,10 @@ export default {
this.axios.get(this.services['core'] + '/my_permissions').then((permissionResponse) => {
this.permissions = permissionResponse.data.data
this.can.setCommunication = this.permissions.some(permission => permission.combined.endsWith('manage_network:communication'))
this.can.giveExceptionCommunication = this.permissions.some(permission => permission.combined.endsWith('manage_network:communication_exception'))
this.can.setCommunicationException = this.permissions.some(permission => permission.combined.endsWith('manage_network:communication_exception'))
this.can.setBoardElection = this.permissions.some(permission => permission.combined.endsWith('manage_network:board_election'))
this.can.setMembersList = this.permissions.some(permission => permission.combined.endsWith('manage_network:members_list'))
this.can.setMembershipFeePayement = this.permissions.some(permission => permission.combined.endsWith('manage_network:membership_fee'))
this.can.setMembershipFee = this.permissions.some(permission => permission.combined.endsWith('manage_network:membership_fee'))
this.can.setEvents = this.permissions.some(permission => permission.combined.endsWith('manage_network:events'))
this.can.setAgoraAttendance = this.permissions.some(permission => permission.combined.endsWith('manage_network:agora_attendance'))
this.can.setDevelopmentPlan = this.permissions.some(permission => permission.combined.endsWith('manage_network:development_plan'))
Expand Down