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