Added Automatic HistoryItems to Events,Customers,Vendors
This commit is contained in:
@@ -11,9 +11,10 @@ const mode = ref(route.params.mode || "show")
|
||||
const itemInfo = ref({
|
||||
resources: []
|
||||
})
|
||||
const oldItemInfo = ref({})
|
||||
|
||||
const resourceToAdd = ref(dataStore.activeProfile.id)
|
||||
const mapResources = () => {
|
||||
/*const mapResources = () => {
|
||||
console.log(itemInfo.value.resources)
|
||||
itemInfo.value.resources.map(resource => {
|
||||
console.log(resource)
|
||||
@@ -22,7 +23,7 @@ const mapResources = () => {
|
||||
type: resource.type
|
||||
}
|
||||
})
|
||||
}
|
||||
}*/
|
||||
|
||||
|
||||
const setupPage = () => {
|
||||
@@ -39,6 +40,7 @@ const setupPage = () => {
|
||||
})
|
||||
}
|
||||
if(route.query.project) itemInfo.value.project = route.query.project
|
||||
if(itemInfo.value.id) oldItemInfo.value = JSON.parse(JSON.stringify(itemInfo.value))
|
||||
|
||||
|
||||
|
||||
@@ -65,7 +67,7 @@ setupPage()
|
||||
Erstellen
|
||||
</UButton>
|
||||
<UButton
|
||||
@click="dataStore.updateItem('events',itemInfo)"
|
||||
@click="dataStore.updateItem('events',itemInfo,oldItemInfo)"
|
||||
v-else-if="mode === 'edit' && route.params.id"
|
||||
>
|
||||
Speichern
|
||||
@@ -92,7 +94,11 @@ setupPage()
|
||||
{{itemInfo}}
|
||||
</div>
|
||||
<div v-if="item.label === 'Logbuch'">
|
||||
|
||||
<HistoryDisplay
|
||||
type="event"
|
||||
v-if="itemInfo"
|
||||
:element-id="itemInfo.id"
|
||||
/>
|
||||
</div>
|
||||
</UCard>
|
||||
</template>
|
||||
|
||||
Reference in New Issue
Block a user