git.iko.soy/dashared/hookah-tau
on b13a477 help sign in
Hookah Tau.xcodeproj/project.pbxproj+4−334
since splitsnapshots
unifiedsplit
@@ -17,9 +17,6 @@
17 12118B9E23682049006BAEE3 /* PhoneCodeResolver.swift in Sources */ = {isa = PBXBuildFile; fileRef = 12118B9D23682049006BAEE3 /* PhoneCodeResolver.swift */; };
17 12118B9E23682049006BAEE3 /* PhoneCodeResolver.swift in Sources */ = {isa = PBXBuildFile; fileRef = 12118B9D23682049006BAEE3 /* PhoneCodeResolver.swift */; };
18 1212048C23914CFD00CAF162 /* DeleteReservationResolver.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1212048B23914CFD00CAF162 /* DeleteReservationResolver.swift */; };
18 1212048C23914CFD00CAF162 /* DeleteReservationResolver.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1212048B23914CFD00CAF162 /* DeleteReservationResolver.swift */; };
19 1212048E23915A0A00CAF162 /* ChangeReservationResolver.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1212048D23915A0A00CAF162 /* ChangeReservationResolver.swift */; };
19 1212048E23915A0A00CAF162 /* ChangeReservationResolver.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1212048D23915A0A00CAF162 /* ChangeReservationResolver.swift */; };
20− 1220A6F423CDB1AD00365E36 /* GetClientByPhoneNumberResolver.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1220A6F323CDB1AD00365E36 /* GetClientByPhoneNumberResolver.swift */; };
21− 1220A6F723CDB64A00365E36 /* AdminSecondStepReservationViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1220A6F623CDB64A00365E36 /* AdminSecondStepReservationViewController.swift */; };
22− 1220A6FA23CDBE7E00365E36 /* AdminFinalStepReservationCoordinator.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1220A6F923CDBE7E00365E36 /* AdminFinalStepReservationCoordinator.swift */; };
23 12219CEF2353A63F0057DDEE /* ReservationsCoordinator.swift in Sources */ = {isa = PBXBuildFile; fileRef = 12219CEE2353A63E0057DDEE /* ReservationsCoordinator.swift */; };
20 12219CEF2353A63F0057DDEE /* ReservationsCoordinator.swift in Sources */ = {isa = PBXBuildFile; fileRef = 12219CEE2353A63E0057DDEE /* ReservationsCoordinator.swift */; };
24 12230AEA238FD8B3004A01E5 /* MapView2.xib in Resources */ = {isa = PBXBuildFile; fileRef = 12230AE9238FD8B3004A01E5 /* MapView2.xib */; };
21 12230AEA238FD8B3004A01E5 /* MapView2.xib in Resources */ = {isa = PBXBuildFile; fileRef = 12230AE9238FD8B3004A01E5 /* MapView2.xib */; };
25 12230AEC238FD8C5004A01E5 /* MapView2.swift in Sources */ = {isa = PBXBuildFile; fileRef = 12230AEB238FD8C5004A01E5 /* MapView2.swift */; };
22 12230AEC238FD8C5004A01E5 /* MapView2.swift in Sources */ = {isa = PBXBuildFile; fileRef = 12230AEB238FD8C5004A01E5 /* MapView2.swift */; };
@@ -31,10 +28,6 @@
31 123615CF235510BC00D1122A /* ProfileView.xib in Resources */ = {isa = PBXBuildFile; fileRef = 123615CE235510BC00D1122A /* ProfileView.xib */; };
28 123615CF235510BC00D1122A /* ProfileView.xib in Resources */ = {isa = PBXBuildFile; fileRef = 123615CE235510BC00D1122A /* ProfileView.xib */; };
32 123615D12355141600D1122A /* ProfileView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 123615D02355141600D1122A /* ProfileView.swift */; };
29 123615D12355141600D1122A /* ProfileView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 123615D02355141600D1122A /* ProfileView.swift */; };
33 12387337234BB98700D1F1AB /* CodeView.xib in Resources */ = {isa = PBXBuildFile; fileRef = 12387336234BB98700D1F1AB /* CodeView.xib */; };
30 12387337234BB98700D1F1AB /* CodeView.xib in Resources */ = {isa = PBXBuildFile; fileRef = 12387336234BB98700D1F1AB /* CodeView.xib */; };
34− 123D25F0239E3E11002FA32B /* AdminAddressCoordinator.swift in Sources */ = {isa = PBXBuildFile; fileRef = 123D25EF239E3E11002FA32B /* AdminAddressCoordinator.swift */; };
35− 123D25F2239E3E44002FA32B /* ClientsCoordinator.swift in Sources */ = {isa = PBXBuildFile; fileRef = 123D25F1239E3E44002FA32B /* ClientsCoordinator.swift */; };
36− 123D25F4239E3FF5002FA32B /* ClientsViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 123D25F3239E3FF5002FA32B /* ClientsViewController.swift */; };
37− 123D25F7239E5839002FA32B /* ClientTableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 123D25F6239E5839002FA32B /* ClientTableViewCell.swift */; };
38 1246B717235CD186004CBFA1 /* NoReservationsView.xib in Resources */ = {isa = PBXBuildFile; fileRef = 1246B716235CD186004CBFA1 /* NoReservationsView.xib */; };
31 1246B717235CD186004CBFA1 /* NoReservationsView.xib in Resources */ = {isa = PBXBuildFile; fileRef = 1246B716235CD186004CBFA1 /* NoReservationsView.xib */; };
39 1246B719235CD3AD004CBFA1 /* NoReservationsView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1246B718235CD3AD004CBFA1 /* NoReservationsView.swift */; };
32 1246B719235CD3AD004CBFA1 /* NoReservationsView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1246B718235CD3AD004CBFA1 /* NoReservationsView.swift */; };
40 1246B71C235CDF3A004CBFA1 /* ReservationCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1246B71B235CDF3A004CBFA1 /* ReservationCell.swift */; };
33 1246B71C235CDF3A004CBFA1 /* ReservationCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1246B71B235CDF3A004CBFA1 /* ReservationCell.swift */; };
@@ -43,7 +36,6 @@
43 124D007C23721FD400AE76B9 /* Reservation.swift in Sources */ = {isa = PBXBuildFile; fileRef = 124D007B23721FD400AE76B9 /* Reservation.swift */; };
36 124D007C23721FD400AE76B9 /* Reservation.swift in Sources */ = {isa = PBXBuildFile; fileRef = 124D007B23721FD400AE76B9 /* Reservation.swift */; };
44 124D007F237222B200AE76B9 /* ReservationsResolver.swift in Sources */ = {isa = PBXBuildFile; fileRef = 124D007E237222B200AE76B9 /* ReservationsResolver.swift */; };
37 124D007F237222B200AE76B9 /* ReservationsResolver.swift in Sources */ = {isa = PBXBuildFile; fileRef = 124D007E237222B200AE76B9 /* ReservationsResolver.swift */; };
45 124D0081237222C900AE76B9 /* ReservationsService.swift in Sources */ = {isa = PBXBuildFile; fileRef = 124D0080237222C900AE76B9 /* ReservationsService.swift */; };
38 124D0081237222C900AE76B9 /* ReservationsService.swift in Sources */ = {isa = PBXBuildFile; fileRef = 124D0080237222C900AE76B9 /* ReservationsService.swift */; };
46− 1252D9E523CDCDB300446B6F /* ACreateReservationResolver.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1252D9E423CDCDB300446B6F /* ACreateReservationResolver.swift */; };
47 125AE51D2395583E00F847BD /* ChangeReservationCoordinator.swift in Sources */ = {isa = PBXBuildFile; fileRef = 125AE51C2395583E00F847BD /* ChangeReservationCoordinator.swift */; };
39 125AE51D2395583E00F847BD /* ChangeReservationCoordinator.swift in Sources */ = {isa = PBXBuildFile; fileRef = 125AE51C2395583E00F847BD /* ChangeReservationCoordinator.swift */; };
48 125AE51F2395585300F847BD /* ChangeReservationViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 125AE51E2395585300F847BD /* ChangeReservationViewController.swift */; };
40 125AE51F2395585300F847BD /* ChangeReservationViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 125AE51E2395585300F847BD /* ChangeReservationViewController.swift */; };
49 125AE5212395753400F847BD /* HFunc.swift in Sources */ = {isa = PBXBuildFile; fileRef = 125AE5202395753400F847BD /* HFunc.swift */; };
41 125AE5212395753400F847BD /* HFunc.swift in Sources */ = {isa = PBXBuildFile; fileRef = 125AE5202395753400F847BD /* HFunc.swift */; };
@@ -55,32 +47,12 @@
55 12838EB4236779C700CEF108 /* ApiResolver.swift in Sources */ = {isa = PBXBuildFile; fileRef = 12838EB3236779C700CEF108 /* ApiResolver.swift */; };
47 12838EB4236779C700CEF108 /* ApiResolver.swift in Sources */ = {isa = PBXBuildFile; fileRef = 12838EB3236779C700CEF108 /* ApiResolver.swift */; };
56 12838EB623677FB900CEF108 /* ApiRequest.swift in Sources */ = {isa = PBXBuildFile; fileRef = 12838EB523677FB900CEF108 /* ApiRequest.swift */; };
48 12838EB623677FB900CEF108 /* ApiRequest.swift in Sources */ = {isa = PBXBuildFile; fileRef = 12838EB523677FB900CEF108 /* ApiRequest.swift */; };
57 12838EB82367834900CEF108 /* MyCodable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 12838EB72367834900CEF108 /* MyCodable.swift */; };
49 12838EB82367834900CEF108 /* MyCodable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 12838EB72367834900CEF108 /* MyCodable.swift */; };
58− 129F162723CC838200EE13FC /* AdminFirstStepReservationViewCoordinator.swift in Sources */ = {isa = PBXBuildFile; fileRef = 129F162623CC838200EE13FC /* AdminFirstStepReservationViewCoordinator.swift */; };
59− 129F162C23CC8D2E00EE13FC /* AdminSecondStepReservationViewCoordinator.swift in Sources */ = {isa = PBXBuildFile; fileRef = 129F162B23CC8D2E00EE13FC /* AdminSecondStepReservationViewCoordinator.swift */; };
60− 129F163023CC8EF600EE13FC /* PhoneTextField.swift in Sources */ = {isa = PBXBuildFile; fileRef = 129F162F23CC8EF600EE13FC /* PhoneTextField.swift */; };
61 12A075F72373535C00D749BB /* FirstStepReservationViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 12A075F62373535C00D749BB /* FirstStepReservationViewController.swift */; };
50 12A075F72373535C00D749BB /* FirstStepReservationViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 12A075F62373535C00D749BB /* FirstStepReservationViewController.swift */; };
62 12A075F9237353F500D749BB /* MapView1.xib in Resources */ = {isa = PBXBuildFile; fileRef = 12A075F8237353F500D749BB /* MapView1.xib */; };
51 12A075F9237353F500D749BB /* MapView1.xib in Resources */ = {isa = PBXBuildFile; fileRef = 12A075F8237353F500D749BB /* MapView1.xib */; };
63 12A075FB2373561A00D749BB /* Reservation.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 12A075FA2373561A00D749BB /* Reservation.storyboard */; };
52 12A075FB2373561A00D749BB /* Reservation.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 12A075FA2373561A00D749BB /* Reservation.storyboard */; };
64 12A075FD237357E900D749BB /* FirstStepReservationCoordinator.swift in Sources */ = {isa = PBXBuildFile; fileRef = 12A075FC237357E900D749BB /* FirstStepReservationCoordinator.swift */; };
53 12A075FD237357E900D749BB /* FirstStepReservationCoordinator.swift in Sources */ = {isa = PBXBuildFile; fileRef = 12A075FC237357E900D749BB /* FirstStepReservationCoordinator.swift */; };
65 12A075FF237358F200D749BB /* MapView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 12A075FE237358F200D749BB /* MapView.swift */; };
54 12A075FF237358F200D749BB /* MapView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 12A075FE237358F200D749BB /* MapView.swift */; };
66 12A07601237359BB00D749BB /* MapView1.swift in Sources */ = {isa = PBXBuildFile; fileRef = 12A07600237359BB00D749BB /* MapView1.swift */; };
55 12A07601237359BB00D749BB /* MapView1.swift in Sources */ = {isa = PBXBuildFile; fileRef = 12A07600237359BB00D749BB /* MapView1.swift */; };
67− 12B3A79823ABADB9009E2FA6 /* AdminReservationView.xib in Resources */ = {isa = PBXBuildFile; fileRef = 12B3A79723ABADB9009E2FA6 /* AdminReservationView.xib */; };
68− 12B3A79A23ABB4E2009E2FA6 /* IntervalPickerView.xib in Resources */ = {isa = PBXBuildFile; fileRef = 12B3A79923ABB4E2009E2FA6 /* IntervalPickerView.xib */; };
69− 12B3A79C23ABB8ED009E2FA6 /* IntervalPickerView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 12B3A79B23ABB8ED009E2FA6 /* IntervalPickerView.swift */; };
70− 12B3A79F23ABCA21009E2FA6 /* AdminReservationView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 12B3A79E23ABCA21009E2FA6 /* AdminReservationView.swift */; };
71− 12B3A7A323ABD594009E2FA6 /* AdminReservationsController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 12B3A7A223ABD594009E2FA6 /* AdminReservationsController.swift */; };
72− 12B3A7A523ABDA25009E2FA6 /* AdminReservationsCoordinator.swift in Sources */ = {isa = PBXBuildFile; fileRef = 12B3A7A423ABDA25009E2FA6 /* AdminReservationsCoordinator.swift */; };
73− 12B3A7A823ABDDB1009E2FA6 /* AdminReservationCellView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 12B3A7A723ABDDB1009E2FA6 /* AdminReservationCellView.swift */; };
74− 12B3A7AA23ABDDC1009E2FA6 /* AdminReservations.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 12B3A7A923ABDDC1009E2FA6 /* AdminReservations.storyboard */; };
75− 12B3A7AD23ABEABF009E2FA6 /* AReservationsResolver.swift in Sources */ = {isa = PBXBuildFile; fileRef = 12B3A7AC23ABEABF009E2FA6 /* AReservationsResolver.swift */; };
76− 12B3A7AF23AC1872009E2FA6 /* AdminNoReservationsView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 12B3A7AE23AC1872009E2FA6 /* AdminNoReservationsView.swift */; };
77− 12B3A7B123AC1885009E2FA6 /* AdminNoReservationsView.xib in Resources */ = {isa = PBXBuildFile; fileRef = 12B3A7B023AC1885009E2FA6 /* AdminNoReservationsView.xib */; };
78− 12B3A7B423AC1D09009E2FA6 /* AdminReservationCellView.xib in Resources */ = {isa = PBXBuildFile; fileRef = 12B3A7B323AC1D09009E2FA6 /* AdminReservationCellView.xib */; };
79− 12B3A7B923ACCD83009E2FA6 /* AddOtherAdminResolver.swift in Sources */ = {isa = PBXBuildFile; fileRef = 12B3A7B823ACCD83009E2FA6 /* AddOtherAdminResolver.swift */; };
80− 12B3A7BC23ACFD75009E2FA6 /* ReservationsAroundResolver.swift in Sources */ = {isa = PBXBuildFile; fileRef = 12B3A7BB23ACFD75009E2FA6 /* ReservationsAroundResolver.swift */; };
81− 12B3A7BE23AD0049009E2FA6 /* AdminReservationEditingViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 12B3A7BD23AD0048009E2FA6 /* AdminReservationEditingViewController.swift */; };
82− 12B3A7C023AD0749009E2FA6 /* AdminReservationEditingCoordinator.swift in Sources */ = {isa = PBXBuildFile; fileRef = 12B3A7BF23AD0749009E2FA6 /* AdminReservationEditingCoordinator.swift */; };
83− 12B3A7C423AD2FCD009E2FA6 /* AChangeReservationResolver.swift in Sources */ = {isa = PBXBuildFile; fileRef = 12B3A7C323AD2FCD009E2FA6 /* AChangeReservationResolver.swift */; };
84 12B4447C238EF25C000B6B16 /* CreateReservationResolver.swift in Sources */ = {isa = PBXBuildFile; fileRef = 12B4447B238EF25C000B6B16 /* CreateReservationResolver.swift */; };
56 12B4447C238EF25C000B6B16 /* CreateReservationResolver.swift in Sources */ = {isa = PBXBuildFile; fileRef = 12B4447B238EF25C000B6B16 /* CreateReservationResolver.swift */; };
85 12B6A60F235B857A00898B31 /* ProfileChangeCoordinator.swift in Sources */ = {isa = PBXBuildFile; fileRef = 12B6A60E235B857A00898B31 /* ProfileChangeCoordinator.swift */; };
57 12B6A60F235B857A00898B31 /* ProfileChangeCoordinator.swift in Sources */ = {isa = PBXBuildFile; fileRef = 12B6A60E235B857A00898B31 /* ProfileChangeCoordinator.swift */; };
86 12B6A611235B8EC500898B31 /* User.swift in Sources */ = {isa = PBXBuildFile; fileRef = 12B6A610235B8EC500898B31 /* User.swift */; };
58 12B6A611235B8EC500898B31 /* User.swift in Sources */ = {isa = PBXBuildFile; fileRef = 12B6A610235B8EC500898B31 /* User.swift */; };
@@ -91,26 +63,13 @@
91 12BD95B2237EC22B009614D8 /* FirstStepView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 12BD95B1237EC22B009614D8 /* FirstStepView.swift */; };
63 12BD95B2237EC22B009614D8 /* FirstStepView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 12BD95B1237EC22B009614D8 /* FirstStepView.swift */; };
92 12BD95B6237ED8AC009614D8 /* TimePointView.xib in Resources */ = {isa = PBXBuildFile; fileRef = 12BD95B5237ED8AB009614D8 /* TimePointView.xib */; };
64 12BD95B6237ED8AC009614D8 /* TimePointView.xib in Resources */ = {isa = PBXBuildFile; fileRef = 12BD95B5237ED8AB009614D8 /* TimePointView.xib */; };
93 12BD95B8237EDB01009614D8 /* TimePointView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 12BD95B7237EDB01009614D8 /* TimePointView.swift */; };
65 12BD95B8237EDB01009614D8 /* TimePointView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 12BD95B7237EDB01009614D8 /* TimePointView.swift */; };
94− 12BE4B332399A52E00FC974B /* AdminTabbarCoordinator.swift in Sources */ = {isa = PBXBuildFile; fileRef = 12BE4B322399A52E00FC974B /* AdminTabbarCoordinator.swift */; };
95− 12BE4B352399A60A00FC974B /* AdminTabbarController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 12BE4B342399A60A00FC974B /* AdminTabbarController.swift */; };
96− 12BE4B372399A98200FC974B /* Admin.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 12BE4B362399A98200FC974B /* Admin.storyboard */; };
97− 12C0B4BB239E5A3A00562BA3 /* ClientList.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 12C0B4BA239E5A3A00562BA3 /* ClientList.storyboard */; };
98 12C72EDF23537D1B00AD7004 /* ProfileCoordinator.swift in Sources */ = {isa = PBXBuildFile; fileRef = 12C72EDE23537D1B00AD7004 /* ProfileCoordinator.swift */; };
66 12C72EDF23537D1B00AD7004 /* ProfileCoordinator.swift in Sources */ = {isa = PBXBuildFile; fileRef = 12C72EDE23537D1B00AD7004 /* ProfileCoordinator.swift */; };
99 12C72EE1235380D400AD7004 /* ProfileClientViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 12C72EE0235380D400AD7004 /* ProfileClientViewController.swift */; };
67 12C72EE1235380D400AD7004 /* ProfileClientViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 12C72EE0235380D400AD7004 /* ProfileClientViewController.swift */; };
100 12C72EE3235380EB00AD7004 /* ReservationsViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 12C72EE2235380EB00AD7004 /* ReservationsViewController.swift */; };
68 12C72EE3235380EB00AD7004 /* ReservationsViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 12C72EE2235380EB00AD7004 /* ReservationsViewController.swift */; };
101 12D8FA2D237F003800305F57 /* DateView.xib in Resources */ = {isa = PBXBuildFile; fileRef = 12D8FA2C237F003800305F57 /* DateView.xib */; };
69 12D8FA2D237F003800305F57 /* DateView.xib in Resources */ = {isa = PBXBuildFile; fileRef = 12D8FA2C237F003800305F57 /* DateView.xib */; };
102 12D8FA2F237F00E200305F57 /* DateView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 12D8FA2E237F00E200305F57 /* DateView.swift */; };
70 12D8FA2F237F00E200305F57 /* DateView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 12D8FA2E237F00E200305F57 /* DateView.swift */; };
103 12D8FA31237F08C700305F57 /* AllReservations.swift in Sources */ = {isa = PBXBuildFile; fileRef = 12D8FA30237F08C700305F57 /* AllReservations.swift */; };
71 12D8FA31237F08C700305F57 /* AllReservations.swift in Sources */ = {isa = PBXBuildFile; fileRef = 12D8FA30237F08C700305F57 /* AllReservations.swift */; };
104− 12D928AF23C47DCF0051724D /* ADeleteReservationResolver.swift in Sources */ = {isa = PBXBuildFile; fileRef = 12D928AE23C47DCF0051724D /* ADeleteReservationResolver.swift */; };
105− 12D928B123C486380051724D /* BaseTableViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 12D928B023C486380051724D /* BaseTableViewController.swift */; };
106− 12D928B323C7464B0051724D /* BlocklistPutResolver.swift in Sources */ = {isa = PBXBuildFile; fileRef = 12D928B223C7464B0051724D /* BlocklistPutResolver.swift */; };
107 12DBEEB223539F2100AF1BB6 /* Client.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 12DBEEB123539F2100AF1BB6 /* Client.storyboard */; };
72 12DBEEB223539F2100AF1BB6 /* Client.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 12DBEEB123539F2100AF1BB6 /* Client.storyboard */; };
108− 12E35071239FA8CA004BB188 /* Extensions+String.swift in Sources */ = {isa = PBXBuildFile; fileRef = 12E35070239FA8CA004BB188 /* Extensions+String.swift */; };
109− 12E35074239FAF52004BB188 /* ClientsService.swift in Sources */ = {isa = PBXBuildFile; fileRef = 12E35073239FAF52004BB188 /* ClientsService.swift */; };
110− 12E35078239FAFA4004BB188 /* ClientsListResolver.swift in Sources */ = {isa = PBXBuildFile; fileRef = 12E35077239FAFA4004BB188 /* ClientsListResolver.swift */; };
111− 12E3507B239FCFB2004BB188 /* ProfileTableViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 12E3507A239FCFB2004BB188 /* ProfileTableViewController.swift */; };
112− 12E3507D239FD1F3004BB188 /* ClientReservationsResolver.swift in Sources */ = {isa = PBXBuildFile; fileRef = 12E3507C239FD1F3004BB188 /* ClientReservationsResolver.swift */; };
113− 12E3507F239FDFC2004BB188 /* ClientProfileCoordinator.swift in Sources */ = {isa = PBXBuildFile; fileRef = 12E3507E239FDFC2004BB188 /* ClientProfileCoordinator.swift */; };
114 12EA99462362B674005D9FE9 /* AddressCoordinator.swift in Sources */ = {isa = PBXBuildFile; fileRef = 12EA99452362B674005D9FE9 /* AddressCoordinator.swift */; };
73 12EA99462362B674005D9FE9 /* AddressCoordinator.swift in Sources */ = {isa = PBXBuildFile; fileRef = 12EA99452362B674005D9FE9 /* AddressCoordinator.swift */; };
115 12EA99482362B684005D9FE9 /* AddresViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 12EA99472362B684005D9FE9 /* AddresViewController.swift */; };
74 12EA99482362B684005D9FE9 /* AddresViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 12EA99472362B684005D9FE9 /* AddresViewController.swift */; };
116 12EA994C2362F8EF005D9FE9 /* AddressView.xib in Resources */ = {isa = PBXBuildFile; fileRef = 12EA994B2362F8EF005D9FE9 /* AddressView.xib */; };
75 12EA994C2362F8EF005D9FE9 /* AddressView.xib in Resources */ = {isa = PBXBuildFile; fileRef = 12EA994B2362F8EF005D9FE9 /* AddressView.xib */; };
@@ -121,7 +80,6 @@
121 12F9652A23868E6000FCA696 /* SecondStepView.xib in Resources */ = {isa = PBXBuildFile; fileRef = 12F9652923868E6000FCA696 /* SecondStepView.xib */; };
80 12F9652A23868E6000FCA696 /* SecondStepView.xib in Resources */ = {isa = PBXBuildFile; fileRef = 12F9652923868E6000FCA696 /* SecondStepView.xib */; };
122 12F9652C23868E7200FCA696 /* SecondStepView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 12F9652B23868E7200FCA696 /* SecondStepView.swift */; };
81 12F9652C23868E7200FCA696 /* SecondStepView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 12F9652B23868E7200FCA696 /* SecondStepView.swift */; };
123 12F9652E23869F3100FCA696 /* SecondStepReservationCoordinator.swift in Sources */ = {isa = PBXBuildFile; fileRef = 12F9652D23869F3100FCA696 /* SecondStepReservationCoordinator.swift */; };
82 12F9652E23869F3100FCA696 /* SecondStepReservationCoordinator.swift in Sources */ = {isa = PBXBuildFile; fileRef = 12F9652D23869F3100FCA696 /* SecondStepReservationCoordinator.swift */; };
124− 12FC07B923C8D17600EDC55B /* DeleteOtherAdminResolver.swift in Sources */ = {isa = PBXBuildFile; fileRef = 12FC07B823C8D17600EDC55B /* DeleteOtherAdminResolver.swift */; };
125 12FC40382382C93D00AB593B /* TableButtonStyle.swift in Sources */ = {isa = PBXBuildFile; fileRef = 12FC40372382C93C00AB593B /* TableButtonStyle.swift */; };
83 12FC40382382C93D00AB593B /* TableButtonStyle.swift in Sources */ = {isa = PBXBuildFile; fileRef = 12FC40372382C93C00AB593B /* TableButtonStyle.swift */; };
126 12FC403A2382CB6F00AB593B /* TableButton.swift in Sources */ = {isa = PBXBuildFile; fileRef = 12FC40392382CB6F00AB593B /* TableButton.swift */; };
84 12FC403A2382CB6F00AB593B /* TableButton.swift in Sources */ = {isa = PBXBuildFile; fileRef = 12FC40392382CB6F00AB593B /* TableButton.swift */; };
127 F30369B5233679EA00A8EA84 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = F30369B4233679EA00A8EA84 /* LaunchScreen.storyboard */; };
85 F30369B5233679EA00A8EA84 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = F30369B4233679EA00A8EA84 /* LaunchScreen.storyboard */; };
@@ -182,9 +140,6 @@
182 12118B9D23682049006BAEE3 /* PhoneCodeResolver.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PhoneCodeResolver.swift; sourceTree = "<group>"; };
140 12118B9D23682049006BAEE3 /* PhoneCodeResolver.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PhoneCodeResolver.swift; sourceTree = "<group>"; };
183 1212048B23914CFD00CAF162 /* DeleteReservationResolver.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DeleteReservationResolver.swift; sourceTree = "<group>"; };
141 1212048B23914CFD00CAF162 /* DeleteReservationResolver.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DeleteReservationResolver.swift; sourceTree = "<group>"; };
184 1212048D23915A0A00CAF162 /* ChangeReservationResolver.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ChangeReservationResolver.swift; sourceTree = "<group>"; };
142 1212048D23915A0A00CAF162 /* ChangeReservationResolver.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ChangeReservationResolver.swift; sourceTree = "<group>"; };
185− 1220A6F323CDB1AD00365E36 /* GetClientByPhoneNumberResolver.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = GetClientByPhoneNumberResolver.swift; sourceTree = "<group>"; };
186− 1220A6F623CDB64A00365E36 /* AdminSecondStepReservationViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AdminSecondStepReservationViewController.swift; sourceTree = "<group>"; };
187− 1220A6F923CDBE7E00365E36 /* AdminFinalStepReservationCoordinator.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AdminFinalStepReservationCoordinator.swift; sourceTree = "<group>"; };
188 12219CEE2353A63E0057DDEE /* ReservationsCoordinator.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ReservationsCoordinator.swift; sourceTree = "<group>"; };
143 12219CEE2353A63E0057DDEE /* ReservationsCoordinator.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ReservationsCoordinator.swift; sourceTree = "<group>"; };
189 12230AE9238FD8B3004A01E5 /* MapView2.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = MapView2.xib; sourceTree = "<group>"; };
144 12230AE9238FD8B3004A01E5 /* MapView2.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = MapView2.xib; sourceTree = "<group>"; };
190 12230AEB238FD8C5004A01E5 /* MapView2.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MapView2.swift; sourceTree = "<group>"; };
145 12230AEB238FD8C5004A01E5 /* MapView2.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MapView2.swift; sourceTree = "<group>"; };
@@ -196,10 +151,6 @@
196 123615CE235510BC00D1122A /* ProfileView.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = ProfileView.xib; sourceTree = "<group>"; };
151 123615CE235510BC00D1122A /* ProfileView.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = ProfileView.xib; sourceTree = "<group>"; };
197 123615D02355141600D1122A /* ProfileView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ProfileView.swift; sourceTree = "<group>"; };
152 123615D02355141600D1122A /* ProfileView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ProfileView.swift; sourceTree = "<group>"; };
198 12387336234BB98700D1F1AB /* CodeView.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = CodeView.xib; sourceTree = "<group>"; };
153 12387336234BB98700D1F1AB /* CodeView.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = CodeView.xib; sourceTree = "<group>"; };
199− 123D25EF239E3E11002FA32B /* AdminAddressCoordinator.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AdminAddressCoordinator.swift; sourceTree = "<group>"; };
200− 123D25F1239E3E44002FA32B /* ClientsCoordinator.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ClientsCoordinator.swift; sourceTree = "<group>"; };
201− 123D25F3239E3FF5002FA32B /* ClientsViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ClientsViewController.swift; sourceTree = "<group>"; };
202− 123D25F6239E5839002FA32B /* ClientTableViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ClientTableViewCell.swift; sourceTree = "<group>"; };
203 1246B716235CD186004CBFA1 /* NoReservationsView.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = NoReservationsView.xib; sourceTree = "<group>"; };
154 1246B716235CD186004CBFA1 /* NoReservationsView.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = NoReservationsView.xib; sourceTree = "<group>"; };
204 1246B718235CD3AD004CBFA1 /* NoReservationsView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NoReservationsView.swift; sourceTree = "<group>"; };
155 1246B718235CD3AD004CBFA1 /* NoReservationsView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NoReservationsView.swift; sourceTree = "<group>"; };
205 1246B71B235CDF3A004CBFA1 /* ReservationCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ReservationCell.swift; sourceTree = "<group>"; };
156 1246B71B235CDF3A004CBFA1 /* ReservationCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ReservationCell.swift; sourceTree = "<group>"; };
@@ -208,7 +159,6 @@
208 124D007B23721FD400AE76B9 /* Reservation.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Reservation.swift; sourceTree = "<group>"; };
159 124D007B23721FD400AE76B9 /* Reservation.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Reservation.swift; sourceTree = "<group>"; };
209 124D007E237222B200AE76B9 /* ReservationsResolver.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ReservationsResolver.swift; sourceTree = "<group>"; };
160 124D007E237222B200AE76B9 /* ReservationsResolver.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ReservationsResolver.swift; sourceTree = "<group>"; };
210 124D0080237222C900AE76B9 /* ReservationsService.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ReservationsService.swift; sourceTree = "<group>"; };
161 124D0080237222C900AE76B9 /* ReservationsService.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ReservationsService.swift; sourceTree = "<group>"; };
211− 1252D9E423CDCDB300446B6F /* ACreateReservationResolver.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ACreateReservationResolver.swift; sourceTree = "<group>"; };
212 125AE51C2395583E00F847BD /* ChangeReservationCoordinator.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ChangeReservationCoordinator.swift; sourceTree = "<group>"; };
162 125AE51C2395583E00F847BD /* ChangeReservationCoordinator.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ChangeReservationCoordinator.swift; sourceTree = "<group>"; };
213 125AE51E2395585300F847BD /* ChangeReservationViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ChangeReservationViewController.swift; sourceTree = "<group>"; };
163 125AE51E2395585300F847BD /* ChangeReservationViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ChangeReservationViewController.swift; sourceTree = "<group>"; };
214 125AE5202395753400F847BD /* HFunc.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HFunc.swift; sourceTree = "<group>"; };
164 125AE5202395753400F847BD /* HFunc.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HFunc.swift; sourceTree = "<group>"; };
@@ -219,32 +169,12 @@
219 12838EB3236779C700CEF108 /* ApiResolver.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ApiResolver.swift; sourceTree = "<group>"; };
169 12838EB3236779C700CEF108 /* ApiResolver.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ApiResolver.swift; sourceTree = "<group>"; };
220 12838EB523677FB900CEF108 /* ApiRequest.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ApiRequest.swift; sourceTree = "<group>"; };
170 12838EB523677FB900CEF108 /* ApiRequest.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ApiRequest.swift; sourceTree = "<group>"; };
221 12838EB72367834900CEF108 /* MyCodable.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MyCodable.swift; sourceTree = "<group>"; };
171 12838EB72367834900CEF108 /* MyCodable.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MyCodable.swift; sourceTree = "<group>"; };
222− 129F162623CC838200EE13FC /* AdminFirstStepReservationViewCoordinator.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AdminFirstStepReservationViewCoordinator.swift; sourceTree = "<group>"; };
223− 129F162B23CC8D2E00EE13FC /* AdminSecondStepReservationViewCoordinator.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AdminSecondStepReservationViewCoordinator.swift; sourceTree = "<group>"; };
224− 129F162F23CC8EF600EE13FC /* PhoneTextField.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PhoneTextField.swift; sourceTree = "<group>"; };
225 12A075F62373535C00D749BB /* FirstStepReservationViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FirstStepReservationViewController.swift; sourceTree = "<group>"; };
172 12A075F62373535C00D749BB /* FirstStepReservationViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FirstStepReservationViewController.swift; sourceTree = "<group>"; };
226 12A075F8237353F500D749BB /* MapView1.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = MapView1.xib; sourceTree = "<group>"; };
173 12A075F8237353F500D749BB /* MapView1.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = MapView1.xib; sourceTree = "<group>"; };
227 12A075FA2373561A00D749BB /* Reservation.storyboard */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; path = Reservation.storyboard; sourceTree = "<group>"; };
174 12A075FA2373561A00D749BB /* Reservation.storyboard */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; path = Reservation.storyboard; sourceTree = "<group>"; };
228 12A075FC237357E900D749BB /* FirstStepReservationCoordinator.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FirstStepReservationCoordinator.swift; sourceTree = "<group>"; };
175 12A075FC237357E900D749BB /* FirstStepReservationCoordinator.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FirstStepReservationCoordinator.swift; sourceTree = "<group>"; };
229 12A075FE237358F200D749BB /* MapView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MapView.swift; sourceTree = "<group>"; };
176 12A075FE237358F200D749BB /* MapView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MapView.swift; sourceTree = "<group>"; };
230 12A07600237359BB00D749BB /* MapView1.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MapView1.swift; sourceTree = "<group>"; };
177 12A07600237359BB00D749BB /* MapView1.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MapView1.swift; sourceTree = "<group>"; };
231− 12B3A79723ABADB9009E2FA6 /* AdminReservationView.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = AdminReservationView.xib; sourceTree = "<group>"; };
232− 12B3A79923ABB4E2009E2FA6 /* IntervalPickerView.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = IntervalPickerView.xib; sourceTree = "<group>"; };
233− 12B3A79B23ABB8ED009E2FA6 /* IntervalPickerView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = IntervalPickerView.swift; sourceTree = "<group>"; };
234− 12B3A79E23ABCA21009E2FA6 /* AdminReservationView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AdminReservationView.swift; sourceTree = "<group>"; };
235− 12B3A7A223ABD594009E2FA6 /* AdminReservationsController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AdminReservationsController.swift; sourceTree = "<group>"; };
236− 12B3A7A423ABDA25009E2FA6 /* AdminReservationsCoordinator.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AdminReservationsCoordinator.swift; sourceTree = "<group>"; };
237− 12B3A7A723ABDDB1009E2FA6 /* AdminReservationCellView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AdminReservationCellView.swift; sourceTree = "<group>"; };
238− 12B3A7A923ABDDC1009E2FA6 /* AdminReservations.storyboard */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; path = AdminReservations.storyboard; sourceTree = "<group>"; };
239− 12B3A7AC23ABEABF009E2FA6 /* AReservationsResolver.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AReservationsResolver.swift; sourceTree = "<group>"; };
240− 12B3A7AE23AC1872009E2FA6 /* AdminNoReservationsView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AdminNoReservationsView.swift; sourceTree = "<group>"; };
241− 12B3A7B023AC1885009E2FA6 /* AdminNoReservationsView.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = AdminNoReservationsView.xib; sourceTree = "<group>"; };
242− 12B3A7B323AC1D09009E2FA6 /* AdminReservationCellView.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = AdminReservationCellView.xib; sourceTree = "<group>"; };
243− 12B3A7B823ACCD83009E2FA6 /* AddOtherAdminResolver.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AddOtherAdminResolver.swift; sourceTree = "<group>"; };
244− 12B3A7BB23ACFD75009E2FA6 /* ReservationsAroundResolver.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ReservationsAroundResolver.swift; sourceTree = "<group>"; };
245− 12B3A7BD23AD0048009E2FA6 /* AdminReservationEditingViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AdminReservationEditingViewController.swift; sourceTree = "<group>"; };
246− 12B3A7BF23AD0749009E2FA6 /* AdminReservationEditingCoordinator.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AdminReservationEditingCoordinator.swift; sourceTree = "<group>"; };
247− 12B3A7C323AD2FCD009E2FA6 /* AChangeReservationResolver.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AChangeReservationResolver.swift; sourceTree = "<group>"; };
248 12B4447B238EF25C000B6B16 /* CreateReservationResolver.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CreateReservationResolver.swift; sourceTree = "<group>"; };
178 12B4447B238EF25C000B6B16 /* CreateReservationResolver.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CreateReservationResolver.swift; sourceTree = "<group>"; };
249 12B6A60E235B857A00898B31 /* ProfileChangeCoordinator.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ProfileChangeCoordinator.swift; sourceTree = "<group>"; };
179 12B6A60E235B857A00898B31 /* ProfileChangeCoordinator.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ProfileChangeCoordinator.swift; sourceTree = "<group>"; };
250 12B6A610235B8EC500898B31 /* User.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = User.swift; sourceTree = "<group>"; };
180 12B6A610235B8EC500898B31 /* User.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = User.swift; sourceTree = "<group>"; };
@@ -255,26 +185,13 @@
255 12BD95B1237EC22B009614D8 /* FirstStepView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FirstStepView.swift; sourceTree = "<group>"; };
185 12BD95B1237EC22B009614D8 /* FirstStepView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FirstStepView.swift; sourceTree = "<group>"; };
256 12BD95B5237ED8AB009614D8 /* TimePointView.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = TimePointView.xib; sourceTree = "<group>"; };
186 12BD95B5237ED8AB009614D8 /* TimePointView.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = TimePointView.xib; sourceTree = "<group>"; };
257 12BD95B7237EDB01009614D8 /* TimePointView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TimePointView.swift; sourceTree = "<group>"; };
187 12BD95B7237EDB01009614D8 /* TimePointView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TimePointView.swift; sourceTree = "<group>"; };
258− 12BE4B322399A52E00FC974B /* AdminTabbarCoordinator.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AdminTabbarCoordinator.swift; sourceTree = "<group>"; };
259− 12BE4B342399A60A00FC974B /* AdminTabbarController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AdminTabbarController.swift; sourceTree = "<group>"; };
260− 12BE4B362399A98200FC974B /* Admin.storyboard */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; path = Admin.storyboard; sourceTree = "<group>"; };
261− 12C0B4BA239E5A3A00562BA3 /* ClientList.storyboard */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; path = ClientList.storyboard; sourceTree = "<group>"; };
262 12C72EDE23537D1B00AD7004 /* ProfileCoordinator.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ProfileCoordinator.swift; sourceTree = "<group>"; };
188 12C72EDE23537D1B00AD7004 /* ProfileCoordinator.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ProfileCoordinator.swift; sourceTree = "<group>"; };
263 12C72EE0235380D400AD7004 /* ProfileClientViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ProfileClientViewController.swift; sourceTree = "<group>"; };
189 12C72EE0235380D400AD7004 /* ProfileClientViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ProfileClientViewController.swift; sourceTree = "<group>"; };
264 12C72EE2235380EB00AD7004 /* ReservationsViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ReservationsViewController.swift; sourceTree = "<group>"; };
190 12C72EE2235380EB00AD7004 /* ReservationsViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ReservationsViewController.swift; sourceTree = "<group>"; };
265 12D8FA2C237F003800305F57 /* DateView.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = DateView.xib; sourceTree = "<group>"; };
191 12D8FA2C237F003800305F57 /* DateView.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = DateView.xib; sourceTree = "<group>"; };
266 12D8FA2E237F00E200305F57 /* DateView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DateView.swift; sourceTree = "<group>"; };
192 12D8FA2E237F00E200305F57 /* DateView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DateView.swift; sourceTree = "<group>"; };
267 12D8FA30237F08C700305F57 /* AllReservations.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AllReservations.swift; sourceTree = "<group>"; };
193 12D8FA30237F08C700305F57 /* AllReservations.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AllReservations.swift; sourceTree = "<group>"; };
268− 12D928AE23C47DCF0051724D /* ADeleteReservationResolver.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ADeleteReservationResolver.swift; sourceTree = "<group>"; };
269− 12D928B023C486380051724D /* BaseTableViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BaseTableViewController.swift; sourceTree = "<group>"; };
270− 12D928B223C7464B0051724D /* BlocklistPutResolver.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BlocklistPutResolver.swift; sourceTree = "<group>"; };
271 12DBEEB123539F2100AF1BB6 /* Client.storyboard */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; path = Client.storyboard; sourceTree = "<group>"; };
194 12DBEEB123539F2100AF1BB6 /* Client.storyboard */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; path = Client.storyboard; sourceTree = "<group>"; };
272− 12E35070239FA8CA004BB188 /* Extensions+String.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "Extensions+String.swift"; sourceTree = "<group>"; };
273− 12E35073239FAF52004BB188 /* ClientsService.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ClientsService.swift; sourceTree = "<group>"; };
274− 12E35077239FAFA4004BB188 /* ClientsListResolver.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ClientsListResolver.swift; sourceTree = "<group>"; };
275− 12E3507A239FCFB2004BB188 /* ProfileTableViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ProfileTableViewController.swift; sourceTree = "<group>"; };
276− 12E3507C239FD1F3004BB188 /* ClientReservationsResolver.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ClientReservationsResolver.swift; sourceTree = "<group>"; };
277− 12E3507E239FDFC2004BB188 /* ClientProfileCoordinator.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ClientProfileCoordinator.swift; sourceTree = "<group>"; };
278 12EA99452362B674005D9FE9 /* AddressCoordinator.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AddressCoordinator.swift; sourceTree = "<group>"; };
195 12EA99452362B674005D9FE9 /* AddressCoordinator.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AddressCoordinator.swift; sourceTree = "<group>"; };
279 12EA99472362B684005D9FE9 /* AddresViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AddresViewController.swift; sourceTree = "<group>"; };
196 12EA99472362B684005D9FE9 /* AddresViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AddresViewController.swift; sourceTree = "<group>"; };
280 12EA994B2362F8EF005D9FE9 /* AddressView.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = AddressView.xib; sourceTree = "<group>"; };
197 12EA994B2362F8EF005D9FE9 /* AddressView.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = AddressView.xib; sourceTree = "<group>"; };
@@ -285,7 +202,6 @@
285 12F9652923868E6000FCA696 /* SecondStepView.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = SecondStepView.xib; sourceTree = "<group>"; };
202 12F9652923868E6000FCA696 /* SecondStepView.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = SecondStepView.xib; sourceTree = "<group>"; };
286 12F9652B23868E7200FCA696 /* SecondStepView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SecondStepView.swift; sourceTree = "<group>"; };
203 12F9652B23868E7200FCA696 /* SecondStepView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SecondStepView.swift; sourceTree = "<group>"; };
287 12F9652D23869F3100FCA696 /* SecondStepReservationCoordinator.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SecondStepReservationCoordinator.swift; sourceTree = "<group>"; };
204 12F9652D23869F3100FCA696 /* SecondStepReservationCoordinator.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SecondStepReservationCoordinator.swift; sourceTree = "<group>"; };
288− 12FC07B823C8D17600EDC55B /* DeleteOtherAdminResolver.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DeleteOtherAdminResolver.swift; sourceTree = "<group>"; };
289 12FC40372382C93C00AB593B /* TableButtonStyle.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TableButtonStyle.swift; sourceTree = "<group>"; };
205 12FC40372382C93C00AB593B /* TableButtonStyle.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TableButtonStyle.swift; sourceTree = "<group>"; };
290 12FC40392382CB6F00AB593B /* TableButton.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TableButton.swift; sourceTree = "<group>"; };
206 12FC40392382CB6F00AB593B /* TableButton.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TableButton.swift; sourceTree = "<group>"; };
291 F30369B4233679EA00A8EA84 /* LaunchScreen.storyboard */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; path = LaunchScreen.storyboard; sourceTree = "<group>"; };
207 F30369B4233679EA00A8EA84 /* LaunchScreen.storyboard */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; path = LaunchScreen.storyboard; sourceTree = "<group>"; };
@@ -406,31 +322,6 @@
406 path = Reservations;
322 path = Reservations;
407 sourceTree = "<group>";
323 sourceTree = "<group>";
408 };
324 };
409− 1220A6F523CDB63000365E36 /* 2 */ = {
410− isa = PBXGroup;
411− children = (
412− 1220A6F623CDB64A00365E36 /* AdminSecondStepReservationViewController.swift */,
413− 129F162B23CC8D2E00EE13FC /* AdminSecondStepReservationViewCoordinator.swift */,
414− );
415− path = 2;
416− sourceTree = "<group>";
417− };
418− 1220A6F823CDB65C00365E36 /* 1 */ = {
419− isa = PBXGroup;
420− children = (
421− 129F162623CC838200EE13FC /* AdminFirstStepReservationViewCoordinator.swift */,
422− );
423− path = 1;
424− sourceTree = "<group>";
425− };
426− 1220A6FB23CDBED900365E36 /* 3 */ = {
427− isa = PBXGroup;
428− children = (
429− 1220A6F923CDBE7E00365E36 /* AdminFinalStepReservationCoordinator.swift */,
430− );
431− path = 3;
432− sourceTree = "<group>";
433− };
434 12230AED238FD8D5004A01E5 /* 1 */ = {
325 12230AED238FD8D5004A01E5 /* 1 */ = {
435 isa = PBXGroup;
326 isa = PBXGroup;
436 children = (
327 children = (
@@ -497,46 +388,6 @@
497 path = Views;
388 path = Views;
498 sourceTree = "<group>";
389 sourceTree = "<group>";
499 };
390 };
500− 123D25EC239E3D47002FA32B /* Profile */ = {
501− isa = PBXGroup;
502− children = (
503− );
504− path = Profile;
505− sourceTree = "<group>";
506− };
507− 123D25ED239E3D50002FA32B /* Reservations */ = {
508− isa = PBXGroup;
509− children = (
510− 129F162523CC836600EE13FC /* Making a reeservation */,
511− 12B3A79623ABAD9A009E2FA6 /* Views */,
512− 12B3A7C123AD0751009E2FA6 /* Editing */,
513− 12B3A7C223AD0762009E2FA6 /* List of reservations */,
514− 123D25EF239E3E11002FA32B /* AdminAddressCoordinator.swift */,
515− 12B3A7A923ABDDC1009E2FA6 /* AdminReservations.storyboard */,
516− );
517− path = Reservations;
518− sourceTree = "<group>";
519− };
520− 123D25EE239E3D61002FA32B /* Clients */ = {
521− isa = PBXGroup;
522− children = (
523− 12E35079239FCF91004BB188 /* Profile */,
524− 123D25F5239E57D6002FA32B /* Cells */,
525− 123D25F1239E3E44002FA32B /* ClientsCoordinator.swift */,
526− 123D25F3239E3FF5002FA32B /* ClientsViewController.swift */,
527− 12C0B4BA239E5A3A00562BA3 /* ClientList.storyboard */,
528− );
529− path = Clients;
530− sourceTree = "<group>";
531− };
532− 123D25F5239E57D6002FA32B /* Cells */ = {
533− isa = PBXGroup;
534− children = (
535− 123D25F6239E5839002FA32B /* ClientTableViewCell.swift */,
536− );
537− path = Cells;
538− sourceTree = "<group>";
539− };
540 1246B71A235CD4C5004CBFA1 /* Views */ = {
391 1246B71A235CD4C5004CBFA1 /* Views */ = {
541 isa = PBXGroup;
392 isa = PBXGroup;
542 children = (
393 children = (
@@ -567,12 +418,10 @@
567 124D00822372233000AE76B9 /* Resolvers */ = {
418 124D00822372233000AE76B9 /* Resolvers */ = {
568 isa = PBXGroup;
419 isa = PBXGroup;
569 children = (
420 children = (
570− 12B3A7AB23ABEAAB009E2FA6 /* Admin */,
571 124D007E237222B200AE76B9 /* ReservationsResolver.swift */,
421 124D007E237222B200AE76B9 /* ReservationsResolver.swift */,
572 12B4447B238EF25C000B6B16 /* CreateReservationResolver.swift */,
422 12B4447B238EF25C000B6B16 /* CreateReservationResolver.swift */,
573 1212048B23914CFD00CAF162 /* DeleteReservationResolver.swift */,
423 1212048B23914CFD00CAF162 /* DeleteReservationResolver.swift */,
574 1212048D23915A0A00CAF162 /* ChangeReservationResolver.swift */,
424 1212048D23915A0A00CAF162 /* ChangeReservationResolver.swift */,
575− 12B3A7BB23ACFD75009E2FA6 /* ReservationsAroundResolver.swift */,
576 );
425 );
577 path = Resolvers;
426 path = Resolvers;
578 sourceTree = "<group>";
427 sourceTree = "<group>";
@@ -594,7 +443,6 @@
594 12838EAF236777D400CEF108 /* ServerError.swift */,
443 12838EAF236777D400CEF108 /* ServerError.swift */,
595 12838EB523677FB900CEF108 /* ApiRequest.swift */,
444 12838EB523677FB900CEF108 /* ApiRequest.swift */,
596 12838EB72367834900CEF108 /* MyCodable.swift */,
445 12838EB72367834900CEF108 /* MyCodable.swift */,
597− 12E35072239FAF41004BB188 /* ClientsService */,
598 12230AF223900BB6004A01E5 /* Establishments api */,
446 12230AF223900BB6004A01E5 /* Establishments api */,
599 124D007D2372229500AE76B9 /* Reservations api */,
447 124D007D2372229500AE76B9 /* Reservations api */,
600 12118B9A2368187B006BAEE3 /* Authorization api */,
448 12118B9A2368187B006BAEE3 /* Authorization api */,
@@ -602,91 +450,6 @@
602 path = API;
450 path = API;
603 sourceTree = "<group>";
451 sourceTree = "<group>";
604 };
452 };
605− 129F162523CC836600EE13FC /* Making a reeservation */ = {
606− isa = PBXGroup;
607− children = (
608− 1220A6F823CDB65C00365E36 /* 1 */,
609− 1220A6F523CDB63000365E36 /* 2 */,
610− 1220A6FB23CDBED900365E36 /* 3 */,
611− );
612− path = "Making a reeservation";
613− sourceTree = "<group>";
614− };
615− 129F162823CC89EA00EE13FC /* Phone number */ = {
616− isa = PBXGroup;
617− children = (
618− );
619− path = "Phone number";
620− sourceTree = "<group>";
621− };
622− 12B3A79623ABAD9A009E2FA6 /* Views */ = {
623− isa = PBXGroup;
624− children = (
625− 129F162823CC89EA00EE13FC /* Phone number */,
626− 12B3A7B223AC1A1F009E2FA6 /* No reserv */,
627− 12B3A79723ABADB9009E2FA6 /* AdminReservationView.xib */,
628− 12B3A79E23ABCA21009E2FA6 /* AdminReservationView.swift */,
629− );
630− path = Views;
631− sourceTree = "<group>";
632− };
633− 12B3A79D23ABB8F4009E2FA6 /* Picker view */ = {
634− isa = PBXGroup;
635− children = (
636− 12B3A79923ABB4E2009E2FA6 /* IntervalPickerView.xib */,
637− 12B3A79B23ABB8ED009E2FA6 /* IntervalPickerView.swift */,
638− );
639− path = "Picker view";
640− sourceTree = "<group>";
641− };
642− 12B3A7A623ABDD92009E2FA6 /* Cell */ = {
643− isa = PBXGroup;
644− children = (
645− 12B3A7A723ABDDB1009E2FA6 /* AdminReservationCellView.swift */,
646− 12B3A7B323AC1D09009E2FA6 /* AdminReservationCellView.xib */,
647− );
648− path = Cell;
649− sourceTree = "<group>";
650− };
651− 12B3A7AB23ABEAAB009E2FA6 /* Admin */ = {
652− isa = PBXGroup;
653− children = (
654− 12B3A7AC23ABEABF009E2FA6 /* AReservationsResolver.swift */,
655− 12B3A7C323AD2FCD009E2FA6 /* AChangeReservationResolver.swift */,
656− 12D928AE23C47DCF0051724D /* ADeleteReservationResolver.swift */,
657− 1252D9E423CDCDB300446B6F /* ACreateReservationResolver.swift */,
658− );
659− path = Admin;
660− sourceTree = "<group>";
661− };
662− 12B3A7B223AC1A1F009E2FA6 /* No reserv */ = {
663− isa = PBXGroup;
664− children = (
665− 12B3A7AE23AC1872009E2FA6 /* AdminNoReservationsView.swift */,
666− 12B3A7B023AC1885009E2FA6 /* AdminNoReservationsView.xib */,
667− );
668− path = "No reserv";
669− sourceTree = "<group>";
670− };
671− 12B3A7C123AD0751009E2FA6 /* Editing */ = {
672− isa = PBXGroup;
673− children = (
674− 12B3A7BF23AD0749009E2FA6 /* AdminReservationEditingCoordinator.swift */,
675− 12B3A7BD23AD0048009E2FA6 /* AdminReservationEditingViewController.swift */,
676− );
677− name = Editing;
678− sourceTree = "<group>";
679− };
680− 12B3A7C223AD0762009E2FA6 /* List of reservations */ = {
681− isa = PBXGroup;
682− children = (
683− 12B3A7A623ABDD92009E2FA6 /* Cell */,
684− 12B3A7A223ABD594009E2FA6 /* AdminReservationsController.swift */,
685− 12B3A7A423ABDA25009E2FA6 /* AdminReservationsCoordinator.swift */,
686− );
687− path = "List of reservations";
688− sourceTree = "<group>";
689− };
690 12BD95AE237EBE52009614D8 /* Maps */ = {
453 12BD95AE237EBE52009614D8 /* Maps */ = {
691 isa = PBXGroup;
454 isa = PBXGroup;
692 children = (
455 children = (
@@ -720,16 +483,6 @@
720 path = 1;
483 path = 1;
721 sourceTree = "<group>";
484 sourceTree = "<group>";
722 };
485 };
723− 12BE4B312399A51500FC974B /* Tab bar */ = {
724− isa = PBXGroup;
725− children = (
726− 12BE4B322399A52E00FC974B /* AdminTabbarCoordinator.swift */,
727− 12BE4B342399A60A00FC974B /* AdminTabbarController.swift */,
728− 12BE4B362399A98200FC974B /* Admin.storyboard */,
729− );
730− path = "Tab bar";
731− sourceTree = "<group>";
732− };
733 12C72EDB235367CF00AD7004 /* Tab bar */ = {
486 12C72EDB235367CF00AD7004 /* Tab bar */ = {
734 isa = PBXGroup;
487 isa = PBXGroup;
735 children = (
488 children = (
@@ -740,37 +493,6 @@
740 path = "Tab bar";
493 path = "Tab bar";
741 sourceTree = "<group>";
494 sourceTree = "<group>";
742 };
495 };
743− 12E35072239FAF41004BB188 /* ClientsService */ = {
744− isa = PBXGroup;
745− children = (
746− 12E35073239FAF52004BB188 /* ClientsService.swift */,
747− 12E35075239FAF8F004BB188 /* Resolvers */,
748− );
749− path = ClientsService;
750− sourceTree = "<group>";
751− };
752− 12E35075239FAF8F004BB188 /* Resolvers */ = {
753− isa = PBXGroup;
754− children = (
755− 12FC07B823C8D17600EDC55B /* DeleteOtherAdminResolver.swift */,
756− 12B3A7B823ACCD83009E2FA6 /* AddOtherAdminResolver.swift */,
757− 12E35077239FAFA4004BB188 /* ClientsListResolver.swift */,
758− 12E3507C239FD1F3004BB188 /* ClientReservationsResolver.swift */,
759− 12D928B223C7464B0051724D /* BlocklistPutResolver.swift */,
760− 1220A6F323CDB1AD00365E36 /* GetClientByPhoneNumberResolver.swift */,
761− );
762− path = Resolvers;
763− sourceTree = "<group>";
764− };
765− 12E35079239FCF91004BB188 /* Profile */ = {
766− isa = PBXGroup;
767− children = (
768− 12E3507A239FCFB2004BB188 /* ProfileTableViewController.swift */,
769− 12E3507E239FDFC2004BB188 /* ClientProfileCoordinator.swift */,
770− );
771− path = Profile;
772− sourceTree = "<group>";
773− };
774 12EA99492362B9F5005D9FE9 /* Adress of reservation */ = {
496 12EA99492362B9F5005D9FE9 /* Adress of reservation */ = {
775 isa = PBXGroup;
497 isa = PBXGroup;
776 children = (
498 children = (
@@ -844,8 +566,6 @@
844 F3FC7DFC2315C4710080D851 /* BaseCoordinator.swift */,
566 F3FC7DFC2315C4710080D851 /* BaseCoordinator.swift */,
845 F3FC7DFA2315C25D0080D851 /* ApplicationCoordinator.swift */,
567 F3FC7DFA2315C25D0080D851 /* ApplicationCoordinator.swift */,
846 12B6A612235B9B4300898B31 /* BaseViewController.swift */,
568 12B6A612235B9B4300898B31 /* BaseViewController.swift */,
847− 12D928B023C486380051724D /* BaseTableViewController.swift */,
848− 12B3A79D23ABB8F4009E2FA6 /* Picker view */,
849 F30369BB2336845F00A8EA84 /* Admin */,
569 F30369BB2336845F00A8EA84 /* Admin */,
850 F30369BA2336845400A8EA84 /* Client */,
570 F30369BA2336845400A8EA84 /* Client */,
851 F30369B82336842600A8EA84 /* Authentication */,
571 F30369B82336842600A8EA84 /* Authentication */,
@@ -872,7 +592,6 @@
872 F3DC5A04233E89D500B5E751 /* Button.swift */,
592 F3DC5A04233E89D500B5E751 /* Button.swift */,
873 12FC40372382C93C00AB593B /* TableButtonStyle.swift */,
593 12FC40372382C93C00AB593B /* TableButtonStyle.swift */,
874 12FC40392382CB6F00AB593B /* TableButton.swift */,
594 12FC40392382CB6F00AB593B /* TableButton.swift */,
875− 129F162F23CC8EF600EE13FC /* PhoneTextField.swift */,
876 );
595 );
877 path = Components;
596 path = Components;
878 sourceTree = "<group>";
597 sourceTree = "<group>";
@@ -890,10 +609,6 @@
890 F30369BB2336845F00A8EA84 /* Admin */ = {
609 F30369BB2336845F00A8EA84 /* Admin */ = {
891 isa = PBXGroup;
610 isa = PBXGroup;
892 children = (
611 children = (
893− 123D25ED239E3D50002FA32B /* Reservations */,
894− 123D25EE239E3D61002FA32B /* Clients */,
895− 123D25EC239E3D47002FA32B /* Profile */,
896− 12BE4B312399A51500FC974B /* Tab bar */,
897 );
612 );
898 path = Admin;
613 path = Admin;
899 sourceTree = "<group>";
614 sourceTree = "<group>";
@@ -1003,7 +718,6 @@
1003 F31E20C62348DDB900BEA215 /* Extensions+UIView.swift */,
718 F31E20C62348DDB900BEA215 /* Extensions+UIView.swift */,
1004 12050568238048CE00801618 /* Extensions+Date.swift */,
719 12050568238048CE00801618 /* Extensions+Date.swift */,
1005 1205056A2380588C00801618 /* Extenstions+IBDesignable.swift */,
720 1205056A2380588C00801618 /* Extenstions+IBDesignable.swift */,
1006− 12E35070239FA8CA004BB188 /* Extensions+String.swift */,
1007 125AE5202395753400F847BD /* HFunc.swift */,
721 125AE5202395753400F847BD /* HFunc.swift */,
1008 12838EB923679AEB00CEF108 /* API */,
722 12838EB923679AEB00CEF108 /* API */,
1009 F30369BC2336861100A8EA84 /* Models */,
723 F30369BC2336861100A8EA84 /* Models */,
@@ -1145,13 +859,8 @@
1145 buildActionMask = 2147483647;
859 buildActionMask = 2147483647;
1146 files = (
860 files = (
1147 F3199E5B233FE08200F3C17A /* PhoneView.xib in Resources */,
861 F3199E5B233FE08200F3C17A /* PhoneView.xib in Resources */,
1148− 12B3A7AA23ABDDC1009E2FA6 /* AdminReservations.storyboard in Resources */,
1149− 12B3A7B423AC1D09009E2FA6 /* AdminReservationCellView.xib in Resources */,
1150− 12C0B4BB239E5A3A00562BA3 /* ClientList.storyboard in Resources */,
1151− 12BE4B372399A98200FC974B /* Admin.storyboard in Resources */,
1152 12DBEEB223539F2100AF1BB6 /* Client.storyboard in Resources */,
862 12DBEEB223539F2100AF1BB6 /* Client.storyboard in Resources */,
1153 12D8FA2D237F003800305F57 /* DateView.xib in Resources */,
863 12D8FA2D237F003800305F57 /* DateView.xib in Resources */,
1154− 12B3A79A23ABB4E2009E2FA6 /* IntervalPickerView.xib in Resources */,
1155 12387337234BB98700D1F1AB /* CodeView.xib in Resources */,
864 12387337234BB98700D1F1AB /* CodeView.xib in Resources */,
1156 12B6A615235BB36C00898B31 /* ChangeView.xib in Resources */,
865 12B6A615235BB36C00898B31 /* ChangeView.xib in Resources */,
1157 F3851B2C2340A280009EE0B6 /* TitleTextView.xib in Resources */,
866 F3851B2C2340A280009EE0B6 /* TitleTextView.xib in Resources */,
@@ -1165,8 +874,6 @@
1165 12BD95B0237EBEDF009614D8 /* FirstStepView.xib in Resources */,
874 12BD95B0237EBEDF009614D8 /* FirstStepView.xib in Resources */,
1166 F30369B5233679EA00A8EA84 /* LaunchScreen.storyboard in Resources */,
875 F30369B5233679EA00A8EA84 /* LaunchScreen.storyboard in Resources */,
1167 1246B717235CD186004CBFA1 /* NoReservationsView.xib in Resources */,
876 1246B717235CD186004CBFA1 /* NoReservationsView.xib in Resources */,
1168− 12B3A7B123AC1885009E2FA6 /* AdminNoReservationsView.xib in Resources */,
1169− 12B3A79823ABADB9009E2FA6 /* AdminReservationView.xib in Resources */,
1170 F3FC7DD42315BE630080D851 /* Assets.xcassets in Resources */,
877 F3FC7DD42315BE630080D851 /* Assets.xcassets in Resources */,
1171 12EA994C2362F8EF005D9FE9 /* AddressView.xib in Resources */,
878 12EA994C2362F8EF005D9FE9 /* AddressView.xib in Resources */,
1172 F3EBE2452340FDA7000FEE1A /* NameTextView.xib in Resources */,
879 F3EBE2452340FDA7000FEE1A /* NameTextView.xib in Resources */,
@@ -1197,14 +904,9 @@
1197 files = (
904 files = (
1198 12EA99482362B684005D9FE9 /* AddresViewController.swift in Sources */,
905 12EA99482362B684005D9FE9 /* AddresViewController.swift in Sources */,
1199 124D007F237222B200AE76B9 /* ReservationsResolver.swift in Sources */,
906 124D007F237222B200AE76B9 /* ReservationsResolver.swift in Sources */,
1200− 129F163023CC8EF600EE13FC /* PhoneTextField.swift in Sources */,
1201− 129F162C23CC8D2E00EE13FC /* AdminSecondStepReservationViewCoordinator.swift in Sources */,
1202 12230AF723900D44004A01E5 /* EstablishmentResolver.swift in Sources */,
907 12230AF723900D44004A01E5 /* EstablishmentResolver.swift in Sources */,
1203 1246B719235CD3AD004CBFA1 /* NoReservationsView.swift in Sources */,
908 1246B719235CD3AD004CBFA1 /* NoReservationsView.swift in Sources */,
1204 F3895F4A233D323700FA6A37 /* CodeCoordinator.swift in Sources */,
909 F3895F4A233D323700FA6A37 /* CodeCoordinator.swift in Sources */,
1205− 12B3A7B923ACCD83009E2FA6 /* AddOtherAdminResolver.swift in Sources */,
1206− 12E3507F239FDFC2004BB188 /* ClientProfileCoordinator.swift in Sources */,
1207− 12D928B323C7464B0051724D /* BlocklistPutResolver.swift in Sources */,
1208 12838EB4236779C700CEF108 /* ApiResolver.swift in Sources */,
910 12838EB4236779C700CEF108 /* ApiResolver.swift in Sources */,
1209 12838EA9236764A600CEF108 /* APIClient.swift in Sources */,
911 12838EA9236764A600CEF108 /* APIClient.swift in Sources */,
1210 123615D12355141600D1122A /* ProfileView.swift in Sources */,
912 123615D12355141600D1122A /* ProfileView.swift in Sources */,
@@ -1213,99 +915,69 @@
1213 125AE51F2395585300F847BD /* ChangeReservationViewController.swift in Sources */,
915 125AE51F2395585300F847BD /* ChangeReservationViewController.swift in Sources */,
1214 12EA99462362B674005D9FE9 /* AddressCoordinator.swift in Sources */,
916 12EA99462362B674005D9FE9 /* AddressCoordinator.swift in Sources */,
1215 12B6A613235B9B4300898B31 /* BaseViewController.swift in Sources */,
917 12B6A613235B9B4300898B31 /* BaseViewController.swift in Sources */,
1216− 12BE4B332399A52E00FC974B /* AdminTabbarCoordinator.swift in Sources */,
1217 12230AFA23901029004A01E5 /* DataStorage.swift in Sources */,
918 12230AFA23901029004A01E5 /* DataStorage.swift in Sources */,
1218− 12B3A7A823ABDDB1009E2FA6 /* AdminReservationCellView.swift in Sources */,
1219 F3FC7DFF2315C8D70080D851 /* NameCoordinator.swift in Sources */,
919 F3FC7DFF2315C8D70080D851 /* NameCoordinator.swift in Sources */,
1220− 123D25F7239E5839002FA32B /* ClientTableViewCell.swift in Sources */,
1221 120BFC7C23891965001EBE89 /* ThirdStepView.swift in Sources */,
920 120BFC7C23891965001EBE89 /* ThirdStepView.swift in Sources */,
1222− 123D25F0239E3E11002FA32B /* AdminAddressCoordinator.swift in Sources */,
1223 F3FC7DCF2315BE610080D851 /* NameViewController.swift in Sources */,
921 F3FC7DCF2315BE610080D851 /* NameViewController.swift in Sources */,
1224− 12B3A79F23ABCA21009E2FA6 /* AdminReservationView.swift in Sources */,
1225 12838EB82367834900CEF108 /* MyCodable.swift in Sources */,
922 12838EB82367834900CEF108 /* MyCodable.swift in Sources */,
1226 F3DC5A05233E89D500B5E751 /* Button.swift in Sources */,
923 F3DC5A05233E89D500B5E751 /* Button.swift in Sources */,
1227 F3FC7DFB2315C25D0080D851 /* ApplicationCoordinator.swift in Sources */,
924 F3FC7DFB2315C25D0080D851 /* ApplicationCoordinator.swift in Sources */,
1228− 12B3A7BE23AD0049009E2FA6 /* AdminReservationEditingViewController.swift in Sources */,
1229− 12BE4B352399A60A00FC974B /* AdminTabbarController.swift in Sources */,
1230 12FC403A2382CB6F00AB593B /* TableButton.swift in Sources */,
925 12FC403A2382CB6F00AB593B /* TableButton.swift in Sources */,
1231− 12D928AF23C47DCF0051724D /* ADeleteReservationResolver.swift in Sources */,
1232 12EB698123661CB300E4D1CE /* AddressCell.swift in Sources */,
926 12EB698123661CB300E4D1CE /* AddressCell.swift in Sources */,
1233 F3895F48233D2EEA00FA6A37 /* CodeSmsViewController.swift in Sources */,
927 F3895F48233D2EEA00FA6A37 /* CodeSmsViewController.swift in Sources */,
1234 12219CEF2353A63F0057DDEE /* ReservationsCoordinator.swift in Sources */,
928 12219CEF2353A63F0057DDEE /* ReservationsCoordinator.swift in Sources */,
1235 12230AF423900BCB004A01E5 /* EstablishmentService.swift in Sources */,
929 12230AF423900BCB004A01E5 /* EstablishmentService.swift in Sources */,
1236− 129F162723CC838200EE13FC /* AdminFirstStepReservationViewCoordinator.swift in Sources */,
1237 12A07601237359BB00D749BB /* MapView1.swift in Sources */,
930 12A07601237359BB00D749BB /* MapView1.swift in Sources */,
1238 125AE5212395753400F847BD /* HFunc.swift in Sources */,
931 125AE5212395753400F847BD /* HFunc.swift in Sources */,
1239 12BD95B8237EDB01009614D8 /* TimePointView.swift in Sources */,
932 12BD95B8237EDB01009614D8 /* TimePointView.swift in Sources */,
1240 12838EB2236779A000CEF108 /* AuthResolver.swift in Sources */,
933 12838EB2236779A000CEF108 /* AuthResolver.swift in Sources */,
1241 12A075F72373535C00D749BB /* FirstStepReservationViewController.swift in Sources */,
934 12A075F72373535C00D749BB /* FirstStepReservationViewController.swift in Sources */,
1242− 12E35078239FAFA4004BB188 /* ClientsListResolver.swift in Sources */,
1243 1246B71C235CDF3A004CBFA1 /* ReservationCell.swift in Sources */,
935 1246B71C235CDF3A004CBFA1 /* ReservationCell.swift in Sources */,
1244− 12E3507B239FCFB2004BB188 /* ProfileTableViewController.swift in Sources */,
1245 1212048C23914CFD00CAF162 /* DeleteReservationResolver.swift in Sources */,
936 1212048C23914CFD00CAF162 /* DeleteReservationResolver.swift in Sources */,
1246 12A075FD237357E900D749BB /* FirstStepReservationCoordinator.swift in Sources */,
937 12A075FD237357E900D749BB /* FirstStepReservationCoordinator.swift in Sources */,
1247 124D0081237222C900AE76B9 /* ReservationsService.swift in Sources */,
938 124D0081237222C900AE76B9 /* ReservationsService.swift in Sources */,
1248 1246B720235CDF9E004CBFA1 /* ReservationView.swift in Sources */,
939 1246B720235CDF9E004CBFA1 /* ReservationView.swift in Sources */,
1249− 12B3A7A523ABDA25009E2FA6 /* AdminReservationsCoordinator.swift in Sources */,
1250− 123D25F4239E3FF5002FA32B /* ClientsViewController.swift in Sources */,
1251 12050569238048CE00801618 /* Extensions+Date.swift in Sources */,
940 12050569238048CE00801618 /* Extensions+Date.swift in Sources */,
1252 124D007C23721FD400AE76B9 /* Reservation.swift in Sources */,
941 124D007C23721FD400AE76B9 /* Reservation.swift in Sources */,
1253 12D8FA2F237F00E200305F57 /* DateView.swift in Sources */,
942 12D8FA2F237F00E200305F57 /* DateView.swift in Sources */,
1254− 123D25F2239E3E44002FA32B /* ClientsCoordinator.swift in Sources */,
1255 12F9652E23869F3100FCA696 /* SecondStepReservationCoordinator.swift in Sources */,
943 12F9652E23869F3100FCA696 /* SecondStepReservationCoordinator.swift in Sources */,
1256 F3895F4E233D348B00FA6A37 /* PhoneCoordinator.swift in Sources */,
944 F3895F4E233D348B00FA6A37 /* PhoneCoordinator.swift in Sources */,
1257 12B6A617235BB37D00898B31 /* ChangeView.swift in Sources */,
945 12B6A617235BB37D00898B31 /* ChangeView.swift in Sources */,
1258 12230AEC238FD8C5004A01E5 /* MapView2.swift in Sources */,
946 12230AEC238FD8C5004A01E5 /* MapView2.swift in Sources */,
1259− 12B3A7A323ABD594009E2FA6 /* AdminReservationsController.swift in Sources */,
1260 F3FC7DCD2315BE610080D851 /* AppDelegate.swift in Sources */,
947 F3FC7DCD2315BE610080D851 /* AppDelegate.swift in Sources */,
1261 12838EB623677FB900CEF108 /* ApiRequest.swift in Sources */,
948 12838EB623677FB900CEF108 /* ApiRequest.swift in Sources */,
1262− 1220A6FA23CDBE7E00365E36 /* AdminFinalStepReservationCoordinator.swift in Sources */,
1263 12118B9E23682049006BAEE3 /* PhoneCodeResolver.swift in Sources */,
949 12118B9E23682049006BAEE3 /* PhoneCodeResolver.swift in Sources */,
1264 F30369BE2336924D00A8EA84 /* ClientTabbarCoordinator.swift in Sources */,
950 F30369BE2336924D00A8EA84 /* ClientTabbarCoordinator.swift in Sources */,
1265 F3FC7DFD2315C4710080D851 /* BaseCoordinator.swift in Sources */,
951 F3FC7DFD2315C4710080D851 /* BaseCoordinator.swift in Sources */,
1266− 1220A6F723CDB64A00365E36 /* AdminSecondStepReservationViewController.swift in Sources */,
1267− 12E35071239FA8CA004BB188 /* Extensions+String.swift in Sources */,
1268− 12FC07B923C8D17600EDC55B /* DeleteOtherAdminResolver.swift in Sources */,
1269 F3DC59FF233E893400B5E751 /* Extensions+UIFont.swift in Sources */,
952 F3DC59FF233E893400B5E751 /* Extensions+UIFont.swift in Sources */,
1270 F3895F53233D5EEB00FA6A37 /* BlackButtonStyle.swift in Sources */,
953 F3895F53233D5EEB00FA6A37 /* BlackButtonStyle.swift in Sources */,
1271 12F9652C23868E7200FCA696 /* SecondStepView.swift in Sources */,
954 12F9652C23868E7200FCA696 /* SecondStepView.swift in Sources */,
1272 120BFC7923891942001EBE89 /* ThirdStepReservationCoordinator.swift in Sources */,
955 120BFC7923891942001EBE89 /* ThirdStepReservationCoordinator.swift in Sources */,
1273− 12B3A7BC23ACFD75009E2FA6 /* ReservationsAroundResolver.swift in Sources */,
1274 12118B9C23682022006BAEE3 /* RegistrationResolver.swift in Sources */,
956 12118B9C23682022006BAEE3 /* RegistrationResolver.swift in Sources */,
1275− 12B3A7C423AD2FCD009E2FA6 /* AChangeReservationResolver.swift in Sources */,
1276 F30369C02336925800A8EA84 /* ClientTabbarController.swift in Sources */,
957 F30369C02336925800A8EA84 /* ClientTabbarController.swift in Sources */,
1277− 12B3A7C023AD0749009E2FA6 /* AdminReservationEditingCoordinator.swift in Sources */,
1278 F31E20C72348DDB900BEA215 /* Extensions+UIView.swift in Sources */,
958 F31E20C72348DDB900BEA215 /* Extensions+UIView.swift in Sources */,
1279 F3851B302340A513009EE0B6 /* RegistationViewModel.swift in Sources */,
959 F3851B302340A513009EE0B6 /* RegistationViewModel.swift in Sources */,
1280− 12B3A7AF23AC1872009E2FA6 /* AdminNoReservationsView.swift in Sources */,
1281 12838EAE2367701300CEF108 /* AuthorizationService.swift in Sources */,
960 12838EAE2367701300CEF108 /* AuthorizationService.swift in Sources */,
1282 12C72EDF23537D1B00AD7004 /* ProfileCoordinator.swift in Sources */,
961 12C72EDF23537D1B00AD7004 /* ProfileCoordinator.swift in Sources */,
1283− 12E3507D239FD1F3004BB188 /* ClientReservationsResolver.swift in Sources */,
1284 12EA994E2362FCE8005D9FE9 /* AddressView.swift in Sources */,
962 12EA994E2362FCE8005D9FE9 /* AddressView.swift in Sources */,
1285− 1220A6F423CDB1AD00365E36 /* GetClientByPhoneNumberResolver.swift in Sources */,
1286 F3895F4C233D347E00FA6A37 /* PhoneNumberViewController.swift in Sources */,
963 F3895F4C233D347E00FA6A37 /* PhoneNumberViewController.swift in Sources */,
1287 12EE4A76234BB8FE005B4D1A /* CodeView.swift in Sources */,
964 12EE4A76234BB8FE005B4D1A /* CodeView.swift in Sources */,
1288 12230AF123900974004A01E5 /* TotalStorage.swift in Sources */,
965 12230AF123900974004A01E5 /* TotalStorage.swift in Sources */,
1289− 1252D9E523CDCDB300446B6F /* ACreateReservationResolver.swift in Sources */,
1290 12BD95B2237EC22B009614D8 /* FirstStepView.swift in Sources */,
966 12BD95B2237EC22B009614D8 /* FirstStepView.swift in Sources */,
1291 F3EBE2472340FE87000FEE1A /* NameTextView.swift in Sources */,
967 F3EBE2472340FE87000FEE1A /* NameTextView.swift in Sources */,
1292 120BFC7723891925001EBE89 /* ThirdStepReservationViewController.swift in Sources */,
968 120BFC7723891925001EBE89 /* ThirdStepReservationViewController.swift in Sources */,
1293 F3DC5A01233E896300B5E751 /* ButtonStyle.swift in Sources */,
969 F3DC5A01233E896300B5E751 /* ButtonStyle.swift in Sources */,
1294 12A075FF237358F200D749BB /* MapView.swift in Sources */,
970 12A075FF237358F200D749BB /* MapView.swift in Sources */,
1295 1205056B2380588C00801618 /* Extenstions+IBDesignable.swift in Sources */,
971 1205056B2380588C00801618 /* Extenstions+IBDesignable.swift in Sources */,
1296− 12E35074239FAF52004BB188 /* ClientsService.swift in Sources */,
1297 12C72EE1235380D400AD7004 /* ProfileClientViewController.swift in Sources */,
972 12C72EE1235380D400AD7004 /* ProfileClientViewController.swift in Sources */,
1298 F31E20C92348E0F300BEA215 /* AuthorizationViewController.swift in Sources */,
973 F31E20C92348E0F300BEA215 /* AuthorizationViewController.swift in Sources */,
1299 1212048E23915A0A00CAF162 /* ChangeReservationResolver.swift in Sources */,
974 1212048E23915A0A00CAF162 /* ChangeReservationResolver.swift in Sources */,
1300 12230AFC239034D3004A01E5 /* SecondStepReservationViewController.swift in Sources */,
975 12230AFC239034D3004A01E5 /* SecondStepReservationViewController.swift in Sources */,
1301 F3851B2923409F8A009EE0B6 /* PhoneView.swift in Sources */,
976 F3851B2923409F8A009EE0B6 /* PhoneView.swift in Sources */,
1302− 12D928B123C486380051724D /* BaseTableViewController.swift in Sources */,
1303 12C72EE3235380EB00AD7004 /* ReservationsViewController.swift in Sources */,
977 12C72EE3235380EB00AD7004 /* ReservationsViewController.swift in Sources */,
1304 12B6A611235B8EC500898B31 /* User.swift in Sources */,
978 12B6A611235B8EC500898B31 /* User.swift in Sources */,
1305− 12B3A7AD23ABEABF009E2FA6 /* AReservationsResolver.swift in Sources */,
1306 12B4447C238EF25C000B6B16 /* CreateReservationResolver.swift in Sources */,
979 12B4447C238EF25C000B6B16 /* CreateReservationResolver.swift in Sources */,
1307 12B6A60F235B857A00898B31 /* ProfileChangeCoordinator.swift in Sources */,
980 12B6A60F235B857A00898B31 /* ProfileChangeCoordinator.swift in Sources */,
1308− 12B3A79C23ABB8ED009E2FA6 /* IntervalPickerView.swift in Sources */,
1309 12FC40382382C93D00AB593B /* TableButtonStyle.swift in Sources */,
981 12FC40382382C93D00AB593B /* TableButtonStyle.swift in Sources */,
1310 12D8FA31237F08C700305F57 /* AllReservations.swift in Sources */,
982 12D8FA31237F08C700305F57 /* AllReservations.swift in Sources */,
1311 12838EB0236777D400CEF108 /* ServerError.swift in Sources */,
983 12838EB0236777D400CEF108 /* ServerError.swift in Sources */,
@@ -1466,15 +1138,14 @@
1466 buildSettings = {
1138 buildSettings = {
1467 ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
1139 ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
1468 CODE_SIGN_STYLE = Automatic;
1140 CODE_SIGN_STYLE = Automatic;
1469− CURRENT_PROJECT_VERSION = 5;
1470− DEVELOPMENT_TEAM = 23S94LRHD8;
1141+ DEVELOPMENT_TEAM = 9Z6LFGKA9G;
1471 INFOPLIST_FILE = "Hookah Tau/Info.plist";
1142 INFOPLIST_FILE = "Hookah Tau/Info.plist";
1472 IPHONEOS_DEPLOYMENT_TARGET = 11.0;
1143 IPHONEOS_DEPLOYMENT_TARGET = 11.0;
1473 LD_RUNPATH_SEARCH_PATHS = (
1144 LD_RUNPATH_SEARCH_PATHS = (
1474 "$(inherited)",
1145 "$(inherited)",
1475 "@executable_path/Frameworks",
1146 "@executable_path/Frameworks",
1476 );
1147 );
1477− PRODUCT_BUNDLE_IDENTIFIER = "com.hookahtau.Hookah-Tau1";
1148+ PRODUCT_BUNDLE_IDENTIFIER = "com.hookahtau.Hookah-Tau";
1478 PRODUCT_NAME = "$(TARGET_NAME)";
1149 PRODUCT_NAME = "$(TARGET_NAME)";
1479 SWIFT_VERSION = 5.0;
1150 SWIFT_VERSION = 5.0;
1480 TARGETED_DEVICE_FAMILY = "1,2";
1151 TARGETED_DEVICE_FAMILY = "1,2";
@@ -1486,15 +1157,14 @@
1486 buildSettings = {
1157 buildSettings = {
1487 ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
1158 ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
1488 CODE_SIGN_STYLE = Automatic;
1159 CODE_SIGN_STYLE = Automatic;
1489− CURRENT_PROJECT_VERSION = 5;
1490− DEVELOPMENT_TEAM = 23S94LRHD8;
1160+ DEVELOPMENT_TEAM = 9Z6LFGKA9G;
1491 INFOPLIST_FILE = "Hookah Tau/Info.plist";
1161 INFOPLIST_FILE = "Hookah Tau/Info.plist";
1492 IPHONEOS_DEPLOYMENT_TARGET = 11.0;
1162 IPHONEOS_DEPLOYMENT_TARGET = 11.0;
1493 LD_RUNPATH_SEARCH_PATHS = (
1163 LD_RUNPATH_SEARCH_PATHS = (
1494 "$(inherited)",
1164 "$(inherited)",
1495 "@executable_path/Frameworks",
1165 "@executable_path/Frameworks",
1496 );
1166 );
1497− PRODUCT_BUNDLE_IDENTIFIER = "com.hookahtau.Hookah-Tau1";
1167+ PRODUCT_BUNDLE_IDENTIFIER = "com.hookahtau.Hookah-Tau";
1498 PRODUCT_NAME = "$(TARGET_NAME)";
1168 PRODUCT_NAME = "$(TARGET_NAME)";
1499 SWIFT_VERSION = 5.0;
1169 SWIFT_VERSION = 5.0;
1500 TARGETED_DEVICE_FAMILY = "1,2";
1170 TARGETED_DEVICE_FAMILY = "1,2";
Hookah Tau/API/APIClient.swift−2
@@ -48,8 +48,6 @@ class APIClient {
48 let json = String(data: data, encoding: String.Encoding.utf8)
48 let json = String(data: data, encoding: String.Encoding.utf8)
49 print("Failure Response: \(String(describing: json))")
49 print("Failure Response: \(String(describing: json))")
50 }
50 }
51− case 404:
52− return GeneralError.notFound
53 case 422:
51 case 422:
54 if let data = response.data, let error = SE.fromJSONToSelf(data: data) {
52 if let data = response.data, let error = SE.fromJSONToSelf(data: data) {
55 print(error)
53 print(error)
Hookah Tau/API/Authorization api/AuthorizationService.swift−5
@@ -39,7 +39,6 @@ class AuthorizationService {
39 }
39 }
40
40
41 completion(.success(decodedData.isUserRegistered))
41 completion(.success(decodedData.isUserRegistered))
42− return
43 }
42 }
44 }
43 }
45 }
44 }
@@ -66,7 +65,6 @@ class AuthorizationService {
66
65
67 self.setCookies(response: response)
66 self.setCookies(response: response)
68 completion(.success(decodedData))
67 completion(.success(decodedData))
69− return
70 }
68 }
71 }
69 }
72 }
70 }
@@ -82,9 +80,7 @@ class AuthorizationService {
82 apiClient.load(request: request.request) { result in
80 apiClient.load(request: request.request) { result in
83 switch result {
81 switch result {
84 case .failure(let err):
82 case .failure(let err):
85− print(err)
86 completion(.failure(err))
83 completion(.failure(err))
87− return
88 case .success(let response):
84 case .success(let response):
89 guard
85 guard
90 let unwrappedData = response.data,
86 let unwrappedData = response.data,
@@ -96,7 +92,6 @@ class AuthorizationService {
96
92
97 self.setCookies(response: response)
93 self.setCookies(response: response)
98 completion(.success(decodedData))
94 completion(.success(decodedData))
99− return
100 }
95 }
101 }
96 }
102 }
97 }
Hookah Tau/API/ClientsService/ClientsService.swiftdeleted−129
@@ -1,129 +0,0 @@
1−//
2−// ClientsService.swift
3−// Hookah Tau
4−//
5−// Created by cstore on 10/12/2019.
6−// Copyright © 2019 Daria Rednikina. All rights reserved.
7−//
8−
9−import Foundation
10−
11−class ClientsService {
12− private var apiClient: APIClient
13−
14− init(apiClient: APIClient) {
15− self.apiClient = apiClient
16− }
17−
18− func loadClientsList(completion: @escaping ((Result<[Client], GeneralError>) -> Void)) {
19− let resolver = ClientsListResolver<ClientsResponce>()
20− let request = ApiRequest(resolver: resolver, httpMethod: .get)
21−
22− apiClient.load(request: request.request) { (res) in
23− switch res {
24− case .success(let responce):
25− guard
26− let d = responce.data,
27− let decodedData = resolver.targetClass().fromJSONToSelf(data: d)
28− else {
29− completion(.failure(GeneralError.decodeError))
30− return }
31−
32− completion(.success(decodedData.clients))
33− return
34− case .failure(let err):
35− completion(.failure(err))
36− return
37− }
38− }
39− }
40−
41− func loadReservationsForUser(withUUID uuid: String,
42− completion: @escaping ((Result<[Reservation], GeneralError>) -> Void)) {
43− let resolver = ClientReservationsResolver<UserReservationsResponce>(userId: uuid)
44− let request = ApiRequest(resolver: resolver, httpMethod: .get)
45−
46− apiClient.load(request: request.request) { (res) in
47− switch res {
48− case .failure(let err):
49− completion(.failure(err))
50− return
51− case .success(let responce):
52− guard
53− let d = responce.data,
54− let decData = resolver.targetClass().fromJSONToSelf(data: d)
55− else {
56− completion(.failure(GeneralError.decodeError))
57− return
58− }
59−
60− completion(.success(decData.reservations))
61− return
62− }
63− }
64−
65− }
66−
67− /// Метод для удаления или добавления пользователя в чс
68− func changeBlockList(whatToDo: CrudMethod, phone: String, completion: @escaping ((Bool) -> Void)) {
69− let resolver = BlocklistPutResolver(blockList: [phone])
70− let request = ApiRequest(resolver: resolver, httpMethod: whatToDo)
71−
72− apiClient.load(request: request.request) { (res) in
73− switch res {
74− case .failure:
75− completion(false)
76− return
77− case .success:
78− completion(true)
79− return
80− }
81− }
82− }
83−
84− /// Метод для изменения статуса админки
85− func changeAdmin(crud: CrudMethod, data: String, completion: @escaping ((Bool) -> Void)) {
86− var resolver: ApiResolver!
87− if crud == .put {
88− resolver = AddOtherAdminResolver(phone: data)
89− } else {
90− resolver = DeleteOtherAdminResolver(uuid: data)
91− }
92−
93− let request = ApiRequest(resolver: resolver, httpMethod: crud)
94−
95− apiClient.load(request: request.request) { result in
96− switch result {
97− case .failure:
98− completion(false)
99− return
100− case .success:
101− completion(true)
102− return
103− }
104− }
105− }
106−
107− func getClientByPhoneNumber(userPhone: String, completion: @escaping ((Result<FullUser, GeneralError>) -> Void)) {
108− let resolver = GetClientByPhoneNumberResolver<ClientInResponce>(userPhone: userPhone)
109− let request = ApiRequest(resolver: resolver, httpMethod: .get)
110−
111− apiClient.load(request: request.request) { (result) in
112− switch result {
113− case .failure(let err):
114− completion(.failure(err))
115− return
116− case .success(let responce):
117− guard
118− let d = responce.data,
119− let decData = resolver.targetClass().fromJSONToSelf(data: d)
120− else {
121− completion(.failure(GeneralError.decodeError))
122− return
123− }
124−
125− completion(.success(decData.client))
126− }
127− }
128− }
129−}
Hookah Tau/API/ClientsService/Resolvers/AddOtherAdminResolver.swiftdeleted−35
@@ -1,35 +0,0 @@
1−//
2−// AddOtherAdminResolver.swift
3−// Hookah Tau
4−//
5−// Created by cstore on 20/12/2019.
6−// Copyright © 2019 Daria Rednikina. All rights reserved.
7−//
8−
9−import Foundation
10−
11−/// `PUT /admin/other`
12−class AddOtherAdminResolver: ApiResolver {
13− /// Request struct
14− struct Request: MyCodable {
15− var newAdmin: String
16− }
17−
18− var name: String {
19− return "/other"
20− }
21−
22− var groupName: String? {
23− return "/admin"
24− }
25−
26− var phone: String
27−
28− init(phone: String) {
29− self.phone = phone
30− }
31−
32− func parameters() -> MyCodable? {
33− return Request(newAdmin: phone)
34− }
35−}
Hookah Tau/API/ClientsService/Resolvers/BlocklistPutResolver.swiftdeleted−33
@@ -1,33 +0,0 @@
1−//
2−// BlocklistPutResolver.swift
3−// Hookah Tau
4−//
5−// Created by cstore on 09/01/2020.
6−// Copyright © 2020 Daria Rednikina. All rights reserved.
7−//
8−
9−import Foundation
10−
11−struct RequestBlocklist: MyCodable {
12− var blockList: [String]
13−}
14−
15−class BlocklistPutResolver: ApiResolver {
16− var name: String {
17− return "/blocklist"
18− }
19−
20− var groupName: String? {
21− return "/admin"
22− }
23−
24− var blockList: [String]
25−
26− init(blockList: [String]) {
27− self.blockList = blockList
28− }
29−
30− func parameters() -> MyCodable? {
31− return RequestBlocklist(blockList: blockList)
32− }
33−}
Hookah Tau/API/ClientsService/Resolvers/ClientReservationsResolver.swiftdeleted−34
@@ -1,34 +0,0 @@
1−//
2−// ClientReservations.swift
3−// Hookah Tau
4−//
5−// Created by cstore on 10/12/2019.
6−// Copyright © 2019 Daria Rednikina. All rights reserved.
7−//
8−
9−import Foundation
10−
11−struct UserReservationsResponce: MyCodable {
12− var reservations: [Reservation]
13−}
14−
15−class ClientReservationsResolver<Responce: MyCodable>: ApiResolver {
16−
17− var name: String {
18− return "/clients/\(userId)/reservations"
19− }
20−
21− var groupName: String? {
22− return "/admin"
23− }
24−
25− var userId: String
26−
27− init(userId: String) {
28− self.userId = userId
29− }
30−
31− func targetClass() -> Responce.Type {
32− return Responce.self
33− }
34−}
Hookah Tau/API/ClientsService/Resolvers/ClientsListResolver.swiftdeleted−28
@@ -1,28 +0,0 @@
1−//
2−// ClientsListResolver.swift
3−// Hookah Tau
4−//
5−// Created by cstore on 10/12/2019.
6−// Copyright © 2019 Daria Rednikina. All rights reserved.
7−//
8−
9−import Foundation
10−
11−struct ClientsResponce: MyCodable {
12− var clients: [Client]
13−}
14−
15−class ClientsListResolver<Responce: MyCodable>: ApiResolver {
16−
17− var name: String {
18− return "/clients"
19− }
20−
21− var groupName: String? {
22− return "/admin"
23− }
24−
25− func targetClass() -> Responce.Type {
26− return Responce.self
27− }
28−}
Hookah Tau/API/ClientsService/Resolvers/DeleteOtherAdminResolver.swiftdeleted−35
@@ -1,35 +0,0 @@
1−//
2−// DeleteOtherAdminResolver.swift
3−// Hookah Tau
4−//
5−// Created by cstore on 10/01/2020.
6−// Copyright © 2020 Daria Rednikina. All rights reserved.
7−//
8−
9−import Foundation
10−
11−
12−class DeleteOtherAdminResolver: ApiResolver {
13−
14− var name: String {
15− return "/other"
16− }
17−
18− var groupName: String? {
19− return "/admin"
20− }
21−
22− struct Request: MyCodable {
23− let badAdmin: String
24− }
25−
26− let uuid: String
27−
28− init(uuid: String) {
29− self.uuid = uuid
30− }
31−
32− func parameters() -> MyCodable? {
33− return Request(badAdmin: self.uuid)
34− }
35−}
Hookah Tau/API/ClientsService/Resolvers/GetClientByPhoneNumberResolver.swiftdeleted−35
@@ -1,35 +0,0 @@
1−//
2−// GetClientByPhoneNumberResolver.swift
3−// Hookah Tau
4−//
5−// Created by cstore on 14/01/2020.
6−// Copyright © 2020 Daria Rednikina. All rights reserved.
7−//
8−
9−import Foundation
10−
11−struct ClientInResponce: MyCodable {
12− var client: FullUser
13−}
14−
15−/// `GET /admin/clients/by-phone/{user id}`
16−class GetClientByPhoneNumberResolver<Responce: MyCodable>: ApiResolver {
17−
18− var name: String {
19− return "/clients/by-phone/\(userPhone)"
20− }
21−
22− var groupName: String? {
23− return "/admin"
24− }
25−
26− var userPhone: String
27−
28− init(userPhone: String) {
29− self.userPhone = userPhone
30− }
31−
32− func targetClass() -> Responce.Type {
33− return Responce.self
34− }
35−}
Hookah Tau/API/Reservations api/ReservationsService.swift+3−86
@@ -40,14 +40,8 @@ class ReservationsService {
40 }
40 }
41 }
41 }
42
42
43− func deleteReservation(isAdmin: Bool, uuid: String, completion: @escaping ((Bool) -> Void)) {
43+ func deleteReservation(uuid: String, completion: @escaping ((Bool) -> Void)) {
44− var resolver: ApiResolver!
45− if isAdmin {
46− resolver = ADeleteReservationResolver(uuid: uuid)
47− } else {
48− resolver = DeleteReservationResolver(uuid: uuid)
44+ let resolver = DeleteReservationResolver(uuid: uuid)
49− }
50−
51 let request = ApiRequest(resolver: resolver, httpMethod: .delete)
45 let request = ApiRequest(resolver: resolver, httpMethod: .delete)
52
46
53 apiClient.load(request: request.request) { result in
47 apiClient.load(request: request.request) { result in
@@ -66,20 +60,14 @@ class ReservationsService {
66 numberOfGuests: Int,
60 numberOfGuests: Int,
67 endTime: Date,
61 endTime: Date,
68 uuid: String,
62 uuid: String,
69− isAdmin: Bool,
70 completion: @escaping ((Bool) -> Void)) {
63 completion: @escaping ((Bool) -> Void)) {
71
64
72 let reservation = ChangeReservationResolver.Request(startTime: startTime,
65 let reservation = ChangeReservationResolver.Request(startTime: startTime,
73 uuid: uuid,
66 uuid: uuid,
74 numberOfGuests: numberOfGuests,
67 numberOfGuests: numberOfGuests,
75 endTime: endTime)
68 endTime: endTime)
76− var resolver: ApiResolver!
77− if isAdmin {
78− resolver = AChangeReservationResolver(data: reservation)
79− } else {
80− resolver = ChangeReservationResolver(data: reservation)
81− }
82
69
70+ let resolver = ChangeReservationResolver(data: reservation)
83 let request = ApiRequest(resolver: resolver, httpMethod: .put)
71 let request = ApiRequest(resolver: resolver, httpMethod: .put)
84
72
85 apiClient.load(request: request.request) { result in
73 apiClient.load(request: request.request) { result in
@@ -157,75 +145,4 @@ class ReservationsService {
157 }
145 }
158 }
146 }
159 }
147 }
160−
161− func getAdminReservations(establishmentId: Int, completion: @escaping ((Result<[ReservationWithUser], GeneralError>)-> Void)) {
162− let resolver = AReservationsResolver<AReservationResponse>(establishmentId: establishmentId)
163− let request = ApiRequest(resolver: resolver, httpMethod: .get)
164−
165− apiClient.load(request: request.request) { (res) in
166− switch res {
167− case .failure(let err):
168− completion(.failure(err))
169− return
170− case .success(let response):
171− guard
172− let d = response.data,
173− let decodedData = resolver.targetClass().fromJSONToSelf(data: d)
174− else {
175− completion(.failure(GeneralError.decodeError))
176− return
177− }
178−
179− completion(.success(decodedData.reservations))
180− return
181− }
182− }
183− }
184−
185− func getReservationsAround(uuid: String, completion: @escaping((Result<[ReservationPeriod], GeneralError>) -> Void)) {
186− let resolver = ReservationsAroundResolver<ReservationsAroundResponse>(reservationId: uuid)
187− let request = ApiRequest(resolver: resolver, httpMethod: .get)
188−
189− apiClient.load(request: request.request) { (res) in
190− switch res {
191− case .failure(let err):
192− completion(.failure(err))
193− return
194− case .success(let response):
195− guard
196− let d = response.data,
197− let decodedData = resolver.targetClass().fromJSONToSelf(data: d)
198− else {
199− completion(.failure(GeneralError.decodeError))
200− return
201− }
202−
203− completion(.success(decodedData.reservations))
204− return
205− }
206− }
207− }
208−
209− func createReservation(reservation: AdminCreateReservation, completion: @escaping ((Result<String, GeneralError>) -> Void)) {
210− let resolver = ACreateReservationResolver<ACreateAdminResonce>(data: reservation)
211− let request = ApiRequest(resolver: resolver, httpMethod: .post)
212−
213− apiClient.load(request: request.request) { (res) in
214− switch res {
215− case .failure(let err):
216− completion(.failure(err))
217− return
218− case .success(let responce):
219− guard
220− let d = responce.data,
221− let decData = resolver.targetClass().fromJSONToSelf(data: d)
222− else {
223− completion(.failure(GeneralError.decodeError))
224− return
225− }
226−
227− completion(.success(decData.reservationUUID))
228− }
229− }
230− }
231}
148}
Hookah Tau/API/Reservations api/Resolvers/Admin/AChangeReservationResolver.swiftdeleted−34
@@ -1,34 +0,0 @@
1−//
2−// AChangeReservationResolver.swift
3−// Hookah Tau
4−//
5−// Created by cstore on 20/12/2019.
6−// Copyright © 2019 Daria Rednikina. All rights reserved.
7−//
8−
9−import Foundation
10−
11−
12−/// `PUT /admin/reservations`
13−
14−class AChangeReservationResolver: ApiResolver {
15−
16− var name: String {
17− return "/reservations"
18− }
19−
20− var groupName: String? {
21− return "/admin"
22− }
23−
24− var data: ChangeReservationResolver.Request
25−
26− init(data: ChangeReservationResolver.Request) {
27− self.data = data
28− }
29−
30− func parameters() -> MyCodable? {
31− return data
32− }
33−}
34−
Hookah Tau/API/Reservations api/Resolvers/Admin/ACreateReservationResolver.swiftdeleted−37
@@ -1,37 +0,0 @@
1−//
2−// ACreateReservationResolver.swift
3−// Hookah Tau
4−//
5−// Created by cstore on 14/01/2020.
6−// Copyright © 2020 Daria Rednikina. All rights reserved.
7−//
8−
9−import Foundation
10−
11−struct ACreateAdminResonce: MyCodable {
12− var reservationUUID: String
13−}
14−
15−class ACreateReservationResolver<Responce: MyCodable>: ApiResolver {
16− var name: String {
17− return "/reservations"
18− }
19−
20− var groupName: String? {
21− return "/admin"
22− }
23−
24− var data: AdminCreateReservation
25−
26− init(data: AdminCreateReservation) {
27− self.data = data
28− }
29−
30− func parameters() -> MyCodable? {
31− return data
32− }
33−
34− func targetClass() -> Responce.Type {
35− return Responce.self
36− }
37−}
Hookah Tau/API/Reservations api/Resolvers/Admin/ADeleteReservationResolver.swiftdeleted−34
@@ -1,34 +0,0 @@
1−//
2−// ADeleteReservationResolver.swift
3−// Hookah Tau
4−//
5−// Created by cstore on 07/01/2020.
6−// Copyright © 2020 Daria Rednikina. All rights reserved.
7−//
8−
9−import Foundation
10−
11−class ADeleteReservationResolver: ApiResolver {
12−
13− struct Request: MyCodable {
14− var reservation: String
15− }
16−
17− var name: String {
18− return "/reservations"
19− }
20−
21− var groupName: String? {
22− return "/admin"
23− }
24−
25− var uuid: String
26−
27− init(uuid: String) {
28− self.uuid = uuid
29− }
30−
31− func parameters() -> MyCodable? {
32− return Request(reservation: uuid)
33− }
34−}
Hookah Tau/API/Reservations api/Resolvers/Admin/AReservationsResolver.swiftdeleted−35
@@ -1,35 +0,0 @@
1−//
2−// AReservationsResolver.swift
3−// Hookah Tau
4−//
5−// Created by cstore on 19/12/2019.
6−// Copyright © 2019 Daria Rednikina. All rights reserved.
7−//
8−
9−import Foundation
10−
11−struct AReservationResponse: MyCodable {
12− var reservations: [ReservationWithUser]
13−}
14−
15−/// `/admin/reservations/{establishment id}`
16−class AReservationsResolver<Response: MyCodable>: ApiResolver {
17−
18− var name: String {
19− return "/reservations/\(establishmentId)"
20− }
21−
22− var groupName: String? {
23− return "/admin"
24− }
25−
26− var establishmentId: Int
27−
28− init(establishmentId: Int) {
29− self.establishmentId = establishmentId
30− }
31−
32− func targetClass() -> Response.Type {
33− return Response.self
34− }
35−}
Hookah Tau/API/Reservations api/Resolvers/ReservationsAroundResolver.swiftdeleted−35
@@ -1,35 +0,0 @@
1−//
2−// ReservationsAroundResolver.swift
3−// Hookah Tau
4−//
5−// Created by cstore on 20/12/2019.
6−// Copyright © 2019 Daria Rednikina. All rights reserved.
7−//
8−
9−import Foundation
10−
11−struct ReservationsAroundResponse: MyCodable {
12− var reservations: [ReservationPeriod]
13−}
14−
15−/// ` GET /reservations/around/{reservation id}`
16−class ReservationsAroundResolver<Response: MyCodable>: ApiResolver {
17−
18− var groupName: String? {
19− return "/reservations"
20− }
21−
22− var name: String {
23− return "/around/\(reservationId)"
24− }
25−
26− var reservationId: String
27−
28− init(reservationId: String) {
29− self.reservationId = reservationId
30− }
31−
32− func targetClass() -> Response.Type {
33− return Response.self
34− }
35−}
Hookah Tau/API/ServerError.swift−1
@@ -16,7 +16,6 @@ enum GeneralError: Error {
16 case serverError(SE)
16 case serverError(SE)
17 case decodeError
17 case decodeError
18 case noData
18 case noData
19− case notFound
20 case Error400
19 case Error400
21 case somethingWentCompletelyWrong
20 case somethingWentCompletelyWrong
22 case alamofireError
21 case alamofireError
Hookah Tau/Components/PhoneTextField.swiftdeleted−63
@@ -1,63 +0,0 @@
1−//
2−// PhoneTextField.swift
3−// Hookah Tau
4−//
5−// Created by cstore on 13/01/2020.
6−// Copyright © 2020 Daria Rednikina. All rights reserved.
7−//
8−
9−import UIKit
10−
11−class PhoneTextField: UITextField, UITextFieldDelegate {
12−
13− override func awakeFromNib() {
14− super.awakeFromNib()
15−
16− self.delegate = self
17− self.keyboardType = .numberPad
18− }
19−
20− func bind(withModel model: String) {
21− self.text = model.formattedNumber()
22− }
23−
24− func textField(_ textField: UITextField, shouldChangeCharactersIn range: NSRange, replacementString string: String) -> Bool {
25− let newString = (textField.text! as NSString).replacingCharacters(in: range, with: string)
26− textField.text = formattedNumber(newString)
27− return false
28− }
29−
30− private func formattedNumber(_ number: String) -> String {
31− let cleanPhoneNumber = number.components(separatedBy: CharacterSet.decimalDigits.inverted).joined()
32−
33− var result = ""
34− let phoneMask = "+X (XXX) XXX XX XX"
35− var index = cleanPhoneNumber.startIndex
36− for ch in phoneMask where index < cleanPhoneNumber.endIndex {
37− if ch == "X" {
38− result.append(cleanPhoneNumber[index])
39− index = cleanPhoneNumber.index(after: index)
40− } else {
41− result.append(ch)
42− }
43− }
44− return result
45− }
46−
47− /// +o (oxx) xxx xx xx
48− ///
49− /// need tor return only `x`, length is 9. And it has to have prefix +7 (9...) or +8 (9..)
50− func getFormattedNumber() -> String? {
51− guard let number = self.text else { return nil }
52−
53− let cleanPhoneNumber = String(number.components(separatedBy: CharacterSet.decimalDigits.inverted).joined())
54− let hasPrefix = cleanPhoneNumber.hasPrefix("79") || cleanPhoneNumber.hasPrefix("89")
55−
56− let result = String(cleanPhoneNumber.dropFirst(2))
57− if result.count == 9 && hasPrefix {
58− return result
59− }
60−
61− return nil
62− }
63−}
Hookah Tau/Controllers/Admin/Clients/Cells/ClientTableViewCell.swiftdeleted−53
@@ -1,53 +0,0 @@
1−//
2−// ClientTableViewCell.swift
3−// Hookah Tau
4−//
5−// Created by cstore on 09/12/2019.
6−// Copyright © 2019 Daria Rednikina. All rights reserved.
7−//
8−
9−import UIKit
10−
11−let clientTableViewCellId = "ClientTableViewCell"
12−
13−class ClientTableViewCell: UITableViewCell {
14−
15− // MARK: - IBAOutlets
16−
17− @IBOutlet weak var nameLabel: UILabel!
18−
19− @IBOutlet weak var phoneNumberLabel: UILabel!
20−
21− @IBOutlet weak var numberOfReservationsLabel: UILabel!
22−
23−
24− @IBOutlet weak var blockListLabel: UILabel!
25−
26− @IBOutlet weak var isAdminLabel: UILabel!
27−
28−
29−
30− // MARK: - Lifecycle
31−
32− override func awakeFromNib() {
33− super.awakeFromNib()
34− // Initialization code
35− }
36−
37− override func setSelected(_ selected: Bool, animated: Bool) {
38− super.setSelected(selected, animated: animated)
39−
40− // Configure the view for the selected state
41− }
42−
43− // MARK: - Bind
44−
45− func bind(withModel model: Client) {
46− blockListLabel.isHidden = !model.isBlocked
47− isAdminLabel.isHidden = !model.isAdmin
48− nameLabel.text = model.name ?? "❔"
49− phoneNumberLabel.text = model.phoneNumber.formattedNumber()
50− numberOfReservationsLabel.text = model.reservationCount > 99 ? "99+" : "\(model.reservationCount)"
51− }
52−
53−}
Hookah Tau/Controllers/Admin/Clients/ClientList.storyboarddeleted−196
@@ -1,196 +0,0 @@
1−<?xml version="1.0" encoding="UTF-8"?>
2−<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="15702" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
3− <device id="retina4_7" orientation="portrait" appearance="light"/>
4− <dependencies>
5− <deployment identifier="iOS"/>
6− <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="15704"/>
7− <capability name="Safe area layout guides" minToolsVersion="9.0"/>
8− <capability name="Stack View standard spacing" minToolsVersion="9.0"/>
9− <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
10− </dependencies>
11− <scenes>
12− <!--Clients View Controller-->
13− <scene sceneID="U7X-Jx-osU">
14− <objects>
15− <tableViewController storyboardIdentifier="ClientsViewController" id="Wfj-Ux-iLR" customClass="ClientsViewController" customModule="Hookah_Tau" customModuleProvider="target" sceneMemberID="viewController">
16− <tableView key="view" clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" dataMode="prototypes" style="plain" separatorStyle="default" rowHeight="-1" estimatedRowHeight="-1" sectionHeaderHeight="28" sectionFooterHeight="28" id="qFn-ia-vVI">
17− <rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
18− <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
19− <color key="backgroundColor" systemColor="systemBackgroundColor" cocoaTouchSystemColor="whiteColor"/>
20− <prototypes>
21− <tableViewCell clipsSubviews="YES" contentMode="scaleToFill" preservesSuperviewLayoutMargins="YES" selectionStyle="default" indentationWidth="10" reuseIdentifier="ClientTableViewCell" rowHeight="69" id="QPb-0v-yOO" customClass="ClientTableViewCell" customModule="Hookah_Tau" customModuleProvider="target">
22− <rect key="frame" x="0.0" y="28" width="375" height="69"/>
23− <autoresizingMask key="autoresizingMask"/>
24− <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" preservesSuperviewLayoutMargins="YES" insetsLayoutMarginsFromSafeArea="NO" tableViewCell="QPb-0v-yOO" id="48D-Q7-dBg">
25− <rect key="frame" x="0.0" y="0.0" width="375" height="69"/>
26− <autoresizingMask key="autoresizingMask"/>
27− <subviews>
28− <stackView opaque="NO" contentMode="scaleToFill" distribution="equalSpacing" spacingType="standard" translatesAutoresizingMaskIntoConstraints="NO" id="fhd-NM-rld">
29− <rect key="frame" x="16" y="8" width="343" height="53"/>
30− <subviews>
31− <stackView opaque="NO" contentMode="scaleToFill" axis="vertical" distribution="equalSpacing" alignment="top" translatesAutoresizingMaskIntoConstraints="NO" id="vNV-bN-3No">
32− <rect key="frame" x="0.0" y="0.0" width="179" height="53"/>
33− <subviews>
34− <stackView opaque="NO" contentMode="scaleToFill" distribution="equalSpacing" alignment="center" spacingType="standard" translatesAutoresizingMaskIntoConstraints="NO" id="uoO-w2-5yG">
35− <rect key="frame" x="0.0" y="0.0" width="78.5" height="26.5"/>
36− <subviews>
37− <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Стасик" textAlignment="natural" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="4Cp-jh-0Gq">
38− <rect key="frame" x="0.0" y="0.0" width="78.5" height="26.5"/>
39− <fontDescription key="fontDescription" type="boldSystem" pointSize="22"/>
40− <color key="textColor" white="0.0" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
41− <nil key="highlightedColor"/>
42− </label>
43− </subviews>
44− </stackView>
45− <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="+7 (901) 733-01-79" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="0gY-h5-AV2">
46− <rect key="frame" x="0.0" y="29" width="179" height="24"/>
47− <fontDescription key="fontDescription" type="system" pointSize="20"/>
48− <nil key="textColor"/>
49− <nil key="highlightedColor"/>
50− </label>
51− </subviews>
52− </stackView>
53− <stackView opaque="NO" contentMode="scaleToFill" alignment="center" spacingType="standard" translatesAutoresizingMaskIntoConstraints="NO" id="tJg-ju-bFY">
54− <rect key="frame" x="219.5" y="0.0" width="123.5" height="53"/>
55− <subviews>
56− <stackView opaque="NO" contentMode="scaleToFill" distribution="equalSpacing" spacingType="standard" translatesAutoresizingMaskIntoConstraints="NO" id="4et-BC-7iY">
57− <rect key="frame" x="0.0" y="14.5" width="103.5" height="24"/>
58− <subviews>
59− <stackView opaque="NO" contentMode="scaleToFill" spacing="5" translatesAutoresizingMaskIntoConstraints="NO" id="BHD-cD-L1c">
60− <rect key="frame" x="0.0" y="0.0" width="51" height="24"/>
61− <subviews>
62− <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="❌" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="MaQ-TW-666">
63− <rect key="frame" x="0.0" y="0.0" width="23" height="24"/>
64− <fontDescription key="fontDescription" type="system" pointSize="17"/>
65− <nil key="textColor"/>
66− <nil key="highlightedColor"/>
67− </label>
68− <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="👑" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="0Xa-FL-GVr">
69− <rect key="frame" x="28" y="0.0" width="23" height="24"/>
70− <fontDescription key="fontDescription" type="system" pointSize="17"/>
71− <nil key="textColor"/>
72− <nil key="highlightedColor"/>
73− </label>
74− </subviews>
75− </stackView>
76− <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="99+" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Gzo-kW-60Z">
77− <rect key="frame" x="66" y="0.0" width="37.5" height="24"/>
78− <fontDescription key="fontDescription" type="system" pointSize="20"/>
79− <nil key="textColor"/>
80− <nil key="highlightedColor"/>
81− </label>
82− </subviews>
83− </stackView>
84− <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="arrow" translatesAutoresizingMaskIntoConstraints="NO" id="DrQ-Ss-gIT">
85− <rect key="frame" x="111.5" y="16.5" width="12" height="20"/>
86− </imageView>
87− </subviews>
88− <constraints>
89− <constraint firstAttribute="width" constant="123.5" id="eeb-nt-pTB"/>
90− </constraints>
91− </stackView>
92− </subviews>
93− </stackView>
94− </subviews>
95− <constraints>
96− <constraint firstItem="fhd-NM-rld" firstAttribute="leading" secondItem="48D-Q7-dBg" secondAttribute="leading" constant="16" id="EDr-e5-ffF"/>
97− <constraint firstAttribute="trailing" secondItem="fhd-NM-rld" secondAttribute="trailing" constant="16" id="jMD-pP-Fcj"/>
98− <constraint firstAttribute="bottom" secondItem="fhd-NM-rld" secondAttribute="bottom" constant="8" id="lGU-2k-95p"/>
99− <constraint firstItem="fhd-NM-rld" firstAttribute="top" secondItem="48D-Q7-dBg" secondAttribute="top" constant="8" id="yPf-vR-dW7"/>
100− </constraints>
101− </tableViewCellContentView>
102− <connections>
103− <outlet property="blockListLabel" destination="MaQ-TW-666" id="Us0-tw-9tj"/>
104− <outlet property="isAdminLabel" destination="0Xa-FL-GVr" id="fzz-2t-Lda"/>
105− <outlet property="nameLabel" destination="4Cp-jh-0Gq" id="g6e-c0-x0u"/>
106− <outlet property="numberOfReservationsLabel" destination="Gzo-kW-60Z" id="9J2-S4-fKq"/>
107− <outlet property="phoneNumberLabel" destination="0gY-h5-AV2" id="rdb-GS-ceF"/>
108− </connections>
109− </tableViewCell>
110− </prototypes>
111− <connections>
112− <outlet property="dataSource" destination="Wfj-Ux-iLR" id="uby-48-VjA"/>
113− <outlet property="delegate" destination="Wfj-Ux-iLR" id="oeU-I8-pfI"/>
114− </connections>
115− </tableView>
116− </tableViewController>
117− <placeholder placeholderIdentifier="IBFirstResponder" id="epE-4n-L3K" userLabel="First Responder" customClass="UIResponder" sceneMemberID="firstResponder"/>
118− </objects>
119− <point key="canvasLocation" x="0.80000000000000004" y="-112.89355322338831"/>
120− </scene>
121− <!--Profile Table View Controller-->
122− <scene sceneID="APa-VZ-6hd">
123− <objects>
124− <viewController storyboardIdentifier="ProfileTableViewController" id="ZVH-jf-rtc" customClass="ProfileTableViewController" customModule="Hookah_Tau" customModuleProvider="target" sceneMemberID="viewController">
125− <view key="view" contentMode="scaleToFill" id="rcq-M9-CvR">
126− <rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
127− <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
128− <subviews>
129− <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="ciO-ia-Oob">
130− <rect key="frame" x="0.0" y="0.0" width="375" height="65"/>
131− <subviews>
132− <stackView opaque="NO" contentMode="scaleToFill" distribution="equalSpacing" alignment="center" spacingType="standard" translatesAutoresizingMaskIntoConstraints="NO" id="IBA-bj-CWK">
133− <rect key="frame" x="8" y="16" width="359" height="37"/>
134− <subviews>
135− <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="4WC-gi-jbD" customClass="Button" customModule="Hookah_Tau" customModuleProvider="target">
136− <rect key="frame" x="0.0" y="0.0" width="180" height="37"/>
137− <color key="backgroundColor" white="0.66666666669999997" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
138− <constraints>
139− <constraint firstAttribute="width" constant="180" id="bJA-V9-gw9"/>
140− <constraint firstAttribute="height" constant="37" id="pdo-AO-o8a"/>
141− </constraints>
142− <state key="normal" title="Button"/>
143− </button>
144− <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="gfq-ql-lka" customClass="Button" customModule="Hookah_Tau" customModuleProvider="target">
145− <rect key="frame" x="224" y="0.0" width="135" height="37"/>
146− <color key="backgroundColor" white="0.66666666669999997" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
147− <constraints>
148− <constraint firstAttribute="width" constant="135" id="Xn3-v6-SLp"/>
149− <constraint firstAttribute="height" constant="37" id="z68-vW-NjK"/>
150− </constraints>
151− <state key="normal" title="Button"/>
152− </button>
153− </subviews>
154− </stackView>
155− </subviews>
156− <color key="backgroundColor" systemColor="systemBackgroundColor" cocoaTouchSystemColor="whiteColor"/>
157− <constraints>
158− <constraint firstItem="IBA-bj-CWK" firstAttribute="leading" secondItem="ciO-ia-Oob" secondAttribute="leading" constant="8" id="WZS-Vq-tuP"/>
159− <constraint firstAttribute="trailing" secondItem="IBA-bj-CWK" secondAttribute="trailing" constant="8" id="Yk3-D1-1kg"/>
160− <constraint firstItem="IBA-bj-CWK" firstAttribute="top" secondItem="ciO-ia-Oob" secondAttribute="top" constant="16" id="fWO-oj-NuN"/>
161− <constraint firstItem="IBA-bj-CWK" firstAttribute="leading" secondItem="ciO-ia-Oob" secondAttribute="leading" constant="8" id="gP2-jh-5El"/>
162− <constraint firstAttribute="height" constant="65" id="pzZ-zw-kbc"/>
163− </constraints>
164− </view>
165− <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="T0s-lX-Z5m">
166− <rect key="frame" x="0.0" y="65" width="375" height="602"/>
167− <color key="backgroundColor" systemColor="systemBackgroundColor" cocoaTouchSystemColor="whiteColor"/>
168− </view>
169− </subviews>
170− <color key="backgroundColor" systemColor="systemBackgroundColor" cocoaTouchSystemColor="whiteColor"/>
171− <constraints>
172− <constraint firstItem="ciO-ia-Oob" firstAttribute="trailing" secondItem="tIS-3m-xwG" secondAttribute="trailing" id="3An-sM-OCN"/>
173− <constraint firstItem="ciO-ia-Oob" firstAttribute="top" secondItem="tIS-3m-xwG" secondAttribute="top" id="5zl-uZ-sTi"/>
174− <constraint firstItem="T0s-lX-Z5m" firstAttribute="leading" secondItem="tIS-3m-xwG" secondAttribute="leading" id="7qA-Hh-3Us"/>
175− <constraint firstItem="T0s-lX-Z5m" firstAttribute="trailing" secondItem="tIS-3m-xwG" secondAttribute="trailing" id="9VD-9Q-wGX"/>
176− <constraint firstItem="T0s-lX-Z5m" firstAttribute="top" secondItem="ciO-ia-Oob" secondAttribute="bottom" id="RSL-fo-wIb"/>
177− <constraint firstItem="ciO-ia-Oob" firstAttribute="leading" secondItem="tIS-3m-xwG" secondAttribute="leading" id="Tuq-su-gbn"/>
178− <constraint firstItem="T0s-lX-Z5m" firstAttribute="bottom" secondItem="tIS-3m-xwG" secondAttribute="bottom" id="iQj-LM-Im9"/>
179− </constraints>
180− <viewLayoutGuide key="safeArea" id="tIS-3m-xwG"/>
181− </view>
182− <connections>
183− <outlet property="contentView" destination="T0s-lX-Z5m" id="9Z0-5T-f7Z"/>
184− <outlet property="copyButton" destination="gfq-ql-lka" id="BNi-Ip-AyF"/>
185− <outlet property="phoneButton" destination="4WC-gi-jbD" id="xlf-g7-CzU"/>
186− </connections>
187− </viewController>
188− <placeholder placeholderIdentifier="IBFirstResponder" id="g4Y-1k-Lxr" userLabel="First Responder" customClass="UIResponder" sceneMemberID="firstResponder"/>
189− </objects>
190− <point key="canvasLocation" x="1188" y="-113"/>
191− </scene>
192− </scenes>
193− <resources>
194− <image name="arrow" width="12" height="20"/>
195− </resources>
196−</document>
Hookah Tau/Controllers/Admin/Clients/ClientsCoordinator.swiftdeleted−36
@@ -1,36 +0,0 @@
1−//
2−// ClientsCoordinator.swift
3−// Hookah Tau
4−//
5−// Created by cstore on 09/12/2019.
6−// Copyright © 2019 Daria Rednikina. All rights reserved.
7−//
8−
9−import UIKit
10−
11−
12−class ClientsCoordinator: BaseCoordinator {
13−
14− override func start() {
15− let storyboard = UIStoryboard(name: "ClientList", bundle: nil)
16− let viewController = storyboard.instantiateViewController(withIdentifier: "ClientsViewController") as? ClientsViewController
17− viewController?.coordinator = self
18− guard let vc = viewController else { return }
19− navigationController?.navigationBar.prefersLargeTitles = true
20− navigationController?.viewControllers = [vc]
21− }
22−
23− /// TODO
24− func openUserProfile(_ profile: Client) {
25− let profileCoordinator = ClientProfileCoordinator(navigationController: navigationController)
26− profileCoordinator.user = profile
27−
28− self.addDependency(profileCoordinator)
29− profileCoordinator.didEndFlow = {
30− self.removeDependency(profileCoordinator)
31− self.navigationController?.popViewController(animated: true)
32− }
33−
34− profileCoordinator.start()
35− }
36−}
Hookah Tau/Controllers/Admin/Clients/ClientsViewController.swiftdeleted−239
@@ -1,239 +0,0 @@
1−//
2−// ClientsViewController.swift
3−// Hookah Tau
4−//
5−// Created by cstore on 09/12/2019.
6−// Copyright © 2019 Daria Rednikina. All rights reserved.
7−//
8−
9−import UIKit
10−
11−class ClientsViewController: BaseTableViewController {
12−
13− // MARK: - Properties
14−
15− var dataSource: [Client] = [] {
16− didSet {
17− tableView.reloadData()
18− }
19− }
20−
21− var filteredDataSource: [Client] = []
22−
23− var clientsService: ClientsService?
24−
25− weak var coordinator: ClientsCoordinator?
26−
27− var searchControl: UISearchController?
28−
29− var isFiltering: Bool {
30− return searchControl?.isActive ?? false && !searchBarIsEmpty()
31− }
32−
33− func searchBarIsEmpty() -> Bool {
34− return searchControl?.searchBar.text?.isEmpty ?? true
35− }
36−
37− // MARK: - Lifecycle
38−
39− override func viewDidLoad() {
40− super.viewDidLoad()
41−
42− setupNavigationBar()
43− setupSearchController()
44− clientsService = ClientsService(apiClient: APIClient.shared)
45− }
46−
47− override func viewWillAppear(_ animated: Bool) {
48− super.viewWillAppear(animated)
49− tabBarController?.tabBar.isHidden = false
50− }
51−
52− override func viewDidAppear(_ animated: Bool) {
53− super.viewDidAppear(animated)
54− loadClients()
55− }
56−
57− // MARK: - Setup
58−
59− func setupNavigationBar() {
60−
61− navigationItem.title = "Клиенты"
62− navigationItem.rightBarButtonItem = UIBarButtonItem(barButtonSystemItem: .action, target: self, action: #selector(shareCSVFile))
63− }
64−
65− func setupSearchController() {
66− searchControl = UISearchController(searchResultsController: nil)
67− navigationItem.searchController = searchControl
68− navigationItem.hidesSearchBarWhenScrolling = false
69− searchControl?.obscuresBackgroundDuringPresentation = false
70− definesPresentationContext = true
71− searchControl?.searchResultsUpdater = self
72− }
73−
74− // MARK: - Api calls
75−
76− /// Загружаем клиентов кальянки
77− func loadClients() {
78− clientsService?.loadClientsList(completion: { [ weak self ] (res) in
79− switch res {
80− case .failure(let err):
81− print(err)
82− case .success(let arr):
83− self?.dataSource = arr
84− }
85− })
86− }
87−
88− // MARK: - Button handlers
89−
90− /// https://developer.apple.com/design/human-interface-guidelines/ios/views/activity-views/
91− @objc func shareCSVFile() {
92− //Your CSV text
93− let str = HFunc.main.exportClientsToCSV(dataSource)
94− let filename = getDocumentsDirectory().appendingPathComponent("clients.csv")
95−
96− do {
97− try str.write(toFile: filename, atomically: true, encoding: String.Encoding.utf8)
98−
99− let fileData = NSURL(fileURLWithPath: filename)
100−
101− let objectsToShare = [fileData]
102− let activityVC = UIActivityViewController(activityItems: objectsToShare, applicationActivities: nil)
103−
104− self.present(activityVC, animated: true, completion: nil)
105−
106− } catch {
107− self.displayAlert(with: "По какой-то причине не могу сохранить файл!")
108− }
109− }
110−
111− func getDocumentsDirectory() -> NSString {
112− let paths = NSSearchPathForDirectoriesInDomains(.documentDirectory, .userDomainMask, true)
113− let documentsDirectory = paths[0]
114− return documentsDirectory as NSString
115− }
116−
117− // MARK: - Change blocklist status
118−
119− func updateUserBlockStatus(wasBlocked: Bool, phone: String, indexPath: IndexPath) {
120− let crudMethod = wasBlocked ? CrudMethod.delete : CrudMethod.put
121− clientsService?.changeBlockList(whatToDo: crudMethod, phone: phone, completion: { (res) in
122− if res {
123− self.tableView?.beginUpdates()
124− self.tableView?.reloadRows(at: [indexPath], with: .automatic)
125− if self.isFiltering {
126− self.filteredDataSource[indexPath.row].isBlocked = !wasBlocked
127− let changed = self.filteredDataSource[indexPath.row]
128− let filtered = self.dataSource.map { (one: Client) -> Client in
129− if one.uuid == changed.uuid {
130− return changed
131− } else { return one } }
132− self.dataSource = filtered
133− } else {
134− self.dataSource[indexPath.row].isBlocked = !wasBlocked
135− }
136− self.tableView?.endUpdates()
137− } else {
138− self.displayAlert(with: "Не удалось \(wasBlocked ? "удалить" : "добавить") пользователя \(wasBlocked ? "из" : "в") чс! Попробуйте еще раз!")
139− return
140− }
141− })
142− }
143−
144− func updateAdminStatus(user: Client, indexPath: IndexPath) {
145−
146− let wasAdmin = user.isAdmin
147− let crudMethod = wasAdmin ? CrudMethod.delete : CrudMethod.put
148− let data = user.isAdmin ? user.uuid : user.phoneNumber
149−
150− clientsService?.changeAdmin(crud: crudMethod, data: data, completion: { (res) in
151− if res {
152− self.tableView?.beginUpdates()
153− self.tableView?.reloadRows(at: [indexPath], with: .automatic)
154− if self.isFiltering {
155− self.filteredDataSource[indexPath.row].isAdmin = !wasAdmin
156− let changed = self.filteredDataSource[indexPath.row]
157− let filtered = self.dataSource.map { (one: Client) -> Client in
158− if one.uuid == changed.uuid {
159− return changed
160− } else { return one } }
161− self.dataSource = filtered
162− } else {
163− self.dataSource[indexPath.row].isAdmin = !wasAdmin
164− }
165− self.tableView?.endUpdates()
166− } else {
167− self.displayAlert(with: "Не удалось \(wasAdmin ? "распромоутить" : "запромоутить") пользователя! Попробуйте еще раз!")
168− return
169− }
170− })
171− }
172−}
173−
174−// MARK: - Tableview
175−
176−extension ClientsViewController {
177−
178− override func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
179− let cell = tableView.dequeueReusableCell(withIdentifier: clientTableViewCellId, for: indexPath) as! ClientTableViewCell
180−
181− let userModel = isFiltering ? filteredDataSource[indexPath.row] : dataSource[indexPath.row]
182− cell.bind(withModel: userModel)
183−
184− return cell
185− }
186−
187− override func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
188− return isFiltering ? filteredDataSource.count : dataSource.count
189− }
190−
191− override func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
192− let user = isFiltering ? filteredDataSource[indexPath.row] : dataSource[indexPath.row]
193− coordinator?.openUserProfile(user)
194− searchControl?.dismiss(animated: true, completion: nil)
195− }
196−
197− // Update
198−
199− override func tableView(_ tableView: UITableView, canEditRowAt indexPath: IndexPath) -> Bool {
200− return true
201− }
202−
203− override func tableView(_ tableView: UITableView, editActionsForRowAt indexPath: IndexPath) -> [UITableViewRowAction]? {
204−
205− let user = isFiltering ? filteredDataSource[indexPath.row] : dataSource[indexPath.row]
206− let blockButton = UITableViewRowAction(style: .normal, title: "\(!user.isBlocked ? "в чс" : "убрать из чс")") { _,_ in
207−
208− self.updateUserBlockStatus(wasBlocked: user.isBlocked, phone: user.phoneNumber, indexPath: indexPath)
209− }
210−
211− blockButton.backgroundColor = .black
212−
213− return [blockButton]
214− }
215−
216− override func tableView(_ tableView: UITableView, leadingSwipeActionsConfigurationForRowAt indexPath: IndexPath) -> UISwipeActionsConfiguration? {
217−
218− let user = isFiltering ? filteredDataSource[indexPath.row] : dataSource[indexPath.row]
219−
220− let promote = UIContextualAction(style: .normal, title: "\(!user.isAdmin ? "дать админку" : "забрать админку")") { (_, _, _) in
221− self.updateAdminStatus(user: user, indexPath: indexPath)
222− }
223− promote.backgroundColor = .black
224−
225− return UISwipeActionsConfiguration(actions: [promote])
226− }
227−}
228−
229−extension ClientsViewController: UISearchResultsUpdating {
230− func filterContentForSearchText(_ searchText: String, scope: String = "All")
231− {
232− filteredDataSource = dataSource.filter { ($0.name?.lowercased().contains(searchText.lowercased()) ?? false) || ($0.phoneNumber.lowercased().contains(searchText.lowercased())) }
233− tableView.reloadData()
234− }
235−
236− func updateSearchResults(for searchController: UISearchController) {
237− filterContentForSearchText(searchController.searchBar.text ?? "")
238− }
239−}
Hookah Tau/Controllers/Admin/Clients/Profile/ClientProfileCoordinator.swiftdeleted−52
@@ -1,52 +0,0 @@
1−//
2−// ClientProfileCoordinator.swift
3−// Hookah Tau
4−//
5−// Created by cstore on 10/12/2019.
6−// Copyright © 2019 Daria Rednikina. All rights reserved.
7−//
8−
9−import UIKit
10−
11−
12−class ClientProfileCoordinator: BaseCoordinator {
13−
14− var user: Client?
15−
16− override func start() {
17− let storyboard = UIStoryboard(name: "ClientList", bundle: nil)
18− let viewController = storyboard.instantiateViewController(withIdentifier: "ProfileTableViewController") as? ProfileTableViewController
19− viewController?.user = user
20− viewController?.coodinator = self
21− guard let vc = viewController else { return }
22− navigationController?.pushViewController(vc, animated: true)
23− }
24−
25−
26− // Создание бронирования из профиля клиента
27− func createReservation(forUserWithPhone phoneNumber: String, user fullUser: FullUser) {
28− let coordinator = AdminFirstStepReservationViewCoordinator(navigationController: navigationController)
29− coordinator.phone = phoneNumber
30− coordinator.fullUser = fullUser
31−
32− addDependency(coordinator)
33− coordinator.didFinish = { [weak self] in
34− self?.removeDependency(coordinator)
35− self?.navigationController?.popViewController(animated: true)
36− }
37−
38− coordinator.start()
39− }
40−
41− // Просмотр (и редактирование) брони
42− func seeExistingReservation(data: ReservationWithUser) {
43− let reservationCoordinator = AdminReservationEditingCoordinator(navigationController: navigationController)
44− addDependency(reservationCoordinator)
45− reservationCoordinator.reservationData = data
46− reservationCoordinator.didEndFlow = { [weak self] in
47− self?.removeDependency(reservationCoordinator)
48− self?.navigationController?.popViewController(animated: true)
49− }
50− reservationCoordinator.start()
51− }
52−}
Hookah Tau/Controllers/Admin/Clients/Profile/ProfileTableViewController.swiftdeleted−257
@@ -1,257 +0,0 @@
1−//
2−// ProfileTableViewController.swift
3−// Hookah Tau
4−//
5−// Created by cstore on 10/12/2019.
6−// Copyright © 2019 Daria Rednikina. All rights reserved.
7−//
8−
9−import UIKit
10−
11−class ProfileTableViewController: BaseViewController {
12−
13− // MARK: - IBAOutlets
14−
15− @IBOutlet weak var phoneButton: Button! {
16− didSet {
17− guard let u = user else { return }
18−
19− let style = BlackButtonStyle()
20− style.apply(to: phoneButton, withTitle: u.phoneNumber.formattedNumber())
21− phoneButton.addTarget(self, action: #selector(callUser), for: .touchUpInside)
22− }
23− }
24−
25− @IBOutlet weak var copyButton: Button! {
26− didSet {
27− let style = BlackButtonStyle()
28− style.apply(to: copyButton, withTitle: "СКОПИРОВАТЬ")
29− copyButton.addTarget(self, action: #selector(copyNumber(_:)), for: .touchUpInside)
30− }
31− }
32−
33−
34− @IBOutlet weak var contentView: UIView!
35−
36− // MARK: - properties
37−
38− var tableView: UITableView?
39−
40− var clientsService: ClientsService?
41−
42− var reservationsService: ReservationsService?
43−
44− var user: Client?
45−
46− weak var coodinator: ClientProfileCoordinator?
47−
48− var noReserationsYetView: AdminNoReservationsView?
49−
50− var activityIndicator: UIActivityIndicatorView?
51−
52− var refreshControl: UIRefreshControl?
53−
54− var dataSource: [Reservation] = [] {
55− didSet {
56− guard let empty = noReserationsYetView else { return }
57− if dataSource.isEmpty {
58− empty.alpha = 1
59− tableView?.alpha = 0
60− } else {
61− empty.alpha = 0
62− tableView?.alpha = 1
63− }
64−
65− refreshControl?.endRefreshing()
66− activityIndicator?.stopAnimating()
67− tableView?.reloadData()
68− }
69− }
70−
71− // MARK: - Lifecycle
72−
73− override func viewDidLoad() {
74− super.viewDidLoad()
75−
76− clientsService = ClientsService(apiClient: APIClient.shared)
77− reservationsService = ReservationsService(apiClient: APIClient.shared)
78−
79− setupNavBar()
80− setupTable()
81− setupActivityIndicator()
82− //loadReservations()
83− }
84−
85− override func viewWillAppear(_ animated: Bool) {
86− super.viewWillAppear(animated)
87− tabBarController?.tabBar.isHidden = true
88− }
89−
90− override func viewDidAppear(_ animated: Bool) {
91− super.viewDidAppear(animated)
92− loadReservations()
93− }
94−
95− // MARK: - Setup
96−
97− func setupNavBar() {
98− guard let u = user else { return }
99−
100− navigationItem.title = "\(u.name ?? "❔")\(u.isAdmin ? "👑" : "")\(u.isBlocked ? "❌" : "")"
101− navigationItem.rightBarButtonItem = UIBarButtonItem(barButtonSystemItem: .add, target: self, action: #selector(book))
102− }
103−
104− func setupTable() {
105− tableView = UITableView()
106−
107− // refresh control
108− refreshControl = UIRefreshControl()
109− refreshControl?.addTarget(self, action: #selector(refresh), for: .valueChanged)
110− tableView?.refreshControl = refreshControl
111−
112− tableView?.dataSource = self
113− tableView?.delegate = self
114−
115− noReserationsYetView = AdminNoReservationsView.loadFromNib()
116− noReserationsYetView?.setup(withTitle: "У этого пользователя пока нет ни одной брони :(")
117− noReserationsYetView?.bookButton?.addTarget(self, action: #selector(book), for: .touchUpInside)
118− contentView.addSubviewThatFills(noReserationsYetView)
119− noReserationsYetView?.alpha = 0
120−
121− tableView?.register(ReservationCell.self, forCellReuseIdentifier: reservationCell)
122−
123− contentView.addSubviewThatFills(tableView)
124−
125− tableView?.alpha = 0
126− }
127−
128− func setupActivityIndicator() {
129−
130− activityIndicator = UIActivityIndicatorView()
131− view.addSubviewThatFills(activityIndicator)
132− activityIndicator?.startAnimating()
133−
134− }
135−
136− // MARK: - Api calls
137−
138− func loadReservations() {
139− guard let uuid = user?.uuid else { return }
140− clientsService?.loadReservationsForUser(withUUID: uuid,
141− completion: { [weak self] (res) in
142− switch res {
143− case .failure(let err):
144− self?.displayAlert(forError: err)
145− case .success(let data):
146− self?.dataSource = data
147− }
148− })
149− }
150−
151−
152− func deleteReservation(uuid: String, completion: @escaping (([Reservation]?) -> Void)) {
153− reservationsService?.deleteReservation(isAdmin: true, uuid: uuid) { result in
154− if result {
155− let newReservations = self.dataSource.filter { $0.uuid != uuid }
156− completion(newReservations)
157− return
158− }
159−
160− completion(nil)
161− }
162− }
163−
164− // MARK: - Button handlers
165−
166− @objc func callUser() {
167− guard
168− let u = user,
169− let urlPhone = URL(string: "tel://79\(u.phoneNumber)")
170− else { return }
171−
172− UIApplication.shared.open(urlPhone)
173− }
174−
175− @objc func copyNumber(_ sender: UIButton) {
176− guard
177− let u = user
178− else { return }
179− //Copy a string to the pasteboard.
180− UIPasteboard.general.string = "79\(u.phoneNumber)"
181−
182− //Alert
183− self.displayAlert(with: "Номер скопирован!")
184− }
185−
186− @objc func refresh() {
187− loadReservations()
188− }
189−
190− @objc func book() {
191− guard
192− let phone = user?.phoneNumber,
193− let user = user
194− else { return }
195−
196− let fullUser = FullUser(uuid: user.uuid,
197− name: user.name,
198− phoneNumber: user.phoneNumber,
199− isAdmin: user.isAdmin)
200− coodinator?.createReservation(forUserWithPhone: phone, user: fullUser)
201− }
202−}
203−
204−// MARK: - Table view data source
205−
206−extension ProfileTableViewController: UITableViewDelegate, UITableViewDataSource {
207−
208− func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
209− return dataSource.count
210− }
211−
212− func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
213− let cell = tableView.dequeueReusableCell(withIdentifier: reservationCell, for: indexPath) as! ReservationCell
214−
215− cell.bind(withModel: dataSource[indexPath.row])
216−
217− return cell
218− }
219−
220− // tap
221−
222− func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
223− guard let u = user else { return }
224− let r = dataSource[indexPath.row]
225− let user = FullUser(uuid: u.uuid, name: u.name, phoneNumber: u.phoneNumber, isAdmin: u.isAdmin)
226− let reservation = ReservationWithUser(reservation: r, user: user)
227− coodinator?.seeExistingReservation(data: reservation)
228− }
229−
230− // Update
231−
232− func tableView(_ tableView: UITableView, canEditRowAt indexPath: IndexPath) -> Bool {
233− return true
234− }
235−
236− func tableView(_ tableView: UITableView, editActionsForRowAt indexPath: IndexPath) -> [UITableViewRowAction]? {
237−
238− let uuid = dataSource[indexPath.row].uuid
239− let cancelButton = UITableViewRowAction(style: .normal, title: "отменить бронь") { _,_ in
240−
241− self.deleteReservation(uuid: uuid) { optionalNewVal in
242− if let newval = optionalNewVal {
243− self.tableView?.beginUpdates()
244− self.tableView?.deleteRows(at: [indexPath], with: .automatic)
245− self.dataSource = newval
246− self.tableView?.endUpdates()
247− } else {
248− self.displayAlert(with: "Не удалось удалить вашу бронь! Попробуйте еще раз!")
249− }
250− }
251− }
252−
253− cancelButton.backgroundColor = .black
254−
255− return [cancelButton]
256− }
257−}
Hookah Tau/Controllers/Admin/Reservations/AdminAddressCoordinator.swiftdeleted−35
@@ -1,35 +0,0 @@
1−//
2−// AdminAddressCoordinator.swift
3−// Hookah Tau
4−//
5−// Created by cstore on 09/12/2019.
6−// Copyright © 2019 Daria Rednikina. All rights reserved.
7−//
8−
9−import Foundation
10−
11−class AdminAddressCoordinator: BaseCoordinator {
12−
13− override func start() {
14− let addressViewController = AddresViewController()
15− addressViewController.coordinator = self
16− navigationController?.viewControllers = [addressViewController]
17−
18− guard let id = DataStorage.standard.getEstablishmentChoice() else { return }
19− openReservations(forEstablishment: id)
20− }
21−
22− private func openReservations(forEstablishment id: Int) {
23− let reservationsCoordinator = AdminReservationsCoordinator(navigationController: navigationController)
24− addDependency(reservationsCoordinator)
25− reservationsCoordinator.establishmentId = id
26− reservationsCoordinator.start()
27− }
28−}
29−
30−extension AdminAddressCoordinator: AddressMapper {
31− func chooseAddress(establishmentId id: Int) {
32− DataStorage.standard.setupEstablishmentChoice(id: id)
33− openReservations(forEstablishment: id)
34− }
35−}
Hookah Tau/Controllers/Admin/Reservations/AdminReservationEditingCoordinator.swiftdeleted−31
@@ -1,31 +0,0 @@
1−//
2−// AdminReservationEditingCoordinator.swift
3−// Hookah Tau
4−//
5−// Created by cstore on 20/12/2019.
6−// Copyright © 2019 Daria Rednikina. All rights reserved.
7−//
8−
9−import UIKit
10−
11−
12−class AdminReservationEditingCoordinator: BaseCoordinator, ShowReservationCoordinator {
13−
14− // MARK: - Peoperties
15−
16− var didFinish: (() -> Void)?
17−
18− var reservationData: ReservationWithUser?
19−
20− // MARK: - Lifecycle
21−
22− override func start() {
23− let storyboard = UIStoryboard(name: "AdminReservations", bundle: nil)
24− let vc = storyboard.instantiateViewController(withIdentifier: "AdminReservationEditingViewController") as! AdminReservationEditingViewController
25− vc.reservationData = reservationData
26− vc.coordinator = self
27−
28− navigationController?.pushViewController(vc, animated: true)
29− }
30−
31−}
Hookah Tau/Controllers/Admin/Reservations/AdminReservationEditingViewController.swiftdeleted−187
@@ -1,187 +0,0 @@
1−//
2−// AdminReservationEditingViewController.swift
3−// Hookah Tau
4−//
5−// Created by cstore on 20/12/2019.
6−// Copyright © 2019 Daria Rednikina. All rights reserved.
7−//
8−
9−import UIKit
10−
11−class AdminReservationEditingViewController: BaseViewController {
12−
13− // MARK:- IBAOutlets
14−
15− @IBOutlet weak var tableContentView: UIView!
16−
17− @IBOutlet weak var mainContentView: UIView!
18−
19− // MARK:- Properties
20−
21− var mapView: MapImageScroll?
22−
23− var reservationView: AdminReservationView?
24−
25− var reservationData: ReservationWithUser?
26−
27− weak var coordinator: ShowReservationCoordinator?
28−
29− var reservationService: ReservationsService?
30−
31− var reservedPeriods: [ReservationPeriod] = [] {
32− didSet {
33− if let _ = reservationView {
34− setupReservationViewWithIntervals()
35− }
36− }
37− }
38−
39− // MARK:- Lifecycle
40−
41− override func viewDidLoad() {
42− super.viewDidLoad()
43−
44− setupContentViews()
45−
46− reservationService = ReservationsService(apiClient: APIClient.shared)
47−
48− loadReservedPeriods()
49−
50− setupButtons()
51− }
52−
53− override func viewWillAppear(_ animated: Bool) {
54− super.viewWillAppear(animated)
55−
56− tabBarController?.tabBar.isHidden = true
57− }
58−
59− // MARK: - Setup
60−
61− func setupButtons() {
62−
63− reservationView?.saveButton?.addTarget(self, action: #selector(saveReservation), for: .touchUpInside)
64− reservationView?.cancelButton?.addTarget(self, action: #selector(cancelReservation), for: .touchUpInside)
65− }
66−
67− func setupContentViews() {
68− guard
69− let model = reservationData
70− else { return }
71−
72− if model.establishment == 1 {
73− mapView = MapView1.loadFromNib()
74− } else {
75− mapView = MapView2.loadFromNib()
76− }
77−
78− navigationItem.title = TotalStorage.standard.getEstablishment(model.establishment)?.address
79−
80− mapView?.isUserInteractionEnabled = false
81−
82− tableContentView.addSubviewThatFills(mapView)
83− mapView?.scrollToTable(table: model.reservedTable)
84−
85− reservationView = AdminReservationView.loadFromNib()
86− reservationView?.bind(withModel: model)
87−
88− mainContentView.addSubviewThatFills(reservationView)
89− }
90−
91− func setupReservationViewWithIntervals() {
92− reservationView?.bind(withIntervals: reservedPeriods)
93− }
94−
95− func loadReservedPeriods() {
96− guard
97− let model = reservationData,
98− let uuid = model.uuid
99− else {
100− setupReservationViewWithIntervals()
101− return }
102−
103− reservationService?.getReservationsAround(uuid: uuid, completion: { [weak self] (res) in
104− switch res {
105− case .failure(let err):
106− self?.displayAlert(forError: err)
107− return
108− case .success(let reserv):
109− self?.reservedPeriods = reserv
110− return
111− }
112− })
113− }
114−
115− // MARK:- Handlers
116−
117− @objc func saveReservation() {
118− guard
119− let r = reservationView?.data,
120− let uuid = reservationData?.uuid
121− else {
122− createReservation()
123− return
124− }
125−
126− reservationView?.saveButton?.loading = true
127−
128− reservationService?.updateReservation(startTime: r.startTime,
129− numberOfGuests: r.numberOfGuests,
130− endTime: r.endTime,
131− uuid: uuid,
132− isAdmin: true,
133− completion: { [weak self] (res) in
134− if res {
135− self?.coordinator?.didFinish?()
136− } else {
137− self?.displayAlert(with: "Что-то пошло не так! Попробуешь еще раз?")
138− }
139−
140− self?.reservationView?.saveButton?.loading = false
141− })
142− }
143−
144− func createReservation() {
145− guard
146− let r = reservationData,
147− let d = reservationData?.owner.phoneNumber else { return }
148−
149− let data = ReservationData(establishment: r.establishment,
150− startTime: r.startTime,
151− endTime: r.endTime,
152− numberOfGuests: r.numberOfGuests,
153− reservedTable: r.reservedTable)
154− print(data)
155− reservationService?.createReservation(reservation: AdminCreateReservation(reservation: data, user: d), completion: { (res) in
156− switch res {
157− case .failure(_):
158− self.displayAlert(with: "Что-то пошло не так!\nПопробуешь еще раз?")
159− return
160− case .success(let uuid):
161− self.reservationData?.uuid = uuid
162− self.coordinator?.didFinish?()
163− return
164− }
165− })
166− }
167−
168− @objc func cancelReservation() {
169− guard
170− let uuid = reservationData?.uuid
171− else {
172− cancelPrereservation()
173− return }
174−
175− reservationService?.deleteReservation(isAdmin: true, uuid: uuid, completion: { [weak self] (res) in
176− if res {
177− self?.coordinator?.didFinish?()
178− } else {
179− self?.displayAlert(with: "Что-то пошло не так!\nПопробуешь еще раз?")
180− }
181− })
182− }
183−
184− func cancelPrereservation() {
185− coordinator?.didFinish?()
186− }
187−}
Hookah Tau/Controllers/Admin/Reservations/AdminReservations.storyboarddeleted−132
@@ -1,132 +0,0 @@
1−<?xml version="1.0" encoding="UTF-8"?>
2−<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="15702" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
3− <device id="retina4_7" orientation="portrait" appearance="light"/>
4− <dependencies>
5− <deployment identifier="iOS"/>
6− <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="15704"/>
7− <capability name="Safe area layout guides" minToolsVersion="9.0"/>
8− <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
9− </dependencies>
10− <scenes>
11− <!--Admin Reservations Controller-->
12− <scene sceneID="3G1-PQ-PoW">
13− <objects>
14− <viewController storyboardIdentifier="AdminReservationsController" id="Imn-L1-YIQ" customClass="AdminReservationsController" customModule="Hookah_Tau" customModuleProvider="target" sceneMemberID="viewController">
15− <view key="view" contentMode="scaleToFill" id="DoI-oD-1Zy">
16− <rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
17− <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
18− <color key="backgroundColor" systemColor="systemBackgroundColor" cocoaTouchSystemColor="whiteColor"/>
19− <viewLayoutGuide key="safeArea" id="QBQ-KH-Pid"/>
20− </view>
21− </viewController>
22− <placeholder placeholderIdentifier="IBFirstResponder" id="Rnh-3m-3dv" userLabel="First Responder" customClass="UIResponder" sceneMemberID="firstResponder"/>
23− </objects>
24− <point key="canvasLocation" x="111" y="159"/>
25− </scene>
26− <!--Admin Reservation Editing View Controller-->
27− <scene sceneID="hWe-Nm-jBL">
28− <objects>
29− <viewController storyboardIdentifier="AdminReservationEditingViewController" id="BgQ-ca-cuZ" customClass="AdminReservationEditingViewController" customModule="Hookah_Tau" customModuleProvider="target" sceneMemberID="viewController">
30− <view key="view" contentMode="scaleToFill" id="tjV-EU-XvW">
31− <rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
32− <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
33− <subviews>
34− <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="uNU-TW-vfq">
35− <rect key="frame" x="0.0" y="262" width="375" height="385"/>
36− <color key="backgroundColor" white="0.66666666666666663" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
37− <constraints>
38− <constraint firstAttribute="height" constant="385" id="wfZ-i9-ruU"/>
39− </constraints>
40− </view>
41− <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="ghQ-Jv-1Uo">
42− <rect key="frame" x="0.0" y="0.0" width="375" height="254"/>
43− <color key="backgroundColor" systemColor="systemGreenColor" red="0.20392156859999999" green="0.78039215689999997" blue="0.34901960780000002" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
44− </view>
45− </subviews>
46− <color key="backgroundColor" systemColor="systemBackgroundColor" cocoaTouchSystemColor="whiteColor"/>
47− <constraints>
48− <constraint firstItem="ghQ-Jv-1Uo" firstAttribute="leading" secondItem="qeh-vb-wIH" secondAttribute="leading" id="6ue-fN-8T9"/>
49− <constraint firstAttribute="bottom" secondItem="uNU-TW-vfq" secondAttribute="bottom" constant="20" symbolic="YES" id="CEP-Ac-DSe"/>
50− <constraint firstItem="uNU-TW-vfq" firstAttribute="leading" secondItem="qeh-vb-wIH" secondAttribute="leading" id="Ff2-mz-GAH"/>
51− <constraint firstItem="ghQ-Jv-1Uo" firstAttribute="top" secondItem="qeh-vb-wIH" secondAttribute="top" id="MMC-Og-ggL"/>
52− <constraint firstItem="uNU-TW-vfq" firstAttribute="trailing" secondItem="qeh-vb-wIH" secondAttribute="trailing" id="fRe-ZZ-rez"/>
53− <constraint firstItem="ghQ-Jv-1Uo" firstAttribute="trailing" secondItem="qeh-vb-wIH" secondAttribute="trailing" id="hPh-8O-if8"/>
54− <constraint firstItem="uNU-TW-vfq" firstAttribute="top" secondItem="ghQ-Jv-1Uo" secondAttribute="bottom" constant="8" symbolic="YES" id="rDO-oM-rwy"/>
55− </constraints>
56− <viewLayoutGuide key="safeArea" id="qeh-vb-wIH"/>
57− </view>
58− <connections>
59− <outlet property="mainContentView" destination="uNU-TW-vfq" id="Fy6-pC-ach"/>
60− <outlet property="tableContentView" destination="ghQ-Jv-1Uo" id="GN2-MW-a2J"/>
61− </connections>
62− </viewController>
63− <placeholder placeholderIdentifier="IBFirstResponder" id="LNT-df-eny" userLabel="First Responder" customClass="UIResponder" sceneMemberID="firstResponder"/>
64− </objects>
65− <point key="canvasLocation" x="959.20000000000005" y="158.77061469265368"/>
66− </scene>
67− <!--Admin Second Step Reservation View Controller-->
68− <scene sceneID="VhI-Z9-iqB">
69− <objects>
70− <viewController storyboardIdentifier="AdminSecondStepReservationViewController" id="eNJ-Ja-201" customClass="AdminSecondStepReservationViewController" customModule="Hookah_Tau" customModuleProvider="target" sceneMemberID="viewController">
71− <view key="view" contentMode="scaleToFill" id="7mk-5I-JJs">
72− <rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
73− <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
74− <subviews>
75− <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="oAV-GW-iea">
76− <rect key="frame" x="0.0" y="0.0" width="375" height="293"/>
77− <color key="backgroundColor" systemColor="systemIndigoColor" red="0.34509803919999998" green="0.33725490200000002" blue="0.83921568629999999" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
78− </view>
79− <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="a4v-ng-lm7">
80− <rect key="frame" x="0.0" y="293" width="375" height="374"/>
81− <subviews>
82− <stackView opaque="NO" contentMode="scaleToFill" axis="vertical" alignment="center" spacing="13" translatesAutoresizingMaskIntoConstraints="NO" id="1Bb-cO-4qW">
83− <rect key="frame" x="20" y="22" width="335" height="88.5"/>
84− <subviews>
85− <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Номер клиента" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="bME-Wr-gh7">
86− <rect key="frame" x="62.5" y="0.0" width="210.5" height="33.5"/>
87− <fontDescription key="fontDescription" type="boldSystem" pointSize="28"/>
88− <nil key="textColor"/>
89− <nil key="highlightedColor"/>
90− </label>
91− <textField opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" borderStyle="roundedRect" placeholder="+7 (988) 888-88-88" textAlignment="natural" minimumFontSize="28" translatesAutoresizingMaskIntoConstraints="NO" id="wBC-oa-ekQ" customClass="PhoneTextField" customModule="Hookah_Tau" customModuleProvider="target">
92− <rect key="frame" x="13.5" y="46.5" width="308.5" height="42"/>
93− <fontDescription key="fontDescription" type="boldSystem" pointSize="28"/>
94− <textInputTraits key="textInputTraits"/>
95− </textField>
96− </subviews>
97− </stackView>
98− </subviews>
99− <color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
100− <constraints>
101− <constraint firstItem="1Bb-cO-4qW" firstAttribute="top" secondItem="a4v-ng-lm7" secondAttribute="top" constant="22" id="7fb-Up-Wmb"/>
102− <constraint firstAttribute="trailing" secondItem="1Bb-cO-4qW" secondAttribute="trailing" constant="20" id="934-Ef-0xf"/>
103− <constraint firstItem="1Bb-cO-4qW" firstAttribute="leading" secondItem="a4v-ng-lm7" secondAttribute="leading" constant="20" id="sr5-aO-q1p"/>
104− <constraint firstAttribute="height" constant="374" id="uRW-2Q-OyM"/>
105− </constraints>
106− </view>
107− </subviews>
108− <color key="backgroundColor" systemColor="systemBackgroundColor" cocoaTouchSystemColor="whiteColor"/>
109− <constraints>
110− <constraint firstItem="a4v-ng-lm7" firstAttribute="leading" secondItem="8aV-w1-NXE" secondAttribute="leading" id="OjU-Pl-gu1"/>
111− <constraint firstItem="oAV-GW-iea" firstAttribute="trailing" secondItem="8aV-w1-NXE" secondAttribute="trailing" id="bPj-q1-pY6"/>
112− <constraint firstItem="oAV-GW-iea" firstAttribute="top" secondItem="8aV-w1-NXE" secondAttribute="top" id="gUc-es-YHL"/>
113− <constraint firstItem="a4v-ng-lm7" firstAttribute="bottom" secondItem="8aV-w1-NXE" secondAttribute="bottom" id="hZH-fU-zM5"/>
114− <constraint firstItem="oAV-GW-iea" firstAttribute="leading" secondItem="8aV-w1-NXE" secondAttribute="leading" id="mos-8B-wjS"/>
115− <constraint firstItem="a4v-ng-lm7" firstAttribute="trailing" secondItem="8aV-w1-NXE" secondAttribute="trailing" id="ntK-1r-AUW"/>
116− <constraint firstItem="a4v-ng-lm7" firstAttribute="top" secondItem="oAV-GW-iea" secondAttribute="bottom" id="siv-Xa-Nl5"/>
117− </constraints>
118− <viewLayoutGuide key="safeArea" id="8aV-w1-NXE"/>
119− </view>
120− <connections>
121− <outlet property="heightConstraint" destination="uRW-2Q-OyM" id="fmn-uI-ooi"/>
122− <outlet property="mapContainerView" destination="oAV-GW-iea" id="jmP-q0-WbS"/>
123− <outlet property="phoneContentView" destination="a4v-ng-lm7" id="W1O-A7-6EP"/>
124− <outlet property="phoneTextField" destination="wBC-oa-ekQ" id="Btg-A3-tpm"/>
125− </connections>
126− </viewController>
127− <placeholder placeholderIdentifier="IBFirstResponder" id="hNg-aQ-v7C" userLabel="First Responder" customClass="UIResponder" sceneMemberID="firstResponder"/>
128− </objects>
129− <point key="canvasLocation" x="1664.8" y="158.77061469265368"/>
130− </scene>
131− </scenes>
132−</document>
Hookah Tau/Controllers/Admin/Reservations/List of reservations/AdminReservationsController.swiftdeleted−219
@@ -1,219 +0,0 @@
1−//
2−// AdminReservationsController.swift
3−// Hookah Tau
4−//
5−// Created by cstore on 19/12/2019.
6−// Copyright © 2019 Daria Rednikina. All rights reserved.
7−//
8−
9−import UIKit
10−
11−class AdminReservationsController: BaseViewController {
12−
13− // MARK:- Properties
14−
15− /// Establishment id
16− var id: Int?
17−
18− var tableView: UITableView? = {
19− let tableView = UITableView()
20− tableView.backgroundColor = .white
21− return tableView
22− }()
23−
24− var contentView: UIView = {
25− let view = UIView()
26− view.translatesAutoresizingMaskIntoConstraints = false
27− return view
28− }()
29−
30− var noReservationsView: AdminNoReservationsView?
31−
32− var reservationsService: ReservationsService?
33−
34− weak var coordinator: AdminReservationsCoordinator?
35−
36− var refrControl: UIRefreshControl?
37−
38− var activityIndicator: UIActivityIndicatorView?
39−
40− var activeReservations: [ReservationWithUser] = [] {
41− didSet {
42− guard let empty = noReservationsView else { return }
43− if activeReservations.isEmpty {
44− contentView.bringSubviewToFront(empty)
45− empty.alpha = 1
46− } else {
47− contentView.sendSubviewToBack(empty)
48− tableView?.alpha = 1
49− }
50− activityIndicator?.stopAnimating()
51− tableView?.reloadData()
52− }
53− }
54−
55− override func viewDidLoad() {
56− super.viewDidLoad()
57−
58− reservationsService = ReservationsService(apiClient: APIClient.shared)
59− setupRefreshControl()
60− setUpContentView()
61− setupNavBar()
62− }
63−
64− override func viewDidAppear(_ animated: Bool) {
65− super.viewDidAppear(animated)
66−
67− performUpdate()
68− tabBarController?.tabBar.isHidden = false
69− }
70−
71− // MARK:- Setup
72−
73− func setupNavBar() {
74− self.navigationItem.title = "Брони"
75− navigationController?.navigationBar.prefersLargeTitles = true
76− navigationItem.rightBarButtonItem = UIBarButtonItem(barButtonSystemItem: .add, target: self, action: #selector(book))
77− }
78−
79− func setUpContentView() {
80− self.view.addSubviewThatFills(contentView)
81−
82− activityIndicator = UIActivityIndicatorView()
83− contentView.addSubviewThatFills(activityIndicator)
84− activityIndicator?.startAnimating()
85−
86− // empty
87− noReservationsView = AdminNoReservationsView.loadFromNib()
88− contentView.addSubviewThatFills(noReservationsView)
89− noReservationsView?.bookButton?.addTarget(self, action: #selector(book), for: .touchUpInside)
90−
91− noReservationsView?.alpha = 0
92−
93− // table
94− contentView.addSubviewThatFills(tableView)
95−
96− setUpTableView()
97− }
98−
99− func setUpTableView() {
100− tableView?.delegate = self
101− tableView?.dataSource = self
102−
103− tableView?.alpha = 0
104−
105− tableView?.register(AdminReservationCell.self, forCellReuseIdentifier: adminReservationCellId)
106− }
107−
108− func performUpdate() {
109−
110− guard let id = id else { return }
111−
112− reservationsService?.getAdminReservations(establishmentId: id, completion: { [weak self] (result) in
113− switch result {
114− case .success(let reservations):
115− self?.activeReservations = reservations
116− case .failure(let err):
117− self?.displayAlert(forError: err)
118− }
119− self?.refrControl?.endRefreshing()
120− })
121− }
122−
123− // MARK:- Button handler
124−
125− @objc func book() {
126− guard let establishmentId = id else { return }
127− coordinator?.book(inEstablishment: establishmentId)
128− }
129−
130− func deleteReservation(uuid: String, completion: @escaping (([ReservationWithUser]?) -> Void)) {
131− reservationsService?.deleteReservation(isAdmin: true, uuid: uuid) { result in
132− if result {
133− let newReservations = self.activeReservations.filter { $0.uuid != uuid }
134− completion(newReservations)
135− return
136− }
137−
138− completion(nil)
139− }
140− }
141−
142− // MARK: - Refresh control
143−
144− @objc func refreshData( _ ff: UIRefreshControl) {
145− performUpdate()
146− }
147−
148− func setupRefreshControl() {
149− refrControl = UIRefreshControl()
150− tableView?.refreshControl = refrControl
151− refrControl?.addTarget(self, action: #selector(refreshData(_:)), for: .valueChanged)
152− }
153−
154−}
155−
156−
157−// MARK: - Table view data source
158−
159−extension AdminReservationsController: UITableViewDelegate, UITableViewDataSource {
160−
161− func numberOfSections(in tableView: UITableView) -> Int {
162− return 1
163− }
164−
165− func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
166− return activeReservations.count
167− }
168−
169− func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
170− let cell = tableView.dequeueReusableCell(withIdentifier: adminReservationCellId, for: indexPath) as! AdminReservationCell
171−
172− cell.bind(withModel: activeReservations[indexPath.row])
173− return cell
174− }
175−
176− func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
177− let reservation = activeReservations[indexPath.row]
178− coordinator?.seeExistingReservation(data: reservation)
179− }
180−
181− // Dimesions
182−
183− func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat {
184− return UITableView.automaticDimension
185− }
186−
187− func tableView(_ tableView: UITableView, estimatedHeightForRowAt indexPath: IndexPath) -> CGFloat {
188− return 180.0
189− }
190−
191− // Update
192−
193− func tableView(_ tableView: UITableView, canEditRowAt indexPath: IndexPath) -> Bool {
194− return true
195− }
196−
197− func tableView(_ tableView: UITableView, editActionsForRowAt indexPath: IndexPath) -> [UITableViewRowAction]? {
198−
199− guard let uuid = activeReservations[indexPath.row].uuid else { return [] }
200− let cancelButton = UITableViewRowAction(style: .normal, title: "отменить бронь") { _,_ in
201−
202− self.deleteReservation(uuid: uuid) { optionalNewVal in
203− if let newval = optionalNewVal {
204− self.tableView?.beginUpdates()
205− self.tableView?.deleteRows(at: [indexPath], with: .automatic)
206− self.activeReservations = newval
207− self.tableView?.endUpdates()
208− } else {
209− self.displayAlert(with: "Не удалось удалить вашу бронь! Попробуйте еще раз!")
210− }
211− }
212− }
213−
214− cancelButton.backgroundColor = .black
215−
216− return [cancelButton]
217− }
218−
219−}
Hookah Tau/Controllers/Admin/Reservations/List of reservations/AdminReservationsCoordinator.swiftdeleted−54
@@ -1,54 +0,0 @@
1−//
2−// AdminReservationsCoordinator.swift
3−// Hookah Tau
4−//
5−// Created by cstore on 19/12/2019.
6−// Copyright © 2019 Daria Rednikina. All rights reserved.
7−//
8−
9−import UIKit
10−
11−class AdminReservationsCoordinator: BaseCoordinator {
12−
13− // MARK: - Properties
14−
15− var didFinish: (() -> Void)?
16−
17− var establishmentId: Int?
18−
19− // MARK: - Lifecycle
20−
21− override func start() {
22− let storyboard = UIStoryboard(name: "AdminReservations", bundle: nil)
23− let vc = storyboard.instantiateViewController(withIdentifier: "AdminReservationsController") as! AdminReservationsController
24− vc.id = establishmentId
25− vc.coordinator = self
26−
27− navigationController?.pushViewController(vc, animated: true)
28− }
29−
30− func seeExistingReservation(data: ReservationWithUser) {
31− let reservationCoordinator = AdminReservationEditingCoordinator(navigationController: navigationController)
32− addDependency(reservationCoordinator)
33− reservationCoordinator.reservationData = data
34− reservationCoordinator.didEndFlow = { [weak self] in
35− self?.removeDependency(reservationCoordinator)
36− self?.navigationController?.popViewController(animated: true)
37− }
38− reservationCoordinator.start()
39− }
40−
41− /// Сюда мы идем после нажатия кнопочки "Забронировать" или плюсика справа сверху
42− func book(inEstablishment establishmentId: Int) {
43− let reservationCoordinator = AdminFirstStepReservationViewCoordinator(navigationController: navigationController)
44− reservationCoordinator.establishment = establishmentId
45− addDependency(reservationCoordinator)
46− reservationCoordinator.didFinish = { [weak self] in
47− self?.navigationController?.popViewController(animated: false)
48− self?.removeDependency(reservationCoordinator)
49− self?.didFinish?()
50− }
51−
52− reservationCoordinator.start()
53− }
54−}
Hookah Tau/Controllers/Admin/Reservations/List of reservations/Cell/AdminReservationCellView.swiftdeleted−84
@@ -1,84 +0,0 @@
1−//
2−// AdminReservationCell.swift
3−// Hookah Tau
4−//
5−// Created by cstore on 19/12/2019.
6−// Copyright © 2019 Daria Rednikina. All rights reserved.
7−//
8−
9−import UIKit
10−
11−let adminReservationCellId = "AdminReservationCell"
12−
13−class AdminReservationCell: UITableViewCell {
14− // MARK: - Properties
15−
16− var reservationCellView: AdminReservationCellView?
17−
18− // MARK: - Init
19−
20− override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?)
21− {
22− super.init(style: style, reuseIdentifier: reuseIdentifier)
23−
24− reservationCellView = AdminReservationCellView.loadFromNib()
25− contentView.addSubviewThatFills(reservationCellView)
26−
27− self.selectionStyle = .none
28− }
29−
30− required init?(coder aDecoder: NSCoder)
31− {
32− fatalError("init(coder:) has not been implemented")
33− }
34−
35− // MARK: - Data
36−
37− func bind(withModel model: ReservationWithUser) {
38− reservationCellView?.bind(withModel: model)
39− }
40−}
41−
42−class AdminReservationCellView: UIView {
43−
44− // MARK:- IBAOutlets
45−
46− @IBOutlet weak var tableImage: UIImageView?
47−
48− @IBOutlet weak var guestNumber: UILabel?
49−
50− @IBOutlet weak var dateLabel: UILabel?
51−
52− @IBOutlet weak var timeLabel: UILabel?
53−
54− @IBOutlet weak var personLabel: UILabel?
55−
56− // MARK: - Lifecycle
57−
58− override func awakeFromNib() {
59− super.awakeFromNib()
60− // Initialization code
61− }
62−
63− // MARK: - bind
64−
65− func bind(withModel model: ReservationWithUser) {
66− let (date, time) = Date.format(model.startTime, model.endTime)
67−
68− dateLabel?.text = date
69− timeLabel?.text = time
70−
71− guestNumber?.text = setPeople(number: model.numberOfGuests)
72− personLabel?.text = model.owner.name ?? "❔❔❔"
73− tableImage?.image = TotalStorage.standard.getTable(establishment: model.establishment, table: model.reservedTable)?.image
74− }
75−
76− func setPeople(number: Int) -> String {
77− switch number {
78− case 2...4:
79− return "\(number) человека"
80− default:
81− return "\(number) человек"
82− }
83− }
84−}
Hookah Tau/Controllers/Admin/Reservations/List of reservations/Cell/AdminReservationCellView.xibdeleted−83
@@ -1,83 +0,0 @@
1−<?xml version="1.0" encoding="UTF-8"?>
2−<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="15702" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
3− <device id="retina4_7" orientation="portrait" appearance="light"/>
4− <dependencies>
5− <deployment identifier="iOS"/>
6− <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="15704"/>
7− <capability name="Safe area layout guides" minToolsVersion="9.0"/>
8− <capability name="Stack View standard spacing" minToolsVersion="9.0"/>
9− <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
10− </dependencies>
11− <objects>
12− <placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/>
13− <placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
14− <view contentMode="scaleToFill" id="iN0-l3-epB" customClass="AdminReservationCellView" customModule="Hookah_Tau" customModuleProvider="target">
15− <rect key="frame" x="0.0" y="0.0" width="414" height="180"/>
16− <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
17− <subviews>
18− <stackView opaque="NO" contentMode="scaleToFill" spacingType="standard" translatesAutoresizingMaskIntoConstraints="NO" id="au9-nK-XbR">
19− <rect key="frame" x="20" y="20" width="374" height="140"/>
20− <subviews>
21− <stackView opaque="NO" contentMode="scaleToFill" axis="vertical" distribution="equalSpacing" alignment="top" spacingType="standard" translatesAutoresizingMaskIntoConstraints="NO" id="rCf-m8-E3w">
22− <rect key="frame" x="0.0" y="0.0" width="248" height="140"/>
23− <subviews>
24− <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Стасик" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="KV8-UG-2ws">
25− <rect key="frame" x="0.0" y="0.0" width="54" height="19.5"/>
26− <fontDescription key="fontDescription" type="system" pointSize="16"/>
27− <color key="textColor" red="0.23529411759999999" green="0.23529411759999999" blue="0.26274509800000001" alpha="0.59999999999999998" colorSpace="custom" customColorSpace="calibratedRGB"/>
28− <nil key="highlightedColor"/>
29− </label>
30− <stackView opaque="NO" contentMode="scaleToFill" axis="vertical" alignment="top" spacing="4" translatesAutoresizingMaskIntoConstraints="NO" id="nsQ-SE-3vW">
31− <rect key="frame" x="0.0" y="47" width="102" height="45"/>
32− <subviews>
33− <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="27 марта" textAlignment="natural" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="9k3-E5-XKR">
34− <rect key="frame" x="0.0" y="0.0" width="76.5" height="20.5"/>
35− <fontDescription key="fontDescription" type="boldSystem" pointSize="17"/>
36− <color key="textColor" cocoaTouchSystemColor="darkTextColor"/>
37− <nil key="highlightedColor"/>
38− </label>
39− <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="3:00 — 5:30" textAlignment="natural" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="IdW-5d-DS0">
40− <rect key="frame" x="0.0" y="24.5" width="102" height="20.5"/>
41− <fontDescription key="fontDescription" type="boldSystem" pointSize="17"/>
42− <color key="textColor" cocoaTouchSystemColor="darkTextColor"/>
43− <nil key="highlightedColor"/>
44− </label>
45− </subviews>
46− </stackView>
47− <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="3 человека" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="VhL-qH-zM9">
48− <rect key="frame" x="0.0" y="119.5" width="89" height="20.5"/>
49− <fontDescription key="fontDescription" type="system" pointSize="17"/>
50− <nil key="textColor"/>
51− <nil key="highlightedColor"/>
52− </label>
53− </subviews>
54− </stackView>
55− <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="1_7" translatesAutoresizingMaskIntoConstraints="NO" id="Oa6-n7-joV">
56− <rect key="frame" x="256" y="0.0" width="118" height="140"/>
57− </imageView>
58− </subviews>
59− </stackView>
60− </subviews>
61− <color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
62− <constraints>
63− <constraint firstItem="vUN-kp-3ea" firstAttribute="trailing" secondItem="au9-nK-XbR" secondAttribute="trailing" constant="20" id="Afx-VC-Cb6"/>
64− <constraint firstItem="au9-nK-XbR" firstAttribute="top" secondItem="vUN-kp-3ea" secondAttribute="top" constant="20" id="P5E-WG-AYe"/>
65− <constraint firstItem="au9-nK-XbR" firstAttribute="bottom" secondItem="vUN-kp-3ea" secondAttribute="bottom" constant="-20" id="Z6h-RB-tvj"/>
66− <constraint firstItem="au9-nK-XbR" firstAttribute="leading" secondItem="vUN-kp-3ea" secondAttribute="leading" constant="20" id="fJE-La-qC6"/>
67− </constraints>
68− <freeformSimulatedSizeMetrics key="simulatedDestinationMetrics"/>
69− <viewLayoutGuide key="safeArea" id="vUN-kp-3ea"/>
70− <connections>
71− <outlet property="dateLabel" destination="9k3-E5-XKR" id="wBe-yq-PN9"/>
72− <outlet property="guestNumber" destination="VhL-qH-zM9" id="Ent-pM-uER"/>
73− <outlet property="personLabel" destination="KV8-UG-2ws" id="eYB-qn-fJL"/>
74− <outlet property="tableImage" destination="Oa6-n7-joV" id="cyD-bY-OpP"/>
75− <outlet property="timeLabel" destination="IdW-5d-DS0" id="ddO-Dx-LDK"/>
76− </connections>
77− <point key="canvasLocation" x="137.59999999999999" y="90.854572713643179"/>
78− </view>
79− </objects>
80− <resources>
81− <image name="1_7" width="118" height="133"/>
82− </resources>
83−</document>
Hookah Tau/Controllers/Admin/Reservations/Making a reeservation/1/AdminFirstStepReservationViewCoordinator.swiftdeleted−108
@@ -1,108 +0,0 @@
1−//
2−// AdminFirstStepReservationViewCoordinator.swift
3−// Hookah Tau
4−//
5−// Created by cstore on 13/01/2020.
6−// Copyright © 2020 Daria Rednikina. All rights reserved.
7−//
8−
9−import UIKit
10−
11−enum UserType {
12− case admin
13− case client
14−}
15−
16−protocol FirstStepReservationProtocol: BaseCoordinator {
17−
18− var user: UserType { get }
19−
20− func makeReservation(model: SecondStepModel, mapView: MapImageScroll?)
21−}
22−
23−class AdminFirstStepReservationViewCoordinator: BaseCoordinator{
24−
25− // MARK: - Properties
26−
27− var didFinish: (() -> Void)?
28−
29− var establishment: Int = 1
30−
31− var phone: String?
32−
33− var fullUser: FullUser?
34−
35− var model: SecondStepModel?
36−
37− // MARK: - Lifecycle
38−
39− override func start() {
40− let storyboard = UIStoryboard(name: "Reservation", bundle: nil)
41− let reservationVC = storyboard.instantiateViewController(withIdentifier: "ReservationViewController") as! FirstStepReservationViewController
42−
43− reservationVC.coordinator = self
44− reservationVC.establishmentId = establishment
45−
46− navigationController?.pushViewController(reservationVC, animated: true)
47− }
48−
49−
50−}
51−
52−extension AdminFirstStepReservationViewCoordinator: FirstStepReservationProtocol {
53−
54− var user: UserType {
55− get {
56− return .admin
57− }
58− }
59−
60− func makeReservation(model: SecondStepModel, mapView: MapImageScroll?) {
61− self.model = model
62−
63− if let p = phone {
64− goToFinalStep(with: fullUser, phone: p)
65− } else {
66− goToSecondStep(model: model, mapView: mapView)
67− }
68− }
69−
70− func goToFinalStep(with user: FullUser?, phone phoneNumber: String) {
71− let finalStepCoordinator = AdminFinalStepReservationCoordinator(navigationController: navigationController)
72− finalStepCoordinator.model = self.model
73−
74− addDependency(finalStepCoordinator)
75− finalStepCoordinator.didFinish = { [weak self] in
76− self?.navigationController?.popViewController(animated: false)
77− self?.removeDependency(finalStepCoordinator)
78− self?.didFinish?()
79− }
80−
81− if let u = user {
82− finalStepCoordinator.user = u
83− } else {
84− finalStepCoordinator.user = FullUser(uuid: nil,
85− name: nil,
86− phoneNumber: phoneNumber,
87− isAdmin: true)
88− }
89−
90− finalStepCoordinator.start()
91− }
92−
93− func goToSecondStep(model: SecondStepModel, mapView: MapImageScroll?) {
94− let reservationCoordinaotor = AdminSecondStepReservationViewCoordinator(navigationController: navigationController)
95− reservationCoordinaotor.model = model
96− reservationCoordinaotor.map = mapView
97−
98− addDependency(reservationCoordinaotor)
99− reservationCoordinaotor.didFinish = { [weak self] in
100− self?.navigationController?.popViewController(animated: false)
101− self?.removeDependency(reservationCoordinaotor)
102− self?.didFinish?()
103− }
104−
105− reservationCoordinaotor.start()
106− }
107−}
108−
Hookah Tau/Controllers/Admin/Reservations/Making a reeservation/2/AdminSecondStepReservationViewController.swiftdeleted−124
@@ -1,124 +0,0 @@
1−//
2−// AdminSecondStepReservationViewController.swift
3−// Hookah Tau
4−//
5−// Created by cstore on 13/01/2020.
6−// Copyright © 2020 Daria Rednikina. All rights reserved.
7−//
8−
9−import UIKit
10−
11−class AdminSecondStepReservationViewController: BaseViewController {
12−
13− // MARK: - IBAOutlets
14−
15− @IBOutlet weak var mapContainerView: UIView!
16−
17− @IBOutlet weak var heightConstraint: NSLayoutConstraint!
18−
19− @IBOutlet weak var phoneTextField: PhoneTextField!
20−
21− @IBOutlet weak var phoneContentView: UIView!
22−
23− // MARK: - Properties
24−
25− var table: Int?
26−
27− var mapScrollView: MapImageScroll?
28−
29− var clientsService: ClientsService?
30−
31− weak var coordinator: AdminSecondStepReservationViewCoordinator?
32−
33− let continueButton: Button = {
34− let button = Button()
35− let style = BlackButtonStyle()
36− style.apply(to: button, withTitle: "ДАЛЕЕ")
37− return button
38− }()
39−
40− let cancelButton: Button = {
41− let button = Button()
42− let style = BlackButtonStyle()
43− style.apply(to: button, withTitle: "ОТМЕНИТЬ")
44− return button
45− }()
46−
47− // MARK: - Lifecycle
48−
49− override func viewDidLoad() {
50− super.viewDidLoad()
51−
52− setupMap()
53− setupButtons()
54− setUpKeyboard()
55−
56− clientsService = ClientsService(apiClient: APIClient.shared)
57− phoneTextField.becomeFirstResponder()
58− }
59−
60− // MARK: - Set up
61−
62− func setupMap() {
63− guard let t = table else { return }
64− mapScrollView?.scrollToTable(table: t)
65− mapContainerView.addSubviewThatFills(mapScrollView)
66− }
67−
68− func setupButtons() {
69− addStackViewWithButtons(leftBtn: cancelButton,
70− rightBtn: continueButton,
71− constant: -phoneContentView.frame.height - 20)
72−
73− cancelButton.addTarget(self, action: #selector(cancel), for: .touchUpInside)
74− continueButton.addTarget(self, action: #selector(continueBooking), for: .touchUpInside)
75− }
76−
77− // MARK: - Keyboad
78−
79− @objc
80− override func handleKeyboardNotifications(notification: NSNotification) {
81− if let userInfo = notification.userInfo {
82− let keyBoardFrame = (userInfo[UIResponder.keyboardFrameEndUserInfoKey] as! NSValue).cgRectValue
83− heightConstraint?.constant = notification.name == UIResponder.keyboardWillShowNotification ? keyBoardFrame.height + view.safeAreaInsets.bottom + 120.5 : 120.5
84− bottomConstraint?.constant = notification.name == UIResponder.keyboardWillShowNotification ? -keyBoardFrame.height + view.safeAreaInsets.bottom - 140.5 : -140.5
85−
86− UIView.animate(withDuration: 0, delay: 0, options: .curveEaseOut, animations: {
87− self.view.layoutIfNeeded()
88− })
89− }
90− }
91−
92− // MARK: - Button handlers
93−
94− @objc func cancel() {
95− coordinator?.didEndFlow?()
96− }
97−
98− @objc func continueBooking() {
99− continueButton.loading = true
100−
101− guard let phone = phoneTextField.text?.toApiPhoneNumberFormat(), phone.count == 9 else {
102− displayAlert(with: "Сначала укажи номер!")
103− return
104− }
105−
106− clientsService?.getClientByPhoneNumber(userPhone: phone, completion: { [unowned self] (res) in
107− switch res {
108− case .failure(let err):
109− switch err {
110− case .notFound:
111− self.coordinator?.continueReservation(with: nil, phone: phone)
112− default:
113− self.displayAlert(with: "Что-то пошло не так! Попробуй еще раз :)")
114− }
115− case .success(let user):
116− self.coordinator?.continueReservation(with: user, phone: phone)
117− }
118−
119− self.continueButton.loading = false
120− })
121− }
122−
123−
124−}
Hookah Tau/Controllers/Admin/Reservations/Making a reeservation/2/AdminSecondStepReservationViewCoordinator.swiftdeleted−54
@@ -1,54 +0,0 @@
1−//
2−// AdminSecondStepReservationViewCoordinator.swift
3−// Hookah Tau
4−//
5−// Created by cstore on 13/01/2020.
6−// Copyright © 2020 Daria Rednikina. All rights reserved.
7−//
8−
9−import UIKit
10−
11−class AdminSecondStepReservationViewCoordinator: BaseCoordinator {
12−
13− // MARK: - Properties
14−
15− var didFinish: (() -> Void)?
16−
17− var map: MapImageScroll?
18−
19− var model: SecondStepModel?
20−
21− // MARK: - Lifecycle
22−
23− override func start() {
24− let storyboard = UIStoryboard(name: "AdminReservations", bundle: nil)
25− let reservationVC = storyboard.instantiateViewController(withIdentifier: "AdminSecondStepReservationViewController") as! AdminSecondStepReservationViewController
26− reservationVC.mapScrollView = map
27− reservationVC.table = model?.table
28− reservationVC.coordinator = self
29− navigationController?.pushViewController(reservationVC, animated: true)
30− }
31−
32− func continueReservation(with user: FullUser?, phone phoneNumber: String) {
33− let finalStepCoordinator = AdminFinalStepReservationCoordinator(navigationController: navigationController)
34− finalStepCoordinator.model = self.model
35−
36− addDependency(finalStepCoordinator)
37− finalStepCoordinator.didFinish = { [weak self] in
38− self?.navigationController?.popViewController(animated: false)
39− self?.removeDependency(finalStepCoordinator)
40− self?.didFinish?()
41− }
42−
43− if let u = user {
44− finalStepCoordinator.user = u
45− } else {
46− finalStepCoordinator.user = FullUser(uuid: nil,
47− name: nil,
48− phoneNumber: phoneNumber,
49− isAdmin: true)
50− }
51−
52− finalStepCoordinator.start()
53− }
54−}
Hookah Tau/Controllers/Admin/Reservations/Making a reeservation/3/AdminFinalStepReservationCoordinator.swiftdeleted−47
@@ -1,47 +0,0 @@
1−//
2−// AdminFinalStepReservationCoordinator.swift
3−// Hookah Tau
4−//
5−// Created by cstore on 14/01/2020.
6−// Copyright © 2020 Daria Rednikina. All rights reserved.
7−//
8−
9−import UIKit
10−
11−protocol ShowReservationCoordinator: BaseCoordinator {
12− var didFinish: (() -> Void)? { get }
13−}
14−
15−class AdminFinalStepReservationCoordinator: BaseCoordinator, ShowReservationCoordinator {
16−
17− // MARK: - Properties
18−
19− var didFinish: (() -> Void)?
20−
21− var user: FullUser?
22−
23− var model: SecondStepModel?
24−
25− // MARK: - Lifecycle
26−
27− override func start() {
28− let storyboard = UIStoryboard(name: "AdminReservations", bundle: nil)
29− let vc = storyboard.instantiateViewController(withIdentifier: "AdminReservationEditingViewController") as! AdminReservationEditingViewController
30−
31− guard
32− let model = model,
33− let u = user else { return }
34− vc.reservationData = ReservationWithUser(uuid: nil,
35− establishment: model.establishment,
36− startTime: model.startTime,
37− endTime: model.startTime.addHours(2),
38− numberOfGuests: 2,
39− reservedTable: model.table,
40− owner: u)
41−
42− vc.reservedPeriods = model.reservedintervals
43− vc.coordinator = self
44−
45− navigationController?.pushViewController(vc, animated: true)
46− }
47−}
Hookah Tau/Controllers/Admin/Reservations/Views/AdminReservationView.swiftdeleted−371
@@ -1,371 +0,0 @@
1−//
2−// AdminReservationView.swift
3−// Hookah Tau
4−//
5−// Created by cstore on 19/12/2019.
6−// Copyright © 2019 Daria Rednikina. All rights reserved.
7−//
8−
9−import UIKit
10−
11−class AdminReservationView: UIView {
12−
13− // MARK:- IBAOutlets
14−
15− @IBOutlet weak var tableLabel: UILabel?
16−
17− @IBOutlet weak var dateLabel: UILabel?
18−
19− @IBOutlet weak var timeLabel: UILabel?
20−
21− @IBOutlet weak var cancelButton: Button? {
22− didSet {
23− let style = BlackButtonStyle()
24− style.apply(to: cancelButton, withTitle: "ОТМЕНИТЬ")
25− }
26− }
27−
28− @IBOutlet weak var nameLabel: UILabel?
29−
30− @IBOutlet weak var callButton: Button?
31−
32− @IBOutlet weak var numberOfGuestLabel: UILabel?
33−
34− @IBOutlet weak var guestSlider: UISlider?
35−
36− @IBOutlet weak var intervalsContainerView: UIView?
37−
38− @IBOutlet weak var scrollView: UIScrollView!
39−
40− @IBOutlet weak var intervalsStackView: UIStackView!
41−
42− @IBOutlet weak var saveButton: Button? {
43− didSet {
44− let style = BlackButtonStyle()
45− style.apply(to: saveButton, withTitle: "СОХРАНИТЬ")
46− }
47− }
48−
49− // MARK: - Properties
50−
51− // констрейнты начала и конца интервала
52− var startLeadingConstraint: NSLayoutConstraint!
53− var endLeadingConstraint: NSLayoutConstraint!
54−
55− var startPoint: UIImageView = {
56− var view = UIImageView()
57− view.isUserInteractionEnabled = true
58− view.image = #imageLiteral(resourceName: "handle_left")
59− view.translatesAutoresizingMaskIntoConstraints = false
60− return view
61− }()
62−
63− var endPoint: UIImageView = {
64− var view = UIImageView()
65− view.isUserInteractionEnabled = true
66− view.image = #imageLiteral(resourceName: "Group")
67− view.translatesAutoresizingMaskIntoConstraints = false
68− return view
69− }()
70−
71− /// Интервал
72− var fillInterval: UIView = {
73− var view = UIView()
74− view.backgroundColor = #colorLiteral(red: 0, green: 0.5921568627, blue: 1, alpha: 0.3426262843)
75− view.translatesAutoresizingMaskIntoConstraints = false
76− return view
77− }()
78−
79− /// Время начала вертелки.
80− /// Для клиента это 12:00 смены (надо вызвать метод для получения текущей смены).
81− /// Для администратора это `t` - 24h
82− var startDate: Date?
83−
84− // MARK:- Properties
85−
86− var intervalPickerView: IntervalPickerView?
87−
88− /// Модель вьюшки.
89− /// Обновляем каждый раз когда меняется время и дата
90− var data: ReservationData?
91−
92− var model: ReservationWithUser?
93−
94− // MARK: - Setup
95−
96− func bind(withModel model: ReservationWithUser) {
97− let style = BlackButtonStyle()
98− style.apply(to: callButton, withTitle: model.owner.phoneNumber.formattedNumber())
99−
100−
101− let (date, time) = Date.format(model.startTime, model.endTime)
102− dateLabel?.text = date
103− timeLabel?.text = time
104−
105− tableLabel?.text = "\(model.reservedTable) столик"
106− nameLabel?.text = "\(model.owner.name ?? "❔")"
107−
108− data = ReservationData(establishment: model.establishment,
109− startTime: model.startTime,
110− endTime: model.endTime,
111− numberOfGuests: model.numberOfGuests,
112− reservedTable: model.reservedTable)
113− self.model = model
114−
115− let (start, _) = model.owner.isAdmin ? model.startTime.getAdminStartingAndEndPoint() : model.startTime.getClientStartingAndEndPoint()
116−
117− startDate = start
118−
119− setUpIntervals()
120−
121− guestSlider?.maximumValue = Float((TotalStorage.standard.getTable(establishment: model.establishment, table: model.reservedTable)?.maxGuestNumber ?? 2) + 1)
122− }
123−
124− func bind(withIntervals intervals: [ReservationPeriod]) {
125− guard
126− let data = data,
127− let isAdmin = model?.owner.isAdmin
128− else { return }
129−
130− setUpReservedIntervals(intervals, isAdmin)
131− setUpBookingPeriod(data.startTime, data.endTime)
132− }
133−
134− func updateDateAndTime(withData d: ReservationData?) {
135− guard let d = d else { return }
136− let (date, time) = Date.format(d.startTime, d.endTime)
137−
138− dateLabel?.text = date
139− timeLabel?.text = time
140− }
141−
142− @IBAction func valueChanged(_ sender: UISlider) {
143− let value = Int(sender.value)
144−
145− if sender.value == sender.maximumValue {
146− numberOfGuestLabel?.text = "Количество гостей: \(Int(value) - 1)+"
147− } else {
148− numberOfGuestLabel?.text = "Количество гостей: \(value)"
149− }
150−
151− guard let d = data else { return }
152−
153− data = ReservationData(establishment: d.establishment,
154− startTime: d.startTime,
155− endTime: d.endTime,
156− numberOfGuests: value,
157− reservedTable: d.reservedTable)
158− }
159−
160−
161− func getNumberOfCalians(_ sliderValue: Int) -> String {
162− return "Минимальное количество кальянов: \(sliderValue > 6 ? 2 : 1)"
163− }
164−
165− // MARK: - Setup
166−
167− /// Тут происходит установка интервалов. Разное для клиента и админа
168− func setUpIntervals() {
169− guard let startPoint = startDate else { return }
170−
171− let startingPoint = startPoint.getAdminsStartingPoint()
172− let endingPoint = Constants.adminDuration
173−
174− for period in startingPoint...endingPoint {
175− let timePointView = TimePointView.loadFromNib()
176− timePointView?.setUp(withTimePoint: period)
177− let view = UIView(frame: CGRect(x: 0, y: 0, width: 35, height: 106))
178− view.addSubviewThatFills(timePointView)
179− intervalsStackView.addArrangedSubview(view)
180− }
181− }
182−
183−
184− private func setUpBookingPeriod(_ startTime: Date, _ endTime: Date? = nil) {
185− self.scrollView.addSubview(startPoint)
186− self.scrollView.addSubview(endPoint)
187− self.scrollView.addSubview(fillInterval)
188−
189− guard let startDate = startDate else { return }
190−
191− let startConstr = CGFloat(startTime.getMinutesPeriods(fromStart: startDate) * Constants.widthTimePoint)
192−
193− scrollView.setContentOffset(CGPoint(x: startConstr - 50, y: 0), animated: true)
194−
195− startLeadingConstraint = startPoint.leftAnchor.constraint(equalTo: scrollView.leftAnchor,
196− constant: startConstr)
197−
198− if let end = endTime {
199− let endConstr = CGFloat(end.getMinutesPeriods(fromStart: startDate) * Constants.widthTimePoint)
200− endLeadingConstraint = endPoint.leftAnchor.constraint(equalTo: scrollView.leftAnchor,
201− constant: endConstr)
202− } else {
203− endLeadingConstraint = endPoint.leftAnchor.constraint(equalTo: scrollView.leftAnchor,
204− constant:startConstr + Constants.minBookingLength)
205− }
206−
207− NSLayoutConstraint.activate([
208−
209− startPoint.bottomAnchor.constraint(equalTo: scrollView.bottomAnchor, constant: 0),
210− endPoint.bottomAnchor.constraint(equalTo: scrollView.bottomAnchor, constant: 0),
211−
212− startPoint.widthAnchor.constraint(equalToConstant: Constants.pointWidth),
213− endPoint.widthAnchor.constraint(equalToConstant: Constants.pointWidth),
214−
215− startPoint.heightAnchor.constraint(equalToConstant: Constants.pointHeight),
216− endPoint.heightAnchor.constraint(equalToConstant: Constants.pointHeight),
217−
218− startLeadingConstraint,
219− endLeadingConstraint,
220−
221− fillInterval.leftAnchor.constraint(equalTo: startPoint.rightAnchor, constant: 0),
222− fillInterval.rightAnchor.constraint(equalTo: endPoint.leftAnchor, constant: 0),
223−
224− fillInterval.heightAnchor.constraint(equalToConstant: Constants.pointHeight),
225− fillInterval.bottomAnchor.constraint(equalTo: scrollView.bottomAnchor, constant: 0)
226− ])
227−
228− let scrollViewPanStartGesture = UIPanGestureRecognizer(target: self, action: #selector(handlePanStart(recognizer:)))
229− startPoint.addGestureRecognizer(scrollViewPanStartGesture)
230−
231− let scrollViewPanEndGesture = UIPanGestureRecognizer(target: self, action: #selector(handlePanEnd(recognizer:)))
232− endPoint.addGestureRecognizer(scrollViewPanEndGesture)
233− }
234−
235− func setUpReservedIntervals(_ reservations: [ReservationPeriod], _ isAdmin: Bool) {
236−
237− for reservation in reservations {
238− let uiview = UIView(frame: CGRect(x: 0, y: 0, width: Constants.widthTimePoint * reservation.duration, height: Constants.heightIntervals))
239− uiview.backgroundColor = #colorLiteral(red: 0.8039215803, green: 0.8039215803, blue: 0.8039215803, alpha: 0.5)
240−
241−
242− uiview.translatesAutoresizingMaskIntoConstraints = false
243− scrollView.addSubview(uiview)
244−
245− guard let startDate = startDate else { return }
246−
247− let s = reservation.startTime.getMinutesPeriods(fromStart: startDate) * Constants.widthTimePoint
248− let d = reservation.duration * Constants.widthTimePoint
249−
250− let startTime = s < 0 ? 0 : s
251−
252− let total = (isAdmin ? Constants.adminDuration : Constants.clientDuration) * Constants.widthTimePoint
253− var duration = 0
254− if s < 0 {
255− duration = reservation.endTime.getMinutesPeriods(fromStart: startDate) * Constants.widthTimePoint
256− } else {
257− duration = (s + d) > total ? total - s : d
258− }
259−
260− NSLayoutConstraint.activate([
261− uiview.bottomAnchor.constraint(equalToSystemSpacingBelow: scrollView.bottomAnchor, multiplier: 0),
262− uiview.leftAnchor.constraint(equalTo: scrollView.leftAnchor,
263− constant: CGFloat(Constants.widthTimePoint / 2 + startTime)),
264− uiview.widthAnchor.constraint(equalToConstant: CGFloat(duration)),
265− uiview.heightAnchor.constraint(equalToConstant: CGFloat(Constants.heightIntervals))
266− ])
267− }
268− }
269−
270− // MARK: - Pan
271−
272− @objc func handlePanStart(recognizer:UIPanGestureRecognizer) {
273−
274− let translation = recognizer.translation(in: self.intervalsStackView)
275− let duration = abs(startLeadingConstraint.constant + translation.x - endLeadingConstraint.constant)
276−
277− if let view = recognizer.view, duration >= Constants.minBookingLength {
278− startLeadingConstraint.constant += translation.x
279−
280− changeTime(startLeadingConstraint, .start)
281−
282− view.setNeedsUpdateConstraints()
283− }
284−
285− recognizer.setTranslation(CGPoint.zero, in: self.intervalsStackView)
286− }
287−
288− @objc func handlePanEnd(recognizer:UIPanGestureRecognizer) {
289−
290− let translation = recognizer.translation(in: self.intervalsStackView)
291− let duration = abs(startLeadingConstraint.constant - (endLeadingConstraint.constant + translation.x))
292−
293− if let view = recognizer.view, duration >= Constants.minBookingLength {
294− endLeadingConstraint.constant += translation.x
295−
296− changeTime(endLeadingConstraint, .end)
297− view.setNeedsUpdateConstraints()
298− }
299−
300− recognizer.setTranslation(CGPoint.zero, in: self.intervalsStackView)
301− }
302−
303− func changeTime(_ constraint: NSLayoutConstraint, _ period: Period) {
304− guard let startDate = startDate, let d = data else { return }
305−
306− let offset = Int(constraint.constant) % Constants.widthTimePoint
307−
308− if offset == 0 {
309− let p = Int(constraint.constant) / Constants.widthTimePoint
310− let time = startDate.addPeriods(p)
311−
312− switch period {
313− case .start:
314− data = ReservationData(establishment: d.establishment,
315− startTime: time,
316− endTime: d.endTime,
317− numberOfGuests: d.numberOfGuests,
318− reservedTable: d.reservedTable)
319− case .end:
320− data = ReservationData(establishment: d.establishment,
321− startTime: d.startTime,
322− endTime: time,
323− numberOfGuests: d.numberOfGuests,
324− reservedTable: d.reservedTable)
325− }
326−
327− updateDateAndTime(withData: data)
328− }
329− }
330−}
331−
332−// MARK: - Nested types
333−
334−extension AdminReservationView {
335− enum Constants {
336− static let widthTimePoint = 11
337−
338− static let adminDuration = 288
339− static let clientDuration = 90
340− // 12:00 = 12 * 6
341− static let clientStartingPoint = 72
342−
343− static let pointWidth: CGFloat = 19
344− static let pointHeight: CGFloat = 85
345−
346− static let minBookingLength: CGFloat = 132
347−
348− static let heightIntervals = 85
349− }
350−
351− enum Period {
352− case start
353− case end
354− }
355−}
356−
357−
358−extension AdminReservationView: PickerViewUpdater {
359−
360− func update(withModel model: IntervalPickerModel) {
361− guard let d = data else { return }
362−
363− data = ReservationData(establishment: d.establishment,
364− startTime: model.startTime,
365− endTime: model.endTime,
366− numberOfGuests: d.numberOfGuests,
367− reservedTable: d.reservedTable)
368−
369− updateDateAndTime(withData: data)
370− }
371−}
Hookah Tau/Controllers/Admin/Reservations/Views/AdminReservationView.xibdeleted−223
@@ -1,223 +0,0 @@
1−<?xml version="1.0" encoding="UTF-8"?>
2−<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="15702" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
3− <device id="retina4_7" orientation="portrait" appearance="light"/>
4− <dependencies>
5− <deployment identifier="iOS"/>
6− <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="15704"/>
7− <capability name="Safe area layout guides" minToolsVersion="9.0"/>
8− <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
9− </dependencies>
10− <objects>
11− <placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/>
12− <placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
13− <view contentMode="scaleToFill" id="iN0-l3-epB" customClass="AdminReservationView" customModule="Hookah_Tau" customModuleProvider="target">
14− <rect key="frame" x="0.0" y="0.0" width="414" height="385"/>
15− <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
16− <subviews>
17− <stackView opaque="NO" contentMode="scaleToFill" axis="vertical" alignment="center" spacing="24" translatesAutoresizingMaskIntoConstraints="NO" id="AEf-R4-K1F">
18− <rect key="frame" x="0.0" y="16" width="414" height="349"/>
19− <subviews>
20− <stackView opaque="NO" contentMode="scaleToFill" alignment="top" spacing="4" translatesAutoresizingMaskIntoConstraints="NO" id="oh7-ka-ctS">
21− <rect key="frame" x="21" y="0.0" width="372" height="136.5"/>
22− <subviews>
23− <stackView opaque="NO" contentMode="scaleToFill" axis="vertical" alignment="top" spacing="22" translatesAutoresizingMaskIntoConstraints="NO" id="IY6-F4-aln">
24− <rect key="frame" x="0.0" y="0.0" width="129" height="136.5"/>
25− <subviews>
26− <stackView opaque="NO" contentMode="scaleToFill" axis="vertical" alignment="top" spacing="5" translatesAutoresizingMaskIntoConstraints="NO" id="hEV-kW-bBH">
27− <rect key="frame" x="0.0" y="0.0" width="129" height="77.5"/>
28− <subviews>
29− <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="7 столик" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="qNR-EO-oMK">
30− <rect key="frame" x="0.0" y="0.0" width="93" height="26.5"/>
31− <fontDescription key="fontDescription" type="boldSystem" pointSize="22"/>
32− <nil key="textColor"/>
33− <nil key="highlightedColor"/>
34− </label>
35− <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="29 марта" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="KHM-Yj-bBa">
36− <rect key="frame" x="0.0" y="31.5" width="78" height="20.5"/>
37− <fontDescription key="fontDescription" type="boldSystem" pointSize="17"/>
38− <nil key="textColor"/>
39− <nil key="highlightedColor"/>
40− </label>
41− <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="3:00 — 5:00ffff" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="gau-aS-vtT">
42− <rect key="frame" x="0.0" y="57" width="129" height="20.5"/>
43− <fontDescription key="fontDescription" type="boldSystem" pointSize="17"/>
44− <nil key="textColor"/>
45− <nil key="highlightedColor"/>
46− </label>
47− </subviews>
48− <constraints>
49− <constraint firstAttribute="trailing" secondItem="gau-aS-vtT" secondAttribute="trailing" id="OYu-7e-8pX"/>
50− <constraint firstItem="gau-aS-vtT" firstAttribute="leading" secondItem="hEV-kW-bBH" secondAttribute="leading" id="egK-i8-r2N"/>
51− </constraints>
52− </stackView>
53− <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="iiD-uf-IDp" customClass="Button" customModule="Hookah_Tau" customModuleProvider="target">
54− <rect key="frame" x="0.0" y="99.5" width="109" height="37"/>
55− <color key="backgroundColor" white="0.66666666669999997" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
56− <constraints>
57− <constraint firstAttribute="width" constant="109" id="11r-IB-3r0"/>
58− <constraint firstAttribute="height" constant="37" id="aej-Xt-jCJ"/>
59− </constraints>
60− <state key="normal" title="Button"/>
61− </button>
62− </subviews>
63− <constraints>
64− <constraint firstAttribute="trailing" secondItem="hEV-kW-bBH" secondAttribute="trailing" id="7MI-YT-uHi"/>
65− <constraint firstAttribute="width" constant="129" id="BQh-sd-jbL"/>
66− <constraint firstItem="hEV-kW-bBH" firstAttribute="leading" secondItem="IY6-F4-aln" secondAttribute="leading" id="tsb-PN-YGB"/>
67− </constraints>
68− </stackView>
69− <stackView opaque="NO" contentMode="scaleToFill" axis="vertical" distribution="equalSpacing" alignment="bottom" spacing="28" translatesAutoresizingMaskIntoConstraints="NO" id="Kjb-P4-v2B">
70− <rect key="frame" x="133" y="0.0" width="239" height="136.5"/>
71− <subviews>
72− <stackView opaque="NO" contentMode="scaleToFill" axis="vertical" alignment="bottom" spacing="8" translatesAutoresizingMaskIntoConstraints="NO" id="59c-nG-5Fh">
73− <rect key="frame" x="65" y="0.0" width="174" height="71.5"/>
74− <subviews>
75− <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Стасик" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="OoG-F4-OVu">
76− <rect key="frame" x="95.5" y="0.0" width="78.5" height="26.5"/>
77− <fontDescription key="fontDescription" type="boldSystem" pointSize="22"/>
78− <nil key="textColor"/>
79− <nil key="highlightedColor"/>
80− </label>
81− <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="Xkd-xQ-cFd" customClass="Button" customModule="Hookah_Tau" customModuleProvider="target">
82− <rect key="frame" x="0.0" y="34.5" width="174" height="37"/>
83− <color key="backgroundColor" white="0.66666666669999997" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
84− <constraints>
85− <constraint firstAttribute="height" constant="37" id="7Wj-WF-xzD"/>
86− <constraint firstAttribute="width" constant="174" id="ZYo-ko-rwn"/>
87− </constraints>
88− <state key="normal" title="Button"/>
89− </button>
90− </subviews>
91− </stackView>
92− <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="npC-AF-3pj" customClass="Button" customModule="Hookah_Tau" customModuleProvider="target">
93− <rect key="frame" x="103" y="99.5" width="136" height="37"/>
94− <color key="backgroundColor" white="0.66666666669999997" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
95− <constraints>
96− <constraint firstAttribute="width" constant="136" id="jg5-lP-Ekd"/>
97− <constraint firstAttribute="height" constant="37" id="w98-8a-pmH"/>
98− </constraints>
99− <state key="normal" title="Button"/>
100− </button>
101− </subviews>
102− </stackView>
103− </subviews>
104− </stackView>
105− <stackView opaque="NO" contentMode="scaleToFill" axis="vertical" spacing="8" translatesAutoresizingMaskIntoConstraints="NO" id="9RO-aK-yNh">
106− <rect key="frame" x="21" y="160.5" width="372" height="58.5"/>
107− <subviews>
108− <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Количество гостей: 2" textAlignment="natural" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="yTM-U5-XjI">
109− <rect key="frame" x="0.0" y="0.0" width="372" height="20.5"/>
110− <fontDescription key="fontDescription" type="boldSystem" pointSize="17"/>
111− <nil key="textColor"/>
112− <nil key="highlightedColor"/>
113− </label>
114− <slider opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" value="2" minValue="1" maxValue="8" translatesAutoresizingMaskIntoConstraints="NO" id="Lqw-9Z-34d">
115− <rect key="frame" x="-2" y="28.5" width="376" height="31"/>
116− <connections>
117− <action selector="valueChanged:" destination="iN0-l3-epB" eventType="valueChanged" id="OwE-Nq-PHY"/>
118− </connections>
119− </slider>
120− </subviews>
121− </stackView>
122− <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="vKS-ia-RxW">
123− <rect key="frame" x="0.0" y="243" width="414" height="106"/>
124− <subviews>
125− <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="EiP-QO-PbU">
126− <rect key="frame" x="0.0" y="20" width="414" height="85"/>
127− <subviews>
128− <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="OpX-io-LgH">
129− <rect key="frame" x="0.0" y="0.0" width="414" height="1"/>
130− <color key="backgroundColor" white="0.66666666666666663" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
131− <constraints>
132− <constraint firstAttribute="height" constant="1" id="k2D-mj-31b"/>
133− </constraints>
134− </view>
135− <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="fOe-cM-riJ">
136− <rect key="frame" x="0.0" y="84" width="414" height="1"/>
137− <color key="backgroundColor" white="0.66666666666666663" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
138− <constraints>
139− <constraint firstAttribute="height" constant="1" id="A2B-su-3Hi"/>
140− </constraints>
141− </view>
142− </subviews>
143− <color key="backgroundColor" red="0.8901960784313725" green="0.8901960784313725" blue="0.8901960784313725" alpha="0.6951519692" colorSpace="calibratedRGB"/>
144− <constraints>
145− <constraint firstItem="OpX-io-LgH" firstAttribute="top" secondItem="EiP-QO-PbU" secondAttribute="top" id="73d-6U-4Jc"/>
146− <constraint firstAttribute="height" constant="85" id="JMc-tA-wHe"/>
147− <constraint firstAttribute="trailing" secondItem="fOe-cM-riJ" secondAttribute="trailing" id="JVQ-ub-pEy"/>
148− <constraint firstItem="OpX-io-LgH" firstAttribute="leading" secondItem="EiP-QO-PbU" secondAttribute="leading" id="hBd-hJ-yz7"/>
149− <constraint firstAttribute="bottom" secondItem="fOe-cM-riJ" secondAttribute="bottom" id="im0-y1-nC8"/>
150− <constraint firstItem="fOe-cM-riJ" firstAttribute="leading" secondItem="EiP-QO-PbU" secondAttribute="leading" id="qH9-Ww-nd5"/>
151− <constraint firstAttribute="trailing" secondItem="OpX-io-LgH" secondAttribute="trailing" id="ueR-ZM-ELi"/>
152− </constraints>
153− </view>
154− <scrollView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="trF-VM-0qV">
155− <rect key="frame" x="0.0" y="0.0" width="414" height="106"/>
156− <subviews>
157− <stackView opaque="NO" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="bpJ-pe-tQf">
158− <rect key="frame" x="0.0" y="0.0" width="414" height="106"/>
159− </stackView>
160− </subviews>
161− <constraints>
162− <constraint firstAttribute="bottom" secondItem="bpJ-pe-tQf" secondAttribute="bottom" id="BxY-h0-LHi"/>
163− <constraint firstItem="bpJ-pe-tQf" firstAttribute="leading" secondItem="trF-VM-0qV" secondAttribute="leading" id="Ec5-Lb-NsX"/>
164− <constraint firstAttribute="trailing" secondItem="bpJ-pe-tQf" secondAttribute="trailing" id="d0a-8z-CE6"/>
165− <constraint firstItem="bpJ-pe-tQf" firstAttribute="width" secondItem="trF-VM-0qV" secondAttribute="width" priority="250" id="mYw-sK-G8B"/>
166− <constraint firstItem="bpJ-pe-tQf" firstAttribute="height" secondItem="trF-VM-0qV" secondAttribute="height" id="wdB-oa-hvt"/>
167− <constraint firstItem="bpJ-pe-tQf" firstAttribute="top" secondItem="trF-VM-0qV" secondAttribute="top" id="x6e-gw-nXA"/>
168− </constraints>
169− <viewLayoutGuide key="contentLayoutGuide" id="QAB-NG-eb4"/>
170− <viewLayoutGuide key="frameLayoutGuide" id="xUW-w2-Jj1"/>
171− </scrollView>
172− </subviews>
173− <color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
174− <constraints>
175− <constraint firstAttribute="bottom" secondItem="trF-VM-0qV" secondAttribute="bottom" id="4kT-64-W5t"/>
176− <constraint firstItem="trF-VM-0qV" firstAttribute="top" secondItem="vKS-ia-RxW" secondAttribute="top" id="M4X-6f-0WX"/>
177− <constraint firstItem="trF-VM-0qV" firstAttribute="leading" secondItem="vKS-ia-RxW" secondAttribute="leading" id="ZXK-Vm-o6S"/>
178− <constraint firstAttribute="trailing" secondItem="trF-VM-0qV" secondAttribute="trailing" id="a2R-kF-NcS"/>
179− <constraint firstAttribute="height" constant="106" id="ebp-l7-k9Z"/>
180− <constraint firstItem="EiP-QO-PbU" firstAttribute="leading" secondItem="vKS-ia-RxW" secondAttribute="leading" id="fHc-26-5lu"/>
181− <constraint firstAttribute="bottom" secondItem="EiP-QO-PbU" secondAttribute="bottom" constant="1" id="kxj-VY-srA"/>
182− <constraint firstAttribute="trailing" secondItem="EiP-QO-PbU" secondAttribute="trailing" id="sbQ-sE-GAh"/>
183− </constraints>
184− </view>
185− </subviews>
186− <constraints>
187− <constraint firstItem="vKS-ia-RxW" firstAttribute="leading" secondItem="AEf-R4-K1F" secondAttribute="leading" id="0cO-AV-PJL"/>
188− <constraint firstAttribute="trailing" secondItem="oh7-ka-ctS" secondAttribute="trailing" constant="21" id="KeE-6F-h5x"/>
189− <constraint firstAttribute="trailing" secondItem="9RO-aK-yNh" secondAttribute="trailing" constant="21" id="Kh6-4l-QJO"/>
190− <constraint firstAttribute="bottom" secondItem="vKS-ia-RxW" secondAttribute="bottom" id="TKW-xo-b61"/>
191− <constraint firstItem="9RO-aK-yNh" firstAttribute="leading" secondItem="AEf-R4-K1F" secondAttribute="leading" constant="21" id="Teg-kp-nZt"/>
192− <constraint firstItem="oh7-ka-ctS" firstAttribute="leading" secondItem="AEf-R4-K1F" secondAttribute="leading" constant="21" id="mJ2-gh-vCg"/>
193− <constraint firstAttribute="trailing" secondItem="vKS-ia-RxW" secondAttribute="trailing" id="uDV-uM-jby"/>
194− </constraints>
195− </stackView>
196− </subviews>
197− <color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
198− <constraints>
199− <constraint firstItem="vUN-kp-3ea" firstAttribute="trailing" secondItem="AEf-R4-K1F" secondAttribute="trailing" id="C1h-bA-S6p"/>
200− <constraint firstItem="AEf-R4-K1F" firstAttribute="leading" secondItem="iN0-l3-epB" secondAttribute="leading" id="H1o-ua-Tnn"/>
201− <constraint firstAttribute="top" secondItem="AEf-R4-K1F" secondAttribute="top" constant="-16" id="eYI-is-YLt"/>
202− <constraint firstAttribute="bottom" secondItem="AEf-R4-K1F" secondAttribute="bottom" constant="20" id="fdG-zZ-LeV"/>
203− </constraints>
204− <freeformSimulatedSizeMetrics key="simulatedDestinationMetrics"/>
205− <viewLayoutGuide key="safeArea" id="vUN-kp-3ea"/>
206− <connections>
207− <outlet property="callButton" destination="Xkd-xQ-cFd" id="B3w-gf-Yqg"/>
208− <outlet property="cancelButton" destination="iiD-uf-IDp" id="zwd-eJ-GsP"/>
209− <outlet property="dateLabel" destination="KHM-Yj-bBa" id="iS8-eN-OFW"/>
210− <outlet property="guestSlider" destination="Lqw-9Z-34d" id="cEj-JF-J4D"/>
211− <outlet property="intervalsContainerView" destination="vKS-ia-RxW" id="0Ig-rh-hXD"/>
212− <outlet property="intervalsStackView" destination="bpJ-pe-tQf" id="aF0-Qm-kuh"/>
213− <outlet property="nameLabel" destination="OoG-F4-OVu" id="rnW-fG-jFs"/>
214− <outlet property="numberOfGuestLabel" destination="yTM-U5-XjI" id="z0O-94-Mp7"/>
215− <outlet property="saveButton" destination="npC-AF-3pj" id="Rfm-Zl-zES"/>
216− <outlet property="scrollView" destination="trF-VM-0qV" id="P5v-fg-hUW"/>
217− <outlet property="tableLabel" destination="qNR-EO-oMK" id="63P-AS-fgf"/>
218− <outlet property="timeLabel" destination="gau-aS-vtT" id="7Iy-Cz-zdY"/>
219− </connections>
220− <point key="canvasLocation" x="137.59999999999999" y="95.802098950524751"/>
221− </view>
222− </objects>
223−</document>
Hookah Tau/Controllers/Admin/Reservations/Views/No reserv/AdminNoReservationsView.swiftdeleted−27
@@ -1,27 +0,0 @@
1−//
2−// AdminNoReservationsView.swift
3−// Hookah Tau
4−//
5−// Created by cstore on 19/12/2019.
6−// Copyright © 2019 Daria Rednikina. All rights reserved.
7−//
8−
9−import UIKit
10−
11−class AdminNoReservationsView: UIView {
12−
13− // MARK: - IBAOutlets
14−
15− @IBOutlet weak var titleLabel: UILabel?
16−
17− @IBOutlet weak var bookButton: Button? {
18− didSet {
19− let style = BlackButtonStyle()
20− style.apply(to: bookButton, withTitle: "ЗАБРОНИРОВАТЬ")
21− }
22− }
23−
24− func setup(withTitle title: String) {
25− titleLabel?.text = title
26− }
27−}
Hookah Tau/Controllers/Admin/Reservations/Views/No reserv/AdminNoReservationsView.xibdeleted−54
@@ -1,54 +0,0 @@
1−<?xml version="1.0" encoding="UTF-8"?>
2−<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="15702" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
3− <device id="retina6_1" orientation="portrait" appearance="light"/>
4− <dependencies>
5− <deployment identifier="iOS"/>
6− <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="15704"/>
7− <capability name="Safe area layout guides" minToolsVersion="9.0"/>
8− <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
9− </dependencies>
10− <objects>
11− <placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/>
12− <placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
13− <view contentMode="scaleToFill" id="iN0-l3-epB" customClass="AdminNoReservationsView" customModule="Hookah_Tau" customModuleProvider="target">
14− <rect key="frame" x="0.0" y="0.0" width="414" height="896"/>
15− <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
16− <subviews>
17− <stackView opaque="NO" contentMode="scaleToFill" axis="vertical" alignment="center" spacing="46" translatesAutoresizingMaskIntoConstraints="NO" id="Ytd-08-vB9">
18− <rect key="frame" x="107" y="382" width="200" height="142"/>
19− <subviews>
20− <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="В вашем заведении пока не забронирован ни один столик :(" textAlignment="center" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Svd-DB-3Zu">
21− <rect key="frame" x="4" y="0.0" width="192" height="61"/>
22− <fontDescription key="fontDescription" type="system" weight="semibold" pointSize="17"/>
23− <nil key="textColor"/>
24− <nil key="highlightedColor"/>
25− </label>
26− <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="y3F-ua-mLb" customClass="Button" customModule="Hookah_Tau" customModuleProvider="target">
27− <rect key="frame" x="12.5" y="107" width="175" height="35"/>
28− <color key="backgroundColor" white="0.66666666669999997" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
29− <constraints>
30− <constraint firstAttribute="width" constant="175" id="LnY-Iu-4e6"/>
31− <constraint firstAttribute="height" constant="35" id="oN3-oc-fHx"/>
32− </constraints>
33− <state key="normal" title="Button"/>
34− </button>
35− </subviews>
36− <constraints>
37− <constraint firstAttribute="width" constant="200" id="pgG-jg-faG"/>
38− </constraints>
39− </stackView>
40− </subviews>
41− <color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
42− <constraints>
43− <constraint firstItem="Ytd-08-vB9" firstAttribute="centerY" secondItem="vUN-kp-3ea" secondAttribute="centerY" id="ewL-z8-YVD"/>
44− <constraint firstItem="Ytd-08-vB9" firstAttribute="centerX" secondItem="vUN-kp-3ea" secondAttribute="centerX" id="txy-j9-mF1"/>
45− </constraints>
46− <viewLayoutGuide key="safeArea" id="vUN-kp-3ea"/>
47− <connections>
48− <outlet property="bookButton" destination="y3F-ua-mLb" id="aC4-gz-Gqd"/>
49− <outlet property="titleLabel" destination="Svd-DB-3Zu" id="n8Z-Wq-vzC"/>
50− </connections>
51− <point key="canvasLocation" x="137.68115942028987" y="91.741071428571431"/>
52− </view>
53− </objects>
54−</document>
Hookah Tau/Controllers/Admin/Tab bar/Admin.storyboarddeleted−84
@@ -1,84 +0,0 @@
1−<?xml version="1.0" encoding="UTF-8"?>
2−<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="15702" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
3− <device id="retina6_1" orientation="portrait" appearance="light"/>
4− <dependencies>
5− <deployment identifier="iOS"/>
6− <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="15704"/>
7− <capability name="Safe area layout guides" minToolsVersion="9.0"/>
8− <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
9− </dependencies>
10− <scenes>
11− <!--Клиенты-->
12− <scene sceneID="Q3i-Bo-7ns">
13− <objects>
14− <viewController id="Ifn-72-mgx" customClass="UINavigationController" sceneMemberID="viewController">
15− <view key="view" contentMode="scaleToFill" id="R2t-qa-IDx">
16− <rect key="frame" x="0.0" y="0.0" width="414" height="896"/>
17− <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
18− <color key="backgroundColor" systemColor="systemBackgroundColor" cocoaTouchSystemColor="whiteColor"/>
19− <viewLayoutGuide key="safeArea" id="yHG-bf-ndj"/>
20− </view>
21− <tabBarItem key="tabBarItem" title="Клиенты" image="peoplee" id="9K1-uc-72H"/>
22− </viewController>
23− <placeholder placeholderIdentifier="IBFirstResponder" id="8X9-ca-bCi" userLabel="First Responder" customClass="UIResponder" sceneMemberID="firstResponder"/>
24− </objects>
25− <point key="canvasLocation" x="1061" y="-327"/>
26− </scene>
27− <!--Профиль-->
28− <scene sceneID="cAb-sw-24k">
29− <objects>
30− <viewController id="Jsm-cH-XbJ" customClass="UINavigationController" sceneMemberID="viewController">
31− <view key="view" contentMode="scaleToFill" id="s24-jW-vhb">
32− <rect key="frame" x="0.0" y="0.0" width="414" height="896"/>
33− <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
34− <color key="backgroundColor" systemColor="systemBackgroundColor" cocoaTouchSystemColor="whiteColor"/>
35− <viewLayoutGuide key="safeArea" id="f96-UV-eoi"/>
36− </view>
37− <tabBarItem key="tabBarItem" title="Профиль" image="person" id="ziF-T0-lg1"/>
38− </viewController>
39− <placeholder placeholderIdentifier="IBFirstResponder" id="qqi-vY-Mog" userLabel="First Responder" customClass="UIResponder" sceneMemberID="firstResponder"/>
40− </objects>
41− <point key="canvasLocation" x="1061" y="433"/>
42− </scene>
43− <!--Брони-->
44− <scene sceneID="p6D-Gs-DUK">
45− <objects>
46− <viewController id="Tc3-UW-Fwi" customClass="UINavigationController" sceneMemberID="viewController">
47− <view key="view" contentMode="scaleToFill" id="dmc-GR-czf">
48− <rect key="frame" x="0.0" y="0.0" width="414" height="896"/>
49− <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
50− <color key="backgroundColor" systemColor="systemBackgroundColor" cocoaTouchSystemColor="whiteColor"/>
51− <viewLayoutGuide key="safeArea" id="z8c-Ub-USh"/>
52− </view>
53− <tabBarItem key="tabBarItem" title="Брони" image="stack" id="szW-oN-ixR"/>
54− </viewController>
55− <placeholder placeholderIdentifier="IBFirstResponder" id="1ST-zr-4Zs" userLabel="First Responder" customClass="UIResponder" sceneMemberID="firstResponder"/>
56− </objects>
57− <point key="canvasLocation" x="1062" y="-1047"/>
58− </scene>
59− <!--Admin Tabbar Controller-->
60− <scene sceneID="cWI-V1-4ZB">
61− <objects>
62− <tabBarController storyboardIdentifier="AdminTabbarController" id="mgG-ir-mFF" customClass="AdminTabbarController" customModule="Hookah_Tau" customModuleProvider="target" sceneMemberID="viewController">
63− <tabBar key="tabBar" contentMode="scaleToFill" insetsLayoutMarginsFromSafeArea="NO" id="src-m7-O6h">
64− <rect key="frame" x="0.0" y="0.0" width="414" height="49"/>
65− <autoresizingMask key="autoresizingMask"/>
66− <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
67− </tabBar>
68− <connections>
69− <segue destination="Tc3-UW-Fwi" kind="relationship" relationship="viewControllers" id="K4a-6A-WdW"/>
70− <segue destination="Ifn-72-mgx" kind="relationship" relationship="viewControllers" id="NdV-rq-bli"/>
71− <segue destination="Jsm-cH-XbJ" kind="relationship" relationship="viewControllers" id="2PQ-04-zRb"/>
72− </connections>
73− </tabBarController>
74− <placeholder placeholderIdentifier="IBFirstResponder" id="oiC-tc-RNa" userLabel="First Responder" customClass="UIResponder" sceneMemberID="firstResponder"/>
75− </objects>
76− <point key="canvasLocation" x="-817" y="-251"/>
77− </scene>
78− </scenes>
79− <resources>
80− <image name="peoplee" width="51" height="25"/>
81− <image name="person" width="25" height="24"/>
82− <image name="stack" width="25" height="24"/>
83− </resources>
84−</document>
Hookah Tau/Controllers/Admin/Tab bar/AdminTabbarController.swiftdeleted−48
@@ -1,48 +0,0 @@
1−//
2−// AdminTabbarController.swift
3−// Hookah Tau
4−//
5−// Created by cstore on 05/12/2019.
6−// Copyright © 2019 Daria Rednikina. All rights reserved.
7−//
8−
9−import UIKit
10−
11−class AdminTabbarController: UITabBarController {
12−
13− // MARK: - Properties
14−
15− var onViewDidLoad: TabbarClosure?
16− var onReservationsFlow: TabbarClosure?
17− var onClientsFlow: TabbarClosure?
18− var onProfileFlow: TabbarClosure?
19−
20− // MARK: - Lifecycle
21−
22− override func viewDidLoad() {
23− super.viewDidLoad()
24−
25− delegate = self
26− if let controller = customizableViewControllers?.first as? UINavigationController {
27− onViewDidLoad?(controller)
28− }
29− }
30−
31− func tabBarController(_ tabBarController: UITabBarController, didSelect viewController: UIViewController)
32− {
33−
34− guard let controller = viewControllers?[selectedIndex] as? UINavigationController else { return }
35−
36− switch selectedIndex {
37− case 0:
38− onReservationsFlow?(controller)
39− case 1:
40− onClientsFlow?(controller)
41− default:
42− onProfileFlow?(controller)
43− }
44− }
45−
46−}
47−
48−extension AdminTabbarController: UITabBarControllerDelegate {}
Hookah Tau/Controllers/Admin/Tab bar/AdminTabbarCoordinator.swiftdeleted−73
@@ -1,73 +0,0 @@
1−//
2−// AdminTabbarCoordinator.swift
3−// Hookah Tau
4−//
5−// Created by cstore on 05/12/2019.
6−// Copyright © 2019 Daria Rednikina. All rights reserved.
7−//
8−
9−import UIKit
10−
11−
12−class AdminTabbarCoordinator: BaseCoordinator {
13−
14− /// Мы тут определяем что происходит с таббарами
15− override func start() {
16− let storyboard = UIStoryboard(name: "Admin", bundle: nil)
17− let tabbarView = storyboard.instantiateViewController(withIdentifier: "AdminTabbarController") as? AdminTabbarController
18−
19− tabbarView?.onViewDidLoad = runReservationsFlow()
20− tabbarView?.onClientsFlow = runClientsFlow()
21− tabbarView?.onProfileFlow = runProfileFlow()
22− tabbarView?.onReservationsFlow = runReservationsFlow()
23−
24− let appDelegate = UIApplication.shared.delegate as? AppDelegate
25− guard let appD = appDelegate else { return }
26− appD.window?.rootViewController = tabbarView
27− }
28−
29− private func runReservationsFlow() -> TabbarClosure {
30− return { [unowned self] navigationController in
31− if navigationController.viewControllers.isEmpty {
32− let addressCoordinator = AdminAddressCoordinator(navigationController: navigationController)
33− self.addDependency(addressCoordinator)
34−
35− addressCoordinator.didEndFlow = {
36− self.removeDependency(addressCoordinator)
37− }
38−
39− addressCoordinator.start()
40− }
41− }
42− }
43−
44− private func runClientsFlow() -> TabbarClosure {
45− return { [unowned self] navigationController in
46− if navigationController.viewControllers.isEmpty {
47− let clientsCoordinator = ClientsCoordinator(navigationController: navigationController)
48− self.addDependency(clientsCoordinator)
49−
50− clientsCoordinator.didEndFlow = {
51− self.removeDependency(clientsCoordinator)
52− }
53−
54− clientsCoordinator.start()
55− }
56− }
57− }
58−
59− private func runProfileFlow() -> TabbarClosure {
60− return { [unowned self] navigationController in
61− if navigationController.viewControllers.isEmpty {
62− let profileCoordinator = ProfileCoordinator(navigationController: navigationController)
63− profileCoordinator.didEndFlow = { [weak self, weak profileCoordinator] in
64− self?.removeDependency(profileCoordinator)
65− self?.didEndFlow?()
66− }
67− self.addDependency(profileCoordinator)
68− profileCoordinator.start()
69− }
70− }
71− }
72−
73−}
Hookah Tau/Controllers/ApplicationCoordinator.swift+1−8
@@ -42,13 +42,7 @@ class ApplicationCoordinator: BaseCoordinator {
42 }
42 }
43
43
44 private func runAdminFlow() {
44 private func runAdminFlow() {
45− let tabbarCoordinator = AdminTabbarCoordinator(navigationController: navigationController)
45+
46− tabbarCoordinator.didEndFlow = { [weak self, weak tabbarCoordinator] in
47− self?.start()
48− self?.removeDependency(tabbarCoordinator)
49− }
50− addDependency(tabbarCoordinator)
51− tabbarCoordinator.start()
52 }
46 }
53
47
54 private func runClientFlow() {
48 private func runClientFlow() {
@@ -72,7 +66,6 @@ extension ApplicationCoordinator {
72 let isAdmin = DataStorage.standard.getUserModel()?.isAdmin ?? false
66 let isAdmin = DataStorage.standard.getUserModel()?.isAdmin ?? false
73
67
74 if !isAuthorized {
68 if !isAuthorized {
75− DataStorage.standard.setLoggedInState(false)
76 return .auth
69 return .auth
77 }
70 }
78
71
Hookah Tau/Controllers/BaseTableViewController.swiftdeleted−28
@@ -1,28 +0,0 @@
1−//
2−// BaseTableViewController.swift
3−// Hookah Tau
4−//
5−// Created by cstore on 07/01/2020.
6−// Copyright © 2020 Daria Rednikina. All rights reserved.
7−//
8−
9−import UIKit
10−
11−class BaseTableViewController: UITableViewController {
12−
13− // MARK: - Alert
14−
15− func displayAlert(forError error: GeneralError = GeneralError.noData, with message: String? = nil) {
16− var title: String? = message == nil ? error.localizedDescription : message
17− switch error {
18− case .serverError(let se):
19− title = se.error
20− fallthrough // да тоже произведение искусства
21− default:
22− let alert = UIAlertController(title: title, message: nil, preferredStyle: .alert)
23− alert.addAction(UIAlertAction(title: "OK", style: .default, handler: nil))
24− self.present(alert, animated: true, completion: nil)
25− }
26− }
27−
28−}
Hookah Tau/Controllers/BaseViewController.swift+2−2
@@ -97,7 +97,7 @@ class BaseViewController: UIViewController {
97 }
97 }
98
98
99 @objc
99 @objc
100− func handleKeyboardNotifications(notification: NSNotification){
100+ private func handleKeyboardNotifications(notification: NSNotification){
101 if let userInfo = notification.userInfo {
101 if let userInfo = notification.userInfo {
102 let keyBoardFrame = (userInfo[UIResponder.keyboardFrameEndUserInfoKey] as! NSValue).cgRectValue
102 let keyBoardFrame = (userInfo[UIResponder.keyboardFrameEndUserInfoKey] as! NSValue).cgRectValue
103 bottomConstraint?.constant = notification.name == UIResponder.keyboardWillShowNotification ? -keyBoardFrame.height + view.safeAreaInsets.bottom - 20 : 0
103 bottomConstraint?.constant = notification.name == UIResponder.keyboardWillShowNotification ? -keyBoardFrame.height + view.safeAreaInsets.bottom - 20 : 0
@@ -111,7 +111,7 @@ class BaseViewController: UIViewController {
111 // MARK: - Alert
111 // MARK: - Alert
112
112
113 func displayAlert(forError error: GeneralError = GeneralError.noData, with message: String? = nil) {
113 func displayAlert(forError error: GeneralError = GeneralError.noData, with message: String? = nil) {
114− var title: String? = message == nil ? error.localizedDescription : message
114+ var title: String? = message != nil ? error.localizedDescription : message
115 switch error {
115 switch error {
116 case .serverError(let se):
116 case .serverError(let se):
117 title = se.error
117 title = se.error
Hookah Tau/Controllers/Client/Profile/ProfileChangeCoordinator.swift+4−6
@@ -29,12 +29,10 @@ class ProfileChangeCoordinator: BaseCoordinator {
29 }
29 }
30
30
31 /// Done
31 /// Done
32− func update(withModel model: User?) {
32+ func update(withModel model: User) {
33− if let model = model {
34− for controller in navigationController?.viewControllers ?? [] {
33+ for controller in navigationController?.viewControllers ?? [] {
35− guard let updatableController = controller as? UserUpdate else { continue }
34+ guard let updatableController = controller as? UserUpdate else { continue }
36− updatableController.updateUser(withModel: model)
35+ updatableController.updateUser(withModel: model)
37− }
38 }
36 }
39
37
40 didEndFlow?()
38 didEndFlow?()
Hookah Tau/Controllers/Client/Profile/ProfileChangeViewController.swift+3−22
@@ -23,8 +23,6 @@ class ProfileChangeViewController: BaseViewController {
23
23
24 var changeView: ChangeView?
24 var changeView: ChangeView?
25
25
26− var settingsService: ClientsService?
27−
28 var contentView: UIView = {
26 var contentView: UIView = {
29 let view = UIView()
27 let view = UIView()
30 view.translatesAutoresizingMaskIntoConstraints = false
28 view.translatesAutoresizingMaskIntoConstraints = false
@@ -59,8 +57,6 @@ class ProfileChangeViewController: BaseViewController {
59
57
60 setUpView()
58 setUpView()
61 setUpKeyboard()
59 setUpKeyboard()
62−
63− settingsService = ClientsService(apiClient: APIClient.shared)
64 }
60 }
65
61
66 func setUpView() {
62 func setUpView() {
@@ -90,30 +86,15 @@ class ProfileChangeViewController: BaseViewController {
90 var userModel = model.userModel
86 var userModel = model.userModel
91 switch model.editingOption {
87 switch model.editingOption {
92 case .invite:
88 case .invite:
93− addNewAdmin(phone: text.toApiPhoneNumberFormat())
89+ print("New person is added")
90+ return
94 case .name:
91 case .name:
95− // TODO:-f
96 userModel.name = text
92 userModel.name = text
97− coordinator?.update(withModel: userModel)
98 case .phone:
93 case .phone:
99− // TODO:-
100 userModel.phoneNumber = text
94 userModel.phoneNumber = text
101− coordinator?.update(withModel: userModel)
102 }
95 }
103
96
97+ coordinator?.update(withModel: userModel)
104 }
98 }
105
99
106− func addNewAdmin(phone: String) {
107− doneButton.loading = true
108−
109− settingsService?.changeAdmin(crud: CrudMethod.put, data: phone) { [weak self] res in
110− if res {
111− self?.coordinator?.update(withModel: nil)
112− } else {
113− self?.displayAlert(with: "Что-то пошло не так!\nПопробуй еще раз")
114− }
115−
116− self?.doneButton.loading = false
117− }
118− }
119}
100}
Hookah Tau/Controllers/Client/Profile/Views/ChangeView.swift+1−32
@@ -11,20 +11,15 @@ import UIKit
11
11
12class ChangeView: UIView {
12class ChangeView: UIView {
13
13
14− var type: EditingOption = .invite
15−
16 @IBOutlet weak var titleLabel: UILabel?
14 @IBOutlet weak var titleLabel: UILabel?
17
15
18 @IBOutlet weak var textField: UITextField?
16 @IBOutlet weak var textField: UITextField?
19
17
20 func bind(withModel model: ChangeModel) {
18 func bind(withModel model: ChangeModel) {
21− self.textField?.delegate = self
22− self.type = model.editingOption
23−
24 switch model.editingOption {
19 switch model.editingOption {
25 case .invite:
20 case .invite:
26 titleLabel?.text = "Добавить администратора"
21 titleLabel?.text = "Добавить администратора"
27− textField?.placeholder = "+ 7 (888) 888-88-88"
22+ textField?.placeholder = "+ 7 888 888 88 88"
28 textField?.keyboardType = .numberPad
23 textField?.keyboardType = .numberPad
29 case .name:
24 case .name:
30 titleLabel?.text = "Имя"
25 titleLabel?.text = "Имя"
@@ -37,29 +32,3 @@ class ChangeView: UIView {
37 }
32 }
38 }
33 }
39}
34}
40−
41−extension ChangeView: UITextFieldDelegate {
42−
43− func textField(_ textField: UITextField, shouldChangeCharactersIn range: NSRange, replacementString string: String) -> Bool {
44− let newString = (textField.text! as NSString).replacingCharacters(in: range, with: string)
45− textField.text = formattedNumber(newString)
46− return false
47− }
48−
49− private func formattedNumber(_ number: String) -> String {
50− let cleanPhoneNumber = number.components(separatedBy: CharacterSet.decimalDigits.inverted).joined()
51−
52− var result = ""
53− let phoneMask = "+X (XXX) XXX XX XX"
54− var index = cleanPhoneNumber.startIndex
55− for ch in phoneMask where index < cleanPhoneNumber.endIndex {
56− if ch == "X" {
57− result.append(cleanPhoneNumber[index])
58− index = cleanPhoneNumber.index(after: index)
59− } else {
60− result.append(ch)
61− }
62− }
63− return result
64− }
65−}
Hookah Tau/Controllers/Client/Profile/Views/ChangeView.xib+1−1
@@ -17,7 +17,7 @@
17 <stackView opaque="NO" contentMode="scaleToFill" axis="vertical" spacing="8" translatesAutoresizingMaskIntoConstraints="NO" id="19Q-ZO-gm4">
17 <stackView opaque="NO" contentMode="scaleToFill" axis="vertical" spacing="8" translatesAutoresizingMaskIntoConstraints="NO" id="19Q-ZO-gm4">
18 <rect key="frame" x="20" y="11" width="335" height="83.5"/>
18 <rect key="frame" x="20" y="11" width="335" height="83.5"/>
19 <subviews>
19 <subviews>
20− <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Имя" textAlignment="natural" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="oB7-uQ-xmw">
20+ <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Имя" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="oB7-uQ-xmw">
21 <rect key="frame" x="0.0" y="0.0" width="335" height="33.5"/>
21 <rect key="frame" x="0.0" y="0.0" width="335" height="33.5"/>
22 <fontDescription key="fontDescription" type="boldSystem" pointSize="28"/>
22 <fontDescription key="fontDescription" type="boldSystem" pointSize="28"/>
23 <color key="textColor" white="0.66666666669999997" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
23 <color key="textColor" white="0.66666666669999997" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
Hookah Tau/Controllers/Client/Profile/Views/ProfileView.xib+5−5
@@ -28,7 +28,7 @@
28 </label>
28 </label>
29 <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="jpS-Vl-9C3">
29 <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="jpS-Vl-9C3">
30 <rect key="frame" x="0.0" y="44" width="374" height="50"/>
30 <rect key="frame" x="0.0" y="44" width="374" height="50"/>
31− <color key="backgroundColor" systemColor="systemBlueColor" red="0.0" green="0.47843137254901963" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
31+ <color key="backgroundColor" systemColor="systemBlueColor" red="0.0" green="0.47843137250000001" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
32 <constraints>
32 <constraints>
33 <constraint firstAttribute="width" constant="374" id="9z3-UR-zHl"/>
33 <constraint firstAttribute="width" constant="374" id="9z3-UR-zHl"/>
34 <constraint firstAttribute="height" constant="50" id="Hr9-hL-I1c"/>
34 <constraint firstAttribute="height" constant="50" id="Hr9-hL-I1c"/>
@@ -47,7 +47,7 @@
47 </label>
47 </label>
48 <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="SVP-b8-AJi">
48 <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="SVP-b8-AJi">
49 <rect key="frame" x="0.0" y="41.5" width="374" height="50"/>
49 <rect key="frame" x="0.0" y="41.5" width="374" height="50"/>
50− <color key="backgroundColor" systemColor="systemRedColor" red="1" green="0.23137254901960785" blue="0.18823529411764706" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
50+ <color key="backgroundColor" systemColor="systemRedColor" red="1" green="0.23137254900000001" blue="0.18823529410000001" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
51 <constraints>
51 <constraints>
52 <constraint firstAttribute="width" constant="374" id="2Ra-kt-T1F"/>
52 <constraint firstAttribute="width" constant="374" id="2Ra-kt-T1F"/>
53 <constraint firstAttribute="height" constant="50" id="iGE-m0-EQ2"/>
53 <constraint firstAttribute="height" constant="50" id="iGE-m0-EQ2"/>
@@ -58,7 +58,7 @@
58 <stackView opaque="NO" contentMode="scaleToFill" axis="vertical" alignment="top" spacing="8" translatesAutoresizingMaskIntoConstraints="NO" id="wcw-Ss-ld4">
58 <stackView opaque="NO" contentMode="scaleToFill" axis="vertical" alignment="top" spacing="8" translatesAutoresizingMaskIntoConstraints="NO" id="wcw-Ss-ld4">
59 <rect key="frame" x="0.0" y="245.5" width="374" height="91.5"/>
59 <rect key="frame" x="0.0" y="245.5" width="374" height="91.5"/>
60 <subviews>
60 <subviews>
61− <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="natural" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="NQB-i0-WVL">
61+ <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="NQB-i0-WVL">
62 <rect key="frame" x="0.0" y="0.0" width="71.5" height="33.5"/>
62 <rect key="frame" x="0.0" y="0.0" width="71.5" height="33.5"/>
63 <fontDescription key="fontDescription" type="boldSystem" pointSize="28"/>
63 <fontDescription key="fontDescription" type="boldSystem" pointSize="28"/>
64 <color key="textColor" white="0.66666666666666663" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
64 <color key="textColor" white="0.66666666666666663" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
@@ -66,7 +66,7 @@
66 </label>
66 </label>
67 <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="dyQ-12-OMI">
67 <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="dyQ-12-OMI">
68 <rect key="frame" x="0.0" y="41.5" width="374" height="50"/>
68 <rect key="frame" x="0.0" y="41.5" width="374" height="50"/>
69− <color key="backgroundColor" systemColor="systemIndigoColor" red="0.34509803921568627" green="0.33725490196078434" blue="0.83921568627450982" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
69+ <color key="backgroundColor" systemColor="systemIndigoColor" red="0.34509803919999998" green="0.33725490200000002" blue="0.83921568629999999" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
70 <constraints>
70 <constraints>
71 <constraint firstAttribute="height" constant="50" id="SYN-47-LUA"/>
71 <constraint firstAttribute="height" constant="50" id="SYN-47-LUA"/>
72 <constraint firstAttribute="width" constant="374" id="hQD-KD-teb"/>
72 <constraint firstAttribute="width" constant="374" id="hQD-KD-teb"/>
@@ -78,7 +78,7 @@
78 </stackView>
78 </stackView>
79 <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="oKK-WM-xZ3" customClass="Button" customModule="Hookah_Tau" customModuleProvider="target">
79 <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="oKK-WM-xZ3" customClass="Button" customModule="Hookah_Tau" customModuleProvider="target">
80 <rect key="frame" x="20" y="446" width="374" height="37"/>
80 <rect key="frame" x="20" y="446" width="374" height="37"/>
81− <color key="backgroundColor" systemColor="opaqueSeparatorColor" red="0.77647058823529413" green="0.77647058823529413" blue="0.78431372549019607" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
81+ <color key="backgroundColor" systemColor="opaqueSeparatorColor" red="0.77647058820000003" green="0.77647058820000003" blue="0.7843137255" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
82 <constraints>
82 <constraints>
83 <constraint firstAttribute="height" constant="37" id="I8c-3h-mMu"/>
83 <constraint firstAttribute="height" constant="37" id="I8c-3h-mMu"/>
84 </constraints>
84 </constraints>
Hookah Tau/Controllers/Client/Reservations/Active Reservations/ReservationsViewController.swift+4−23
@@ -8,6 +8,8 @@
8
8
9import UIKit
9import UIKit
10
10
11+let reservationCell = "ReservationCell"
12+
11class ReservationsViewController: BaseViewController {
13class ReservationsViewController: BaseViewController {
12
14
13 // MARK: - Properties
15 // MARK: - Properties
@@ -23,7 +25,6 @@ class ReservationsViewController: BaseViewController {
23 tableView?.alpha = 1
25 tableView?.alpha = 1
24 }
26 }
25
27
26− activityIndicator.stopAnimating()
27 tableView?.reloadData()
28 tableView?.reloadData()
28 }
29 }
29 }
30 }
@@ -46,8 +47,6 @@ class ReservationsViewController: BaseViewController {
46 return tableView
47 return tableView
47 }()
48 }()
48
49
49− var activityIndicator = UIActivityIndicatorView()
50−
51 // MARK: - Lifecycle
50 // MARK: - Lifecycle
52
51
53 override func viewDidLoad() {
52 override func viewDidLoad() {
@@ -77,9 +76,6 @@ class ReservationsViewController: BaseViewController {
77 func setUpContentView() {
76 func setUpContentView() {
78 self.view.addSubviewThatFills(contentView)
77 self.view.addSubviewThatFills(contentView)
79
78
80− contentView.addSubviewThatFills(activityIndicator)
81− activityIndicator.startAnimating()
82−
83 // empty
79 // empty
84 noReservationsView = NoReservationsView.loadFromNib()
80 noReservationsView = NoReservationsView.loadFromNib()
85 contentView.addSubviewThatFills(noReservationsView)
81 contentView.addSubviewThatFills(noReservationsView)
@@ -91,7 +87,6 @@ class ReservationsViewController: BaseViewController {
91 contentView.addSubviewThatFills(tableView)
87 contentView.addSubviewThatFills(tableView)
92
88
93 setUpTableView()
89 setUpTableView()
94− setupRefreshControl()
95 }
90 }
96
91
97 func setUpTableView() {
92 func setUpTableView() {
@@ -127,12 +122,11 @@ class ReservationsViewController: BaseViewController {
127 case .failure(let err):
122 case .failure(let err):
128 self?.displayAlert(forError: err)
123 self?.displayAlert(forError: err)
129 }
124 }
130− self?.refrControl?.endRefreshing()
131 })
125 })
132 }
126 }
133
127
134 func deleteReservation(uuid: String, completion: @escaping (([Reservation]?) -> Void)) {
128 func deleteReservation(uuid: String, completion: @escaping (([Reservation]?) -> Void)) {
135− reservationsService?.deleteReservation(isAdmin: false, uuid: uuid) { result in
129+ reservationsService?.deleteReservation(uuid: uuid) { result in
136 if result {
130 if result {
137 let newReservations = self.activeReservations.filter { $0.uuid != uuid }
131 let newReservations = self.activeReservations.filter { $0.uuid != uuid }
138 completion(newReservations)
132 completion(newReservations)
@@ -143,19 +137,6 @@ class ReservationsViewController: BaseViewController {
143 }
137 }
144 }
138 }
145
139
146− // MARK: - Refresh control
147−
148− var refrControl: UIRefreshControl?
149−
150− func setupRefreshControl() {
151− refrControl = UIRefreshControl()
152− tableView?.refreshControl = refrControl
153− refrControl?.addTarget(self, action: #selector(refreshData(_:)), for: .valueChanged)
154− }
155−
156− @objc func refreshData( _ ff: UIRefreshControl) {
157− performUpdate()
158− }
159}
140}
160
141
161extension ReservationsViewController: UITableViewDelegate, UITableViewDataSource {
142extension ReservationsViewController: UITableViewDelegate, UITableViewDataSource {
@@ -192,7 +173,7 @@ extension ReservationsViewController: UITableViewDelegate, UITableViewDataSource
192 func tableView(_ tableView: UITableView, editActionsForRowAt indexPath: IndexPath) -> [UITableViewRowAction]? {
173 func tableView(_ tableView: UITableView, editActionsForRowAt indexPath: IndexPath) -> [UITableViewRowAction]? {
193
174
194 let uuid = activeReservations[indexPath.row].uuid
175 let uuid = activeReservations[indexPath.row].uuid
195− let cancelButton = UITableViewRowAction(style: .normal, title: "отменить бронь") { _,_ in
176+ let cancelButton = UITableViewRowAction(style: .normal, title: "❌") { _,_ in
196
177
197 self.deleteReservation(uuid: uuid) { optionalNewVal in
178 self.deleteReservation(uuid: uuid) { optionalNewVal in
198 if let newval = optionalNewVal {
179 if let newval = optionalNewVal {
Hookah Tau/Controllers/Client/Reservations/Adress of reservation/AddresViewController.swift+2−2
@@ -12,7 +12,7 @@ class AddresViewController: BaseViewController {
12
12
13 // MARK: - Properties
13 // MARK: - Properties
14
14
15− weak var coordinator: AddressMapper?
15+ weak var coordinator: AddressCoordinator?
16
16
17 var tableView: UITableView?
17 var tableView: UITableView?
18
18
@@ -78,7 +78,7 @@ extension AddresViewController: UITableViewDelegate, UITableViewDataSource {
78 let establishment = dataSource?[indexPath.row]
78 let establishment = dataSource?[indexPath.row]
79 guard let id = establishment else { return }
79 guard let id = establishment else { return }
80
80
81− coordinator?.chooseAddress(establishmentId: id)
81+ coordinator?.chooseTableAndTime(inEstablishment: id)
82 }
82 }
83
83
84 func tableView(_ tableView: UITableView, canEditRowAt indexPath: IndexPath) -> Bool {
84 func tableView(_ tableView: UITableView, canEditRowAt indexPath: IndexPath) -> Bool {
Hookah Tau/Controllers/Client/Reservations/Adress of reservation/AddressCoordinator.swift+1−11
@@ -8,10 +8,6 @@
8
8
9import UIKit
9import UIKit
10
10
11−protocol AddressMapper: class {
12− func chooseAddress(establishmentId id: Int)
13−}
14−
15class AddressCoordinator: BaseCoordinator {
11class AddressCoordinator: BaseCoordinator {
16
12
17 // MARK: - Properties
13 // MARK: - Properties
@@ -33,7 +29,7 @@ class AddressCoordinator: BaseCoordinator {
33
29
34 /// continue with reservation
30 /// continue with reservation
35 /// TODO: pass some data
31 /// TODO: pass some data
36− private func chooseTableAndTime(inEstablishment id: Int) {
32+ func chooseTableAndTime(inEstablishment id: Int) {
37 let reservationCoordinator = FirstStepReservationCoordinator(navigationController: navigationController)
33 let reservationCoordinator = FirstStepReservationCoordinator(navigationController: navigationController)
38 reservationCoordinator.establishment = id
34 reservationCoordinator.establishment = id
39
35
@@ -47,9 +43,3 @@ class AddressCoordinator: BaseCoordinator {
47 reservationCoordinator.start()
43 reservationCoordinator.start()
48 }
44 }
49}
45}
50−
51−extension AddressCoordinator: AddressMapper {
52− func chooseAddress(establishmentId id: Int) {
53− chooseTableAndTime(inEstablishment: id)
54− }
55−}
Hookah Tau/Controllers/Client/Reservations/Cells/Reservation/ReservationCell.swift−2
@@ -8,8 +8,6 @@
8
8
9import UIKit
9import UIKit
10
10
11−let reservationCell = "ReservationCell"
12−
13class ReservationCell: UITableViewCell {
11class ReservationCell: UITableViewCell {
14
12
15 // MARK: - Properties
13 // MARK: - Properties
Hookah Tau/Controllers/Client/Reservations/Maps/1/MapView1.xib+14−14
@@ -1,9 +1,9 @@
1<?xml version="1.0" encoding="UTF-8"?>
1<?xml version="1.0" encoding="UTF-8"?>
2−<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="15702" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
2+<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="14868" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
3 <device id="retina4_7" orientation="portrait" appearance="light"/>
3 <device id="retina4_7" orientation="portrait" appearance="light"/>
4 <dependencies>
4 <dependencies>
5 <deployment identifier="iOS"/>
5 <deployment identifier="iOS"/>
6− <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="15704"/>
6+ <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="14824"/>
7 <capability name="Safe area layout guides" minToolsVersion="9.0"/>
7 <capability name="Safe area layout guides" minToolsVersion="9.0"/>
8 <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
8 <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
9 </dependencies>
9 </dependencies>
@@ -21,22 +21,22 @@
21 <rect key="frame" x="0.0" y="0.0" width="536" height="636"/>
21 <rect key="frame" x="0.0" y="0.0" width="536" height="636"/>
22 </imageView>
22 </imageView>
23 <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="Y23-Wu-4BW" customClass="TableButton" customModule="Hookah_Tau" customModuleProvider="target">
23 <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="Y23-Wu-4BW" customClass="TableButton" customModule="Hookah_Tau" customModuleProvider="target">
24− <rect key="frame" x="44" y="37" width="102" height="119"/>
24+ <rect key="frame" x="44" y="37" width="102" height="117"/>
25 <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
25 <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
26 <constraints>
26 <constraints>
27 <constraint firstAttribute="width" constant="102" id="EKZ-Ny-4RQ"/>
27 <constraint firstAttribute="width" constant="102" id="EKZ-Ny-4RQ"/>
28− <constraint firstAttribute="height" constant="119" id="u1N-5d-cFR"/>
28+ <constraint firstAttribute="height" constant="117" id="u1N-5d-cFR"/>
29 </constraints>
29 </constraints>
30 <connections>
30 <connections>
31 <action selector="chooseFirstTable:" destination="iN0-l3-epB" eventType="touchUpInside" id="1O9-7Q-a8g"/>
31 <action selector="chooseFirstTable:" destination="iN0-l3-epB" eventType="touchUpInside" id="1O9-7Q-a8g"/>
32 </connections>
32 </connections>
33 </button>
33 </button>
34 <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="xsw-fJ-8cN" customClass="TableButton" customModule="Hookah_Tau" customModuleProvider="target">
34 <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="xsw-fJ-8cN" customClass="TableButton" customModule="Hookah_Tau" customModuleProvider="target">
35− <rect key="frame" x="209" y="116" width="131" height="117"/>
35+ <rect key="frame" x="209" y="113" width="131" height="119"/>
36 <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
36 <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
37 <constraints>
37 <constraints>
38 <constraint firstAttribute="width" constant="131" id="2xi-Oz-ceC"/>
38 <constraint firstAttribute="width" constant="131" id="2xi-Oz-ceC"/>
39− <constraint firstAttribute="height" constant="117" id="xPD-fh-9Zg"/>
39+ <constraint firstAttribute="height" constant="119" id="xPD-fh-9Zg"/>
40 </constraints>
40 </constraints>
41 <connections>
41 <connections>
42 <action selector="chooseSecondTable:" destination="iN0-l3-epB" eventType="touchUpInside" id="5XE-gZ-DyJ"/>
42 <action selector="chooseSecondTable:" destination="iN0-l3-epB" eventType="touchUpInside" id="5XE-gZ-DyJ"/>
@@ -54,10 +54,10 @@
54 </connections>
54 </connections>
55 </button>
55 </button>
56 <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="Fw9-l6-N8a" customClass="TableButton" customModule="Hookah_Tau" customModuleProvider="target">
56 <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="Fw9-l6-N8a" customClass="TableButton" customModule="Hookah_Tau" customModuleProvider="target">
57− <rect key="frame" x="60" y="350" width="102" height="120"/>
57+ <rect key="frame" x="60" y="350" width="102" height="118"/>
58 <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
58 <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
59 <constraints>
59 <constraints>
60− <constraint firstAttribute="height" constant="120" id="2Vp-Ip-7cO"/>
60+ <constraint firstAttribute="height" constant="118" id="2Vp-Ip-7cO"/>
61 <constraint firstAttribute="width" constant="102" id="2hI-75-UCM"/>
61 <constraint firstAttribute="width" constant="102" id="2hI-75-UCM"/>
62 </constraints>
62 </constraints>
63 <connections>
63 <connections>
@@ -65,10 +65,10 @@
65 </connections>
65 </connections>
66 </button>
66 </button>
67 <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="KJZ-Nl-7hH" customClass="TableButton" customModule="Hookah_Tau" customModuleProvider="target">
67 <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="KJZ-Nl-7hH" customClass="TableButton" customModule="Hookah_Tau" customModuleProvider="target">
68− <rect key="frame" x="222" y="273" width="104" height="120"/>
68+ <rect key="frame" x="222" y="272" width="104" height="119"/>
69 <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
69 <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
70 <constraints>
70 <constraints>
71− <constraint firstAttribute="height" constant="120" id="Ifu-kd-YHH"/>
71+ <constraint firstAttribute="height" constant="119" id="Ifu-kd-YHH"/>
72 <constraint firstAttribute="width" constant="104" id="phm-aP-6dx"/>
72 <constraint firstAttribute="width" constant="104" id="phm-aP-6dx"/>
73 </constraints>
73 </constraints>
74 <connections>
74 <connections>
@@ -76,7 +76,7 @@
76 </connections>
76 </connections>
77 </button>
77 </button>
78 <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="mUw-im-1BC" customClass="TableButton" customModule="Hookah_Tau" customModuleProvider="target">
78 <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="mUw-im-1BC" customClass="TableButton" customModule="Hookah_Tau" customModuleProvider="target">
79− <rect key="frame" x="222" y="433" width="92" height="67"/>
79+ <rect key="frame" x="222" y="431" width="92" height="67"/>
80 <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
80 <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
81 <constraints>
81 <constraints>
82 <constraint firstAttribute="width" constant="92" id="AJ6-ku-4R3"/>
82 <constraint firstAttribute="width" constant="92" id="AJ6-ku-4R3"/>
@@ -87,10 +87,10 @@
87 </connections>
87 </connections>
88 </button>
88 </button>
89 <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="aIM-Qn-Uhl" customClass="TableButton" customModule="Hookah_Tau" customModuleProvider="target">
89 <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="aIM-Qn-Uhl" customClass="TableButton" customModule="Hookah_Tau" customModuleProvider="target">
90− <rect key="frame" x="386" y="116" width="131" height="119"/>
90+ <rect key="frame" x="386" y="116" width="130" height="119"/>
91 <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
91 <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
92 <constraints>
92 <constraints>
93− <constraint firstAttribute="width" constant="131" id="Lhq-jM-PQ0"/>
93+ <constraint firstAttribute="width" constant="130" id="Lhq-jM-PQ0"/>
94 <constraint firstAttribute="height" constant="119" id="vsx-u8-L6o"/>
94 <constraint firstAttribute="height" constant="119" id="vsx-u8-L6o"/>
95 </constraints>
95 </constraints>
96 <connections>
96 <connections>
@@ -123,7 +123,7 @@
123 <constraint firstItem="mUw-im-1BC" firstAttribute="top" secondItem="KJZ-Nl-7hH" secondAttribute="bottom" constant="40" id="GaI-BE-NZy"/>
123 <constraint firstItem="mUw-im-1BC" firstAttribute="top" secondItem="KJZ-Nl-7hH" secondAttribute="bottom" constant="40" id="GaI-BE-NZy"/>
124 <constraint firstItem="btD-Wl-3P6" firstAttribute="width" secondItem="FuE-LV-NBR" secondAttribute="width" priority="250" id="MDs-kk-aza"/>
124 <constraint firstItem="btD-Wl-3P6" firstAttribute="width" secondItem="FuE-LV-NBR" secondAttribute="width" priority="250" id="MDs-kk-aza"/>
125 <constraint firstItem="btD-Wl-3P6" firstAttribute="top" secondItem="aIM-Qn-Uhl" secondAttribute="bottom" constant="-235" id="NwR-U0-V6F"/>
125 <constraint firstItem="btD-Wl-3P6" firstAttribute="top" secondItem="aIM-Qn-Uhl" secondAttribute="bottom" constant="-235" id="NwR-U0-V6F"/>
126− <constraint firstItem="mUw-im-1BC" firstAttribute="top" secondItem="btD-Wl-3P6" secondAttribute="bottom" constant="-203" id="UXz-DD-dPH"/>
126+ <constraint firstItem="mUw-im-1BC" firstAttribute="top" secondItem="btD-Wl-3P6" secondAttribute="bottom" constant="-205" id="UXz-DD-dPH"/>
127 <constraint firstItem="mUw-im-1BC" firstAttribute="leading" secondItem="Fw9-l6-N8a" secondAttribute="trailing" constant="60" id="V4u-ko-iFV"/>
127 <constraint firstItem="mUw-im-1BC" firstAttribute="leading" secondItem="Fw9-l6-N8a" secondAttribute="trailing" constant="60" id="V4u-ko-iFV"/>
128 <constraint firstItem="KJZ-Nl-7hH" firstAttribute="top" secondItem="xsw-fJ-8cN" secondAttribute="bottom" constant="40" id="XFV-l2-chC"/>
128 <constraint firstItem="KJZ-Nl-7hH" firstAttribute="top" secondItem="xsw-fJ-8cN" secondAttribute="bottom" constant="40" id="XFV-l2-chC"/>
129 <constraint firstItem="btD-Wl-3P6" firstAttribute="top" secondItem="onR-hl-Q2x" secondAttribute="bottom" constant="-332" id="XNT-i4-1l8"/>
129 <constraint firstItem="btD-Wl-3P6" firstAttribute="top" secondItem="onR-hl-Q2x" secondAttribute="bottom" constant="-332" id="XNT-i4-1l8"/>
Hookah Tau/Controllers/Client/Reservations/Maps/MapView.swift−1
@@ -33,7 +33,6 @@ class MapImageScroll: UIView {
33 shadowView.alpha = 1
33 shadowView.alpha = 1
34
34
35 scrollViewParent.zoom(to: tableButton.frame, animated: true)
35 scrollViewParent.zoom(to: tableButton.frame, animated: true)
36− scrollViewParent.contentOffset = CGPoint(x: scrollViewParent.contentOffset.x, y: scrollViewParent.contentOffset.y + 100)
37 scrollViewParent.setZoomScale(zoomScale, animated: true)
36 scrollViewParent.setZoomScale(zoomScale, animated: true)
38 }
37 }
39
38
Hookah Tau/Controllers/Client/Reservations/Reservation.storyboard+4−4
@@ -1,9 +1,9 @@
1<?xml version="1.0" encoding="UTF-8"?>
1<?xml version="1.0" encoding="UTF-8"?>
2−<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="15702" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
2+<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="14868" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
3 <device id="retina6_1" orientation="portrait" appearance="light"/>
3 <device id="retina6_1" orientation="portrait" appearance="light"/>
4 <dependencies>
4 <dependencies>
5 <deployment identifier="iOS"/>
5 <deployment identifier="iOS"/>
6− <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="15704"/>
6+ <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="14824"/>
7 <capability name="Safe area layout guides" minToolsVersion="9.0"/>
7 <capability name="Safe area layout guides" minToolsVersion="9.0"/>
8 <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
8 <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
9 </dependencies>
9 </dependencies>
@@ -49,10 +49,10 @@
49 <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
49 <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
50 <subviews>
50 <subviews>
51 <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="NBJ-7w-vpV">
51 <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="NBJ-7w-vpV">
52− <rect key="frame" x="0.0" y="544" width="414" height="352"/>
52+ <rect key="frame" x="0.0" y="502" width="414" height="394"/>
53 <color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
53 <color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
54 <constraints>
54 <constraints>
55− <constraint firstAttribute="height" constant="352" id="KKm-d5-Srx"/>
55+ <constraint firstAttribute="height" constant="394" id="KKm-d5-Srx"/>
56 </constraints>
56 </constraints>
57 </view>
57 </view>
58 </subviews>
58 </subviews>
Hookah Tau/Controllers/Client/Reservations/Steps/1/FirstStepReservationCoordinator.swift+1−8
@@ -8,7 +8,7 @@
8
8
9import UIKit
9import UIKit
10
10
11−class FirstStepReservationCoordinator: BaseCoordinator, FirstStepReservationProtocol {
11+class FirstStepReservationCoordinator: BaseCoordinator {
12
12
13 // MARK: - Properties
13 // MARK: - Properties
14
14
@@ -28,13 +28,6 @@ class FirstStepReservationCoordinator: BaseCoordinator, FirstStepReservationProt
28 navigationController?.pushViewController(reservationVC, animated: true)
28 navigationController?.pushViewController(reservationVC, animated: true)
29 }
29 }
30
30
31− var user: UserType {
32− get {
33− return .client
34− }
35− }
36−
37−
38 func makeReservation(model: SecondStepModel,
31 func makeReservation(model: SecondStepModel,
39 mapView: MapImageScroll?) {
32 mapView: MapImageScroll?) {
40
33
Hookah Tau/Controllers/Client/Reservations/Steps/1/FirstStepReservationViewController.swift+6−15
@@ -13,7 +13,7 @@ class FirstStepReservationViewController: BaseViewController {
13
13
14 // MARK: - Properties
14 // MARK: - Properties
15
15
16− weak var coordinator: FirstStepReservationProtocol?
16+ weak var coordinator: FirstStepReservationCoordinator?
17
17
18 @IBOutlet weak var childContentView: UIView!
18 @IBOutlet weak var childContentView: UIView!
19
19
@@ -82,21 +82,12 @@ class FirstStepReservationViewController: BaseViewController {
82 }
82 }
83
83
84 func setupButtons() {
84 func setupButtons() {
85−
86− guard let coord = coordinator else { return }
87−
88− if coord.user == .admin {
89− addStackViewWithButtons(rightBtn: continueButton,
90− constant: -childContentView.frame.height - 20)
91− } else {
92− addStackViewWithButtons(leftBtn: callButton,
85+ addStackViewWithButtons(leftBtn: callButton,
93− rightBtn: continueButton,
86+ rightBtn: continueButton,
94− constant: -childContentView.frame.height - 20)
87+ constant: -childContentView.frame.height - 20)
95−
96− callButton.addTarget(self, action: #selector(call), for: .touchUpInside)
97− }
98
88
99 continueButton.addTarget(self, action: #selector(continueBooking), for: .touchUpInside)
89 continueButton.addTarget(self, action: #selector(continueBooking), for: .touchUpInside)
90+ callButton.addTarget(self, action: #selector(call), for: .touchUpInside)
100 }
91 }
101
92
102 func performUpdate() {
93 func performUpdate() {
@@ -187,7 +178,7 @@ extension FirstStepReservationViewController: MapUpdater {
187 let areBooked = allReservations?.intervals[date] ?? []
178 let areBooked = allReservations?.intervals[date] ?? []
188
179
189 let isAdmin = DataStorage.standard.getUserModel()?.isAdmin ?? false
180 let isAdmin = DataStorage.standard.getUserModel()?.isAdmin ?? false
190− let closed = !isAdmin && date.isInClosingHours()
181+ let closed = isAdmin || date.isInClosingHours()
191
182
192 if Set(areBooked).contains(tableId) || closed {
183 if Set(areBooked).contains(tableId) || closed {
193 continueButton.availiable = false
184 continueButton.availiable = false
Hookah Tau/Controllers/Client/Reservations/Steps/1/FirstStepView.xib+18−18
@@ -1,9 +1,9 @@
1<?xml version="1.0" encoding="UTF-8"?>
1<?xml version="1.0" encoding="UTF-8"?>
2−<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="15702" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
2+<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="14868" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
3− <device id="retina5_5" orientation="portrait" appearance="light"/>
3+ <device id="retina4_7" orientation="portrait" appearance="light"/>
4 <dependencies>
4 <dependencies>
5 <deployment identifier="iOS"/>
5 <deployment identifier="iOS"/>
6− <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="15704"/>
6+ <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="14824"/>
7 <capability name="Safe area layout guides" minToolsVersion="9.0"/>
7 <capability name="Safe area layout guides" minToolsVersion="9.0"/>
8 <capability name="Stack View standard spacing" minToolsVersion="9.0"/>
8 <capability name="Stack View standard spacing" minToolsVersion="9.0"/>
9 <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
9 <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
@@ -106,14 +106,14 @@
106 </constraints>
106 </constraints>
107 </view>
107 </view>
108 <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="TriangleDown" translatesAutoresizingMaskIntoConstraints="NO" id="5dC-Lq-opV">
108 <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="TriangleDown" translatesAutoresizingMaskIntoConstraints="NO" id="5dC-Lq-opV">
109− <rect key="frame" x="184.66666666666666" y="0.0" width="45" height="29"/>
109+ <rect key="frame" x="184.5" y="0.0" width="45" height="29"/>
110 <constraints>
110 <constraints>
111 <constraint firstAttribute="width" constant="45" id="Tsw-fS-8qs"/>
111 <constraint firstAttribute="width" constant="45" id="Tsw-fS-8qs"/>
112 <constraint firstAttribute="height" constant="29" id="YWD-ja-gD5"/>
112 <constraint firstAttribute="height" constant="29" id="YWD-ja-gD5"/>
113 </constraints>
113 </constraints>
114 </imageView>
114 </imageView>
115 <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="TriangleUp" translatesAutoresizingMaskIntoConstraints="NO" id="Igw-O9-W92">
115 <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="TriangleUp" translatesAutoresizingMaskIntoConstraints="NO" id="Igw-O9-W92">
116− <rect key="frame" x="184.66666666666666" y="196" width="45" height="29"/>
116+ <rect key="frame" x="184.5" y="196" width="45" height="29"/>
117 <constraints>
117 <constraints>
118 <constraint firstAttribute="height" constant="29" id="AdE-yJ-WLL"/>
118 <constraint firstAttribute="height" constant="29" id="AdE-yJ-WLL"/>
119 <constraint firstAttribute="width" constant="45" id="Eaa-P8-3mv"/>
119 <constraint firstAttribute="width" constant="45" id="Eaa-P8-3mv"/>
@@ -159,16 +159,16 @@
159 <rect key="frame" x="0.0" y="29" width="414" height="59"/>
159 <rect key="frame" x="0.0" y="29" width="414" height="59"/>
160 <subviews>
160 <subviews>
161 <stackView opaque="NO" contentMode="scaleToFill" distribution="equalSpacing" spacingType="standard" translatesAutoresizingMaskIntoConstraints="NO" id="OEF-Kc-d38">
161 <stackView opaque="NO" contentMode="scaleToFill" distribution="equalSpacing" spacingType="standard" translatesAutoresizingMaskIntoConstraints="NO" id="OEF-Kc-d38">
162− <rect key="frame" x="8" y="5.0000000000000009" width="398" height="14.333333333333336"/>
162+ <rect key="frame" x="8" y="5" width="398" height="14.5"/>
163 <subviews>
163 <subviews>
164 <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="November" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="5Mn-Mn-qaI">
164 <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="November" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="5Mn-Mn-qaI">
165− <rect key="frame" x="0.0" y="0.0" width="58.333333333333336" height="14.333333333333334"/>
165+ <rect key="frame" x="0.0" y="0.0" width="58.5" height="14.5"/>
166 <fontDescription key="fontDescription" type="system" pointSize="12"/>
166 <fontDescription key="fontDescription" type="system" pointSize="12"/>
167 <color key="textColor" white="0.33333333333333331" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
167 <color key="textColor" white="0.33333333333333331" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
168 <nil key="highlightedColor"/>
168 <nil key="highlightedColor"/>
169 </label>
169 </label>
170 <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="January" textAlignment="right" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Rfg-Ts-DX0">
170 <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="January" textAlignment="right" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Rfg-Ts-DX0">
171− <rect key="frame" x="353" y="0.0" width="45" height="14.333333333333334"/>
171+ <rect key="frame" x="353" y="0.0" width="45" height="14.5"/>
172 <fontDescription key="fontDescription" type="system" pointSize="12"/>
172 <fontDescription key="fontDescription" type="system" pointSize="12"/>
173 <color key="textColor" white="0.33333333333333331" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
173 <color key="textColor" white="0.33333333333333331" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
174 <nil key="highlightedColor"/>
174 <nil key="highlightedColor"/>
@@ -176,7 +176,7 @@
176 </subviews>
176 </subviews>
177 </stackView>
177 </stackView>
178 <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="December" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Fbc-VX-43f">
178 <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="December" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Fbc-VX-43f">
179− <rect key="frame" x="176.66666666666666" y="5.0000000000000009" width="60.666666666666657" height="14.333333333333336"/>
179+ <rect key="frame" x="176.5" y="5" width="61" height="14.5"/>
180 <fontDescription key="fontDescription" type="system" weight="semibold" pointSize="12"/>
180 <fontDescription key="fontDescription" type="system" weight="semibold" pointSize="12"/>
181 <color key="textColor" white="0.0" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
181 <color key="textColor" white="0.0" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
182 <nil key="highlightedColor"/>
182 <nil key="highlightedColor"/>
@@ -204,28 +204,28 @@
204 <constraints>
204 <constraints>
205 <constraint firstItem="Y9G-UI-WV7" firstAttribute="trailing" secondItem="vUN-kp-3ea" secondAttribute="trailing" id="22z-Ck-vsZ"/>
205 <constraint firstItem="Y9G-UI-WV7" firstAttribute="trailing" secondItem="vUN-kp-3ea" secondAttribute="trailing" id="22z-Ck-vsZ"/>
206 <constraint firstItem="a6N-9A-8y5" firstAttribute="leading" secondItem="vUN-kp-3ea" secondAttribute="leading" id="5c8-YB-dSB"/>
206 <constraint firstItem="a6N-9A-8y5" firstAttribute="leading" secondItem="vUN-kp-3ea" secondAttribute="leading" id="5c8-YB-dSB"/>
207− <constraint firstAttribute="bottom" secondItem="954-g3-FZD" secondAttribute="bottom" constant="37" id="C3k-Mb-wT4"/>
207+ <constraint firstItem="vUN-kp-3ea" firstAttribute="bottom" secondItem="954-g3-FZD" secondAttribute="bottom" constant="37" id="C3k-Mb-wT4"/>
208 <constraint firstItem="Y9G-UI-WV7" firstAttribute="top" secondItem="5dC-Lq-opV" secondAttribute="bottom" id="E97-Lg-K2s"/>
208 <constraint firstItem="Y9G-UI-WV7" firstAttribute="top" secondItem="5dC-Lq-opV" secondAttribute="bottom" id="E97-Lg-K2s"/>
209 <constraint firstItem="vUN-kp-3ea" firstAttribute="trailing" secondItem="fvt-zf-8tU" secondAttribute="trailing" id="Eeh-zB-KWe"/>
209 <constraint firstItem="vUN-kp-3ea" firstAttribute="trailing" secondItem="fvt-zf-8tU" secondAttribute="trailing" id="Eeh-zB-KWe"/>
210 <constraint firstItem="a6N-9A-8y5" firstAttribute="trailing" secondItem="vUN-kp-3ea" secondAttribute="trailing" id="F03-yv-41V"/>
210 <constraint firstItem="a6N-9A-8y5" firstAttribute="trailing" secondItem="vUN-kp-3ea" secondAttribute="trailing" id="F03-yv-41V"/>
211 <constraint firstItem="pgz-8G-Kx4" firstAttribute="leading" secondItem="vUN-kp-3ea" secondAttribute="leading" id="G0y-2f-SkS"/>
211 <constraint firstItem="pgz-8G-Kx4" firstAttribute="leading" secondItem="vUN-kp-3ea" secondAttribute="leading" id="G0y-2f-SkS"/>
212 <constraint firstItem="5dC-Lq-opV" firstAttribute="centerX" secondItem="vUN-kp-3ea" secondAttribute="centerX" id="If5-v7-UAj"/>
212 <constraint firstItem="5dC-Lq-opV" firstAttribute="centerX" secondItem="vUN-kp-3ea" secondAttribute="centerX" id="If5-v7-UAj"/>
213− <constraint firstAttribute="bottom" secondItem="pgz-8G-Kx4" secondAttribute="bottom" constant="137" id="Lgn-Nv-wjD"/>
213+ <constraint firstItem="vUN-kp-3ea" firstAttribute="bottom" secondItem="pgz-8G-Kx4" secondAttribute="bottom" constant="137" id="Lgn-Nv-wjD"/>
214 <constraint firstItem="vUN-kp-3ea" firstAttribute="trailing" secondItem="954-g3-FZD" secondAttribute="trailing" id="MGt-d4-Win"/>
214 <constraint firstItem="vUN-kp-3ea" firstAttribute="trailing" secondItem="954-g3-FZD" secondAttribute="trailing" id="MGt-d4-Win"/>
215 <constraint firstItem="fvt-zf-8tU" firstAttribute="leading" secondItem="vUN-kp-3ea" secondAttribute="leading" id="SaI-rP-2em"/>
215 <constraint firstItem="fvt-zf-8tU" firstAttribute="leading" secondItem="vUN-kp-3ea" secondAttribute="leading" id="SaI-rP-2em"/>
216 <constraint firstItem="Igw-O9-W92" firstAttribute="centerX" secondItem="vUN-kp-3ea" secondAttribute="centerX" id="TtM-Bc-V1U"/>
216 <constraint firstItem="Igw-O9-W92" firstAttribute="centerX" secondItem="vUN-kp-3ea" secondAttribute="centerX" id="TtM-Bc-V1U"/>
217− <constraint firstItem="Igw-O9-W92" firstAttribute="bottom" secondItem="iN0-l3-epB" secondAttribute="bottom" id="V9u-Eu-VME"/>
217+ <constraint firstItem="Igw-O9-W92" firstAttribute="bottom" secondItem="vUN-kp-3ea" secondAttribute="bottom" id="V9u-Eu-VME"/>
218 <constraint firstItem="vUN-kp-3ea" firstAttribute="trailing" secondItem="pgz-8G-Kx4" secondAttribute="trailing" id="Z6D-PY-Jrh"/>
218 <constraint firstItem="vUN-kp-3ea" firstAttribute="trailing" secondItem="pgz-8G-Kx4" secondAttribute="trailing" id="Z6D-PY-Jrh"/>
219 <constraint firstItem="Igw-O9-W92" firstAttribute="top" secondItem="a6N-9A-8y5" secondAttribute="bottom" constant="8" id="f4D-nq-HMa"/>
219 <constraint firstItem="Igw-O9-W92" firstAttribute="top" secondItem="a6N-9A-8y5" secondAttribute="bottom" constant="8" id="f4D-nq-HMa"/>
220 <constraint firstItem="Y9G-UI-WV7" firstAttribute="leading" secondItem="vUN-kp-3ea" secondAttribute="leading" id="gZw-8a-dTG"/>
220 <constraint firstItem="Y9G-UI-WV7" firstAttribute="leading" secondItem="vUN-kp-3ea" secondAttribute="leading" id="gZw-8a-dTG"/>
221 <constraint firstItem="954-g3-FZD" firstAttribute="leading" secondItem="vUN-kp-3ea" secondAttribute="leading" id="itw-0z-3i7"/>
221 <constraint firstItem="954-g3-FZD" firstAttribute="leading" secondItem="vUN-kp-3ea" secondAttribute="leading" id="itw-0z-3i7"/>
222− <constraint firstAttribute="bottom" secondItem="fvt-zf-8tU" secondAttribute="bottom" constant="137" id="lOx-ke-O6a"/>
222+ <constraint firstItem="vUN-kp-3ea" firstAttribute="bottom" secondItem="fvt-zf-8tU" secondAttribute="bottom" constant="137" id="lOx-ke-O6a"/>
223 <constraint firstItem="z9p-OK-tL7" firstAttribute="top" secondItem="52e-LM-cF6" secondAttribute="bottom" constant="9" id="ldj-Qh-p0k"/>
223 <constraint firstItem="z9p-OK-tL7" firstAttribute="top" secondItem="52e-LM-cF6" secondAttribute="bottom" constant="9" id="ldj-Qh-p0k"/>
224− <constraint firstItem="fvt-zf-8tU" firstAttribute="top" secondItem="iN0-l3-epB" secondAttribute="top" constant="29" id="pSg-dd-INI"/>
224+ <constraint firstItem="fvt-zf-8tU" firstAttribute="top" secondItem="vUN-kp-3ea" secondAttribute="top" constant="29" id="pSg-dd-INI"/>
225− <constraint firstItem="pgz-8G-Kx4" firstAttribute="top" secondItem="iN0-l3-epB" secondAttribute="top" constant="29" id="vfO-LG-tqR"/>
225+ <constraint firstItem="pgz-8G-Kx4" firstAttribute="top" secondItem="vUN-kp-3ea" secondAttribute="top" constant="29" id="vfO-LG-tqR"/>
226− <constraint firstItem="954-g3-FZD" firstAttribute="top" secondItem="iN0-l3-epB" secondAttribute="top" constant="97" id="vhK-2E-j3k"/>
226+ <constraint firstItem="954-g3-FZD" firstAttribute="top" secondItem="vUN-kp-3ea" secondAttribute="top" constant="97" id="vhK-2E-j3k"/>
227− <constraint firstItem="5dC-Lq-opV" firstAttribute="top" secondItem="iN0-l3-epB" secondAttribute="top" id="xOt-l0-Vzy"/>
227+ <constraint firstItem="5dC-Lq-opV" firstAttribute="top" secondItem="vUN-kp-3ea" secondAttribute="top" id="xOt-l0-Vzy"/>
228− <constraint firstItem="a6N-9A-8y5" firstAttribute="top" secondItem="iN0-l3-epB" secondAttribute="top" constant="97" id="yyf-QB-vfF"/>
228+ <constraint firstItem="a6N-9A-8y5" firstAttribute="top" secondItem="vUN-kp-3ea" secondAttribute="top" constant="97" id="yyf-QB-vfF"/>
229 </constraints>
229 </constraints>
230 <freeformSimulatedSizeMetrics key="simulatedDestinationMetrics"/>
230 <freeformSimulatedSizeMetrics key="simulatedDestinationMetrics"/>
231 <viewLayoutGuide key="safeArea" id="vUN-kp-3ea"/>
231 <viewLayoutGuide key="safeArea" id="vUN-kp-3ea"/>
Hookah Tau/Controllers/Client/Reservations/Steps/2/SecondStepReservationViewController.swift+4−4
@@ -84,7 +84,7 @@ class SecondStepReservationViewController: BaseViewController {
84 view.addSubview(map)
84 view.addSubview(map)
85
85
86 NSLayoutConstraint.activate([
86 NSLayoutConstraint.activate([
87− map.topAnchor.constraint(equalTo: view.safeAreaLayoutGuide.topAnchor, constant: 10),
87+ map.topAnchor.constraint(equalTo: view.safeAreaLayoutGuide.topAnchor, constant: 0),
88 map.leadingAnchor.constraint(equalTo: view.leadingAnchor, constant: 0),
88 map.leadingAnchor.constraint(equalTo: view.leadingAnchor, constant: 0),
89 map.trailingAnchor.constraint(equalTo: view.trailingAnchor, constant: 0),
89 map.trailingAnchor.constraint(equalTo: view.trailingAnchor, constant: 0),
90 map.bottomAnchor.constraint(equalTo: childContentView.topAnchor, constant: 0)
90 map.bottomAnchor.constraint(equalTo: childContentView.topAnchor, constant: 0)
@@ -92,10 +92,10 @@ class SecondStepReservationViewController: BaseViewController {
92
92
93 let width = view.frame.width
93 let width = view.frame.width
94
94
95− mapView?.scrollViewParent.setContentOffset(CGPoint(x: 0, y: 100), animated: false)
95+ mapView?.scrollViewParent.setContentOffset(CGPoint(x: 0, y: -100), animated: false)
96− mapView?.scrollViewParent.contentInset = UIEdgeInsets(top: 0,
96+ mapView?.scrollViewParent.contentInset = UIEdgeInsets(top: 100,
97 left: width / 2,
97 left: width / 2,
98− bottom: -100,
98+ bottom: 100,
99 right: width / 2)
99 right: width / 2)
100 mapView?.isUserInteractionEnabled = false
100 mapView?.isUserInteractionEnabled = false
101 view.sendSubviewToBack(map)
101 view.sendSubviewToBack(map)
Hookah Tau/Controllers/Client/Reservations/Steps/2/SecondStepView.swift+7
@@ -23,6 +23,8 @@ class SecondStepView: UIView {
23
23
24 @IBOutlet weak var totalBookingLabel: UILabel!
24 @IBOutlet weak var totalBookingLabel: UILabel!
25
25
26+ @IBOutlet weak var infoLabel: UILabel!
27+
26 @IBOutlet weak var specialLabel: UILabel! {
28 @IBOutlet weak var specialLabel: UILabel! {
27 didSet {
29 didSet {
28 let m = NSMutableAttributedString(string: "Если Вам нужно что-то особенное, Вы можете связаться с администратором ")
30 let m = NSMutableAttributedString(string: "Если Вам нужно что-то особенное, Вы можете связаться с администратором ")
@@ -129,6 +131,7 @@ class SecondStepView: UIView {
129 @IBAction func sliderValueChanged(_ sender: UISlider) {
131 @IBAction func sliderValueChanged(_ sender: UISlider) {
130 let value = Int(sender.value)
132 let value = Int(sender.value)
131 numberOfGuestsLabel.text = "Количество гостей: \(value)"
133 numberOfGuestsLabel.text = "Количество гостей: \(value)"
134+ infoLabel.text = getNumberOfCalians(value)
132
135
133 guard let d = data else { return }
136 guard let d = data else { return }
134
137
@@ -148,6 +151,10 @@ class SecondStepView: UIView {
148 UIApplication.shared.open(urlPhone)
151 UIApplication.shared.open(urlPhone)
149 }
152 }
150
153
154+ func getNumberOfCalians(_ sliderValue: Int) -> String {
155+ return "Минимальное количество кальянов: \(sliderValue > 6 ? 2 : 1)"
156+ }
157+
151 // MARK: - Setup
158 // MARK: - Setup
152
159
153 /// Тут происходит установка интервалов. Разное для клиента и админа
160 /// Тут происходит установка интервалов. Разное для клиента и админа
Hookah Tau/Controllers/Client/Reservations/Steps/2/SecondStepView.xib+19−12
@@ -1,9 +1,9 @@
1<?xml version="1.0" encoding="UTF-8"?>
1<?xml version="1.0" encoding="UTF-8"?>
2−<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="15702" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
2+<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="14868" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
3 <device id="retina4_7" orientation="portrait" appearance="light"/>
3 <device id="retina4_7" orientation="portrait" appearance="light"/>
4 <dependencies>
4 <dependencies>
5 <deployment identifier="iOS"/>
5 <deployment identifier="iOS"/>
6− <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="15704"/>
6+ <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="14824"/>
7 <capability name="Safe area layout guides" minToolsVersion="9.0"/>
7 <capability name="Safe area layout guides" minToolsVersion="9.0"/>
8 <capability name="Stack View standard spacing" minToolsVersion="9.0"/>
8 <capability name="Stack View standard spacing" minToolsVersion="9.0"/>
9 <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
9 <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
@@ -12,14 +12,14 @@
12 <placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/>
12 <placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/>
13 <placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
13 <placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
14 <view contentMode="scaleToFill" id="iN0-l3-epB" customClass="SecondStepView" customModule="Hookah_Tau" customModuleProvider="target">
14 <view contentMode="scaleToFill" id="iN0-l3-epB" customClass="SecondStepView" customModule="Hookah_Tau" customModuleProvider="target">
15− <rect key="frame" x="0.0" y="0.0" width="414" height="352"/>
15+ <rect key="frame" x="0.0" y="0.0" width="414" height="394"/>
16 <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
16 <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
17 <subviews>
17 <subviews>
18 <stackView opaque="NO" contentMode="scaleToFill" axis="vertical" alignment="center" spacing="10" translatesAutoresizingMaskIntoConstraints="NO" id="bJ1-1q-VXq">
18 <stackView opaque="NO" contentMode="scaleToFill" axis="vertical" alignment="center" spacing="10" translatesAutoresizingMaskIntoConstraints="NO" id="bJ1-1q-VXq">
19− <rect key="frame" x="20" y="20" width="374" height="80"/>
19+ <rect key="frame" x="20" y="20" width="374" height="131.5"/>
20 <subviews>
20 <subviews>
21 <stackView opaque="NO" contentMode="scaleToFill" axis="vertical" distribution="equalSpacing" alignment="center" spacingType="standard" translatesAutoresizingMaskIntoConstraints="NO" id="Dkh-B7-3Dl">
21 <stackView opaque="NO" contentMode="scaleToFill" axis="vertical" distribution="equalSpacing" alignment="center" spacingType="standard" translatesAutoresizingMaskIntoConstraints="NO" id="Dkh-B7-3Dl">
22− <rect key="frame" x="16.5" y="0.0" width="341.5" height="41"/>
22+ <rect key="frame" x="16.5" y="0.0" width="341.5" height="92.5"/>
23 <subviews>
23 <subviews>
24 <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Забронировать 7 столик на 3 человека 29 марта с 3:00 до 5:30?" textAlignment="center" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="7M9-lI-egu">
24 <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Забронировать 7 столик на 3 человека 29 марта с 3:00 до 5:30?" textAlignment="center" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="7M9-lI-egu">
25 <rect key="frame" x="0.0" y="0.0" width="341.5" height="41"/>
25 <rect key="frame" x="0.0" y="0.0" width="341.5" height="41"/>
@@ -27,10 +27,16 @@
27 <nil key="textColor"/>
27 <nil key="textColor"/>
28 <nil key="highlightedColor"/>
28 <nil key="highlightedColor"/>
29 </label>
29 </label>
30+ <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Минимальное количество кальянов: 2" textAlignment="center" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="zMP-Wa-N6b">
31+ <rect key="frame" x="11" y="72" width="319" height="20.5"/>
32+ <fontDescription key="fontDescription" type="system" weight="semibold" pointSize="17"/>
33+ <nil key="textColor"/>
34+ <nil key="highlightedColor"/>
35+ </label>
30 </subviews>
36 </subviews>
31 </stackView>
37 </stackView>
32 <label opaque="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" textAlignment="center" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="PHb-Nt-9I2">
38 <label opaque="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" textAlignment="center" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="PHb-Nt-9I2">
33− <rect key="frame" x="47" y="51" width="280.5" height="29"/>
39+ <rect key="frame" x="47" y="102.5" width="280.5" height="29"/>
34 <string key="text">Если Вам нужно что-то особенное, Вы можете
40 <string key="text">Если Вам нужно что-то особенное, Вы можете
35связаться с администратором. </string>
41связаться с администратором. </string>
36 <fontDescription key="fontDescription" name=".AppleSystemUIFont" family=".AppleSystemUIFont" pointSize="12"/>
42 <fontDescription key="fontDescription" name=".AppleSystemUIFont" family=".AppleSystemUIFont" pointSize="12"/>
@@ -40,7 +46,7 @@
40 </subviews>
46 </subviews>
41 </stackView>
47 </stackView>
42 <stackView opaque="NO" contentMode="scaleToFill" axis="vertical" spacing="10" translatesAutoresizingMaskIntoConstraints="NO" id="9c7-IZ-n2p">
48 <stackView opaque="NO" contentMode="scaleToFill" axis="vertical" spacing="10" translatesAutoresizingMaskIntoConstraints="NO" id="9c7-IZ-n2p">
43− <rect key="frame" x="20" y="120" width="373.5" height="70"/>
49+ <rect key="frame" x="20" y="171.5" width="373.5" height="60.5"/>
44 <subviews>
50 <subviews>
45 <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Количество гостей: 3" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="QuY-68-2ax">
51 <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Количество гостей: 3" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="QuY-68-2ax">
46 <rect key="frame" x="0.0" y="0.0" width="373.5" height="20.5"/>
52 <rect key="frame" x="0.0" y="0.0" width="373.5" height="20.5"/>
@@ -49,7 +55,7 @@
49 <nil key="highlightedColor"/>
55 <nil key="highlightedColor"/>
50 </label>
56 </label>
51 <slider opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" value="3" minValue="1" maxValue="10" translatesAutoresizingMaskIntoConstraints="NO" id="TrY-MC-Ty0">
57 <slider opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" value="3" minValue="1" maxValue="10" translatesAutoresizingMaskIntoConstraints="NO" id="TrY-MC-Ty0">
52− <rect key="frame" x="-2" y="30.5" width="377.5" height="40.5"/>
58+ <rect key="frame" x="-2" y="30.5" width="377.5" height="31"/>
53 <connections>
59 <connections>
54 <action selector="sliderValueChanged:" destination="iN0-l3-epB" eventType="valueChanged" id="ekZ-3h-EeB"/>
60 <action selector="sliderValueChanged:" destination="iN0-l3-epB" eventType="valueChanged" id="ekZ-3h-EeB"/>
55 </connections>
61 </connections>
@@ -57,7 +63,7 @@
57 </subviews>
63 </subviews>
58 </stackView>
64 </stackView>
59 <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="RJE-Hk-KNh">
65 <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="RJE-Hk-KNh">
60− <rect key="frame" x="0.0" y="210" width="414" height="106"/>
66+ <rect key="frame" x="0.0" y="252" width="414" height="106"/>
61 <subviews>
67 <subviews>
62 <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="dmc-2e-y3T">
68 <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="dmc-2e-y3T">
63 <rect key="frame" x="0.0" y="21" width="414" height="85"/>
69 <rect key="frame" x="0.0" y="21" width="414" height="85"/>
@@ -123,7 +129,7 @@
123 </subviews>
129 </subviews>
124 <color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
130 <color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
125 <constraints>
131 <constraints>
126− <constraint firstAttribute="bottom" secondItem="RJE-Hk-KNh" secondAttribute="bottom" constant="36" id="0W3-e2-hCU"/>
132+ <constraint firstItem="vUN-kp-3ea" firstAttribute="bottom" secondItem="RJE-Hk-KNh" secondAttribute="bottom" constant="36" id="0W3-e2-hCU"/>
127 <constraint firstItem="9c7-IZ-n2p" firstAttribute="leading" secondItem="vUN-kp-3ea" secondAttribute="leading" constant="20" id="94y-7J-ksb"/>
133 <constraint firstItem="9c7-IZ-n2p" firstAttribute="leading" secondItem="vUN-kp-3ea" secondAttribute="leading" constant="20" id="94y-7J-ksb"/>
128 <constraint firstItem="9c7-IZ-n2p" firstAttribute="top" secondItem="bJ1-1q-VXq" secondAttribute="bottom" constant="20" id="9TT-vO-7PZ"/>
134 <constraint firstItem="9c7-IZ-n2p" firstAttribute="top" secondItem="bJ1-1q-VXq" secondAttribute="bottom" constant="20" id="9TT-vO-7PZ"/>
129 <constraint firstItem="RJE-Hk-KNh" firstAttribute="trailing" secondItem="vUN-kp-3ea" secondAttribute="trailing" id="AgS-kP-UNE"/>
135 <constraint firstItem="RJE-Hk-KNh" firstAttribute="trailing" secondItem="vUN-kp-3ea" secondAttribute="trailing" id="AgS-kP-UNE"/>
@@ -131,20 +137,21 @@
131 <constraint firstAttribute="trailing" secondItem="bJ1-1q-VXq" secondAttribute="trailing" constant="20" id="OCH-eC-kP5"/>
137 <constraint firstAttribute="trailing" secondItem="bJ1-1q-VXq" secondAttribute="trailing" constant="20" id="OCH-eC-kP5"/>
132 <constraint firstItem="bJ1-1q-VXq" firstAttribute="leading" secondItem="vUN-kp-3ea" secondAttribute="leading" constant="20" id="PCm-nY-M6p"/>
138 <constraint firstItem="bJ1-1q-VXq" firstAttribute="leading" secondItem="vUN-kp-3ea" secondAttribute="leading" constant="20" id="PCm-nY-M6p"/>
133 <constraint firstItem="vUN-kp-3ea" firstAttribute="trailing" secondItem="9c7-IZ-n2p" secondAttribute="trailing" constant="20.5" id="Rh7-V2-v2u"/>
139 <constraint firstItem="vUN-kp-3ea" firstAttribute="trailing" secondItem="9c7-IZ-n2p" secondAttribute="trailing" constant="20.5" id="Rh7-V2-v2u"/>
134− <constraint firstItem="bJ1-1q-VXq" firstAttribute="top" secondItem="iN0-l3-epB" secondAttribute="top" constant="20" id="SnG-Cy-hHq"/>
140+ <constraint firstItem="bJ1-1q-VXq" firstAttribute="top" secondItem="vUN-kp-3ea" secondAttribute="top" constant="20" id="SnG-Cy-hHq"/>
135 <constraint firstItem="RJE-Hk-KNh" firstAttribute="leading" secondItem="vUN-kp-3ea" secondAttribute="leading" id="fW0-Tt-MpN"/>
141 <constraint firstItem="RJE-Hk-KNh" firstAttribute="leading" secondItem="vUN-kp-3ea" secondAttribute="leading" id="fW0-Tt-MpN"/>
136 </constraints>
142 </constraints>
137 <freeformSimulatedSizeMetrics key="simulatedDestinationMetrics"/>
143 <freeformSimulatedSizeMetrics key="simulatedDestinationMetrics"/>
138 <viewLayoutGuide key="safeArea" id="vUN-kp-3ea"/>
144 <viewLayoutGuide key="safeArea" id="vUN-kp-3ea"/>
139 <connections>
145 <connections>
140 <outlet property="guestSlider" destination="TrY-MC-Ty0" id="mR0-wv-AM7"/>
146 <outlet property="guestSlider" destination="TrY-MC-Ty0" id="mR0-wv-AM7"/>
147+ <outlet property="infoLabel" destination="zMP-Wa-N6b" id="htu-ql-T0O"/>
141 <outlet property="intervalsStackView" destination="IIO-je-eBt" id="gaP-LX-Xed"/>
148 <outlet property="intervalsStackView" destination="IIO-je-eBt" id="gaP-LX-Xed"/>
142 <outlet property="numberOfGuestsLabel" destination="QuY-68-2ax" id="DvK-dr-c3J"/>
149 <outlet property="numberOfGuestsLabel" destination="QuY-68-2ax" id="DvK-dr-c3J"/>
143 <outlet property="scrollView" destination="zk1-3E-2kS" id="b8R-jY-2Q3"/>
150 <outlet property="scrollView" destination="zk1-3E-2kS" id="b8R-jY-2Q3"/>
144 <outlet property="specialLabel" destination="PHb-Nt-9I2" id="hXL-Je-dax"/>
151 <outlet property="specialLabel" destination="PHb-Nt-9I2" id="hXL-Je-dax"/>
145 <outlet property="totalBookingLabel" destination="7M9-lI-egu" id="7YU-yI-Gm4"/>
152 <outlet property="totalBookingLabel" destination="7M9-lI-egu" id="7YU-yI-Gm4"/>
146 </connections>
153 </connections>
147− <point key="canvasLocation" x="-8" y="88.15592203898052"/>
154+ <point key="canvasLocation" x="-8" y="70"/>
148 </view>
155 </view>
149 </objects>
156 </objects>
150</document>
157</document>
Hookah Tau/Controllers/Client/Reservations/Steps/3/ThirdStepReservationViewController.swift+1−1
@@ -139,7 +139,7 @@ class ThirdStepReservationViewController: BaseViewController {
139 guard let res = reservation else { return }
139 guard let res = reservation else { return }
140
140
141 cancelButton.loading = true
141 cancelButton.loading = true
142− reservationService?.deleteReservation(isAdmin: false, uuid: res.uuid, completion: { [weak self] (result) in
142+ reservationService?.deleteReservation(uuid: res.uuid, completion: { [weak self] (result) in
143 self?.cancelButton.loading = false
143 self?.cancelButton.loading = false
144
144
145 if result {
145 if result {
Hookah Tau/Controllers/Client/Reservations/Steps/3/ThirdStepView.xib+3−3
@@ -1,9 +1,9 @@
1<?xml version="1.0" encoding="UTF-8"?>
1<?xml version="1.0" encoding="UTF-8"?>
2−<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="15702" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
2+<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="14868" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
3 <device id="retina4_7" orientation="portrait" appearance="light"/>
3 <device id="retina4_7" orientation="portrait" appearance="light"/>
4 <dependencies>
4 <dependencies>
5 <deployment identifier="iOS"/>
5 <deployment identifier="iOS"/>
6− <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="15704"/>
6+ <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="14824"/>
7 <capability name="Safe area layout guides" minToolsVersion="9.0"/>
7 <capability name="Safe area layout guides" minToolsVersion="9.0"/>
8 <capability name="Stack View standard spacing" minToolsVersion="9.0"/>
8 <capability name="Stack View standard spacing" minToolsVersion="9.0"/>
9 <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
9 <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
@@ -120,7 +120,7 @@
120 <constraint firstItem="0H2-jJ-gOj" firstAttribute="leading" secondItem="vUN-kp-3ea" secondAttribute="leading" constant="20" id="GR6-gI-ecm"/>
120 <constraint firstItem="0H2-jJ-gOj" firstAttribute="leading" secondItem="vUN-kp-3ea" secondAttribute="leading" constant="20" id="GR6-gI-ecm"/>
121 <constraint firstItem="ByV-f1-mVO" firstAttribute="leading" secondItem="vUN-kp-3ea" secondAttribute="leading" id="KKj-7n-eQf"/>
121 <constraint firstItem="ByV-f1-mVO" firstAttribute="leading" secondItem="vUN-kp-3ea" secondAttribute="leading" id="KKj-7n-eQf"/>
122 <constraint firstItem="0H2-jJ-gOj" firstAttribute="top" secondItem="DL4-0a-WxC" secondAttribute="bottom" constant="30" id="VbN-sb-Pko"/>
122 <constraint firstItem="0H2-jJ-gOj" firstAttribute="top" secondItem="DL4-0a-WxC" secondAttribute="bottom" constant="30" id="VbN-sb-Pko"/>
123− <constraint firstItem="DL4-0a-WxC" firstAttribute="top" secondItem="iN0-l3-epB" secondAttribute="top" constant="20" id="cm0-tz-ta4"/>
123+ <constraint firstItem="DL4-0a-WxC" firstAttribute="top" secondItem="vUN-kp-3ea" secondAttribute="top" constant="20" id="cm0-tz-ta4"/>
124 <constraint firstItem="vUN-kp-3ea" firstAttribute="trailing" secondItem="0H2-jJ-gOj" secondAttribute="trailing" constant="20" id="i3D-sP-KlI"/>
124 <constraint firstItem="vUN-kp-3ea" firstAttribute="trailing" secondItem="0H2-jJ-gOj" secondAttribute="trailing" constant="20" id="i3D-sP-KlI"/>
125 <constraint firstAttribute="trailing" secondItem="DL4-0a-WxC" secondAttribute="trailing" constant="20" id="kHp-8n-OTp"/>
125 <constraint firstAttribute="trailing" secondItem="DL4-0a-WxC" secondAttribute="trailing" constant="20" id="kHp-8n-OTp"/>
126 <constraint firstItem="DL4-0a-WxC" firstAttribute="leading" secondItem="vUN-kp-3ea" secondAttribute="leading" constant="20" id="vOg-X1-y93"/>
126 <constraint firstItem="DL4-0a-WxC" firstAttribute="leading" secondItem="vUN-kp-3ea" secondAttribute="leading" constant="20" id="vOg-X1-y93"/>
Hookah Tau/Controllers/Client/Reservations/Steps/change /ChangeReservationViewController.swift−1
@@ -137,7 +137,6 @@ class ChangeReservationViewController: BaseViewController {
137 numberOfGuests: r.numberOfGuests,
137 numberOfGuests: r.numberOfGuests,
138 endTime: r.endTime,
138 endTime: r.endTime,
139 uuid: uuid,
139 uuid: uuid,
140− isAdmin: false,
141 completion: { [weak self] (res) in
140 completion: { [weak self] (res) in
142 if res {
141 if res {
143 self?.coordinator?.finish(Reservation(uuid: uuid, reservationData: r))
142 self?.coordinator?.finish(Reservation(uuid: uuid, reservationData: r))
Hookah Tau/Controllers/Client/Tab bar/Client.storyboard+6−10
@@ -1,14 +1,14 @@
1<?xml version="1.0" encoding="UTF-8"?>
1<?xml version="1.0" encoding="UTF-8"?>
2−<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="15702" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
2+<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="14868" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
3 <device id="retina6_1" orientation="portrait" appearance="light"/>
3 <device id="retina6_1" orientation="portrait" appearance="light"/>
4 <dependencies>
4 <dependencies>
5 <deployment identifier="iOS"/>
5 <deployment identifier="iOS"/>
6− <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="15704"/>
6+ <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="14824"/>
7 <capability name="Safe area layout guides" minToolsVersion="9.0"/>
7 <capability name="Safe area layout guides" minToolsVersion="9.0"/>
8 <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
8 <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
9 </dependencies>
9 </dependencies>
10 <scenes>
10 <scenes>
11− <!--Профиль-->
11+ <!--Navigation Controller-->
12 <scene sceneID="b0t-Wu-VhQ">
12 <scene sceneID="b0t-Wu-VhQ">
13 <objects>
13 <objects>
14 <viewController id="qqN-qg-VJ7" customClass="UINavigationController" sceneMemberID="viewController">
14 <viewController id="qqN-qg-VJ7" customClass="UINavigationController" sceneMemberID="viewController">
@@ -18,13 +18,13 @@
18 <color key="backgroundColor" systemColor="systemBackgroundColor" cocoaTouchSystemColor="whiteColor"/>
18 <color key="backgroundColor" systemColor="systemBackgroundColor" cocoaTouchSystemColor="whiteColor"/>
19 <viewLayoutGuide key="safeArea" id="WgY-fu-N23"/>
19 <viewLayoutGuide key="safeArea" id="WgY-fu-N23"/>
20 </view>
20 </view>
21− <tabBarItem key="tabBarItem" title="Профиль" image="person" id="vPo-1j-5WO"/>
21+ <tabBarItem key="tabBarItem" systemItem="contacts" id="vPo-1j-5WO"/>
22 </viewController>
22 </viewController>
23 <placeholder placeholderIdentifier="IBFirstResponder" id="zv0-gE-V7c" userLabel="First Responder" customClass="UIResponder" sceneMemberID="firstResponder"/>
23 <placeholder placeholderIdentifier="IBFirstResponder" id="zv0-gE-V7c" userLabel="First Responder" customClass="UIResponder" sceneMemberID="firstResponder"/>
24 </objects>
24 </objects>
25 <point key="canvasLocation" x="-166" y="195"/>
25 <point key="canvasLocation" x="-166" y="195"/>
26 </scene>
26 </scene>
27− <!--Брони-->
27+ <!--Navigation Controller-->
28 <scene sceneID="nQv-Ks-RjM">
28 <scene sceneID="nQv-Ks-RjM">
29 <objects>
29 <objects>
30 <viewController id="MGt-zZ-AbL" customClass="UINavigationController" sceneMemberID="viewController">
30 <viewController id="MGt-zZ-AbL" customClass="UINavigationController" sceneMemberID="viewController">
@@ -34,7 +34,7 @@
34 <color key="backgroundColor" systemColor="systemBackgroundColor" cocoaTouchSystemColor="whiteColor"/>
34 <color key="backgroundColor" systemColor="systemBackgroundColor" cocoaTouchSystemColor="whiteColor"/>
35 <viewLayoutGuide key="safeArea" id="vjZ-Ji-o7T"/>
35 <viewLayoutGuide key="safeArea" id="vjZ-Ji-o7T"/>
36 </view>
36 </view>
37− <tabBarItem key="tabBarItem" title="Брони" image="stack" id="B7T-zH-VfU"/>
37+ <tabBarItem key="tabBarItem" systemItem="mostViewed" id="B7T-zH-VfU"/>
38 </viewController>
38 </viewController>
39 <placeholder placeholderIdentifier="IBFirstResponder" id="W83-e1-iNk" userLabel="First Responder" customClass="UIResponder" sceneMemberID="firstResponder"/>
39 <placeholder placeholderIdentifier="IBFirstResponder" id="W83-e1-iNk" userLabel="First Responder" customClass="UIResponder" sceneMemberID="firstResponder"/>
40 </objects>
40 </objects>
@@ -59,8 +59,4 @@
59 <point key="canvasLocation" x="-1081" y="-130"/>
59 <point key="canvasLocation" x="-1081" y="-130"/>
60 </scene>
60 </scene>
61 </scenes>
61 </scenes>
62− <resources>
63− <image name="person" width="25" height="24"/>
64− <image name="stack" width="25" height="24"/>
65− </resources>
66</document>
62</document>
Hookah Tau/Controllers/Client/Tab bar/ClientTabbarController.swift+6−6
@@ -10,18 +10,18 @@ import Foundation
10import UIKit
10import UIKit
11
11
12protocol TabbarView: class {
12protocol TabbarView: class {
13− var onReservationFlowSelect: TabbarClosure? { get set }
13+ var onReservationFlowSelect: ((UINavigationController) -> ())? { get set }
14− var onProfileFlowSelect: TabbarClosure? { get set }
14+ var onProfileFlowSelect: ((UINavigationController) -> ())? { get set }
15− var onViewDidLoad: TabbarClosure? { get set }
15+ var onViewDidLoad: ((UINavigationController) -> ())? { get set }
16}
16}
17
17
18final class ClientTabbarController: UITabBarController, UITabBarControllerDelegate, TabbarView {
18final class ClientTabbarController: UITabBarController, UITabBarControllerDelegate, TabbarView {
19
19
20 // MARK: - Properties
20 // MARK: - Properties
21
21
22− var onReservationFlowSelect: TabbarClosure?
22+ var onReservationFlowSelect: ((UINavigationController) -> ())?
23− var onProfileFlowSelect: TabbarClosure?
23+ var onProfileFlowSelect: ((UINavigationController) -> ())?
24− var onViewDidLoad: TabbarClosure?
24+ var onViewDidLoad: ((UINavigationController) -> ())?
25
25
26
26
27 // MARK: - Lifecycle
27 // MARK: - Lifecycle
Hookah Tau/Controllers/Client/Tab bar/ClientTabbarCoordinator.swift+3−3
@@ -8,10 +8,10 @@
8
8
9import UIKit
9import UIKit
10
10
11−typealias TabbarClosure = ((UINavigationController) -> ())
12−
13class ClientTabbarCoordinator: BaseCoordinator {
11class ClientTabbarCoordinator: BaseCoordinator {
14
12
13+ typealias TabbarClosure = ((UINavigationController) -> ())
14+
15 // MARK: - Lifecycle
15 // MARK: - Lifecycle
16
16
17 override func start() {
17 override func start() {
@@ -37,7 +37,7 @@ class ClientTabbarCoordinator: BaseCoordinator {
37 }
37 }
38 }
38 }
39
39
40− private func runProfileFlow() -> TabbarClosure {
40+ private func runProfileFlow() -> TabbarClosure{
41 return { navigationController in
41 return { navigationController in
42 if navigationController.viewControllers.isEmpty {
42 if navigationController.viewControllers.isEmpty {
43 let profileCoordinator = ProfileCoordinator(navigationController: navigationController)
43 let profileCoordinator = ProfileCoordinator(navigationController: navigationController)
Hookah Tau/Controllers/Picker view/IntervalPickerView.swiftdeleted−265
@@ -1,265 +0,0 @@
1−//
2−// IntervalPickerView.swift
3−// Hookah Tau
4−//
5−// Created by cstore on 19/12/2019.
6−// Copyright © 2019 Daria Rednikina. All rights reserved.
7−//
8−
9−import UIKit
10−
11−struct IntervalPickerModel {
12− var startTime: Date
13− var endTime: Date
14−}
15−
16−protocol PickerViewUpdater: class {
17− func update(withModel model: IntervalPickerModel)
18−}
19−
20−class IntervalPickerView: UIView {
21−
22− // MARK: - IBAOutlets
23−
24− @IBOutlet weak var scrollView: UIScrollView!
25−
26− @IBOutlet weak var intervalsStackView: UIStackView!
27−
28− // MARK: - Properties
29−
30− // констрейнты начала и конца интервала
31− var startLeadingConstraint: NSLayoutConstraint!
32− var endLeadingConstraint: NSLayoutConstraint!
33−
34− var startPoint: UIImageView = {
35− var view = UIImageView()
36− view.isUserInteractionEnabled = true
37− view.image = #imageLiteral(resourceName: "handle_left")
38− view.translatesAutoresizingMaskIntoConstraints = false
39− return view
40− }()
41−
42− var endPoint: UIImageView = {
43− var view = UIImageView()
44− view.isUserInteractionEnabled = true
45− view.image = #imageLiteral(resourceName: "Group")
46− view.translatesAutoresizingMaskIntoConstraints = false
47− return view
48− }()
49−
50− /// Интервал
51− var fillInterval: UIView = {
52− var view = UIView()
53− view.backgroundColor = #colorLiteral(red: 0, green: 0.5921568627, blue: 1, alpha: 0.3426262843)
54− view.translatesAutoresizingMaskIntoConstraints = false
55− return view
56− }()
57−
58− /// Время начала вертелки.
59− /// Для клиента это 12:00 смены (надо вызвать метод для получения текущей смены).
60− /// Для администратора это `t` - 24h
61− var startDate: Date?
62−
63− /// Моделька для смены промежутков
64− var model: IntervalPickerModel? {
65− didSet {
66− guard let model = model else { return }
67− updater?.update(withModel: model)
68− }
69− }
70−
71− weak var updater: PickerViewUpdater?
72−
73− // MARK: - bind
74−
75− func bind(withModel model: ReservationData, user isAdmin: Bool, intervals: [ReservationPeriod]) {
76− // isAdmin
77− let isAdmin = DataStorage.standard.getUserModel()?.isAdmin ?? false
78−
79− let (start, _) = isAdmin ? model.startTime.getAdminStartingAndEndPoint() : model.startTime.getClientStartingAndEndPoint()
80−
81− startDate = start
82−
83− setUpIntervals(isAdmin)
84− setUpReservedIntervals(intervals, isAdmin)
85− setUpBookingPeriod(model.startTime, model.endTime)
86− }
87−
88− /// Тут происходит установка интервалов. Разное для клиента и админа
89− func setUpIntervals(_ isAdmin: Bool) {
90− guard let startPoint = startDate else { return }
91−
92− let startingPoint = isAdmin ? startPoint.getAdminsStartingPoint() : Constants.clientStartingPoint
93− let endingPoint = startingPoint + (isAdmin ? Constants.adminDuration : Constants.clientDuration)
94−
95− for period in startingPoint...endingPoint {
96− let timePointView = TimePointView.loadFromNib()
97− timePointView?.setUp(withTimePoint: period)
98− let view = UIView(frame: CGRect(x: 0, y: 0, width: 35, height: 106))
99− view.addSubviewThatFills(timePointView)
100− intervalsStackView.addArrangedSubview(view)
101− }
102− }
103−
104− private func setUpBookingPeriod(_ startTime: Date, _ endTime: Date? = nil) {
105− self.scrollView.addSubview(startPoint)
106− self.scrollView.addSubview(endPoint)
107− self.scrollView.addSubview(fillInterval)
108−
109− guard let startDate = startDate else { return }
110−
111− let startConstr = CGFloat(startTime.getMinutesPeriods(fromStart: startDate) * Constants.widthTimePoint)
112−
113− scrollView.setContentOffset(CGPoint(x: startConstr - 50, y: 0), animated: true)
114−
115− startLeadingConstraint = startPoint.leftAnchor.constraint(equalTo: scrollView.leftAnchor,
116− constant: startConstr)
117−
118− if let end = endTime {
119− let endConstr = CGFloat(end.getMinutesPeriods(fromStart: startDate) * Constants.widthTimePoint)
120− endLeadingConstraint = endPoint.leftAnchor.constraint(equalTo: scrollView.leftAnchor,
121− constant: endConstr)
122− } else {
123− endLeadingConstraint = endPoint.leftAnchor.constraint(equalTo: scrollView.leftAnchor,
124− constant:startConstr + Constants.minBookingLength)
125− }
126−
127− NSLayoutConstraint.activate([
128−
129− startPoint.bottomAnchor.constraint(equalTo: scrollView.bottomAnchor, constant: 0),
130− endPoint.bottomAnchor.constraint(equalTo: scrollView.bottomAnchor, constant: 0),
131−
132− startPoint.widthAnchor.constraint(equalToConstant: Constants.pointWidth),
133− endPoint.widthAnchor.constraint(equalToConstant: Constants.pointWidth),
134−
135− startPoint.heightAnchor.constraint(equalToConstant: Constants.pointHeight),
136− endPoint.heightAnchor.constraint(equalToConstant: Constants.pointHeight),
137−
138− startLeadingConstraint,
139− endLeadingConstraint,
140−
141− fillInterval.leftAnchor.constraint(equalTo: startPoint.rightAnchor, constant: 0),
142− fillInterval.rightAnchor.constraint(equalTo: endPoint.leftAnchor, constant: 0),
143−
144− fillInterval.heightAnchor.constraint(equalToConstant: Constants.pointHeight),
145− fillInterval.bottomAnchor.constraint(equalTo: scrollView.bottomAnchor, constant: 0)
146− ])
147−
148− let scrollViewPanStartGesture = UIPanGestureRecognizer(target: self, action: #selector(handlePanStart(recognizer:)))
149− startPoint.addGestureRecognizer(scrollViewPanStartGesture)
150−
151− let scrollViewPanEndGesture = UIPanGestureRecognizer(target: self, action: #selector(handlePanEnd(recognizer:)))
152− endPoint.addGestureRecognizer(scrollViewPanEndGesture)
153− }
154−
155− func setUpReservedIntervals(_ reservations: [ReservationPeriod], _ isAdmin: Bool) {
156−
157− for reservation in reservations {
158− let uiview = UIView(frame: CGRect(x: 0, y: 0, width: Constants.widthTimePoint * reservation.duration, height: Constants.heightIntervals))
159− uiview.backgroundColor = #colorLiteral(red: 0.8039215803, green: 0.8039215803, blue: 0.8039215803, alpha: 0.5)
160−
161−
162− uiview.translatesAutoresizingMaskIntoConstraints = false
163− scrollView.addSubview(uiview)
164−
165− guard let startDate = startDate else { return }
166−
167− let s = reservation.startTime.getMinutesPeriods(fromStart: startDate) * Constants.widthTimePoint
168− let d = reservation.duration * Constants.widthTimePoint
169−
170− let startTime = s < 0 ? 0 : s
171−
172− let total = (isAdmin ? Constants.adminDuration : Constants.clientDuration) * Constants.widthTimePoint
173− var duration = 0
174− if s < 0 {
175− duration = reservation.endTime.getMinutesPeriods(fromStart: startDate) * Constants.widthTimePoint
176− } else {
177− duration = (s + d) > total ? total - s : d
178− }
179−
180− NSLayoutConstraint.activate([
181− uiview.bottomAnchor.constraint(equalToSystemSpacingBelow: scrollView.bottomAnchor, multiplier: 0),
182− uiview.leftAnchor.constraint(equalTo: scrollView.leftAnchor,
183− constant: CGFloat(Constants.widthTimePoint / 2 + startTime)),
184− uiview.widthAnchor.constraint(equalToConstant: CGFloat(duration)),
185− uiview.heightAnchor.constraint(equalToConstant: CGFloat(Constants.heightIntervals))
186− ])
187− }
188− }
189−
190− // MARK: - Pan
191−
192− @objc func handlePanStart(recognizer:UIPanGestureRecognizer) {
193−
194− let translation = recognizer.translation(in: self.intervalsStackView)
195− let duration = abs(startLeadingConstraint.constant + translation.x - endLeadingConstraint.constant)
196−
197− if let view = recognizer.view, duration >= Constants.minBookingLength {
198− startLeadingConstraint.constant += translation.x
199−
200− changeTime(startLeadingConstraint, .start)
201−
202− view.setNeedsUpdateConstraints()
203− }
204−
205− recognizer.setTranslation(CGPoint.zero, in: self.intervalsStackView)
206− }
207−
208− @objc func handlePanEnd(recognizer:UIPanGestureRecognizer) {
209−
210− let translation = recognizer.translation(in: self.intervalsStackView)
211− let duration = abs(startLeadingConstraint.constant - (endLeadingConstraint.constant + translation.x))
212−
213− if let view = recognizer.view, duration >= Constants.minBookingLength {
214− endLeadingConstraint.constant += translation.x
215−
216− changeTime(endLeadingConstraint, .end)
217− view.setNeedsUpdateConstraints()
218− }
219−
220− recognizer.setTranslation(CGPoint.zero, in: self.intervalsStackView)
221− }
222−
223− func changeTime(_ constraint: NSLayoutConstraint, _ period: Period) {
224− guard let startDate = startDate, let m = model else { return }
225−
226− let offset = Int(constraint.constant) % Constants.widthTimePoint
227−
228− if offset == 0 {
229− let p = Int(constraint.constant) / Constants.widthTimePoint
230− let time = startDate.addPeriods(p)
231−
232− switch period {
233− case .start:
234− model = IntervalPickerModel(startTime: time,
235− endTime: m.endTime)
236− case .end:
237− model = IntervalPickerModel(startTime: m.startTime,
238− endTime: time)
239− }
240− }
241− }
242−}
243−
244−extension IntervalPickerView {
245− enum Constants {
246− static let widthTimePoint = 11
247−
248− static let adminDuration = 288
249− static let clientDuration = 90
250− // 12:00 = 12 * 6
251− static let clientStartingPoint = 72
252−
253− static let pointWidth: CGFloat = 19
254− static let pointHeight: CGFloat = 85
255−
256− static let minBookingLength: CGFloat = 132
257−
258− static let heightIntervals = 85
259− }
260−
261− enum Period {
262− case start
263− case end
264− }
265−}
Hookah Tau/Controllers/Picker view/IntervalPickerView.xibdeleted−84
@@ -1,84 +0,0 @@
1−<?xml version="1.0" encoding="UTF-8"?>
2−<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="15702" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
3− <device id="retina4_7" orientation="portrait" appearance="light"/>
4− <dependencies>
5− <deployment identifier="iOS"/>
6− <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="15704"/>
7− <capability name="Safe area layout guides" minToolsVersion="9.0"/>
8− <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
9− </dependencies>
10− <objects>
11− <placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/>
12− <placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
13− <view contentMode="scaleToFill" id="iN0-l3-epB" customClass="IntervalPickerView" customModule="Hookah_Tau" customModuleProvider="target">
14− <rect key="frame" x="0.0" y="0.0" width="414" height="106"/>
15− <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
16− <subviews>
17− <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="QgM-NY-puV">
18− <rect key="frame" x="0.0" y="21" width="414" height="85"/>
19− <subviews>
20− <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="0TX-kl-OPO">
21− <rect key="frame" x="0.0" y="84" width="414" height="1"/>
22− <color key="backgroundColor" white="0.66666666669999997" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
23− <constraints>
24− <constraint firstAttribute="height" constant="1" id="Sf4-dJ-qsD"/>
25− </constraints>
26− </view>
27− <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="Wcb-MB-8F8">
28− <rect key="frame" x="0.0" y="0.0" width="414" height="1"/>
29− <color key="backgroundColor" white="0.66666666669999997" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
30− <constraints>
31− <constraint firstAttribute="height" constant="1" id="DCx-L0-09t"/>
32− </constraints>
33− </view>
34− </subviews>
35− <color key="backgroundColor" red="0.89019607840000003" green="0.89019607840000003" blue="0.89019607840000003" alpha="1" colorSpace="custom" customColorSpace="calibratedRGB"/>
36− <constraints>
37− <constraint firstAttribute="height" constant="85" id="1jc-QZ-f8e"/>
38− <constraint firstItem="Wcb-MB-8F8" firstAttribute="top" secondItem="QgM-NY-puV" secondAttribute="top" id="2tI-Or-OAH"/>
39− <constraint firstItem="0TX-kl-OPO" firstAttribute="leading" secondItem="QgM-NY-puV" secondAttribute="leading" id="ZM5-CV-OL9"/>
40− <constraint firstItem="Wcb-MB-8F8" firstAttribute="leading" secondItem="QgM-NY-puV" secondAttribute="leading" id="adB-mX-tf3"/>
41− <constraint firstAttribute="bottom" secondItem="0TX-kl-OPO" secondAttribute="bottom" id="iji-xK-gU8"/>
42− <constraint firstAttribute="trailing" secondItem="Wcb-MB-8F8" secondAttribute="trailing" id="kK5-X5-zT5"/>
43− <constraint firstAttribute="trailing" secondItem="0TX-kl-OPO" secondAttribute="trailing" id="x2r-sO-Npw"/>
44− </constraints>
45− </view>
46− <scrollView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="e97-Yk-hHi">
47− <rect key="frame" x="0.0" y="0.0" width="414" height="106"/>
48− <subviews>
49− <stackView opaque="NO" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="4n8-V3-m5t">
50− <rect key="frame" x="0.0" y="0.0" width="414" height="106"/>
51− </stackView>
52− </subviews>
53− <constraints>
54− <constraint firstItem="4n8-V3-m5t" firstAttribute="height" secondItem="e97-Yk-hHi" secondAttribute="height" id="8p9-v6-iaH"/>
55− <constraint firstAttribute="bottom" secondItem="4n8-V3-m5t" secondAttribute="bottom" id="ajS-3D-lcm"/>
56− <constraint firstItem="4n8-V3-m5t" firstAttribute="top" secondItem="e97-Yk-hHi" secondAttribute="top" id="eN5-bZ-4Wt"/>
57− <constraint firstItem="4n8-V3-m5t" firstAttribute="width" secondItem="e97-Yk-hHi" secondAttribute="width" id="enn-uv-GR2"/>
58− <constraint firstAttribute="trailing" secondItem="4n8-V3-m5t" secondAttribute="trailing" id="fIk-7A-mrL"/>
59− <constraint firstItem="4n8-V3-m5t" firstAttribute="leading" secondItem="e97-Yk-hHi" secondAttribute="leading" id="fcr-TD-pYK"/>
60− </constraints>
61− <viewLayoutGuide key="contentLayoutGuide" id="sxJ-gI-ilG"/>
62− <viewLayoutGuide key="frameLayoutGuide" id="yj8-fL-J9D"/>
63− </scrollView>
64− </subviews>
65− <color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
66− <constraints>
67− <constraint firstItem="vUN-kp-3ea" firstAttribute="bottom" secondItem="QgM-NY-puV" secondAttribute="bottom" id="JdC-xm-YdY"/>
68− <constraint firstItem="e97-Yk-hHi" firstAttribute="leading" secondItem="vUN-kp-3ea" secondAttribute="leading" id="Oqv-Y6-Qp3"/>
69− <constraint firstItem="e97-Yk-hHi" firstAttribute="trailing" secondItem="vUN-kp-3ea" secondAttribute="trailing" id="YH5-He-gHk"/>
70− <constraint firstItem="vUN-kp-3ea" firstAttribute="trailing" secondItem="QgM-NY-puV" secondAttribute="trailing" id="ewc-Nf-fIZ"/>
71− <constraint firstItem="QgM-NY-puV" firstAttribute="leading" secondItem="vUN-kp-3ea" secondAttribute="leading" id="jGH-FL-IC0"/>
72− <constraint firstItem="e97-Yk-hHi" firstAttribute="bottom" secondItem="vUN-kp-3ea" secondAttribute="bottom" id="lOW-0Q-pvW"/>
73− <constraint firstItem="e97-Yk-hHi" firstAttribute="top" secondItem="vUN-kp-3ea" secondAttribute="top" symbolic="YES" id="x39-q5-hdD"/>
74− </constraints>
75− <freeformSimulatedSizeMetrics key="simulatedDestinationMetrics"/>
76− <viewLayoutGuide key="safeArea" id="vUN-kp-3ea"/>
77− <connections>
78− <outlet property="intervalsStackView" destination="4n8-V3-m5t" id="239-zR-iS1"/>
79− <outlet property="scrollView" destination="e97-Yk-hHi" id="eED-qd-4Yw"/>
80− </connections>
81− <point key="canvasLocation" x="137.68115942028987" y="360.26785714285711"/>
82− </view>
83− </objects>
84−</document>
Hookah Tau/DB/DataStorage.swift−15
@@ -18,7 +18,6 @@ class DataStorage {
18 case isAdmin
18 case isAdmin
19 case loggedIn
19 case loggedIn
20 case cookies
20 case cookies
21− case chosenEstablishment // only for admin
22 }
21 }
23
22
24 private init() {}
23 private init() {}
@@ -43,15 +42,6 @@ class DataStorage {
43 UserDefaults.standard.setValue(isAdmin, forKey: Keys.isAdmin.rawValue)
42 UserDefaults.standard.setValue(isAdmin, forKey: Keys.isAdmin.rawValue)
44 }
43 }
45
44
46− /// Сохраняем выбранный администратором establishmentId
47− func setupEstablishmentChoice(id: Int) {
48− UserDefaults.standard.setValue(id, forKey: Keys.chosenEstablishment.rawValue)
49− }
50−
51− func getEstablishmentChoice() -> Int? {
52− let val = UserDefaults.standard.integer(forKey: Keys.chosenEstablishment.rawValue)
53− return val == 0 ? nil : val
54− }
55
45
56 /// Метод для установки куков в хранилище
46 /// Метод для установки куков в хранилище
57 /// - Parameter cookies: куки
47 /// - Parameter cookies: куки
@@ -105,11 +95,6 @@ class DataStorage {
105 }
95 }
106
96
107 func setLoggedInState(_ value: Bool) {
97 func setLoggedInState(_ value: Bool) {
108− if !value {
109− UserDefaults.standard.removeObject(forKey: Keys.name.rawValue)
110− UserDefaults.standard.removeObject(forKey: Keys.phone.rawValue)
111− UserDefaults.standard.removeObject(forKey: Keys.cookies.rawValue)
112− }
113 UserDefaults.standard.set(value, forKey: Keys.loggedIn.rawValue)
98 UserDefaults.standard.set(value, forKey: Keys.loggedIn.rawValue)
114 }
99 }
115}
100}
Hookah Tau/Extensions+String.swiftdeleted−36
@@ -1,36 +0,0 @@
1−//
2−// Extensions+String.swift
3−// Hookah Tau
4−//
5−// Created by cstore on 10/12/2019.
6−// Copyright © 2019 Daria Rednikina. All rights reserved.
7−//
8−
9−import Foundation
10−
11−
12−extension String {
13−
14− /// Only works with 9-length strings, for ex 01 733 01 79: (2 3 2 2)
15− func formattedNumber() -> String {
16− let cleanPhoneNumber = self.components(separatedBy: CharacterSet.decimalDigits.inverted).joined()
17−
18− var result = ""
19− let phoneMask = "+7 (9XX) XXX-XX-XX"
20− var index = cleanPhoneNumber.startIndex
21− for ch in phoneMask where index < cleanPhoneNumber.endIndex {
22− if ch == "X" {
23− result.append(cleanPhoneNumber[index])
24− index = cleanPhoneNumber.index(after: index)
25− } else {
26− result.append(ch)
27− }
28− }
29− return result
30− }
31−
32− /// Gets +7 9(XX) XXX-XX-XX returns XXXXXXXXX
33− func toApiPhoneNumberFormat() -> String {
34− return String(self.filter{ $0.isNumber }.dropFirst(2))
35− }
36−}
Hookah Tau/HFunc.swift−7
@@ -15,9 +15,6 @@ class HFunc {
15
15
16 static let main = HFunc()
16 static let main = HFunc()
17
17
18− func exportClientsToCSV(_ arr: [Client]) -> String {
19− return arr.reduce(Client.csvHeading) { return funcToMapClientsIntoString($0, $1) }
20− }
21
18
22 /// Filtering function to get every periods which intersects with given date
19 /// Filtering function to get every periods which intersects with given date
23 /// - Parameter periods: all periods of bookings (for a particular table)
20 /// - Parameter periods: all periods of bookings (for a particular table)
@@ -61,8 +58,4 @@ class HFunc {
61
58
62 return { (period: ReservationPeriod) in intervalChecking(period.startTime, period.endTime) }
59 return { (period: ReservationPeriod) in intervalChecking(period.startTime, period.endTime) }
63 }
60 }
64−
65− private func funcToMapClientsIntoString(_ acc: String, _ el: Client) -> String {
66− return acc + el.toString + "\n"
67− }
68}
61}
Hookah Tau/Info.plist+3−5
@@ -2,6 +2,8 @@
2<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
2<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3<plist version="1.0">
3<plist version="1.0">
4<dict>
4<dict>
5+ <key>UIUserInterfaceStyle</key>
6+ <string>Ligth</string>
5 <key>CFBundleDevelopmentRegion</key>
7 <key>CFBundleDevelopmentRegion</key>
6 <string>$(DEVELOPMENT_LANGUAGE)</string>
8 <string>$(DEVELOPMENT_LANGUAGE)</string>
7 <key>CFBundleExecutable</key>
9 <key>CFBundleExecutable</key>
@@ -17,9 +19,7 @@
17 <key>CFBundleShortVersionString</key>
19 <key>CFBundleShortVersionString</key>
18 <string>1.0</string>
20 <string>1.0</string>
19 <key>CFBundleVersion</key>
21 <key>CFBundleVersion</key>
20− <string>$(CURRENT_PROJECT_VERSION)</string>
22+ <string>1</string>
21− <key>ITSAppUsesNonExemptEncryption</key>
22− <false/>
23 <key>LSRequiresIPhoneOS</key>
23 <key>LSRequiresIPhoneOS</key>
24 <true/>
24 <true/>
25 <key>UILaunchStoryboardName</key>
25 <key>UILaunchStoryboardName</key>
@@ -39,7 +39,5 @@
39 <string>UIInterfaceOrientationLandscapeLeft</string>
39 <string>UIInterfaceOrientationLandscapeLeft</string>
40 <string>UIInterfaceOrientationLandscapeRight</string>
40 <string>UIInterfaceOrientationLandscapeRight</string>
41 </array>
41 </array>
42− <key>UIUserInterfaceStyle</key>
43− <string>Light</string>
44</dict>
42</dict>
45</plist>
43</plist>
Hookah Tau/Models/Reservation.swift−38
@@ -47,41 +47,3 @@ struct ReservationData: MyCodable {
47 var reservedTable: Int
47 var reservedTable: Int
48
48
49}
49}
50−
51−/// Структура для получения респонса на `GET /admin/reservations/{establishment id}`
52−struct ReservationWithUser: MyCodable {
53−
54− var uuid: String?
55− var establishment: Int
56− var startTime: Date
57− var endTime: Date
58− var numberOfGuests: Int
59− var reservedTable: Int
60− var owner: FullUser
61−
62− init(reservation: Reservation, user: FullUser) {
63− self.uuid = reservation.uuid
64− self.establishment = reservation.establishment
65− self.startTime = reservation.startTime
66− self.endTime = reservation.endTime
67− self.numberOfGuests = reservation.numberOfGuests
68− self.reservedTable = reservation.reservedTable
69− self.owner = user
70− }
71−
72− init(uuid: String?, establishment: Int, startTime: Date, endTime: Date, numberOfGuests: Int, reservedTable: Int, owner: FullUser) {
73− self.uuid = uuid
74− self.establishment = establishment
75− self.startTime = startTime
76− self.endTime = endTime
77− self.numberOfGuests = numberOfGuests
78− self.reservedTable = reservedTable
79− self.owner = owner
80− }
81−}
82−
83−struct AdminCreateReservation: MyCodable {
84− var reservation: ReservationData
85− var user: String
86−}
87−
Hookah Tau/Models/User.swift−27
@@ -8,35 +8,8 @@
8
8
9import Foundation
9import Foundation
10
10
11−/// Используется в запросах при регистрации пользователя
12struct User: MyCodable {
11struct User: MyCodable {
13 var name: String
12 var name: String
14 var phoneNumber: String
13 var phoneNumber: String
15 var isAdmin: Bool
14 var isAdmin: Bool
16}
15}
17−
18−/// При запросах на список пользователей в аккаунте администратора.
19−struct FullUser: MyCodable {
20− var uuid: String?
21− var name: String?
22− var phoneNumber: String
23− var isAdmin: Bool
24−}
25−
26−/// `GET /admin/clients`
27−struct Client: MyCodable {
28− var uuid: String
29− var name: String?
30− var phoneNumber: String
31− var isAdmin: Bool
32− var reservationCount: Int
33− var isBlocked: Bool
34−
35− static var csvHeading: String {
36− return "uuid, имя, телефон, админ, количество активных бронирований, в черном списке\n"
37− }
38−
39− var toString: String {
40− return "\(uuid), \(name ?? "❔"), +79\(phoneNumber), \(isAdmin), \(reservationCount), \(isBlocked)"
41− }
42−}
Hookah Tau/Supporting Files/Assets.xcassets/AppIcon.appiconset/1024.pngdeleted

Binary file not shown.

Hookah Tau/Supporting Files/Assets.xcassets/AppIcon.appiconset/120-1.pngdeleted

Binary file not shown.

Hookah Tau/Supporting Files/Assets.xcassets/AppIcon.appiconset/120.pngdeleted

Binary file not shown.

Hookah Tau/Supporting Files/Assets.xcassets/AppIcon.appiconset/152.pngdeleted

Binary file not shown.

Hookah Tau/Supporting Files/Assets.xcassets/AppIcon.appiconset/167.pngdeleted

Binary file not shown.

Hookah Tau/Supporting Files/Assets.xcassets/AppIcon.appiconset/180.pngdeleted

Binary file not shown.

Hookah Tau/Supporting Files/Assets.xcassets/AppIcon.appiconset/20.pngdeleted

Binary file not shown.

Hookah Tau/Supporting Files/Assets.xcassets/AppIcon.appiconset/29.pngdeleted

Binary file not shown.

Hookah Tau/Supporting Files/Assets.xcassets/AppIcon.appiconset/40-1.pngdeleted

Binary file not shown.

Hookah Tau/Supporting Files/Assets.xcassets/AppIcon.appiconset/40-2.pngdeleted

Binary file not shown.

Hookah Tau/Supporting Files/Assets.xcassets/AppIcon.appiconset/40.pngdeleted

Binary file not shown.

Hookah Tau/Supporting Files/Assets.xcassets/AppIcon.appiconset/58-1.pngdeleted

Binary file not shown.

Hookah Tau/Supporting Files/Assets.xcassets/AppIcon.appiconset/58.pngdeleted

Binary file not shown.

Hookah Tau/Supporting Files/Assets.xcassets/AppIcon.appiconset/60.pngdeleted

Binary file not shown.

Hookah Tau/Supporting Files/Assets.xcassets/AppIcon.appiconset/76.pngdeleted

Binary file not shown.

Hookah Tau/Supporting Files/Assets.xcassets/AppIcon.appiconset/80-1.pngdeleted

Binary file not shown.

Hookah Tau/Supporting Files/Assets.xcassets/AppIcon.appiconset/80.pngdeleted

Binary file not shown.

Hookah Tau/Supporting Files/Assets.xcassets/AppIcon.appiconset/87.pngdeleted

Binary file not shown.

Hookah Tau/Supporting Files/Assets.xcassets/AppIcon.appiconset/Contents.json+18−36
@@ -1,111 +1,93 @@
1{
1{
2 "images" : [
2 "images" : [
3 {
3 {
4− "size" : "20x20",
5 "idiom" : "iphone",
4 "idiom" : "iphone",
6− "filename" : "40-1.png",
5+ "size" : "20x20",
7 "scale" : "2x"
6 "scale" : "2x"
8 },
7 },
9 {
8 {
10− "size" : "20x20",
11 "idiom" : "iphone",
9 "idiom" : "iphone",
12− "filename" : "60.png",
10+ "size" : "20x20",
13 "scale" : "3x"
11 "scale" : "3x"
14 },
12 },
15 {
13 {
16− "size" : "29x29",
17 "idiom" : "iphone",
14 "idiom" : "iphone",
18− "filename" : "58-1.png",
15+ "size" : "29x29",
19 "scale" : "2x"
16 "scale" : "2x"
20 },
17 },
21 {
18 {
22− "size" : "29x29",
23 "idiom" : "iphone",
19 "idiom" : "iphone",
24− "filename" : "87.png",
20+ "size" : "29x29",
25 "scale" : "3x"
21 "scale" : "3x"
26 },
22 },
27 {
23 {
28− "size" : "40x40",
29 "idiom" : "iphone",
24 "idiom" : "iphone",
30− "filename" : "80.png",
25+ "size" : "40x40",
31 "scale" : "2x"
26 "scale" : "2x"
32 },
27 },
33 {
28 {
34− "size" : "40x40",
35 "idiom" : "iphone",
29 "idiom" : "iphone",
36− "filename" : "120.png",
30+ "size" : "40x40",
37 "scale" : "3x"
31 "scale" : "3x"
38 },
32 },
39 {
33 {
40− "size" : "60x60",
41 "idiom" : "iphone",
34 "idiom" : "iphone",
42− "filename" : "120-1.png",
35+ "size" : "60x60",
43 "scale" : "2x"
36 "scale" : "2x"
44 },
37 },
45 {
38 {
46− "size" : "60x60",
47 "idiom" : "iphone",
39 "idiom" : "iphone",
48− "filename" : "180.png",
40+ "size" : "60x60",
49 "scale" : "3x"
41 "scale" : "3x"
50 },
42 },
51 {
43 {
52− "size" : "20x20",
53 "idiom" : "ipad",
44 "idiom" : "ipad",
54− "filename" : "20.png",
45+ "size" : "20x20",
55 "scale" : "1x"
46 "scale" : "1x"
56 },
47 },
57 {
48 {
58− "size" : "20x20",
59 "idiom" : "ipad",
49 "idiom" : "ipad",
60− "filename" : "40.png",
50+ "size" : "20x20",
61 "scale" : "2x"
51 "scale" : "2x"
62 },
52 },
63 {
53 {
64− "size" : "29x29",
65 "idiom" : "ipad",
54 "idiom" : "ipad",
66− "filename" : "29.png",
55+ "size" : "29x29",
67 "scale" : "1x"
56 "scale" : "1x"
68 },
57 },
69 {
58 {
70− "size" : "29x29",
71 "idiom" : "ipad",
59 "idiom" : "ipad",
72− "filename" : "58.png",
60+ "size" : "29x29",
73 "scale" : "2x"
61 "scale" : "2x"
74 },
62 },
75 {
63 {
76− "size" : "40x40",
77 "idiom" : "ipad",
64 "idiom" : "ipad",
78− "filename" : "40-2.png",
65+ "size" : "40x40",
79 "scale" : "1x"
66 "scale" : "1x"
80 },
67 },
81 {
68 {
82− "size" : "40x40",
83 "idiom" : "ipad",
69 "idiom" : "ipad",
84− "filename" : "80-1.png",
70+ "size" : "40x40",
85 "scale" : "2x"
71 "scale" : "2x"
86 },
72 },
87 {
73 {
88− "size" : "76x76",
89 "idiom" : "ipad",
74 "idiom" : "ipad",
90− "filename" : "76.png",
75+ "size" : "76x76",
91 "scale" : "1x"
76 "scale" : "1x"
92 },
77 },
93 {
78 {
94− "size" : "76x76",
95 "idiom" : "ipad",
79 "idiom" : "ipad",
96− "filename" : "152.png",
80+ "size" : "76x76",
97 "scale" : "2x"
81 "scale" : "2x"
98 },
82 },
99 {
83 {
100− "size" : "83.5x83.5",
101 "idiom" : "ipad",
84 "idiom" : "ipad",
102− "filename" : "167.png",
85+ "size" : "83.5x83.5",
103 "scale" : "2x"
86 "scale" : "2x"
104 },
87 },
105 {
88 {
106− "size" : "1024x1024",
107 "idiom" : "ios-marketing",
89 "idiom" : "ios-marketing",
108− "filename" : "1024.png",
90+ "size" : "1024x1024",
109 "scale" : "1x"
91 "scale" : "1x"
110 }
92 }
111 ],
93 ],
Hookah Tau/Supporting Files/Assets.xcassets/admin.imageset/Contents.jsondeleted−12
@@ -1,12 +0,0 @@
1−{
2− "images" : [
3− {
4− "idiom" : "universal",
5− "filename" : "admin.pdf"
6− }
7− ],
8− "info" : {
9− "version" : 1,
10− "author" : "xcode"
11− }
12−}
Hookah Tau/Supporting Files/Assets.xcassets/admin.imageset/admin.pdfdeleted

Binary file not shown.

Hookah Tau/Supporting Files/Assets.xcassets/arrow.imageset/Contents.jsondeleted−15
@@ -1,15 +0,0 @@
1−{
2− "images" : [
3− {
4− "idiom" : "universal",
5− "filename" : "arrow.pdf"
6− }
7− ],
8− "info" : {
9− "version" : 1,
10− "author" : "xcode"
11− },
12− "properties" : {
13− "preserves-vector-representation" : true
14− }
15−}
Hookah Tau/Supporting Files/Assets.xcassets/arrow.imageset/arrow.pdfdeleted

Binary file not shown.

Hookah Tau/Supporting Files/Assets.xcassets/blacklist.imageset/Contents.jsondeleted−15
@@ -1,15 +0,0 @@
1−{
2− "images" : [
3− {
4− "idiom" : "universal",
5− "filename" : "blacklist.pdf"
6− }
7− ],
8− "info" : {
9− "version" : 1,
10− "author" : "xcode"
11− },
12− "properties" : {
13− "preserves-vector-representation" : true
14− }
15−}
Hookah Tau/Supporting Files/Assets.xcassets/blacklist.imageset/blacklist.pdfdeleted

Binary file not shown.

Hookah Tau/Supporting Files/Assets.xcassets/peoplee.imageset/Contents.jsondeleted−15
@@ -1,15 +0,0 @@
1−{
2− "images" : [
3− {
4− "idiom" : "universal",
5− "filename" : "peoplee.pdf"
6− }
7− ],
8− "info" : {
9− "version" : 1,
10− "author" : "xcode"
11− },
12− "properties" : {
13− "template-rendering-intent" : "template"
14− }
15−}
Hookah Tau/Supporting Files/Assets.xcassets/peoplee.imageset/peoplee.pdfdeleted

Binary file not shown.

Hookah Tau/Supporting Files/Assets.xcassets/person.imageset/Contents.jsondeleted−15
@@ -1,15 +0,0 @@
1−{
2− "images" : [
3− {
4− "idiom" : "universal",
5− "filename" : "person.pdf"
6− }
7− ],
8− "info" : {
9− "version" : 1,
10− "author" : "xcode"
11− },
12− "properties" : {
13− "template-rendering-intent" : "template"
14− }
15−}
Hookah Tau/Supporting Files/Assets.xcassets/person.imageset/person.pdfdeleted

Binary file not shown.

Hookah Tau/Supporting Files/Assets.xcassets/stack.imageset/Contents.jsondeleted−15
@@ -1,15 +0,0 @@
1−{
2− "images" : [
3− {
4− "idiom" : "universal",
5− "filename" : "Light-S.pdf"
6− }
7− ],
8− "info" : {
9− "version" : 1,
10− "author" : "xcode"
11− },
12− "properties" : {
13− "template-rendering-intent" : "template"
14− }
15−}
Hookah Tau/Supporting Files/Assets.xcassets/stack.imageset/Light-S.pdfdeleted

Binary file not shown.

Hookah Tau/Supporting Files/Assets.xcassets/stack2.imageset/Contents.jsondeleted−15
@@ -1,15 +0,0 @@
1−{
2− "images" : [
3− {
4− "idiom" : "universal",
5− "filename" : "stack2.pdf"
6− }
7− ],
8− "info" : {
9− "version" : 1,
10− "author" : "xcode"
11− },
12− "properties" : {
13− "preserves-vector-representation" : true
14− }
15−}
Hookah Tau/Supporting Files/Assets.xcassets/stack2.imageset/stack2.pdfdeleted

Binary file not shown.

Hookah Tau/Views/Phone/PhoneView.swift+2−1
@@ -24,8 +24,9 @@ class PhoneView: UIView {
24 phone?.attributedPlaceholder = NSAttributedString(string:"+ 7 (901) 733 01 79", attributes: [NSAttributedString.Key.foregroundColor: UIColor.lightGray])
24 phone?.attributedPlaceholder = NSAttributedString(string:"+ 7 (901) 733 01 79", attributes: [NSAttributedString.Key.foregroundColor: UIColor.lightGray])
25 }
25 }
26
26
27+ // TODO: - change in future
27 func bind(withModel model: String) {
28 func bind(withModel model: String) {
28− phone?.text = model.formattedNumber()
29+ phone?.text = model
29 }
30 }
30}
31}
31
32