From d129fc496b44aeb18eb3a7fd2a942bb08a12f612 Mon Sep 17 00:00:00 2001 From: shamsmosowi Date: Thu, 16 Sep 2021 07:37:16 +1000 Subject: [PATCH] pass tablepath to funcition builder --- package.json | 2 +- src/components/Table/ColumnMenu/FieldSettings/index.tsx | 4 ++-- src/components/Table/TableHeader/Extensions/index.tsx | 3 ++- src/hooks/useTable/useTableData.tsx | 2 +- 4 files changed, 6 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index a1d05b50..359a7f47 100644 --- a/package.json +++ b/package.json @@ -70,7 +70,7 @@ "yup": "^0.32.9" }, "scripts": { - "upstream": "git fetch upstream;git merge upstream/v2;git push", + "upstream": "git fetch upstream;git merge upstream/v2;git commit -m'merge upstream';git push", "serve": "serve -s build", "start": "craco start", "build": "craco build", diff --git a/src/components/Table/ColumnMenu/FieldSettings/index.tsx b/src/components/Table/ColumnMenu/FieldSettings/index.tsx index fafdc6f2..6f369a16 100644 --- a/src/components/Table/ColumnMenu/FieldSettings/index.tsx +++ b/src/components/Table/ColumnMenu/FieldSettings/index.tsx @@ -128,8 +128,8 @@ export default function FieldSettings(props: IMenuModalProps) { rowyRun({ route: RunRoutes.buildFunction, body: { - triggerPath: "demoAllFieldTypes/{docId}", - // configPath: tableState?.config.tableConfig.path, + tablePath: tableState?.tablePath, + pathname: window.location.pathname, }, params: [], }); diff --git a/src/components/Table/TableHeader/Extensions/index.tsx b/src/components/Table/TableHeader/Extensions/index.tsx index b4d4441f..080ea227 100644 --- a/src/components/Table/TableHeader/Extensions/index.tsx +++ b/src/components/Table/TableHeader/Extensions/index.tsx @@ -90,7 +90,8 @@ export default function ExtensionsEditor() { rowyRun({ route: RunRoutes.buildFunction, body: { - triggerPath: "", + tablePath: tableState?.tablePath, + pathname: window.location.pathname, }, }); analytics.logEvent("deployed_extensions"); diff --git a/src/hooks/useTable/useTableData.tsx b/src/hooks/useTable/useTableData.tsx index d85b7eea..e1a06d90 100644 --- a/src/hooks/useTable/useTableData.tsx +++ b/src/hooks/useTable/useTableData.tsx @@ -255,7 +255,7 @@ const useTableData = () => { } catch (error: any) { console.log(error); if (error.code === "permission-denied") { - enqueueSnackbar("You do not have the permissions to delete rows.", { + enqueueSnackbar("You do not have the permissions to delete this row.", { variant: "error", }); }