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

Updated Schedule Page for HackIllinois 2024 #572

Merged
merged 37 commits into from
Feb 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
d1f943c
Updating UI
s0phialiu Dec 19, 2023
3710402
Updating UI
s0phialiu Dec 19, 2023
2f63742
Updating UI
s0phialiu Dec 19, 2023
cb178cc
changes
s0phialiu Jan 8, 2024
05f7fdf
changes
s0phialiu Jan 8, 2024
137b5c4
changes
s0phialiu Jan 8, 2024
6a8cbb8
Merge remote-tracking branch 'origin/dev' into sophia/update-schedule…
s0phialiu Jan 8, 2024
874582b
Merge remote-tracking branch 'origin/dev' into sophia/update-schedule…
s0phialiu Jan 9, 2024
9ddc2fd
changes
s0phialiu Jan 9, 2024
9920893
fixed event favorites, added in follow and unfollow endpoints
s0phialiu Jan 10, 2024
55bc4a3
Merge remote-tracking branch 'origin/dev' into sophia/update-schedule…
s0phialiu Jan 10, 2024
51f5408
added functionality to toggle between schedule/shifts
s0phialiu Jan 10, 2024
1237af1
added functionality to toggle between schedule/shifts
s0phialiu Jan 10, 2024
4eb1116
cleaning up
s0phialiu Jan 11, 2024
b40ffcf
Merge remote-tracking branch 'origin/dev' into sophia/update-schedule…
s0phialiu Jan 12, 2024
7c9ac67
started setting up staff shifts
s0phialiu Jan 12, 2024
2eb173a
Merge remote-tracking branch 'origin/dev' into sophia/update-schedule…
s0phialiu Jan 12, 2024
09aead5
Merge remote-tracking branch 'origin/dev' into sophia/update-schedule…
s0phialiu Jan 14, 2024
3bae756
Added some iPad UI changes
s0phialiu Jan 18, 2024
b8ba313
Merge remote-tracking branch 'origin/dev' into sophia/update-schedule…
s0phialiu Jan 19, 2024
ba0c9f9
Fixed iPad potion sizes
s0phialiu Jan 19, 2024
889173f
Fix schedule view on iPad, need to fix iPad Pro 12.9
s0phialiu Jan 21, 2024
aa7f065
Trying to add mapImageURL
s0phialiu Jan 23, 2024
f95b680
Fixed error where events didn't show up, added optional handling
s0phialiu Jan 24, 2024
8ef058b
Added static maps
s0phialiu Jan 24, 2024
9436e2e
editing static map
s0phialiu Jan 26, 2024
af8858b
replace bg pad img
s0phialiu Feb 3, 2024
31af507
Revert "replace bg pad img"
s0phialiu Feb 3, 2024
2c87580
changed content bg
s0phialiu Feb 4, 2024
58f8e62
improved schedule ui layout for ipad
s0phialiu Feb 5, 2024
7fdfd5c
Merge remote-tracking branch 'origin/dev' into sophia/update-schedule…
s0phialiu Feb 5, 2024
87640fc
Added model and service for staff shifts
s0phialiu Feb 5, 2024
d778c72
Merge remote-tracking branch 'origin/dev' into sophia/update-schedule…
s0phialiu Feb 6, 2024
7b9f06f
Merge remote-tracking branch 'origin/dev' into sophia/update-schedule…
s0phialiu Feb 10, 2024
132ac56
laid out staff shifts ui view, updated staff hiapi to pass in body
s0phialiu Feb 10, 2024
be0d7d3
Merge remote-tracking branch 'origin/dev' into sophia/update-schedule…
s0phialiu Feb 11, 2024
a3ea64b
Merge remote-tracking branch 'origin/dev' into sophia/update-schedule…
s0phialiu Feb 11, 2024
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
4 changes: 3 additions & 1 deletion HIAPI/Models/Event.swift
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ public struct Event: Codable {
case startTime
case points
case isAsync
case mapImageUrl
}

public let id: String
Expand All @@ -85,10 +86,11 @@ public struct Event: Codable {
public let info: String
public let locations: [Location]
public let name: String
public let sponsor: String
public let sponsor: String?
public let startTime: Date
public let points: Int
public let isAsync: Bool
public let mapImageUrl: String?
}

