git.iko.soy/dashared/hookah-tau
on develop help sign in
Merge branch 'client/reservation-choose-address' into client/reservations
commitda302da4346648867464fa409e5c1be19fff75ce authorDarya Rednikina <rednikina.com@yandex.ru> dateSun 27 Oct 2019, 22:25 (7 years ago) parent08fe97cef1035f
14 files changed+369−38
Hookah Tau.xcodeproj/project.pbxproj+63−11 Hookah Tau/Controllers/Client/Reservations/Active Reservations/ReservationsCoordinator.swift+32 Hookah Tau/Controllers/Client/Reservations/ReservationsViewController.swift → Hookah Tau/Controllers/Client/Reservations/Active Reservations/ReservationsViewController.swift+2−1 Hookah Tau/Controllers/Client/Reservations/Adress of reservation/AddresViewController.swift+63 Hookah Tau/Controllers/Client/Reservations/Adress of reservation/AddressCoordinator.swift+35 Hookah Tau/Controllers/Client/Reservations/Cells/Address/AddressCell.swift+36 Hookah Tau/Controllers/Client/Reservations/Cells/Address/AddressView.swift+25 Hookah Tau/Controllers/Client/Reservations/Cells/Address/AddressView.xib+89 Hookah Tau/Controllers/Client/Reservations/Cells/ReservationCell.swift → Hookah Tau/Controllers/Client/Reservations/Cells/Reservation/ReservationCell.swift+7−3 Hookah Tau/Controllers/Client/Reservations/Cells/ReservationCellView.swift → Hookah Tau/Controllers/Client/Reservations/Cells/Reservation/ReservationView.swift+1−1 Hookah Tau/Controllers/Client/Reservations/Cells/ReservationCellView.xib → Hookah Tau/Controllers/Client/Reservations/Cells/Reservation/ReservationView.xib+1−1 Hookah Tau/Controllers/Client/Reservations/ReservationsCoordinator.swift−21 Hookah Tau/Supporting Files/Assets.xcassets/Map.imageset/Contents.json+15 Hookah Tau/Supporting Files/Assets.xcassets/Map.imageset/Map.pdf
Hookah Tau.xcodeproj/project.pbxproj+63−11
@@ -14,8 +14,8 @@
1414 1246B717235CD186004CBFA1 /* NoReservationsView.xib in Resources */ = {isa = PBXBuildFile; fileRef = 1246B716235CD186004CBFA1 /* NoReservationsView.xib */; };
1515 1246B719235CD3AD004CBFA1 /* NoReservationsView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1246B718235CD3AD004CBFA1 /* NoReservationsView.swift */; };
1616 1246B71C235CDF3A004CBFA1 /* ReservationCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1246B71B235CDF3A004CBFA1 /* ReservationCell.swift */; };
17− 1246B71E235CDF8A004CBFA1 /* ReservationCellView.xib in Resources */ = {isa = PBXBuildFile; fileRef = 1246B71D235CDF8A004CBFA1 /* ReservationCellView.xib */; };
18− 1246B720235CDF9E004CBFA1 /* ReservationCellView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1246B71F235CDF9E004CBFA1 /* ReservationCellView.swift */; };
17+ 1246B71E235CDF8A004CBFA1 /* ReservationView.xib in Resources */ = {isa = PBXBuildFile; fileRef = 1246B71D235CDF8A004CBFA1 /* ReservationView.xib */; };
18+ 1246B720235CDF9E004CBFA1 /* ReservationView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1246B71F235CDF9E004CBFA1 /* ReservationView.swift */; };
1919 12B6A60F235B857A00898B31 /* ProfileChangeCoordinator.swift in Sources */ = {isa = PBXBuildFile; fileRef = 12B6A60E235B857A00898B31 /* ProfileChangeCoordinator.swift */; };
2020 12B6A611235B8EC500898B31 /* UserModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 12B6A610235B8EC500898B31 /* UserModel.swift */; };
2121 12B6A613235B9B4300898B31 /* BaseViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 12B6A612235B9B4300898B31 /* BaseViewController.swift */; };
@@ -25,6 +25,11 @@
2525 12C72EE1235380D400AD7004 /* ProfileClientViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 12C72EE0235380D400AD7004 /* ProfileClientViewController.swift */; };
2626 12C72EE3235380EB00AD7004 /* ReservationsViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 12C72EE2235380EB00AD7004 /* ReservationsViewController.swift */; };
2727 12DBEEB223539F2100AF1BB6 /* Client.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 12DBEEB123539F2100AF1BB6 /* Client.storyboard */; };
28+ 12EA99462362B674005D9FE9 /* AddressCoordinator.swift in Sources */ = {isa = PBXBuildFile; fileRef = 12EA99452362B674005D9FE9 /* AddressCoordinator.swift */; };
29+ 12EA99482362B684005D9FE9 /* AddresViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 12EA99472362B684005D9FE9 /* AddresViewController.swift */; };
30+ 12EA994C2362F8EF005D9FE9 /* AddressView.xib in Resources */ = {isa = PBXBuildFile; fileRef = 12EA994B2362F8EF005D9FE9 /* AddressView.xib */; };
31+ 12EA994E2362FCE8005D9FE9 /* AddressView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 12EA994D2362FCE8005D9FE9 /* AddressView.swift */; };
32+ 12EB698123661CB300E4D1CE /* AddressCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 12EB698023661CB300E4D1CE /* AddressCell.swift */; };
2833 12EE4A76234BB8FE005B4D1A /* CodeView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 12EE4A75234BB8FE005B4D1A /* CodeView.swift */; };
2934 12F73B022357AD7B007D4476 /* ProfileChangeViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 12F73B012357AD7B007D4476 /* ProfileChangeViewController.swift */; };
3035 F30369B5233679EA00A8EA84 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = F30369B4233679EA00A8EA84 /* LaunchScreen.storyboard */; };
@@ -82,8 +87,8 @@
8287 1246B716235CD186004CBFA1 /* NoReservationsView.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = NoReservationsView.xib; sourceTree = "<group>"; };
8388 1246B718235CD3AD004CBFA1 /* NoReservationsView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NoReservationsView.swift; sourceTree = "<group>"; };
8489 1246B71B235CDF3A004CBFA1 /* ReservationCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ReservationCell.swift; sourceTree = "<group>"; };
85− 1246B71D235CDF8A004CBFA1 /* ReservationCellView.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = ReservationCellView.xib; sourceTree = "<group>"; };
86− 1246B71F235CDF9E004CBFA1 /* ReservationCellView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ReservationCellView.swift; sourceTree = "<group>"; };
90+ 1246B71D235CDF8A004CBFA1 /* ReservationView.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = ReservationView.xib; sourceTree = "<group>"; };
91+ 1246B71F235CDF9E004CBFA1 /* ReservationView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ReservationView.swift; sourceTree = "<group>"; };
8792 12B6A60E235B857A00898B31 /* ProfileChangeCoordinator.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ProfileChangeCoordinator.swift; sourceTree = "<group>"; };
8893 12B6A610235B8EC500898B31 /* UserModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UserModel.swift; sourceTree = "<group>"; };
8994 12B6A612235B9B4300898B31 /* BaseViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BaseViewController.swift; sourceTree = "<group>"; };
@@ -93,6 +98,11 @@
9398 12C72EE0235380D400AD7004 /* ProfileClientViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ProfileClientViewController.swift; sourceTree = "<group>"; };
9499 12C72EE2235380EB00AD7004 /* ReservationsViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ReservationsViewController.swift; sourceTree = "<group>"; };
95100 12DBEEB123539F2100AF1BB6 /* Client.storyboard */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; path = Client.storyboard; sourceTree = "<group>"; };
101+ 12EA99452362B674005D9FE9 /* AddressCoordinator.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AddressCoordinator.swift; sourceTree = "<group>"; };
102+ 12EA99472362B684005D9FE9 /* AddresViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AddresViewController.swift; sourceTree = "<group>"; };
103+ 12EA994B2362F8EF005D9FE9 /* AddressView.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = AddressView.xib; sourceTree = "<group>"; };
104+ 12EA994D2362FCE8005D9FE9 /* AddressView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AddressView.swift; sourceTree = "<group>"; };
105+ 12EB698023661CB300E4D1CE /* AddressCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AddressCell.swift; sourceTree = "<group>"; };
96106 12EE4A75234BB8FE005B4D1A /* CodeView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CodeView.swift; sourceTree = "<group>"; };
97107 12F73B012357AD7B007D4476 /* ProfileChangeViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ProfileChangeViewController.swift; sourceTree = "<group>"; };
98108 F30369B4233679EA00A8EA84 /* LaunchScreen.storyboard */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; path = LaunchScreen.storyboard; sourceTree = "<group>"; };
@@ -173,8 +183,8 @@
173183 children = (
174184 1246B721235CDFC2004CBFA1 /* Cells */,
175185 1246B71A235CD4C5004CBFA1 /* Views */,
176− 12219CEE2353A63E0057DDEE /* ReservationsCoordinator.swift */,
177− 12C72EE2235380EB00AD7004 /* ReservationsViewController.swift */,
186+ 12EA994A2362BA11005D9FE9 /* Active Reservations */,
187+ 12EA99492362B9F5005D9FE9 /* Adress of reservation */,
178188 );
179189 path = Reservations;
180190 sourceTree = "<group>";
@@ -202,9 +212,8 @@
202212 1246B721235CDFC2004CBFA1 /* Cells */ = {
203213 isa = PBXGroup;
204214 children = (
205− 1246B71B235CDF3A004CBFA1 /* ReservationCell.swift */,
206− 1246B71D235CDF8A004CBFA1 /* ReservationCellView.xib */,
207− 1246B71F235CDF9E004CBFA1 /* ReservationCellView.swift */,
215+ 12EB697F23661C9200E4D1CE /* Reservation */,
216+ 12EB698223661E9100E4D1CE /* Address */,
208217 );
209218 path = Cells;
210219 sourceTree = "<group>";
@@ -219,6 +228,44 @@
219228 path = "Tab bar";
220229 sourceTree = "<group>";
221230 };
231+ 12EA99492362B9F5005D9FE9 /* Adress of reservation */ = {
232+ isa = PBXGroup;
233+ children = (
234+ 12EA99452362B674005D9FE9 /* AddressCoordinator.swift */,
235+ 12EA99472362B684005D9FE9 /* AddresViewController.swift */,
236+ );
237+ path = "Adress of reservation";
238+ sourceTree = "<group>";
239+ };
240+ 12EA994A2362BA11005D9FE9 /* Active Reservations */ = {
241+ isa = PBXGroup;
242+ children = (
243+ 12219CEE2353A63E0057DDEE /* ReservationsCoordinator.swift */,
244+ 12C72EE2235380EB00AD7004 /* ReservationsViewController.swift */,
245+ );
246+ path = "Active Reservations";
247+ sourceTree = "<group>";
248+ };
249+ 12EB697F23661C9200E4D1CE /* Reservation */ = {
250+ isa = PBXGroup;
251+ children = (
252+ 1246B71B235CDF3A004CBFA1 /* ReservationCell.swift */,
253+ 1246B71D235CDF8A004CBFA1 /* ReservationView.xib */,
254+ 1246B71F235CDF9E004CBFA1 /* ReservationView.swift */,
255+ );
256+ path = Reservation;
257+ sourceTree = "<group>";
258+ };
259+ 12EB698223661E9100E4D1CE /* Address */ = {
260+ isa = PBXGroup;
261+ children = (
262+ 12EB698023661CB300E4D1CE /* AddressCell.swift */,
263+ 12EA994B2362F8EF005D9FE9 /* AddressView.xib */,
264+ 12EA994D2362FCE8005D9FE9 /* AddressView.swift */,
265+ );
266+ path = Address;
267+ sourceTree = "<group>";
268+ };
222269 12EE4A77234BB942005B4D1A /* Code */ = {
223270 isa = PBXGroup;
224271 children = (
@@ -525,10 +572,11 @@
525572 12387337234BB98700D1F1AB /* CodeView.xib in Resources */,
526573 12B6A615235BB36C00898B31 /* ChangeView.xib in Resources */,
527574 F3851B2C2340A280009EE0B6 /* TitleTextView.xib in Resources */,
528− 1246B71E235CDF8A004CBFA1 /* ReservationCellView.xib in Resources */,
575+ 1246B71E235CDF8A004CBFA1 /* ReservationView.xib in Resources */,
529576 F30369B5233679EA00A8EA84 /* LaunchScreen.storyboard in Resources */,
530577 1246B717235CD186004CBFA1 /* NoReservationsView.xib in Resources */,
531578 F3FC7DD42315BE630080D851 /* Assets.xcassets in Resources */,
579+ 12EA994C2362F8EF005D9FE9 /* AddressView.xib in Resources */,
532580 F3EBE2452340FDA7000FEE1A /* NameTextView.xib in Resources */,
533581 123615CF235510BC00D1122A /* ProfileView.xib in Resources */,
534582 );
@@ -555,20 +603,23 @@
555603 isa = PBXSourcesBuildPhase;
556604 buildActionMask = 2147483647;
557605 files = (
606+ 12EA99482362B684005D9FE9 /* AddresViewController.swift in Sources */,
558607 1246B719235CD3AD004CBFA1 /* NoReservationsView.swift in Sources */,
559608 F3895F4A233D323700FA6A37 /* CodeCoordinator.swift in Sources */,
560609 123615D12355141600D1122A /* ProfileView.swift in Sources */,
561610 12F73B022357AD7B007D4476 /* ProfileChangeViewController.swift in Sources */,
562611 F3851B2E2340A444009EE0B6 /* TitleTextView.swift in Sources */,
612+ 12EA99462362B674005D9FE9 /* AddressCoordinator.swift in Sources */,
563613 12B6A613235B9B4300898B31 /* BaseViewController.swift in Sources */,
564614 F3FC7DFF2315C8D70080D851 /* NameCoordinator.swift in Sources */,
565615 F3FC7DCF2315BE610080D851 /* NameViewController.swift in Sources */,
566616 F3DC5A05233E89D500B5E751 /* Button.swift in Sources */,
567617 F3FC7DFB2315C25D0080D851 /* ApplicationCoordinator.swift in Sources */,
618+ 12EB698123661CB300E4D1CE /* AddressCell.swift in Sources */,
568619 F3895F48233D2EEA00FA6A37 /* CodeSmsViewController.swift in Sources */,
569620 12219CEF2353A63F0057DDEE /* ReservationsCoordinator.swift in Sources */,
570621 1246B71C235CDF3A004CBFA1 /* ReservationCell.swift in Sources */,
571− 1246B720235CDF9E004CBFA1 /* ReservationCellView.swift in Sources */,
622+ 1246B720235CDF9E004CBFA1 /* ReservationView.swift in Sources */,
572623 F3895F4E233D348B00FA6A37 /* PhoneCoordinator.swift in Sources */,
573624 12B6A617235BB37D00898B31 /* ChangeView.swift in Sources */,
574625 F3FC7DCD2315BE610080D851 /* AppDelegate.swift in Sources */,
@@ -580,6 +631,7 @@
580631 F31E20C72348DDB900BEA215 /* Extensions+UIView.swift in Sources */,
581632 F3851B302340A513009EE0B6 /* RegistationViewModel.swift in Sources */,
582633 12C72EDF23537D1B00AD7004 /* ProfileCoordinator.swift in Sources */,
634+ 12EA994E2362FCE8005D9FE9 /* AddressView.swift in Sources */,
583635 F3895F4C233D347E00FA6A37 /* PhoneNumberViewController.swift in Sources */,
584636 12EE4A76234BB8FE005B4D1A /* CodeView.swift in Sources */,
585637 F3EBE2472340FE87000FEE1A /* NameTextView.swift in Sources */,
Hookah Tau/Controllers/Client/Reservations/Active Reservations/ReservationsCoordinator.swiftnew file+32
@@ -0,0 +1,32 @@
1+//
2+// ReservationsCoordinator.swift
3+// Hookah Tau
4+//
5+// Created by cstore on 13/10/2019.
6+// Copyright © 2019 Daria Rednikina. All rights reserved.
7+//
8+
9+import UIKit
10+
11+class ReservationsCoordinator: BaseCoordinator {
12+
13+ // MARK: - Lifecycle
14+
15+ override func start() {
16+ let reservationsViewController = ReservationsViewController()
17+ reservationsViewController.coordinator = self
18+ navigationController?.navigationBar.prefersLargeTitles = true
19+ navigationController?.viewControllers = [reservationsViewController]
20+ }
21+
22+ /// Start process of creating reservation
23+ func makeReservation() {
24+ let addressCoordinator = AddressCoordinator(navigationController: navigationController)
25+ addDependency(addressCoordinator)
26+ addressCoordinator.didFinish = { [weak self] in
27+ self?.removeDependency(addressCoordinator)
28+ self?.navigationController?.popViewController(animated: true)
29+ }
30+ addressCoordinator.start()
31+ }
32+}
Hookah Tau/Controllers/Client/Reservations/ReservationsViewController.swift → Hookah Tau/Controllers/Client/Reservations/Active Reservations/ReservationsViewController.swiftrenamed+2−1
@@ -43,7 +43,8 @@ class ReservationsViewController: UIViewController {
4343 view.backgroundColor = .white
4444 navigationItem.title = "Брони"
4545
46− navigationController?.navigationBar.prefersLargeTitles = true
46+ navigationItem.rightBarButtonItem =
47+ UIBarButtonItem(barButtonSystemItem: .add, target: self, action: #selector(tapToMakeReservation))
4748 }
4849
4950 // MARK: - Setup
Hookah Tau/Controllers/Client/Reservations/Adress of reservation/AddresViewController.swiftnew file+63
@@ -0,0 +1,63 @@
1+//
2+// AddressViewController.swift
3+// Hookah Tau
4+//
5+// Created by cstore on 25/10/2019.
6+// Copyright © 2019 Daria Rednikina. All rights reserved.
7+//
8+
9+import UIKit
10+
11+class AddresViewController: BaseViewController {
12+
13+ // MARK: - Properties
14+
15+ weak var coordinator: AddressCoordinator?
16+
17+ var tableView: UITableView?
18+
19+ var dataSource: [Int]? = [1]
20+
21+ // MARK: - Lifecycle
22+
23+ override func viewDidLoad() {
24+ view.backgroundColor = .white
25+ navigationItem.title = "Заведения"
26+
27+ setUpTableView()
28+ }
29+
30+ // MARK: - Setup
31+
32+ func setUpTableView() {
33+ tableView = UITableView()
34+
35+ tableView?.delegate = self
36+ tableView?.dataSource = self
37+
38+ tableView?.register(AddressCell.self, forCellReuseIdentifier: addressCellIdentifier)
39+
40+ view.addSubviewThatFills(tableView)
41+ }
42+}
43+
44+// MARK: - TableView
45+
46+extension AddresViewController: UITableViewDelegate, UITableViewDataSource {
47+
48+ func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
49+ return dataSource?.count ?? 0
50+ }
51+
52+ func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
53+ let cell = tableView.dequeueReusableCell(withIdentifier: addressCellIdentifier,
54+ for: indexPath) as! AddressCell
55+
56+ return cell
57+ }
58+
59+ func tableView(_ tableView: UITableView, estimatedHeightForRowAt indexPath: IndexPath) -> CGFloat {
60+ return 168.0
61+ }
62+
63+}
Hookah Tau/Controllers/Client/Reservations/Adress of reservation/AddressCoordinator.swiftnew file+35
@@ -0,0 +1,35 @@
1+//
2+// AddressCoordinator.swift
3+// Hookah Tau
4+//
5+// Created by cstore on 25/10/2019.
6+// Copyright © 2019 Daria Rednikina. All rights reserved.
7+//
8+
9+import UIKit
10+
11+class AddressCoordinator: BaseCoordinator {
12+
13+ // MARK: - Properties
14+
15+ var didFinish: (() -> Void)?
16+
17+ // MARK: - Lifecycle
18+
19+ override func start() {
20+ let addressViewController = AddresViewController()
21+ addressViewController.coordinator = self
22+ navigationController?.pushViewController(addressViewController, animated: true)
23+ }
24+
25+ /// cancel reservation process
26+ func goBack() {
27+ didFinish?()
28+ }
29+
30+ /// continue with reservation
31+ /// TODO: pass some data
32+ func chooseTableAndTime() {
33+
34+ }
35+}
Hookah Tau/Controllers/Client/Reservations/Cells/Address/AddressCell.swiftnew file+36
@@ -0,0 +1,36 @@
1+//
2+// AddressTableViewCell.swift
3+// Hookah Tau
4+//
5+// Created by cstore on 27/10/2019.
6+// Copyright © 2019 Daria Rednikina. All rights reserved.
7+//
8+
9+import UIKit
10+
11+let addressCellIdentifier = "AddressCell"
12+
13+class AddressCell: UITableViewCell {
14+
15+ // MARK: - Properties
16+
17+ var addressView: AddressView?
18+
19+ // MARK: - Init
20+
21+ override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?)
22+ {
23+ super.init(style: style, reuseIdentifier: reuseIdentifier)
24+
25+ addressView = AddressView.loadFromNib()
26+ contentView.addSubviewThatFills(addressView)
27+
28+ selectionStyle = .none
29+ }
30+
31+ required init?(coder aDecoder: NSCoder)
32+ {
33+ fatalError("init(coder:) has not been implemented")
34+ }
35+
36+}
Hookah Tau/Controllers/Client/Reservations/Cells/Address/AddressView.swiftnew file+25
@@ -0,0 +1,25 @@
1+//
2+// AddressView.swift
3+// Hookah Tau
4+//
5+// Created by cstore on 25/10/2019.
6+// Copyright © 2019 Daria Rednikina. All rights reserved.
7+//
8+
9+import UIKit
10+
11+class AddressView: UIView {
12+
13+ // MARK: - Properties
14+
15+ @IBOutlet weak var addressLabel: UILabel?
16+
17+ @IBOutlet weak var openHoursLabel: UILabel?
18+
19+ @IBOutlet weak var tableCountLabel: UILabel?
20+
21+ @IBOutlet weak var callAdminButton: UIButton?
22+
23+ @IBOutlet weak var mapImageView: UIImageView?
24+
25+}
Hookah Tau/Controllers/Client/Reservations/Cells/Address/AddressView.xibnew file+89
@@ -0,0 +1,89 @@
1+<?xml version="1.0" encoding="UTF-8"?>
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"/>
4+ <dependencies>
5+ <deployment identifier="iOS"/>
6+ <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="14824"/>
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="AddressView" customModule="Hookah_Tau" customModuleProvider="target">
15+ <rect key="frame" x="0.0" y="0.0" width="375" height="168"/>
16+ <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
17+ <subviews>
18+ <stackView opaque="NO" contentMode="scaleToFill" distribution="equalSpacing" alignment="center" spacingType="standard" translatesAutoresizingMaskIntoConstraints="NO" id="CqA-Dd-eAx">
19+ <rect key="frame" x="16" y="16" width="343" height="136"/>
20+ <subviews>
21+ <stackView opaque="NO" contentMode="scaleToFill" axis="vertical" alignment="bottom" spacing="30" translatesAutoresizingMaskIntoConstraints="NO" id="wiw-lV-dNd">
22+ <rect key="frame" x="0.0" y="16" width="164.5" height="104.5"/>
23+ <subviews>
24+ <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Покровский, 11" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="9py-8w-XFJ">
25+ <rect key="frame" x="0.0" y="0.0" width="164.5" height="26.5"/>
26+ <fontDescription key="fontDescription" type="boldSystem" pointSize="22"/>
27+ <color key="textColor" cocoaTouchSystemColor="darkTextColor"/>
28+ <nil key="highlightedColor"/>
29+ </label>
30+ <stackView opaque="NO" contentMode="scaleToFill" axis="vertical" alignment="bottom" spacingType="standard" translatesAutoresizingMaskIntoConstraints="NO" id="lyA-et-Gg5">
31+ <rect key="frame" x="54" y="56.5" width="110.5" height="48"/>
32+ <subviews>
33+ <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="3:00 — 12:00" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="SrE-GD-vqp">
34+ <rect key="frame" x="0.0" y="0.0" width="110.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="8 столов" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="9nc-mT-R6o">
40+ <rect key="frame" x="44.5" y="28.5" width="66" height="19.5"/>
41+ <fontDescription key="fontDescription" type="system" pointSize="16"/>
42+ <color key="textColor" white="0.66666666669999997" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
43+ <nil key="highlightedColor"/>
44+ </label>
45+ </subviews>
46+ </stackView>
47+ </subviews>
48+ </stackView>
49+ <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="GTd-he-e50">
50+ <rect key="frame" x="227" y="53" width="116" height="30"/>
51+ <color key="backgroundColor" white="0.66666666669999997" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
52+ <state key="normal" title="Большая кнопка"/>
53+ </button>
54+ </subviews>
55+ </stackView>
56+ <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="Map" translatesAutoresizingMaskIntoConstraints="NO" id="2Oj-R4-qoR">
57+ <rect key="frame" x="247" y="16" width="113" height="132"/>
58+ <constraints>
59+ <constraint firstAttribute="height" constant="132" id="wbi-FN-Y5G"/>
60+ <constraint firstAttribute="width" constant="113" id="yLX-hZ-Mak"/>
61+ </constraints>
62+ </imageView>
63+ </subviews>
64+ <color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
65+ <constraints>
66+ <constraint firstItem="vUN-kp-3ea" firstAttribute="trailing" secondItem="CqA-Dd-eAx" secondAttribute="trailing" constant="16" id="AgI-m1-bdF"/>
67+ <constraint firstItem="vUN-kp-3ea" firstAttribute="bottom" secondItem="2Oj-R4-qoR" secondAttribute="bottom" constant="20" id="BjT-K3-9zI"/>
68+ <constraint firstItem="vUN-kp-3ea" firstAttribute="bottom" secondItem="CqA-Dd-eAx" secondAttribute="bottom" constant="16" id="Fau-ua-etV"/>
69+ <constraint firstItem="vUN-kp-3ea" firstAttribute="trailing" secondItem="2Oj-R4-qoR" secondAttribute="trailing" constant="15" id="YBG-dB-hp4"/>
70+ <constraint firstItem="2Oj-R4-qoR" firstAttribute="top" secondItem="vUN-kp-3ea" secondAttribute="top" constant="16" id="qc4-9j-aXP"/>
71+ <constraint firstItem="CqA-Dd-eAx" firstAttribute="top" secondItem="vUN-kp-3ea" secondAttribute="top" constant="16" id="raq-4b-7dB"/>
72+ <constraint firstItem="CqA-Dd-eAx" firstAttribute="leading" secondItem="vUN-kp-3ea" secondAttribute="leading" constant="16" id="x0q-Qj-cGT"/>
73+ </constraints>
74+ <freeformSimulatedSizeMetrics key="simulatedDestinationMetrics"/>
75+ <viewLayoutGuide key="safeArea" id="vUN-kp-3ea"/>
76+ <connections>
77+ <outlet property="addressLabel" destination="9py-8w-XFJ" id="RzN-vT-9co"/>
78+ <outlet property="callAdminButton" destination="GTd-he-e50" id="bdq-pP-al5"/>
79+ <outlet property="mapImageView" destination="2Oj-R4-qoR" id="3ao-l1-GTd"/>
80+ <outlet property="openHoursLabel" destination="SrE-GD-vqp" id="gAb-rI-1wP"/>
81+ <outlet property="tableCountLabel" destination="9nc-mT-R6o" id="tlM-MK-qTx"/>
82+ </connections>
83+ <point key="canvasLocation" x="138.40000000000001" y="241.07946026986508"/>
84+ </view>
85+ </objects>
86+ <resources>
87+ <image name="Map" width="141" height="167"/>
88+ </resources>
89+</document>
Hookah Tau/Controllers/Client/Reservations/Cells/ReservationCell.swift → Hookah Tau/Controllers/Client/Reservations/Cells/Reservation/ReservationCell.swiftrenamed+7−3
@@ -12,14 +12,16 @@ class ReservationCell: UITableViewCell {
1212
1313 // MARK: - Properties
1414
15− var reservationCellView: ReservationCellView?
15+ var reservationCellView: ReservationView?
16+
17+ // MARK: - Init
1618
1719 override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?)
1820 {
1921 super.init(style: style, reuseIdentifier: reuseIdentifier)
2022
21− reservationCellView = ReservationCellView.loadFromNib()
22− self.contentView.addSubviewThatFills(reservationCellView)
23+ reservationCellView = ReservationView.loadFromNib()
24+ contentView.addSubviewThatFills(reservationCellView)
2325
2426 self.selectionStyle = .none
2527 }
@@ -28,6 +30,8 @@ class ReservationCell: UITableViewCell {
2830 {
2931 fatalError("init(coder:) has not been implemented")
3032 }
33+
34+ // MARK: - Data
3135
3236 func bind(withModel model: Int) {
3337
Hookah Tau/Controllers/Client/Reservations/Cells/ReservationCellView.swift → Hookah Tau/Controllers/Client/Reservations/Cells/Reservation/ReservationView.swiftrenamed+1−1
@@ -8,7 +8,7 @@
88
99import UIKit
1010
11−class ReservationCellView: UIView {
11+class ReservationView: UIView {
1212
1313 // MARK: - Properties
1414
Hookah Tau/Controllers/Client/Reservations/Cells/ReservationCellView.xib → Hookah Tau/Controllers/Client/Reservations/Cells/Reservation/ReservationView.xibrenamed+1−1
@@ -11,7 +11,7 @@
1111 <objects>
1212 <placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/>
1313 <placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
14− <view contentMode="scaleToFill" id="iN0-l3-epB" customClass="ReservationCellView" customModule="Hookah_Tau" customModuleProvider="target">
14+ <view contentMode="scaleToFill" id="iN0-l3-epB" customClass="ReservationView" customModule="Hookah_Tau" customModuleProvider="target">
1515 <rect key="frame" x="0.0" y="0.0" width="414" height="180"/>
1616 <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
1717 <subviews>
Hookah Tau/Controllers/Client/Reservations/ReservationsCoordinator.swiftdeleted−21
@@ -1,21 +0,0 @@
1−//
2−// ReservationsCoordinator.swift
3−// Hookah Tau
4−//
5−// Created by cstore on 13/10/2019.
6−// Copyright © 2019 Daria Rednikina. All rights reserved.
7−//
8−
9−import UIKit
10−
11−class ReservationsCoordinator: BaseCoordinator {
12− override func start() {
13− let reservationsViewController = ReservationsViewController()
14− reservationsViewController.coordinator = self
15− navigationController?.viewControllers = [reservationsViewController]
16− }
17−
18− func makeReservation() {
19− print("TODO making reservation ...")
20− }
21−}
Hookah Tau/Supporting Files/Assets.xcassets/Map.imageset/Contents.jsonnew file+15
@@ -0,0 +1,15 @@
1+{
2+ "images" : [
3+ {
4+ "idiom" : "universal",
5+ "filename" : "Map.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/Map.imageset/Map.pdfnew file

Binary file not shown.