diff --git a/src/components/CreateRestaurantModal.vue b/src/components/CreateRestaurantModal.vue
index aab53b3..d46f08a 100644
--- a/src/components/CreateRestaurantModal.vue
+++ b/src/components/CreateRestaurantModal.vue
@@ -18,6 +18,10 @@ const { errors, handleSubmit, defineField, resetForm } = useForm({
name: yup.string().required("This field is required."),
tags: yup.array().of(yup.string()),
price: yup.string().required("This field is required."),
+ googleMapsLink: yup
+ .string()
+ .trim()
+ .matches(/^$|https:\/\/maps\.app\.goo\.gl\/[a-zA-Z0-9]+/, "Not a valid Google Maps link."),
})
),
});
@@ -39,6 +43,7 @@ const submit = handleSubmit((values) => {
tags: tags,
latitude: position.value?.lat,
longitude: position.value?.lng,
+ googleMapsLink: values.googleMapsLink,
});
emit("succeeded", `Restaurant ${values.name} created successfully!`);
@@ -65,6 +70,7 @@ onMounted(async () => {
const [name, nameAttrs] = defineField("name");
const [tags, tagsAttrs] = defineField("tags");
const [price, priceAttrs] = defineField("price");
+const [googleMapsLink, googleMapsLinkAttrs] = defineField("googleMapsLink");
const emit = defineEmits({
succeeded: (message: string) => true,
@@ -138,12 +144,25 @@ defineExpose({ show, hide, setRestaurantPosition });
v-bind="priceAttrs"
>
-
-
+
+
+
+
+
+
+
+
+
+
diff --git a/src/components/RestaurantsTable.vue b/src/components/RestaurantsTable.vue
index 3cb9fc7..659923a 100644
--- a/src/components/RestaurantsTable.vue
+++ b/src/components/RestaurantsTable.vue
@@ -23,6 +23,7 @@ const columns = [
_: "[, ]",
},
},
+ { data: "price", title: "Price" },
{ data: "average_rating", title: "" },
];
@@ -39,7 +40,7 @@ function deselectAll() {
}
const emit = defineEmits({
- restaurantSelected: (restaurant: Object) => true,
+ restaurantSelected: (restaurant: Restaurant) => true,
restaurantHovered: (restaurant: Object | null) => true,
});
@@ -92,7 +93,7 @@ defineExpose({ deselectAll });
}"
@select="onRowSelected"
>
-
+
Restaurant },
});
const opened = ref(false);
@@ -49,11 +50,22 @@ defineExpose({ open, close });
-
+
-
-
+
+
+
New to DOXFOOD ? Create an account !