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-12 15:52:39 +0300
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
0cec924381995b0e4ccc12a334d826036e00fbe0
0cec9243
1 parent
290c05af
fix setCouponList, coupon discount
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
4 deletions
SwiftWarplyFramework/SwiftWarplyFramework/CouponsTableViewCell.swift
SwiftWarplyFramework/SwiftWarplyFramework/swiftApi.swift
SwiftWarplyFramework/SwiftWarplyFramework/CouponsTableViewCell.swift
View file @
0cec924
...
...
@@ -49,7 +49,7 @@ import UIKit
couponImage
.
load
(
link
:
couponSetData
?
.
img_preview
??
""
,
placeholder
:
UIImage
(),
cache
:
URLCache
())
nameLabel
.
text
=
couponSetData
?
.
name
??
""
dicountLabel
.
text
=
(
coupon
.
discount
??
""
)
+
"€"
dicountLabel
.
text
=
(
coupon
.
discount
??
""
)
discriptionLabel
.
text
=
couponSetData
?
.
short_description
??
""
expirationLabel
.
text
=
"Ισχύει έως "
+
(
coupon
.
expiration
??
""
)
}
...
...
SwiftWarplyFramework/SwiftWarplyFramework/swiftApi.swift
View file @
0cec924
...
...
@@ -2361,9 +2361,9 @@ public class swiftApi {
public
func
setCouponList
(
_
coupons
:
Array
<
CouponItemModel
>
)
{
let
filteredCoupons
=
coupons
.
filter
{
CharacterSet
.
decimalDigits
.
isSuperset
(
of
:
CharacterSet
(
charactersIn
:
$0
.
discount
??
""
))
}
let
activeCoupons
=
filteredC
oupons
.
filter
({
return
$0
.
status
==
1
})
let
oldCoupons
=
filteredC
oupons
.
filter
({
return
$0
.
status
==
0
})
//
let filteredCoupons = coupons.filter { CharacterSet.decimalDigits.isSuperset(of: CharacterSet(charactersIn: $0.discount ?? "")) }
let
activeCoupons
=
c
oupons
.
filter
({
return
$0
.
status
==
1
})
let
oldCoupons
=
c
oupons
.
filter
({
return
$0
.
status
==
0
})
GlobalVariables
.
couponList
=
activeCoupons
...
...
Please
register
or
login
to post a comment