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
2024-10-30 12:28:29 +0200
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
262854750f62b5f39fe2178b89f09a954870f05e
26285475
1 parent
3807c076
CouponBarcodeViewController description fix and error modal
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
28 additions
and
2 deletions
SwiftWarplyFramework/SwiftWarplyFramework/CouponBarcodeViewController.swift
SwiftWarplyFramework/SwiftWarplyFramework/CouponBarcodeViewController.swift
View file @
2628547
...
...
@@ -124,7 +124,7 @@ import AVFoundation
// let couponSetData: swiftApi.CouponSetItemModel? = coupon?.couponset_data
var
couponSetData
:
swiftApi
.
CouponSetItemModel
?
if
(
isMarket
==
true
)
{
if
(
isMarket
==
true
||
isSMCoupon
==
true
)
{
for
item
in
smCouponsetsList
{
if
(
item
.
uuid
==
coupon
?
.
couponset_uuid
)
{
couponSetData
=
item
...
...
@@ -208,6 +208,13 @@ import AVFoundation
// nameLabel.text = htmlName.htmlToString
discriptionLabel
.
text
=
htmlDiscription
.
htmlToString
}
else
if
(
isSMCoupon
==
true
)
{
couponImage
.
contentMode
=
.
scaleAspectFill
nameLabel
.
text
=
couponSetData
?
.
name
??
""
let
htmlDiscription
=
couponSetData
?
.
description
??
""
discriptionLabel
.
text
=
htmlDiscription
.
htmlToString
}
else
{
couponImage
.
contentMode
=
.
scaleAspectFill
nameLabel
.
text
=
couponSetData
?
.
name
??
""
...
...
@@ -651,6 +658,25 @@ import AVFoundation
return
""
}
func
showDialog
(
_
alertTitle
:
String
,
_
alertSubTitle
:
String
)
->
Void
{
let
alert
=
UIAlertController
(
title
:
alertTitle
,
message
:
alertSubTitle
,
preferredStyle
:
.
alert
)
alert
.
addAction
(
UIAlertAction
(
title
:
"OK"
,
style
:
.
default
,
handler
:
{
action
in
switch
action
.
style
{
case
.
default
:
print
(
"default"
)
case
.
cancel
:
print
(
"cancel"
)
case
.
destructive
:
print
(
"destructive"
)
}
}))
self
.
present
(
alert
,
animated
:
true
,
completion
:
nil
)
}
// MARK: - Actions
@IBAction
func
redeemButtomAction
(
_
sender
:
Any
)
{
...
...
@@ -680,7 +706,7 @@ import AVFoundation
}
}
else
{
// TODO: add error popup
self
.
showDialog
(
"Δεν υπάρχουν διαθέσιμα supermarkets"
,
""
)
}
}
else
{
...
...
Please
register
or
login
to post a comment