mirror of
https://github.com/rowyio/rowy.git
synced 2025-12-29 00:16:39 +01:00
add tracked fields to extention initial object
This commit is contained in:
@@ -172,12 +172,13 @@ export function emptyExtensionObject(
|
||||
user: IExtensionEditor
|
||||
): IExtension {
|
||||
return {
|
||||
name: "Untitled extension",
|
||||
name: `${type} extension`,
|
||||
active: false,
|
||||
triggers: [],
|
||||
type,
|
||||
extensionBody: extensionBodyTemplate[type] ?? extensionBodyTemplate["task"],
|
||||
requiredFields: [],
|
||||
trackedFields: [],
|
||||
conditions: `const condition: Condition = async({row, change}) => {
|
||||
// feel free to add your own code logic here
|
||||
return true;
|
||||
|
||||
@@ -303,13 +303,10 @@ export const ProjectContextProvider: React.FC = ({ children }) => {
|
||||
() => console.log("Field Value deleted"),
|
||||
(error) => {
|
||||
if (error.code === "permission-denied") {
|
||||
enqueueSnackbar(
|
||||
`You do not have the permissions to make this change.`,
|
||||
{
|
||||
variant: "error",
|
||||
anchorOrigin: { horizontal: "center", vertical: "top" },
|
||||
}
|
||||
);
|
||||
enqueueSnackbar(`You don't have permission to delete this field`, {
|
||||
variant: "error",
|
||||
anchorOrigin: { horizontal: "center", vertical: "top" },
|
||||
});
|
||||
} else {
|
||||
enqueueSnackbar(error.message, {
|
||||
variant: "error",
|
||||
|
||||
Reference in New Issue
Block a user