Skip to content

Commit

Permalink
Merge pull request #305 from ncosd/dev
Browse files Browse the repository at this point in the history
Release 1.17.0
  • Loading branch information
dherbst authored Feb 8, 2024
2 parents 3d9085f + 1a12c42 commit cdc1179
Show file tree
Hide file tree
Showing 18 changed files with 551 additions and 78 deletions.
20 changes: 20 additions & 0 deletions web/admin/package-lock.json

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

1 change: 1 addition & 0 deletions web/admin/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
"firebase": "^9.22.1",
"pinia": "^2.1.3",
"vue": "^3.3.4",
"vue-draggable-plus": "^0.3.5",
"vue-router": "^4.2.2",
"vue-signature-pad": "^3.0.2"
},
Expand Down
12 changes: 9 additions & 3 deletions web/admin/src/components/AppNavigation.vue
Original file line number Diff line number Diff line change
Expand Up @@ -35,14 +35,20 @@ const signOutClick = () => {
<router-link class="nav-link" to="/schedule">Schedule</router-link>
</li>
<li class="nav-item">
<router-link class="nav-link" :to="{ name: 'DeliveryDashboard' }">Delivery</router-link>
<router-link class="nav-link" :to="{ name: 'OrdersDashboardPage' }">Orders</router-link>
</li>
<li class="nav-item">
<router-link class="nav-link" :to="{ name: 'LocationsList' }">Locations</router-link>
<router-link class="nav-link" :to="{ name: 'DeliveryDashboard' }">Delivery</router-link>
</li>
<li class="nav-item">
<router-link class="nav-link" :to="{ name: 'TaskTypesList' }">TaskTypes</router-link>
<router-link class="nav-link" :to="{ name: 'LocationsList' }">Config</router-link>
</li>
<!-- <li class="nav-item"> -->
<!-- <router-link class="nav-link" :to="{ name: 'LocationsList' }">Locations</router-link> -->
<!-- </li> -->
<!-- <li class="nav-item"> -->
<!-- <router-link class="nav-link" :to="{ name: 'TaskTypesList' }">TaskTypes</router-link> -->
<!-- </li> -->
<li class="nav-item">
<router-link class="nav-link" :to="{ name: 'AdminReportPage' }">Reports</router-link>
</li>
Expand Down
18 changes: 18 additions & 0 deletions web/admin/src/components/ConfigTabs.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<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 === 'Locations' }]" aria-current="page" :to="{ name: 'LocationsList'}">Locations</router-link>
</li>
<li class="nav-item">
<router-link :class="['nav-link', { active: props.activeTab === 'TaskTypes' }]" :to="{ name: 'TaskTypesList'}">TaskTypes</router-link>
</li>
</ul>
</template>
24 changes: 24 additions & 0 deletions web/admin/src/components/OrdersTabs.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<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: 'OrdersDashboardPage'}">Dashboard</router-link>
</li>
<li class="nav-item">
<router-link :class="['nav-link', { active: props.activeTab === 'Form' }]" :to="{ name: 'OrderFormPage'}">Form</router-link>
</li>
<li class="nav-item">
<router-link :class="['nav-link', { active: props.activeTab === 'Items' }]" :to="{ name: 'OrderItemListPage'}">Items</router-link>
</li>
<li class="nav-item">
<router-link :class="['nav-link', { active: props.activeTab === 'History' }]" :to="{ name: 'OrdersHistoryPage'}">History</router-link>
</li>
</ul>
</template>
104 changes: 59 additions & 45 deletions web/admin/src/pages/LocationPage.vue
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { ref, onBeforeMount } from 'vue'
import { useRouter } from 'vue-router'
import { useAuthUserStore } from '@/stores/authUser'
import { collection, getFirestore, query, where, doc, getDoc, addDoc, updateDoc, deleteDoc } from 'firebase/firestore'
import ConfigTabs from '@/components/ConfigTabs.vue'
const props = defineProps({
id: String,
Expand Down Expand Up @@ -76,50 +77,63 @@ onBeforeMount( async () => {

<template>
<div class="container">
<form @submit.prevent="createLocation">
<div v-if="showSaveMessage" class="text-bg-success">{{saveMessage}}</div>
<div v-if="showDeleteMessage" class="text-bg-danger">{{deleteMessage}}</div>

<div class="row">
<label class="form-label" for="createLocationName">Location Name - short, no spaces</label>
<input id="createLocationName" type="text" class="form-control" v-model="location.name" required>
</div>

<div class="row">
<label class="form-label" for="createLocationDisplayName">Display Name</label>
<input id="createLocationDisplayName" type="text" class="form-control" v-model="location.displayname" required>
</div>

<div class="row">
<label class="form-label" for="createStreet">Street</label>
<input id="createStreet" type="text" class="form-control" v-model="location.street" required>
</div>

<div class="row">
<label class="form-label" for="createCity">City</label>
<input id="createCity" type="text" class="form-control" v-model="location.city" required>
</div>

<div class="row">
<label class="form-label" for="createState">State</label>
<input id="createState" type="text" class="form-control" v-model="location.state" required>
</div>

<div class="row">
<label class="form-label" for="createZip">Zip</label>
<input id="createZip" type="text" class="form-control" v-model="location.zip" required>
</div>

<div class="mt-3">
<div class="row">
<div class="col">
<button type="submit" class="btn btn-primary btn-sm">Save</button>
</div>
<div class="col text-end">
<button @click.prevent="deleteLocation" class="btn btn-danger btn-sm">Delete</button>
</div>
</div>
</div>
</form>
<ConfigTabs activeTab="Locations" class="mb-3"/>
<form @submit.prevent="createLocation">
<div v-if="showSaveMessage" class="text-bg-success">{{saveMessage}}</div>
<div v-if="showDeleteMessage" class="text-bg-danger">{{deleteMessage}}</div>

<div class="row mb-3">
<div class="col">
<label class="form-label" for="createLocationName">Location Name - short, no spaces</label>
<input id="createLocationName" type="text" class="form-control" v-model="location.name" required>
</div>
</div>

<div class="row mb-3">
<div class="col">
<label class="form-label" for="createLocationDisplayName">Display Name</label>
<input id="createLocationDisplayName" type="text" class="form-control" v-model="location.displayname" required>
</div>
</div>

<div class="row mb-3">
<div class="col">
<label class="form-label" for="createStreet">Street</label>
<input id="createStreet" type="text" class="form-control" v-model="location.street" required>
</div>
</div>

<div class="row mb-3">
<div class="col">
<label class="form-label" for="createCity">City</label>
<input id="createCity" type="text" class="form-control" v-model="location.city" required>
</div>
</div>

<div class="row mb-3">
<div class="col">
<label class="form-label" for="createState">State</label>
<input id="createState" type="text" class="form-control" v-model="location.state" required>
</div>
</div>

<div class="row mb-3">
<div class="col">
<label class="form-label" for="createZip">Zip</label>
<input id="createZip" type="text" class="form-control" v-model="location.zip" required>
</div>
</div>

<div class="mt-3">
<div class="row mb-3">
<div class="col">
<button type="submit" class="btn btn-primary btn-sm">Save</button>
</div>
<div class="col text-end">
<button @click.prevent="deleteLocation" class="btn btn-danger btn-sm">Delete</button>
</div>
</div>
</div>
</form>
</div>
</template>
3 changes: 3 additions & 0 deletions web/admin/src/pages/LocationsListPage.vue
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { ref, onBeforeMount } from 'vue'
import { useAuthUserStore } from '@/stores/authUser'
import { collection, getFirestore, query, where, doc, getDocs, addDoc, updateDoc, orderBy } from 'firebase/firestore'
import SortableTableHeader from '@/components/SortableTableHeader.vue'
import ConfigTabs from '@/components/ConfigTabs.vue'
const user = useAuthUserStore()
const locations = ref()
Expand Down Expand Up @@ -40,6 +41,8 @@ const mapsquery = (loc)=>{

<template>
<div class="container">
<ConfigTabs activeTab="Locations" class="mb-3"/>

<router-link class="btn btn-sm btn-primary" :to="{name:'Location'}">New Location</router-link>
<div class="table-responsive-md">
<table class="table table-striped table-hover">
Expand Down
3 changes: 2 additions & 1 deletion web/admin/src/pages/ReleaseNotesPage.vue
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@
<h1>Release Notes</h1>
<h2 id="1.17.0">February 7, 2024 - 1.17.0</h2>
<ul>
<li>tbd</li>
<li><a href="https://github.com/ncosd/food-pantry-app/issues/203">#203</a> Check for attending volunteer windows when choosing unavailable date</li>
<li><a href="https://github.com/ncosd/food-pantry-app/issues/301">#301</a> Prototype for Admin orders pages.</li>
</ul>
<h2 id="1.16.0">February 4, 2024 - 1.16.0</h2>
<ul>
Expand Down
61 changes: 35 additions & 26 deletions web/admin/src/pages/TaskTypePage.vue
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { ref, onBeforeMount } from 'vue'
import { useRouter } from 'vue-router'
import { useAuthUserStore } from '@/stores/authUser'
import { collection, getFirestore, query, where, doc, getDoc, addDoc, updateDoc, deleteDoc } from 'firebase/firestore'
import ConfigTabs from '@/components/ConfigTabs.vue'
const props = defineProps({
id: String,
Expand Down Expand Up @@ -73,34 +74,42 @@ onBeforeMount( async () => {

<template>
<div class="container">
<form @submit.prevent="createTaskType">
<div v-if="showSaveMessage" class="text-bg-success">{{saveMessage}}</div>
<div v-if="showDeleteMessage" class="text-bg-danger">{{deleteMessage}}</div>
<ConfigTabs activeTab="TaskTypes" class="mb-3"/>

<div class="row">
<label class="form-label" for="taskTypeName">Name</label>
<input id="taskTypeName" type="text" class="form-control" v-model="tasktype.name" required>
</div>
<form @submit.prevent="createTaskType">
<div v-if="showSaveMessage" class="text-bg-success">{{saveMessage}}</div>
<div v-if="showDeleteMessage" class="text-bg-danger">{{deleteMessage}}</div>

<div class="row">
<label class="form-label" for="taskTypeDisplayName">Display Name</label>
<input id="taskTypeDisplayName" type="text" class="form-control" v-model="tasktype.displayname" required>
</div>
<div class="row mb-3">
<div class="col">
<label class="form-label" for="taskTypeName">Name</label>
<input id="taskTypeName" type="text" class="form-control" v-model="tasktype.name" required>
</div>
</div>

<div class="row">
<label class="form-label" for="taskTypeDescription">Description</label>
<input id="taskTypeDescription" type="text" class="form-control" v-model="tasktype.description" required>
</div>
<div class="mt-3">
<div class="row">
<div class="col">
<button type="submit" class="btn btn-primary btn-sm">Save</button>
</div>
<div class="col text-end">
<button @click.prevent="deleteTaskType" class="btn btn-danger btn-sm">Delete</button>
</div>
</div>
</div>
</form>
<div class="row mb-3">
<div class="col">
<label class="form-label" for="taskTypeDisplayName">Display Name</label>
<input id="taskTypeDisplayName" type="text" class="form-control" v-model="tasktype.displayname" required>
</div>
</div>

<div class="row mb-3">
<div class="col">
<label class="form-label" for="taskTypeDescription">Description</label>
<input id="taskTypeDescription" type="text" class="form-control" v-model="tasktype.description" required>
</div>
</div>
<div class="mt-3">
<div class="row">
<div class="col">
<button type="submit" class="btn btn-primary btn-sm">Save</button>
</div>
<div class="col text-end">
<button @click.prevent="deleteTaskType" class="btn btn-danger btn-sm">Delete</button>
</div>
</div>
</div>
</form>
</div>
</template>
3 changes: 3 additions & 0 deletions web/admin/src/pages/TaskTypesListPage.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
import { ref, onBeforeMount } from 'vue'
import { useAuthUserStore } from '@/stores/authUser'
import { collection, getFirestore, query, where, doc, getDocs, addDoc, updateDoc, orderBy } from 'firebase/firestore'
import ConfigTabs from '@/components/ConfigTabs.vue'
const user = useAuthUserStore()
const tasktypes = ref()
Expand All @@ -21,6 +22,8 @@ onBeforeMount( async () => {

<template>
<div class="container">
<ConfigTabs activeTab="TaskTypes" class="mb-3"/>

<router-link class="btn btn-sm btn-primary" :to="{name:'TaskType'}">New TaskType</router-link>
<div class="table-responsive-md">
<table class="table table-striped table-hover">
Expand Down
Loading

0 comments on commit cdc1179

Please sign in to comment.