This commit is contained in:
IDONTSUDO 2024-05-02 17:30:59 +03:00
parent 8bc943de2c
commit c49beb8218
3 changed files with 21 additions and 56 deletions

View file

@ -100,6 +100,21 @@ export const SkillCard = (props: ISkillCardProps) => {
<div style={{ height: 10 }} />
<div>
{match(props.processStatus)
.with(ProcessStatus.ERROR, () => (
<>
<CoreButton
style={{
backgroundColor: "red",
}}
onClick={() => {
if (props.startOnClick && props.id) props.startOnClick(props.id);
}}
filled={true}
text="Ошибка"
/>
</>
))
.with(ProcessStatus.END, () => (
<>
<CoreButton
@ -140,53 +155,3 @@ export const SkillCard = (props: ISkillCardProps) => {
</div>
);
};
// {props.processStatus === ProcessStatus.NONE ? (
// <>
// <div style={{ height: 10 }} />
// <CoreButton
// text="продолжить"
// onClick={() => {
// if (props.continueOnClick && props.id) props.continueOnClick(props.id);
// }}
// />
// </>
// ) : null}
// {props.processStatus === ProcessStatus.END ? (
// <>
// <CoreButton
// text="старт"
// onClick={() => {
// if (props.startOnClick && props.id) props.startOnClick(props.id);
// }}
// />
// <div style={{ height: 10 }} />
// <CoreButton
// text="продолжить"
// onClick={() => {
// if (props.continueOnClick && props.id) props.continueOnClick(props.id);
// }}
// />
// </>
// ) : null}
// {props.processStatus === ProcessStatus.RUN ? (
// <>
// <CoreButton
// onClick={() => {
// // if (props.type.isEqual(CardDataSetType.COMPLETED) && props.onClickButton && props.id) {
// // props.onClickButton(props.id);
// }}
// block={true}
// text="Стоп"
// />
// </>
// ) : null}
// {props.processStatus === ProcessStatus.ERROR ? (
// <CoreButton
// style={{
// backgroundColor: "red",
// }}
// onClick={() => {}}
// filled={true}
// text="Ошибка"
// />
// ) : null}