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
2024-05-09 15:18:56 +0300
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
20fc2397b33926814e313f24b5a69a98c3dc69b0
20fc2397
1 parent
808437f2
box redesign MyRewards
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
84 additions
and
11 deletions
SwiftWarplyFramework/SwiftWarplyFramework.xcworkspace/xcuserdata/manos.xcuserdatad/UserInterfaceState.xcuserstate
SwiftWarplyFramework/SwiftWarplyFramework/LoyaltyHistoryViewController.swift
SwiftWarplyFramework/SwiftWarplyFramework/Main.storyboard
SwiftWarplyFramework/SwiftWarplyFramework/WalletActiveCouponCollectionViewCell.swift
SwiftWarplyFramework/SwiftWarplyFramework/WalletActiveCouponsScrollTableViewCell.swift
SwiftWarplyFramework/SwiftWarplyFramework/WalletViewController.swift
SwiftWarplyFramework/SwiftWarplyFramework/swiftApi.swift
SwiftWarplyFramework/SwiftWarplyFramework.xcworkspace/xcuserdata/manos.xcuserdatad/UserInterfaceState.xcuserstate
View file @
20fc239
No preview for this file type
SwiftWarplyFramework/SwiftWarplyFramework/LoyaltyHistoryViewController.swift
View file @
20fc239
...
...
@@ -417,15 +417,12 @@ import SwiftEventBus
@IBAction
func
boxBannerButtonAction
(
_
sender
:
Any
)
{
print
(
"BOX coupon banner pressed!"
)
// // box_analysis_pressed event
// let dealsAnalysis = swiftApi.WarplyDealsAnalysisEventModel()
// dealsAnalysis._isPressed = true
// SwiftEventBus.post("box_analysis_pressed", sender: dealsAnalysis)
// box_analysis_pressed event
let
dealsAnalysis
=
swiftApi
.
Warply
Deals
AnalysisEventModel
()
let
dealsAnalysis
=
swiftApi
.
Warply
Box
AnalysisEventModel
()
dealsAnalysis
.
_isPressed
=
true
SwiftEventBus
.
post
(
"box_analysis_pressed"
)
SwiftEventBus
.
post
(
"box_analysis_pressed"
,
sender
:
dealsAnalysis
)
// SwiftEventBus.post("box_analysis_pressed")
let
firebaseEvent
=
swiftApi
.
LoyaltySDKFirebaseEventModel
()
firebaseEvent
.
_eventName
=
"did_tap_box_badge"
...
...
SwiftWarplyFramework/SwiftWarplyFramework/Main.storyboard
View file @
20fc239
This diff could not be displayed because it is too large.
SwiftWarplyFramework/SwiftWarplyFramework/WalletActiveCouponCollectionViewCell.swift
View file @
20fc239
...
...
@@ -8,13 +8,51 @@
import
UIKit
@objc
public
class
WalletActiveCouponCollectionViewCell
:
UICollectionViewCell
{
@IBOutlet
weak
var
badgeViewParent
:
UIView
!
@IBOutlet
weak
var
badgeView
:
UIView
!
@IBOutlet
weak
var
badgeImage
:
UIImageView
!
@IBOutlet
weak
var
badgeLabel
:
UILabel
!
@IBOutlet
weak
var
badgeCountView
:
UIView
!
@IBOutlet
weak
var
badgeCountLabel
:
UILabel
!
public
override
func
awakeFromNib
()
{
super
.
awakeFromNib
()
// Badge Banner
// badgeViewParent.backgroundColor = UIColor(red: 0.95, green: 0.95, blue: 0.95, alpha: 1.00)
badgeViewParent
.
backgroundColor
=
.
white
badgeViewParent
.
layer
.
cornerRadius
=
16.0
badgeViewParent
.
layer
.
shadowColor
=
UIColor
(
red
:
0.00
,
green
:
0.00
,
blue
:
0.00
,
alpha
:
0.2
)
.
cgColor
badgeViewParent
.
layer
.
shadowOffset
=
CGSize
(
width
:
0.0
,
height
:
1.0
)
badgeViewParent
.
layer
.
shadowOpacity
=
1.0
badgeViewParent
.
layer
.
shadowRadius
=
2.0
// badgeView.backgroundColor = UIColor(red: 0.46, green: 0.75, blue: 0.45, alpha: 0.05)
badgeView
.
backgroundColor
=
.
white
badgeView
.
layer
.
cornerRadius
=
16.0
badgeCountView
.
layer
.
cornerRadius
=
4.0
badgeCountView
.
backgroundColor
=
UIColor
(
red
:
0.92
,
green
:
0.75
,
blue
:
0.41
,
alpha
:
1.00
)
}
func
configureCell
()
{
func
configureCell
(
badgeId
:
String
,
badgeCount
:
Int
)
{
if
(
badgeId
==
"dfy"
)
{
badgeImage
.
image
=
UIImage
(
named
:
"wallet_banner_dfy"
,
in
:
MyEmptyClass
.
resourceBundle
(),
compatibleWith
:
nil
)
badgeLabel
.
text
=
"DEALS FOR YOU"
}
else
if
(
badgeId
==
"sm"
)
{
badgeImage
.
image
=
UIImage
(
named
:
"wallet_banner_sm"
,
in
:
MyEmptyClass
.
resourceBundle
(),
compatibleWith
:
nil
)
badgeLabel
.
text
=
"SUPERMARKET DEALS"
}
else
if
(
badgeId
==
"gfy"
)
{
badgeImage
.
image
=
UIImage
(
named
:
"wallet_banner_gfy"
,
in
:
MyEmptyClass
.
resourceBundle
(),
compatibleWith
:
nil
)
badgeLabel
.
text
=
"FREE COUPONS"
}
else
if
(
badgeId
==
"box"
)
{
badgeImage
.
image
=
UIImage
(
named
:
"wallet_banner_box"
,
in
:
MyEmptyClass
.
resourceBundle
(),
compatibleWith
:
nil
)
badgeLabel
.
text
=
"BOX"
}
badgeCountLabel
.
text
=
String
(
badgeCount
)
}
}
...
...
SwiftWarplyFramework/SwiftWarplyFramework/WalletActiveCouponsScrollTableViewCell.swift
View file @
20fc239
This diff is collapsed. Click to expand it.
SwiftWarplyFramework/SwiftWarplyFramework/WalletViewController.swift
View file @
20fc239
...
...
@@ -69,6 +69,7 @@ import SwiftEventBus
public
var
loyaltyBadge
:
swiftApi
.
LoyaltyBadgeModel
=
swiftApi
()
.
getLoyaltyBadge
()
public
var
profile
:
swiftApi
.
ProfileModel
?
=
swiftApi
()
.
getConsumer
()
public
var
unifiedCoupons
:
Array
<
swiftApi
.
UnifiedCouponModel
>
=
[]
public
var
boxCoupons
:
Array
<
swiftApi
.
ActiveBoxCouponModel
>
=
swiftApi
()
.
getActiveBoxCoupons
()
var
timerWallet
:
DispatchSourceTimer
?
var
seconds
:
Int
=
0
...
...
@@ -1386,8 +1387,9 @@ extension WalletViewController: UITableViewDelegate, UITableViewDataSource{
if
(
indexPath
.
section
==
0
)
{
let
cell
=
tableView
.
dequeueReusableCell
(
withIdentifier
:
"WalletActiveCouponsTableViewCellId"
,
for
:
indexPath
)
as!
WalletActiveCouponsTableViewCell
cell
.
configureCell
(
dfyCount
:
self
.
dfyCoupons
.
count
,
smCount
:
self
.
unifiedCoupons
.
count
,
gfyCount
:
self
.
coupons
.
count
)
let
cell
=
tableView
.
dequeueReusableCell
(
withIdentifier
:
"WalletActiveCouponsScrollTableViewCellId"
,
for
:
indexPath
)
as!
WalletActiveCouponsScrollTableViewCell
cell
.
configureCell
(
dfyCount
:
self
.
dfyCoupons
.
count
,
smCount
:
self
.
unifiedCoupons
.
count
,
gfyCount
:
self
.
coupons
.
count
,
boxCount
:
self
.
boxCoupons
.
count
)
cell
.
parent
=
self
return
cell
}
else
if
(
indexPath
.
section
==
1
)
{
...
...
SwiftWarplyFramework/SwiftWarplyFramework/swiftApi.swift
View file @
20fc239
...
...
@@ -4920,6 +4920,24 @@ public class swiftApi {
}
public
class
WarplyBoxAnalysisEventModel
{
private
var
isPressed
:
Bool
public
init
()
{
self
.
isPressed
=
false
}
public
var
_isPressed
:
Bool
{
get
{
// getter
return
self
.
isPressed
}
set
(
newValue
)
{
//setter
self
.
isPressed
=
newValue
}
}
}
public
class
ActiveDFYCouponEventModel
{
private
var
isPressed
:
Bool
...
...
@@ -4938,6 +4956,24 @@ public class swiftApi {
}
public
class
ActiveBoxCouponEventModel
{
private
var
isPressed
:
Bool
public
init
()
{
self
.
isPressed
=
false
}
public
var
_isPressed
:
Bool
{
get
{
// getter
return
self
.
isPressed
}
set
(
newValue
)
{
//setter
self
.
isPressed
=
newValue
}
}
}
public
class
WarplyCCMSEnabledModel
{
private
var
isActivated
:
Bool
...
...
Please
register
or
login
to post a comment