Skip to content

Commit

Permalink
made member states consistent
Browse files Browse the repository at this point in the history
  • Loading branch information
jabelone committed Jun 22, 2024
1 parent 93dba18 commit 650aab0
Show file tree
Hide file tree
Showing 8 changed files with 18 additions and 18 deletions.
2 changes: 1 addition & 1 deletion memberportal/api_general/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -379,7 +379,7 @@ def get(self, request):
"lastName": p.last_name,
"screenName": p.screen_name,
"phone": p.phone,
"memberStatus": p.get_state_display(),
"memberStatus": p.state,
"vehicleRegistrationPlate": p.vehicle_registration_plate,
"lastInduction": p.last_induction,
"lastSeen": p.last_seen,
Expand Down
4 changes: 2 additions & 2 deletions src-frontend/src/boot/routeGuards.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ export default boot(({ router, store }) => {
}

if (
store.getters['profile/profile']?.memberStatus === 'Needs Induction' &&
store.getters['profile/profile']?.memberStatus === 'noob' &&
to.name !== 'membershipPlan' &&
to.name !== 'webcams' &&
to.name !== 'billing' &&
Expand Down Expand Up @@ -52,7 +52,7 @@ export default boot(({ router, store }) => {
if (
to.meta.memberOnly &&
to.name !== 'webcams' &&
store.getters['profile/profile'].memberStatus !== 'Active'
store.getters['profile/profile'].memberStatus !== 'active'
)
return next({ name: 'Error403MemberOnly' });

Expand Down
12 changes: 6 additions & 6 deletions src-frontend/src/components/AdminTools/MembersList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ export default defineComponent({
return {
members: [],
filter: '',
memberState: 'Active',
memberState: 'active',
loading: false,
pagination: {
sortBy: 'date',
Expand Down Expand Up @@ -156,11 +156,11 @@ export default defineComponent({
},
filterOptions() {
return [
{ label: this.$t('adminTools.all'), value: 'All' },
{ label: this.$t('adminTools.active'), value: 'Active' },
{ label: this.$t('adminTools.inactive'), value: 'Inactive' },
{ label: this.$t('adminTools.new'), value: 'Needs Induction' },
{ label: this.$t('adminTools.accountOnly'), value: 'Account Only' },
{ label: this.$t('adminTools.all'), value: 'all' },
{ label: this.$t('adminTools.active'), value: 'active' },
{ label: this.$t('adminTools.inactive'), value: 'inactive' },
{ label: this.$t('adminTools.new'), value: 'noob' },
{ label: this.$t('adminTools.accountOnly'), value: 'accountonly' },
];
},
columns() {
Expand Down
2 changes: 1 addition & 1 deletion src-frontend/src/components/DigitalIdCard.vue
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<q-card-section class="column flex items-start justify-start">
<div class="column flex content-start justify-center">
<q-banner
v-if="profile.memberStatus !== 'Active'"
v-if="profile.memberStatus !== 'active'"
inline-actions
rounded
class="bg-orange text-white q-ma-md"
Expand Down
4 changes: 2 additions & 2 deletions src-frontend/src/layouts/MainLayout.vue
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ export default defineComponent({
if (!link.loggedIn) {
if (this.loggedIn) displayLink = false;
}
if (link.memberOnly && this.profile.memberStatus !== 'Active')
if (link.memberOnly && this.profile.memberStatus !== 'active')
displayLink = false;
if (this.$q.platform.is.electron && !link.kiosk) displayLink = false;
if (link.admin && !this.profile?.permissions?.staff) {
Expand All @@ -223,7 +223,7 @@ export default defineComponent({
if (this.loggedIn) {
await this.getProfile();
if (
this.profile.memberStatus === 'Needs Induction' &&
this.profile.memberStatus === 'noob' &&
this.$route.name !== 'membershipPlan' &&
this.features.enableMembershipPayments
) {
Expand Down
2 changes: 1 addition & 1 deletion src-frontend/src/pages/CheckAccess.vue
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
</p>
<div class="column flex content-start justify-center">
<q-banner
v-if="profile.memberStatus !== 'Active'"
v-if="profile.memberStatus !== 'active'"
inline-actions
rounded
class="bg-orange text-white q-ma-md"
Expand Down
6 changes: 3 additions & 3 deletions src-frontend/src/pages/Dashboard.vue
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
<div class="column flex content-start justify-center">
<q-banner
v-if="
profile.memberStatus !== 'Active' &&
profile.memberStatus !== 'Account Only'
profile.memberStatus !== 'active' &&
profile.memberStatus !== 'accountonly'
"
inline-actions
rounded
Expand Down Expand Up @@ -72,7 +72,7 @@ export default {
async mounted() {
await this.getProfile();
if (
this.profile.memberStatus === 'Needs Induction' &&
this.profile.memberStatus === 'noob' &&
this.$route.name !== 'membershipPlan' &&
this.features.enableMembershipPayments
) {
Expand Down
4 changes: 2 additions & 2 deletions src-frontend/src/pages/Profile.vue
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
<div class="column flex content-start justify-center">
<q-banner
v-if="
profile.memberStatus !== 'Active' &&
profile.memberStatus !== 'Account Only'
profile.memberStatus !== 'active' &&
profile.memberStatus !== 'accountonly'
"
inline-actions
rounded
Expand Down

0 comments on commit 650aab0

Please sign in to comment.