Removed Bugs
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -51,7 +51,6 @@ const createMovement = async () => {
|
||||
spaceId: "",
|
||||
quantity: 0
|
||||
}
|
||||
alert("Created")
|
||||
}
|
||||
|
||||
function checkArticle(productId) {
|
||||
|
||||
@@ -38,6 +38,7 @@ const onSubmit = async () => {
|
||||
<UInput
|
||||
v-model="password"
|
||||
type="password"
|
||||
@keyup.enter="onSubmit"
|
||||
/>
|
||||
</UFormGroup>
|
||||
<UButton
|
||||
|
||||
@@ -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 = {}
|
||||
|
||||
|
||||
@@ -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
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user