Form validation, navbar improvements, logout functionality, order cancelling
This commit is contained in:
@@ -4,6 +4,7 @@ import { useOrdersStore } from '@/stores/orders.store'
|
||||
import { storeToRefs } from 'pinia'
|
||||
import { useCategoriesStore } from '@/stores/categories.store'
|
||||
import { useContractorsStore } from '@/stores/contractors.store'
|
||||
import { axiosInstance } from '@/main'
|
||||
|
||||
const ordersStore = useOrdersStore();
|
||||
const categoriesStore = useCategoriesStore();
|
||||
@@ -17,6 +18,7 @@ const { contractor } = storeToRefs(contractorsStore);
|
||||
|
||||
function cancelOrder(event: Event) {
|
||||
event.preventDefault();
|
||||
axiosInstance.delete('/zamowienie/' + uuid.value);
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -61,7 +63,7 @@ function cancelOrder(event: Event) {
|
||||
hide-input-icon/>
|
||||
</div>
|
||||
</div>
|
||||
<button class="button is-primary" @click="cancelOrder">Anuluj zamówienie</button>
|
||||
<button class="button is-danger" @click="cancelOrder">Anuluj zamówienie</button>
|
||||
</div>
|
||||
</div>
|
||||
<div v-for="category in categories" :key="category.Kod">
|
||||
|
||||
Reference in New Issue
Block a user