diff --git a/web/admin/src/pages/orders/AdminOrderPage.vue b/web/admin/src/pages/orders/AdminOrderPage.vue
index 333c195..ec1d247 100644
--- a/web/admin/src/pages/orders/AdminOrderPage.vue
+++ b/web/admin/src/pages/orders/AdminOrderPage.vue
@@ -60,18 +60,6 @@ const resetShowMessages = () => {
errMessage.value = 'An error occurred'
}
-const deleteItem = async() => {
- resetShowMessages()
- try {
- await deleteDoc(doc(db, 'order', props.id))
- showDeleteMessage.value = true
- router.push({name: 'OrdersListPage'})
- } catch(err) {
- showErrMessage.value = true
- console.error(err)
- }
-}
-
const saveItem = async () => {
resetShowMessages()
try {
@@ -82,21 +70,6 @@ const saveItem = async () => {
showSaveMessage.value = true
} else {
- const q = query(collection(db, 'order'), where('name', '==', item.value.guestname))
- const docs = await getDocs(q)
- if (docs.size > 0) {
- errMessage.value = 'Order with guestname ' + item.value.guestname + ' already exists'
- showErrMessage = true
- return
- }
-
- console.log('saveItem currentForm, enddate', currentForm.value, currentForm.value.enddate)
- if (currentForm.value && currentForm.value.enddate) {
- item.value.enddate = currentForm.value.enddate
- }
-
- const itemRef = await addDoc(collection(db, 'order'), item.value)
- router.push({name: 'OrdersListPage'})
}
} catch(err) {
@@ -156,8 +129,8 @@ onBeforeMount(async() => {
Number in Household: {{ item.numInHousehold }}
Pickup/Delivery: Delivery
- Pickup time: {{ dayjs(item.pickuptime.starttime).format('HH:mm a')}}
- - {{ dayjs(item.pickuptime.endtime).format('HH:mm a')}}
+ Pickup time: {{ item.pickuptime && item.pickuptime.starttime && dayjs(item.pickuptime.starttime).format('HH:mm a')}}
+ - {{ item.pickuptime && item.pickuptime.endtime && dayjs(item.pickuptime.endtime).format('HH:mm a')}}
@@ -167,6 +140,21 @@ onBeforeMount(async() => {
+
+
+
Order Status:
+
+
+
+
+
Items in this order:
@@ -180,9 +168,6 @@ onBeforeMount(async() => {
-
-
-
diff --git a/web/app/src/pages/OrderPage.vue b/web/app/src/pages/OrderPage.vue
index 91aeace..b4a508e 100644
--- a/web/app/src/pages/OrderPage.vue
+++ b/web/app/src/pages/OrderPage.vue
@@ -193,41 +193,36 @@ const saveOrder = async () => {
-
Name
-
{{ order.guestname }}
+
Name: {{ order.guestname }}
+
Phone: {{ order.phone }}
+
Email: {{ order.email }}
-
-
-
-
Phone
-
{{ order.phone }}
-
-
-
-
-
Email
-
{{ order.email }}
+
+
Address:
+ {{ order.street }}
+
{{order.street2}}
+ {{order.city}}, {{order.state}} {{ order.zipcode }}
+
-
-
Address
-
{{ order.street }}
{{ order.street2}}
{{order.city}}, {{ order.state}} {{ order.zipcode }}
+
+ Number in Household: {{ order.numInHousehold }}
-
-
-
-
Number in Household
-
{{ order.numInHousehold }}
+
+ Children: {{ order.numChild }}
+ Adults: {{ order.numAdult }}
+ Seniors: {{ order.numSenior }}
+
-
Number Children, Adults, Seniors
-
{{ order.numChild }}, {{ order.numAdult }}, {{ order.numSenior }}
+
Order Status: {{ order.status || 'new' }}
+
Pick up date: {{ dayjs(currentForm.pickupdate.toDate()).format('ddd MM/DD/YYYY') }}
@@ -278,7 +273,7 @@ const saveOrder = async () => {
-
+