Added Phases to Projects
This commit is contained in:
@@ -99,7 +99,16 @@ const archiveDocument = () => {
|
||||
:data="documentData.url"
|
||||
class="previewEmbed"
|
||||
type="application/pdf"
|
||||
v-if="!documentData.tags.includes('Bild')"
|
||||
/>
|
||||
<img
|
||||
v-else
|
||||
alt=""
|
||||
:src="documentData.url"
|
||||
/>
|
||||
|
||||
|
||||
|
||||
<UButton
|
||||
@click="openDocument"
|
||||
class="mt-3"
|
||||
@@ -141,6 +150,13 @@ const archiveDocument = () => {
|
||||
class="h-full w-full"
|
||||
:data="documentData.url"
|
||||
type="application/pdf"
|
||||
v-if="!documentData.tags.includes('Bild')"
|
||||
/>
|
||||
<img
|
||||
class="h-full w-full"
|
||||
:src="documentData.url"
|
||||
alt=""
|
||||
v-else
|
||||
/>
|
||||
</UContainer>
|
||||
|
||||
@@ -159,7 +175,11 @@ const archiveDocument = () => {
|
||||
Eingangsrechnung erstellen
|
||||
</UButton>
|
||||
</UButtonGroup>
|
||||
|
||||
<br>
|
||||
<a
|
||||
:href="documentData.url"
|
||||
target="_blank"
|
||||
>In neuen Tab anzeigen</a>
|
||||
|
||||
<UFormGroup
|
||||
label="Tags ändern:"
|
||||
|
||||
@@ -32,7 +32,7 @@ const uploadFiles = async () => {
|
||||
let fileData = fileUploadFormData.value
|
||||
fileData[type] = elementId
|
||||
|
||||
await dataStore.uploadFiles(fileData, document.getElementById("fileUploadInput").files)
|
||||
await dataStore.uploadFiles(fileData, document.getElementById("fileUploadInput").files,true)
|
||||
|
||||
uploadModalOpen.value = false;
|
||||
uploadInProgress.value = false;
|
||||
@@ -40,7 +40,7 @@ const uploadFiles = async () => {
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<UModal
|
||||
<USlideover
|
||||
v-model="uploadModalOpen"
|
||||
>
|
||||
<UCard :ui="{ ring: '', divide: 'divide-y divide-gray-100 dark:divide-gray-800' }">
|
||||
@@ -66,6 +66,7 @@ const uploadFiles = async () => {
|
||||
<UInput
|
||||
type="file"
|
||||
id="fileUploadInput"
|
||||
multiple
|
||||
/>
|
||||
</UFormGroup>
|
||||
<UFormGroup
|
||||
@@ -78,7 +79,12 @@ const uploadFiles = async () => {
|
||||
searchable-placeholder="Suchen..."
|
||||
:options="tags"
|
||||
v-model="fileUploadFormData.tags"
|
||||
/>
|
||||
>
|
||||
<template #label>
|
||||
<span v-if="fileUploadFormData.tags.length > 0">{{fileUploadFormData.tags.join(", ")}}</span>
|
||||
<span v-else>Keine Tags ausgewählt</span>
|
||||
</template>
|
||||
</USelectMenu>
|
||||
</UFormGroup>
|
||||
|
||||
<template #footer>
|
||||
@@ -89,10 +95,11 @@ const uploadFiles = async () => {
|
||||
</template>
|
||||
|
||||
</UCard>
|
||||
</UModal>
|
||||
</USlideover>
|
||||
|
||||
<UButton
|
||||
@click="openModal"
|
||||
icon="i-heroicons-arrow-up-tray"
|
||||
>
|
||||
Hochladen
|
||||
</UButton>
|
||||
|
||||
@@ -10,6 +10,7 @@ const props = defineProps({
|
||||
type: String
|
||||
}
|
||||
})
|
||||
const { metaSymbol } = useShortcuts()
|
||||
const dataStore = useDataStore()
|
||||
const user = useSupabaseUser()
|
||||
const supabase = useSupabaseClient()
|
||||
@@ -34,6 +35,14 @@ const historyItems = computed(() => {
|
||||
items = dataStore.historyItems.filter(i => i.incomingInvoice === elementId)
|
||||
} else if(type === "document") {
|
||||
items = dataStore.historyItems.filter(i => i.document === elementId)
|
||||
} else if(type === "contact") {
|
||||
items = dataStore.historyItems.filter(i => i.contact === elementId)
|
||||
} else if(type === "contract") {
|
||||
items = dataStore.historyItems.filter(i => i.contract === elementId)
|
||||
} else if(type === "inventoryitem") {
|
||||
items = dataStore.historyItems.filter(i => i.inventoryitem === elementId)
|
||||
} else if(type === "product") {
|
||||
items = dataStore.historyItems.filter(i => i.product === elementId)
|
||||
}
|
||||
|
||||
return items
|
||||
@@ -59,6 +68,14 @@ const addHistoryItem = async () => {
|
||||
addHistoryItemData.value.incomingInvoice = elementId
|
||||
} else if(type === "document") {
|
||||
addHistoryItemData.value.document = elementId
|
||||
} else if(type === "contact") {
|
||||
addHistoryItemData.value.contact = elementId
|
||||
} else if(type === "contract") {
|
||||
addHistoryItemData.value.contract = elementId
|
||||
} else if(type === "inventoryitem") {
|
||||
addHistoryItemData.value.inventoryitem = elementId
|
||||
} else if(type === "product") {
|
||||
addHistoryItemData.value.product = elementId
|
||||
}
|
||||
|
||||
|
||||
@@ -102,56 +119,55 @@ const renderText = (text) => {
|
||||
>
|
||||
<UTextarea
|
||||
v-model="addHistoryItemData.text"
|
||||
@keyup.meta.enter="addHistoryItem"
|
||||
/>
|
||||
<!-- <template #help>
|
||||
<UKbd>{{metaSymbol}}</UKbd> <UKbd>Enter</UKbd> Speichern
|
||||
</template>-->
|
||||
|
||||
</UFormGroup>
|
||||
|
||||
|
||||
<template #footer>
|
||||
<UButton @click="addHistoryItem">Hinzufügen</UButton>
|
||||
<UButton @click="addHistoryItem">Speichern</UButton>
|
||||
</template>
|
||||
</UCard>
|
||||
</UModal>
|
||||
<UCard class="mt-5">
|
||||
<template #header>
|
||||
<InputGroup>
|
||||
<UButton
|
||||
@click="showAddHistoryItemModal = true"
|
||||
>
|
||||
+ Eintrag
|
||||
</UButton>
|
||||
</InputGroup>
|
||||
</template>
|
||||
<div
|
||||
v-if="historyItems.length > 0"
|
||||
v-for="(item,index) in historyItems.slice().reverse()
|
||||
"
|
||||
<Toolbar>
|
||||
<UButton
|
||||
@click="showAddHistoryItemModal = true"
|
||||
>
|
||||
<UDivider
|
||||
class="my-3"
|
||||
v-if="index !== 0"
|
||||
+ Eintrag
|
||||
</UButton>
|
||||
</Toolbar>
|
||||
|
||||
<div
|
||||
v-if="historyItems.length > 0"
|
||||
v-for="(item,index) in historyItems.slice().reverse()"
|
||||
>
|
||||
<UDivider
|
||||
class="my-3"
|
||||
v-if="index !== 0"
|
||||
/>
|
||||
<div class="flex items-center gap-3">
|
||||
<UAvatar
|
||||
v-if="!item.user"
|
||||
:src="colorMode.value === 'light' ? '/spaces_hell.svg' : '/spaces.svg' "
|
||||
/>
|
||||
<div class="flex items-center gap-3">
|
||||
<UAvatar
|
||||
v-if="!item.user"
|
||||
:src="colorMode.value === 'light' ? '/spaces_hell.svg' : '/spaces.svg' "
|
||||
/>
|
||||
<UAvatar
|
||||
:alt="dataStore.profiles.find(profile => profile.id === item.user).fullName"
|
||||
v-else
|
||||
/>
|
||||
<div>
|
||||
<h3 v-if="item.user">{{dataStore.getProfileById(item.user) ? dataStore.getProfileById(item.user).fullName : ""}}</h3>
|
||||
<h3 v-else>Spaces Bot</h3>
|
||||
<span v-html="renderText(item.text)"/><br>
|
||||
<span class="text-gray-500">{{dayjs(item.created_at).format("DD.MM.YY HH:mm")}}</span>
|
||||
</div>
|
||||
<UAvatar
|
||||
:alt="dataStore.profiles.find(profile => profile.id === item.user).fullName"
|
||||
v-else
|
||||
/>
|
||||
<div>
|
||||
<h3 v-if="item.user">{{dataStore.getProfileById(item.user) ? dataStore.getProfileById(item.user).fullName : ""}}</h3>
|
||||
<h3 v-else>Spaces Bot</h3>
|
||||
<span v-html="renderText(item.text)"/><br>
|
||||
<span class="text-gray-500">{{dayjs(item.created_at).format("DD.MM.YY HH:mm")}}</span>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</UCard>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
|
||||
14
spaces/components/Toolbar.vue
Normal file
14
spaces/components/Toolbar.vue
Normal file
@@ -0,0 +1,14 @@
|
||||
<script setup lang="ts">
|
||||
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<InputGroup>
|
||||
<slot/>
|
||||
</InputGroup>
|
||||
<UDivider class="my-3"/>
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
||||
Reference in New Issue
Block a user