Many Changes

This commit is contained in:
2024-07-12 22:05:48 +02:00
parent 1e952e008e
commit d01869fca8
12 changed files with 653 additions and 485 deletions

View File

@@ -15,7 +15,7 @@ export default defineAppConfig({
},
notifications: {
// Show toasts at the top right of the screen
position: 'top-0'
position: 'top-0 bottom-auto'
},
icons: {
/*dark: 'i-ph-moon-duotone',

View File

@@ -43,7 +43,7 @@ useSeoMeta({
<NuxtPage/>
</NuxtLayout>
<!-- <UNotifications v-if="!dev"/>-->
<UNotifications/>
<VitePwaManifest/>

View File

@@ -23,7 +23,6 @@ const fileUploadFormData = ref({
})
const openModal = () => {
console.log("Oepn")
uploadModalOpen.value = true
}
@@ -33,7 +32,7 @@ const uploadFiles = async () => {
let fileData = fileUploadFormData.value
fileData[type] = elementId
await dataStore.uploadF632iles(fileData, document.getElementById("fileUploadInput").files,true)
await dataStore.uploadFiles(fileData, document.getElementById("fileUploadInput").files,true)
uploadModalOpen.value = false;
uploadInProgress.value = false;

View File

@@ -53,7 +53,7 @@ export default defineNuxtConfig({
colorMode: {
preference: 'system'
},
pwa: {
/*pwa: {
manifest: {
name: "FEDEO",
short_name: "FEDEO",
@@ -72,7 +72,7 @@ export default defineNuxtConfig({
enabled: false,
type: "module"
}
},
},*/
tiptap: {
prefix: "Tiptap"
}

1083
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@@ -30,7 +30,7 @@
"@fullcalendar/vue3": "^6.1.10",
"@iconify/json": "^2.2.171",
"@nuxt/content": "^2.9.0",
"@nuxt/ui-pro": "^1.0.0",
"@nuxt/ui-pro": "^1.3.1",
"@nuxtjs/fontaine": "^0.4.1",
"@nuxtjs/google-fonts": "^3.1.0",
"@nuxtjs/strapi": "^1.9.3",

View File

@@ -39,8 +39,10 @@ const oldItemInfo = ref({})
//Functions
const setupPage = async () => {
if(mode.value === "show" || mode.value === "edit"){
if(mode.value === "show"){
itemInfo.value = await useSupabaseSelectSingle("contacts",route.params.id,"*, customer(id, name), vendor(id,name) ")
} else if(mode.value === "edit") {
itemInfo.value = await useSupabaseSelectSingle("contacts",route.params.id,"*")
}
if(mode.value === "create") {

View File

@@ -45,8 +45,10 @@ const oldItemInfo = ref({})
//Functions
const setupPage = async () => {
if(mode.value === "show" || mode.value === "edit"){
if(mode.value === "show"){
itemInfo.value = await useSupabaseSelectSingle("customers",route.params.id,"*, contacts(*)")
} else if(mode.value === "edit") {
itemInfo.value = await useSupabaseSelectSingle("customers",route.params.id,"*")
}
if(itemInfo.value) oldItemInfo.value = JSON.parse(JSON.stringify(itemInfo.value))

View File

@@ -14,6 +14,11 @@
</UDashboardNavbar>
<UDashboardPanelContent>
<UButton
@click="useToast().add({title: 'test'})"
>
Test
</UButton>
<UDashboardCard
title="Anwesenheiten"
v-if="dataStore.getStartedWorkingTimes().length > 0"
@@ -50,6 +55,7 @@ definePageMeta({
})
const dataStore = useDataStore()
const toast = useToast()
const { isNotificationsSlideoverOpen } = useDashboard()
const items = [[{

View File

@@ -105,8 +105,10 @@ const tags = dataStore.getDocumentTags
//Functions
const setupPage = async() => {
if(mode.value === "show" || mode.value === "edit"){
itemInfo.value = await useSupabaseSelectSingle("projects",route.params.id,"*, customer(*), plant(*)")//dataStore.getProjectById(Number(useRoute().params.id))
if(mode.value === "show" ){
itemInfo.value = await useSupabaseSelectSingle("projects",route.params.id,"*, customer(*), plant(*)")
} else if (mode.value === "edit") {
itemInfo.value = await useSupabaseSelectSingle("projects",route.params.id,"*")
}
if(mode.value === "create") {
@@ -166,7 +168,9 @@ const projectHours = () => {
icon: 'i-heroicons-check'
}])*/
//const phasesTemplateSelected = ref(dataStore.phasesTemplates[0].id)
const changeActivePhase = (phase) => {
const changeActivePhase = async (phase) => {
itemInfo.value = await useSupabaseSelectSingle("projects",route.params.id,'*')
itemInfo.value.phases = itemInfo.value.phases.map(p => {
if(p.active) delete p.active
@@ -175,8 +179,8 @@ const changeActivePhase = (phase) => {
return p
})
savePhases()
await savePhases()
setupPage()
}
const savePhases = () => {
@@ -396,6 +400,8 @@ const loadPhases = async () => {
]"
@select="(row) => row.state === 'Entwurf' ? router.push(`/createDocument/edit/${row.id}`) : router.push(`/createDocument/show/${row.id}`)"
:empty-state="{ icon: 'i-heroicons-circle-stack-20-solid', label: 'Keine zugehörigen erstellten Dokumente' }"
>
<template #type-data="{row}">
<span v-if="row.type === 'invoices'">Rechnung</span>

View File

@@ -120,8 +120,6 @@ const selectedItem = ref(0)
const setupPage = async () => {
items.value = await useSupabaseSelect("projects","*, customer (name), plant(name)")
console.log(items.value)
}
setupPage()

View File

@@ -854,8 +854,8 @@ export const useDataStore = defineStore('data', () => {
}
const uploadFiles = async (formData, files, upsert) => {
console.log(files)
console.log(formData)
//console.log(files)
//console.log(formData)
let documentsToInsert = []
const uploadSingleFile = async (file) => {
@@ -886,7 +886,7 @@ export const useDataStore = defineStore('data', () => {
documentsToInsert.push({...formData, path: returnPath, tenant: currentTenant.value})
}
console.log(data)
//console.log(data)
}
//uploadInProgress.value = true
@@ -902,7 +902,7 @@ export const useDataStore = defineStore('data', () => {
}
console.log(documentsToInsert)
//console.log(documentsToInsert)
const {data, error} = await supabase
.from("documents")
@@ -910,7 +910,7 @@ export const useDataStore = defineStore('data', () => {
.select()
if(error) console.log(error)
else {
console.log(data)
//console.log(data)
await fetchDocuments()