feat: Clone automation rules (#3893)
Co-authored-by: Muhsin Keloth <muhsinkeramam@gmail.com>
This commit is contained in:
parent
8821106da9
commit
fc1f257793
6 changed files with 70 additions and 26 deletions
|
@ -66,6 +66,16 @@ export const actions = {
|
|||
commit(types.SET_AUTOMATION_UI_FLAG, { isDeleting: false });
|
||||
}
|
||||
},
|
||||
clone: async ({ commit }, id) => {
|
||||
commit(types.SET_AUTOMATION_UI_FLAG, { isCloning: true });
|
||||
try {
|
||||
await AutomationAPI.clone(id);
|
||||
} catch (error) {
|
||||
throw new Error(error);
|
||||
} finally {
|
||||
commit(types.SET_AUTOMATION_UI_FLAG, { isCloning: false });
|
||||
}
|
||||
},
|
||||
};
|
||||
|
||||
export const mutations = {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue