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 // form info
const { const {
handleSubmit, handleSubmit,
formState: { errors, isSubmitting }, formState: { errors, isSubmitting, dirtyFields},
watch, watch,
reset, reset,
control, control,
@ -131,6 +131,7 @@ export const CreateUpdateStateInline: React.FC<Props> = observer((props) => {
eventName: STATE_UPDATED, eventName: STATE_UPDATED,
payload: { payload: {
...res, ...res,
change_details: Object.keys(dirtyFields),
state: "SUCCESS", state: "SUCCESS",
element: "Project settings states page", 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" : "" state.default || groupLength === 1 ? "cursor-not-allowed" : ""
} grid place-items-center`} } grid place-items-center`}
onClick={() => { onClick={() => {
setTrackElement("PROJECT_SETTINGS_STATE_PAGE"); setTrackElement("Project settings states page");
handleDeleteState(); handleDeleteState();
}} }}
disabled={state.default || groupLength === 1} disabled={state.default || groupLength === 1}

View File

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