Skip to content

Commit 98158a9

Browse files
committed
Add filter view for bookings
1 parent 26a1be1 commit 98158a9

File tree

7 files changed

+432
-1
lines changed

7 files changed

+432
-1
lines changed
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
import Foundation
2+
3+
/// Used to filter bookings by date range
4+
///
5+
public struct BookingDateRangeFilter: Codable, Equatable, Hashable {
6+
/// Start date of the range (inclusive)
7+
///
8+
public let startDate: Date?
9+
10+
/// End date of the range (inclusive)
11+
///
12+
public let endDate: Date?
13+
14+
public init(startDate: Date? = nil,
15+
endDate: Date? = nil) {
16+
self.startDate = startDate
17+
self.endDate = endDate
18+
}
19+
20+
enum CodingKeys: String, CodingKey {
21+
case startDate = "start_date"
22+
case endDate = "end_date"
23+
}
24+
}
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
import Foundation
2+
3+
/// Used to filter bookings by product
4+
///
5+
public struct FilterBookingsByProduct: Codable, Hashable {
6+
/// ID of the product
7+
///
8+
public let id: Int64
9+
10+
/// Name of the product
11+
///
12+
public let name: String
13+
14+
public init(id: Int64,
15+
name: String) {
16+
self.id = id
17+
self.name = name
18+
}
19+
}

Modules/Sources/Yosemite/Model/Model.swift

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@ public typealias BlazeTargetOptions = Networking.BlazeTargetOptions
2626
public typealias BlazeTargetLocation = Networking.BlazeTargetLocation
2727
public typealias BlazeTargetTopic = Networking.BlazeTargetTopic
2828
public typealias Booking = Networking.Booking
29+
public typealias BookingStatus = Networking.BookingStatus
30+
public typealias BookingAttendanceStatus = Networking.BookingAttendanceStatus
2931
public typealias BookingOrderInfo = Networking.BookingOrderInfo
3032
public typealias BookingCustomerInfo = Networking.BookingCustomerInfo
3133
public typealias BookingPaymentInfo = Networking.BookingPaymentInfo

0 commit comments

Comments
 (0)