Add delay for 30 days in production status offf

This commit is contained in:
lalitdeore12@gmail.com
2025-12-15 12:46:41 +05:30
parent b2f1c887de
commit 87aa510b67
2 changed files with 21 additions and 2 deletions
+6 -1
View File
@@ -812,6 +812,7 @@ const Workflows2 = (props) => {
const [isLoadingWorkflow, setIsLoadingWorkflow] = useState(false);
const [isLoadingPublicWorkflow, setIsLoadingPublicWorkflow] = useState(false);
const [view, setView] = useState(localStorage?.getItem("workflowView") || "grid");
const [showProductionStatus, setShowProductionStatus] = useState(false);
const isCloud = window.location.host === "localhost:3002" || window.location.host === "shuffler.io";
const [showExecutionStats, setShowExecutionStats] = React.useState(localStorage?.getItem("showExecutionStats") === "true")
@@ -970,6 +971,10 @@ const Workflows2 = (props) => {
.then((response) => (response.ok ? response.json() : null))
.then((org) => {
if (!fetched && org) {
const nowUnix = Math.floor(Date.now() / 1000);
const THIRTY_DAYS = 30 * 24 * 60 * 60;
const isAfter30Days = nowUnix >= org.created + THIRTY_DAYS;
setShowProductionStatus(isAfter30Days);
if (!isCloud) {
if (org?.cloud_sync && org?.subscriptions[0]?.name?.toLowerCase().includes("enterprise") && org?.subscriptions[0]?.active) {
setIsProdStatusOn(true);
@@ -5518,7 +5523,7 @@ const Workflows2 = (props) => {
</div>
}
{!isCloud ? (
{!isCloud && showProductionStatus ? (
<div
style={{
display: "flex",