feat: SMS notification module.

This commit is contained in:
a.bouhuolia
2021-11-09 11:08:47 +02:00
parent 8daefb6946
commit 4b5e06f50c
9 changed files with 100 additions and 18 deletions

View File

@@ -80,10 +80,19 @@ function NotifyInvoiceViaSMSForm({
setNotificationType(values.notification_key);
}
};
// Momerize the notification types.
const notificationTypes = React.useMemo(
() => [
{ key: 'details', label: 'Invoice details' },
{ key: 'reminder', label: 'Invoice reminder' },
],
[],
);
return (
<NotifyViaSMSForm
initialValues={initialValues}
notificationTypes={notificationTypes}
onSubmit={handleFormSubmit}
onCancel={handleFormCancel}
onValuesChange={handleValuesChange}