mirror of
https://github.com/twentyhq/twenty.git
synced 2024-12-23 20:13:21 +03:00
729c990546
## Setup This PR can be tested only if some feature flags have specific values: - `IsWorkflowEnabled` equals `true` - `IsQueryRunnerTwentyORMEnabled` equals `false` These feature flags weren't committed to don't break other branches. ## What this PR brings - Display buttons to activate and deactivate a workflow version and a button to discard the current draft version. I also scaffolded a "Test" button, which doesn't do anything for now. - Wired the activate, deactivate and discard draft buttons to the backend. - Made it possible to "edit" active and deactivated versions by automatically creating a new draft version when the user tries to edit the version. - Hide the "Discard Draft", button if the current version is not a draft or is the first version ever created. - On the backend, don't consider discarded drafts when checking if a new draft version can be created. - On the backend, disallow deleting the first created workflow version. Otherwise, we will end up with a blank canvas in the front end, and it will be impossible to recover from it. - On the backend, disallow running deactivation steps if the workflow version is not currently active. Previously, we were throwing, which is unnecessary as it's a valid case. ## Spotted bugs that we must dive into ### Duplicate workflow versions in Apollo cache https://github.com/user-attachments/assets/7cfffd06-11e0-417a-8da0-f9a5f43b84e2 --------- Co-authored-by: Charles Bochet <charles@twenty.com>
48 lines
1.2 KiB
JSON
48 lines
1.2 KiB
JSON
{
|
|
"compilerOptions": {
|
|
"target": "ES2020",
|
|
"useDefineForClassFields": true,
|
|
"lib": ["ES2020", "DOM", "DOM.Iterable", "ES2023", "ES2023.Array"],
|
|
"module": "ESNext",
|
|
"skipLibCheck": true,
|
|
"allowJs": true,
|
|
"esModuleInterop": true,
|
|
"moduleResolution": "bundler",
|
|
"allowSyntheticDefaultImports": true,
|
|
"allowImportingTsExtensions": false,
|
|
"resolveJsonModule": true,
|
|
"isolatedModules": true,
|
|
"noEmit": true,
|
|
"jsx": "react-jsx",
|
|
"strict": true,
|
|
"noUnusedLocals": false,
|
|
"noUnusedParameters": false,
|
|
"noFallthroughCasesInSwitch": true,
|
|
"forceConsistentCasingInFileNames": true,
|
|
"outDir": "../../.cache/tsc",
|
|
"paths": {
|
|
"@/*": ["packages/twenty-front/src/modules/*"],
|
|
"~/*": ["packages/twenty-front/src/*"],
|
|
"twenty-ui": ["packages/twenty-ui/src/index.ts"],
|
|
"@ui/*": ["packages/twenty-ui/src/*"]
|
|
}
|
|
},
|
|
"files": [],
|
|
"include": [],
|
|
"references": [
|
|
{
|
|
"path": "./tsconfig.dev.json"
|
|
},
|
|
{
|
|
"path": "./tsconfig.build.json"
|
|
},
|
|
{
|
|
"path": "./tsconfig.spec.json"
|
|
},
|
|
{
|
|
"path": "./tsconfig.storybook.json"
|
|
}
|
|
],
|
|
"extends": "../../tsconfig.base.json"
|
|
}
|