Add 30 day delay for production status off
This commit is contained in:
@@ -812,7 +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 [currentOrg, setCurrentOrg] = useState(null);
|
||||
|
||||
const isCloud = window.location.host === "localhost:3002" || window.location.host === "shuffler.io";
|
||||
const [showExecutionStats, setShowExecutionStats] = React.useState(localStorage?.getItem("showExecutionStats") === "true")
|
||||
@@ -971,11 +971,8 @@ 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) {
|
||||
setCurrentOrg(org);
|
||||
if (org?.cloud_sync && org?.subscriptions[0]?.name?.toLowerCase().includes("enterprise") && org?.subscriptions[0]?.active) {
|
||||
setIsProdStatusOn(true);
|
||||
} else if (org?.subscriptions[0]?.name?.toLowerCase().includes("enterprise") && org?.subscriptions[0]?.active) {
|
||||
@@ -5523,7 +5520,7 @@ const Workflows2 = (props) => {
|
||||
</div>
|
||||
}
|
||||
|
||||
{!isCloud && showProductionStatus ? (
|
||||
{!isCloud && currentOrg?.old_org ? (
|
||||
<div
|
||||
style={{
|
||||
display: "flex",
|
||||
|
||||
Reference in New Issue
Block a user