mirror of
https://github.com/rowyio/rowy.git
synced 2025-12-29 00:16:39 +01:00
fixes/attachments loging
This commit is contained in:
@@ -41,8 +41,7 @@ const emailOnCreate = (config: EmailOnTriggerConfig) =>
|
||||
const to = await config.to(snapshotData, db);
|
||||
const attachments = config.attachments
|
||||
? await config.attachments(snapshotData, db)
|
||||
: null;
|
||||
console.log({ attachments: snapshotData.attachments });
|
||||
: undefined;
|
||||
if (shouldSend && hasAllRequiredFields) {
|
||||
const msg = {
|
||||
from,
|
||||
@@ -58,9 +57,9 @@ const emailOnCreate = (config: EmailOnTriggerConfig) =>
|
||||
categories: config.categories,
|
||||
attachments,
|
||||
};
|
||||
|
||||
console.log({ msg });
|
||||
const resp = await sendEmail(msg);
|
||||
|
||||
console.log({ resp });
|
||||
return resp;
|
||||
} else {
|
||||
console.log("requirements were not met");
|
||||
|
||||
@@ -73,7 +73,7 @@ const Hotkeys = (props: any) => {
|
||||
if (stringFields.includes(column.type))
|
||||
onSubmit(column.key, row, currentUser?.uid)(newValue);
|
||||
else if (numberFields.includes(column.type)) {
|
||||
const numberValue = parseInt(newValue);
|
||||
const numberValue = parseInt(newValue, 10);
|
||||
if (`${numberValue}` !== "NaN") {
|
||||
onSubmit(column.key, row, currentUser?.uid)(numberValue);
|
||||
}
|
||||
|
||||
@@ -79,7 +79,10 @@ export default function Action({
|
||||
(response) => {
|
||||
const { message, cellValue, success } = response.data;
|
||||
setIsRunning(false);
|
||||
snack.open({ message, severity: success ? "success" : "error" });
|
||||
snack.open({
|
||||
message: JSON.stringify(message),
|
||||
severity: success ? "success" : "error",
|
||||
});
|
||||
if (cellValue) onSubmit(cellValue);
|
||||
},
|
||||
(error) => {
|
||||
|
||||
@@ -112,7 +112,6 @@ export const getFormatter = (column: any, readOnly: boolean = false) => {
|
||||
case FieldType.shortText:
|
||||
case FieldType.email:
|
||||
case FieldType.phone:
|
||||
case FieldType.url:
|
||||
case FieldType.number:
|
||||
case FieldType.slider:
|
||||
return undefined;
|
||||
|
||||
Reference in New Issue
Block a user