= observer((props) => {
if (!groupList) return null;
const visibilityGroupBy = (_list: IGroupByColumn): { showGroup: boolean; showIssues: boolean } => {
- if (subGroupBy) {
- const groupVisibility = {
- showGroup: true,
- showIssues: true,
- };
- if (!showEmptyGroup) {
- groupVisibility.showGroup = (getGroupIssueCount(_list.id, undefined, false) ?? 0) > 0;
- }
- return groupVisibility;
- } else {
- const groupVisibility = {
- showGroup: true,
- showIssues: true,
- };
- return groupVisibility;
+ const groupVisibility = {
+ showGroup: true,
+ showIssues: true,
+ };
+
+ if (!showEmptyGroup) {
+ groupVisibility.showGroup = (getGroupIssueCount(_list.id, undefined, false) ?? 0) > 0;
}
+ return groupVisibility;
};
return (
From 0b01d3e88d6335de677f088d34042152c387fd18 Mon Sep 17 00:00:00 2001
From: Anmol Singh Bhatia <121005188+anmolsinghbhatia@users.noreply.github.com>
Date: Tue, 30 Jul 2024 19:57:57 +0530
Subject: [PATCH 5/7] fix: workspace export settings mutation (#5268)
---
web/core/components/exporter/guide.tsx | 26 +++++++++++++++++++-------
1 file changed, 19 insertions(+), 7 deletions(-)
diff --git a/web/core/components/exporter/guide.tsx b/web/core/components/exporter/guide.tsx
index 7096555ec1..eff265a3ff 100644
--- a/web/core/components/exporter/guide.tsx
+++ b/web/core/components/exporter/guide.tsx
@@ -1,6 +1,6 @@
"use client";
-import { useState } from "react";
+import { useEffect, useState } from "react";
import { observer } from "mobx-react";
import Image from "next/image";
import Link from "next/link";
@@ -51,6 +51,11 @@ const IntegrationGuide = observer(() => {
: null
);
+ const handleRefresh = () => {
+ setRefreshing(true);
+ mutate(EXPORT_SERVICES_LIST(workspaceSlug as string, `${cursor}`, `${per_page}`)).then(() => setRefreshing(false));
+ };
+
const handleCsvClose = () => {
router.replace(`/${workspaceSlug?.toString()}/settings/exports`);
};
@@ -58,6 +63,18 @@ const IntegrationGuide = observer(() => {
const hasProjects = workspaceProjectIds && workspaceProjectIds.length > 0;
const isAdmin = currentWorkspaceRole === EUserWorkspaceRoles.ADMIN;
+ useEffect(() => {
+ const interval = setInterval(() => {
+ if (exporterServices?.results?.some((service) => service.status === "processing")) {
+ handleRefresh();
+ } else {
+ clearInterval(interval);
+ }
+ }, 3000);
+
+ return () => clearInterval(interval);
+ }, [exporterServices]);
+
return (
<>
@@ -103,12 +120,7 @@ const IntegrationGuide = observer(() => {