Commit c9d655b9 authored by domenicw's avatar domenicw
Browse files

More work on Networking

Events, Joboffers are now displayed correctly
Home is not shown anymore
parent 8f78ea45
...@@ -66,15 +66,22 @@ ...@@ -66,15 +66,22 @@
B0AF913E2157CE2D008F3B80 /* NetworkManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = B0AF913D2157CE2D008F3B80 /* NetworkManager.swift */; }; B0AF913E2157CE2D008F3B80 /* NetworkManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = B0AF913D2157CE2D008F3B80 /* NetworkManager.swift */; };
B0AF91402157CF50008F3B80 /* AMIVApiEvents.swift in Sources */ = {isa = PBXBuildFile; fileRef = B0AF913F2157CF50008F3B80 /* AMIVApiEvents.swift */; }; B0AF91402157CF50008F3B80 /* AMIVApiEvents.swift in Sources */ = {isa = PBXBuildFile; fileRef = B0AF913F2157CF50008F3B80 /* AMIVApiEvents.swift */; };
B0AF91422157D192008F3B80 /* KeychainKey.swift in Sources */ = {isa = PBXBuildFile; fileRef = B0AF91412157D192008F3B80 /* KeychainKey.swift */; }; B0AF91422157D192008F3B80 /* KeychainKey.swift in Sources */ = {isa = PBXBuildFile; fileRef = B0AF91412157D192008F3B80 /* KeychainKey.swift */; };
B0AF91452157D34E008F3B80 /* JobsResponse.swift in Sources */ = {isa = PBXBuildFile; fileRef = B0AF91442157D34E008F3B80 /* JobsResponse.swift */; }; B0AF91452157D34E008F3B80 /* JobOffersResponse.swift in Sources */ = {isa = PBXBuildFile; fileRef = B0AF91442157D34E008F3B80 /* JobOffersResponse.swift */; };
B0AF91472157D36E008F3B80 /* EventsResponse.swift in Sources */ = {isa = PBXBuildFile; fileRef = B0AF91462157D36E008F3B80 /* EventsResponse.swift */; }; B0AF91472157D36E008F3B80 /* EventsResponse.swift in Sources */ = {isa = PBXBuildFile; fileRef = B0AF91462157D36E008F3B80 /* EventsResponse.swift */; };
B0AF914B2157DE2A008F3B80 /* EventItem.swift in Sources */ = {isa = PBXBuildFile; fileRef = B0AF914A2157DE2A008F3B80 /* EventItem.swift */; }; B0AF914B2157DE2A008F3B80 /* AMIVEvent.swift in Sources */ = {isa = PBXBuildFile; fileRef = B0AF914A2157DE2A008F3B80 /* AMIVEvent.swift */; };
B0D3F92B21552E8E005209FF /* UIButton+Extension.swift in Sources */ = {isa = PBXBuildFile; fileRef = B0D3F92A21552E8E005209FF /* UIButton+Extension.swift */; }; B0D3F92B21552E8E005209FF /* UIButton+Extension.swift in Sources */ = {isa = PBXBuildFile; fileRef = B0D3F92A21552E8E005209FF /* UIButton+Extension.swift */; };
B0E22FDA216DD2E0002317D6 /* AMIVApiJobs.swift in Sources */ = {isa = PBXBuildFile; fileRef = B0E22FD9216DD2E0002317D6 /* AMIVApiJobs.swift */; }; B0E22FDA216DD2E0002317D6 /* AMIVApiJobs.swift in Sources */ = {isa = PBXBuildFile; fileRef = B0E22FD9216DD2E0002317D6 /* AMIVApiJobs.swift */; };
B0E22FDC216DD41D002317D6 /* JobOffer.swift in Sources */ = {isa = PBXBuildFile; fileRef = B0E22FDB216DD41D002317D6 /* JobOffer.swift */; }; B0E22FDC216DD41D002317D6 /* JobOffer.swift in Sources */ = {isa = PBXBuildFile; fileRef = B0E22FDB216DD41D002317D6 /* JobOffer.swift */; };
B0E22FDF216DD754002317D6 /* AMIVApiStudyDocuments.swift in Sources */ = {isa = PBXBuildFile; fileRef = B0E22FDE216DD754002317D6 /* AMIVApiStudyDocuments.swift */; }; B0E22FDF216DD754002317D6 /* AMIVApiStudyDocuments.swift in Sources */ = {isa = PBXBuildFile; fileRef = B0E22FDE216DD754002317D6 /* AMIVApiStudyDocuments.swift */; };
B0E22FE1216E93EF002317D6 /* StudyDocumentResponse.swift in Sources */ = {isa = PBXBuildFile; fileRef = B0E22FE0216E93EF002317D6 /* StudyDocumentResponse.swift */; }; B0E22FE1216E93EF002317D6 /* StudyDocumentResponse.swift in Sources */ = {isa = PBXBuildFile; fileRef = B0E22FE0216E93EF002317D6 /* StudyDocumentResponse.swift */; };
B0E22FE3216E9448002317D6 /* StudyDocument.swift in Sources */ = {isa = PBXBuildFile; fileRef = B0E22FE2216E9448002317D6 /* StudyDocument.swift */; }; B0E22FE3216E9448002317D6 /* StudyDocument.swift in Sources */ = {isa = PBXBuildFile; fileRef = B0E22FE2216E9448002317D6 /* StudyDocument.swift */; };
B0F5B94F217137EC005E4591 /* Local+Extension.swift in Sources */ = {isa = PBXBuildFile; fileRef = B0F5B94E217137EC005E4591 /* Local+Extension.swift */; };
B0F5B9512171408E005E4591 /* AMIVMedia.swift in Sources */ = {isa = PBXBuildFile; fileRef = B0F5B9502171408E005E4591 /* AMIVMedia.swift */; };
B0F5B955217142E3005E4591 /* AMIVMediaType.swift in Sources */ = {isa = PBXBuildFile; fileRef = B0F5B954217142E3005E4591 /* AMIVMediaType.swift */; };
B0F5B9582171480B005E4591 /* JobsViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = B0F5B9572171480B005E4591 /* JobsViewModel.swift */; };
B0F5B95A2171624D005E4591 /* GenericInfoViewControllerAction.swift in Sources */ = {isa = PBXBuildFile; fileRef = B0F5B9592171624D005E4591 /* GenericInfoViewControllerAction.swift */; };
B0F5B95C2171786C005E4591 /* AMIVApiUser.swift in Sources */ = {isa = PBXBuildFile; fileRef = B0F5B95B2171786C005E4591 /* AMIVApiUser.swift */; };
B0F5B95F217179D9005E4591 /* User.swift in Sources */ = {isa = PBXBuildFile; fileRef = B0F5B95E217179D9005E4591 /* User.swift */; };
B0FE2EFC2154179600F3D073 /* JobsViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = B0FE2EFB2154179600F3D073 /* JobsViewController.swift */; }; B0FE2EFC2154179600F3D073 /* JobsViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = B0FE2EFB2154179600F3D073 /* JobsViewController.swift */; };
B0FE2EFF21541A2B00F3D073 /* EventsNavigator.swift in Sources */ = {isa = PBXBuildFile; fileRef = B0FE2EFE21541A2B00F3D073 /* EventsNavigator.swift */; }; B0FE2EFF21541A2B00F3D073 /* EventsNavigator.swift in Sources */ = {isa = PBXBuildFile; fileRef = B0FE2EFE21541A2B00F3D073 /* EventsNavigator.swift */; };
B0FE2F0221541A6300F3D073 /* EventsViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = B0FE2F0121541A6300F3D073 /* EventsViewController.swift */; }; B0FE2F0221541A6300F3D073 /* EventsViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = B0FE2F0121541A6300F3D073 /* EventsViewController.swift */; };
...@@ -169,15 +176,22 @@ ...@@ -169,15 +176,22 @@
B0AF913D2157CE2D008F3B80 /* NetworkManager.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NetworkManager.swift; sourceTree = "<group>"; }; B0AF913D2157CE2D008F3B80 /* NetworkManager.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NetworkManager.swift; sourceTree = "<group>"; };
B0AF913F2157CF50008F3B80 /* AMIVApiEvents.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AMIVApiEvents.swift; sourceTree = "<group>"; }; B0AF913F2157CF50008F3B80 /* AMIVApiEvents.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AMIVApiEvents.swift; sourceTree = "<group>"; };
B0AF91412157D192008F3B80 /* KeychainKey.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = KeychainKey.swift; sourceTree = "<group>"; }; B0AF91412157D192008F3B80 /* KeychainKey.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = KeychainKey.swift; sourceTree = "<group>"; };
B0AF91442157D34E008F3B80 /* JobsResponse.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = JobsResponse.swift; sourceTree = "<group>"; }; B0AF91442157D34E008F3B80 /* JobOffersResponse.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = JobOffersResponse.swift; sourceTree = "<group>"; };
B0AF91462157D36E008F3B80 /* EventsResponse.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EventsResponse.swift; sourceTree = "<group>"; }; B0AF91462157D36E008F3B80 /* EventsResponse.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EventsResponse.swift; sourceTree = "<group>"; };
B0AF914A2157DE2A008F3B80 /* EventItem.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EventItem.swift; sourceTree = "<group>"; }; B0AF914A2157DE2A008F3B80 /* AMIVEvent.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AMIVEvent.swift; sourceTree = "<group>"; };
B0D3F92A21552E8E005209FF /* UIButton+Extension.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "UIButton+Extension.swift"; sourceTree = "<group>"; }; B0D3F92A21552E8E005209FF /* UIButton+Extension.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "UIButton+Extension.swift"; sourceTree = "<group>"; };
B0E22FD9216DD2E0002317D6 /* AMIVApiJobs.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AMIVApiJobs.swift; sourceTree = "<group>"; }; B0E22FD9216DD2E0002317D6 /* AMIVApiJobs.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AMIVApiJobs.swift; sourceTree = "<group>"; };
B0E22FDB216DD41D002317D6 /* JobOffer.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = JobOffer.swift; sourceTree = "<group>"; }; B0E22FDB216DD41D002317D6 /* JobOffer.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = JobOffer.swift; sourceTree = "<group>"; };
B0E22FDE216DD754002317D6 /* AMIVApiStudyDocuments.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AMIVApiStudyDocuments.swift; sourceTree = "<group>"; }; B0E22FDE216DD754002317D6 /* AMIVApiStudyDocuments.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AMIVApiStudyDocuments.swift; sourceTree = "<group>"; };
B0E22FE0216E93EF002317D6 /* StudyDocumentResponse.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = StudyDocumentResponse.swift; sourceTree = "<group>"; }; B0E22FE0216E93EF002317D6 /* StudyDocumentResponse.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = StudyDocumentResponse.swift; sourceTree = "<group>"; };
B0E22FE2216E9448002317D6 /* StudyDocument.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = StudyDocument.swift; sourceTree = "<group>"; }; B0E22FE2216E9448002317D6 /* StudyDocument.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = StudyDocument.swift; sourceTree = "<group>"; };
B0F5B94E217137EC005E4591 /* Local+Extension.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "Local+Extension.swift"; sourceTree = "<group>"; };
B0F5B9502171408E005E4591 /* AMIVMedia.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AMIVMedia.swift; sourceTree = "<group>"; };
B0F5B954217142E3005E4591 /* AMIVMediaType.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AMIVMediaType.swift; sourceTree = "<group>"; };
B0F5B9572171480B005E4591 /* JobsViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = JobsViewModel.swift; sourceTree = "<group>"; };
B0F5B9592171624D005E4591 /* GenericInfoViewControllerAction.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = GenericInfoViewControllerAction.swift; sourceTree = "<group>"; };
B0F5B95B2171786C005E4591 /* AMIVApiUser.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AMIVApiUser.swift; sourceTree = "<group>"; };
B0F5B95E217179D9005E4591 /* User.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = User.swift; sourceTree = "<group>"; };
B0FE2EFB2154179600F3D073 /* JobsViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = JobsViewController.swift; sourceTree = "<group>"; }; B0FE2EFB2154179600F3D073 /* JobsViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = JobsViewController.swift; sourceTree = "<group>"; };
B0FE2EFE21541A2B00F3D073 /* EventsNavigator.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EventsNavigator.swift; sourceTree = "<group>"; }; B0FE2EFE21541A2B00F3D073 /* EventsNavigator.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EventsNavigator.swift; sourceTree = "<group>"; };
B0FE2F0121541A6300F3D073 /* EventsViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EventsViewController.swift; sourceTree = "<group>"; }; B0FE2F0121541A6300F3D073 /* EventsViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EventsViewController.swift; sourceTree = "<group>"; };
...@@ -370,6 +384,7 @@ ...@@ -370,6 +384,7 @@
B050E15721516E160090CB79 /* Model */ = { B050E15721516E160090CB79 /* Model */ = {
isa = PBXGroup; isa = PBXGroup;
children = ( children = (
B0F5B956217147FC005E4591 /* Jobs */,
B048377A21582C4500AFA689 /* Events */, B048377A21582C4500AFA689 /* Events */,
B050E1882151A4850090CB79 /* Settings Model */, B050E1882151A4850090CB79 /* Settings Model */,
); );
...@@ -392,6 +407,7 @@ ...@@ -392,6 +407,7 @@
B050E1932151A9750090CB79 /* Bundle+Extension.swift */, B050E1932151A9750090CB79 /* Bundle+Extension.swift */,
B0D3F92A21552E8E005209FF /* UIButton+Extension.swift */, B0D3F92A21552E8E005209FF /* UIButton+Extension.swift */,
B048377D21582D4E00AFA689 /* String+Extension.swift */, B048377D21582D4E00AFA689 /* String+Extension.swift */,
B0F5B94E217137EC005E4591 /* Local+Extension.swift */,
); );
path = Extension; path = Extension;
sourceTree = "<group>"; sourceTree = "<group>";
...@@ -564,6 +580,7 @@ ...@@ -564,6 +580,7 @@
B05EC253216BFE6600D5AD99 /* AMIVApiSession.swift */, B05EC253216BFE6600D5AD99 /* AMIVApiSession.swift */,
B0E22FD9216DD2E0002317D6 /* AMIVApiJobs.swift */, B0E22FD9216DD2E0002317D6 /* AMIVApiJobs.swift */,
B0E22FDE216DD754002317D6 /* AMIVApiStudyDocuments.swift */, B0E22FDE216DD754002317D6 /* AMIVApiStudyDocuments.swift */,
B0F5B95B2171786C005E4591 /* AMIVApiUser.swift */,
); );
path = EndPoint; path = EndPoint;
sourceTree = "<group>"; sourceTree = "<group>";
...@@ -603,6 +620,9 @@ ...@@ -603,6 +620,9 @@
B0AF91432157D320008F3B80 /* Model */ = { B0AF91432157D320008F3B80 /* Model */ = {
isa = PBXGroup; isa = PBXGroup;
children = ( children = (
B0F5B9502171408E005E4591 /* AMIVMedia.swift */,
B0F5B954217142E3005E4591 /* AMIVMediaType.swift */,
B0F5B95D217179C6005E4591 /* User */,
B0E22FDD216DD73D002317D6 /* Study Documents */, B0E22FDD216DD73D002317D6 /* Study Documents */,
B05EC250216BFCC700D5AD99 /* Authentication */, B05EC250216BFCC700D5AD99 /* Authentication */,
B0AF91492157DE14008F3B80 /* Jobs */, B0AF91492157DE14008F3B80 /* Jobs */,
...@@ -615,7 +635,7 @@ ...@@ -615,7 +635,7 @@
isa = PBXGroup; isa = PBXGroup;
children = ( children = (
B0AF91462157D36E008F3B80 /* EventsResponse.swift */, B0AF91462157D36E008F3B80 /* EventsResponse.swift */,
B0AF914A2157DE2A008F3B80 /* EventItem.swift */, B0AF914A2157DE2A008F3B80 /* AMIVEvent.swift */,
); );
path = Events; path = Events;
sourceTree = "<group>"; sourceTree = "<group>";
...@@ -623,7 +643,7 @@ ...@@ -623,7 +643,7 @@
B0AF91492157DE14008F3B80 /* Jobs */ = { B0AF91492157DE14008F3B80 /* Jobs */ = {
isa = PBXGroup; isa = PBXGroup;
children = ( children = (
B0AF91442157D34E008F3B80 /* JobsResponse.swift */, B0AF91442157D34E008F3B80 /* JobOffersResponse.swift */,
B0E22FDB216DD41D002317D6 /* JobOffer.swift */, B0E22FDB216DD41D002317D6 /* JobOffer.swift */,
); );
path = Jobs; path = Jobs;
...@@ -638,6 +658,22 @@ ...@@ -638,6 +658,22 @@
path = "Study Documents"; path = "Study Documents";
sourceTree = "<group>"; sourceTree = "<group>";
}; };
B0F5B956217147FC005E4591 /* Jobs */ = {
isa = PBXGroup;
children = (
B0F5B9572171480B005E4591 /* JobsViewModel.swift */,
);
path = Jobs;
sourceTree = "<group>";
};
B0F5B95D217179C6005E4591 /* User */ = {
isa = PBXGroup;
children = (
B0F5B95E217179D9005E4591 /* User.swift */,
);
path = User;
sourceTree = "<group>";
};
B0FE2EFD21541A1000F3D073 /* Events */ = { B0FE2EFD21541A1000F3D073 /* Events */ = {
isa = PBXGroup; isa = PBXGroup;
children = ( children = (
...@@ -670,6 +706,7 @@ ...@@ -670,6 +706,7 @@
B0FE2F0521541C5C00F3D073 /* GenericInfoViewController.swift */, B0FE2F0521541C5C00F3D073 /* GenericInfoViewController.swift */,
B0FE2F072154230500F3D073 /* GenericInfoViewControllerDelegate.swift */, B0FE2F072154230500F3D073 /* GenericInfoViewControllerDelegate.swift */,
B0FE2F092154237C00F3D073 /* GenericInfoViewControllerModel.swift */, B0FE2F092154237C00F3D073 /* GenericInfoViewControllerModel.swift */,
B0F5B9592171624D005E4591 /* GenericInfoViewControllerAction.swift */,
); );
path = Info; path = Info;
sourceTree = "<group>"; sourceTree = "<group>";
...@@ -811,7 +848,7 @@ ...@@ -811,7 +848,7 @@
B0AF91422157D192008F3B80 /* KeychainKey.swift in Sources */, B0AF91422157D192008F3B80 /* KeychainKey.swift in Sources */,
B0FE2F16215514E600F3D073 /* QuickLookDataSource.swift in Sources */, B0FE2F16215514E600F3D073 /* QuickLookDataSource.swift in Sources */,
B050E17821517EF50090CB79 /* AmivMicroAppModel.swift in Sources */, B050E17821517EF50090CB79 /* AmivMicroAppModel.swift in Sources */,
B0AF91452157D34E008F3B80 /* JobsResponse.swift in Sources */, B0AF91452157D34E008F3B80 /* JobOffersResponse.swift in Sources */,
B050E16E215178BA0090CB79 /* AmivMicroAppsNavigator.swift in Sources */, B050E16E215178BA0090CB79 /* AmivMicroAppsNavigator.swift in Sources */,
B050E18C2151A54D0090CB79 /* SettingsCellModel.swift in Sources */, B050E18C2151A54D0090CB79 /* SettingsCellModel.swift in Sources */,
B0E22FDF216DD754002317D6 /* AMIVApiStudyDocuments.swift in Sources */, B0E22FDF216DD754002317D6 /* AMIVApiStudyDocuments.swift in Sources */,
...@@ -828,12 +865,15 @@ ...@@ -828,12 +865,15 @@
B050E171215179A30090CB79 /* AmivMicroAppsViewController.swift in Sources */, B050E171215179A30090CB79 /* AmivMicroAppsViewController.swift in Sources */,
B050E18A2151A4A80090CB79 /* SettingsAction.swift in Sources */, B050E18A2151A4A80090CB79 /* SettingsAction.swift in Sources */,
B0E22FE3216E9448002317D6 /* StudyDocument.swift in Sources */, B0E22FE3216E9448002317D6 /* StudyDocument.swift in Sources */,
B0F5B955217142E3005E4591 /* AMIVMediaType.swift in Sources */,
B07A8A0421523AB8003CC2D8 /* InfoViewControllerModel.swift in Sources */, B07A8A0421523AB8003CC2D8 /* InfoViewControllerModel.swift in Sources */,
B0AF913A2157BF11008F3B80 /* NetworkRouter.swift in Sources */, B0AF913A2157BF11008F3B80 /* NetworkRouter.swift in Sources */,
B0AF913E2157CE2D008F3B80 /* NetworkManager.swift in Sources */, B0AF913E2157CE2D008F3B80 /* NetworkManager.swift in Sources */,
B050E146215169D00090CB79 /* RootNavigator.swift in Sources */, B050E146215169D00090CB79 /* RootNavigator.swift in Sources */,
B0F5B95A2171624D005E4591 /* GenericInfoViewControllerAction.swift in Sources */,
B0AF91342157B430008F3B80 /* NetworkError.swift in Sources */, B0AF91342157B430008F3B80 /* NetworkError.swift in Sources */,
B05EC24F216BF9B900D5AD99 /* RouterError.swift in Sources */, B05EC24F216BF9B900D5AD99 /* RouterError.swift in Sources */,
B0F5B9582171480B005E4591 /* JobsViewModel.swift in Sources */,
B07A8A0621523B96003CC2D8 /* InfoViewControllerDelegate.swift in Sources */, B07A8A0621523B96003CC2D8 /* InfoViewControllerDelegate.swift in Sources */,
B0E22FDC216DD41D002317D6 /* JobOffer.swift in Sources */, B0E22FDC216DD41D002317D6 /* JobOffer.swift in Sources */,
B050E1872151A3C40090CB79 /* SettingsViewControllerDelegate.swift in Sources */, B050E1872151A3C40090CB79 /* SettingsViewControllerDelegate.swift in Sources */,
...@@ -846,7 +886,9 @@ ...@@ -846,7 +886,9 @@
B050E1972151AAC40090CB79 /* SettingsNavigator.swift in Sources */, B050E1972151AAC40090CB79 /* SettingsNavigator.swift in Sources */,
B0E22FDA216DD2E0002317D6 /* AMIVApiJobs.swift in Sources */, B0E22FDA216DD2E0002317D6 /* AMIVApiJobs.swift in Sources */,
B050E1942151A9750090CB79 /* Bundle+Extension.swift in Sources */, B050E1942151A9750090CB79 /* Bundle+Extension.swift in Sources */,
B0F5B95F217179D9005E4591 /* User.swift in Sources */,
B050E14E21516AFE0090CB79 /* AppNavigator.swift in Sources */, B050E14E21516AFE0090CB79 /* AppNavigator.swift in Sources */,
B0F5B9512171408E005E4591 /* AMIVMedia.swift in Sources */,
B0FE2F0A2154237C00F3D073 /* GenericInfoViewControllerModel.swift in Sources */, B0FE2F0A2154237C00F3D073 /* GenericInfoViewControllerModel.swift in Sources */,
B050E18121519B390090CB79 /* LoginViewControllerDelegate.swift in Sources */, B050E18121519B390090CB79 /* LoginViewControllerDelegate.swift in Sources */,
B0845924215B78C700479D27 /* AmivMicroAppCheckin.swift in Sources */, B0845924215B78C700479D27 /* AmivMicroAppCheckin.swift in Sources */,
...@@ -856,8 +898,9 @@ ...@@ -856,8 +898,9 @@
B0FE2F0621541C5C00F3D073 /* GenericInfoViewController.swift in Sources */, B0FE2F0621541C5C00F3D073 /* GenericInfoViewController.swift in Sources */,
B0AF91472157D36E008F3B80 /* EventsResponse.swift in Sources */, B0AF91472157D36E008F3B80 /* EventsResponse.swift in Sources */,
B0FE2F1221550C0100F3D073 /* JobsViewControllerDelegate.swift in Sources */, B0FE2F1221550C0100F3D073 /* JobsViewControllerDelegate.swift in Sources */,
B0AF914B2157DE2A008F3B80 /* EventItem.swift in Sources */, B0AF914B2157DE2A008F3B80 /* AMIVEvent.swift in Sources */,
B0845926215B797200479D27 /* AmivMicroApp.swift in Sources */, B0845926215B797200479D27 /* AmivMicroApp.swift in Sources */,
B0F5B94F217137EC005E4591 /* Local+Extension.swift in Sources */,
B0FE2F082154230500F3D073 /* GenericInfoViewControllerDelegate.swift in Sources */, B0FE2F082154230500F3D073 /* GenericInfoViewControllerDelegate.swift in Sources */,
B050E1852151A3700090CB79 /* SettingsViewController.swift in Sources */, B050E1852151A3700090CB79 /* SettingsViewController.swift in Sources */,
B0FE2F102154495100F3D073 /* BlurButton.swift in Sources */, B0FE2F102154495100F3D073 /* BlurButton.swift in Sources */,
...@@ -880,6 +923,7 @@ ...@@ -880,6 +923,7 @@
B050E15F2151735A0090CB79 /* UIColor+Extension.swift in Sources */, B050E15F2151735A0090CB79 /* UIColor+Extension.swift in Sources */,
B0845928215B7AF200479D27 /* AmivMicroAppBarcode.swift in Sources */, B0845928215B7AF200479D27 /* AmivMicroAppBarcode.swift in Sources */,
B050E17F215195B50090CB79 /* UIFont+Extension.swift in Sources */, B050E17F215195B50090CB79 /* UIFont+Extension.swift in Sources */,
B0F5B95C2171786C005E4591 /* AMIVApiUser.swift in Sources */,
B0AF912E2157B19A008F3B80 /* HTTPMethod.swift in Sources */, B0AF912E2157B19A008F3B80 /* HTTPMethod.swift in Sources */,
B0AF91302157B26C008F3B80 /* HTTPTask.swift in Sources */, B0AF91302157B26C008F3B80 /* HTTPTask.swift in Sources */,
B07A8A022152384F003CC2D8 /* InfoItemModel.swift in Sources */, B07A8A022152384F003CC2D8 /* InfoItemModel.swift in Sources */,
......
...@@ -10,5 +10,18 @@ ...@@ -10,5 +10,18 @@
<integer>0</integer> <integer>0</integer>
</dict> </dict>
</dict> </dict>
<key>SuppressBuildableAutocreation</key>
<dict>
<key>B050E11B215169230090CB79</key>
<dict>
<key>primary</key>
<true/>
</dict>
<key>B050E12F215169250090CB79</key>
<dict>
<key>primary</key>
<true/>
</dict>
</dict>
</dict> </dict>
</plist> </plist>
//
// Local+Extension.swift
// Amiv
//
// Created by Domenic Wüthrich on 12.10.18.
// Copyright © 2018 Amiv an der ETH. All rights reserved.
//
import Foundation
public extension Locale {
public enum AppLanguage {
case german
case english
}
public static func current() -> AppLanguage {
if ["de-DE", "de-CH", "de-AT", "de-LI", "de-LU"].contains(Locale.current.languageCode) {
return .german
} else {
return .english
}
}
public static func getLocalizedString(english: String, german: String) -> String {
switch Locale.current() {
case .english:
return english
case .german:
return german
}
}
}
...@@ -13,6 +13,7 @@ public enum KeychainKey: String { ...@@ -13,6 +13,7 @@ public enum KeychainKey: String {
case username case username
case password case password
case authToken case authToken
case sessionID
} }
......
...@@ -10,15 +10,27 @@ import Foundation ...@@ -10,15 +10,27 @@ import Foundation
public struct EventViewModel { public struct EventViewModel {
let title: String // MARK: - Variables
let eventResponse: EventsResponse?
let viewTitle: String
let events: [AMIVEvent]
// MARK: - Initializers
public init(viewTitle: String, events: [AMIVEvent]) {
self.viewTitle = viewTitle
self.events = events
}
public init(response: EventsResponse) {
self.init(viewTitle: "Events", events: response.events)
}
} }
extension EventViewModel { extension EventViewModel {
public static func create(with response: EventsResponse?) -> EventViewModel { public static func empty() -> EventViewModel {
return self.init(title: "Events", eventResponse: response) return self.init(viewTitle: "Events", events: [])
} }
} }
//
// JobsViewModel.swift
// Amiv
//
// Created by Domenic Wüthrich on 12.10.18.
// Copyright © 2018 Amiv an der ETH. All rights reserved.
//
import Foundation
public struct JobsViewModel {
// MARK: - Variables
var viewTitle: String
var jobOffers: [JobOffer]
// MARK: - Initializers
public init(viewTitle: String, jobOffers: [JobOffer]) {
self.viewTitle = viewTitle
self.jobOffers = jobOffers
}
public init(jobOffers: [JobOffer]) {
self.init(viewTitle: "Jobs", jobOffers: jobOffers)
}
}
extension JobsViewModel {
public static func empty() -> JobsViewModel {
return .init(jobOffers: [])
}
}
...@@ -24,7 +24,7 @@ public class AppNavigator: Navigator { ...@@ -24,7 +24,7 @@ public class AppNavigator: Navigator {
// MARK: - Tabs // MARK: - Tabs
private enum Tab: Int { private enum Tab: Int {
case home //case home
case events case events
case jobs case jobs
case apps case apps
...@@ -43,7 +43,7 @@ public class AppNavigator: Navigator { ...@@ -43,7 +43,7 @@ public class AppNavigator: Navigator {
private func createTabs() { private func createTabs() {
// Create all tabs // Create all tabs
self.createHomeTab() //self.createHomeTab()
self.createEventsTab() self.createEventsTab()
self.createJobsTab() self.createJobsTab()
self.createAmivApplicationTab() self.createAmivApplicationTab()
...@@ -51,7 +51,7 @@ public class AppNavigator: Navigator { ...@@ -51,7 +51,7 @@ public class AppNavigator: Navigator {
// Make tabBarController ready // Make tabBarController ready
self.tabBarController.viewControllers = self.childNavigators.map({ $0.rootViewController }) self.tabBarController.viewControllers = self.childNavigators.map({ $0.rootViewController })
self.tabBarController.selectedIndex = Tab.home.rawValue self.tabBarController.selectedIndex = Tab.events.rawValue
self.tabBarController.tabBar.tintColor = .amivRed self.tabBarController.tabBar.tintColor = .amivRed
} }
......
...@@ -24,7 +24,7 @@ public class EventsNavigator: Navigator { ...@@ -24,7 +24,7 @@ public class EventsNavigator: Navigator {
// MARK: - Initializers // MARK: - Initializers
public init() { public init() {
let events = EventsViewController(model: .create(with: nil)) let events = EventsViewController(model: .empty())
self.navigationController = UINavigationController(rootViewController: events) self.navigationController = UINavigationController(rootViewController: events)
self.navigationController.navigationBar.tintColor = .amivRed self.navigationController.navigationBar.tintColor = .amivRed
events.delegate = self events.delegate = self
...@@ -44,22 +44,37 @@ public class EventsNavigator: Navigator { ...@@ -44,22 +44,37 @@ public class EventsNavigator: Navigator {
extension EventsNavigator: EventsViewControllerDelegate { extension EventsNavigator: EventsViewControllerDelegate {
public func didSelectEvent(_ viewController: EventsViewController, section: Int, index: Int) { public func didSelectEvent(_ viewController: EventsViewController, event: AMIVEvent) {
debugPrint("didSelect section: \(section) and index: \(index)")
// TODO: - Retrieve event, convert into GenericInfoViewControllerModel and show Detail View if let eventImage = event.image {
// let model = ... self.networkManager.getImage(for: eventImage.filePath) { (data, error) in
self.goToEventDetailView(model: .createTestModel()) let model: GenericInfoViewControllerModel
if error == nil, let data = data {
let image = UIImage(data: data)
model = GenericInfoViewControllerModel(event: event, image: image)
} else {
model = GenericInfoViewControllerModel(event: event, image: nil)
}
DispatchQueue.main.async {
self.goToEventDetailView(model: model)
}
}
} else {
let model = GenericInfoViewControllerModel(event: event, image: nil)
self.goToEventDetailView(model: model)
}
} }
public func refreshData(_ viewController: EventsViewController) { public func refreshData(_ viewController: EventsViewController) {
debugPrint("Refreshing Events Data")
self.networkManager.getEvents { (response, error) in self.networkManager.getEvents { (response, error) in
if let response = response { guard let response = response else {
DispatchQueue.main.async { DispatchQueue.main.async {
viewController.model = .create(with: response) viewController.tableView.refreshControl?.endRefreshing()
} }
return
}
DispatchQueue.main.async {
viewController.model = EventViewModel(response: response)
} }
} }
} }
...@@ -68,7 +83,7 @@ extension EventsNavigator: EventsViewControllerDelegate { ...@@ -68,7 +83,7 @@ extension EventsNavigator: EventsViewControllerDelegate {
extension EventsNavigator: GenericInfoViewControllerDelegate { extension EventsNavigator: GenericInfoViewControllerDelegate {
public func buttonTapped(_ viewController: GenericInfoViewController) { public func buttonTapped(_ viewController: GenericInfoViewController, action: GenericInfoViewControllerAction) {
debugPrint("Info View button tapped") debugPrint("Info View button tapped")
// TODO: - Sign up for event // TODO: - Sign up for event
......
...@@ -27,19 +27,19 @@ public class JobsNavigator: Navigator { ...@@ -27,19 +27,19 @@ public class JobsNavigator: Navigator {
// MARK: - Initializers // MARK: - Initializers
public init() { public init() {
let jobs = JobsViewController() let jobs = JobsViewController(model: JobsViewModel.empty())
self.navigationController = UINavigationController(rootViewController: jobs) self.navigationController = UINavigationController(rootViewController: jobs)
self.navigationController.navigationBar.tintColor = .amivRed self.navigationController.navigationBar.tintColor = .amivRed
jobs.delegate = self jobs.delegate = self
#warning("replace with proper code")
manager.getJobOffers { (offers, error) in manager.getJobOffers { (offers, error) in