Add Activepieces integration for workflow automation
- Add Activepieces fork with SmoothSchedule custom piece - Create integrations app with Activepieces service layer - Add embed token endpoint for iframe integration - Create Automations page with embedded workflow builder - Add sidebar visibility fix for embed mode - Add list inactive customers endpoint to Public API - Include SmoothSchedule triggers: event created/updated/cancelled - Include SmoothSchedule actions: create/update/cancel events, list resources/services/customers 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,58 @@
|
||||
import { t } from 'i18next';
|
||||
import React from 'react';
|
||||
|
||||
import {
|
||||
Tooltip,
|
||||
TooltipContent,
|
||||
TooltipTrigger,
|
||||
} from '@/components/ui/tooltip';
|
||||
import { FlowVersionState } from '@activepieces/shared';
|
||||
|
||||
type FlowVersionStateProps = {
|
||||
state: FlowVersionState;
|
||||
publishedVersionId: string | undefined | null;
|
||||
versionId: string;
|
||||
};
|
||||
|
||||
const findVersionStateName: (
|
||||
state: FlowVersionStateProps,
|
||||
) => 'Draft' | 'Published' | 'Locked' = ({
|
||||
state,
|
||||
publishedVersionId,
|
||||
versionId,
|
||||
}) => {
|
||||
if (state === FlowVersionState.DRAFT) {
|
||||
return 'Draft';
|
||||
}
|
||||
if (publishedVersionId === versionId) {
|
||||
return 'Published';
|
||||
}
|
||||
return 'Locked';
|
||||
};
|
||||
const FlowVersionStateDot = React.memo((state: FlowVersionStateProps) => {
|
||||
const stateName = findVersionStateName(state);
|
||||
if (stateName === 'Locked') {
|
||||
return null;
|
||||
}
|
||||
return (
|
||||
<Tooltip>
|
||||
<TooltipTrigger asChild>
|
||||
<div className="size-8 flex justify-center items-center">
|
||||
{stateName === 'Draft' && (
|
||||
<span className="bg-warning size-1.5 rounded-full"></span>
|
||||
)}
|
||||
{stateName === 'Published' && (
|
||||
<span className="bg-success size-1.5 rounded-full"></span>
|
||||
)}
|
||||
</div>
|
||||
</TooltipTrigger>
|
||||
<TooltipContent>
|
||||
{stateName === 'Draft' && t('Draft')}
|
||||
{stateName === 'Published' && t('Published')}
|
||||
</TooltipContent>
|
||||
</Tooltip>
|
||||
);
|
||||
});
|
||||
|
||||
FlowVersionStateDot.displayName = 'FlowVersionStateDot';
|
||||
export { FlowVersionStateDot };
|
||||
Reference in New Issue
Block a user