|
|
|
@ -12,18 +12,20 @@ export enum TabType {
|
|
|
|
type Props = {
|
|
|
|
type Props = {
|
|
|
|
value: TabType,
|
|
|
|
value: TabType,
|
|
|
|
onChange: (value: TabType) => void
|
|
|
|
onChange: (value: TabType) => void
|
|
|
|
|
|
|
|
canSwitchToLastRun: boolean
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
const Tab: FC<Props> = ({
|
|
|
|
const Tab: FC<Props> = ({
|
|
|
|
value,
|
|
|
|
value,
|
|
|
|
onChange,
|
|
|
|
onChange,
|
|
|
|
|
|
|
|
canSwitchToLastRun,
|
|
|
|
}) => {
|
|
|
|
}) => {
|
|
|
|
const { t } = useTranslation()
|
|
|
|
const { t } = useTranslation()
|
|
|
|
return (
|
|
|
|
return (
|
|
|
|
<TabHeader
|
|
|
|
<TabHeader
|
|
|
|
items={[
|
|
|
|
items={[
|
|
|
|
{ id: TabType.settings, name: t('workflow.debug.settingsTab').toLocaleUpperCase() },
|
|
|
|
{ id: TabType.settings, name: t('workflow.debug.settingsTab').toLocaleUpperCase() },
|
|
|
|
{ id: TabType.lastRun, name: t('workflow.debug.lastRunTab').toLocaleUpperCase(), disabled: true }, // TODO: add disabled logic
|
|
|
|
{ id: TabType.lastRun, name: t('workflow.debug.lastRunTab').toLocaleUpperCase(), disabled: !canSwitchToLastRun },
|
|
|
|
]}
|
|
|
|
]}
|
|
|
|
itemClassName='ml-0'
|
|
|
|
itemClassName='ml-0'
|
|
|
|
value={value}
|
|
|
|
value={value}
|
|
|
|
|