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-31 10:55:07 +0200
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
c9eaf6eb6f5c90db538b826971c65fff87a6612c
c9eaf6eb
1 parent
7eb70fe4
CouponViewController disable button when pressed once
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
0 deletions
SwiftWarplyFramework/SwiftWarplyFramework/CouponViewController.swift
SwiftWarplyFramework/SwiftWarplyFramework/CouponViewController.swift
View file @
c9eaf6e
...
...
@@ -211,10 +211,12 @@ import SwiftEventBus
func
redeemCouponSetRequest
(
uuid
:
String
,
communication_uuid
:
String
)
{
showSpinner
()
redeemButton
.
isEnabled
=
false
if
(
ccms
==
nil
)
{
swiftApi
()
.
redeemCouponSetAsync
(
uuid
:
uuid
,
communication_uuid
:
communication_uuid
,
redeemCouponSetCallback
,
failureCallback
:
{
errorCode
in
self
.
hideSpinner
()
self
.
redeemButton
.
isEnabled
=
true
let
firebaseEvent
=
swiftApi
.
LoyaltySDKFirebaseEventModel
()
firebaseEvent
.
_eventName
=
"loyalty_offer_activated"
...
...
@@ -229,6 +231,7 @@ import SwiftEventBus
// TODO: MAybe change user_msisdn: profile?._msisdn ?? ""
swiftApi
()
.
redeemCouponSetAsync
(
uuid
:
uuid
,
communication_uuid
:
communication_uuid
,
user_msisdn
:
profile
?
.
_msisdn
??
""
,
businessService
:
(
ccms
?
.
_businessService
??
""
),
offerName
:
(
ccms
?
.
_offerName
??
""
),
productType
:
(
ccms
?
.
_productType
??
""
),
provDuration
:
(
ccms
?
.
_provDuration
??
""
),
noOfRecurrance
:
(
ccms
?
.
_noOfRecurrance
??
""
),
price
:
(
ccms
?
.
_price
??
""
),
discount
:
(
ccms
?
.
_discount
??
""
),
voiceCategory
:
(
ccms
?
.
_voiceCategory
??
""
),
dataCategory
:
(
ccms
?
.
_dataCategory
??
""
),
minsValue
:
(
ccms
?
.
_minsValue
??
""
),
dataValue
:
(
ccms
?
.
_dataValue
??
""
),
provStepValueMins
:
(
ccms
?
.
_provStepValueMins
??
""
),
OfferAudienceLevel
:
(
ccms
?
.
_offerAudienceLevel
??
""
),
UACIOfferTrackingCode
:
(
ccms
?
.
_uaciOfferTrackingCode
??
""
),
OFFERCODE1
:
(
ccms
?
.
_offerCode1
??
""
),
SCORE
:
(
ccms
?
.
_score
??
""
),
ZONE
:
(
ccms
?
.
_zone
??
""
),
WAVE
:
(
ccms
?
.
_wave
??
""
),
VALIDITY
:
(
ccms
?
.
_validity
??
""
),
TREATMENT_CODE
:
(
ccms
?
.
_treatmentCode
??
""
),
ccms_session_id
:
(
ccms
?
.
_sessionId
??
""
),
redeemCouponSetCallback
,
failureCallback
:
{
errorCode
in
self
.
hideSpinner
()
self
.
redeemButton
.
isEnabled
=
true
let
firebaseEvent
=
swiftApi
.
LoyaltySDKFirebaseEventModel
()
firebaseEvent
.
_eventName
=
"loyalty_offer_activated"
...
...
@@ -244,6 +247,7 @@ import SwiftEventBus
func
redeemCouponSetCallback
(
_
response
:
swiftApi
.
GenericResponseModel
?)
->
Void
{
hideSpinner
()
self
.
redeemButton
.
isEnabled
=
true
if
(
response
!=
nil
)
{
DispatchQueue
.
main
.
async
{
...
...
Please
register
or
login
to post a comment