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-07-19 15:49:13 +0300
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
eb202a195ed9ce5855e393fdaa4e2506ceab7559
eb202a19
1 parent
8d7bd21b
add openTelco function
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
28 additions
and
1 deletions
SwiftWarplyFramework/SwiftWarplyFramework/GiftsViewController.swift
SwiftWarplyFramework/SwiftWarplyFramework/swiftApi.swift
SwiftWarplyFramework/SwiftWarplyFramework/GiftsViewController.swift
View file @
eb202a1
...
...
@@ -96,6 +96,7 @@ extension GiftsViewController: UITableViewDelegate, UITableViewDataSource{
vc
.
ccms
=
item
vc
.
campaign
=
campaigns
[
indexPath
.
row
]
self
.
navigationController
?
.
pushViewController
(
vc
,
animated
:
true
)
break
;
}
}
}
...
...
SwiftWarplyFramework/SwiftWarplyFramework/swiftApi.swift
View file @
eb202a1
...
...
@@ -398,7 +398,7 @@ public class swiftApi {
let
tempCoupons
=
matchCoupons
()
swiftApi
()
.
setCouponList
(
tempCoupons
)
let
activeCoupons
=
c
oupons
.
filter
({
return
$0
.
status
==
1
})
let
activeCoupons
=
tempC
oupons
.
filter
({
return
$0
.
status
==
1
})
getCouponsCallback
(
activeCoupons
)
}
...
...
@@ -2311,6 +2311,32 @@ public class swiftApi {
}
}
public
func
openTelco
(
_
controller
:
UIViewController
)
->
Void
{
for
campaign
in
GlobalVariables
.
campaigns
{
if
(
campaign
.
_type
!=
nil
&&
campaign
.
_type
==
"telco"
)
{
let
ccmsCampaigns
=
swiftApi
()
.
getCCMSLoyaltyCampaigns
()
let
loyaltyCampaignIdExists
=
ccmsCampaigns
.
contains
{
$0
.
_loyaltyCampaignId
==
campaign
.
session_uuid
}
if
(
loyaltyCampaignIdExists
==
true
)
{
for
item
in
ccmsCampaigns
{
if
(
item
.
_loyaltyCampaignId
==
campaign
.
session_uuid
)
{
let
storyboard
=
UIStoryboard
(
name
:
"Main"
,
bundle
:
Bundle
(
for
:
MyEmptyClass
.
self
))
let
vc
=
storyboard
.
instantiateViewController
(
withIdentifier
:
"TelcoViewController"
)
as!
SwiftWarplyFramework
.
TelcoViewController
vc
.
ccms
=
item
vc
.
campaign
=
campaign
controller
.
navigationController
?
.
pushViewController
(
vc
,
animated
:
true
)
break
;
}
}
break
;
}
}
}
}
public
func
setCampaignList
(
_
campaigns
:
Array
<
CampaignItemModel
>
)
->
Void
{
// let userTag = self.getUserTag()
// var campaignsArray:Array<CampaignItemModel> = []
...
...
Please
register
or
login
to post a comment