Vasilis

fixes at header

......@@ -39,6 +39,7 @@ extension AllGiftsView {
.multilineTextAlignment(.center)
.frame(maxWidth: .infinity)
.padding(.horizontal)
.offset(x: -self.uiscreen.height * 0.0125)
}
.frame(maxWidth: .infinity)
.padding(.horizontal)
......
......@@ -40,7 +40,7 @@ extension CampaignWebview {
.multilineTextAlignment(.center)
.frame(maxWidth: .infinity)
.padding(.horizontal)
.offset(x: -self.uiscreen.height * 0.0125)
}
.frame(maxWidth: .infinity)
.padding(.horizontal)
......
......@@ -11,8 +11,8 @@ import Combine
import Foundation
import UIKit
// TODO: Uncomment for barcode
import RSBarcodes_Swift
import AVFoundation
//import RSBarcodes_Swift
//import AVFoundation
......@@ -68,7 +68,7 @@ extension CouponBarcodeView {
.multilineTextAlignment(.center)
.frame(maxWidth: .infinity)
.padding(.horizontal)
.offset(x: -self.uiscreen.height * 0.0125)
}
.frame(maxWidth: .infinity)
.padding(.horizontal)
......@@ -198,18 +198,18 @@ extension CouponBarcodeView {
// let isValid = RSUnifiedCodeValidator.shared.isValid(barcodeString, machineReadableCodeObjectType: AVMetadataObject.ObjectType.ean13.rawValue)
// TODO: Uncomment for barcode
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)) {
// 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)) {
//
VStack(alignment: .center) {
Image(uiImage: barcodeImage)
.resizable()
.aspectRatio(contentMode: .fit)
.frame(width: self.uiscreen.width * 0.8, height: self.uiscreen.height * 0.1)
}
.frame(maxWidth: .infinity)
.padding(.top, self.uiscreen.height * 0.01)
}
////
// VStack(alignment: .center) {
// Image(uiImage: barcodeImage)
// .resizable()
// .aspectRatio(contentMode: .fit)
// .frame(width: self.uiscreen.width * 0.8, height: self.uiscreen.height * 0.1)
// }
// .frame(maxWidth: .infinity)
// .padding(.top, self.uiscreen.height * 0.01)
// }
Text(barcodeString)
......
......@@ -39,7 +39,7 @@ extension CouponView {
.multilineTextAlignment(.center)
.frame(maxWidth: .infinity)
.padding(.horizontal)
.offset(x: -self.uiscreen.height * 0.0125)
}
.frame(maxWidth: .infinity)
.padding(.horizontal)
......
......@@ -154,7 +154,7 @@ extension CouponsView {
.multilineTextAlignment(.center)
.frame(maxWidth: .infinity)
.padding(.horizontal)
.offset(x: -self.uiscreen.height * 0.0125)
}
.frame(maxWidth: .infinity)
.padding(.horizontal)
......
......@@ -52,7 +52,7 @@ extension MoreForYouView {
.multilineTextAlignment(.center)
.frame(maxWidth: .infinity)
.padding(.horizontal)
.offset(x: -self.uiscreen.height * 0.0125)
}
.frame(maxWidth: .infinity)
.padding(.horizontal)
......
......@@ -57,7 +57,7 @@ extension WalletView {
.multilineTextAlignment(.center)
.frame(maxWidth: .infinity)
.padding(.horizontal)
.offset(x: -self.uiscreen.height * 0.0125)
}
.frame(maxWidth: .infinity)
.padding(.horizontal)
......
......@@ -18,16 +18,42 @@ public class swiftApi {
return "1"
}
public class DFY {
let couponCode: String?
let merchantId: String?
init(couponCode: String, merchantId: String) {
self.couponCode = couponCode
self.merchantId = merchantId
}
}
public func setDFY(couponCode: String, merchantId: String) {
DFY.init(couponCode: couponCode, merchantId: merchantId)
}
public class activeDFYCoupons {
let campaignIds: Array<String>
init(campaignIds: Array<String>) {
self.campaignIds = campaignIds
}
}
public func setActiveDFYCoupons(campaignIds: Array<String>) {
activeDFYCoupons.init(campaignIds: campaignIds)
}
public class CCMSLoyaltyCampaigns {
let campaigns: Array<Dictionary<String, String>>
init(campaigns: Array<Dictionary<String, String>>) {
self.campaigns = campaigns
}
}
public func setCCMSLoyaltyCampaigns(campaigns: Array<Dictionary<String, String>>) {
CCMSLoyaltyCampaigns.init(campaigns: campaigns)
}
public class CouponSetItemModel {
......