Skip to content
This repository was archived by the owner on Oct 12, 2025. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
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
12 changes: 6 additions & 6 deletions HIAPI/Models/Staff.swift
Original file line number Diff line number Diff line change
Expand Up @@ -23,37 +23,37 @@ 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 mapImageUrl
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 mapImageUrl: String?
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.3;
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.3;
ONLY_ACTIVE_ARCH = YES;
PRODUCT_BUNDLE_IDENTIFIER = org.hackillinois.ios;
PRODUCT_NAME = "$(TARGET_NAME)";
Expand Down
6 changes: 4 additions & 2 deletions HackIllinois/FlowControllers/HITabBarController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,10 @@ class HITabBarController: UITabBarController {

override func viewDidLoad() {
super.viewDidLoad()
setupQRScanButton()
setupTabBar()
if !(UIDevice.current.userInterfaceIdiom == .pad) {
setupQRScanButton()
setupTabBar()
}
}

override func viewDidLayoutSubviews() {
Expand Down
40 changes: 15 additions & 25 deletions HackIllinois/ViewControllers/HIScheduleViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -117,35 +117,23 @@ extension HIScheduleViewController {
}

func currentPredicate() -> NSPredicate {
if onlyShifts {
// Return a predicate that matches no events when in shifts view
return NSPredicate(value: false)
} else if onlyFavorites {
let currentTabPredicate = dataStore[currentTab].predicate
return NSCompoundPredicate(andPredicateWithSubpredicates: [currentTabPredicate, onlyFavoritesPredicate])
let currentTabPredicate = dataStore[currentTab].predicate
if onlyFavorites {
let compoundPredicate = NSCompoundPredicate(andPredicateWithSubpredicates: [currentTabPredicate, onlyFavoritesPredicate])
return compoundPredicate
} else if onlyShifts {
let noEventsPredicate = NSPredicate(value: false)
return noEventsPredicate
} else {
return dataStore[currentTab].predicate
return currentTabPredicate
}
}

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 Expand Up @@ -382,7 +370,7 @@ extension HIScheduleViewController {

@objc func shiftsButtonTapped(_ sender: UIButton) {
if !onlyShifts {
onlyShifts = true
onlyShifts = !onlyShifts
backgroundView.image = #imageLiteral(resourceName: "BackgroundShifts")
hasSelectedShift = true
labelColor = #colorLiteral(red: 0.337254902, green: 0.1411764706, blue: 0.06666666667, alpha: 1)
Expand All @@ -404,6 +392,8 @@ extension HIScheduleViewController {

DispatchQueue.main.async {
self.setUpShiftCells()
self.updatePredicate()
self.animateReload()
}
} catch {
print("An error has occurred in getting staff shifts \(error)")
Expand Down Expand Up @@ -443,7 +433,7 @@ extension HIScheduleViewController {
let calendar = Calendar.current
let dayComponent = calendar.component(.day, from: dateString)
var curr_idx = segmentedControl.selectedIndex
if curr_idx == 0 && dayComponent != 28 {
if curr_idx == 0 && dayComponent != 29 {
continue
} else if curr_idx == 1 && dayComponent != 1 {
continue
Expand Down