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 11:22:46 +0200
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
0b34d9a994296c0aa405a937a9418759d45d6db3
0b34d9a9
1 parent
c9eaf6eb
handle SubmitButton visibility at UnifiedCouponsViewController
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
19 additions
and
2 deletions
SwiftWarplyFramework/Pods/Pods.xcodeproj/xcuserdata/manos.xcuserdatad/xcschemes/xcschememanagement.plist
SwiftWarplyFramework/SwiftWarplyFramework.xcodeproj/xcuserdata/manos.xcuserdatad/xcschemes/xcschememanagement.plist
SwiftWarplyFramework/SwiftWarplyFramework.xcworkspace/xcuserdata/manos.xcuserdatad/UserInterfaceState.xcuserstate
SwiftWarplyFramework/SwiftWarplyFramework/Main.storyboard
SwiftWarplyFramework/SwiftWarplyFramework/UnifiedCouponsViewController.swift
SwiftWarplyFramework/Pods/Pods.xcodeproj/xcuserdata/manos.xcuserdatad/xcschemes/xcschememanagement.plist
View file @
0b34d9a
...
...
@@ -7,7 +7,7 @@
<key>
Pods-SwiftWarplyFramework.xcscheme_^#shared#^_
</key>
<dict>
<key>
orderHint
</key>
<integer>
1
</integer>
<integer>
0
</integer>
</dict>
</dict>
</dict>
...
...
SwiftWarplyFramework/SwiftWarplyFramework.xcodeproj/xcuserdata/manos.xcuserdatad/xcschemes/xcschememanagement.plist
View file @
0b34d9a
...
...
@@ -7,7 +7,7 @@
<key>
SwiftWarplyFramework.xcscheme_^#shared#^_
</key>
<dict>
<key>
orderHint
</key>
<integer>
0
</integer>
<integer>
1
</integer>
</dict>
</dict>
</dict>
...
...
SwiftWarplyFramework/SwiftWarplyFramework.xcworkspace/xcuserdata/manos.xcuserdatad/UserInterfaceState.xcuserstate
View file @
0b34d9a
No preview for this file type
SwiftWarplyFramework/SwiftWarplyFramework/Main.storyboard
View file @
0b34d9a
...
...
@@ -4934,6 +4934,7 @@
<outlet
property=
"emptyView"
destination=
"U5I-GH-geX"
id=
"lhU-3z-yKl"
/>
<outlet
property=
"emptyViewHeight"
destination=
"Ooe-1Z-EJ8"
id=
"SRF-jF-7to"
/>
<outlet
property=
"submitButton"
destination=
"Qz6-OH-kIb"
id=
"9Dq-GE-NMA"
/>
<outlet
property=
"submitButtonHeight"
destination=
"Jgw-dF-afS"
id=
"Jrt-eo-KbP"
/>
<outlet
property=
"tableView"
destination=
"YVv-xm-y2W"
id=
"kle-or-Ckg"
/>
</connections>
</viewController>
...
...
SwiftWarplyFramework/SwiftWarplyFramework/UnifiedCouponsViewController.swift
View file @
0b34d9a
...
...
@@ -16,6 +16,7 @@ import SwiftEventBus
@IBOutlet
weak
var
emptyViewHeight
:
NSLayoutConstraint
!
@IBOutlet
weak
var
emptyLabel
:
UILabel
!
@IBOutlet
weak
var
submitButton
:
UIButton
!
@IBOutlet
weak
var
submitButtonHeight
:
NSLayoutConstraint
!
public
var
unifiedCoupons
:
Array
<
swiftApi
.
UnifiedCouponModel
>
=
[]
public
var
smCoupons
:
Array
<
swiftApi
.
CouponItemModel
>
=
[]
...
...
@@ -58,6 +59,7 @@ import SwiftEventBus
// self.tableView.reloadData()
// Reload the SM Coupons section only
self
.
tableView
.
reloadSections
(
IndexSet
(
integer
:
1
),
with
:
.
automatic
)
self
.
handleSubmitButtonVisible
()
if
(
self
.
unifiedCoupons
.
count
==
0
&&
self
.
smCoupons
.
count
==
0
)
{
self
.
emptyView
.
isHidden
=
false
...
...
@@ -118,6 +120,7 @@ import SwiftEventBus
self
.
unifiedCoupons
=
swiftApi
()
.
getUnifiedCouponList
()
self
.
smCoupons
=
swiftApi
()
.
getSMCouponList
()
self
.
tableView
.
reloadData
()
self
.
handleSubmitButtonVisible
()
if
(
self
.
unifiedCoupons
.
count
==
0
&&
self
.
smCoupons
.
count
==
0
)
{
self
.
emptyView
.
isHidden
=
false
...
...
@@ -200,6 +203,19 @@ import SwiftEventBus
}
}
func
handleSubmitButtonVisible
()
{
if
(
self
.
smCoupons
.
count
>
0
)
{
submitButton
.
isEnabled
=
true
submitButton
.
isHidden
=
false
submitButtonHeight
.
constant
=
55
}
else
{
submitButton
.
isEnabled
=
false
submitButton
.
isHidden
=
true
submitButtonHeight
.
constant
=
0
}
}
func
showSuccessDialog
()
->
Void
{
let
alert
=
UIAlertController
(
title
:
"Δημιουργία Κουπονιού"
,
message
:
"Το ενιαίο κουπόνι σου δημιουργήθηκε επιτυχώς."
,
preferredStyle
:
.
alert
)
...
...
Please
register
or
login
to post a comment