diff --git a/mock/article.js b/mock/article.js
index bc236eb..e9534c3 100644
--- a/mock/article.js
+++ b/mock/article.js
@@ -1,24 +1,35 @@
import Mock from 'mockjs'
const List = []
-const count = 100
+const count = 10
const baseContent = '
I am testing data, I am testing data.
'
const image_uri = 'https://wpimg.wallstcn.com/e4558086-631c-425c-9430-56ffb46e70b3'
-
+const titles = [
+ 'Special Coffee ☕️☕️☕️',
+ 'VR Experience im Vrei',
+ 'VR Experience im Vrei',
+ 'VR Experience im Vrei',
+ 'VR Experience im Vrei',
+ 'VR Experience im Vrei',
+ 'VR Experience im Vrei',
+ 'VR Experience im Vrei',
+ 'VR Experience im Vrei',
+ 'VR Experience im Vrei'
+]
for (let i = 0; i < count; i++) {
List.push(Mock.mock({
- id: '@increment',
+ id: i * 5 + 5,
timestamp: +Mock.Random.date('T'),
author: '@first',
reviewer: '@first',
- title: '@title(5, 10)',
+ title: titles[i],
content_short: 'mock data',
content: baseContent,
forecast: '@float(0, 100, 2, 2)',
importance: '@integer(1, 3)',
'type|1': ['CN', 'US', 'JP', 'EU'],
- 'status|1': ['published', 'draft', 'deleted'],
+ 'status|1': ['Aktiv', 'Entwurf', 'Gelöscht'],
display_time: '@datetime',
comment_disabled: true,
pageviews: '@integer(300, 5000)',
diff --git a/src/router/index.js b/src/router/index.js
index 6f81131..ba8ce2f 100644
--- a/src/router/index.js
+++ b/src/router/index.js
@@ -120,7 +120,7 @@ export const constantRoutes = [
*/
export const asyncRoutes = [
{
- path: '/find',
+ path: '/', // find
component: Layout,
alwaysShow: false,
children: [
@@ -137,7 +137,7 @@ export const asyncRoutes = [
]
},
{
- path: '/',
+ path: '/dashboard',
component: Layout,
redirect: '/dashboard',
children: [
@@ -161,6 +161,41 @@ export const asyncRoutes = [
}
]
},
+ {
+ path: '/incentives',
+ component: Layout,
+ redirect: '/example/list',
+ name: 'Example Articles',
+ meta: {
+ title: 'Incentives',
+ icon: 'example'
+ },
+ children: [
+ {
+ path: 'create',
+ component: () => import('@/views/incentives/create'),
+ name: 'CreateIncentive',
+ meta: { title: 'Incentive anlegen', icon: 'edit' }
+ },
+ {
+ path: 'list',
+ component: () => import('@/views/incentives/list'),
+ name: 'IncentiveList',
+ meta: { title: 'Incentive Liste', icon: 'list' }
+ },
+ {
+ path: 'edit/:id(\\d+)',
+ component: () => import('@/views/incentives/edit'),
+ name: 'EditIncentive',
+ meta: {
+ title: 'Incentive bearbeiten',
+ noCache: true,
+ activeMenu: '/example/list'
+ },
+ hidden: true
+ }
+ ]
+ },
{
path: '/permission',
component: Layout,
diff --git a/src/views/incentives/components/ArticleDetail.vue b/src/views/incentives/components/ArticleDetail.vue
new file mode 100644
index 0000000..c707ddc
--- /dev/null
+++ b/src/views/incentives/components/ArticleDetail.vue
@@ -0,0 +1,249 @@
+
+
+
+
+
+
+
+
+
+ Aktiv schalten
+
+
+ Entwurf speichern
+
+
+
+
+
+
+
+
+
+ Incentive Titel
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ contentShortLength }}words
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/incentives/components/Dropdown/Comment.vue b/src/views/incentives/components/Dropdown/Comment.vue
new file mode 100644
index 0000000..d34b2b9
--- /dev/null
+++ b/src/views/incentives/components/Dropdown/Comment.vue
@@ -0,0 +1,41 @@
+
+
+
+ {{ !comment_disabled?'Comment: opened':'Comment: closed' }}
+
+
+
+
+
+
+ Close comment
+
+
+ Open comment
+
+
+
+
+
+
+
+
diff --git a/src/views/incentives/components/Dropdown/Platform.vue b/src/views/incentives/components/Dropdown/Platform.vue
new file mode 100644
index 0000000..0a52726
--- /dev/null
+++ b/src/views/incentives/components/Dropdown/Platform.vue
@@ -0,0 +1,46 @@
+
+
+
+ Platfroms({{ platforms.length }})
+
+
+
+
+
+ {{ item.name }}
+
+
+
+
+
+
+
diff --git a/src/views/incentives/components/Dropdown/SourceUrl.vue b/src/views/incentives/components/Dropdown/SourceUrl.vue
new file mode 100644
index 0000000..8f47485
--- /dev/null
+++ b/src/views/incentives/components/Dropdown/SourceUrl.vue
@@ -0,0 +1,38 @@
+
+
+
+ Link
+
+
+
+
+
+
+ URL
+
+
+
+
+
+
+
+
diff --git a/src/views/incentives/components/Dropdown/index.js b/src/views/incentives/components/Dropdown/index.js
new file mode 100644
index 0000000..bc0c171
--- /dev/null
+++ b/src/views/incentives/components/Dropdown/index.js
@@ -0,0 +1,3 @@
+export { default as CommentDropdown } from './Comment'
+export { default as PlatformDropdown } from './Platform'
+export { default as SourceUrlDropdown } from './SourceUrl'
diff --git a/src/views/incentives/components/Warning.vue b/src/views/incentives/components/Warning.vue
new file mode 100644
index 0000000..8d2a7e5
--- /dev/null
+++ b/src/views/incentives/components/Warning.vue
@@ -0,0 +1,13 @@
+
+
+
+
diff --git a/src/views/incentives/create.vue b/src/views/incentives/create.vue
new file mode 100644
index 0000000..f28ce28
--- /dev/null
+++ b/src/views/incentives/create.vue
@@ -0,0 +1,13 @@
+
+
+
+
+
+
diff --git a/src/views/incentives/edit.vue b/src/views/incentives/edit.vue
new file mode 100644
index 0000000..87b6126
--- /dev/null
+++ b/src/views/incentives/edit.vue
@@ -0,0 +1,13 @@
+
+
+
+
+
+
diff --git a/src/views/incentives/list.vue b/src/views/incentives/list.vue
new file mode 100644
index 0000000..7154b3e
--- /dev/null
+++ b/src/views/incentives/list.vue
@@ -0,0 +1,103 @@
+
+
+
+
+
+
+
+ {{ row.title }}
+
+
+
+
+
+
+ {{ scope.row.id }}
+
+
+
+
+
+ {{ scope.row.timestamp | parseTime('{y}-{m}-{d} {h}:{i}') }}
+
+
+
+
+
+ {{ scope.row.author }}
+
+
+
+
+
+
+ {{ row.status }}
+
+
+
+
+
+
+
+
+ Bearbeiten
+
+
+
+
+
+
+
+
+
+
+