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
2023-10-31 15:51:00 +0200
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
88584ac3f16ad33067190999209be74273d77b46
88584ac3
1 parent
cce4eb14
fix unified coupon expiration date
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
4 deletions
SwiftWarplyFramework/SwiftWarplyFramework/UnifiedCouponBCHeaderTableViewCell.swift
SwiftWarplyFramework/SwiftWarplyFramework/UnifiedCouponsTableViewCell.swift
SwiftWarplyFramework/SwiftWarplyFramework/UnifiedCouponBCHeaderTableViewCell.swift
View file @
88584ac
...
...
@@ -176,8 +176,9 @@ import AVFoundation
showBarcodeButtonTopSpace
.
constant
=
0
// ===
if
let
earliestExpiration
=
coupon
?
.
_coupons
.
min
(
by
:
{
(
$0
.
expiration
??
""
)
<
(
$1
.
expiration
??
""
)
})
{
expirationLabel
.
text
=
"Το κουπόνι ισχύει έως "
+
(
earliestExpiration
.
expiration
??
""
)
// if let earliestExpiration = coupon?._coupons.min(by: { ($0.expiration ?? "") < ($1.expiration ?? "") }) {
if
let
latestExpiration
=
coupon
?
.
_coupons
.
max
(
by
:
{
(
$0
.
expiration
??
""
)
<
(
$1
.
expiration
??
""
)
})
{
expirationLabel
.
text
=
"Το κουπόνι ισχύει έως "
+
(
latestExpiration
.
expiration
??
""
)
}
else
{
expirationLabel
.
text
=
""
}
...
...
SwiftWarplyFramework/SwiftWarplyFramework/UnifiedCouponsTableViewCell.swift
View file @
88584ac
...
...
@@ -65,8 +65,9 @@ import UIKit
activeCouponsCount
==
1
?
"έχεις "
+
String
(
activeCouponsCount
)
+
" ενεργό κουπόνι"
:
"έχεις "
+
String
(
activeCouponsCount
)
+
" ενεργά κουπόνια"
if
let
earliestExpiration
=
activeCoupons
.
min
(
by
:
{
(
$0
.
expiration
??
""
)
<
(
$1
.
expiration
??
""
)
})
{
expirationLabel
.
text
=
"Ισχύει έως "
+
(
earliestExpiration
.
expiration
??
""
)
// if let earliestExpiration = activeCoupons.min(by: { ($0.expiration ?? "") < ($1.expiration ?? "") }) {
if
let
latestExpiration
=
activeCoupons
.
max
(
by
:
{
(
$0
.
expiration
??
""
)
<
(
$1
.
expiration
??
""
)
})
{
expirationLabel
.
text
=
"Ισχύει έως "
+
(
latestExpiration
.
expiration
??
""
)
}
else
{
expirationLabel
.
text
=
""
}
...
...
Please
register
or
login
to post a comment