Added Phases to Projects
This commit is contained in:
@@ -19,10 +19,12 @@ let currentItem = ref(null)
|
||||
//Working
|
||||
const mode = ref(route.params.mode || "show")
|
||||
const itemInfo = ref({
|
||||
id: null,
|
||||
name: "",
|
||||
licensePlate: "",
|
||||
type: "",
|
||||
driver: null
|
||||
driver: null,
|
||||
active: true
|
||||
})
|
||||
|
||||
const tabItems = [{
|
||||
@@ -76,13 +78,12 @@ const editCustomer = async () => {
|
||||
}
|
||||
|
||||
const cancelEditorCreate = () => {
|
||||
mode.value = "show"
|
||||
itemInfo.value = {
|
||||
id: 0,
|
||||
name: "",
|
||||
licensePlate: "",
|
||||
type: ""
|
||||
if(currentItem.value) {
|
||||
router.push(`/vehicles/show/${currentItem.value.id}`)
|
||||
} else {
|
||||
router.push(`/vehicles`)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
const updateItem = async () => {
|
||||
@@ -135,6 +136,13 @@ setupPage()
|
||||
<UTabs :items="tabItems">
|
||||
<template #item="{item}">
|
||||
<div v-if="item.label === 'Informationen'">
|
||||
<InputGroup class="mb-3">
|
||||
<UButton
|
||||
@click="editCustomer"
|
||||
>
|
||||
Bearbeiten
|
||||
</UButton>
|
||||
</InputGroup>
|
||||
Typ: {{currentItem.type}} <br>
|
||||
Fahrer: {{dataStore.profiles.find(profile => profile.id === currentItem.driver) ? dataStore.profiles.find(profile => profile.id === currentItem.driver).fullName : 'Kein Fahrer gewählt'}} <br>
|
||||
</div>
|
||||
@@ -175,22 +183,7 @@ setupPage()
|
||||
|
||||
|
||||
|
||||
<template #footer>
|
||||
<UButton
|
||||
v-if="mode == 'show' && currentItem.id"
|
||||
@click="editCustomer"
|
||||
>
|
||||
Bearbeiten
|
||||
</UButton>
|
||||
<UButton
|
||||
color="red"
|
||||
class="ml-2"
|
||||
disabled
|
||||
>
|
||||
Archivieren
|
||||
</UButton>
|
||||
<!-- TODO: Fahrzeug archivieren -->
|
||||
</template>
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -229,7 +222,7 @@ setupPage()
|
||||
>
|
||||
<USelectMenu
|
||||
v-model="itemInfo.driver"
|
||||
:options="dataStore.profiles"
|
||||
:options="[{id: null, fullName: 'Kein Fahrer'},...dataStore.profiles]"
|
||||
option-attribute="fullName"
|
||||
value-attribute="id"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user