Commit edd68e22 authored by Eyad Hasan's avatar Eyad Hasan
Browse files

Making changes to code for the new data model

We have to make some conversions to the types, especially because some things are saved as strings but used as dates in the code, either we'll just do a conversion for it, or just see if we can store things in that form without any issues
parent 8f88f0d8
......@@ -143,7 +143,7 @@ class LocationsListViewController: UIViewController, UICollectionViewDelegate, U
let dataArray = placeOpenFacilitiesFirstInArray(facilitiesArray)
let facility = dataArray[indexPath.row]
cell.facility = facility
cell.nameLabel.text = facility.name
cell.nameLabel.text = facility.facilityName
let open = Utilities.isOpen(facility: facility)
if(open == true) {
......
......@@ -105,7 +105,7 @@ class MainTableViewController: UITableViewController {
let dataArray = placeOpenFacilitiesFirstInArray(facilitiesArray)
let facility = dataArray[indexPath.row]
cell.nameLabel.text = facility.name
cell.nameLabel.text = facility.facilityName
let open = Utilities.isOpen(facility: facility);
if(open == true){
cell.openClosedLabel.text = "Open"
......
......@@ -17,7 +17,7 @@ class Utilities: NSObject {
if (isSpecialSchedule(facility) == true) {
if (!(facility.specialSchedules?.openTimes.isEmpty)!) {
if (!(facility.specialSchedule.openTimes.isEmpty)) {
if let openDay = today(facility: facility) {
let nowTime = time(openTime: openDay)
if(nowTime == true){
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment