chore: inbox issue restructure the components and store (#3456)

* chore: inbox-issues store and type updates

* chore: issue inbox payload change for GET and POST

* chore: issue inbox payload change for PATCH

* chore: inbox-issue new hooks and store updates

* chore: update inbox issue template.

* chore: UI root

* chore: sidebar issues render

* chore: inbox issue details page layout.

* chore: inbox issue filters

* chore: inbox issue status card.

* chore: add loader.

* chore: active inbox issue styles.

* chore: inbox filters

* chore: inbox applied filters UI

* chore: inbox issue approval header

* chore: inbox issue approval header operations

* chore: issue reaction and activity fetch in issue_inbox store

* chore: posthog enabled

---------

Co-authored-by: NarayanBavisetti <narayan3119@gmail.com>
Co-authored-by: Prateek Shourya <prateekshourya29@gmail.com>
This commit is contained in:
guru_sainath 2024-01-24 20:33:54 +05:30 committed by GitHub
parent 911211cf3d
commit b66f07845a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
52 changed files with 1998 additions and 1457 deletions

View file

@ -30,14 +30,14 @@ interface IProjectAuthWrapper {
export const ProjectAuthWrapper: FC<IProjectAuthWrapper> = observer((props) => {
const { children } = props;
// store
const { fetchInboxesList, isInboxEnabled } = useInbox();
const { fetchInboxes } = useInbox();
const {
commandPalette: { toggleCreateProjectModal },
} = useApplication();
const {
membership: { fetchUserProjectInfo, projectMemberInfo, hasPermissionToProject },
} = useUser();
const { getProjectById, fetchProjectDetails } = useProject();
const { getProjectById, fetchProjectDetails, currentProjectDetails } = useProject();
const { fetchAllCycles } = useCycle();
const { fetchModules } = useModule();
const { fetchViews } = useProjectView();
@ -96,11 +96,13 @@ export const ProjectAuthWrapper: FC<IProjectAuthWrapper> = observer((props) => {
workspaceSlug && projectId ? `PROJECT_VIEWS_${workspaceSlug}_${projectId}` : null,
workspaceSlug && projectId ? () => fetchViews(workspaceSlug.toString(), projectId.toString()) : null
);
// fetching project inboxes if inbox is enabled
// fetching project inboxes if inbox is enabled in project settings
useSWR(
workspaceSlug && projectId && isInboxEnabled ? `PROJECT_INBOXES_${workspaceSlug}_${projectId}` : null,
workspaceSlug && projectId && isInboxEnabled
? () => fetchInboxesList(workspaceSlug.toString(), projectId.toString())
workspaceSlug && projectId && currentProjectDetails && currentProjectDetails.inbox_view
? `PROJECT_INBOXES_${workspaceSlug}_${projectId}`
: null,
workspaceSlug && projectId && currentProjectDetails && currentProjectDetails.inbox_view
? () => fetchInboxes(workspaceSlug.toString(), projectId.toString())
: null,
{
revalidateOnFocus: false,