-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #298 from ncosd/dev-1.16.0
Release 1.16.0
- Loading branch information
Showing
31 changed files
with
540 additions
and
338 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
<script setup> | ||
import { ref, onBeforeMount } from 'vue' | ||
const props = defineProps({ | ||
activeTab: String, | ||
}) | ||
</script> | ||
|
||
<template> | ||
<ul class="nav nav-tabs"> | ||
<li class="nav-item"> | ||
<router-link :class="['nav-link', { active: props.activeTab === 'Dashboard' }]" aria-current="page" :to="{ name: 'AdminReportPage' }">Dashboard</router-link> | ||
</li> | ||
<li class="nav-item"> | ||
<router-link :class="['nav-link', { active: props.activeTab === 'Volunteers' }]" :to="{ name: 'VolunteerReportPage' }">Volunteers</router-link> | ||
</li> | ||
<li class="nav-item"> | ||
<router-link :class="['nav-link', { active: props.activeTab === 'Guests' }]" :to="{ name: 'GuestReportPage' }">Guests</router-link> | ||
</li> | ||
|
||
</ul> | ||
</template> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
<script setup> | ||
import { ref } from 'vue' | ||
import ReportsTab from '@/components/reports/ReportsTab.vue' | ||
</script> | ||
|
||
<template> | ||
<div class="container"> | ||
<ReportsTab activeTab="Guests" /> | ||
</div> | ||
</template> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,78 @@ | ||
<script setup> | ||
import { ref, onBeforeMount } from 'vue' | ||
import ReportsTab from '@/components/reports/ReportsTab.vue' | ||
import { collection, getCountFromServer, getFirestore, doc, addDoc, query, where, setDoc } from 'firebase/firestore' | ||
const db = getFirestore() | ||
const numTotalGuests = ref(0) | ||
const numTotalVolunteers = ref(0) | ||
const numTotalDrivers = ref(0) | ||
onBeforeMount( async ()=>{ | ||
const guestSnap = await getCountFromServer(collection(db, 'guestprofile')) | ||
numTotalGuests.value = guestSnap.data().count | ||
const vSnap = await getCountFromServer(query(collection(db, 'volunteerprofilestate'), | ||
where('status', '==', 'active'))) | ||
numTotalVolunteers.value = vSnap.data().count | ||
const dSnap = await getCountFromServer(query(collection(db, 'volunteerprofilestate'), | ||
where('status', '==', 'active'), | ||
where('isDriver', '==', true), | ||
where('isApprovedDriver', '==', true) | ||
)) | ||
numTotalDrivers.value = dSnap.data().count | ||
}) | ||
</script> | ||
|
||
<template> | ||
<div class="container"> | ||
<ReportsTab activeTab="Dashboard" /> | ||
|
||
<div class="row my-3"> | ||
<div class="col-4"> | ||
<div class="card h-100"> | ||
<div class="card-body"> | ||
<div class="row"> | ||
<div class="col"><h5 class="card-title">Total Guests</h5></div> | ||
<div class="col-2"><i class="bi bi-person fs-3"></i></div> | ||
</div > | ||
<h1 class="text-center">{{ numTotalGuests }}</h1> | ||
</div> | ||
</div > | ||
</div > | ||
|
||
<div class="col-4"> | ||
<div class="card h-100"> | ||
<div class="card-body"> | ||
<div class="row"> | ||
<div class="col"><h5 class="card-title">Total Volunteers</h5></div> | ||
<div class="col-2"><i class="bi bi-person-fill fs-3"></i></div> | ||
</div > | ||
<h1 class="text-center">{{ numTotalVolunteers }}</h1> | ||
</div> | ||
</div > | ||
</div > | ||
|
||
<div class="col-4"> | ||
<div class="card h-100"> | ||
<div class="card-body"> | ||
<div class="row"> | ||
<div class="col"><h5 class="card-title">Total Drivers</h5></div> | ||
<div class="col-2"><i class="bi bi-car-front fs-3"></i></div> | ||
</div > | ||
<h1 class="text-center">{{ numTotalDrivers }}</h1> | ||
</div> | ||
</div > | ||
</div > | ||
|
||
|
||
</div> | ||
|
||
|
||
|
||
</div> | ||
</template> |
3 changes: 3 additions & 0 deletions
3
web/admin/src/pages/AdminReportPage.vue → ...rc/pages/reports/VolunteersReportPage.vue
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.