Some Changes in Projects

This commit is contained in:
2024-07-10 21:22:24 +02:00
parent f9909a87aa
commit 1e952e008e

View File

@@ -165,7 +165,7 @@ const projectHours = () => {
label: 'Abgeschlossen', label: 'Abgeschlossen',
icon: 'i-heroicons-check' icon: 'i-heroicons-check'
}])*/ }])*/
const phasesTemplateSelected = ref(dataStore.phasesTemplates[0].id) //const phasesTemplateSelected = ref(dataStore.phasesTemplates[0].id)
const changeActivePhase = (phase) => { const changeActivePhase = (phase) => {
itemInfo.value.phases = itemInfo.value.phases.map(p => { itemInfo.value.phases = itemInfo.value.phases.map(p => {
if(p.active) delete p.active if(p.active) delete p.active
@@ -183,10 +183,12 @@ const savePhases = () => {
dataStore.updateItem("projects", itemInfo.value) dataStore.updateItem("projects", itemInfo.value)
} }
/*
const loadPhases = async () => { const loadPhases = async () => {
itemInfo.value.phases = dataStore.phasesTemplates.find(i => i.id === phasesTemplateSelected.value).initialPhases itemInfo.value.phases = dataStore.phasesTemplates.find(i => i.id === phasesTemplateSelected.value).initialPhases
await dataStore.updateItem("projects", itemInfo.value) await dataStore.updateItem("projects", itemInfo.value)
} }
*/
</script> </script>
@@ -277,7 +279,7 @@ const loadPhases = async () => {
label="Vorlage laden" label="Vorlage laden"
v-if="itemInfo.phases.length === 0" v-if="itemInfo.phases.length === 0"
> >
<InputGroup> <!-- <InputGroup>
<USelectMenu <USelectMenu
:options="dataStore.phasesTemplates" :options="dataStore.phasesTemplates"
option-attribute="name" option-attribute="name"
@@ -292,7 +294,8 @@ const loadPhases = async () => {
> >
Vorlage laden Vorlage laden
</UButton> </UButton>
</InputGroup> </InputGroup> TODO: Reactivate-->
</UFormGroup> </UFormGroup>
<UAccordion <UAccordion
@@ -462,7 +465,7 @@ const loadPhases = async () => {
<div v-else-if="item.key === 'material'" class="space-y-3"> <div v-else-if="item.key === 'material'" class="space-y-3">
Auf das Projekt gebuchte Artikel: Auf das Projekt gebuchte Artikel:
<UTable <!-- <UTable
:rows="dataStore.getStocksByProjectId(itemInfo.id)" :rows="dataStore.getStocksByProjectId(itemInfo.id)"
:columns="[{key:'productId',label:'Artikel'},{key:'stock',label:'Anzahl'}]" :columns="[{key:'productId',label:'Artikel'},{key:'stock',label:'Anzahl'}]"
@select="(i) => router.push(`/products/show/${i.productId}`)" @select="(i) => router.push(`/products/show/${i.productId}`)"
@@ -474,7 +477,7 @@ const loadPhases = async () => {
{{dataStore.getProductById(row.productId)}} {{dataStore.getProductById(row.productId)}}
{{row.stock}} {{dataStore.units.find(i => i.id === dataStore.getProductById(row.productId).unit).short}} {{row.stock}} {{dataStore.units.find(i => i.id === dataStore.getProductById(row.productId).unit).short}}
</template> </template>
</UTable> </UTable>-->
</div> </div>
</UCard> </UCard>