This commit is contained in:
2020-04-13 16:14:28 +00:00
parent 8ac3ceb604
commit 015905c74d

View File

@@ -8,38 +8,44 @@
<gz-error :errorBoxMessage="formState.errorBoxMessage"></gz-error>
<v-col rows="12">
<v-timeline :dense="$vuetify.breakpoint.smAndDown">
<v-timeline-item
v-for="i in obj"
:key="i.index"
fill-dot
:color="getIconColorForEvent(i.event)"
:icon="getIconForEvent(i.event)"
>
<v-card>
<v-card-title>{{ i.name }}</v-card-title>
<v-card-subtitle
>{{ i.date }} - {{ getEventName(i.event) }}</v-card-subtitle
>
<v-card-text
><v-icon large class="mr-2">{{
getIconForObjectType(i.objectType)
}}</v-icon
>{{ getNameForType(i.objectType) }}
<div class="mt-4" v-if="i.textra">{{ i.textra }}</div>
</v-card-text>
<template v-if="$route.params.userlog">
<v-timeline :dense="$vuetify.breakpoint.smAndDown">
<v-timeline-item
v-for="i in obj"
:key="i.index"
fill-dot
:color="getIconColorForEvent(i.event)"
:icon="getIconForEvent(i.event)"
>
<v-card>
<v-card-title>{{ i.name }}</v-card-title>
<v-card-subtitle
>{{ i.date }} - {{ getEventName(i.event) }}</v-card-subtitle
>
<v-card-text
><v-icon large class="mr-2">{{
getIconForObjectType(i.objectType)
}}</v-icon
>{{ getNameForType(i.objectType) }}
<div class="mt-4" v-if="i.textra">{{ i.textra }}</div>
</v-card-text>
<v-card-actions>
<v-btn text @click="openHistoryOfItem(i)">{{
$ay.t("History")
}}</v-btn>
<v-btn v-if="canOpen(i.objectType)" text @click="openItem(i)">{{
$ay.t("Open")
}}</v-btn>
</v-card-actions>
</v-card>
</v-timeline-item>
</v-timeline>
<v-card-actions>
<v-btn text @click="openHistoryOfItem(i)">{{
$ay.t("History")
}}</v-btn>
<v-btn
v-if="canOpen(i.objectType)"
text
@click="openItem(i)"
>{{ $ay.t("Open") }}</v-btn
>
</v-card-actions>
</v-card>
</v-timeline-item>
</v-timeline>
</template>
<template v-else>ObjectLog </template>
</v-col>
<v-col cols="12">
<v-btn
@@ -168,6 +174,12 @@ export default {
//path: "/history/:ayatype/:recordid/:userlog?"
///EventLog/UserLog?UserId=2&Offset=2&Limit=2
///EventLog/ObjectLog?AyType=2&AyId=2&Offset=2&Limit=2
/*
{"data":{"name":"Handcrafted Frozen Bacon 125","events":[{"date":"2020-04-11T20:39:52.238532Z","userId":1,"name":"AyaNova Administrator","event":1,"textra":null}]},"readOnly":true}
{"JSON":{"data":{"name":"AyaNova Administrator","events":[{"date":"2020-04-11T20:39:52.238532Z","objectType":2,"objectId":100,"name":"Handcrafted Frozen Bacon 125","event":1,"textra":null},
*/
if (vm.$route.params.userlog) {
url = API_BASE_URL + "UserLog?UserId=" + vm.$route.params.recordid;