[WEB-1183] fix: updated global issues filter while updating global view (#4357)

* chore: Updated global issues filter while updating global view

* fix: globale view modal clear all

---------

Co-authored-by: gurusainath <gurusainath007@gmail.com>
This commit is contained in:
Anmol Singh Bhatia 2024-05-03 20:29:11 +05:30 committed by GitHub
parent 527ecd7d22
commit c96225c812
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 75 additions and 27 deletions

View file

@ -96,12 +96,13 @@ export const GlobalViewsAppliedFiltersRoot = observer((props: Props) => {
...(appliedFilters ?? {}),
},
}).then((res) => {
captureEvent(GLOBAL_VIEW_UPDATED, {
view_id: res.id,
applied_filters: res.filters,
state: "SUCCESS",
element: "Spreadsheet view",
});
if (res)
captureEvent(GLOBAL_VIEW_UPDATED, {
view_id: res.id,
applied_filters: res.filters,
state: "SUCCESS",
element: "Spreadsheet view",
});
});
};

View file

@ -84,17 +84,19 @@ export const CreateUpdateWorkspaceViewModal: React.FC<Props> = observer((props)
await updateGlobalView(workspaceSlug.toString(), data.id, payloadData)
.then((res) => {
captureEvent(GLOBAL_VIEW_UPDATED, {
view_id: res.id,
applied_filters: res.filters,
state: "SUCCESS",
});
setToast({
type: TOAST_TYPE.SUCCESS,
title: "Success!",
message: "View updated successfully.",
});
handleClose();
if (res) {
captureEvent(GLOBAL_VIEW_UPDATED, {
view_id: res.id,
applied_filters: res.filters,
state: "SUCCESS",
});
setToast({
type: TOAST_TYPE.SUCCESS,
title: "Success!",
message: "View updated successfully.",
});
handleClose();
}
})
.catch(() => {
captureEvent(GLOBAL_VIEW_UPDATED, {