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> <gz-error :errorBoxMessage="formState.errorBoxMessage"></gz-error>
<v-col rows="12"> <v-col rows="12">
<v-timeline :dense="$vuetify.breakpoint.smAndDown"> <template v-if="$route.params.userlog">
<v-timeline-item <v-timeline :dense="$vuetify.breakpoint.smAndDown">
v-for="i in obj" <v-timeline-item
:key="i.index" v-for="i in obj"
fill-dot :key="i.index"
:color="getIconColorForEvent(i.event)" fill-dot
:icon="getIconForEvent(i.event)" :color="getIconColorForEvent(i.event)"
> :icon="getIconForEvent(i.event)"
<v-card> >
<v-card-title>{{ i.name }}</v-card-title> <v-card>
<v-card-subtitle <v-card-title>{{ i.name }}</v-card-title>
>{{ i.date }} - {{ getEventName(i.event) }}</v-card-subtitle <v-card-subtitle
> >{{ i.date }} - {{ getEventName(i.event) }}</v-card-subtitle
<v-card-text >
><v-icon large class="mr-2">{{ <v-card-text
getIconForObjectType(i.objectType) ><v-icon large class="mr-2">{{
}}</v-icon getIconForObjectType(i.objectType)
>{{ getNameForType(i.objectType) }} }}</v-icon
<div class="mt-4" v-if="i.textra">{{ i.textra }}</div> >{{ getNameForType(i.objectType) }}
</v-card-text> <div class="mt-4" v-if="i.textra">{{ i.textra }}</div>
</v-card-text>
<v-card-actions> <v-card-actions>
<v-btn text @click="openHistoryOfItem(i)">{{ <v-btn text @click="openHistoryOfItem(i)">{{
$ay.t("History") $ay.t("History")
}}</v-btn> }}</v-btn>
<v-btn v-if="canOpen(i.objectType)" text @click="openItem(i)">{{ <v-btn
$ay.t("Open") v-if="canOpen(i.objectType)"
}}</v-btn> text
</v-card-actions> @click="openItem(i)"
</v-card> >{{ $ay.t("Open") }}</v-btn
</v-timeline-item> >
</v-timeline> </v-card-actions>
</v-card>
</v-timeline-item>
</v-timeline>
</template>
<template v-else>ObjectLog </template>
</v-col> </v-col>
<v-col cols="12"> <v-col cols="12">
<v-btn <v-btn
@@ -168,6 +174,12 @@ export default {
//path: "/history/:ayatype/:recordid/:userlog?" //path: "/history/:ayatype/:recordid/:userlog?"
///EventLog/UserLog?UserId=2&Offset=2&Limit=2 ///EventLog/UserLog?UserId=2&Offset=2&Limit=2
///EventLog/ObjectLog?AyType=2&AyId=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) { if (vm.$route.params.userlog) {
url = API_BASE_URL + "UserLog?UserId=" + vm.$route.params.recordid; url = API_BASE_URL + "UserLog?UserId=" + vm.$route.params.recordid;