Added DayJS
Restructured Products Some Changes in Documents Some Changes with Logo
This commit is contained in:
@@ -74,14 +74,14 @@
|
||||
fullscreen
|
||||
>
|
||||
<UCard class="h-full">
|
||||
{{selectedDocument}}
|
||||
<!-- <embed
|
||||
<embed
|
||||
class="bigPreview mb-3"
|
||||
:src="selectedDocument.url"
|
||||
/>-->
|
||||
/>
|
||||
|
||||
<UBadge
|
||||
v-for="tag in selectedDocument.tags"
|
||||
class="ml-2"
|
||||
>
|
||||
{{tag}}
|
||||
</UBadge>
|
||||
@@ -98,6 +98,17 @@
|
||||
/>
|
||||
</UFormGroup>
|
||||
|
||||
<UFormGroup
|
||||
label="Tags ändern:"
|
||||
>
|
||||
<USelectMenu
|
||||
:options="tags"
|
||||
v-model="selectedDocument.tags"
|
||||
@change="updateDocument"
|
||||
multiple
|
||||
/>
|
||||
</UFormGroup>
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -169,8 +180,12 @@ definePageMeta({
|
||||
})
|
||||
const supabase = useSupabaseClient()
|
||||
const user = useSupabaseUser()
|
||||
const toast = useToast()
|
||||
|
||||
const {documents} = storeToRefs(useDataStore())
|
||||
const {fetchDocuments} = useDataStore()
|
||||
|
||||
fetchDocuments()
|
||||
|
||||
const tabOpen = ref(0)
|
||||
const uploadModalOpen = ref(false)
|
||||
@@ -183,7 +198,7 @@ const fileUploadFormData = ref({
|
||||
|
||||
const selectedDocuments = ref([])
|
||||
|
||||
let tags = ["Eingangsrechnung","Ausgangrechnung","Mahnung", "Dokument"]
|
||||
let tags = ["Eingangsrechnung","Ausgangrechnung","Mahnung", "Dokument", "E-Mail Anhang"]
|
||||
const folders = [
|
||||
{
|
||||
label: "Eingang",
|
||||
@@ -237,7 +252,29 @@ const uploadFile = async () => {
|
||||
uploadModalOpen.value = false;
|
||||
}
|
||||
|
||||
const updateDocument = async () => {
|
||||
console.log(selectedDocument.value)
|
||||
|
||||
let objData = selectedDocument.value
|
||||
delete objData.url
|
||||
|
||||
const {data,error} = await supabase
|
||||
.from("documents")
|
||||
.update(objData)
|
||||
.eq('id',objData.id)
|
||||
.select()
|
||||
console.log(data)
|
||||
|
||||
if(error) {
|
||||
console.log(error)
|
||||
} else {
|
||||
toast.add({title: "Dokument aktualisiert"})
|
||||
selectedDocument.value = data[0]
|
||||
showDocumentModal.value = false
|
||||
fetchDocuments()
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
const changeFolder = async () => {
|
||||
console.log("Change Folder")
|
||||
|
||||
Reference in New Issue
Block a user