This commit is contained in:
2020-04-11 16:22:55 +00:00
parent c765272761
commit 84cedd7564
3 changed files with 53 additions and 40 deletions

View File

@@ -65,7 +65,7 @@ todo: RECORD HISTORY (HAS OUTSTANDING ITEMS)
- make a todo entry in the report section below to include the ability of feeding reports from local data in addition to off the server
- Does it benefit from caching? (not really thinking so as this is a different animal than search but something to ponder a bit)
todo: can page titles be improved so in task bar can see what is being worked with in that browser window
todo: Translate all ayatypes not translated

View File

@@ -14,6 +14,9 @@ export default {
vm.appBar.icon = ctx.icon;
vm.appBar.title = ctx.title;
//test
document.title = "AyaNova " + ctx.title;
//Parse the formdata if present
//FORMDATA is OPTIONAL and only required for forms that need to allow
//viewing object history, attachments, custom fields, etc that kind of thing

View File

@@ -1,42 +1,49 @@
<template>
<v-row row v-if="this.formState.ready">
<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
><v-icon class="mr-4">{{
getIconForObjectType(i.objectType)
}}</v-icon
><span class="mr-4"></span><span>{{ i.name }}</span></v-card-title
>
<v-card-subtitle>{{
getNameForType(i.objectType)
}}</v-card-subtitle>
<v-card-text>
<div>{{ i.date }} - {{ getEventName(i.event) }}</div>
<div v-if="i.textra">{{ i.textra }}</div>
</v-card-text>
<v-card>
<v-card-title
><v-icon class="mr-3">fa-user-tie</v-icon> administrator
</v-card-title>
<v-row row v-if="this.formState.ready">
<gz-error :errorBoxMessage="formState.errorBoxMessage"></gz-error>
<v-card-actions>
<v-btn text>{{ $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-col>
<div>{{ obj }}</div>
</v-row>
<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
><v-icon class="mr-4">{{
getIconForObjectType(i.objectType)
}}</v-icon
><span class="mr-4"></span
><span>{{ i.name }}</span></v-card-title
>
<v-card-subtitle>{{
getNameForType(i.objectType)
}}</v-card-subtitle>
<v-card-text>
<div>{{ i.date }} - {{ getEventName(i.event) }}</div>
<div v-if="i.textra">{{ i.textra }}</div>
</v-card-text>
<v-card-actions>
<v-btn text>{{ $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-col>
<div>{{ obj }}</div>
</v-row>
</v-card>
</template>
<script>
@@ -66,6 +73,7 @@ export default {
data() {
return {
obj: [],
name: null,
eventTypes: {},
ayaTypes: {},
lastOffset: 0,
@@ -164,7 +172,8 @@ export default {
window.$gz.form.setErrorBoxErrors(vm);
} else {
//TODO: PAGING update last offset
let temp = res.data;
vm.name = res.data.name;
let temp = res.data.events;
let timeZoneName = window.$gz.locale.getBrowserTimeZoneName();
let languageName = window.$gz.locale.getBrowserLanguages();
let hour12 = window.$gz.store.state.locale.hour12;
@@ -192,7 +201,7 @@ export default {
readOnly: res.readOnly ? true : false
});
//modify the menu as necessary
generateMenu(vm);
// generateMenu(vm);
}
})
.catch(function handleGetDataFromAPIError(error) {
@@ -237,6 +246,7 @@ function generateMenu(vm) {
helpUrl: "form-ay-history",
menuItems: []
};
window.$gz.eventBus.$emit("menu-change", menuOptions);
}
/////////////////////////////////
//