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-09-05 17:47:45 +0300
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
9da1edf126a5a3de7f426d8bec362729217d5c5f
9da1edf1
1 parent
b46888ca
fix sharing coupon at AnalysisItemViewCell
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
4 deletions
SwiftWarplyFramework/SwiftWarplyFramework/AnalysisItemViewCell.swift
SwiftWarplyFramework/SwiftWarplyFramework/swiftApi.swift
SwiftWarplyFramework/SwiftWarplyFramework/AnalysisItemViewCell.swift
View file @
9da1edf
...
...
@@ -36,9 +36,20 @@ class AnalysisItemViewCell: UITableViewCell {
extension
AnalysisItemViewCell
{
func
configureCell
(
item
:
swiftApi
.
SharingCouponModel
)
{
let
merchantList
:
Array
<
swiftApi
.
MerchantModel
>
=
swiftApi
()
.
getMerchantList
()
titleLabel
.
text
=
""
for
merchant
in
merchantList
{
if
(
merchant
.
_uuid
==
item
.
_merchant_uuid
)
{
itemImage
.
load
(
link
:
merchant
.
_img_preview
,
placeholder
:
UIImage
(),
cache
:
URLCache
())
titleLabel
.
text
=
merchant
.
_admin_name
break
;
}
}
dateLabel
.
text
=
item
.
_date
//itemImage.image =
titleLabel
.
text
=
item
.
_name
// titleLabel.text = item._name
let
priceFloat
=
Float
(
round
(
100
*
(
Float
(
item
.
_discount
)
??
0.0
))
/
100
)
var
priceString
=
"0"
...
...
@@ -71,7 +82,7 @@ extension AnalysisItemViewCell {
}
}
dateLabel
.
text
=
item
.
expiration
??
""
// TODO: change
dateLabel
.
text
=
item
.
created
??
""
// expiration
// itemImage.load(link: couponSetData?.img_preview ?? "", placeholder: UIImage(), cache: URLCache())
// titleLabel.text = couponSetData?.name ?? ""
...
...
SwiftWarplyFramework/SwiftWarplyFramework/swiftApi.swift
View file @
9da1edf
...
...
@@ -4338,7 +4338,7 @@ public class swiftApi {
// Example "date": "Thu, Jun 23 2022 16:24:44",
let
dateString
=
dictionary
[
"date"
]
as?
String
?
??
""
let
dateFormatter
=
DateFormatter
()
// dateFormatter.dateFormat = "yyyy-MM-dd hh:mm:ss"
dateFormatter
.
locale
=
Locale
(
identifier
:
"en_US_POSSIX"
)
dateFormatter
.
dateFormat
=
"E, MMM dd yyyy HH:mm:ss"
if
let
date
=
dateFormatter
.
date
(
from
:
dateString
??
""
)
{
dateFormatter
.
dateFormat
=
"dd/MM/yyyy"
...
...
Please
register
or
login
to post a comment