diff --git a/index.html b/index.html
index a888544..051bf80 100644
--- a/index.html
+++ b/index.html
@@ -4,7 +4,7 @@
-
Vite App
+ Mleczarnia Kuzma
diff --git a/src/components/NavBar.vue b/src/components/NavBar.vue
index 82c4a1f..ffcd469 100644
--- a/src/components/NavBar.vue
+++ b/src/components/NavBar.vue
@@ -2,10 +2,18 @@
import { ref } from 'vue'
import { useSiteControlStore } from '@/stores/siteControl.store'
import { router } from '@/router/router'
+import { useOrdersStore } from '@/stores/orders.store'
+import { useContractorsStore } from '@/stores/contractors.store'
+import { useCategoriesStore } from '@/stores/categories.store'
+import { storeToRefs } from 'pinia'
const activator = ref(false);
const siteControlStore = useSiteControlStore();
+const ordersStore = useOrdersStore();
+const contractorsStore = useContractorsStore();
+const categoriesStore = useCategoriesStore();
+
function makeBurger() {
activator.value = !activator.value
@@ -29,6 +37,19 @@ function clickOrders() {
function routeLogin() {
router.push("/login");
}
+
+function newOrder() {
+ const {order, uuid, deliveryDate, orderDate } = storeToRefs(ordersStore);
+ const { contractor } = storeToRefs(contractorsStore);
+ contractor.value = undefined;
+ order.value = undefined;
+ uuid.value = undefined;
+ deliveryDate.value = undefined;
+ orderDate.value = undefined;
+ categoriesStore.fetchCategories();
+ siteControlStore.switchToFrom();
+ window.scrollTo(0, 0);
+}
@@ -59,6 +80,9 @@ function routeLogin() {
+