chore: project state events updated

This commit is contained in:
LAKHAN BAHETI 2024-03-04 13:54:59 +05:30
parent 6108f98adb
commit c94375e3c7
3 changed files with 4 additions and 2 deletions

View File

@ -44,7 +44,7 @@ export const CreateUpdateStateInline: React.FC<Props> = observer((props) => {
// form info
const {
handleSubmit,
formState: { errors, isSubmitting },
formState: { errors, isSubmitting, dirtyFields},
watch,
reset,
control,
@ -131,6 +131,7 @@ export const CreateUpdateStateInline: React.FC<Props> = observer((props) => {
eventName: STATE_UPDATED,
payload: {
...res,
change_details: Object.keys(dirtyFields),
state: "SUCCESS",
element: "Project settings states page",
},

View File

@ -103,7 +103,7 @@ export const StatesListItem: React.FC<Props> = observer((props) => {
state.default || groupLength === 1 ? "cursor-not-allowed" : ""
} grid place-items-center`}
onClick={() => {
setTrackElement("PROJECT_SETTINGS_STATE_PAGE");
setTrackElement("Project settings states page");
handleDeleteState();
}}
disabled={state.default || groupLength === 1}

View File

@ -120,6 +120,7 @@ export const getProjectStateEventPayload = (payload: any) => {
default: payload.default,
state: payload.state,
element: payload.element,
change_details: payload.change_details,
};
};