diff --git a/src/common/classes.js b/src/common/classes.js
index f20587caa..bea33a718 100644
--- a/src/common/classes.js
+++ b/src/common/classes.js
@@ -66,6 +66,7 @@ const CLASSES = {
PREFERENCES_PAGE_INSIDE_CONTENT_USERS: 'preferences-page__inside-content--users',
PREFERENCES_PAGE_INSIDE_CONTENT_CURRENCIES: 'preferences-page__inside-content--currencies',
PREFERENCES_PAGE_INSIDE_CONTENT_ACCOUNTANT: 'preferences-page__inside-content--accountant',
+ PREFERENCES_PAGE_INSIDE_CONTENT_SMS_INTEGRATION: 'preferences-page__inside-content--sms-integration',
FINANCIAL_REPORT_INSIDER: 'dashboard__insider--financial-report',
diff --git a/src/components/DataTableCells/SwitchFieldCell.js b/src/components/DataTableCells/SwitchFieldCell.js
index 0e9635439..df5bb0e89 100644
--- a/src/components/DataTableCells/SwitchFieldCell.js
+++ b/src/components/DataTableCells/SwitchFieldCell.js
@@ -31,7 +31,7 @@ const SwitchEditableCell = ({
>
+
);
}
diff --git a/src/containers/Dialogs/SMSMessageDialog/SMSMessageDialogContent.js b/src/containers/Dialogs/SMSMessageDialog/SMSMessageDialogContent.js
new file mode 100644
index 000000000..134a42f48
--- /dev/null
+++ b/src/containers/Dialogs/SMSMessageDialog/SMSMessageDialogContent.js
@@ -0,0 +1,20 @@
+import React from 'react';
+
+import '../../../style/pages/SMSMessage/SMSMessage.scss';
+import { SMSMessageDialogProvider } from './SMSMessageDialogProvider';
+import SMSMessageForm from './SMSMessageForm';
+
+export default function SMSMessageDialogContent({
+ // #ownProps
+ dialogName,
+ notificationkey,
+}) {
+ return (
+
+
+
+ );
+}
diff --git a/src/containers/Dialogs/SMSMessageDialog/SMSMessageDialogProvider.js b/src/containers/Dialogs/SMSMessageDialog/SMSMessageDialogProvider.js
new file mode 100644
index 000000000..28c6b180f
--- /dev/null
+++ b/src/containers/Dialogs/SMSMessageDialog/SMSMessageDialogProvider.js
@@ -0,0 +1,38 @@
+import React from 'react';
+import { DialogContent } from 'components';
+import {
+ useSettingEditSMSNotification,
+ useSettingSMSNotification,
+} from 'hooks/query';
+
+const SMSMessageDialogContext = React.createContext();
+
+/**
+ * SMS Message dialog provider.
+ */
+function SMSMessageDialogProvider({ notificationkey, dialogName, ...props }) {
+ // Edit SMS message notification mutations.
+ const { mutateAsync: editSMSNotificationMutate } =
+ useSettingEditSMSNotification();
+
+ const { data: smsNotification, isLoading: isSMSNotificationLoading } =
+ useSettingSMSNotification(notificationkey);
+
+ // provider.
+ const provider = {
+ dialogName,
+ smsNotification,
+ editSMSNotificationMutate,
+ };
+
+ return (
+
+
+
+ );
+}
+
+const useSMSMessageDialogContext = () =>
+ React.useContext(SMSMessageDialogContext);
+
+export { SMSMessageDialogProvider, useSMSMessageDialogContext };
diff --git a/src/containers/Dialogs/SMSMessageDialog/SMSMessageForm.js b/src/containers/Dialogs/SMSMessageDialog/SMSMessageForm.js
new file mode 100644
index 000000000..3a98f36a6
--- /dev/null
+++ b/src/containers/Dialogs/SMSMessageDialog/SMSMessageForm.js
@@ -0,0 +1,79 @@
+import React from 'react';
+import intl from 'react-intl-universal';
+import { Formik } from 'formik';
+import { omit } from 'lodash';
+import { Intent } from '@blueprintjs/core';
+
+import { AppToaster } from 'components';
+
+import SMSMessageFormContent from './SMSMessageFormContent';
+import { CreateSMSMessageFormSchema } from './SMSMessageForm.schema';
+import { useSMSMessageDialogContext } from './SMSMessageDialogProvider';
+
+import withDialogActions from 'containers/Dialog/withDialogActions';
+
+import { compose, transformToForm } from 'utils';
+
+const defaultInitialValues = {
+ notification_key: '',
+ is_notification_enabled: '',
+ message_text: '',
+};
+
+/**
+ * SMS Message form.
+ */
+function SMSMessageForm({
+ // #withDialogActions
+ closeDialog,
+}) {
+ const { dialogName, smsNotification, editSMSNotificationMutate } =
+ useSMSMessageDialogContext();
+
+ // Initial form values.
+ const initialValues = {
+ ...defaultInitialValues,
+ ...transformToForm(smsNotification, defaultInitialValues),
+ notification_key: smsNotification.key,
+ message_text: smsNotification.sms_message,
+ };
+
+ // Handles the form submit.
+ const handleFormSubmit = (values, { setSubmitting, setErrors }) => {
+ const form = {
+ ...omit(values, ['is_notification_enabled', 'sms_message']),
+ notification_key: smsNotification.key,
+ };
+
+ // Handle request response success.
+ const onSuccess = (response) => {
+ AppToaster.show({
+ message: intl.get('sms_message.dialog.success_message'),
+ intent: Intent.SUCCESS,
+ });
+ closeDialog(dialogName);
+ };
+
+ // Handle request response errors.
+ const onError = ({
+ response: {
+ data: { errors },
+ },
+ }) => {
+ setSubmitting(false);
+ };
+
+ editSMSNotificationMutate(form).then(onSuccess).catch(onError);
+ };
+
+ return (
+
+ );
+}
+
+export default compose(withDialogActions)(SMSMessageForm);
diff --git a/src/containers/Dialogs/SMSMessageDialog/SMSMessageForm.schema.js b/src/containers/Dialogs/SMSMessageDialog/SMSMessageForm.schema.js
new file mode 100644
index 000000000..441e73381
--- /dev/null
+++ b/src/containers/Dialogs/SMSMessageDialog/SMSMessageForm.schema.js
@@ -0,0 +1,11 @@
+import * as Yup from 'yup';
+import intl from 'react-intl-universal';
+import { DATATYPES_LENGTH } from 'common/dataTypes';
+
+const Schema = Yup.object().shape({
+ notification_key: Yup.string().required(),
+ is_notification_enabled: Yup.boolean(),
+ message_text: Yup.string().min(3).max(DATATYPES_LENGTH.TEXT),
+});
+
+export const CreateSMSMessageFormSchema = Schema;
diff --git a/src/containers/Dialogs/SMSMessageDialog/SMSMessageFormContent.js b/src/containers/Dialogs/SMSMessageDialog/SMSMessageFormContent.js
new file mode 100644
index 000000000..52c417b24
--- /dev/null
+++ b/src/containers/Dialogs/SMSMessageDialog/SMSMessageFormContent.js
@@ -0,0 +1,17 @@
+import React from 'react';
+import { Form } from 'formik';
+
+import SMSMessageFormFields from './SMSMessageFormFields';
+import SMSMessageFormFloatingActions from './SMSMessageFormFloatingActions';
+
+/**
+ * SMS message form content.
+ */
+export default function SMSMessageFormContent() {
+ return (
+
+ );
+}
diff --git a/src/containers/Dialogs/SMSMessageDialog/SMSMessageFormFields.js b/src/containers/Dialogs/SMSMessageDialog/SMSMessageFormFields.js
new file mode 100644
index 000000000..fd4c54c0c
--- /dev/null
+++ b/src/containers/Dialogs/SMSMessageDialog/SMSMessageFormFields.js
@@ -0,0 +1,31 @@
+import React from 'react';
+
+import { FastField, Field, ErrorMessage } from 'formik';
+import { Classes, FormGroup, TextArea } from '@blueprintjs/core';
+import { FormattedMessage as T, FieldRequiredHint } from 'components';
+import { inputIntent } from 'utils';
+
+export default function SMSMessageFormFields() {
+ return (
+
+ {/* ----------- Message Text ----------- */}
+
+ {({ field, meta: { error, touched } }) => (
+ }
+ className={'form-group--message_text'}
+ intent={inputIntent({ error, touched })}
+ helperText={}
+ >
+
+
+ )}
+
+
+ );
+}
diff --git a/src/containers/Dialogs/SMSMessageDialog/SMSMessageFormFloatingActions.js b/src/containers/Dialogs/SMSMessageDialog/SMSMessageFormFloatingActions.js
new file mode 100644
index 000000000..efa1a090a
--- /dev/null
+++ b/src/containers/Dialogs/SMSMessageDialog/SMSMessageFormFloatingActions.js
@@ -0,0 +1,47 @@
+import React from 'react';
+import { Intent, Button, Classes } from '@blueprintjs/core';
+import { useFormikContext } from 'formik';
+import { FormattedMessage as T } from 'components';
+
+import { useSMSMessageDialogContext } from './SMSMessageDialogProvider';
+import withDialogActions from 'containers/Dialog/withDialogActions';
+
+import { compose } from 'utils';
+
+/**
+ * SMS Message Form floating actions.
+ */
+function SMSMessageFormFloatingActions({
+ // #withDialogActions
+ closeDialog,
+}) {
+ // Formik context.
+ const { isSubmitting } = useFormikContext();
+
+ const { dialogName } = useSMSMessageDialogContext();
+
+ // Handle close button click.
+ const handleCancelBtnClick = () => {
+ closeDialog(dialogName);
+ };
+
+ return (
+
+ );
+}
+
+export default compose(withDialogActions)(SMSMessageFormFloatingActions);
diff --git a/src/containers/Dialogs/SMSMessageDialog/index.js b/src/containers/Dialogs/SMSMessageDialog/index.js
new file mode 100644
index 000000000..acb3c8784
--- /dev/null
+++ b/src/containers/Dialogs/SMSMessageDialog/index.js
@@ -0,0 +1,39 @@
+import React from 'react';
+import intl from 'react-intl-universal';
+import { Dialog, DialogSuspense } from 'components';
+import withDialogRedux from 'components/DialogReduxConnect';
+
+import { compose } from 'redux';
+
+const SMSMessageDialogContent = React.lazy(() =>
+ import('./SMSMessageDialogContent'),
+);
+
+/**
+ * SMS Message dialog.
+ */
+function SMSMessageDialog({
+ dialogName,
+ payload: { notificationkey },
+ isOpen,
+}) {
+ return (
+
+ );
+}
+
+export default compose(withDialogRedux())(SMSMessageDialog);
diff --git a/src/containers/Preferences/SMSIntegration/SMSIntegrationProvider.js b/src/containers/Preferences/SMSIntegration/SMSIntegrationProvider.js
new file mode 100644
index 000000000..23b03f148
--- /dev/null
+++ b/src/containers/Preferences/SMSIntegration/SMSIntegrationProvider.js
@@ -0,0 +1,39 @@
+import React from 'react';
+import classNames from 'classnames';
+import { CLASSES } from 'common/classes';
+import { useSettings, useSettingSMSNotifications } from 'hooks/query';
+import PreferencesPageLoader from '../PreferencesPageLoader';
+
+const SMSIntegrationContext = React.createContext();
+
+/**
+ * SMS Integration provider.
+ */
+function SMSIntegrationProvider({ ...props }) {
+ //Fetches Organization Settings.
+ const { isLoading: isSettingsLoading } = useSettings();
+
+ const { data: notifications, isLoading: isSMSNotificationsLoading } =
+ useSettingSMSNotifications();
+
+ // Provider state.
+ const provider = {
+ notifications,
+ isSMSNotificationsLoading,
+ };
+
+ return (
+
+
+
+ );
+}
+
+const useSMSIntegrationContext = () => React.useContext(SMSIntegrationContext);
+
+export { SMSIntegrationProvider, useSMSIntegrationContext };
diff --git a/src/containers/Preferences/SMSIntegration/SMSIntegrationTabs.js b/src/containers/Preferences/SMSIntegration/SMSIntegrationTabs.js
new file mode 100644
index 000000000..ebad8a644
--- /dev/null
+++ b/src/containers/Preferences/SMSIntegration/SMSIntegrationTabs.js
@@ -0,0 +1,42 @@
+import React from 'react';
+import intl from 'react-intl-universal';
+
+import { Tabs, Tab } from '@blueprintjs/core';
+import classNames from 'classnames';
+import { CLASSES } from 'common/classes';
+import SMSMessagesDataTable from './SMSMessagesDataTable';
+
+import '../../../style/pages/Preferences/SMSIntegration.scss';
+
+import withDashboardActions from 'containers/Dashboard/withDashboardActions';
+
+import { compose } from 'utils';
+
+function SMSIntegrationTabs({
+ // #withDashboardActions
+ changePreferencesPageTitle,
+}) {
+ React.useEffect(() => {
+ changePreferencesPageTitle(intl.get('sms_integration.label'));
+ }, [changePreferencesPageTitle]);
+
+ return (
+
+ );
+}
+
+export default compose(withDashboardActions)(SMSIntegrationTabs);
diff --git a/src/containers/Preferences/SMSIntegration/SMSMessagesDataTable.js b/src/containers/Preferences/SMSIntegration/SMSMessagesDataTable.js
new file mode 100644
index 000000000..db3aefad8
--- /dev/null
+++ b/src/containers/Preferences/SMSIntegration/SMSMessagesDataTable.js
@@ -0,0 +1,40 @@
+import React from 'react';
+import { DataTableEditable, DataTable } from 'components';
+import TableSkeletonRows from 'components/Datatable/TableSkeletonRows';
+
+import { useSMSIntegrationTableColumns } from './components';
+import { useSMSIntegrationContext } from './SMSIntegrationProvider';
+
+import withDialogActions from 'containers/Dialog/withDialogActions';
+import { compose } from 'utils';
+
+function SMSMessagesDataTable({
+ // #withDialogAction
+ openDialog,
+}) {
+ // Table columns.
+ const columns = useSMSIntegrationTableColumns();
+
+ const { notifications, isSMSNotificationsLoading } =
+ useSMSIntegrationContext();
+
+ const handleEditSMSMessage = ({ key }) => {
+ openDialog('sms-message-form', { notificationkey: key });
+ };
+
+ return (
+
+ );
+}
+
+export default compose(withDialogActions)(SMSMessagesDataTable);
diff --git a/src/containers/Preferences/SMSIntegration/components.js b/src/containers/Preferences/SMSIntegration/components.js
new file mode 100644
index 000000000..841e8f8bd
--- /dev/null
+++ b/src/containers/Preferences/SMSIntegration/components.js
@@ -0,0 +1,67 @@
+import React from 'react';
+import intl from 'react-intl-universal';
+import { SwitchFieldCell } from 'components/DataTableCells';
+import { safeCallback } from 'utils';
+
+/**
+ * Notification accessor.
+ */
+export const NotificationAccessor = (row) => {
+ return (
+
+ {row.notification_label}
+
+ {row.notification_description}
+
+
+ );
+};
+
+export const SMSMessageCell = ({
+ payload: { onEditSMSMessage },
+ row: { original },
+}) => (
+
+ {original.sms_message}
+
+ {'Edit'}
+
+
+);
+
+export function useSMSIntegrationTableColumns() {
+ return React.useMemo(() => [
+ {
+ Header: intl.get('sms_message.label_Notification'),
+ accessor: NotificationAccessor,
+ className: 'notification',
+ width: '180',
+ },
+ {
+ Header: intl.get('service'),
+ accessor: 'module_formatted',
+ className: 'service',
+ width: '80',
+ },
+ {
+ Header: intl.get('sms_message.label_mesage'),
+ accessor: 'sms_message',
+ Cell: SMSMessageCell,
+ className: 'sms_message',
+ clickable: true,
+ width: '180',
+ },
+ {
+ Header: intl.get('sms_message.label_auto'),
+ accessor: 'is_notification_enabled',
+ Cell: SwitchFieldCell,
+ className: 'is_notification_enabled',
+ disableSortBy: true,
+ disableResizing: true,
+ width: '80',
+ },
+ ]);
+}
diff --git a/src/containers/Preferences/SMSIntegration/index.js b/src/containers/Preferences/SMSIntegration/index.js
new file mode 100644
index 000000000..bd3d7d5cc
--- /dev/null
+++ b/src/containers/Preferences/SMSIntegration/index.js
@@ -0,0 +1,15 @@
+import React from 'react';
+
+import { SMSIntegrationProvider } from './SMSIntegrationProvider';
+import SMSIntegrationTabs from './SMSIntegrationTabs';
+
+/**
+ * SMS SMS Integration
+ */
+export default function SMSIntegration() {
+ return (
+
+
+
+ );
+}
diff --git a/src/containers/Preferences/SMSMessagesTemplates/SMSMessagesTemplatesDataTable.js b/src/containers/Preferences/SMSMessagesTemplates/SMSMessagesTemplatesDataTable.js
deleted file mode 100644
index ad5b8682c..000000000
--- a/src/containers/Preferences/SMSMessagesTemplates/SMSMessagesTemplatesDataTable.js
+++ /dev/null
@@ -1,54 +0,0 @@
-import React from 'react';
-import intl from 'react-intl-universal';
-import {
- DataTableEditable,
- DataTable,
- DashboardContentTable,
-} from 'components';
-import TableSkeletonRows from 'components/Datatable/TableSkeletonRows';
-
-import withDashboardActions from 'containers/Dashboard/withDashboardActions';
-
-import { useSMSMessagesTemplatesTableColumns } from './components';
-
-import { compose } from 'utils';
-
-function SMSMessagesTemplatesDataTable({
- // #withDashboardActions
- changePreferencesPageTitle,
-}) {
- // Table columns.
- const columns = useSMSMessagesTemplatesTableColumns();
-
- React.useEffect(() => {
- changePreferencesPageTitle(
- intl.get('sms_message_template.label.sms_messages_template'),
- );
- }, [changePreferencesPageTitle]);
-
- const DATA = [
- {
- notification: 'notification',
- service: 'service',
- message: 'message',
- auto: true,
- },
- {
- notification: 'notification',
- service: 'service',
- message: 'message',
- auto: false,
- },
- ];
- return (
-
- );
-}
-export default compose(withDashboardActions)(SMSMessagesTemplatesDataTable);
diff --git a/src/containers/Preferences/SMSMessagesTemplates/SMSMessagesTemplatesProvider.js b/src/containers/Preferences/SMSMessagesTemplates/SMSMessagesTemplatesProvider.js
deleted file mode 100644
index 474ea97b1..000000000
--- a/src/containers/Preferences/SMSMessagesTemplates/SMSMessagesTemplatesProvider.js
+++ /dev/null
@@ -1,35 +0,0 @@
-import React from 'react';
-import classNames from 'classnames';
-import { CLASSES } from 'common/classes';
-import { useSettings } from 'hooks/query';
-
-const SMSMessagesTemplatesContext = React.createContext();
-
-/**
- * SMS message templates provider.
- */
-function SMSMessagesTemplatesProvider({ ...props }) {
- //Fetches Organization Settings.
- const { isLoading: isSettingsLoading } = useSettings();
-
- // Provider state.
- const provider = {};
-
- return (
-
- );
-}
-
-const useSMSMessageTemplateContext = () =>
- React.useContext(SMSMessagesTemplatesContext);
-
-export { SMSMessagesTemplatesProvider, useSMSMessageTemplateContext };
diff --git a/src/containers/Preferences/SMSMessagesTemplates/components.js b/src/containers/Preferences/SMSMessagesTemplates/components.js
deleted file mode 100644
index 5824a65c2..000000000
--- a/src/containers/Preferences/SMSMessagesTemplates/components.js
+++ /dev/null
@@ -1,40 +0,0 @@
-import React from 'react';
-import intl from 'react-intl-universal';
-
-import {
- InputGroupCell,
- TextAreaCell,
- SwitchFieldCell,
-} from 'components/DataTableCells';
-
-export function useSMSMessagesTemplatesTableColumns() {
- return React.useMemo(() => [
- {
- Header: intl.get('sms_message_template.label_Notification'),
- accessor: 'notification',
- className: 'notification',
- width: '150',
- },
- {
- Header: intl.get('service'),
- accessor: 'service',
- className: 'service',
- width: '100',
- },
- {
- Header: intl.get('sms_message_template.label_mesage'),
- accessor: 'message',
- className: 'message',
- width: '180',
- },
- {
- Header: intl.get('sms_message_template.label_auto'),
- accessor: 'auto',
- Cell: SwitchFieldCell,
- className: 'auto',
- disableSortBy: true,
- disableResizing: true,
- width: '80',
- },
- ]);
-}
diff --git a/src/containers/Preferences/SMSMessagesTemplates/index.js b/src/containers/Preferences/SMSMessagesTemplates/index.js
deleted file mode 100644
index 44f4df09b..000000000
--- a/src/containers/Preferences/SMSMessagesTemplates/index.js
+++ /dev/null
@@ -1,15 +0,0 @@
-import React from 'react';
-
-import { SMSMessagesTemplatesProvider } from './SMSMessagesTemplatesProvider';
-import SMSMessagesTemplatesDataTable from './SMSMessagesTemplatesDataTable';
-
-/**
- * SMS messages templates.
- */
-export default function SMSMessagesTemplates() {
- return (
-
-
-
- );
-}
diff --git a/src/containers/Preferences/Users/components.js b/src/containers/Preferences/Users/components.js
index 6b288a0df..853852a61 100644
--- a/src/containers/Preferences/Users/components.js
+++ b/src/containers/Preferences/Users/components.js
@@ -78,7 +78,7 @@ export function ActionsMenu({
*/
function StatusAccessor(user) {
return !user.is_invite_accepted ? (
-
+
) : user.active ? (
diff --git a/src/hooks/query/settings.js b/src/hooks/query/settings.js
index 7aebe4bf1..74f302bc6 100644
--- a/src/hooks/query/settings.js
+++ b/src/hooks/query/settings.js
@@ -125,7 +125,7 @@ export function useSettingCashFlow(props) {
}
/**
- * Retrieve SMS settings.
+ * Retrieve SMS Notifications settings.
*/
export function useSettingSMSNotifications(props) {
return useRequestQuery(
@@ -138,3 +138,42 @@ export function useSettingSMSNotifications(props) {
},
);
}
+
+/**
+ * Retrieve Specific SMS Notification settings.
+ */
+export function useSettingSMSNotification(key, props) {
+ return useRequestQuery(
+ [t.SETTING_SMS_NOTIFICATIONS, key],
+ {
+ method: 'get',
+ url: `settings/sms-notification/${key}`,
+ },
+ {
+ select: (res) => res.data.notification,
+ defaultData: {
+ smsNotification: [],
+ },
+ ...props,
+ },
+ );
+}
+
+/**
+ * Retrieve Edit SMS Notification settings.
+ */
+export function useSettingEditSMSNotification(props) {
+ const queryClient = useQueryClient();
+ const apiRequest = useApiRequest();
+
+ return useMutation(
+ (values) => apiRequest.post(`settings/sms-notification`, values),
+ {
+ onSuccess: () => {
+ // Invalidate
+ queryClient.invalidateQueries([t.SETTING_SMS_NOTIFICATIONS]);
+ },
+ ...props,
+ },
+ );
+}
diff --git a/src/hooks/query/types.js b/src/hooks/query/types.js
index ff9bbe20a..9e233ab00 100644
--- a/src/hooks/query/types.js
+++ b/src/hooks/query/types.js
@@ -111,7 +111,9 @@ const SETTING = {
SETTING_MANUAL_JOURNALS: 'SETTING_MANUAL_JOURNALS',
SETTING_ITEMS: 'SETTING_ITEMS',
SETTING_CASHFLOW: 'SETTING_CASHFLOW',
+ SETTING_SMS_NOTIFICATION: 'SETTING_SMS_NOTIFICATION',
SETTING_SMS_NOTIFICATIONS: 'SETTING_SMS_NOTIFICATIONS',
+ SETTING_EDIT_SMS_NOTIFICATION: 'SETTING_EDIT_SMS_NOTIFICATION',
};
const ORGANIZATIONS = {
diff --git a/src/lang/en/index.json b/src/lang/en/index.json
index bcb9fc4a7..b61f78f99 100644
--- a/src/lang/en/index.json
+++ b/src/lang/en/index.json
@@ -1430,10 +1430,15 @@
"notify_via_sms.dialog.send_notification_to":"Send notification to",
"notify_via_sms.dialog.message_text":"Message Text",
"notify_via_sms.dialog.notify_via_sms":"Notify vis SMS",
+ "notify_via_sms.dialog.success_message":"To notify have been successfully",
"send": "Send",
- "sms_message_template.label.sms_messages_template":"SMS Messages template",
- "sms_message_template.label_mesage":"Message",
- "sms_message_template.label_Notification":"Notification",
- "sms_message_template.label_auto":"Auto",
- "sms_message":"SMS message"
+ "sms_integration.label":"SMS Integration",
+ "sms_integration.label.overview":"Overview",
+ "sms_integration.label.sms_messages":"SMS Messages",
+ "sms_message.label.sms_messages_template":"SMS Notifications ",
+ "sms_message.label_mesage":"Message",
+ "sms_message.label_Notification":"Notification",
+ "sms_message.label_auto":"Auto",
+ "sms_message":"SMS message",
+ "sms_message.dialog.success_message":"Sms notification settings has been updated successfully."
}
\ No newline at end of file
diff --git a/src/routes/preferences.js b/src/routes/preferences.js
index 75b0990fe..98ff2e46b 100644
--- a/src/routes/preferences.js
+++ b/src/routes/preferences.js
@@ -4,7 +4,7 @@ import Accountant from 'containers/Preferences/Accountant/Accountant';
// import Accounts from 'containers/Preferences/Accounts/Accounts';
import Currencies from 'containers/Preferences/Currencies/Currencies';
import Item from 'containers/Preferences/Item';
-import SMSMessagesTemplates from '../containers/Preferences/SMSMessagesTemplates';
+import SMSIntegration from '../containers/Preferences/SMSIntegration';
import DefaultRoute from '../containers/Preferences/DefaultRoute';
const BASE_URL = '/preferences';
@@ -37,7 +37,7 @@ export default [
},
{
path: `${BASE_URL}/sms-message`,
- component: SMSMessagesTemplates,
+ component: SMSIntegration,
exact: true,
},
{
diff --git a/src/style/pages/NotifyConactViaSMS/NotifyConactViaSMSDialog.scss b/src/style/pages/NotifyConactViaSMS/NotifyConactViaSMSDialog.scss
index 27b7f2a8c..e0ba9e197 100644
--- a/src/style/pages/NotifyConactViaSMS/NotifyConactViaSMSDialog.scss
+++ b/src/style/pages/NotifyConactViaSMS/NotifyConactViaSMSDialog.scss
@@ -14,7 +14,7 @@
}
.form-group {
- &--note {
+ &--sms_message {
.bp3-form-content {
textarea {
width: 100%;
diff --git a/src/style/pages/Preferences/SMSIntegration.scss b/src/style/pages/Preferences/SMSIntegration.scss
new file mode 100644
index 000000000..d2a52edf0
--- /dev/null
+++ b/src/style/pages/Preferences/SMSIntegration.scss
@@ -0,0 +1,38 @@
+// SMS Integration.
+// ---------------------------------
+
+.preferences-page__inside-content--sms-integration {
+ .bigcapital-datatable {
+ .table {
+ .tbody {
+ .notification {
+ &__label {
+ font-weight: 500;
+ }
+
+ &__desc {
+ font-size: 13px;
+ margin-top: 3px;
+ line-height: 1.25;
+ display: block;
+ }
+ }
+
+ .sms_message.td {
+ .edit-text {
+ display: inline-block;
+ font-size: 11.5px;
+ color: #1652c8;
+ margin-left: 2px;
+ text-decoration: underline;
+ }
+ }
+ }
+ }
+ }
+ .bp3-tabs {
+ .bp3-tab-panel {
+ margin-top: 0;
+ }
+ }
+}
diff --git a/src/style/pages/SMSMessage/SMSMessage.scss b/src/style/pages/SMSMessage/SMSMessage.scss
new file mode 100644
index 000000000..7b447d293
--- /dev/null
+++ b/src/style/pages/SMSMessage/SMSMessage.scss
@@ -0,0 +1,29 @@
+.dialog--sms-message {
+ max-width: 350px;
+
+ .bp3-form-group {
+ margin-bottom: 15px;
+
+ label.bp3-label {
+ font-size: 13px;
+ margin-bottom: 6px;
+ }
+ }
+
+ .form-group {
+ &--message_text {
+ .bp3-form-content {
+ textarea {
+ width: 100%;
+ min-width: 100%;
+ min-height: 90px;
+ font-size: 14px;
+ }
+ }
+ }
+ }
+
+ .bp3-dialog-footer {
+ padding-top: 10px;
+ }
+}