@@ -141,7 +141,7 @@ final class BookingFiltersViewModel: FilterListViewModel {
141141 readable. append ( product. name)
142142 }
143143 if let attendanceStatus {
144- readable. append ( attendanceStatus. rawValue ) // TODO: update to localized title when available
144+ readable. append ( attendanceStatus. localizedTitle )
145145 }
146146 if let paymentStatus {
147147 readable. append ( paymentStatus. localizedTitle)
@@ -230,16 +230,14 @@ extension BookingFiltersViewModel.BookingListFilter {
230230
231231// MARK: - FilterType conformance
232232extension BookingResource : FilterType {
233- public var description : String { name }
234- public var isActive : Bool { true }
233+ var description : String { name }
234+ var isActive : Bool { true }
235235}
236236
237237extension BookingAttendanceStatus : FilterType {
238- public var description : String {
239- " " // TODO: use localized title later
240- }
238+ var description : String { localizedTitle }
241239
242- public var isActive : Bool {
240+ var isActive : Bool {
243241 switch self {
244242 case . booked, . checkedIn, . cancelled, . noShow:
245243 return true
@@ -250,9 +248,9 @@ extension BookingAttendanceStatus: FilterType {
250248}
251249
252250extension BookingStatus : FilterType {
253- public var description : String { localizedTitle }
251+ var description : String { localizedTitle }
254252
255- public var isActive : Bool {
253+ var isActive : Bool {
256254 switch self {
257255 case . complete, . paid, . unpaid, . cancelled, . pendingConfirmation, . confirmed:
258256 return true
@@ -264,14 +262,14 @@ extension BookingStatus: FilterType {
264262
265263extension FilterBookingsByProduct : FilterType {
266264 /// The user-facing description of the filter value.
267- public var description : String { name }
265+ var description : String { name }
268266
269267 /// Whether the filter is set to a non-empty value.
270- public var isActive : Bool { true }
268+ var isActive : Bool { true }
271269}
272270
273271extension BookingDateRangeFilter : FilterType {
274- public var description : String {
272+ var description : String {
275273 // TODO: Format dates nicely when implementing date range selector
276274 if let startDate = startDate, let endDate = endDate {
277275 let formatter = DateFormatter ( )
@@ -299,7 +297,7 @@ extension BookingDateRangeFilter: FilterType {
299297 }
300298 }
301299
302- public var isActive : Bool {
300+ var isActive : Bool {
303301 startDate != nil || endDate != nil
304302 }
305303}
0 commit comments