Skip to content

Commit

Permalink
Merge branch 'bal-3178' of github.com:ballerine-io/ballerine into bal…
Browse files Browse the repository at this point in the history
…-3178
  • Loading branch information
Omri-Levy committed Dec 12, 2024
2 parents b9e0302 + a85ee6f commit c4c6f56
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,16 @@ interface Props {
export const StepperProgress = ({ currentStep, totalSteps }: Props) => {
const { t } = useTranslation();

return <span className="font-inter">{`${t('step')} ${currentStep} / ${totalSteps}`}</span>;
return (
<div className="flex items-center gap-2">
<div className="flex items-center gap-2">
<span className="text-s font-medium text-slate-600">{t('step')}</span>
<div className="flex items-center gap-2">
<span className="text-s font-medium text-blue-500">{currentStep}</span>
<span className="text-s font-medium text-slate-400">/</span>
<span className="text-s font-medium text-slate-600">{totalSteps}</span>
</div>
</div>
</div>
);
};
1 change: 1 addition & 0 deletions packages/workflow-core/src/lib/built-in-event.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
export const BUILT_IN_EVENT = {
UPDATE_CONTEXT: 'UPDATE_CONTEXT',
DEEP_MERGE_CONTEXT: 'DEEP_MERGE_CONTEXT',
NO_OP: 'NO_OP',
} as const;

export type BuiltInEvent = (typeof BUILT_IN_EVENT)[keyof typeof BUILT_IN_EVENT];
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,6 @@ export const validateTransitionOnEvent = ({

throw Error(`Unexpected transition object: ${JSON.stringify(transition)}`);
};
const targetState = getTargetState();

if (
isObject(transition) &&
Expand All @@ -89,6 +88,8 @@ export const validateTransitionOnEvent = ({
return;
}

const targetState = getTargetState();

if (!stateNames.includes(targetState)) {
throw new Error(`Invalid transition from ${currentState} to ${targetState}`);
}
Expand Down

0 comments on commit c4c6f56

Please sign in to comment.