-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathAppAdminEntry.swift
More file actions
39 lines (32 loc) · 1.24 KB
/
AppAdminEntry.swift
File metadata and controls
39 lines (32 loc) · 1.24 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
import Foundation
public extension DTOv1 {
struct AppAdminEntry: Codable, Identifiable, Equatable {
public init(id: UUID, appName: String?, organisationName: String?, organisationID: UUID?, signalCount: Int, userCount: Int) {
self.id = id
self.appName = appName
self.organisationName = organisationName
self.organisationID = organisationID
self.signalCount = signalCount
self.userCount = userCount
}
public let id: UUID
public let appName: String?
public let organisationName: String?
public let organisationID: UUID?
public let signalCount: Int
public let userCount: Int
func resolvedAppName() -> String {
guard let appName = appName else { return "–" }
if appName == "w", organisationName == "XAN Software GmbH & Co. KG" {
return "DouWatch"
}
if appName == "WristW", organisationName == "XAN Software GmbH & Co. KG" {
return "WristWeb"
}
if appName == "ww", organisationName == "XAN Software GmbH & Co. KG" {
return "WristWeb"
}
return appName
}
}
}