From 294be80e3c4fcd43a49da79978d0f761d3863245 Mon Sep 17 00:00:00 2001 From: Mario Sergio Date: Mon, 25 Nov 2024 16:35:24 -0300 Subject: [PATCH] feat(admin-client): disabled donation widget --- .../packages/admin-client/src/mobrender/widgets/config.js | 5 ++--- .../src/mobrender/widgets/draft/components/draft.js | 2 +- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/clients/packages/admin-client/src/mobrender/widgets/config.js b/clients/packages/admin-client/src/mobrender/widgets/config.js index e7edf00ced..608a4f6bbe 100644 --- a/clients/packages/admin-client/src/mobrender/widgets/config.js +++ b/clients/packages/admin-client/src/mobrender/widgets/config.js @@ -3,8 +3,7 @@ import { Draft } from './draft/components'; import { Pressure, Form, - Content, - Donation, + Content } from '../../mobilizations/widgets/__plugins__'; import { PressureEmailIcon, PressurePhoneIcon } from './icons'; import { createEditorContent } from '../../mobilizations/widgets/__plugins__/content/components/editor-slate'; @@ -98,7 +97,7 @@ export default (mobilization, widget, { intl }) => [ redirect: Paths.pressure(mobilization.id, widget.id), }, { - component: Donation, + component: () =>
Doação desativada
, kind: 'donation', // TODO: propriedades relacionadas ao draft icon: 'money', diff --git a/clients/packages/admin-client/src/mobrender/widgets/draft/components/draft.js b/clients/packages/admin-client/src/mobrender/widgets/draft/components/draft.js index 28210258b5..8b5ea70843 100644 --- a/clients/packages/admin-client/src/mobrender/widgets/draft/components/draft.js +++ b/clients/packages/admin-client/src/mobrender/widgets/draft/components/draft.js @@ -8,7 +8,7 @@ if (require('exenv').canUseDOM) require('./draft.scss'); const Draft = ({ mobilization, widget, update, intl, ...extraProps }) => { const updateKind = (props) => update({ ...widget, ...props }); const widgetsConfig = widgets(mobilization, widget, { intl }).filter( - (w) => w.kind !== 'draft' + (w) => w.kind !== 'draft' && w.kind !== 'donation' ); return (