Add snapshot detail view
This commit is contained in:
parent
3a64a11ea8
commit
b59632e0bb
|
|
@ -6,12 +6,15 @@
|
||||||
<span
|
<span
|
||||||
class="snapshot-list-item__date"
|
class="snapshot-list-item__date"
|
||||||
v-html="created" />
|
v-html="created" />
|
||||||
<a class="snapshot-list-item__link">Mit Team teilen</a>
|
<router-link
|
||||||
|
:to="snapshotRoute"
|
||||||
|
class="snapshot-list-item__link">Mit Team teilen</router-link>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import dateformat from '@/helpers/date-format';
|
import dateformat from '@/helpers/date-format';
|
||||||
|
import {SNAPSHOT_DETAIL} from '@/router/module.names';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
props: {
|
props: {
|
||||||
|
|
@ -24,6 +27,14 @@
|
||||||
computed: {
|
computed: {
|
||||||
created() {
|
created() {
|
||||||
return dateformat(this.snapshot.created);
|
return dateformat(this.snapshot.created);
|
||||||
|
},
|
||||||
|
snapshotRoute() {
|
||||||
|
return {
|
||||||
|
name: SNAPSHOT_DETAIL,
|
||||||
|
params: {
|
||||||
|
id: this.snapshot.id
|
||||||
|
}
|
||||||
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -3,3 +3,4 @@ export const MODULE_PAGE = 'module';
|
||||||
export const MODULE_SETTINGS_PAGE = 'module-settings';
|
export const MODULE_SETTINGS_PAGE = 'module-settings';
|
||||||
export const VISIBILITY_PAGE = 'visibility';
|
export const VISIBILITY_PAGE = 'visibility';
|
||||||
export const SNAPSHOT_LIST = 'snapshot-list';
|
export const SNAPSHOT_LIST = 'snapshot-list';
|
||||||
|
export const SNAPSHOT_DETAIL = 'snapshot-detail';
|
||||||
|
|
|
||||||
|
|
@ -2,9 +2,10 @@ import moduleBase from '@/pages/module/module-base';
|
||||||
import module from '@/pages/module/module';
|
import module from '@/pages/module/module';
|
||||||
import submissions from '@/pages/submissions';
|
import submissions from '@/pages/submissions';
|
||||||
import moduleVisibility from '@/pages/module/moduleVisibility';
|
import moduleVisibility from '@/pages/module/moduleVisibility';
|
||||||
import {MODULE_PAGE, MODULE_SETTINGS_PAGE, SUBMISSIONS_PAGE, VISIBILITY_PAGE, SNAPSHOT_LIST} from '@/router/module.names';
|
import {MODULE_PAGE, MODULE_SETTINGS_PAGE, SUBMISSIONS_PAGE, VISIBILITY_PAGE, SNAPSHOT_LIST, SNAPSHOT_DETAIL} from '@/router/module.names';
|
||||||
import settingsPage from '@/pages/module/moduleSettings';
|
import settingsPage from '@/pages/module/moduleSettings';
|
||||||
import snapshots from '@/pages/snapshot/snapshots';
|
import snapshots from '@/pages/snapshot/snapshots';
|
||||||
|
import snapshot from '@/pages/snapshot/snapshot';
|
||||||
|
|
||||||
export default [
|
export default [
|
||||||
{
|
{
|
||||||
|
|
@ -51,6 +52,12 @@ export default [
|
||||||
showSubNavigation: true,
|
showSubNavigation: true,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
path: 'snapshot/:id',
|
||||||
|
component: snapshot,
|
||||||
|
name: SNAPSHOT_DETAIL,
|
||||||
|
props: true
|
||||||
|
}
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue