mirror of
https://github.com/rowyio/rowy.git
synced 2026-07-13 13:59:05 +02:00
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "firetable",
|
||||
"alias": "firetable-cli",
|
||||
"version": "1.0.1",
|
||||
"version": "1.0.2",
|
||||
"description": "CLI tool to simplify firetable deployment processes",
|
||||
"repository": "https://github.com/AntlerVC/firetable",
|
||||
"author": "Shams Mosowi",
|
||||
|
||||
@@ -111,7 +111,11 @@ module.exports.deployToFirebaseHosting = (projectId) =>
|
||||
|
||||
module.exports.startFiretableLocally = (dir = "firetable/www") =>
|
||||
new Promise((resolve) => {
|
||||
const child = spawn("npm", ["run", "serve"], { cwd: dir });
|
||||
const child = spawn(
|
||||
/^win/.test(process.platform) ? "npm.cmd" : "npm",
|
||||
["run", "serve"],
|
||||
{ cwd: dir }
|
||||
);
|
||||
child.stdout.on("data", (data) => {
|
||||
const msg = data.toString();
|
||||
const portRegex = /^INFO: Accepting connections at (http:\/\/[\w\.]+:\d+)/;
|
||||
|
||||
@@ -36,9 +36,13 @@ const emailOnCreate = (config: EmailOnTriggerConfig) =>
|
||||
config.requiredFields,
|
||||
snapshotData
|
||||
);
|
||||
const to = await config.to(snapshotData, db);
|
||||
const from = await config.from(snapshotData, db);
|
||||
console.log(JSON.stringify({ to, from }));
|
||||
const to = await config.to(snapshotData, db);
|
||||
|
||||
console.log(
|
||||
JSON.stringify({ to, from, hasAllRequiredFields, shouldSend })
|
||||
);
|
||||
|
||||
if (shouldSend && hasAllRequiredFields) {
|
||||
const msg = {
|
||||
from,
|
||||
@@ -54,15 +58,17 @@ const emailOnCreate = (config: EmailOnTriggerConfig) =>
|
||||
categories: config.categories,
|
||||
attachments: snapshotData.attachments,
|
||||
};
|
||||
console.log(JSON.stringify(msg));
|
||||
|
||||
const resp = await sendEmail(msg);
|
||||
console.log(JSON.stringify(resp));
|
||||
return true;
|
||||
return resp;
|
||||
} else {
|
||||
console.log("requirements were not met");
|
||||
return false;
|
||||
}
|
||||
} catch (error) {
|
||||
console.warn(JSON.stringify(error.response.body));
|
||||
console.warn("Failed", JSON.stringify(error));
|
||||
return false;
|
||||
}
|
||||
});
|
||||
|
||||
@@ -72,7 +72,6 @@ const selectedColumnsReducer = (doc: any) => (
|
||||
currentColumn: any
|
||||
) => {
|
||||
const value = _get(doc, currentColumn.key);
|
||||
console.log({ currentColumn });
|
||||
switch (currentColumn.type) {
|
||||
case FieldType.multiSelect:
|
||||
return {
|
||||
@@ -92,17 +91,18 @@ const selectedColumnsReducer = (doc: any) => (
|
||||
case FieldType.connectTable:
|
||||
return {
|
||||
...accumulator,
|
||||
[currentColumn.name]: value
|
||||
? value
|
||||
.map((item: any) =>
|
||||
currentColumn.config.primaryKeys.reduce(
|
||||
(labelAccumulator: string, currentKey: any) =>
|
||||
`${labelAccumulator} ${item.snapshot[currentKey]}`,
|
||||
""
|
||||
[currentColumn.name]:
|
||||
value && Array.isArray(value)
|
||||
? value
|
||||
.map((item: any) =>
|
||||
currentColumn.config.primaryKeys.reduce(
|
||||
(labelAccumulator: string, currentKey: any) =>
|
||||
`${labelAccumulator} ${item.snapshot[currentKey]}`,
|
||||
""
|
||||
)
|
||||
)
|
||||
)
|
||||
.join()
|
||||
: "",
|
||||
.join()
|
||||
: "",
|
||||
};
|
||||
case FieldType.checkbox:
|
||||
return {
|
||||
@@ -116,10 +116,11 @@ const selectedColumnsReducer = (doc: any) => (
|
||||
...accumulator,
|
||||
[currentColumn.name]: value ? value.toDate() : "",
|
||||
};
|
||||
case FieldType.last:
|
||||
case FieldType.action:
|
||||
case FieldType.connectTable:
|
||||
return accumulator;
|
||||
return {
|
||||
...accumulator,
|
||||
[currentColumn.name]: value && value.status ? value.status : "",
|
||||
};
|
||||
default:
|
||||
return {
|
||||
...accumulator,
|
||||
@@ -227,7 +228,7 @@ export default function ExportCSV() {
|
||||
</FormControl>
|
||||
<Button
|
||||
onClick={() => {
|
||||
setCSVColumns(tableState?.columns!);
|
||||
setCSVColumns(Object.values(tableState?.columns!));
|
||||
}}
|
||||
>
|
||||
Select All
|
||||
|
||||
Reference in New Issue
Block a user