public struct Location: Codable {
Expand Down
11 changes: 8 additions & 3 deletions HIAPI/Models/Staff.swift
Original file line number Diff line number Diff line change
@@ -1,10 +1,15 @@
//
// Staff.swift
// HIAPI
// HackIllinois
//
// Created by Dev Patel on 2/7/24.
// Copyright © 2024 HackIllinois. All rights reserved.
// Created by HackIllinois Team on 2/7/24.
// Copyright © 2017 HackIllinois. All rights reserved.
// This file is part of the Hackillinois iOS App.
// The Hackillinois iOS App is open source software, released under the University of
// Illinois/NCSA Open Source License. You should have received a copy of
// this license in a file with the distribution.
//

import Foundation
import APIManager

Expand Down
5 changes: 5 additions & 0 deletions HIAPI/Models/User.swift
Original file line number Diff line number Diff line change
Expand Up @@ -182,3 +182,8 @@ public struct DietaryRestrictions: OptionSet, Codable, APIReturnable {
public struct Token: Codable, APIReturnable {
public let token: String
}

public struct FollowStatus: Codable, APIReturnable {
public let userId: String
public let following: [String]
}
23 changes: 16 additions & 7 deletions HIAPI/Services/StaffService.swift
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
//
// StaffService.swift
// HIAPI
// HackIllinois
//
// Created by Dev Patel on 2/7/24.
// Copyright © 2024 HackIllinois. All rights reserved.
// Created by HackIllinois Team on 2/7/24.
// Copyright © 2017 HackIllinois. All rights reserved.
// This file is part of the Hackillinois iOS App.
// The Hackillinois iOS App is open source software, released under the University of
// Illinois/NCSA Open Source License. You should have received a copy of
// this license in a file with the distribution.
//

import Foundation
Expand All @@ -20,15 +24,20 @@ public final class StaffService: BaseService {
return APIRequest<StaffContainer>(service: self, endpoint: "shift/", headers: headers, method: .GET)
}

public static func recordStaffAttendance(userToken: String) -> APIRequest<StaffAttendanceContainer> {
public static func recordStaffAttendance(userToken: String, eventId: String) -> APIRequest<StaffAttendanceContainer> {
var body = HTTPBody()
body["eventId"] = eventId
var headers = HTTPHeaders()
headers["Authorization"] = userToken
return APIRequest<StaffAttendanceContainer>(service: self, endpoint: "attendance/", headers: headers, method: .POST)
return APIRequest<StaffAttendanceContainer>(service: self, endpoint: "attendance/", body: body, headers: headers, method: .POST)
}

public static func recordUserAttendance(userToken: String) -> APIRequest<UserAttendanceContainer> {
public static func recordUserAttendance(userToken: String, userId: String, eventId: String) -> APIRequest<UserAttendanceContainer> {
var body = HTTPBody()
body["userId"] = userId
body["eventId"] = eventId
var headers = HTTPHeaders()
headers["Authorization"] = userToken
return APIRequest<UserAttendanceContainer>(service: self, endpoint: "scan-attendee/", headers: headers, method: .PUT)
return APIRequest<UserAttendanceContainer>(service: self, endpoint: "scan-attendee/", body: body, headers: headers, method: .PUT)
}
}
16 changes: 16 additions & 0 deletions HIAPI/Services/UserService.swift
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,20 @@ public final class UserService: BaseService {
authorizationHeaders["Authorization"] = userToken
return APIRequest<QRData>(service: self, endpoint: "qr/", headers: authorizationHeaders, method: .GET)
}

public static func favoriteEvent(userToken: String, eventID: String) -> APIRequest<FollowStatus> {
var authorizationHeaders = HTTPHeaders()
authorizationHeaders["Authorization"] = userToken
var body = HTTPBody()
body["eventId"] = eventID
return APIRequest<FollowStatus>(service: self, endpoint: "follow/", body: body, headers: authorizationHeaders, method: .PUT)
}

public static func unfavoriteEvent(userToken: String, eventID: String) -> APIRequest<FollowStatus> {
var authorizationHeaders = HTTPHeaders()
authorizationHeaders["Authorization"] = userToken
var body = HTTPBody()
body["eventId"] = eventID
return APIRequest<FollowStatus>(service: self, endpoint: "unfollow/", body: body, headers: authorizationHeaders, method: .PUT)
}
}
12 changes: 12 additions & 0 deletions HackIllinois.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,9 @@
D12B40FF2AC0B0BD001BCB05 /* HIScanAttendanceViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = D12B40FE2AC0B0BD001BCB05 /* HIScanAttendanceViewController.swift */; };
D134D30F296B3F56006EA589 /* Montserrat-VariableFont_wght.ttf in Resources */ = {isa = PBXBuildFile; fileRef = D134D30E296B3F56006EA589 /* Montserrat-VariableFont_wght.ttf */; };
D14D3AE3295FBDA200EB7995 /* HIBannerViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = D14D3AE2295FBDA100EB7995 /* HIBannerViewController.swift */; };
D187BF582B781A1100AD7356 /* HIShiftCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = D187BF572B781A1100AD7356 /* HIShiftCell.swift */; };
D1BBA5682B70AB940017BD13 /* Staff.swift in Sources */ = {isa = PBXBuildFile; fileRef = D1BBA5672B70AB940017BD13 /* Staff.swift */; };
D1BBA56A2B70ACCC0017BD13 /* StaffService.swift in Sources */ = {isa = PBXBuildFile; fileRef = D1BBA5692B70ACCC0017BD13 /* StaffService.swift */; };
D187BF5A2B78317600AD7356 /* Mentor.swift in Sources */ = {isa = PBXBuildFile; fileRef = D187BF592B78317600AD7356 /* Mentor.swift */; };
D187BF5C2B78318000AD7356 /* MentorService.swift in Sources */ = {isa = PBXBuildFile; fileRef = D187BF5B2B78318000AD7356 /* MentorService.swift */; };
D1BE81172AC8FC680042C078 /* HIAPI.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 95E3142A21FAD5B30092C22E /* HIAPI.framework */; };
Expand Down Expand Up @@ -345,6 +348,9 @@
D12B40FE2AC0B0BD001BCB05 /* HIScanAttendanceViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HIScanAttendanceViewController.swift; sourceTree = "<group>"; };
D134D30E296B3F56006EA589 /* Montserrat-VariableFont_wght.ttf */ = {isa = PBXFileReference; lastKnownFileType = file; path = "Montserrat-VariableFont_wght.ttf"; sourceTree = "<group>"; };
D14D3AE2295FBDA100EB7995 /* HIBannerViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HIBannerViewController.swift; sourceTree = "<group>"; };
D187BF572B781A1100AD7356 /* HIShiftCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HIShiftCell.swift; sourceTree = "<group>"; };
D1BBA5672B70AB940017BD13 /* Staff.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Staff.swift; sourceTree = "<group>"; };
D1BBA5692B70ACCC0017BD13 /* StaffService.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = StaffService.swift; sourceTree = "<group>"; };
D187BF592B78317600AD7356 /* Mentor.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Mentor.swift; sourceTree = "<group>"; };
D187BF5B2B78318000AD7356 /* MentorService.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MentorService.swift; sourceTree = "<group>"; };
D1C5B6572B732E44000E766D /* refresh.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = refresh.json; sourceTree = "<group>"; };
Expand Down Expand Up @@ -661,6 +667,7 @@
95A7D282203D4F54005EAEAF /* HIAnnouncementCell.swift */,
95A7D29F203D60E9005EAEAF /* HIBubbleCell.swift */,
95A7D281203D4F54005EAEAF /* HIEventCell.swift */,
D187BF572B781A1100AD7356 /* HIShiftCell.swift */,
3CF8DB1223B419980035ECAE /* HIProjectCell.swift */,
);
path = HIBubbleCell;
Expand Down Expand Up @@ -711,6 +718,7 @@
D187BF5B2B78318000AD7356 /* MentorService.swift */,
AC3B620F25E85D18002386A2 /* ProfileService.swift */,
95E3145C21FAF1740092C22E /* PassService.swift */,
D1BBA5692B70ACCC0017BD13 /* StaffService.swift */,
95E3146321FAF1740092C22E /* RegistrationService.swift */,
95B12044220BEAD700E024BB /* TrackingService.swift */,
95E3145D21FAF1740092C22E /* UserService.swift */,
Expand All @@ -728,6 +736,7 @@
95E3146821FAF1740092C22E /* Announcement.swift */,
3521FFA82207C03E00634A63 /* Attendee.swift */,
95E3146521FAF1740092C22E /* Event.swift */,
D1BBA5672B70AB940017BD13 /* Staff.swift */,
2FA73B4F2B58CAC3002658C0 /* Item.swift */,
AC3B620D25E85CAD002386A2 /* Profile.swift */,
95E3146621FAF1740092C22E /* SimpleRequest.swift */,
Expand Down Expand Up @@ -1057,6 +1066,7 @@
E1E4A5DA291C9BF800780BA1 /* HIOnboardingView.swift in Sources */,
95A7D290203D4F54005EAEAF /* HIAnnouncementCell.swift in Sources */,
9515E43722093E1300BCAF92 /* HIEventScannerViewController.swift in Sources */,
D187BF582B781A1100AD7356 /* HIShiftCell.swift in Sources */,
95A7D28F203D4F54005EAEAF /* HIEventCell.swift in Sources */,
ACAA717626017EC4000F42B0 /* HICollectionViewFlowLayout.swift in Sources */,
DF5B27C5299197E80034A8B9 /* Array.swift in Sources */,
Expand Down Expand Up @@ -1132,6 +1142,7 @@
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
D1BBA5682B70AB940017BD13 /* Staff.swift in Sources */,
3521FFA92207C03E00634A63 /* Attendee.swift in Sources */,
95E3147521FAF1740092C22E /* User.swift in Sources */,
2FA73B4E2B58CAA0002658C0 /* ShopService.swift in Sources */,
Expand All @@ -1154,6 +1165,7 @@
95E3147421FAF1740092C22E /* SimpleRequest.swift in Sources */,
D187BF5C2B78318000AD7356 /* MentorService.swift in Sources */,
2FA73B502B58CAC3002658C0 /* Item.swift in Sources */,
D1BBA56A2B70ACCC0017BD13 /* StaffService.swift in Sources */,
A5163FED221F283C003C543E /* StatsService.swift in Sources */,
95B12045220BEAD700E024BB /* TrackingService.swift in Sources */,
3C8F62D6238F9825001A5DAF /* TimeService.swift in Sources */,
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"images" : [
{
"filename" : "Big Selected Bookmark 1x.png",
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "Big Selected Bookmark 2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "Big Selected Bookmark 3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"images" : [
{
"filename" : "Big Unselected Bookmark 1x.png",
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "Big Unselected Bookmark 2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "Big Unselected Bookmark 3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -1,26 +1,26 @@
{
"images" : [
{
"filename" : "Big Selected Bookmark 1x.png",
"idiom" : "universal",
"filename" : "MenuFavorited.png",
"scale" : "1x"
},
{
"filename" : "Big Selected Bookmark 2x.png",
"idiom" : "universal",
"filename" : "MenuFavorited@2x.png",
"scale" : "2x"
},
{
"filename" : "Big Selected Bookmark 3x.png",
"idiom" : "universal",
"filename" : "MenuFavorited@3x.png",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
"author" : "xcode",
"version" : 1
},
"properties" : {
"template-rendering-intent" : "template"
}
}
}
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -1,26 +1,26 @@
{
"images" : [
{
"filename" : "Big Unselected Bookmark 1x.png",
"idiom" : "universal",
"filename" : "MenuUnfavorited.png",
"scale" : "1x"
},
{
"filename" : "Big Unselected Bookmark 2x.png",
"idiom" : "universal",
"filename" : "MenuUnfavorited@2x.png",
"scale" : "2x"
},
{
"filename" : "Big Unselected Bookmark 3x.png",
"idiom" : "universal",
"filename" : "MenuUnfavorited@3x.png",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
"author" : "xcode",
"version" : 1
},
"properties" : {
"template-rendering-intent" : "template"
}
}
}
Binary file not shown.
Binary file not shown.
Binary file not shown.
23 changes: 23 additions & 0 deletions HackIllinois/Assets.xcassets/Pink Potion.imageset/Contents.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"images" : [
{
"filename" : "Pink Potion 1x.png",
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "Pink Potion 2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "Pink Potion 3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"images" : [
{
"filename" : "PinkPotionPad.png",
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "PinkPotionPad2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "PinkPotionPad3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"images" : [
{
"filename" : "Purple Potion 1x.png",
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "Purple Potion 2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "Purple Potion 3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"images" : [
{
"filename" : "PurplePotionPad.png",
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "PurplePotionPad2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "PurplePotionPad3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
Loading
Loading