Files
workouts/Workouts/Views/WorkoutLog/WorkoutStatus.swift
2025-07-25 17:42:25 -04:00

38 lines
785 B
Swift
Raw Permalink Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

//
// WorkoutStatus.swift
// Workouts
//
// Created by rzen on 7/16/25 at 7:03PM.
//
// Copyright 2025 Rouslan Zenetl. All Rights Reserved.
//
import Foundation
enum WorkoutStatus: Int, Codable {
case notStarted = 1
case inProgress = 2
case completed = 3
case skipped = 4
static var unnamed = "Undetermined"
var name: String {
switch (self) {
case .notStarted: "Not Started"
case .inProgress: "In Progress"
case .completed: "Completed"
case .skipped: "Skipped"
}
}
var checkboxStatus: CheckboxStatus {
switch (self) {
case .notStarted: .unchecked
case .inProgress: .intermediate
case .completed: .checked
case .skipped: .cancelled
}
}
}