From 9a9bcf81531d744e7ac45fff6fc54cfef4ced8d7 Mon Sep 17 00:00:00 2001 From: Sivin Varghese <64252451+iamsivin@users.noreply.github.com> Date: Wed, 2 Jun 2021 22:53:13 +0530 Subject: [PATCH] feat: Create add reminder component for CRM (#2264) * feat: Creates add reminder component for CRM Co-authored-by: Nithin David Thomas --- .../dashboard/i18n/locale/en/contact.json | 10 ++ .../components/AddReminder.stories.js | 41 +++++ .../contacts/components/AddReminder.vue | 140 ++++++++++++++++++ 3 files changed, 191 insertions(+) create mode 100644 app/javascript/dashboard/routes/dashboard/contacts/components/AddReminder.stories.js create mode 100644 app/javascript/dashboard/routes/dashboard/contacts/components/AddReminder.vue diff --git a/app/javascript/dashboard/i18n/locale/en/contact.json b/app/javascript/dashboard/i18n/locale/en/contact.json index 544d54323..949637088 100644 --- a/app/javascript/dashboard/i18n/locale/en/contact.json +++ b/app/javascript/dashboard/i18n/locale/en/contact.json @@ -155,6 +155,16 @@ "VIEW_DETAILS": "View details" } }, + "REMINDER": { + "ADD_BUTTON": { + "BUTTON": "Add", + "TITLE": "Shift + Enter to create a task" + }, + "FOOTER": { + "DUE_DATE": "Due date", + "LABEL_TITLE": "Set type" + } + }, "NOTES": { "HEADER": { "TITLE": "Notes" diff --git a/app/javascript/dashboard/routes/dashboard/contacts/components/AddReminder.stories.js b/app/javascript/dashboard/routes/dashboard/contacts/components/AddReminder.stories.js new file mode 100644 index 000000000..a9bdbb5e8 --- /dev/null +++ b/app/javascript/dashboard/routes/dashboard/contacts/components/AddReminder.stories.js @@ -0,0 +1,41 @@ +import { action } from '@storybook/addon-actions'; +import AddReminder from './AddReminder'; + +export default { + title: 'Components/Reminder/Add', + component: AddReminder, + argTypes: { + options: { + control: { + type: 'object', + }, + }, + }, +}; + +const Template = (args, { argTypes }) => ({ + props: Object.keys(argTypes), + components: { AddReminder }, + template: + '', +}); + +export const Add = Template.bind({}); +Add.args = { + onAdd: action('Added'), + onClick: action('Label'), + options: [ + { + id: '12345', + name: 'calls', + }, + { + id: '12346', + name: 'meeting', + }, + { + id: '12347', + name: 'review', + }, + ], +}; diff --git a/app/javascript/dashboard/routes/dashboard/contacts/components/AddReminder.vue b/app/javascript/dashboard/routes/dashboard/contacts/components/AddReminder.vue new file mode 100644 index 000000000..0408d2c70 --- /dev/null +++ b/app/javascript/dashboard/routes/dashboard/contacts/components/AddReminder.vue @@ -0,0 +1,140 @@ + + + + +