enum CommitmentStatus {
  Open,
  Completed,
  LateCompleted,
  Overdue,
  Deferred,
  Abandoned,
  Archived,
}

CommitmentStatus getCommitmentStatus(String? name) {
  for (CommitmentStatus value in CommitmentStatus.values) {
    if (value.name == name) {
      return value;
    }
  }
  return CommitmentStatus.Open;
}
