update add notification & search
This commit is contained in:
@ -65,15 +65,15 @@ const AddDialog = () => {
|
||||
const doCreateNotification = async (e: React.FormEvent<HTMLFormElement>) => {
|
||||
e.preventDefault();
|
||||
|
||||
const payload = {
|
||||
...formField,
|
||||
subject:
|
||||
formField.subject.trim() === '' && formField.via === 'sms'
|
||||
? 'SMS Notification'
|
||||
: formField.subject
|
||||
};
|
||||
// const payload = {
|
||||
// ...formField,
|
||||
// subject:
|
||||
// formField.subject.trim() === '' && formField.via === 'sms'
|
||||
// ? 'SMS Notification'
|
||||
// : formField.subject
|
||||
// };
|
||||
|
||||
const response = await PostData(`${API_URL_NOTIFICATION}/send`, payload);
|
||||
const response = await PostData(`${API_URL_NOTIFICATION}/send`, formField);
|
||||
// console.log('send response :', response);
|
||||
|
||||
if (response?.status) {
|
||||
|
||||
Reference in New Issue
Block a user