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-04-29 10:49:02 +0300
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
cedab8fc4c3f3c954d5a9b411fbfcaa2ca8c23c4
cedab8fc
1 parent
57238735
coupons changes
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
6 deletions
WarplySDKFrameworkIOS/WarplySDKFrameworkIOS.xcworkspace/xcuserdata/manos.xcuserdatad/UserInterfaceState.xcuserstate
WarplySDKFrameworkIOS/WarplySDKFrameworkIOS/CouponBarcodeView.swift
WarplySDKFrameworkIOS/WarplySDKFrameworkIOS/CouponsView.swift
WarplySDKFrameworkIOS/WarplySDKFrameworkIOS.xcworkspace/xcuserdata/manos.xcuserdatad/UserInterfaceState.xcuserstate
View file @
cedab8f
No preview for this file type
WarplySDKFrameworkIOS/WarplySDKFrameworkIOS/CouponBarcodeView.swift
View file @
cedab8f
...
...
@@ -124,8 +124,8 @@ extension CouponBarcodeView {
func
constructBarcode
()
->
String
?
{
// EAN 13 barcode construction
//
let couponData = coupon["coupon_data"] as? [String: Any] ?? ["":""]
let
couponString
=
coupon
[
"coupon"
]
as?
String
??
""
let
couponData
=
coupon
[
"coupon_data"
]
as?
[
String
:
Any
]
??
[
""
:
""
]
let
couponString
=
coupon
Data
[
"coupon"
]
as?
String
??
""
if
(
!
couponString
.
isEmpty
)
{
var
checkDigit
=
0
;
...
...
@@ -158,6 +158,7 @@ extension CouponBarcodeView {
var
body
:
some
View
{
let
couponData
=
coupon
[
"coupon_data"
]
as?
[
String
:
Any
]
??
[
""
:
""
]
let
barcodeString
=
constructBarcode
()
??
""
GeometryReader
{
geometry
in
...
...
@@ -194,7 +195,7 @@ extension CouponBarcodeView {
VStack
(
alignment
:
.
center
)
{
VStack
{
Text
(
coupon
[
"coupon"
]
as?
String
??
""
)
Text
(
coupon
Data
[
"coupon"
]
as?
String
??
""
)
.
fontWeight
(
.
bold
)
.
font
(
.
system
(
size
:
27
))
.
foregroundColor
(
Color
(
red
:
0.2549019607843137
,
green
:
0.3333333333333333
,
blue
:
0.39215686274509803
))
...
...
@@ -209,7 +210,7 @@ extension CouponBarcodeView {
}
.
frame
(
maxWidth
:
.
infinity
)
if
(
CharacterSet
.
decimalDigits
.
isSuperset
(
of
:
CharacterSet
(
charactersIn
:
coupon
[
"coupon"
]
as?
String
??
""
)))
{
if
(
CharacterSet
.
decimalDigits
.
isSuperset
(
of
:
CharacterSet
(
charactersIn
:
coupon
Data
[
"coupon"
]
as?
String
??
""
)))
{
VStack
(
alignment
:
.
center
)
{
VStack
{}
.
frame
(
height
:
1
)
...
...
@@ -284,7 +285,7 @@ extension CouponBarcodeView {
Text
(
"Το κουπόνι ισχύει έως "
+
CouponBarcodeView
.
couponContainer
.
convertDateFormat
(
inputDate
:
coupon
[
"expiration"
]
as?
String
??
""
))
Text
(
"Το κουπόνι ισχύει έως "
+
CouponBarcodeView
.
couponContainer
.
convertDateFormat
(
inputDate
:
coupon
Data
[
"expiration"
]
as?
String
??
""
))
.
fontWeight
(
.
medium
)
.
font
(
.
system
(
size
:
14
))
.
foregroundColor
(
Color
(
red
:
0.2549019607843137
,
green
:
0.3333333333333333
,
blue
:
0.39215686274509803
))
...
...
@@ -378,7 +379,7 @@ extension CouponBarcodeView {
// couponset = CouponSetItemModel(dictionary: coupon)
print
(
"=================="
)
print
(
coupon
[
"coupon"
]
as?
String
??
""
)
print
(
coupon
Data
[
"coupon"
]
as?
String
??
""
)
print
(
"=================="
)
print
(
"========constructBarcode()=========="
)
...
...
WarplySDKFrameworkIOS/WarplySDKFrameworkIOS/CouponsView.swift
View file @
cedab8f
This diff is collapsed. Click to expand it.
Please
register
or
login
to post a comment