Removed Bugs

This commit is contained in:
2023-11-28 08:13:21 +01:00
parent 7cc942b42f
commit ff966418b2
9 changed files with 106 additions and 13 deletions

View File

@@ -73,7 +73,7 @@ const supabase = useSupabaseClient()
//const {find,create} = useStrapi4()
//const customers = (await find('customers',{populate: "*"})).data
const customers = (await supabase.from("customers").select()).data
const customers = (await supabase.from("customers").select().order('customerNumber', {ascending: true})).data

View File

@@ -51,7 +51,6 @@ const createMovement = async () => {
spaceId: "",
quantity: 0
}
alert("Created")
}
function checkArticle(productId) {

View File

@@ -38,6 +38,7 @@ const onSubmit = async () => {
<UInput
v-model="password"
type="password"
@keyup.enter="onSubmit"
/>
</UFormGroup>
<UButton

View File

@@ -26,8 +26,11 @@
<UFormGroup
label="Einheit:"
>
<UInput
v-model="createProductData.unit"
<USelectMenu
v-model="createProductData.unit"
:options="units"
value-attribute="id"
option-attribute="name"
/>
</UFormGroup>
@@ -124,9 +127,8 @@ definePageMeta({
const supabase = useSupabaseClient()
const products = (await supabase.from("products").select()).data
const units = (await supabase.from("units").select()).data
const showCreateProduct = ref(false)
const createProductData = ref({})
@@ -150,7 +152,15 @@ const selectItem = (item) => {
}
const createProduct = async () => {
await create('products', createProductData.value)
//await create('products', createProductData.value)
const {data,error} = await supabase
.from("products")
.insert([createProductData.value])
.select()
console.log(error)
showCreateProduct.value = false
createProductData.value = {}

View File

@@ -227,12 +227,13 @@ const createTask = async () => {
const updateTask = async () => {
//await update('tasks', taskData.value.id, taskData.value)
console.log(taskData.value)
const {data,error} = await supabase
.from("tasks")
.update([taskData.value])
.update({categorie: taskData.value.categorie})
.eq('id',taskData.value.id)
.select()
console.log(data)
console.log(error)
}
@@ -248,9 +249,14 @@ const filterTasks = () => {
}
const finishTask = () => {
taskData.value.categorie = "Erledigt"
updateTask()
const finishTask = async () => {
console.log("Start")
const {error} = await supabase
.from("tasks")
.update({categorie: "Erledigt"})
.eq('id',taskData.value.id)
//console.log(data)
console.log(error)
showTaskModal.value = false
}