feat(healthchat): advertise the account status in settings

Pending approval and an incomplete profile were only visible in the
members tab, which a new user has no reason to open.
This commit is contained in:
Sedat Qaja
2026-10-09 14:39:33 +02:00
parent b70e77f7c5
commit d01d04846a
22 changed files with 349 additions and 2 deletions
@@ -0,0 +1,20 @@
//
// Copyright 2026 Novaloop AG
//
// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial.
// Please see LICENSE files in the repository root for full details.
//
import Foundation
/// What is holding an account back from using the whole app.
nonisolated enum HealthChatAccountStatus: Equatable {
/// Nothing is known, e.g. the API is unreachable. Renders nothing — never an error.
case unknown
/// Not approved by an admin yet. Takes precedence over ``incompleteProfile``,
/// as completing a profile does nothing for an unapproved account.
case pendingApproval
/// Approved, but the server reports missing profile fields. The message is its wording.
case incompleteProfile(message: String)
case ok
}