diff --git a/app/javascript/dashboard/i18n/locale/en/helpCenter.json b/app/javascript/dashboard/i18n/locale/en/helpCenter.json
index 278558db0..9fe1ed65c 100644
--- a/app/javascript/dashboard/i18n/locale/en/helpCenter.json
+++ b/app/javascript/dashboard/i18n/locale/en/helpCenter.json
@@ -9,6 +9,12 @@
"PUBLISHED": "Published",
"DRAFT": "Draft",
"ARCHIVED": "Archived"
+ },
+ "TITLES": {
+ "ALL_ARTICLES": "All Articles",
+ "MINE": "My Articles",
+ "DRAFT": "Draft Articles",
+ "ARCHIVED": "Archived Articles"
}
},
"EDIT_HEADER": {
@@ -21,6 +27,9 @@
"SAVED": "Draft saved"
},
"TABLE": {
+ "LOADING_MESSAGE": "Loading articles...",
+ "404": "No articles matches your search 🔍",
+ "NO_ARTICLES": "There are no available articles",
"HEADERS": {
"TITLE": "Title",
"CATEGORY": "Category",
diff --git a/app/javascript/dashboard/components/helpCenter/ArticleItem.vue b/app/javascript/dashboard/routes/dashboard/helpcenter/components/ArticleItem.vue
similarity index 100%
rename from app/javascript/dashboard/components/helpCenter/ArticleItem.vue
rename to app/javascript/dashboard/routes/dashboard/helpcenter/components/ArticleItem.vue
diff --git a/app/javascript/dashboard/components/helpCenter/ArticleTable.vue b/app/javascript/dashboard/routes/dashboard/helpcenter/components/ArticleTable.vue
similarity index 99%
rename from app/javascript/dashboard/components/helpCenter/ArticleTable.vue
rename to app/javascript/dashboard/routes/dashboard/helpcenter/components/ArticleTable.vue
index b6b0f34fe..6d397c92e 100644
--- a/app/javascript/dashboard/components/helpCenter/ArticleTable.vue
+++ b/app/javascript/dashboard/routes/dashboard/helpcenter/components/ArticleTable.vue
@@ -79,6 +79,7 @@ export default {
}
.footer {
padding: 0;
+ border: 0;
}
}
diff --git a/app/javascript/dashboard/routes/dashboard/helpcenter/components/HelpCenterLayout.vue b/app/javascript/dashboard/routes/dashboard/helpcenter/components/HelpCenterLayout.vue
index 3095af8c2..99ef53fcb 100644
--- a/app/javascript/dashboard/routes/dashboard/helpcenter/components/HelpCenterLayout.vue
+++ b/app/javascript/dashboard/routes/dashboard/helpcenter/components/HelpCenterLayout.vue
@@ -6,8 +6,6 @@
@open-key-shortcut-modal="toggleKeyShortcutModal"
@close-key-shortcut-modal="closeKeyShortcutModal"
/>
-
-
-
-
@@ -61,24 +57,23 @@ export default {
...mapGetters({
accountId: 'getCurrentAccountId',
}),
- // For testing
accessibleMenuItems() {
return [
{
icon: 'book',
label: 'HELP_CENTER.ALL_ARTICLES',
- key: 'helpcenter_all',
+ key: 'list_all_locale_articles',
count: 199,
toState: frontendURL(
`accounts/${this.accountId}/portals/:portalSlug/:locale/articles`
),
toolTip: 'All Articles',
- toStateName: 'all_locale_articles',
+ toStateName: 'list_all_locale_articles',
},
{
icon: 'pen',
label: 'HELP_CENTER.MY_ARTICLES',
- key: 'helpcenter_mine',
+ key: 'mine_articles',
count: 112,
toState: frontendURL(
`accounts/${this.accountId}/portals/:portalSlug/:locale/articles/mine`
@@ -89,24 +84,24 @@ export default {
{
icon: 'draft',
label: 'HELP_CENTER.DRAFT',
- key: 'helpcenter_draft',
+ key: 'list_draft_articles',
count: 32,
toState: frontendURL(
`accounts/${this.accountId}/portals/:portalSlug/:locale/articles/draft`
),
toolTip: 'Draft',
- toStateName: 'draft_articles',
+ toStateName: 'list_draft_articles',
},
{
icon: 'archive',
label: 'HELP_CENTER.ARCHIVED',
- key: 'helpcenter_archive',
+ key: 'list_archived_articles',
count: 10,
toState: frontendURL(
`accounts/${this.accountId}/portals/:portalSlug/:locale/articles/archived`
),
toolTip: 'Archived',
- toStateName: 'archived_articles',
+ toStateName: 'list_archived_articles',
},
];
},
diff --git a/app/javascript/dashboard/components/helpCenter/ArticleItem.stories.js b/app/javascript/dashboard/routes/dashboard/helpcenter/components/stories/ArticleItem.stories.js
similarity index 95%
rename from app/javascript/dashboard/components/helpCenter/ArticleItem.stories.js
rename to app/javascript/dashboard/routes/dashboard/helpcenter/components/stories/ArticleItem.stories.js
index 18dc8295c..7f7c819e3 100644
--- a/app/javascript/dashboard/components/helpCenter/ArticleItem.stories.js
+++ b/app/javascript/dashboard/routes/dashboard/helpcenter/components/stories/ArticleItem.stories.js
@@ -1,4 +1,4 @@
-import ArticleItemComponent from './ArticleItem.vue';
+import ArticleItemComponent from '../ArticleItem.vue';
const STATUS_LIST = {
published: 'published',
draft: 'draft',
diff --git a/app/javascript/dashboard/components/helpCenter/ArticleTable.stories.js b/app/javascript/dashboard/routes/dashboard/helpcenter/components/stories/ArticleTable.stories.js
similarity index 96%
rename from app/javascript/dashboard/components/helpCenter/ArticleTable.stories.js
rename to app/javascript/dashboard/routes/dashboard/helpcenter/components/stories/ArticleTable.stories.js
index f921c7eb1..7b0a692f9 100644
--- a/app/javascript/dashboard/components/helpCenter/ArticleTable.stories.js
+++ b/app/javascript/dashboard/routes/dashboard/helpcenter/components/stories/ArticleTable.stories.js
@@ -1,4 +1,4 @@
-import ArticleTableComponent from './ArticleTable.vue';
+import ArticleTableComponent from '../ArticleTable.vue';
import { action } from '@storybook/addon-actions';
export default {
title: 'Components/Help Center',
diff --git a/app/javascript/dashboard/routes/dashboard/helpcenter/helpcenter.routes.js b/app/javascript/dashboard/routes/dashboard/helpcenter/helpcenter.routes.js
index 635735f55..83064278e 100644
--- a/app/javascript/dashboard/routes/dashboard/helpcenter/helpcenter.routes.js
+++ b/app/javascript/dashboard/routes/dashboard/helpcenter/helpcenter.routes.js
@@ -14,10 +14,7 @@ const ListCategoryArticles = () =>
import('./pages/articles/ListCategoryArticles');
const ListAllArticles = () => import('./pages/articles/ListAllArticles');
-const ListArchivedArticles = () =>
- import('./pages/articles/ListArchivedArticles');
-const ListDraftArticles = () => import('./pages/articles/ListDraftArticles');
-const ListMyArticles = () => import('./pages/articles/ListMyArticles');
+
const NewArticle = () => import('./pages/articles/NewArticle');
const EditArticle = () => import('./pages/articles/EditArticle');
@@ -55,31 +52,32 @@ const articleRoutes = [
roles: ['administrator', 'agent'],
component: ListAllArticles,
},
+ {
+ path: getPortalRoute(':portalSlug/:locale/articles/new'),
+ name: 'new_article',
+ roles: ['administrator', 'agent'],
+ component: NewArticle,
+ },
+ {
+ path: getPortalRoute(':portalSlug/:locale/articles/mine'),
+ name: 'list_mine_articles',
+ roles: ['administrator', 'agent'],
+ component: ListAllArticles,
+ },
{
path: getPortalRoute(':portalSlug/:locale/articles/archived'),
name: 'list_archived_articles',
roles: ['administrator', 'agent'],
- component: ListArchivedArticles,
+ component: ListAllArticles,
},
{
path: getPortalRoute(':portalSlug/:locale/articles/draft'),
name: 'list_draft_articles',
roles: ['administrator', 'agent'],
- component: ListDraftArticles,
- },
- {
- path: getPortalRoute(':portalSlug/:locale/articles/mine'),
- name: 'list_mine_articles',
- roles: ['administrator', 'agent'],
- component: ListMyArticles,
- },
- {
- path: getPortalRoute(':portalSlug/:locale/articles/new'),
- name: 'new_article',
- roles: ['administrator', 'agent'],
- component: NewArticle,
+ component: ListAllArticles,
},
+
{
path: getPortalRoute(':portalSlug/:locale/articles/:articleSlug'),
name: 'edit_article',
diff --git a/app/javascript/dashboard/routes/dashboard/helpcenter/pages/articles/ListAllArticles.vue b/app/javascript/dashboard/routes/dashboard/helpcenter/pages/articles/ListAllArticles.vue
index 042199e25..8cdf907e2 100644
--- a/app/javascript/dashboard/routes/dashboard/helpcenter/pages/articles/ListAllArticles.vue
+++ b/app/javascript/dashboard/routes/dashboard/helpcenter/pages/articles/ListAllArticles.vue
@@ -1,19 +1,96 @@
+
+
+
+
+
+ {{ $t('HELP_CENTER.TABLE.LOADING_MESSAGE') }}
+
-
-
-