Manos Chorianopoulos

MarketPassViewController changes

...@@ -298,7 +298,7 @@ ...@@ -298,7 +298,7 @@
298 <rect key="frame" x="0.0" y="0.0" width="414" height="852"/> 298 <rect key="frame" x="0.0" y="0.0" width="414" height="852"/>
299 <subviews> 299 <subviews>
300 <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="fHd-ff-Sbn"> 300 <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="fHd-ff-Sbn">
301 - <rect key="frame" x="17" y="23" width="380" height="513.5"/> 301 + <rect key="frame" x="17" y="23" width="380" height="499.5"/>
302 <subviews> 302 <subviews>
303 <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="SUPERMARKET DEALS CARD" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="ffU-yH-vAL"> 303 <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="SUPERMARKET DEALS CARD" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="ffU-yH-vAL">
304 <rect key="frame" x="26" y="26" width="328" height="27"/> 304 <rect key="frame" x="26" y="26" width="328" height="27"/>
...@@ -313,16 +313,16 @@ ...@@ -313,16 +313,16 @@
313 <nil key="highlightedColor"/> 313 <nil key="highlightedColor"/>
314 </label> 314 </label>
315 <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="74w-a6-uZN"> 315 <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="74w-a6-uZN">
316 - <rect key="frame" x="26" y="154" width="328" height="157.5"/> 316 + <rect key="frame" x="18" y="73" width="344" height="157.5"/>
317 <subviews> 317 <subviews>
318 <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="cBT-1y-9Lf"> 318 <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="cBT-1y-9Lf">
319 - <rect key="frame" x="24" y="5" width="280" height="110"/> 319 + <rect key="frame" x="24" y="5" width="296" height="110"/>
320 <constraints> 320 <constraints>
321 <constraint firstAttribute="height" constant="110" id="wRW-6H-VVs"/> 321 <constraint firstAttribute="height" constant="110" id="wRW-6H-VVs"/>
322 </constraints> 322 </constraints>
323 </imageView> 323 </imageView>
324 <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="123456789101112" textAlignment="center" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="t9R-7Y-Vtc" customClass="CopyableLabel" customModule="SwiftWarplyFramework" customModuleProvider="target"> 324 <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="123456789101112" textAlignment="center" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="t9R-7Y-Vtc" customClass="CopyableLabel" customModule="SwiftWarplyFramework" customModuleProvider="target">
325 - <rect key="frame" x="24" y="120" width="280" height="23.5"/> 325 + <rect key="frame" x="24" y="120" width="296" height="23.5"/>
326 <fontDescription key="fontDescription" name="PeridotPE-Regular" family="Peridot PE" pointSize="19"/> 326 <fontDescription key="fontDescription" name="PeridotPE-Regular" family="Peridot PE" pointSize="19"/>
327 <color key="textColor" red="0.12941176470588234" green="0.12941176470588234" blue="0.12941176470588234" alpha="1" colorSpace="calibratedRGB"/> 327 <color key="textColor" red="0.12941176470588234" green="0.12941176470588234" blue="0.12941176470588234" alpha="1" colorSpace="calibratedRGB"/>
328 <nil key="highlightedColor"/> 328 <nil key="highlightedColor"/>
...@@ -340,25 +340,41 @@ ...@@ -340,25 +340,41 @@
340 </constraints> 340 </constraints>
341 </view> 341 </view>
342 <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="HCl-ht-lub" userLabel="CouponsValueView"> 342 <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="HCl-ht-lub" userLabel="CouponsValueView">
343 - <rect key="frame" x="0.0" y="348.5" width="380" height="53"/> 343 + <rect key="frame" x="0.0" y="250.5" width="380" height="137"/>
344 <subviews> 344 <subviews>
345 - <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Έχεις κουπόνια συνολικής αξίας 30€" textAlignment="center" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Zk5-FL-kMS"> 345 + <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Zk5-FL-kMS">
346 - <rect key="frame" x="26" y="16" width="328" height="21"/> 346 + <rect key="frame" x="26" y="16" width="328" height="105"/>
347 + <string key="text">Χρησιμοποίησε τη SUPERMARKET DEALS CARD σου για να κερδίσεις έκπτωση σε επιλεγμένα προϊόντα. Ανακάλυψε τα διαθέσιμα εκπτωτικά κουπόνια στο For You.</string>
347 <fontDescription key="fontDescription" name="PeridotPE-Regular" family="Peridot PE" pointSize="17"/> 348 <fontDescription key="fontDescription" name="PeridotPE-Regular" family="Peridot PE" pointSize="17"/>
348 <color key="textColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> 349 <color key="textColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
349 <nil key="highlightedColor"/> 350 <nil key="highlightedColor"/>
350 </label> 351 </label>
352 + <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="Bvm-XO-0F3">
353 + <rect key="frame" x="0.0" y="0.0" width="380" height="137"/>
354 + <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
355 + <state key="normal" title="Button"/>
356 + <buttonConfiguration key="configuration" style="plain" title="Button">
357 + <color key="baseForegroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
358 + </buttonConfiguration>
359 + <connections>
360 + <action selector="supermakrtPassButtonAction:" destination="Bfc-KW-c8g" eventType="touchUpInside" id="NZG-CU-3wg"/>
361 + </connections>
362 + </button>
351 </subviews> 363 </subviews>
352 <color key="backgroundColor" red="0.0" green="0.42745098039215684" blue="0.14901960784313725" alpha="1" colorSpace="calibratedRGB"/> 364 <color key="backgroundColor" red="0.0" green="0.42745098039215684" blue="0.14901960784313725" alpha="1" colorSpace="calibratedRGB"/>
353 <constraints> 365 <constraints>
366 + <constraint firstItem="Bvm-XO-0F3" firstAttribute="top" secondItem="HCl-ht-lub" secondAttribute="top" id="5PC-jg-uWq"/>
354 <constraint firstAttribute="trailing" secondItem="Zk5-FL-kMS" secondAttribute="trailing" constant="26" id="8gj-ca-QKO"/> 367 <constraint firstAttribute="trailing" secondItem="Zk5-FL-kMS" secondAttribute="trailing" constant="26" id="8gj-ca-QKO"/>
355 <constraint firstAttribute="bottom" secondItem="Zk5-FL-kMS" secondAttribute="bottom" constant="16" id="OLu-Uk-BON"/> 368 <constraint firstAttribute="bottom" secondItem="Zk5-FL-kMS" secondAttribute="bottom" constant="16" id="OLu-Uk-BON"/>
369 + <constraint firstAttribute="bottom" secondItem="Bvm-XO-0F3" secondAttribute="bottom" id="T19-eg-TDE"/>
356 <constraint firstItem="Zk5-FL-kMS" firstAttribute="leading" secondItem="HCl-ht-lub" secondAttribute="leading" constant="26" id="Z7D-V4-kqB"/> 370 <constraint firstItem="Zk5-FL-kMS" firstAttribute="leading" secondItem="HCl-ht-lub" secondAttribute="leading" constant="26" id="Z7D-V4-kqB"/>
371 + <constraint firstAttribute="trailing" secondItem="Bvm-XO-0F3" secondAttribute="trailing" id="u13-rS-jsa"/>
357 <constraint firstItem="Zk5-FL-kMS" firstAttribute="top" secondItem="HCl-ht-lub" secondAttribute="top" constant="16" id="v5u-PM-u2n"/> 372 <constraint firstItem="Zk5-FL-kMS" firstAttribute="top" secondItem="HCl-ht-lub" secondAttribute="top" constant="16" id="v5u-PM-u2n"/>
373 + <constraint firstItem="Bvm-XO-0F3" firstAttribute="leading" secondItem="HCl-ht-lub" secondAttribute="leading" id="z9b-HX-CzR"/>
358 </constraints> 374 </constraints>
359 </view> 375 </view>
360 <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="O1Z-nB-jp1"> 376 <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="O1Z-nB-jp1">
361 - <rect key="frame" x="0.0" y="401.5" width="380" height="112"/> 377 + <rect key="frame" x="0.0" y="387.5" width="380" height="112"/>
362 <subviews> 378 <subviews>
363 <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="e1L-dV-0yr"> 379 <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="e1L-dV-0yr">
364 <rect key="frame" x="220" y="32" width="148" height="48"/> 380 <rect key="frame" x="220" y="32" width="148" height="48"/>
...@@ -386,23 +402,28 @@ ...@@ -386,23 +402,28 @@
386 </subviews> 402 </subviews>
387 <color key="backgroundColor" red="0.21176470588235294" green="0.70196078431372544" blue="0.16862745098039217" alpha="1" colorSpace="calibratedRGB"/> 403 <color key="backgroundColor" red="0.21176470588235294" green="0.70196078431372544" blue="0.16862745098039217" alpha="1" colorSpace="calibratedRGB"/>
388 <constraints> 404 <constraints>
389 - <constraint firstAttribute="trailing" secondItem="74w-a6-uZN" secondAttribute="trailing" constant="26" id="Gda-fs-RTg"/> 405 + <constraint firstAttribute="trailing" secondItem="74w-a6-uZN" secondAttribute="trailing" constant="18" id="Gda-fs-RTg"/>
390 <constraint firstAttribute="trailing" secondItem="HCl-ht-lub" secondAttribute="trailing" id="J53-eS-6Fr"/> 406 <constraint firstAttribute="trailing" secondItem="HCl-ht-lub" secondAttribute="trailing" id="J53-eS-6Fr"/>
391 <constraint firstItem="HCl-ht-lub" firstAttribute="leading" secondItem="fHd-ff-Sbn" secondAttribute="leading" id="V74-1z-3qe"/> 407 <constraint firstItem="HCl-ht-lub" firstAttribute="leading" secondItem="fHd-ff-Sbn" secondAttribute="leading" id="V74-1z-3qe"/>
392 <constraint firstAttribute="bottom" secondItem="O1Z-nB-jp1" secondAttribute="bottom" id="VQE-kR-d20"/> 408 <constraint firstAttribute="bottom" secondItem="O1Z-nB-jp1" secondAttribute="bottom" id="VQE-kR-d20"/>
393 - <constraint firstItem="74w-a6-uZN" firstAttribute="top" secondItem="FCo-jy-FmB" secondAttribute="bottom" constant="43" id="Y4U-h7-vhS"/> 409 + <constraint firstItem="74w-a6-uZN" firstAttribute="top" secondItem="ffU-yH-vAL" secondAttribute="bottom" constant="20" id="Y4U-h7-vhS"/>
394 <constraint firstAttribute="trailing" secondItem="O1Z-nB-jp1" secondAttribute="trailing" id="a7K-Cs-70c"/> 410 <constraint firstAttribute="trailing" secondItem="O1Z-nB-jp1" secondAttribute="trailing" id="a7K-Cs-70c"/>
395 <constraint firstAttribute="trailing" secondItem="FCo-jy-FmB" secondAttribute="trailing" constant="26" id="cmO-N9-ava"/> 411 <constraint firstAttribute="trailing" secondItem="FCo-jy-FmB" secondAttribute="trailing" constant="26" id="cmO-N9-ava"/>
396 - <constraint firstItem="74w-a6-uZN" firstAttribute="leading" secondItem="fHd-ff-Sbn" secondAttribute="leading" constant="26" id="dgM-id-huG"/> 412 + <constraint firstItem="74w-a6-uZN" firstAttribute="leading" secondItem="fHd-ff-Sbn" secondAttribute="leading" constant="18" id="dgM-id-huG"/>
397 <constraint firstItem="FCo-jy-FmB" firstAttribute="leading" secondItem="fHd-ff-Sbn" secondAttribute="leading" constant="26" id="dtM-80-fIm"/> 413 <constraint firstItem="FCo-jy-FmB" firstAttribute="leading" secondItem="fHd-ff-Sbn" secondAttribute="leading" constant="26" id="dtM-80-fIm"/>
398 <constraint firstItem="ffU-yH-vAL" firstAttribute="top" secondItem="fHd-ff-Sbn" secondAttribute="top" constant="26" id="h8l-cx-6Dh"/> 414 <constraint firstItem="ffU-yH-vAL" firstAttribute="top" secondItem="fHd-ff-Sbn" secondAttribute="top" constant="26" id="h8l-cx-6Dh"/>
399 <constraint firstItem="ffU-yH-vAL" firstAttribute="leading" secondItem="fHd-ff-Sbn" secondAttribute="leading" constant="26" id="m6I-Tr-IxO"/> 415 <constraint firstItem="ffU-yH-vAL" firstAttribute="leading" secondItem="fHd-ff-Sbn" secondAttribute="leading" constant="26" id="m6I-Tr-IxO"/>
400 <constraint firstItem="O1Z-nB-jp1" firstAttribute="top" secondItem="HCl-ht-lub" secondAttribute="bottom" id="mSE-RN-mKo"/> 416 <constraint firstItem="O1Z-nB-jp1" firstAttribute="top" secondItem="HCl-ht-lub" secondAttribute="bottom" id="mSE-RN-mKo"/>
401 - <constraint firstItem="HCl-ht-lub" firstAttribute="top" secondItem="74w-a6-uZN" secondAttribute="bottom" constant="37" id="nH4-Uc-bF8"/> 417 + <constraint firstItem="HCl-ht-lub" firstAttribute="top" secondItem="74w-a6-uZN" secondAttribute="bottom" constant="20" id="nH4-Uc-bF8"/>
402 <constraint firstAttribute="trailing" secondItem="ffU-yH-vAL" secondAttribute="trailing" constant="26" id="o7F-J6-nRj"/> 418 <constraint firstAttribute="trailing" secondItem="ffU-yH-vAL" secondAttribute="trailing" constant="26" id="o7F-J6-nRj"/>
403 <constraint firstItem="FCo-jy-FmB" firstAttribute="top" secondItem="ffU-yH-vAL" secondAttribute="bottom" constant="16" id="r7m-We-OPk"/> 419 <constraint firstItem="FCo-jy-FmB" firstAttribute="top" secondItem="ffU-yH-vAL" secondAttribute="bottom" constant="16" id="r7m-We-OPk"/>
404 <constraint firstItem="O1Z-nB-jp1" firstAttribute="leading" secondItem="fHd-ff-Sbn" secondAttribute="leading" id="rr3-UJ-IZH"/> 420 <constraint firstItem="O1Z-nB-jp1" firstAttribute="leading" secondItem="fHd-ff-Sbn" secondAttribute="leading" id="rr3-UJ-IZH"/>
405 </constraints> 421 </constraints>
422 + <variation key="default">
423 + <mask key="subviews">
424 + <exclude reference="FCo-jy-FmB"/>
425 + </mask>
426 + </variation>
406 </view> 427 </view>
407 </subviews> 428 </subviews>
408 <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> 429 <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
......
...@@ -98,7 +98,7 @@ import SwiftEventBus ...@@ -98,7 +98,7 @@ import SwiftEventBus
98 98
99 let barcodeString = "" 99 let barcodeString = ""
100 barcodeLabel.text = barcodeString 100 barcodeLabel.text = barcodeString
101 - barcodeLabel.font = UIFont(name: "PeridotPE-Regular", size: 19.0) 101 + barcodeLabel.font = UIFont(name: "PeridotPE-SBold", size: 19.0)
102 barcodeLabel.textColor = UIColor(rgb: 0x212121) 102 barcodeLabel.textColor = UIColor(rgb: 0x212121)
103 103
104 // if let barcodeUIImage = RSUnifiedCodeGenerator.shared.generateCode(barcodeString, machineReadableCodeObjectType: AVMetadataObject.ObjectType.ean13.rawValue, targetSize: CGSize(width: self.uiscreen.width * 0.8, height: self.uiscreen.height * 0.12)) { 104 // if let barcodeUIImage = RSUnifiedCodeGenerator.shared.generateCode(barcodeString, machineReadableCodeObjectType: AVMetadataObject.ObjectType.ean13.rawValue, targetSize: CGSize(width: self.uiscreen.width * 0.8, height: self.uiscreen.height * 0.12)) {
...@@ -112,19 +112,23 @@ import SwiftEventBus ...@@ -112,19 +112,23 @@ import SwiftEventBus
112 // barcodeImageHeight.constant = 0 112 // barcodeImageHeight.constant = 0
113 // } 113 // }
114 114
115 - let couponsValueString = "0.00" 115 + // let couponsValueString = "0.00"
116 - let attrRegular = [NSAttributedString.Key.font : UIFont(name: "PeridotPE-Regular", size: 17) ?? UIFont.systemFont(ofSize: 16), NSAttributedString.Key.foregroundColor: UIColor.white] 116 + // let attrRegular = [NSAttributedString.Key.font : UIFont(name: "PeridotPE-Regular", size: 17) ?? UIFont.systemFont(ofSize: 16), NSAttributedString.Key.foregroundColor: UIColor.white]
117 - let attrBold = [NSAttributedString.Key.font : UIFont(name: "PeridotPE-Bold", size: 17) ?? UIFont.boldSystemFont(ofSize: 16), NSAttributedString.Key.foregroundColor: UIColor.white] 117 + // let attrBold = [NSAttributedString.Key.font : UIFont(name: "PeridotPE-Bold", size: 17) ?? UIFont.boldSystemFont(ofSize: 16), NSAttributedString.Key.foregroundColor: UIColor.white]
118 118
119 - let couponsValueNormalText1 = "Με τα διαθέσιμα κουπόνια μπορείς να εξοικονομήσεις έως και " 119 + // let couponsValueNormalText1 = "Με τα διαθέσιμα κουπόνια μπορείς να εξοικονομήσεις έως και "
120 - let couponsValueBoldText = couponsValueString + "€." 120 + // let couponsValueBoldText = couponsValueString + "€."
121 121
122 - let couponsValueAttributedString = NSMutableAttributedString(string:couponsValueNormalText1, attributes:attrRegular) 122 + // let couponsValueAttributedString = NSMutableAttributedString(string:couponsValueNormalText1, attributes:attrRegular)
123 - let couponsValueBoldString = NSMutableAttributedString(string: couponsValueBoldText, attributes:attrBold) 123 + // let couponsValueBoldString = NSMutableAttributedString(string: couponsValueBoldText, attributes:attrBold)
124 124
125 - couponsValueAttributedString.append(couponsValueBoldString) 125 + // couponsValueAttributedString.append(couponsValueBoldString)
126 - couponsValueLabel.attributedText = couponsValueAttributedString 126 + // couponsValueLabel.attributedText = couponsValueAttributedString
127 +
128 + couponsValueLabel.text = "Χρησιμοποίησε τη SUPERMARKET DEALS CARD σου για να κερδίσεις έκπτωση σε επιλεγμένα προϊόντα. Ανακάλυψε τα διαθέσιμα εκπτωτικά κουπόνια στο For You."
127 couponsValueLabel.textAlignment = .left 129 couponsValueLabel.textAlignment = .left
130 + couponsValueLabel.font = UIFont(name: "PeridotPE-Regular", size: 13.0)
131 + couponsValueLabel.textColor = .white
128 132
129 mapButton.titleLabel?.font = UIFont(name: "PeridotPE-SBold", size: 16) 133 mapButton.titleLabel?.font = UIFont(name: "PeridotPE-SBold", size: 16)
130 mapButton.setTitle("Δες στο χάρτη", for: .normal) 134 mapButton.setTitle("Δες στο χάρτη", for: .normal)
...@@ -232,11 +236,16 @@ import SwiftEventBus ...@@ -232,11 +236,16 @@ import SwiftEventBus
232 236
233 couponsValueAttributedString.append(couponsValueBoldString) 237 couponsValueAttributedString.append(couponsValueBoldString)
234 couponsValueLabel.attributedText = couponsValueAttributedString 238 couponsValueLabel.attributedText = couponsValueAttributedString
239 +
240 + couponsValueLabel.text = "Χρησιμοποίησε τη SUPERMARKET DEALS CARD σου για να κερδίσεις έκπτωση σε επιλεγμένα προϊόντα. Ανακάλυψε τα διαθέσιμα εκπτωτικά κουπόνια στο For You."
235 couponsValueLabel.textAlignment = .left 241 couponsValueLabel.textAlignment = .left
242 + couponsValueLabel.font = UIFont(name: "PeridotPE-Regular", size: 13.0)
243 + couponsValueLabel.textColor = .white
236 244
237 - let formattedCost = couponsValueString.replacingOccurrences(of: ".", with: ",") 245 + // let formattedCost = couponsValueString.replacingOccurrences(of: ".", with: ",")
238 couponsValueLabel.isAccessibilityElement = true 246 couponsValueLabel.isAccessibilityElement = true
239 - couponsValueLabel.accessibilityLabel = "Έχεις κουπόνια συνολικής αξίας " + formattedCost + "€" 247 + // couponsValueLabel.accessibilityLabel = "Έχεις κουπόνια συνολικής αξίας " + formattedCost + "€"
248 + couponsValueLabel.accessibilityLabel = "Χρησιμοποίησε τη SUPERMARKET DEALS CARD σου για να κερδίσεις έκπτωση σε επιλεγμένα προϊόντα. Ανακάλυψε τα διαθέσιμα εκπτωτικά κουπόνια στο For You."
240 249
241 let supermarkets: Array<swiftApi.SupermarketModel> = marketPassDetails?._supermarkets ?? [] 250 let supermarkets: Array<swiftApi.SupermarketModel> = marketPassDetails?._supermarkets ?? []
242 251
...@@ -380,6 +389,10 @@ import SwiftEventBus ...@@ -380,6 +389,10 @@ import SwiftEventBus
380 // } 389 // }
381 390
382 // MARK: - Actions 391 // MARK: - Actions
392 + @IBAction func supermakrtPassButtonAction(_ sender: Any) {
393 + swiftApi().openSupermarketPass(self)
394 + }
395 +
383 @IBAction func mapButtonAction(_ sender: Any) { 396 @IBAction func mapButtonAction(_ sender: Any) {
384 swiftApi().openSupermarketMap(self) 397 swiftApi().openSupermarketMap(self)
385 } 398 }
......
...@@ -9421,6 +9421,33 @@ public class swiftApi { ...@@ -9421,6 +9421,33 @@ public class swiftApi {
9421 } 9421 }
9422 } 9422 }
9423 9423
9424 + public func getMarketPassUrl() -> String {
9425 + let appUuid = swiftApi().getAppUuid()
9426 + if (appUuid == "f83dfde1145e4c2da69793abb2f579af") {
9427 + return "https://dev.supermarketdeals.eu"
9428 + } else {
9429 + return "https://supermarketdeals.eu"
9430 + }
9431 + }
9432 +
9433 + public func openSupermarketPass(_ controller: UIViewController) -> Void {
9434 + let status = swiftApi().getNetworkStatus()
9435 + if (status == -1 || status == 0) {
9436 + swiftApi().showDialog(controller, "Δεν υπάρχει σύνδεση","Αυτή τη στιγμή βρίσκεσαι εκτός σύνδεσης. Παρακαλούμε βεβαιώσου ότι είσαι συνδεδεμένος στο διαδίκτυο και προσπάθησε ξανά.")
9437 +
9438 + } else {
9439 + let tempCampaign = CampaignItemModel()
9440 + let storyboard = UIStoryboard(name: "Main", bundle: Bundle(for: MyEmptyClass.self))
9441 + let vc = storyboard.instantiateViewController(withIdentifier: "CampaignViewController") as! SwiftWarplyFramework.CampaignViewController
9442 + let url = swiftApi().getMarketPassUrl()
9443 + let params = swiftApi().constructCampaignParams(tempCampaign)
9444 + vc.campaignUrl = url
9445 + vc.params = params
9446 + vc.showHeader = false
9447 + controller.navigationController?.pushViewController(vc, animated: true)
9448 + }
9449 + }
9450 +
9424 9451
9425 /* 9452 /*
9426 { 9453 {
......