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-18 18:30:06 +0300
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
e3db36b468e9d1416b9478937ed02ba7a57a7276
e3db36b4
1 parent
cda48b9f
fix TelcoVC and open telco from gfy, mfy
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
40 additions
and
10 deletions
SwiftWarplyFramework/SwiftWarplyFramework/GiftsViewController.swift
SwiftWarplyFramework/SwiftWarplyFramework/MFYViewController.swift
SwiftWarplyFramework/SwiftWarplyFramework/TelcoViewController.swift
SwiftWarplyFramework/SwiftWarplyFramework/GiftsViewController.swift
View file @
e3db36b
...
...
@@ -84,7 +84,23 @@ extension GiftsViewController: UITableViewDelegate, UITableViewDataSource{
}
public
func
tableView
(
_
tableView
:
UITableView
,
didSelectRowAt
indexPath
:
IndexPath
)
{
if
(
campaigns
[
indexPath
.
row
]
.
_campaign_type
==
"coupon"
)
{
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
}
if
(
loyaltyCampaignIdExists
==
true
)
{
for
item
in
ccmsCampaigns
{
if
(
item
.
_loyaltyCampaignId
==
campaigns
[
indexPath
.
row
]
.
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
=
campaigns
[
indexPath
.
row
]
self
.
navigationController
?
.
pushViewController
(
vc
,
animated
:
true
)
}
}
}
}
else
if
(
campaigns
[
indexPath
.
row
]
.
_campaign_type
==
"coupon"
)
{
let
couponsetUuid
=
campaigns
[
indexPath
.
row
]
.
_couponset
if
(
couponsetUuid
!=
""
)
{
...
...
SwiftWarplyFramework/SwiftWarplyFramework/MFYViewController.swift
View file @
e3db36b
...
...
@@ -73,7 +73,23 @@ extension MFYViewController: UITableViewDelegate, UITableViewDataSource{
}
public
func
tableView
(
_
tableView
:
UITableView
,
didSelectRowAt
indexPath
:
IndexPath
)
{
if
(
campaigns
[
indexPath
.
row
]
.
_campaign_type
==
"coupon"
)
{
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
}
if
(
loyaltyCampaignIdExists
==
true
)
{
for
item
in
ccmsCampaigns
{
if
(
item
.
_loyaltyCampaignId
==
campaigns
[
indexPath
.
row
]
.
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
=
campaigns
[
indexPath
.
row
]
self
.
navigationController
?
.
pushViewController
(
vc
,
animated
:
true
)
}
}
}
}
else
if
(
campaigns
[
indexPath
.
row
]
.
_campaign_type
==
"coupon"
)
{
let
couponsetUuid
=
campaigns
[
indexPath
.
row
]
.
_couponset
if
(
couponsetUuid
!=
""
)
{
...
...
SwiftWarplyFramework/SwiftWarplyFramework/TelcoViewController.swift
View file @
e3db36b
...
...
@@ -19,8 +19,8 @@ import UIKit
let
uiscreen
:
CGRect
=
UIScreen
.
main
.
bounds
// TODO: modify this
public
var
c
ouponset
:
swiftApi
.
CouponSet
ItemModel
?
public
var
ccms
:
swiftApi
.
LoyaltyContextualOfferModel
?
public
var
c
ampaign
:
swiftApi
.
Campaign
ItemModel
?
public
override
func
viewDidLoad
()
{
...
...
@@ -36,12 +36,11 @@ import UIKit
scrollView
.
layer
.
cornerRadius
=
30
scrollView
.
layer
.
maskedCorners
=
[
.
layerMinXMinYCorner
]
// Top left corner radius
heroImage
.
load
(
link
:
c
ouponset
?
.
img_preview
??
""
,
placeholder
:
UIImage
(),
cache
:
URLCache
())
heroImage
.
load
(
link
:
c
cms
?
.
_imageUrl
??
""
,
placeholder
:
UIImage
(),
cache
:
URLCache
())
heroImage
.
contentMode
=
.
scaleAspectFill
heroImageHeight
.
constant
=
self
.
uiscreen
.
height
*
0.25
nameLabel
.
text
=
couponset
?
.
name
??
""
descriptionLabel
.
text
=
couponset
?
.
short_description
??
""
nameLabel
.
text
=
ccms
?
.
_title
??
""
descriptionLabel
.
text
=
ccms
?
.
_subtitle
??
""
activateButton
.
titleLabel
?
.
font
=
UIFont
.
systemFont
(
ofSize
:
15
,
weight
:
.
semibold
)
activateButton
.
setTitle
(
"Ενεργοποίηση"
,
for
:
.
normal
)
...
...
@@ -58,10 +57,9 @@ import UIKit
func
activateSetCallback
(
_
response
:
swiftApi
.
GenericResponseModel
?)
->
Void
{
assertionFailure
(
"to be implemented"
)
}
// MARK: - Actions
@IBAction
func
activateButtomAction
(
_
sender
:
Any
)
{
activateSetRequest
(
uuid
:
couponset
?
.
uuid
??
""
)
//
activateSetRequest(uuid: couponset?.uuid ?? "")
}
}
...
...
Please
register
or
login
to post a comment