Restructuring in Project Page
Added Project Number
This commit is contained in:
@@ -39,10 +39,6 @@ const tabItems = [
|
||||
key: "information",
|
||||
label: "Informationen"
|
||||
},
|
||||
{
|
||||
key: "historyDisplay",
|
||||
label: "Logbuch"
|
||||
},
|
||||
{
|
||||
key: "phases",
|
||||
label: "Phasen"
|
||||
@@ -255,19 +251,17 @@ const loadPhases = async () => {
|
||||
v-model="openTab"
|
||||
>
|
||||
<template #item="{ item }">
|
||||
<div v-if="item.key === 'information'" class="flex flex-row">
|
||||
<div class="w-1/2 mr-3">
|
||||
<UCard class="mt-5">
|
||||
<div v-if="item.key === 'information'">
|
||||
|
||||
|
||||
|
||||
<div class="text-wrap">
|
||||
<p>Kunde: <nuxt-link :to="`/customers/show/${itemInfo.customer.id}`">{{itemInfo.customer.name}}</nuxt-link></p>
|
||||
<p>Objekt: <nuxt-link v-if="itemInfo.plant" :to="`/plants/show/${itemInfo.plant.id}`">{{itemInfo.plant ? itemInfo.plant.name : ""}}</nuxt-link><span v-else>-</span></p>
|
||||
<p class="">Notizen: {{itemInfo.notes}}</p>
|
||||
</div>
|
||||
|
||||
<UDivider class="my-3"/>
|
||||
<h1 class="font-bold text-lg my-3">Beteiligte Benutzer:</h1>
|
||||
</UCard>
|
||||
<UCard class="mt-3">
|
||||
<h1 class="font-bold text-lg mb-3">Beteiligte Benutzer:</h1>
|
||||
<UAlert
|
||||
v-for="projectUser in itemInfo.users"
|
||||
:avatar="{ alt: dataStore.getProfileById(projectUser).fullName }"
|
||||
@@ -275,15 +269,24 @@ const loadPhases = async () => {
|
||||
class="mb-3"
|
||||
|
||||
/>
|
||||
</UCard>
|
||||
</div>
|
||||
<div v-else-if="item.key === 'historyDisplay'">
|
||||
<div class="w-1/2">
|
||||
<UCard class="mt-5">
|
||||
<HistoryDisplay
|
||||
type="project"
|
||||
v-if="itemInfo"
|
||||
:element-id="itemInfo.id"
|
||||
render-headline
|
||||
/>
|
||||
</UCard>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
<div v-if="item.key === 'phases'" class="space-y-3">
|
||||
<UCard class="mt-5">
|
||||
<UFormGroup
|
||||
label="Vorlage laden"
|
||||
v-if="itemInfo.phases.length === 0"
|
||||
@@ -345,8 +348,10 @@ const loadPhases = async () => {
|
||||
</InputGroup>
|
||||
</template>
|
||||
</UAccordion>
|
||||
</UCard>
|
||||
</div>
|
||||
<!--<div v-if="item.key === 'tasks'" class="space-y-3">
|
||||
<div v-if="item.key === 'tasks'" class="space-y-3">
|
||||
<UCard class="mt-5">
|
||||
<Toolbar>
|
||||
<UButton
|
||||
@click="router.push(`/tasks/create?project=${itemInfo.id}`)"
|
||||
@@ -366,23 +371,22 @@ const loadPhases = async () => {
|
||||
{{dataStore.profiles.find(i => i.id === row.user) ? dataStore.profiles.find(i => i.id === row.user).fullName : ""}}
|
||||
</template>
|
||||
</UTable>
|
||||
</UCard>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
<div v-else-if="item.key === 'documents'" class="space-y-3">
|
||||
<UCard class="mt-5">
|
||||
<Toolbar>
|
||||
<DocumentUpload
|
||||
type="project"
|
||||
:element-id="itemInfo.id"
|
||||
/>
|
||||
<UButton
|
||||
@click="router.push(`/createDocument/edit?project=${itemInfo.id}&type=quotes&customer=${itemInfo.customer.id}`)"
|
||||
@click="router.push(`/createDocument/edit?project=${itemInfo.id}&customer=${itemInfo.customer.id}`)"
|
||||
>
|
||||
+ Angebot
|
||||
</UButton>
|
||||
<UButton
|
||||
@click="router.push(`/createDocument/edit?project=${itemInfo.id}&type=invoices&customer=${itemInfo.customer.id}`)"
|
||||
>
|
||||
+ Rechnung
|
||||
+ Dokument
|
||||
</UButton>
|
||||
</Toolbar>
|
||||
|
||||
@@ -419,12 +423,14 @@ const loadPhases = async () => {
|
||||
</UTable>
|
||||
|
||||
<DocumentList :documents="dataStore.getDocumentsByProjectId(itemInfo.id)"/>
|
||||
<!–
|
||||
{{dataStore.getDocumentsByProjectId(itemInfo.id)}}
|
||||
–>
|
||||
</UCard>
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
<div v-else-if="item.key === 'timetracking'" class="space-y-3">
|
||||
<UCard class="mt-5">
|
||||
Projekt Zeit: {{String(projectHours()).replace(".",",")}} Stunden
|
||||
<UTable
|
||||
:rows="dataStore.getTimesByProjectId(itemInfo.id)"
|
||||
@@ -445,8 +451,12 @@ const loadPhases = async () => {
|
||||
</template>
|
||||
|
||||
</UTable>
|
||||
</UCard>
|
||||
|
||||
|
||||
</div>
|
||||
<div v-else-if="item.key === 'events'" class="space-y-3">
|
||||
<UCard class="mt-5">
|
||||
<Toolbar>
|
||||
<UButton
|
||||
@click="router.push(`/events/edit`)"
|
||||
@@ -470,12 +480,13 @@ const loadPhases = async () => {
|
||||
{{row.resources.map(i => i.title).join(", ")}}
|
||||
</template>
|
||||
</UTable>
|
||||
|
||||
</UCard>
|
||||
</div>
|
||||
<div v-else-if="item.key === 'material'" class="space-y-3">
|
||||
<UCard class="mt-5">
|
||||
Auf das Projekt gebuchte Artikel:
|
||||
|
||||
<!– <UTable
|
||||
<!-- <UTable
|
||||
:rows="dataStore.getStocksByProjectId(itemInfo.id)"
|
||||
:columns="[{key:'productId',label:'Artikel'},{key:'stock',label:'Anzahl'}]"
|
||||
@select="(i) => router.push(`/products/show/${i.productId}`)"
|
||||
@@ -487,10 +498,10 @@ const loadPhases = async () => {
|
||||
{{dataStore.getProductById(row.productId)}}
|
||||
{{row.stock}} {{dataStore.units.find(i => i.id === dataStore.getProductById(row.productId).unit).short}}
|
||||
</template>
|
||||
</UTable>–>
|
||||
|
||||
</div>-->
|
||||
</UTable>-->
|
||||
</UCard>
|
||||
</div>
|
||||
|
||||
</template>
|
||||
|
||||
|
||||
@@ -505,6 +516,15 @@ const loadPhases = async () => {
|
||||
/>
|
||||
</UFormGroup>
|
||||
|
||||
<UFormGroup
|
||||
label="Projektnummer:"
|
||||
>
|
||||
<UInput
|
||||
v-model="itemInfo.projectNumber"
|
||||
placeholder="Leer lassen für automatisch generierte Nummer"
|
||||
/>
|
||||
</UFormGroup>
|
||||
|
||||
<UFormGroup
|
||||
label="Kundennummer:"
|
||||
>
|
||||
|
||||
@@ -119,12 +119,16 @@ const items = ref([])
|
||||
const selectedItem = ref(0)
|
||||
|
||||
const setupPage = async () => {
|
||||
items.value = await useSupabaseSelect("projects","*, customer (name), plant(name)")
|
||||
items.value = await useSupabaseSelect("projects","*, customer (name), plant(name)","projectNumber")
|
||||
}
|
||||
|
||||
setupPage()
|
||||
|
||||
const templateColumns = [
|
||||
{
|
||||
key: "projectNumber",
|
||||
label: "Projektnummer"
|
||||
},
|
||||
{
|
||||
key: "phase",
|
||||
label: "Phase"
|
||||
|
||||
@@ -29,6 +29,9 @@ const resources = {
|
||||
},
|
||||
inventoryitems: {
|
||||
label: "Inventarartikel"
|
||||
},
|
||||
projects: {
|
||||
label: "Projekte"
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user