diff --git a/src/features/challenges/Challenge.vue b/src/features/challenges/Challenge.vue index 7960607..f98aa0a 100644 --- a/src/features/challenges/Challenge.vue +++ b/src/features/challenges/Challenge.vue @@ -12,12 +12,16 @@ feature: true, challenge: true, done: unref(completed), - canStart: unref(canStart), + canStart: unref(canStart) && !unref(maxed), maxed: unref(maxed), ...unref(classes) }" > - diff --git a/src/features/challenges/challenge.tsx b/src/features/challenges/challenge.tsx index 9ecf8a9..9ec22e3 100644 --- a/src/features/challenges/challenge.tsx +++ b/src/features/challenges/challenge.tsx @@ -73,7 +73,7 @@ export type Challenge = Replace< T & BaseChallenge, { visibility: GetComputableTypeWithDefault; - canStart: GetComputableTypeWithDefault>; + canStart: GetComputableTypeWithDefault; canComplete: GetComputableTypeWithDefault>; completionLimit: GetComputableTypeWithDefault; mark: GetComputableTypeWithDefault>; @@ -209,6 +209,7 @@ export function createChallenge( } processComputable(challenge as T, "canStart"); + setDefault(challenge, "canStart", true); processComputable(challenge as T, "canComplete"); processComputable(challenge as T, "completionLimit"); setDefault(challenge, "completionLimit", 1);