Manos Chorianopoulos

add MyRewardsProfileInfoTableViewCell

...@@ -48,6 +48,8 @@ let package = Package( ...@@ -48,6 +48,8 @@ let package = Package(
48 .process("screens/MyRewardsViewController/MyRewardsViewController.xib"), 48 .process("screens/MyRewardsViewController/MyRewardsViewController.xib"),
49 .process("cells/MyRewardsBannerOfferCollectionViewCell/MyRewardsBannerOfferCollectionViewCell.xib"), 49 .process("cells/MyRewardsBannerOfferCollectionViewCell/MyRewardsBannerOfferCollectionViewCell.xib"),
50 .process("cells/MyRewardsOffersScrollTableViewCell/MyRewardsOffersScrollTableViewCell.xib"), 50 .process("cells/MyRewardsOffersScrollTableViewCell/MyRewardsOffersScrollTableViewCell.xib"),
51 + .process("cells/MyRewardsProfileInfoTableViewCell/MyRewardsProfileInfoTableViewCell.xib"),
52 + .process("cells/MyRewardsFiltersTableViewCell/MyRewardsFiltersTableViewCell.xib"),
51 .process("cells/ProfileCouponTableViewCell/ProfileCouponTableViewCell.xib"), 53 .process("cells/ProfileCouponTableViewCell/ProfileCouponTableViewCell.xib"),
52 .process("cells/ProfileFilterCollectionViewCell/ProfileFilterCollectionViewCell.xib"), 54 .process("cells/ProfileFilterCollectionViewCell/ProfileFilterCollectionViewCell.xib"),
53 .process("screens/CouponViewController/CouponViewController.xib"), 55 .process("screens/CouponViewController/CouponViewController.xib"),
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
7 <key>Pods-SwiftWarplyFramework.xcscheme_^#shared#^_</key> 7 <key>Pods-SwiftWarplyFramework.xcscheme_^#shared#^_</key>
8 <dict> 8 <dict>
9 <key>orderHint</key> 9 <key>orderHint</key>
10 - <integer>1</integer> 10 + <integer>0</integer>
11 </dict> 11 </dict>
12 </dict> 12 </dict>
13 </dict> 13 </dict>
......
...@@ -73,6 +73,8 @@ ...@@ -73,6 +73,8 @@
73 1EDD0AC62E0D68B6005E162B /* SQLite in Frameworks */ = {isa = PBXBuildFile; productRef = 1EDD0AC52E0D68B6005E162B /* SQLite */; }; 73 1EDD0AC62E0D68B6005E162B /* SQLite in Frameworks */ = {isa = PBXBuildFile; productRef = 1EDD0AC52E0D68B6005E162B /* SQLite */; };
74 622DA0AE2F51CAEE00308AB8 /* CouponsetViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 622DA0AD2F51CAEE00308AB8 /* CouponsetViewController.xib */; }; 74 622DA0AE2F51CAEE00308AB8 /* CouponsetViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 622DA0AD2F51CAEE00308AB8 /* CouponsetViewController.xib */; };
75 622DA0AF2F51CAEE00308AB8 /* CouponsetViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 622DA0AC2F51CAEE00308AB8 /* CouponsetViewController.swift */; }; 75 622DA0AF2F51CAEE00308AB8 /* CouponsetViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 622DA0AC2F51CAEE00308AB8 /* CouponsetViewController.swift */; };
76 + 6250ABCA2F6D5ABE002A5A8D /* MyRewardsFiltersTableViewCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = 6250ABC92F6D5ABE002A5A8D /* MyRewardsFiltersTableViewCell.xib */; };
77 + 6250ABCB2F6D5ABE002A5A8D /* MyRewardsFiltersTableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6250ABC82F6D5ABE002A5A8D /* MyRewardsFiltersTableViewCell.swift */; };
76 626AF6DB2F698FF1008BCA08 /* MerchantAnnotation.swift in Sources */ = {isa = PBXBuildFile; fileRef = 626AF6DA2F698FF1008BCA08 /* MerchantAnnotation.swift */; }; 78 626AF6DB2F698FF1008BCA08 /* MerchantAnnotation.swift in Sources */ = {isa = PBXBuildFile; fileRef = 626AF6DA2F698FF1008BCA08 /* MerchantAnnotation.swift */; };
77 626AF6DE2F699081008BCA08 /* MapViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 626AF6DC2F699081008BCA08 /* MapViewController.swift */; }; 79 626AF6DE2F699081008BCA08 /* MapViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 626AF6DC2F699081008BCA08 /* MapViewController.swift */; };
78 626AF6DF2F699081008BCA08 /* MapViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 626AF6DD2F699081008BCA08 /* MapViewController.xib */; }; 80 626AF6DF2F699081008BCA08 /* MapViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 626AF6DD2F699081008BCA08 /* MapViewController.xib */; };
...@@ -166,6 +168,8 @@ ...@@ -166,6 +168,8 @@
166 1EDD0ABC2E0D308A005E162B /* XIBLoader.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = XIBLoader.swift; sourceTree = "<group>"; }; 168 1EDD0ABC2E0D308A005E162B /* XIBLoader.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = XIBLoader.swift; sourceTree = "<group>"; };
167 622DA0AC2F51CAEE00308AB8 /* CouponsetViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CouponsetViewController.swift; sourceTree = "<group>"; }; 169 622DA0AC2F51CAEE00308AB8 /* CouponsetViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CouponsetViewController.swift; sourceTree = "<group>"; };
168 622DA0AD2F51CAEE00308AB8 /* CouponsetViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = CouponsetViewController.xib; sourceTree = "<group>"; }; 170 622DA0AD2F51CAEE00308AB8 /* CouponsetViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = CouponsetViewController.xib; sourceTree = "<group>"; };
171 + 6250ABC82F6D5ABE002A5A8D /* MyRewardsFiltersTableViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MyRewardsFiltersTableViewCell.swift; sourceTree = "<group>"; };
172 + 6250ABC92F6D5ABE002A5A8D /* MyRewardsFiltersTableViewCell.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = MyRewardsFiltersTableViewCell.xib; sourceTree = "<group>"; };
169 626AF6DA2F698FF1008BCA08 /* MerchantAnnotation.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MerchantAnnotation.swift; sourceTree = "<group>"; }; 173 626AF6DA2F698FF1008BCA08 /* MerchantAnnotation.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MerchantAnnotation.swift; sourceTree = "<group>"; };
170 626AF6DC2F699081008BCA08 /* MapViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MapViewController.swift; sourceTree = "<group>"; }; 174 626AF6DC2F699081008BCA08 /* MapViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MapViewController.swift; sourceTree = "<group>"; };
171 626AF6DD2F699081008BCA08 /* MapViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = MapViewController.xib; sourceTree = "<group>"; }; 175 626AF6DD2F699081008BCA08 /* MapViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = MapViewController.xib; sourceTree = "<group>"; };
...@@ -385,6 +389,7 @@ ...@@ -385,6 +389,7 @@
385 1EB4F4282DE0A09500D934C0 /* MyRewardsOffersScrollTableViewCell */, 389 1EB4F4282DE0A09500D934C0 /* MyRewardsOffersScrollTableViewCell */,
386 1EB4F4222DE09A4300D934C0 /* MyRewardsBannerOffersScrollTableViewCell */, 390 1EB4F4222DE09A4300D934C0 /* MyRewardsBannerOffersScrollTableViewCell */,
387 1E66E4942E30F8C600BCEF9D /* MyRewardsProfileInfoTableViewCell */, 391 1E66E4942E30F8C600BCEF9D /* MyRewardsProfileInfoTableViewCell */,
392 + 6250ABC72F6D5A87002A5A8D /* MyRewardsFiltersTableViewCell */,
388 ); 393 );
389 path = cells; 394 path = cells;
390 sourceTree = "<group>"; 395 sourceTree = "<group>";
...@@ -479,6 +484,15 @@ ...@@ -479,6 +484,15 @@
479 path = CouponsetViewController; 484 path = CouponsetViewController;
480 sourceTree = "<group>"; 485 sourceTree = "<group>";
481 }; 486 };
487 + 6250ABC72F6D5A87002A5A8D /* MyRewardsFiltersTableViewCell */ = {
488 + isa = PBXGroup;
489 + children = (
490 + 6250ABC82F6D5ABE002A5A8D /* MyRewardsFiltersTableViewCell.swift */,
491 + 6250ABC92F6D5ABE002A5A8D /* MyRewardsFiltersTableViewCell.xib */,
492 + );
493 + path = MyRewardsFiltersTableViewCell;
494 + sourceTree = "<group>";
495 + };
482 626AF6D92F698F96008BCA08 /* MapViewController */ = { 496 626AF6D92F698F96008BCA08 /* MapViewController */ = {
483 isa = PBXGroup; 497 isa = PBXGroup;
484 children = ( 498 children = (
...@@ -713,6 +727,7 @@ ...@@ -713,6 +727,7 @@
713 1EDBAF042DE843CA00911E79 /* ProfileCouponTableViewCell.xib in Resources */, 727 1EDBAF042DE843CA00911E79 /* ProfileCouponTableViewCell.xib in Resources */,
714 627B9C762F6C3EB000A2456F /* CategoryOffersViewController.xib in Resources */, 728 627B9C762F6C3EB000A2456F /* CategoryOffersViewController.xib in Resources */,
715 1EDBAF0C2DE8441000911E79 /* ProfileQuestionnaireTableViewCell.xib in Resources */, 729 1EDBAF0C2DE8441000911E79 /* ProfileQuestionnaireTableViewCell.xib in Resources */,
730 + 6250ABCA2F6D5ABE002A5A8D /* MyRewardsFiltersTableViewCell.xib in Resources */,
716 E6A77A38282BC3530045BBA8 /* Media.xcassets in Resources */, 731 E6A77A38282BC3530045BBA8 /* Media.xcassets in Resources */,
717 627B9C852F6C492F00A2456F /* CategoryOffersGridTableViewCell.xib in Resources */, 732 627B9C852F6C492F00A2456F /* CategoryOffersGridTableViewCell.xib in Resources */,
718 1E116F682DE845B1009AE791 /* ProfileFilterCollectionViewCell.xib in Resources */, 733 1E116F682DE845B1009AE791 /* ProfileFilterCollectionViewCell.xib in Resources */,
...@@ -819,6 +834,7 @@ ...@@ -819,6 +834,7 @@
819 1E917CD72DDF64B2002221D8 /* MyRewardsViewController.swift in Sources */, 834 1E917CD72DDF64B2002221D8 /* MyRewardsViewController.swift in Sources */,
820 1E917CDC2DDF68C7002221D8 /* CouponViewController.swift in Sources */, 835 1E917CDC2DDF68C7002221D8 /* CouponViewController.swift in Sources */,
821 1E4C4CFB2DE6014500279AAD /* CopyableLabel.swift in Sources */, 836 1E4C4CFB2DE6014500279AAD /* CopyableLabel.swift in Sources */,
837 + 6250ABCB2F6D5ABE002A5A8D /* MyRewardsFiltersTableViewCell.swift in Sources */,
822 626AF6DE2F699081008BCA08 /* MapViewController.swift in Sources */, 838 626AF6DE2F699081008BCA08 /* MapViewController.swift in Sources */,
823 1EDBAF112DE8443B00911E79 /* ProfileHeaderTableViewCell.swift in Sources */, 839 1EDBAF112DE8443B00911E79 /* ProfileHeaderTableViewCell.swift in Sources */,
824 1EDBAF052DE843CA00911E79 /* ProfileCouponTableViewCell.swift in Sources */, 840 1EDBAF052DE843CA00911E79 /* ProfileCouponTableViewCell.swift in Sources */,
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
7 <key>SwiftWarplyFramework.xcscheme_^#shared#^_</key> 7 <key>SwiftWarplyFramework.xcscheme_^#shared#^_</key>
8 <dict> 8 <dict>
9 <key>orderHint</key> 9 <key>orderHint</key>
10 - <integer>0</integer> 10 + <integer>1</integer>
11 </dict> 11 </dict>
12 </dict> 12 </dict>
13 </dict> 13 </dict>
......
1 +//
2 +// MyRewardsFiltersTableViewCell.swift
3 +// SwiftWarplyFramework
4 +//
5 +// Created by Manos Chorianopoulos on 20/3/26.
6 +//
7 +
8 +import UIKit
9 +
10 +@objc(MyRewardsFiltersTableViewCell)
11 +public class MyRewardsFiltersTableViewCell: UITableViewCell {
12 + @IBOutlet weak var filtersView: UIView!
13 + @IBOutlet weak var filtersLabel: UILabel!
14 + @IBOutlet weak var filtersImage: UIImageView!
15 + @IBOutlet weak var mapView: UIView!
16 + @IBOutlet weak var mapImage: UIImageView!
17 + @IBOutlet weak var filtersButton: UIButton!
18 + @IBOutlet weak var mapButton: UIButton!
19 +
20 + public override func awakeFromNib() {
21 + super.awakeFromNib()
22 + // Initialization code
23 +
24 + self.filtersView.backgroundColor = UIColor(rgb: 0xF1F2F4)
25 + self.filtersView.layer.cornerRadius = 16 // Assuming height is 32 or similar based on standard chip design
26 + self.filtersView.layer.masksToBounds = true
27 +
28 + self.filtersLabel.text = "Αναζήτηση"
29 + self.filtersLabel.font = UIFont(name: "PingLCG-Regular", size: 16)
30 + self.filtersLabel.textColor = UIColor(rgb: 0x000F1E)
31 + self.filtersLabel.frame.size.width = self.filtersLabel.intrinsicContentSize.width
32 + self.filtersLabel.frame.size.height = self.filtersLabel.intrinsicContentSize.height
33 +
34 + self.filtersImage.image = UIImage(named: "filter", in: MyEmptyClass.resourceBundle(), compatibleWith: nil)
35 +
36 + if mapView != nil {
37 + self.mapView.backgroundColor = UIColor(rgb: 0xF1F2F4)
38 + self.mapView.layer.cornerRadius = 22 // Assuming height is 44
39 + self.mapView.layer.masksToBounds = true
40 + }
41 +
42 + if mapImage != nil {
43 + self.mapImage.image = UIImage(named: "map_pin_2", in: Bundle.frameworkResourceBundle, compatibleWith: nil)
44 + }
45 + }
46 +
47 + public override func setSelected(_ selected: Bool, animated: Bool) {
48 + super.setSelected(selected, animated: animated)
49 +
50 + // Configure the view for the selected state
51 + }
52 +
53 +}
...@@ -12,6 +12,7 @@ import Foundation ...@@ -12,6 +12,7 @@ import Foundation
12 12
13 public enum SectionType { 13 public enum SectionType {
14 case myRewardsProfileInfo // MyRewardsProfileInfoTableViewCell 14 case myRewardsProfileInfo // MyRewardsProfileInfoTableViewCell
15 + case myRewardsFilters // MyRewardsFiltersTableViewCell
15 case myRewardsBannerOffers // MyRewardsBannerOffersScrollTableViewCell 16 case myRewardsBannerOffers // MyRewardsBannerOffersScrollTableViewCell
16 case myRewardsHorizontalCouponsets // MyRewardsOffersScrollTableViewCell 17 case myRewardsHorizontalCouponsets // MyRewardsOffersScrollTableViewCell
17 case profileHeader // ProfileHeaderTableViewCell (no items) 18 case profileHeader // ProfileHeaderTableViewCell (no items)
......
...@@ -135,6 +135,7 @@ import UIKit ...@@ -135,6 +135,7 @@ import UIKit
135 private func registerTableViewCells() { 135 private func registerTableViewCells() {
136 let cellConfigs = [ 136 let cellConfigs = [
137 ("MyRewardsProfileInfoTableViewCell", "MyRewardsProfileInfoTableViewCell"), 137 ("MyRewardsProfileInfoTableViewCell", "MyRewardsProfileInfoTableViewCell"),
138 + ("MyRewardsFiltersTableViewCell", "MyRewardsFiltersTableViewCell"),
138 ("MyRewardsBannerOffersScrollTableViewCell", "MyRewardsBannerOffersScrollTableViewCell"), 139 ("MyRewardsBannerOffersScrollTableViewCell", "MyRewardsBannerOffersScrollTableViewCell"),
139 ("MyRewardsOffersScrollTableViewCell", "MyRewardsOffersScrollTableViewCell") 140 ("MyRewardsOffersScrollTableViewCell", "MyRewardsOffersScrollTableViewCell")
140 ] 141 ]
...@@ -573,6 +574,10 @@ import UIKit ...@@ -573,6 +574,10 @@ import UIKit
573 // Always insert at index 0 (top of the list) 574 // Always insert at index 0 (top of the list)
574 sections.insert(defaultProfileSection, at: 0) 575 sections.insert(defaultProfileSection, at: 0)
575 profileSection = defaultProfileSection 576 profileSection = defaultProfileSection
577 +
578 + // Insert filters cell immediately below profile info
579 + let filtersSection = SectionModel(sectionType: .myRewardsFilters)
580 + sections.insert(filtersSection, at: 1)
576 } 581 }
577 582
578 private func updateProfileSectionWithData(_ profile: ProfileModel) { 583 private func updateProfileSectionWithData(_ profile: ProfileModel) {
...@@ -734,6 +739,12 @@ extension MyRewardsViewController: UITableViewDelegate, UITableViewDataSource{ ...@@ -734,6 +739,12 @@ extension MyRewardsViewController: UITableViewDelegate, UITableViewDataSource{
734 cell.configureCell(data: sectionModel) 739 cell.configureCell(data: sectionModel)
735 return cell 740 return cell
736 741
742 + case .myRewardsFilters:
743 + let cell = tableView.dequeueReusableCell(withIdentifier: "MyRewardsFiltersTableViewCell", for: indexPath) as! MyRewardsFiltersTableViewCell
744 + // TODO: wire filtersButton action (e.g. open filter sheet)
745 + // TODO: wire mapButton action (e.g. open map view)
746 + return cell
747 +
737 case .myRewardsBannerOffers: 748 case .myRewardsBannerOffers:
738 let cell = tableView.dequeueReusableCell(withIdentifier: "MyRewardsBannerOffersScrollTableViewCell", for: indexPath) as! MyRewardsBannerOffersScrollTableViewCell 749 let cell = tableView.dequeueReusableCell(withIdentifier: "MyRewardsBannerOffersScrollTableViewCell", for: indexPath) as! MyRewardsBannerOffersScrollTableViewCell
739 cell.delegate = self 750 cell.delegate = self
......