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
2025-02-07 12:17:49 +0200
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
c0939fc6ad8d02411477cb436e0c4f35136563a1
c0939fc6
1 parent
f294a52c
History, SharingHistory accesibilities
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
67 additions
and
0 deletions
SwiftWarplyFramework/SwiftWarplyFramework/AnalysisHeaderViewCell.swift
SwiftWarplyFramework/SwiftWarplyFramework/AnalysisItemViewCell.swift
SwiftWarplyFramework/SwiftWarplyFramework/Main.storyboard
SwiftWarplyFramework/SwiftWarplyFramework/swiftApi.swift
SwiftWarplyFramework/SwiftWarplyFramework/AnalysisHeaderViewCell.swift
View file @
c0939fc
...
...
@@ -51,5 +51,13 @@ extension AnalysisHeaderViewCell {
itemImage
.
image
=
UIImage
(
named
:
"ic_gift_history"
,
in
:
MyEmptyClass
.
resourceBundle
(),
compatibleWith
:
nil
)
}
setupAccessibilty
()
}
func
setupAccessibilty
()
{
// Disable accessibility for the whole cell
self
.
isAccessibilityElement
=
false
emptyLabel
.
isAccessibilityElement
=
true
}
}
...
...
SwiftWarplyFramework/SwiftWarplyFramework/AnalysisItemViewCell.swift
View file @
c0939fc
...
...
@@ -85,6 +85,8 @@ extension AnalysisItemViewCell {
}
else
if
(
"received"
==
item
.
_sharing_type
)
{
subtitleLabel
.
text
=
String
(
format
:
"Εκπτωτικό κουπόνι από "
+
item
.
_sender_msisdn
)
}
setupAccessibilty
(
item
:
item
)
}
func
configureCell
(
item
:
swiftApi
.
SharingCouponModel
,
isMarket
:
Bool
)
{
...
...
@@ -118,6 +120,8 @@ extension AnalysisItemViewCell {
}
else
if
(
"received"
==
item
.
_sharing_type
)
{
subtitleLabel
.
text
=
String
(
format
:
"Εκπτωτικό κουπόνι από "
+
item
.
_sender_msisdn
)
}
setupAccessibilty
(
item
:
item
)
}
func
configureCell
(
item
:
swiftApi
.
CouponItemModel
)
{
...
...
@@ -160,6 +164,7 @@ extension AnalysisItemViewCell {
// let htmlText = couponSetData?.inner_text ?? ""
// subtitleLabel.text = htmlText.htmlToString
setupAccessibilty
(
item
:
item
)
}
func
configureCell
(
item
:
swiftApi
.
CouponItemModel
,
isMarket
:
Bool
)
{
...
...
@@ -202,5 +207,44 @@ extension AnalysisItemViewCell {
// let htmlText = couponSetData?.inner_text ?? ""
// subtitleLabel.text = htmlText.htmlToString
setupAccessibilty
(
item
:
item
)
}
func
setupAccessibilty
(
item
:
swiftApi
.
CouponItemModel
)
{
var
formatedDate
=
""
let
dateFormatter
=
DateFormatter
()
dateFormatter
.
locale
=
Locale
(
identifier
:
"en_US_POSIX"
)
if
let
date
=
item
.
redeemed_date
{
// Set output format in Greek
dateFormatter
.
locale
=
Locale
(
identifier
:
"el_GR"
)
// Greek locale
dateFormatter
.
dateFormat
=
"d MMMM yyyy"
let
resultString
=
dateFormatter
.
string
(
from
:
date
)
formatedDate
=
resultString
}
else
{
formatedDate
=
dateLabel
.
text
??
""
}
let
accessibilityLabel
=
formatedDate
+
", "
+
(
titleLabel
.
text
??
""
)
+
", "
+
(
subtitleLabel
.
text
??
""
)
+
", "
+
(
priceLabel
.
text
??
""
)
self
.
isAccessibilityElement
=
true
self
.
accessibilityLabel
=
accessibilityLabel
}
func
setupAccessibilty
(
item
:
swiftApi
.
SharingCouponModel
)
{
var
formatedDate
=
""
let
dateFormatter
=
DateFormatter
()
dateFormatter
.
locale
=
Locale
(
identifier
:
"en_US_POSIX"
)
if
let
date
=
item
.
_dateValue
{
// Set output format in Greek
dateFormatter
.
locale
=
Locale
(
identifier
:
"el_GR"
)
// Greek locale
dateFormatter
.
dateFormat
=
"d MMMM yyyy"
let
resultString
=
dateFormatter
.
string
(
from
:
date
)
formatedDate
=
resultString
}
else
{
formatedDate
=
dateLabel
.
text
??
""
}
let
accessibilityLabel
=
formatedDate
+
", "
+
(
titleLabel
.
text
??
""
)
+
", "
+
(
subtitleLabel
.
text
??
""
)
+
", "
+
(
priceLabel
.
text
??
""
)
self
.
isAccessibilityElement
=
true
self
.
accessibilityLabel
=
accessibilityLabel
}
}
...
...
SwiftWarplyFramework/SwiftWarplyFramework/Main.storyboard
View file @
c0939fc
...
...
@@ -1862,6 +1862,7 @@
<color
key=
"backgroundColor"
white=
"0.0"
alpha=
"0.0"
colorSpace=
"custom"
customColorSpace=
"genericGamma22GrayColorSpace"
/>
<connections>
<outlet
property=
"arrowImage"
destination=
"w3t-uo-L5p"
id=
"gDu-xC-MXj"
/>
<outlet
property=
"stackView"
destination=
"Ujy-Ns-gSY"
id=
"kJV-gV-Dqh"
/>
<outlet
property=
"titleLabel"
destination=
"jD8-wg-76D"
id=
"K6c-qT-EMs"
/>
</connections>
</tableViewCell>
...
...
@@ -7706,6 +7707,7 @@
<color
key=
"backgroundColor"
white=
"0.0"
alpha=
"0.0"
colorSpace=
"custom"
customColorSpace=
"genericGamma22GrayColorSpace"
/>
<connections>
<outlet
property=
"arrowImage"
destination=
"eGc-lu-1DB"
id=
"msZ-3k-oO3"
/>
<outlet
property=
"stackView"
destination=
"DHl-3e-Mz6"
id=
"2Ea-MF-eLD"
/>
<outlet
property=
"titleLabel"
destination=
"gOz-Rd-1D4"
id=
"5Ps-AV-qMQ"
/>
</connections>
</tableViewCell>
...
...
SwiftWarplyFramework/SwiftWarplyFramework/swiftApi.swift
View file @
c0939fc
...
...
@@ -6855,6 +6855,7 @@ public class swiftApi {
public
class
SharingCouponModel
:
Codable
{
private
var
couponset_uuid
:
String
?
private
var
date
:
String
?
private
var
dateValue
:
Date
?
private
var
discount
:
String
?
private
var
merchant_uuid
:
String
?
private
var
sharing_type
:
String
?
...
...
@@ -6868,6 +6869,7 @@ public class swiftApi {
public
init
()
{
self
.
couponset_uuid
=
""
self
.
date
=
""
self
.
dateValue
=
nil
self
.
discount
=
""
self
.
merchant_uuid
=
""
self
.
sharing_type
=
""
...
...
@@ -6907,8 +6909,10 @@ public class swiftApi {
dateFormatter
.
dateFormat
=
"dd/MM/yyyy"
let
resultString
=
dateFormatter
.
string
(
from
:
date
)
self
.
date
=
resultString
self
.
dateValue
=
date
}
else
{
self
.
date
=
""
self
.
dateValue
=
nil
}
if
let
transaction_metadata_json
=
dictionary
[
"transaction_metadata"
]
as?
AnyObject
{
...
...
@@ -6961,6 +6965,15 @@ public class swiftApi {
}
}
public
var
_dateValue
:
Date
?
{
get
{
// getter
return
self
.
dateValue
}
set
(
newValue
)
{
//setter
self
.
dateValue
=
newValue
}
}
public
var
_discount
:
String
{
get
{
// getter
return
self
.
discount
??
""
...
...
Please
register
or
login
to post a comment