+ <%= form_for([:seed, namespace, page.resource], method: :post, html: { class: "form" }) do |f| %> + +
Click the button to generate seed data into this account for demos.
+Note: This will clear all the existing data in this account.
+Click the button to generate seed data into this account for demos.
+Note: This will clear all the existing data in this account.
+-(HDfeLXI1m-1o19Um3lJ+h zt*6rxdnH3bQTPsRnlMxQ9?#B9E5cT7B^Yfq)drx{?>x&^;|sO*q&Y0ymdK{og>dyg zl%n(DVL{A_GO$MP5cyKhL6?2E0=BfJr4%6<@bWksnZZ(;GW23a4?Qx%Z91BQednCF zn+(lkf2;86K{wf%w~6>@%Fxpr+KxsU#uTx<-i;F>-iscLI`<^MhM#)Aq1` zKgpnPGoYt8te=$;tQ#khQr-RMB_%L1p%r=U+c;iDnL3=RWVk%a5*;n)1c%ngURG7U zO79f?QmRX#3?){SkB9;tb~+=pwPaU>c%WPPxFsB1r1Q(+Jg1p^uBq|gG5j5;BglLy zL!`ut@(~K-?ST9UncwwzMXO&3+Tq%_vl|{y;J$5j?7WVX$8lCPIjM)Ie?}W29DM4; zj9B*>5D!FJ;D7 zY!3&Qnt5jpfU$!fL$M=bZ2RAo8GO}JA6RB3kEJq%xUD|098cI =rI((EBj0M9KN_BrAqLzLcg;SIurP8{Q^44)o2vZUiAau8KJFZw<5Yk zLdp;_y&=-m8?NsNeekXS(hnN=LbKJf<7>Ok%mcR8`SlgmG()a`d1R(*S*Kq* zp+h7;BB}_{5ndT1Q+j&i_+mv5J-GE;T|XM>8OtcpCJIqn>H sVT9(qC>lN0D!fo|jJ5*u+UtyYb0QIKl~ rN)}d0mb(p5Ri~W0|3%eR$4kvI;tunrU+XeV>5&aoX5@9 z9<2=kFbOw%V^eFm6SE22!pcsJb-AX2mD$QnjP)kJDzB=&4BXO6(Zd0L-9t^w)Wh0T z*o;*|93SQ;f_7jFcQR&nv$e5v6mb({{oz*x{r-C~n3eg5ij%b%tJL=fnRQe(m}L+S zaAtlU0d7-X$Q5QmVIBy-fS|A-7c&(7JD67p4CUqK6&B&=6XAt2|M_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fO?C1&aE74!<{@fpIqLqIES`tD9$8?XcG$($+BQ-wb>=MTyB9-jG&! zRtI;uwjpevAnNnRxfmvsWX9`0?d8i>Z+ccoKpmLgw)3)dN77EJZ-~7tA2@fMf0eTy z0%Aio9eBry+IC>pN83}ge&NhX-tm@r3qm~gZdVZi&fQAOEBKIzr~>f>TN?ugs6|wJ z-WxiFo8~@4VFJKjZ#J#rxS tGRpHX|jjXWO1Ai~8wJ#zH@ z3|v?aJR%uwimsmJMh;%T=h+(_sV1*~RHr?6ZMak$Tyxb!x1~H@K@YI%#}1+}EZ-P= z=SzUB$~Me~A?D%yx4<>kDxcwvJ7l`XfOkXOyja&Wl#&tIaND;Svz67JD^2;2+qvq( zZjdXxG%#=1>e-+_9wT&BXmn4x{8d)3<&e>);sIZn7>e6N*C6|`sz_@bjbumh{V!B~ zpmHyJ3f}+}A5wqLtnu!=9{7Dl!) Vkt}a&pf!( 9>#G6b3>3 );p!#+7MwFs~{d39pc^z&Iiu&~rtknC_dP zSMJBcge9Mm9bQjr`}%6i`{lH1 u%1om*n*KuJz^1O^nab1rnE&xd{#z$am-K9&JcQ;HUCGf>D^x```lf YH^a_D&8eX1kNp8x< b+XA1cEx+W-In literal 0 HcmV?d00001 From 6e945dd61e613c7de752cf2a0f0b70ef19678c69 Mon Sep 17 00:00:00 2001 From: Muhsin Keloth Date: Thu, 1 Sep 2022 10:55:59 +0530 Subject: [PATCH 3/3] feat: Add the ability to delete/archive articles (#5319) --- .../dashboard/api/helpCenter/articles.js | 4 ++ .../dashboard/api/specs/article.spec.js | 11 ++++ .../dashboard/i18n/locale/en/helpCenter.json | 20 ++++++ .../helpcenter/components/PortalPopover.vue | 12 +++- .../pages/articles/ArticleSettings.vue | 2 +- .../helpcenter/pages/articles/EditArticle.vue | 64 ++++++++++++++++++- .../modules/helpCenterArticles/actions.js | 5 +- .../modules/helpCenterArticles/getters.js | 8 ++- .../helpCenterArticles/specs/action.spec.js | 11 +++- 9 files changed, 123 insertions(+), 14 deletions(-) diff --git a/app/javascript/dashboard/api/helpCenter/articles.js b/app/javascript/dashboard/api/helpCenter/articles.js index 8bc960267..62328e8eb 100644 --- a/app/javascript/dashboard/api/helpCenter/articles.js +++ b/app/javascript/dashboard/api/helpCenter/articles.js @@ -42,6 +42,10 @@ class ArticlesAPI extends PortalsAPI { category_id, }); } + + deleteArticle({ articleId, portalSlug }) { + return axios.delete(`${this.url}/${portalSlug}/articles/${articleId}`); + } } export default new ArticlesAPI(); diff --git a/app/javascript/dashboard/api/specs/article.spec.js b/app/javascript/dashboard/api/specs/article.spec.js index e20e2e222..51e90318f 100644 --- a/app/javascript/dashboard/api/specs/article.spec.js +++ b/app/javascript/dashboard/api/specs/article.spec.js @@ -52,4 +52,15 @@ describe('#PortalAPI', () => { ); }); }); + describeWithAPIMock('API calls', context => { + it('#deleteArticle', () => { + articlesAPI.deleteArticle({ + articleId: 1, + portalSlug: 'room-rental', + }); + expect(context.axiosMock.delete).toHaveBeenCalledWith( + '/api/v1/portals/room-rental/articles/1' + ); + }); + }); }); diff --git a/app/javascript/dashboard/i18n/locale/en/helpCenter.json b/app/javascript/dashboard/i18n/locale/en/helpCenter.json index 03a425a9b..1ee5bb640 100644 --- a/app/javascript/dashboard/i18n/locale/en/helpCenter.json +++ b/app/javascript/dashboard/i18n/locale/en/helpCenter.json @@ -224,6 +224,26 @@ "ERROR": "Error while saving article" } }, + "ARCHIVE_ARTICLE": { + "API": { + "ERROR": "Error while archiving article", + "SUCCESS": "Article archived successfully" + } + }, + "DELETE_ARTICLE": { + "MODAL": { + "CONFIRM": { + "TITLE": "Confirm Deletion", + "MESSAGE": "Are you sure to delete the article?", + "YES": "Yes, Delete", + "NO": "No, Keep it" + } + }, + "API": { + "SUCCESS_MESSAGE": "Article deleted successfully", + "ERROR_MESSAGE": "Error while deleting article" + } + }, "CREATE_ARTICLE": { "ERROR_MESSAGE": "Please add the article heading and content then only you can update the settings" }, diff --git a/app/javascript/dashboard/routes/dashboard/helpcenter/components/PortalPopover.vue b/app/javascript/dashboard/routes/dashboard/helpcenter/components/PortalPopover.vue index 539c15e7d..c8a4c785e 100644 --- a/app/javascript/dashboard/routes/dashboard/helpcenter/components/PortalPopover.vue +++ b/app/javascript/dashboard/routes/dashboard/helpcenter/components/PortalPopover.vue @@ -10,7 +10,7 @@ color-scheme="secondary" icon="settings" size="small" - @click="openPortalPage" + @click="openPortalArticles" > {{ $t('HELP_CENTER.PORTAL.POPOVER.PORTAL_SETTINGS') }}