This commit is contained in:
2020-04-10 16:45:59 +00:00
parent 70302d0261
commit 94a0fc2ebc
4 changed files with 22 additions and 16 deletions

View File

@@ -56,6 +56,8 @@ todo: RECORD HISTORY
- Defaults to showing most recent stuff first in order to satisfy most common requirement of who last edited - Defaults to showing most recent stuff first in order to satisfy most common requirement of who last edited
- Probably going to need a server route but let the UI drive it (timeline view requirements maybe?) - Probably going to need a server route but let the UI drive it (timeline view requirements maybe?)
todo: do I have too many containers in my UI, like some unnecessary ones in the views where the parent already has a container?
todo: ADDITIONAL EDIT FORM BUTTONS FUNCTIONALITY STUBBED OUT OR MADE INTO TODO'S todo: ADDITIONAL EDIT FORM BUTTONS FUNCTIONALITY STUBBED OUT OR MADE INTO TODO'S
- Check what is in v7 that I missed on edit forms, make TODOs for them here - Check what is in v7 that I missed on edit forms, make TODOs for them here
- Check what is in RAVEN STAGE 1 cases on RockFish and make TODOs for them here - Check what is in RAVEN STAGE 1 cases on RockFish and make TODOs for them here

View File

@@ -35,10 +35,10 @@ const scrollBehavior = function(to, from, savedPosition) {
} }
// eslint-disable-next-line // eslint-disable-next-line
return new Promise((resolve) => { return new Promise(resolve => {
// check if any matched route config has meta that requires scrolling to top // check if any matched route config has meta that requires scrolling to top
// eslint-disable-next-line // eslint-disable-next-line
if (to.matched.some((m) => m.meta.scrollToTop)) { if (to.matched.some(m => m.meta.scrollToTop)) {
// coords will be used if no selector is provided, // coords will be used if no selector is provided,
// or if the selector didn't match any element. // or if the selector didn't match any element.
position.x = 0; position.x = 0;
@@ -449,7 +449,7 @@ export default new Router({
import(/* webpackChunkName: "ay-common" */ "./views/ay-review.vue") import(/* webpackChunkName: "ay-common" */ "./views/ay-review.vue")
}, },
{ {
path: "/history/:ayatype/:recordid", path: "/history/:ayatype/:recordid/:useractions?",
name: "ay-history", name: "ay-history",
component: () => component: () =>
import(/* webpackChunkName: "ay-common" */ "./views/ay-history.vue") import(/* webpackChunkName: "ay-common" */ "./views/ay-history.vue")

View File

@@ -1,13 +1,13 @@
<template> <template>
<UnderConstruction /> <div>WHAT IS THIS FOR?</div>
</template> </template>
<script> <script>
import UnderConstruction from "../components/underconstruction.vue"; import UnderConstruction from "../components/underconstruction.vue";
//NOTE: I don't recall what this is suppo;sed to be fore, there is already a general History view for viewing object history timelines (event log)
export default { export default {
components: { components: {
UnderConstruction //UnderConstruction
}, },
beforeCreate() { beforeCreate() {
window.$gz.eventBus.$emit("menu-change", { window.$gz.eventBus.$emit("menu-change", {

View File

@@ -1,7 +1,13 @@
<template> <template>
<v-row row v-if="this.formState.ready"> <v-row row v-if="this.formState.ready">
<gz-error :errorBoxMessage="formState.errorBoxMessage"></gz-error> <gz-error :errorBoxMessage="formState.errorBoxMessage"></gz-error>
History here <v-col rows="12">
<v-timeline>
<v-timeline-item>timeline item</v-timeline-item>
<v-timeline-item class="text-right">timeline item</v-timeline-item>
<v-timeline-item>timeline item</v-timeline-item>
</v-timeline>
</v-col>
</v-row> </v-row>
</template> </template>
@@ -15,7 +21,6 @@ const API_BASE_URL = "EventLog/";
export default { export default {
created() { created() {
let vm = this; let vm = this;
initForm(vm) initForm(vm)
.then(() => { .then(() => {
vm.formState.ready = true; vm.formState.ready = true;
@@ -31,6 +36,11 @@ export default {
}, },
data() { data() {
return { return {
//path: "/history/:ayatype/:recordid/:useractions?"
ayaType: null,
recordId: 0,
allUserActions: false,
obj: {},
formState: { formState: {
ready: false, ready: false,
loading: true, loading: true,
@@ -41,12 +51,10 @@ export default {
}; };
}, },
methods: { methods: {
getDataFromApi(recordId) { getDataFromApi() {
let vm = this; let vm = this;
vm.formState.loading = true; vm.formState.loading = true;
if (!recordId) { //TODO: URL
throw FORM_KEY + "::getDataFromApi -> Missing recordID!";
}
let url = API_BASE_URL + recordId; let url = API_BASE_URL + recordId;
window.$gz.form.deleteAllErrorBoxErrors(vm); window.$gz.form.deleteAllErrorBoxErrors(vm);
window.$gz.api window.$gz.api
@@ -93,10 +101,6 @@ export default {
} }
}; };
/**
*/
///////////////////////////// /////////////////////////////
// //
// //