This commit is contained in:
2024-04-01 17:36:31 +02:00
parent c0e0345faa
commit 88bca67745
15 changed files with 87 additions and 62 deletions

View File

@@ -28,7 +28,7 @@ useHead({
}) })
useSeoMeta({ useSeoMeta({
ogSiteName: 'spaces.software', ogSiteName: 'FEDEO',
twitterCard: 'summary_large_image' twitterCard: 'summary_large_image'
}) })

View File

@@ -187,7 +187,7 @@ const updateDocumentAssignment = async () => {
v-if="!documentData.tags.includes('Bild')" v-if="!documentData.tags.includes('Bild')"
/> />
<img <img
class="h-full w-full" class=" w-full"
:src="documentData.url" :src="documentData.url"
alt="" alt=""
v-else v-else

View File

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

View File

@@ -156,7 +156,7 @@ const renderText = (text) => {
<div class="flex items-center gap-3"> <div class="flex items-center gap-3">
<UAvatar <UAvatar
v-if="!item.user" v-if="!item.user"
:src="colorMode.value === 'light' ? '/spaces_hell.svg' : '/spaces.svg' " :src="colorMode.value === 'light' ? '/Logo.png' : '/Logo_Dark.png' "
/> />
<UAvatar <UAvatar
:alt="dataStore.profiles.find(profile => profile.id === item.user).fullName" :alt="dataStore.profiles.find(profile => profile.id === item.user).fullName"

View File

@@ -13,10 +13,6 @@ const items = computed(() => [
label: '', label: '',
disabled: true disabled: true
}], [{ }], [{
label: 'Einstellungen',
icon: 'i-heroicons-cog-8-tooth',
to: '/settings'
}, {
label: 'Suche', label: 'Suche',
icon: 'i-heroicons-command-line', icon: 'i-heroicons-command-line',
shortcuts: [metaSymbol.value, 'K'], shortcuts: [metaSymbol.value, 'K'],
@@ -31,7 +27,7 @@ const items = computed(() => [
}], [{ }], [{
label: 'Webseite', label: 'Webseite',
icon: 'i-heroicons-book-open', icon: 'i-heroicons-book-open',
to: 'https://spaces.software', to: 'https://fedeo.de',
target: '_blank' target: '_blank'
},/* { },/* {
label: 'GitHub repository', label: 'GitHub repository',

View File

@@ -8,10 +8,8 @@ const _useDashboard = () => {
defineShortcuts({ defineShortcuts({
'g-h': () => router.push('/'), 'g-h': () => router.push('/'),
'g-i': () => router.push('/inbox'), 'g-a': () => router.push('/tasks'),
'g-u': () => router.push('/profiles'), '?': () => isHelpSlideoverOpen.value = !isHelpSlideoverOpen.value,
'g-s': () => router.push('/settings'),
'?': () => isHelpSlideoverOpen.value = true,
n: () => isNotificationsSlideoverOpen.value = !isNotificationsSlideoverOpen.value n: () => isNotificationsSlideoverOpen.value = !isNotificationsSlideoverOpen.value
}) })

View File

@@ -174,7 +174,7 @@ const navLinks = [
}, },
] ]
//const activeFeatures = dataStore.tenants.find(dataStore.currentTenant).features
let links = [ let links = [
{ {
@@ -305,7 +305,8 @@ let links = [
label: "Belege", label: "Belege",
to: "/receipts", to: "/receipts",
icon: "i-heroicons-document-text" icon: "i-heroicons-document-text"
},{ },
{
label: "Bank", label: "Bank",
to: "/banking", to: "/banking",
icon: "i-heroicons-document-text" icon: "i-heroicons-document-text"
@@ -482,14 +483,15 @@ const footerLinks = [/*{
</UDashboardLayout> </UDashboardLayout>
<div <div
v-else v-else
class="flex-col mx-auto my-auto mt-10 w-3/4" class="flex flex-col"
> >
<img <UColorModeImage
:src="!isLight ? '/spaces.svg' : '/spaces_hell.svg'" light="/Logo.png"
alt="Logo" dark="/Logo_Dark.png"
class="w-1/3 mx-auto" class="w-1/2 mx-auto my-10"
/> />
<UProgress animation="carousel"/>
<UProgress animation="carousel" class="w-3/4 mx-auto mt-10" />
</div> </div>
</template> </template>

View File

@@ -46,13 +46,13 @@ export default defineNuxtConfig({
icons: ['heroicons','mdi'] icons: ['heroicons','mdi']
}, },
colorMode: { colorMode: {
preference: 'dark' preference: 'system'
}, },
pwa: { pwa: {
manifest: { manifest: {
name: "spaces.software", name: "FEDEO",
short_name: "spaces", short_name: "FEDEO",
description: "spaces.software", description: "FEDEO",
icons: [ icons: [
{ {
src: "/icon.png", src: "/icon.png",

View File

@@ -91,6 +91,15 @@
<p>Konto: {{selectedStatement.account}}</p> <p>Konto: {{selectedStatement.account}}</p>
<p class="text-wrap">Beschreibung: <br>{{selectedStatement.text}}</p> <p class="text-wrap">Beschreibung: <br>{{selectedStatement.text}}</p>
</div> </div>
<UFormGroup>
<USelectMenu
:options="dataStore.createddocuments"
/>
</UFormGroup>
</UCard> </UCard>
</USlideover> </USlideover>

View File

@@ -86,8 +86,8 @@ const onSubmit = async (data) => {
<UCard class="max-w-sm w-full mx-auto mt-5"> <UCard class="max-w-sm w-full mx-auto mt-5">
<UColorModeImage <UColorModeImage
light="/spaces_hell.svg" light="/Logo.png"
dark="/spaces.svg" dark="/Logo_Dark.png"
/> />
<!-- <img <!-- <img

View File

@@ -80,7 +80,7 @@ const mode = ref(route.params.mode || "show")
const itemInfo = ref({ const itemInfo = ref({
name: "", name: "",
customer: 0, customer: 0,
users: [user.value.id] users: [dataStore.activeProfile.id]
}) })
const tags = dataStore.getDocumentTags const tags = dataStore.getDocumentTags
@@ -370,7 +370,9 @@ setupPage()
</UTable> </UTable>
<DocumentList :documents="dataStore.getDocumentsByProjectId(currentItem.id)"/> <DocumentList :documents="dataStore.getDocumentsByProjectId(currentItem.id)"/>
<!--
{{dataStore.getDocumentsByProjectId(currentItem.id)}} {{dataStore.getDocumentsByProjectId(currentItem.id)}}
-->
</div> </div>

View File

@@ -93,6 +93,7 @@
</template> </template>
<template #date-data="{row}"> <template #date-data="{row}">
<span v-if="row.date">{{row.date ? dayjs(row.date).format("DD.MM.YY") : ''}}</span> <span v-if="row.date">{{row.date ? dayjs(row.date).format("DD.MM.YY") : ''}}</span>
<span v-if="row.documentDate">{{row.documentDate ? dayjs(row.documentDate).format("DD.MM.YY") : ''}}</span>
</template> </template>
<template #dueDate-data="{row}"> <template #dueDate-data="{row}">
<span :class="dayjs(row.dueDate).diff(dayjs()) <= 0 ? ['text-rose-500'] : '' ">{{row.dueDate ? dayjs(row.dueDate).format("DD.MM.YY") : ''}}</span> <span :class="dayjs(row.dueDate).diff(dayjs()) <= 0 ? ['text-rose-500'] : '' ">{{row.dueDate ? dayjs(row.dueDate).format("DD.MM.YY") : ''}}</span>
@@ -108,6 +109,9 @@
> >
{{getRowAmount(row) === 0 ? '' : `${String(getRowAmount(row).toFixed(2)).replace('.',',')}`}} {{getRowAmount(row) === 0 ? '' : `${String(getRowAmount(row).toFixed(2)).replace('.',',')}`}}
</div> </div>
<div v-else class="text-right">
{{calculateDocSum(row.rows)}}
</div>
</template> </template>
</UTable> </UTable>
@@ -141,6 +145,11 @@ const templateColumns = [
label: "Status.", label: "Status.",
sortable: true sortable: true
}, },
{
key: "amount",
label: "Betrag",
sortable: true
},
{ {
key: 'partner', key: 'partner',
label: "Kunde / Lieferant", label: "Kunde / Lieferant",
@@ -166,11 +175,6 @@ const templateColumns = [
label: "Fällig:", label: "Fällig:",
sortable: true sortable: true
}, },
{
key: "amount",
label: "Betrag",
sortable: true
},
] ]
const selectedColumns = ref(templateColumns) const selectedColumns = ref(templateColumns)
const columns = computed(() => templateColumns.filter((column) => selectedColumns.value.includes(column))) const columns = computed(() => templateColumns.filter((column) => selectedColumns.value.includes(column)))
@@ -233,6 +237,18 @@ const filteredRows = computed(() => {
}) })
}) })
}) })
const calculateDocSum = (rows) => {
let sum = 0
rows.forEach(row => {
if(row.mode !== "pagebreak") {
sum += row.price * row.quantity * ( row.taxPercent + 100)/100
}
})
return sum.toFixed(2)
}
</script> </script>
<style scoped> <style scoped>

View File

@@ -103,8 +103,8 @@ const configTimeMode = ref("create")
const startTime = async () => { const startTime = async () => {
console.log("started") console.log("started")
timeInfo.value = { timeInfo.value = {
profile: dataStore.getOwnProfile.id, profile: dataStore.activeProfile.id,
start: dayjs().format("HH:mm:ssZ"), start: dayjs().format("HH:mm:ss"),
date: dayjs().format("YYYY-MM-DD"), date: dayjs().format("YYYY-MM-DD"),
tenant: dataStore.currentTenant, tenant: dataStore.currentTenant,
state: "Im Web gestartet" state: "Im Web gestartet"
@@ -120,7 +120,7 @@ const startTime = async () => {
} else if(data) { } else if(data) {
//timeInfo.value = data[0] //timeInfo.value = data[0]
await dataStore.fetchWorkingTimes() await dataStore.fetchWorkingTimes()
runningTimeInfo.value = dataStore.times.find(time => time.profile === dataStore.getOwnProfile.id && !time.end) runningTimeInfo.value = dataStore.times.find(time => time.profile === dataStore.activeProfile.id && !time.end)
} }
} }
@@ -250,12 +250,15 @@ const setState = async (newState) => {
</USelectMenu> </USelectMenu>
</template> </template>
</UDashboardToolbar> </UDashboardToolbar>
<UCard v-if="runningTimeInfo.id" class="m-3"> <div class="mx-3">
<template #header> <UAlert
Gestartete Zeit: v-if="runningTimeInfo.id"
</template> class="my-3"
<p>Start: {{dayjs(runningTimeInfo.start, "HH:mm:ssZ").format("HH:mm")}}</p> title="Laufende Zeit:"
<p>Dauer: {{dayjs().diff(dayjs(runningTimeInfo.start, "HH:mm:ssZ"),'minutes') > 59 ? `${Math.floor(dayjs().diff(dayjs(runningTimeInfo.start, "HH:mm:ssZ"),'minutes') / 60)}:${dayjs().diff(dayjs(runningTimeInfo.start, "HH:mm:ssZ"),'minutes') % 60} h` : dayjs().diff(dayjs(runningTimeInfo.start, "HH:mm:ssZ"),'minutes') + ' min' }}</p> >
<template #description>
<p>Start: {{dayjs(runningTimeInfo.start, "HH:mm:ss").format("HH:mm")}}</p>
<p>Dauer: {{dayjs().diff(dayjs(runningTimeInfo.start, "HH:mm:ss"),'minutes') > 59 ? `${Math.floor(dayjs().diff(dayjs(runningTimeInfo.start, "HH:mm:ss"),'minutes') / 60)}:${dayjs().diff(dayjs(runningTimeInfo.start, "HH:mm:ss"),'minutes') % 60} h` : dayjs().diff(dayjs(runningTimeInfo.start, "HH:mm:ss"),'minutes') + ' min' }}</p>
<UFormGroup <UFormGroup
class="mt-2" class="mt-2"
@@ -265,15 +268,17 @@ const setState = async (newState) => {
v-model="runningTimeInfo.notes" v-model="runningTimeInfo.notes"
/> />
</UFormGroup> </UFormGroup>
<template #footer>
<UButton <UButton
class="mt-3"
@click="stopStartedTime" @click="stopStartedTime"
:disabled="!runningTimeInfo.id" :disabled="!runningTimeInfo.id"
> >
Stop Stop
</UButton> </UButton>
</template> </template>
</UCard> </UAlert>
</div>
<UModal <UModal
v-model="showConfigTimeModal" v-model="showConfigTimeModal"
@@ -319,9 +324,6 @@ const setState = async (newState) => {
/> />
</template> </template>
</UPopover> </UPopover>
<UInput
/>
</UFormGroup> </UFormGroup>
<!-- <UFormGroup <!-- <UFormGroup
label="Start:" label="Start:"

BIN
spaces/public/Logo.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 34 KiB

BIN
spaces/public/Logo_Dark.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 35 KiB