feat: Initial purchase order views, login seems to be broken though.
This commit is contained in:
@@ -34,6 +34,28 @@ public extension VendorBranch {
|
||||
}
|
||||
}
|
||||
|
||||
struct Detail: Codable, Equatable, Identifiable, Sendable {
|
||||
public var id: UUID
|
||||
public var name: String
|
||||
public var vendor: Vendor
|
||||
public var createdAt: Date?
|
||||
public var updatedAt: Date?
|
||||
|
||||
public init(
|
||||
id: UUID,
|
||||
name: String,
|
||||
vendor: Vendor,
|
||||
createdAt: Date? = nil,
|
||||
updatedAt: Date? = nil
|
||||
) {
|
||||
self.id = id
|
||||
self.name = name
|
||||
self.vendor = vendor
|
||||
self.createdAt = createdAt
|
||||
self.updatedAt = updatedAt
|
||||
}
|
||||
}
|
||||
|
||||
struct Update: Codable, Sendable {
|
||||
public let name: String?
|
||||
|
||||
@@ -44,30 +66,6 @@ public extension VendorBranch {
|
||||
}
|
||||
|
||||
#if DEBUG
|
||||
// public extension VendorBranch {
|
||||
//
|
||||
// static func generateMocks(countPerVendor: Int = 3, vendors: [Vendor]) -> [Self] {
|
||||
// @Dependency(\.date.now) var now
|
||||
// @Dependency(\.uuid) var uuid
|
||||
//
|
||||
// var output = [Self]()
|
||||
//
|
||||
// for vendor in vendors {
|
||||
// for _ in 0 ... countPerVendor {
|
||||
// output.append(.init(
|
||||
// id: uuid(),
|
||||
// name: RandomNames.cityNames.randomElement()!,
|
||||
// vendorID: vendor.id,
|
||||
// createdAt: now,
|
||||
// updatedAt: now
|
||||
// ))
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// return output
|
||||
// }
|
||||
// }
|
||||
|
||||
public extension VendorBranch.Create {
|
||||
|
||||
static func generateMocks(countPerVendor: Int = 3, vendors: [Vendor]) -> [Self] {
|
||||
|
||||
Reference in New Issue
Block a user