Showing
9 changed files
with
48 additions
and
21 deletions
No preview for this file type
| ... | @@ -39,6 +39,7 @@ extension AllGiftsView { | ... | @@ -39,6 +39,7 @@ extension AllGiftsView { |
| 39 | .multilineTextAlignment(.center) | 39 | .multilineTextAlignment(.center) |
| 40 | .frame(maxWidth: .infinity) | 40 | .frame(maxWidth: .infinity) |
| 41 | .padding(.horizontal) | 41 | .padding(.horizontal) |
| 42 | + .offset(x: -self.uiscreen.height * 0.0125) | ||
| 42 | } | 43 | } |
| 43 | .frame(maxWidth: .infinity) | 44 | .frame(maxWidth: .infinity) |
| 44 | .padding(.horizontal) | 45 | .padding(.horizontal) | ... | ... |
| ... | @@ -40,7 +40,7 @@ extension CampaignWebview { | ... | @@ -40,7 +40,7 @@ extension CampaignWebview { |
| 40 | .multilineTextAlignment(.center) | 40 | .multilineTextAlignment(.center) |
| 41 | .frame(maxWidth: .infinity) | 41 | .frame(maxWidth: .infinity) |
| 42 | .padding(.horizontal) | 42 | .padding(.horizontal) |
| 43 | - | 43 | + .offset(x: -self.uiscreen.height * 0.0125) |
| 44 | } | 44 | } |
| 45 | .frame(maxWidth: .infinity) | 45 | .frame(maxWidth: .infinity) |
| 46 | .padding(.horizontal) | 46 | .padding(.horizontal) | ... | ... |
| ... | @@ -11,8 +11,8 @@ import Combine | ... | @@ -11,8 +11,8 @@ import Combine |
| 11 | import Foundation | 11 | import Foundation |
| 12 | import UIKit | 12 | import UIKit |
| 13 | // TODO: Uncomment for barcode | 13 | // TODO: Uncomment for barcode |
| 14 | -import RSBarcodes_Swift | 14 | +//import RSBarcodes_Swift |
| 15 | -import AVFoundation | 15 | +//import AVFoundation |
| 16 | 16 | ||
| 17 | 17 | ||
| 18 | 18 | ||
| ... | @@ -68,7 +68,7 @@ extension CouponBarcodeView { | ... | @@ -68,7 +68,7 @@ extension CouponBarcodeView { |
| 68 | .multilineTextAlignment(.center) | 68 | .multilineTextAlignment(.center) |
| 69 | .frame(maxWidth: .infinity) | 69 | .frame(maxWidth: .infinity) |
| 70 | .padding(.horizontal) | 70 | .padding(.horizontal) |
| 71 | - | 71 | + .offset(x: -self.uiscreen.height * 0.0125) |
| 72 | } | 72 | } |
| 73 | .frame(maxWidth: .infinity) | 73 | .frame(maxWidth: .infinity) |
| 74 | .padding(.horizontal) | 74 | .padding(.horizontal) |
| ... | @@ -198,18 +198,18 @@ extension CouponBarcodeView { | ... | @@ -198,18 +198,18 @@ extension CouponBarcodeView { |
| 198 | // let isValid = RSUnifiedCodeValidator.shared.isValid(barcodeString, machineReadableCodeObjectType: AVMetadataObject.ObjectType.ean13.rawValue) | 198 | // let isValid = RSUnifiedCodeValidator.shared.isValid(barcodeString, machineReadableCodeObjectType: AVMetadataObject.ObjectType.ean13.rawValue) |
| 199 | 199 | ||
| 200 | // TODO: Uncomment for barcode | 200 | // TODO: Uncomment for barcode |
| 201 | - if let barcodeImage = RSUnifiedCodeGenerator.shared.generateCode(barcodeString, machineReadableCodeObjectType: AVMetadataObject.ObjectType.ean13.rawValue, targetSize: CGSize(width: self.uiscreen.width * 0.8, height: self.uiscreen.height * 0.1)) { | 201 | +// if let barcodeImage = RSUnifiedCodeGenerator.shared.generateCode(barcodeString, machineReadableCodeObjectType: AVMetadataObject.ObjectType.ean13.rawValue, targetSize: CGSize(width: self.uiscreen.width * 0.8, height: self.uiscreen.height * 0.1)) { |
| 202 | - | ||
| 203 | // | 202 | // |
| 204 | - VStack(alignment: .center) { | 203 | +//// |
| 205 | - Image(uiImage: barcodeImage) | 204 | +// VStack(alignment: .center) { |
| 206 | - .resizable() | 205 | +// Image(uiImage: barcodeImage) |
| 207 | - .aspectRatio(contentMode: .fit) | 206 | +// .resizable() |
| 208 | - .frame(width: self.uiscreen.width * 0.8, height: self.uiscreen.height * 0.1) | 207 | +// .aspectRatio(contentMode: .fit) |
| 209 | - } | 208 | +// .frame(width: self.uiscreen.width * 0.8, height: self.uiscreen.height * 0.1) |
| 210 | - .frame(maxWidth: .infinity) | 209 | +// } |
| 211 | - .padding(.top, self.uiscreen.height * 0.01) | 210 | +// .frame(maxWidth: .infinity) |
| 212 | - } | 211 | +// .padding(.top, self.uiscreen.height * 0.01) |
| 212 | +// } | ||
| 213 | 213 | ||
| 214 | 214 | ||
| 215 | Text(barcodeString) | 215 | Text(barcodeString) | ... | ... |
| ... | @@ -39,7 +39,7 @@ extension CouponView { | ... | @@ -39,7 +39,7 @@ extension CouponView { |
| 39 | .multilineTextAlignment(.center) | 39 | .multilineTextAlignment(.center) |
| 40 | .frame(maxWidth: .infinity) | 40 | .frame(maxWidth: .infinity) |
| 41 | .padding(.horizontal) | 41 | .padding(.horizontal) |
| 42 | - | 42 | + .offset(x: -self.uiscreen.height * 0.0125) |
| 43 | } | 43 | } |
| 44 | .frame(maxWidth: .infinity) | 44 | .frame(maxWidth: .infinity) |
| 45 | .padding(.horizontal) | 45 | .padding(.horizontal) | ... | ... |
| ... | @@ -154,7 +154,7 @@ extension CouponsView { | ... | @@ -154,7 +154,7 @@ extension CouponsView { |
| 154 | .multilineTextAlignment(.center) | 154 | .multilineTextAlignment(.center) |
| 155 | .frame(maxWidth: .infinity) | 155 | .frame(maxWidth: .infinity) |
| 156 | .padding(.horizontal) | 156 | .padding(.horizontal) |
| 157 | - | 157 | + .offset(x: -self.uiscreen.height * 0.0125) |
| 158 | } | 158 | } |
| 159 | .frame(maxWidth: .infinity) | 159 | .frame(maxWidth: .infinity) |
| 160 | .padding(.horizontal) | 160 | .padding(.horizontal) | ... | ... |
| ... | @@ -52,7 +52,7 @@ extension MoreForYouView { | ... | @@ -52,7 +52,7 @@ extension MoreForYouView { |
| 52 | .multilineTextAlignment(.center) | 52 | .multilineTextAlignment(.center) |
| 53 | .frame(maxWidth: .infinity) | 53 | .frame(maxWidth: .infinity) |
| 54 | .padding(.horizontal) | 54 | .padding(.horizontal) |
| 55 | - | 55 | + .offset(x: -self.uiscreen.height * 0.0125) |
| 56 | } | 56 | } |
| 57 | .frame(maxWidth: .infinity) | 57 | .frame(maxWidth: .infinity) |
| 58 | .padding(.horizontal) | 58 | .padding(.horizontal) | ... | ... |
| ... | @@ -57,7 +57,7 @@ extension WalletView { | ... | @@ -57,7 +57,7 @@ extension WalletView { |
| 57 | .multilineTextAlignment(.center) | 57 | .multilineTextAlignment(.center) |
| 58 | .frame(maxWidth: .infinity) | 58 | .frame(maxWidth: .infinity) |
| 59 | .padding(.horizontal) | 59 | .padding(.horizontal) |
| 60 | - | 60 | + .offset(x: -self.uiscreen.height * 0.0125) |
| 61 | } | 61 | } |
| 62 | .frame(maxWidth: .infinity) | 62 | .frame(maxWidth: .infinity) |
| 63 | .padding(.horizontal) | 63 | .padding(.horizontal) | ... | ... |
| ... | @@ -18,16 +18,42 @@ public class swiftApi { | ... | @@ -18,16 +18,42 @@ public class swiftApi { |
| 18 | return "1" | 18 | return "1" |
| 19 | } | 19 | } |
| 20 | 20 | ||
| 21 | - public func setDFY(couponCode: String, merchantId: String) { | 21 | + public class DFY { |
| 22 | + let couponCode: String? | ||
| 23 | + let merchantId: String? | ||
| 22 | 24 | ||
| 25 | + init(couponCode: String, merchantId: String) { | ||
| 26 | + self.couponCode = couponCode | ||
| 27 | + self.merchantId = merchantId | ||
| 28 | + } | ||
| 29 | + } | ||
| 30 | + | ||
| 31 | + public func setDFY(couponCode: String, merchantId: String) { | ||
| 32 | + DFY.init(couponCode: couponCode, merchantId: merchantId) | ||
| 23 | } | 33 | } |
| 24 | 34 | ||
| 35 | + public class activeDFYCoupons { | ||
| 36 | + let campaignIds: Array<String> | ||
| 37 | + | ||
| 38 | + init(campaignIds: Array<String>) { | ||
| 39 | + self.campaignIds = campaignIds | ||
| 40 | + } | ||
| 41 | + } | ||
| 42 | + | ||
| 25 | public func setActiveDFYCoupons(campaignIds: Array<String>) { | 43 | public func setActiveDFYCoupons(campaignIds: Array<String>) { |
| 44 | + activeDFYCoupons.init(campaignIds: campaignIds) | ||
| 45 | + } | ||
| 46 | + | ||
| 47 | + public class CCMSLoyaltyCampaigns { | ||
| 48 | + let campaigns: Array<Dictionary<String, String>> | ||
| 26 | 49 | ||
| 50 | + init(campaigns: Array<Dictionary<String, String>>) { | ||
| 51 | + self.campaigns = campaigns | ||
| 52 | + } | ||
| 27 | } | 53 | } |
| 28 | 54 | ||
| 29 | public func setCCMSLoyaltyCampaigns(campaigns: Array<Dictionary<String, String>>) { | 55 | public func setCCMSLoyaltyCampaigns(campaigns: Array<Dictionary<String, String>>) { |
| 30 | - | 56 | + CCMSLoyaltyCampaigns.init(campaigns: campaigns) |
| 31 | } | 57 | } |
| 32 | 58 | ||
| 33 | public class CouponSetItemModel { | 59 | public class CouponSetItemModel { | ... | ... |
-
Please register or login to post a comment