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-09-01 17:43:24 +0300
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
136ca5ae33fc7d70a96349ed2524d078f05b38f8
136ca5ae
1 parent
14c8e42d
add ccmsList at GiftsViewController
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
1 deletions
SwiftWarplyFramework/SwiftWarplyFramework/GiftsViewController.swift
SwiftWarplyFramework/SwiftWarplyFramework/GiftsViewController.swift
View file @
136ca5a
...
...
@@ -15,6 +15,7 @@ import SwiftEventBus
public
var
campaigns
:
Array
<
swiftApi
.
CampaignItemModel
>
=
swiftApi
()
.
mergeGFYCCMSLoyaltyCampaigns
(
campaigns
:
swiftApi
()
.
getCCMSLoyaltyCampaigns
())
public
var
seasonalList
:
Array
<
swiftApi
.
LoyaltyGiftsForYouPackage
>
=
swiftApi
()
.
getSeasonalList
()
public
var
ccmsList
:
Array
<
swiftApi
.
LoyaltyContextualOfferModel
>
=
swiftApi
()
.
getCCMSLoyaltyCampaigns
()
public
override
func
viewDidLoad
()
{
...
...
@@ -32,6 +33,18 @@ import SwiftEventBus
}
}
if
(
ccmsList
.
count
>
0
)
{
for
ccmsItem
in
ccmsList
{
if
(((
ccmsItem
.
_loyaltyCampaignId
==
""
)
||
(
ccmsItem
.
_loyaltyCampaignId
==
"NA"
))
&&
(
ccmsItem
.
_zone
==
"COSMOTE_APP_GIFTS4U"
))
{
let
newCampaign
=
swiftApi
.
CampaignItemModel
()
newCampaign
.
_title
=
ccmsItem
.
_title
newCampaign
.
_logo_url
=
ccmsItem
.
_imageUrl
newCampaign
.
_ccms
=
ccmsItem
campaigns
.
append
(
newCampaign
)
}
}
}
setBackButton
()
setNavigationTitle
(
"GIFTS for YOU"
,
"bold"
)
...
...
@@ -146,7 +159,10 @@ extension GiftsViewController: UITableViewDelegate, UITableViewDataSource{
}
public
func
tableView
(
_
tableView
:
UITableView
,
didSelectRowAt
indexPath
:
IndexPath
)
{
if
(
campaigns
[
indexPath
.
row
]
.
_type
!=
nil
&&
campaigns
[
indexPath
.
row
]
.
_type
==
"telco"
)
{
if
(
campaigns
[
indexPath
.
row
]
.
_ccms
!=
nil
)
{
// TODO: open new screen with param campaigns[indexPath.row]._ccms
}
else
if
(
campaigns
[
indexPath
.
row
]
.
_type
!=
nil
&&
campaigns
[
indexPath
.
row
]
.
_type
==
"telco"
)
{
let
ccmsCampaigns
=
swiftApi
()
.
getCCMSLoyaltyCampaigns
()
let
loyaltyCampaignIdExists
=
ccmsCampaigns
.
contains
{
$0
.
_loyaltyCampaignId
==
campaigns
[
indexPath
.
row
]
.
session_uuid
}
...
...
Please
register
or
login
to post a comment