Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix staff shift model #636

Open
wants to merge 6 commits into
base: dev
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 4 additions & 6 deletions HIAPI/Models/Staff.swift
Original file line number Diff line number Diff line change
Expand Up @@ -23,37 +23,35 @@ public struct StaffContainer: Decodable, APIReturnable {

public struct Staff: Codable {
internal enum CodingKeys: String, CodingKey {
case isPro
case _id
case eventId
case isStaff
case name
case description
case startTime
case endTime
case eventType
case exp
case locations
case isAsync
case mapImageUrl
case points
case isPrivate
case displayOnStaffCheckIn
case isPro
}
public let isPro: Bool
public let _id: String
public let eventId: String
public let isStaff: Bool
public let name: String
public let description: String
public let startTime: Date
public let endTime: Date
public let eventType: String
public let exp: Int
public let locations: [Location]
public let isAsync: Bool
public let mapImageUrl: String
public let points: Int
public let isPrivate: Bool
public let displayOnStaffCheckIn: Bool
public let isPro: Bool

}

Expand Down
4 changes: 2 additions & 2 deletions HackIllinois.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -1380,7 +1380,7 @@
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 2025.1.1;
MARKETING_VERSION = 2025.1.2;
ONLY_ACTIVE_ARCH = YES;
OTHER_SWIFT_FLAGS = "$(inherited) \"-D\" \"COCOAPODS\" -Xfrontend -warn-long-expression-type-checking=150";
PRODUCT_BUNDLE_IDENTIFIER = org.hackillinois.ios;
Expand Down Expand Up @@ -1417,7 +1417,7 @@
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 2025.1.1;
MARKETING_VERSION = 2025.1.2;
ONLY_ACTIVE_ARCH = YES;
PRODUCT_BUNDLE_IDENTIFIER = org.hackillinois.ios;
PRODUCT_NAME = "$(TARGET_NAME)";
Expand Down
19 changes: 3 additions & 16 deletions HackIllinois/ViewControllers/HIScheduleViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -130,22 +130,9 @@ extension HIScheduleViewController {

func animateReload() {
try? fetchedResultsController.performFetch()

if onlyShifts {
// Clear schedule events
tableView?.reloadData()

// Make sure shifts are displayed if we have them
if hasSelectedShift && !staffShifts.isEmpty {
removeStaffShiftContainerViews() // Clear old shift views
setUpShiftCells() // Re-display current shifts
}
} else {
// Normal reload for schedule view
animateTableViewReload()
if let tableView = tableView, !tableView.visibleCells.isEmpty {
tableView.scrollToRow(at: IndexPath(row: 0, section: 0), at: .top, animated: false)
}
animateTableViewReload()
if let tableView = tableView, !tableView.visibleCells.isEmpty {
tableView.scrollToRow(at: IndexPath(row: 0, section: 0), at: .top, animated: false)
}
}
}
Expand Down