Toggle navigation
Toggle navigation
This project
Loading...
Sign in
open-source
/
warply_sdk_framework
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Graphs
Network
Create a new issue
Commits
Issue Boards
Authored by
Manos Chorianopoulos
2022-07-04 18:47:34 +0300
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
372e6c3e56923de21bdb123b1ed781cbe8891eca
372e6c3e
1 parent
e0e3c25e
add logs at WalletVC
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
1 deletions
SwiftWarplyFramework/SwiftWarplyFramework/WalletViewController.swift
SwiftWarplyFramework/SwiftWarplyFramework/WalletViewController.swift
View file @
372e6c3
...
...
@@ -33,7 +33,7 @@ import SwiftEventBus
@IBOutlet
weak
var
tableView
:
UITableView
!
@IBOutlet
weak
var
activeCodeImage
:
UIImageView
!
public
var
coupons
:
Array
<
swiftApi
.
CouponItemModel
>
=
swiftApi
()
.
getCouponList
(
)
public
var
coupons
:
Array
<
swiftApi
.
CouponItemModel
>
=
swiftApi
()
.
filterActiveCoupons
(
swiftApi
()
.
getCouponList
()
)
public
var
dfyCoupons
:
Array
<
swiftApi
.
ActiveDFYCouponModel
>
=
swiftApi
()
.
getActiveDFYCoupons
()
public
var
loyaltyBadge
:
swiftApi
.
LoyaltyBadgeModel
=
swiftApi
()
.
getLoyaltyBadge
()
public
var
profile
:
swiftApi
.
ProfileModel
?
=
swiftApi
()
.
getConsumer
()
...
...
@@ -48,6 +48,8 @@ import SwiftEventBus
tableView
.
delegate
=
self
tableView
.
dataSource
=
self
print
(
"Active Gifts Count: "
+
String
(
coupons
.
count
))
headerImage
.
image
=
UIImage
(
named
:
"ic_background_circle"
,
in
:
Bundle
(
for
:
MyEmptyClass
.
self
),
compatibleWith
:
nil
)
dfyEarnImage
.
image
=
UIImage
(
named
:
"wallet_dfy_earn"
,
in
:
Bundle
(
for
:
MyEmptyClass
.
self
),
compatibleWith
:
nil
)
...
...
@@ -64,8 +66,13 @@ import SwiftEventBus
}
else
{
profileImage
.
image
=
UIImage
(
named
:
"default_profile_image"
,
in
:
Bundle
(
for
:
MyEmptyClass
.
self
),
compatibleWith
:
nil
)
}
print
(
"Profile Name: "
+
(
profile
?
.
firstname
??
""
)
+
" "
+
(
profile
?
.
lastname
??
""
))
profileNameLabel
.
text
=
(
profile
?
.
firstname
??
""
)
+
" "
+
(
profile
?
.
lastname
??
""
)
let
userTag
=
swiftApi
()
.
getUserTag
()
print
(
"User tag: "
+
userTag
)
if
(
userTag
!=
""
&&
userTag
!=
"undefined"
)
{
questionnaireButton
.
setTitle
(
userTag
,
for
:
.
normal
)
questionnaireButton
.
titleLabel
?
.
font
=
UIFont
.
systemFont
(
ofSize
:
13
,
weight
:
.
semibold
)
...
...
@@ -115,6 +122,9 @@ import SwiftEventBus
couponEarnLabel
.
text
=
"Μέχρι τώρα έχεις κερδίσει "
+
totalCouponDiscountString
+
"€ σε προσφορές από "
+
String
(
loyaltyBadge
.
_couponCount
)
+
" κουπόνια!"
couponEarnAmountLabel
.
text
=
totalCouponDiscountString
+
"€"
print
(
"Loyalty Badge Value: "
+
totalCouponDiscountString
)
print
(
"Loyalty Badge Count: "
+
String
(
loyaltyBadge
.
_couponCount
))
activeCodeView
.
layer
.
cornerRadius
=
5.0
activeCodeView
.
layer
.
shadowColor
=
UIColor
(
red
:
0.00
,
green
:
0.00
,
blue
:
0.00
,
alpha
:
0.16
)
.
cgColor
...
...
Please
register
or
login
to post a comment