Commit a64525dd by Olzhas Aldabergenov

fixes

parent 124a1c3e
{
"DVTSourceControlWorkspaceBlueprintPrimaryRemoteRepositoryKey" : "8C8D20BEB1D39A3810EA64426626AEAC4A6D4E9B",
"DVTSourceControlWorkspaceBlueprintPrimaryRemoteRepositoryKey" : "5DF1EA6381DC40CE02B4EA5633CD220EAAC76936",
"DVTSourceControlWorkspaceBlueprintWorkingCopyRepositoryLocationsKey" : {
},
"DVTSourceControlWorkspaceBlueprintWorkingCopyStatesKey" : {
"EA320F6FA9588ABC7C644742C268D060B5B8C40A" : 9223372036854775807,
"CD1557C3AE966BEDF3490D85F9712687801B146C" : 9223372036854775807,
"5DF1EA6381DC40CE02B4EA5633CD220EAAC76936" : 9223372036854775807,
"8C8D20BEB1D39A3810EA64426626AEAC4A6D4E9B" : 9223372036854775807
},
"DVTSourceControlWorkspaceBlueprintIdentifierKey" : "443F5A42-E7E6-443D-8FC0-423FE8159820",
"DVTSourceControlWorkspaceBlueprintWorkingCopyPathsKey" : {
"EA320F6FA9588ABC7C644742C268D060B5B8C40A" : "KT\/",
"CD1557C3AE966BEDF3490D85F9712687801B146C" : "KT\/XCGLogger\/",
"5DF1EA6381DC40CE02B4EA5633CD220EAAC76936" : "kt-ios\/",
"8C8D20BEB1D39A3810EA64426626AEAC4A6D4E9B" : "KT2017\/"
},
"DVTSourceControlWorkspaceBlueprintNameKey" : "kt",
......@@ -19,6 +21,11 @@
"DVTSourceControlWorkspaceBlueprintRelativePathToProjectKey" : "kt.xcworkspace",
"DVTSourceControlWorkspaceBlueprintRemoteRepositoriesKey" : [
{
"DVTSourceControlWorkspaceBlueprintRemoteRepositoryURLKey" : "http:\/\/gitlab.arta.kz\/neox\/kt-ios.git",
"DVTSourceControlWorkspaceBlueprintRemoteRepositorySystemKey" : "com.apple.dt.Xcode.sourcecontrol.Git",
"DVTSourceControlWorkspaceBlueprintRemoteRepositoryIdentifierKey" : "5DF1EA6381DC40CE02B4EA5633CD220EAAC76936"
},
{
"DVTSourceControlWorkspaceBlueprintRemoteRepositoryURLKey" : "https:\/\/gitlab.com\/Sofrano\/KT2017.git",
"DVTSourceControlWorkspaceBlueprintRemoteRepositorySystemKey" : "com.apple.dt.Xcode.sourcecontrol.Git",
"DVTSourceControlWorkspaceBlueprintRemoteRepositoryIdentifierKey" : "8C8D20BEB1D39A3810EA64426626AEAC4A6D4E9B"
......
......@@ -31,7 +31,7 @@
endingColumnNumber = "9223372036854775807"
startingLineNumber = "190"
endingLineNumber = "190"
landmarkName = "megalineInfoAction(_:event:)"
landmarkName = "megalineInfoAction(sender:event:)"
landmarkType = "7">
</BreakpointContent>
</BreakpointProxy>
......@@ -161,5 +161,69 @@
landmarkType = "3">
</BreakpointContent>
</BreakpointProxy>
<BreakpointProxy
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
<BreakpointContent
shouldBeEnabled = "No"
ignoreCount = "0"
continueAfterRunningActions = "No"
filePath = "kt/ViewControllers/Cabinet/Login/LoginViewController.swift"
timestampString = "529493159.41857"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "579"
endingLineNumber = "579"
landmarkName = "applicationWillResignActive()"
landmarkType = "7">
</BreakpointContent>
</BreakpointProxy>
<BreakpointProxy
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
<BreakpointContent
shouldBeEnabled = "Yes"
ignoreCount = "0"
continueAfterRunningActions = "No"
filePath = "kt/ViewControllers/Cabinet/Login/LoginViewController.swift"
timestampString = "529493159.41857"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "579"
endingLineNumber = "579"
landmarkName = "applicationWillResignActive()"
landmarkType = "7">
</BreakpointContent>
</BreakpointProxy>
<BreakpointProxy
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
<BreakpointContent
shouldBeEnabled = "No"
ignoreCount = "0"
continueAfterRunningActions = "No"
filePath = "kt/ViewControllers/Cabinet/Login/LoginViewController.swift"
timestampString = "529493159.41857"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "549"
endingLineNumber = "549"
landmarkName = "showHelpAlert()"
landmarkType = "7">
</BreakpointContent>
</BreakpointProxy>
<BreakpointProxy
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
<BreakpointContent
shouldBeEnabled = "No"
ignoreCount = "0"
continueAfterRunningActions = "No"
filePath = "kt/ViewControllers/Cabinet/Login/LoginViewController.swift"
timestampString = "529493159.41857"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "554"
endingLineNumber = "554"
landmarkName = "showHelpAlert()"
landmarkType = "7">
</BreakpointContent>
</BreakpointProxy>
</Breakpoints>
</Bucket>
......@@ -9,131 +9,137 @@
import Foundation
extension Facade {
func getPublicWifi(params: [String: AnyObject], onSuccess: (wifiOrders: [WifiBaseOrder]) -> Void, onError: (error: String) -> Void, onFinish: () -> Void) {
request(Router.GetPublicWifi(params)).responseSwiftyJSON(completionHandler: { (req, resp, json, error) in
Router.globalLog.debug(req)
Router.globalLog.debug(json)
onFinish()
if let error = error {
Router.globalLog.error(error.debugDescription)
onError(error: error.localizedDescription)
} else {
Router.globalLog.debug(resp)
var wifiOrders: [WifiBaseOrder] = []
if let wifiOrdersJson = json["wifi_offer"].array {
for subJson in wifiOrdersJson {
wifiOrders.append(WifiOffer(json: subJson))
}
} else if let wifiOfferOrdersJson = json["wifi_offer_order"].array {
for subJson in wifiOfferOrdersJson {
wifiOrders.append(WifiOfferOrder(json: subJson))
}
}
onSuccess(wifiOrders: wifiOrders)
}
})
}
func connectWifi(params: [String: AnyObject], onSuccess: () -> Void, onError: (error: String) -> Void, onFinish: () -> Void) {
request(Router.ConnectWifi(params)).responseSwiftyJSON(completionHandler: { (req, resp, json, error) in
Router.globalLog.debug(req)
Router.globalLog.debug(json)
onFinish()
if let error = error {
Router.globalLog.error(error.debugDescription)
onError(error: error.localizedDescription)
} else {
Router.globalLog.debug(resp)
if json["msg"].string == "ok" {
onSuccess()
} else {
Router.globalLog.error("connectWifi error")
onError(error: LS("error"))
}
}
})
}
func disconnectWifi(params: [String: AnyObject], onSuccess: () -> Void, onError: (error: String) -> Void, onFinish: () -> Void) {
request(Router.DisconnectWifi(params)).responseSwiftyJSON(completionHandler: { (req, resp, json, error) in
Router.globalLog.debug(req)
Router.globalLog.debug(json)
onFinish()
if let error = error {
Router.globalLog.error(error.debugDescription)
onError(error: error.localizedDescription)
} else {
Router.globalLog.debug(resp)
if json["msg"].string == "ok" {
onSuccess()
} else {
Router.globalLog.error(json["error"].stringValue)
onError(error: json["error"].string == nil ? LS("error") : json["error"].stringValue)
}
}
})
}
func subscribeHistoryForMonth(params: [String: AnyObject], onSuccess: (SubscribeMonth) -> Void, onError: (error: String) -> Void, onFinish: () -> Void) {
request(Router.SubscribeHistoryForMonth(params)).responseSwiftyJSON(completionHandler: { (req, resp, json, error) in
Router.globalLog.debug(req)
Router.globalLog.debug(json)
onFinish()
if let error = error {
onError(error: error.localizedDescription)
} else {
Router.globalLog.debug(resp)
let subscribeMonth = SubscribeMonth(json: json)
onSuccess(subscribeMonth)
}
})
}
func subscribeHistoryForPeriod(params: [String: AnyObject], onSuccess: (SubscribePeriod) -> Void, onError: (error: String) -> Void, onFinish: () -> Void) {
request(Router.SubscribeHistoryForPeriod(params)).responseSwiftyJSON(completionHandler: { (req, resp, json, error) in
Router.globalLog.debug(req)
Router.globalLog.debug(json)
onFinish()
if let error = error {
onError(error: error.localizedDescription)
} else {
Router.globalLog.debug(resp)
let subscribePeriod = SubscribePeriod(json: json)
onSuccess(subscribePeriod)
}
})
}
func getActiveSessions(params: [String: AnyObject], onSuccess: ([[AnyObject]]) -> Void, onError: (error: String) -> Void, onFinish: () -> Void) {
request(Router.GetActiveSessions(params)).responseSwiftyJSON(completionHandler: { (req, resp, json, error) in
Router.globalLog.debug(req)
Router.globalLog.debug(json)
onFinish()
if let error = error {
onError(error: error.localizedDescription)
} else {
Router.globalLog.debug(resp)
var activeSessions: [[AnyObject]] = []
for subJson in json.arrayValue {
let activeSession = ActiveSession(json: subJson)
if activeSession.startTime == nil {
continue
func getPublicWifi(params: [String: AnyObject], onSuccess: (wifiOrders: [WifiBaseOrder]) -> Void, onError: (error: String) -> Void, onFinish: () -> Void) {
request(Router.GetPublicWifi(params)).responseSwiftyJSON(completionHandler: { (req, resp, json, error) in
Router.globalLog.debug(req)
Router.globalLog.debug(json)
onFinish()
if let error = error {
Router.globalLog.error(error.debugDescription)
onError(error: error.localizedDescription)
} else {
Router.globalLog.debug(resp)
var wifiOrders: [WifiBaseOrder] = []
if let wifiOrdersJson = json["wifi_offer"].array {
for subJson in wifiOrdersJson {
wifiOrders.append(WifiOffer(json: subJson))
}
} else if let wifiOfferOrdersJson = json["wifi_offer_order"].array {
for subJson in wifiOfferOrdersJson {
wifiOrders.append(WifiOfferOrder(json: subJson))
}
}
onSuccess(wifiOrders: wifiOrders)
}
if activeSessions.count > 0 && (activeSessions.last![0] as! NSDate).isEqualByComponents(activeSession.startTime!) {
var groupedPayments = activeSessions[activeSessions.count - 1][1] as! [ActiveSession]
groupedPayments.append(activeSession)
activeSessions[activeSessions.count - 1][1] = groupedPayments
} else {
var groupedByDate:[AnyObject] = []
groupedByDate.append(activeSession.startTime!)
groupedByDate.append([activeSession])
activeSessions.append(groupedByDate)
}
}
onSuccess(activeSessions)
}
})
}
})
}
func connectWifi(params: [String: AnyObject], onSuccess: () -> Void, onError: (error: String) -> Void, onFinish: () -> Void) {
request(Router.ConnectWifi(params)).responseSwiftyJSON(completionHandler: { (req, resp, json, error) in
Router.globalLog.debug(req)
Router.globalLog.debug(json)
onFinish()
if let error = error {
Router.globalLog.error(error.debugDescription)
onError(error: error.localizedDescription)
} else {
Router.globalLog.debug(resp)
onSuccess()
// if json["msg"].string == "ok" {
// onSuccess()
// } else {
// Router.globalLog.error("connectWifi error")
// onError(error: LS("error"))
// }
}
})
}
func disconnectWifi(params: [String: AnyObject], onSuccess: () -> Void, onError: (error: String) -> Void, onFinish: () -> Void) {
request(Router.DisconnectWifi(params)).responseSwiftyJSON(completionHandler: { (req, resp, json, error) in
Router.globalLog.debug(req)
Router.globalLog.debug(json)
onFinish()
if let error = error {
Router.globalLog.error(error.debugDescription)
onError(error: error.localizedDescription)
} else {
Router.globalLog.debug(resp)
onSuccess()
// if json["msg"].string == "ok" {
// onSuccess()
// } else {
// Router.globalLog.error(json["error"].stringValue)
// onError(error: json["error"].string == nil ? LS("error") : json["error"].stringValue)
// }
}
})
}
func subscribeHistoryForMonth(params: [String: AnyObject], onSuccess: (SubscribeMonth) -> Void, onError: (error: String) -> Void, onFinish: () -> Void) {
request(Router.SubscribeHistoryForMonth(params)).responseSwiftyJSON(completionHandler: { (req, resp, json, error) in
Router.globalLog.debug(req)
Router.globalLog.debug(json)
onFinish()
if let error = error {
onError(error: error.localizedDescription)
} else {
Router.globalLog.debug(resp)
let subscribeMonth = SubscribeMonth(json: json)
onSuccess(subscribeMonth)
}
})
}
func subscribeHistoryForPeriod(params: [String: AnyObject], onSuccess: (SubscribePeriod) -> Void, onError: (error: String) -> Void, onFinish: () -> Void) {
request(Router.SubscribeHistoryForPeriod(params)).responseSwiftyJSON(completionHandler: { (req, resp, json, error) in
Router.globalLog.debug(req)
Router.globalLog.debug(json)
onFinish()
if let error = error {
onError(error: error.localizedDescription)
} else {
Router.globalLog.debug(resp)
let subscribePeriod = SubscribePeriod(json: json)
onSuccess(subscribePeriod)
}
})
}
func getActiveSessions(params: [String: AnyObject], onSuccess: ([[AnyObject]]) -> Void, onError: (error: String) -> Void, onFinish: () -> Void) {
request(Router.GetActiveSessions(params)).responseSwiftyJSON(completionHandler: { (req, resp, json, error) in
Router.globalLog.debug(req)
Router.globalLog.debug(json)
onFinish()
if let error = error {
onError(error: error.localizedDescription)
} else {
Router.globalLog.debug(resp)
var activeSessions: [[AnyObject]] = []
for subJson in json.arrayValue {
let activeSession = ActiveSession(json: subJson)
if activeSession.startTime == nil {
continue
}
if activeSessions.count > 0 && (activeSessions.last![0] as! NSDate).isEqualByComponents(activeSession.startTime!) {
var groupedPayments = activeSessions[activeSessions.count - 1][1] as! [ActiveSession]
groupedPayments.append(activeSession)
activeSessions[activeSessions.count - 1][1] = groupedPayments
} else {
var groupedByDate:[AnyObject] = []
groupedByDate.append(activeSession.startTime!)
groupedByDate.append([activeSession])
activeSessions.append(groupedByDate)
}
}
onSuccess(activeSessions)
}
})
}
}
......@@ -9,15 +9,18 @@
import Foundation
class CallbackRegion : NSObject {
var id: String?
var name: String?
var regionType: String?
init(json: JSON) {
self.id = json["id"].stringValue
self.name = json["name"].stringValue
self.regionType = json["region_type"].stringValue
}
var id: String?
var name: String?
var regionType: String?
var guid_server_id : String?
init(json: JSON) {
self.id = json["id"].stringValue
self.name = json["name"].stringValue
self.regionType = json["region_type"].stringValue
self.guid_server_id = json["guid_server_id"].stringValue
}
init(name:String, id: String) {
self.name = name
......
......@@ -9,17 +9,18 @@
import Foundation
class WifiOffer: WifiBaseOrder {
var tariffId: Int?
var offerKz: String?
var offerRu: String?
var price: Int?
init(json: JSON) {
self.tariffId = json["tariff_id"].intValue
self.offerKz = json["offer_kz"].stringValue
self.offerRu = json["offer_ru"].stringValue
self.price = json["price"].intValue
super.init(wifiOrderType: WifiOrderType.offer)
}
var tariffId: Int?
var offerKz: String?
var offerRu: String?
var price: Int?
init(json: JSON) {
self.tariffId = json["tariff_id"].intValue
self.offerKz = json["offer_kz"].stringValue
self.offerRu = json["offer_ru"].stringValue
self.price = json["price"].intValue
super.init(wifiOrderType: WifiOrderType.offer)
}
}
......@@ -54,15 +54,17 @@ struct MegalineIdNet {
let name: String
let device: String
let linkID: String
static func decode(json: [String : AnyObject]) -> MegalineIdNet? {
guard
let name = json["PACKET_TYPE_NAME"] as? String,
let device = (json["DEVICE"] as? String)
let device = (json["DEVICE"] as? String),
let linkID = (json["LINK_TYPE_ID"] as? String)
else { return nil }
return MegalineIdNet(name: name, device: device)
return MegalineIdNet(name: name, device: device, linkID: linkID)
}
// "LINK_TYPE_ID" : "810943065",
// "LIMIT_INFO" : "-1500(0)",
......
......@@ -125,7 +125,7 @@
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<view contentMode="scaleToFill" misplaced="YES" translatesAutoresizingMaskIntoConstraints="NO" id="wb6-ZP-jtG">
<frame key="frameInset" minY="435" width="600" height="165"/>
<frame key="frameInset" minY="435" width="375" height="165"/>
<subviews>
<scrollView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" misplaced="YES" showsHorizontalScrollIndicator="NO" showsVerticalScrollIndicator="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Ijg-Yo-jz4">
<frame key="frameInset" width="600" height="110"/>
......@@ -166,7 +166,7 @@
</constraints>
</view>
<scrollView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" misplaced="YES" showsHorizontalScrollIndicator="NO" showsVerticalScrollIndicator="NO" translatesAutoresizingMaskIntoConstraints="NO" id="vZW-UO-7kr">
<frame key="frameInset" minY="20" width="600" height="415"/>
<frame key="frameInset" minY="20" width="375" height="415"/>
<connections>
<outlet property="delegate" destination="m7V-L8-Vwp" id="mpm-2s-ZMc"/>
</connections>
......@@ -199,7 +199,7 @@
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="kyR-Tp-85q" userLabel="First Responder" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="-7548" y="-1119"/>
<point key="canvasLocation" x="-7548.5" y="-1119.5"/>
</scene>
<!--Get Code View Controller-->
<scene sceneID="Lsy-wn-4RB">
......@@ -976,11 +976,8 @@
<rect key="frame" x="0.0" y="0.0" width="600" height="800"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<imageView contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" misplaced="YES" image="login_logo" translatesAutoresizingMaskIntoConstraints="NO" id="mDW-lm-hs5">
<frame key="frameInset" minX="185" minY="81" width="230" height="75"/>
</imageView>
<textField opaque="NO" clipsSubviews="YES" contentMode="scaleToFill" misplaced="YES" contentHorizontalAlignment="left" contentVerticalAlignment="center" borderStyle="roundedRect" placeholder="Your login or phone" minimumFontSize="17" clearButtonMode="whileEditing" translatesAutoresizingMaskIntoConstraints="NO" id="8Gg-7i-aK6">
<frame key="frameInset" minX="20" minY="259" width="560" height="44"/>
<imageView contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="login_logo" translatesAutoresizingMaskIntoConstraints="NO" id="mDW-lm-hs5"/>
<textField opaque="NO" clipsSubviews="YES" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" placeholder="Your login or phone" minimumFontSize="17" clearButtonMode="whileEditing" translatesAutoresizingMaskIntoConstraints="NO" id="8Gg-7i-aK6">
<constraints>
<constraint firstAttribute="height" constant="44" id="BAR-YC-khp"/>
</constraints>
......@@ -990,8 +987,7 @@
<outlet property="delegate" destination="faD-wp-261" id="baS-10-bCY"/>
</connections>
</textField>
<textField opaque="NO" clipsSubviews="YES" contentMode="scaleToFill" misplaced="YES" contentHorizontalAlignment="left" contentVerticalAlignment="center" placeholder="Your password" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="f5l-v6-3UO">
<frame key="frameInset" minX="20" minY="319" width="560" height="44"/>
<textField opaque="NO" clipsSubviews="YES" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" placeholder="Your password" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="f5l-v6-3UO">
<constraints>
<constraint firstAttribute="height" constant="44" id="Pwu-EE-bxi"/>
</constraints>
......@@ -1001,8 +997,7 @@
<outlet property="delegate" destination="faD-wp-261" id="48W-Ss-gXx"/>
</connections>
</textField>
<button opaque="NO" contentMode="scaleToFill" misplaced="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="3cO-TQ-vvg" customClass="UIButtonRoundedBlue" customModule="telecom" customModuleProvider="target">
<frame key="frameInset" minX="20" minY="403" width="560" height="48"/>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="3cO-TQ-vvg" customClass="UIButtonRoundedBlue" customModule="telecom" customModuleProvider="target">
<color key="backgroundColor" red="0.1081278920173645" green="0.43167737126350403" blue="0.7915988564491272" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<constraints>
<constraint firstAttribute="height" constant="48" id="Q1J-P6-Mzk"/>
......@@ -1036,8 +1031,7 @@
<action selector="testLogin_touchUpInside:" destination="faD-wp-261" eventType="touchUpInside" id="fni-lg-ksD"/>
</connections>
</button>
<label opaque="NO" multipleTouchEnabled="YES" userInteractionEnabled="NO" contentMode="left" misplaced="YES" text="Версия 1.0, сборка 53" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="hea-SM-eVd">
<frame key="frameInset" minX="20" minY="531" width="560" height="18"/>
<label opaque="NO" multipleTouchEnabled="YES" userInteractionEnabled="NO" contentMode="left" text="Версия 1.0, сборка 53" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="hea-SM-eVd">
<fontDescription key="fontDescription" type="system" pointSize="15"/>
<color key="textColor" white="0.66666666666666663" alpha="1" colorSpace="calibratedWhite"/>
<nil key="highlightedColor"/>
......@@ -1055,8 +1049,7 @@
<action selector="restorePassword:" destination="faD-wp-261" eventType="touchUpInside" id="F1T-ou-cZl"/>
</connections>
</button>
<button opaque="NO" contentMode="scaleToFill" misplaced="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="VHN-P8-7SV" customClass="UIButtonRoundedGray" customModule="telecom" customModuleProvider="target">
<frame key="frameInset" minX="20" minY="459" width="560" height="48"/>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="VHN-P8-7SV" customClass="UIButtonRoundedGray" customModule="telecom" customModuleProvider="target">
<color key="backgroundColor" red="0.26219156384468079" green="0.33811080455780029" blue="0.45045208930969238" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<constraints>
<constraint firstAttribute="height" constant="48" id="0xq-tl-PXd"/>
......@@ -1072,28 +1065,36 @@
<action selector="register:" destination="faD-wp-261" eventType="touchUpInside" id="Bef-Kt-SOO"/>
</connections>
</button>
<imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="ic_visibility_off" translatesAutoresizingMaskIntoConstraints="NO" id="Cwt-LS-RsF">
<constraints>
<constraint firstAttribute="height" constant="30" id="bhq-d7-zp5"/>
<constraint firstAttribute="width" constant="30" id="wka-an-1kO"/>
</constraints>
</imageView>
</subviews>
<color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<constraints>
<constraint firstItem="VHN-P8-7SV" firstAttribute="trailing" secondItem="Nxe-gd-eO9" secondAttribute="trailingMargin" id="2D3-vN-itN"/>
<constraint firstItem="3cO-TQ-vvg" firstAttribute="trailing" secondItem="Nxe-gd-eO9" secondAttribute="trailingMargin" id="4RT-DU-ceQ"/>
<constraint firstItem="mDW-lm-hs5" firstAttribute="centerX" secondItem="Nxe-gd-eO9" secondAttribute="centerX" id="4qd-zl-ofY"/>
<constraint firstItem="hea-SM-eVd" firstAttribute="trailing" secondItem="Nxe-gd-eO9" secondAttribute="trailingMargin" id="9u2-WM-Aq5"/>
<constraint firstItem="Bfw-9Q-UWv" firstAttribute="top" secondItem="CTQ-mM-kz7" secondAttribute="bottom" id="EjH-On-95o"/>
<constraint firstItem="VHN-P8-7SV" firstAttribute="top" secondItem="3cO-TQ-vvg" secondAttribute="bottom" constant="8" id="FEU-Ez-nxv"/>
<constraint firstItem="3cO-TQ-vvg" firstAttribute="top" secondItem="f5l-v6-3UO" secondAttribute="bottom" constant="40" id="KR0-2A-6Ec"/>
<constraint firstItem="f5l-v6-3UO" firstAttribute="leading" secondItem="Nxe-gd-eO9" secondAttribute="leadingMargin" id="Qgq-eh-KX2"/>
<constraint firstItem="3cO-TQ-vvg" firstAttribute="leading" secondItem="Nxe-gd-eO9" secondAttribute="leadingMargin" id="RJW-xN-BNX"/>
<constraint firstItem="hea-SM-eVd" firstAttribute="top" secondItem="VHN-P8-7SV" secondAttribute="bottom" constant="24" id="VcQ-Hc-ehh"/>
<constraint firstItem="8Gg-7i-aK6" firstAttribute="trailing" secondItem="Nxe-gd-eO9" secondAttribute="trailingMargin" id="VjV-zq-Z6T"/>
<constraint firstItem="VHN-P8-7SV" firstAttribute="leading" secondItem="Nxe-gd-eO9" secondAttribute="leadingMargin" id="W3o-aW-HMY"/>
<constraint firstItem="CTQ-mM-kz7" firstAttribute="centerX" secondItem="Nxe-gd-eO9" secondAttribute="centerX" id="bVU-HD-K9f"/>
<constraint firstItem="8Gg-7i-aK6" firstAttribute="top" secondItem="mDW-lm-hs5" secondAttribute="bottom" constant="103" id="e0v-i4-Nbq"/>
<constraint firstItem="8Gg-7i-aK6" firstAttribute="leading" secondItem="Nxe-gd-eO9" secondAttribute="leadingMargin" id="mVs-LJ-13w"/>
<constraint firstItem="mDW-lm-hs5" firstAttribute="top" secondItem="WFI-fo-Rky" secondAttribute="bottom" constant="61" id="pc6-rs-Y2J"/>
<constraint firstItem="f5l-v6-3UO" firstAttribute="top" secondItem="8Gg-7i-aK6" secondAttribute="bottom" constant="16" id="wGE-Ia-xZd"/>
<constraint firstItem="hea-SM-eVd" firstAttribute="leading" secondItem="Nxe-gd-eO9" secondAttribute="leadingMargin" id="xXT-4F-Y3D"/>
<constraint firstItem="f5l-v6-3UO" firstAttribute="trailing" secondItem="Nxe-gd-eO9" secondAttribute="trailingMargin" id="zzP-2n-nmY"/>
<constraint firstItem="mDW-lm-hs5" firstAttribute="top" secondItem="WFI-fo-Rky" secondAttribute="bottom" constant="60" id="1p7-ZJ-j63"/>
<constraint firstItem="hea-SM-eVd" firstAttribute="trailing" secondItem="Nxe-gd-eO9" secondAttribute="trailingMargin" id="5Ii-kM-TKH"/>
<constraint firstItem="f5l-v6-3UO" firstAttribute="leading" secondItem="Nxe-gd-eO9" secondAttribute="leadingMargin" id="5Zi-Q9-20d"/>
<constraint firstItem="f5l-v6-3UO" firstAttribute="top" secondItem="8Gg-7i-aK6" secondAttribute="bottom" constant="16" id="7Z1-42-GMu"/>
<constraint firstItem="CTQ-mM-kz7" firstAttribute="centerX" secondItem="Nxe-gd-eO9" secondAttribute="centerX" id="8fE-qw-5P3"/>
<constraint firstItem="Cwt-LS-RsF" firstAttribute="top" secondItem="8Gg-7i-aK6" secondAttribute="bottom" constant="23" id="9qr-zi-1Mx"/>
<constraint firstItem="8Gg-7i-aK6" firstAttribute="trailing" secondItem="Nxe-gd-eO9" secondAttribute="trailingMargin" id="BRK-Q0-nHX"/>
<constraint firstItem="f5l-v6-3UO" firstAttribute="trailing" secondItem="Nxe-gd-eO9" secondAttribute="trailingMargin" constant="-66" id="Ch9-h9-uiX"/>
<constraint firstItem="mDW-lm-hs5" firstAttribute="centerX" secondItem="Nxe-gd-eO9" secondAttribute="centerX" id="IbB-gt-eEd"/>
<constraint firstItem="VHN-P8-7SV" firstAttribute="leading" secondItem="Nxe-gd-eO9" secondAttribute="leadingMargin" id="Muz-YL-qDb"/>
<constraint firstItem="8Gg-7i-aK6" firstAttribute="leading" secondItem="Nxe-gd-eO9" secondAttribute="leadingMargin" id="NhW-an-LLE"/>
<constraint firstItem="hea-SM-eVd" firstAttribute="top" secondItem="VHN-P8-7SV" secondAttribute="bottom" constant="23" id="OH2-RE-iwU"/>
<constraint firstAttribute="trailingMargin" secondItem="Cwt-LS-RsF" secondAttribute="trailing" constant="16" id="QZy-7h-Hhd"/>
<constraint firstItem="Bfw-9Q-UWv" firstAttribute="top" secondItem="CTQ-mM-kz7" secondAttribute="bottom" id="TsW-qp-xV6"/>
<constraint firstItem="VHN-P8-7SV" firstAttribute="top" secondItem="3cO-TQ-vvg" secondAttribute="bottom" constant="16" id="UMs-f4-uP3"/>
<constraint firstItem="VHN-P8-7SV" firstAttribute="trailing" secondItem="Nxe-gd-eO9" secondAttribute="trailingMargin" id="X7u-gg-4K9"/>
<constraint firstItem="hea-SM-eVd" firstAttribute="leading" secondItem="Nxe-gd-eO9" secondAttribute="leadingMargin" id="Zry-au-sxB"/>
<constraint firstItem="8Gg-7i-aK6" firstAttribute="top" secondItem="mDW-lm-hs5" secondAttribute="bottom" constant="34" id="o3v-iQ-VXW"/>
<constraint firstItem="3cO-TQ-vvg" firstAttribute="top" secondItem="f5l-v6-3UO" secondAttribute="bottom" constant="39" id="wuW-cg-fmG"/>
<constraint firstItem="3cO-TQ-vvg" firstAttribute="trailing" secondItem="Nxe-gd-eO9" secondAttribute="trailingMargin" id="xVx-Ew-dZe"/>
<constraint firstItem="3cO-TQ-vvg" firstAttribute="leading" secondItem="Nxe-gd-eO9" secondAttribute="leadingMargin" id="z83-L9-i4Y"/>
</constraints>
</view>
<navigationItem key="navigationItem" id="pVo-9h-NYd"/>
......@@ -1105,12 +1106,13 @@
<outlet property="_passwordTextField" destination="f5l-v6-3UO" id="4RO-0w-GYE"/>
<outlet property="_restorePasswordButton" destination="CTQ-mM-kz7" id="Nbi-5l-DD1"/>
<outlet property="_signUpButton" destination="VHN-P8-7SV" id="REB-OZ-ne9"/>
<outlet property="showPasswordIcon" destination="Cwt-LS-RsF" id="10p-MB-Cgk"/>
<segue destination="hMr-gi-mGQ" kind="show" identifier="registrationIntro" id="KRW-H7-bcm"/>
</connections>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="ZjX-Oc-VWN" userLabel="First Responder" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="-12406" y="-3295"/>
<point key="canvasLocation" x="-12406.4" y="-3295.0524737631185"/>
</scene>
<!--Navigation Controller-->
<scene sceneID="Qvh-7E-G3L">
......@@ -1458,9 +1460,9 @@
<subviews>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="Y4f-4Q-59e" userLabel="topView">
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Имя Фамилия" lineBreakMode="characterWrap" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="WRL-x5-0oO">
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Имя Фамилия" lineBreakMode="wordWrap" numberOfLines="2" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="WRL-x5-0oO">
<constraints>
<constraint firstAttribute="height" constant="21" id="gls-ev-HLR"/>
<constraint firstAttribute="height" constant="68" id="gls-ev-HLR"/>
</constraints>
<fontDescription key="fontDescription" type="system" weight="semibold" pointSize="17"/>
<color key="textColor" red="0.0" green="0.50679506070000002" blue="1" alpha="1" colorSpace="calibratedRGB"/>
......@@ -1483,14 +1485,14 @@
</subviews>
<color key="backgroundColor" red="0.83195626089999997" green="0.83195626089999997" blue="0.83195626089999997" alpha="1" colorSpace="calibratedRGB"/>
<constraints>
<constraint firstItem="WRL-x5-0oO" firstAttribute="leading" secondItem="Y4f-4Q-59e" secondAttribute="leading" constant="22" id="4xZ-hn-8YN"/>
<constraint firstAttribute="bottom" secondItem="Eef-Aw-kei" secondAttribute="bottom" constant="24" id="5Ps-y5-DPP"/>
<constraint firstAttribute="trailing" secondItem="WRL-x5-0oO" secondAttribute="trailing" constant="80" id="98c-IS-Twk"/>
<constraint firstItem="WRL-x5-0oO" firstAttribute="top" secondItem="YKi-mc-JBm" secondAttribute="bottom" constant="14" id="Gpl-Te-OI1"/>
<constraint firstItem="WRL-x5-0oO" firstAttribute="leading" secondItem="Y4f-4Q-59e" secondAttribute="leading" constant="16" id="4xZ-hn-8YN"/>
<constraint firstAttribute="bottom" secondItem="Eef-Aw-kei" secondAttribute="bottom" constant="16" id="5Ps-y5-DPP"/>
<constraint firstAttribute="trailing" secondItem="WRL-x5-0oO" secondAttribute="trailing" constant="86" id="98c-IS-Twk"/>
<constraint firstItem="WRL-x5-0oO" firstAttribute="top" secondItem="YKi-mc-JBm" secondAttribute="bottom" constant="8" id="Gpl-Te-OI1"/>
<constraint firstAttribute="height" constant="179" id="Uhj-o4-6EV"/>
<constraint firstItem="Eef-Aw-kei" firstAttribute="leading" secondItem="Y4f-4Q-59e" secondAttribute="leading" constant="22" id="YB9-Sj-nu4"/>
<constraint firstAttribute="trailing" secondItem="Eef-Aw-kei" secondAttribute="trailing" constant="25" id="kJh-di-eWl"/>
<constraint firstItem="YKi-mc-JBm" firstAttribute="leading" secondItem="Y4f-4Q-59e" secondAttribute="leading" constant="22" id="pam-UM-U22"/>
<constraint firstItem="Eef-Aw-kei" firstAttribute="leading" secondItem="Y4f-4Q-59e" secondAttribute="leading" constant="16" id="YB9-Sj-nu4"/>
<constraint firstAttribute="trailing" secondItem="Eef-Aw-kei" secondAttribute="trailing" constant="31" id="kJh-di-eWl"/>
<constraint firstItem="YKi-mc-JBm" firstAttribute="leading" secondItem="Y4f-4Q-59e" secondAttribute="leading" constant="16" id="pam-UM-U22"/>
<constraint firstItem="Eef-Aw-kei" firstAttribute="top" secondItem="WRL-x5-0oO" secondAttribute="bottom" constant="8" id="z4d-cV-e6t"/>
</constraints>
</view>
......@@ -2005,6 +2007,7 @@
<outlet property="balance" destination="ERY-ZW-orF" id="Rl5-Il-Wyt"/>
<outlet property="lastPay" destination="Xwx-aW-xJH" id="526-Ag-KGe"/>
<outlet property="payButton" destination="cp2-Kp-ul5" id="dHz-sb-B7a"/>
<outlet property="refreshButton" destination="j4A-Hq-qqB" id="Qhd-hH-PhZ"/>
</connections>
</tableViewCell>
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" selectionStyle="blue" hidesAccessoryWhenEditing="NO" indentationLevel="1" indentationWidth="0.0" reuseIdentifier="FeedPackagesCell" rowHeight="359" id="ASd-vV-7ps" customClass="FeedPackagesCell" customModule="telecom" customModuleProvider="target">
......@@ -2020,12 +2023,13 @@
<nil key="textColor"/>
<nil key="highlightedColor"/>
</label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" misplaced="YES" text="Все услуги" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="shO-zj-uVn">
<frame key="frameInset" minX="269" minY="17" width="91" height="21"/>
<fontDescription key="fontDescription" type="system" weight="medium" pointSize="16"/>
<color key="textColor" red="0.0" green="0.50679506070000002" blue="1" alpha="1" colorSpace="calibratedRGB"/>
<nil key="highlightedColor"/>
</label>
<button opaque="NO" contentMode="scaleToFill" misplaced="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="jN2-o8-9Pz">
<frame key="frameInset" minX="273" minY="14" width="84" height="26"/>
<state key="normal" title="Все услуги"/>
<connections>
<action selector="packagesPressed:" destination="ASd-vV-7ps" eventType="touchUpInside" id="O58-lU-UQ1"/>
</connections>
</button>
<collectionView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" dataMode="prototypes" translatesAutoresizingMaskIntoConstraints="NO" id="1wS-bb-6pY">
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
<constraints>
......@@ -2115,14 +2119,14 @@
</collectionView>
</subviews>
<constraints>
<constraint firstAttribute="bottom" secondItem="1wS-bb-6pY" secondAttribute="bottom" id="BKY-6k-5qZ"/>
<constraint firstAttribute="trailing" secondItem="1wS-bb-6pY" secondAttribute="trailing" id="Cyy-ef-mhk"/>
<constraint firstAttribute="trailingMargin" secondItem="shO-zj-uVn" secondAttribute="trailing" constant="7" id="GiB-Xz-N6K"/>
<constraint firstItem="tHw-4T-nXe" firstAttribute="leading" secondItem="rQ0-MH-iGO" secondAttribute="leadingMargin" constant="8" id="IQI-kq-Uci"/>
<constraint firstItem="1wS-bb-6pY" firstAttribute="leading" secondItem="rQ0-MH-iGO" secondAttribute="leading" id="RpA-Zv-JEb"/>
<constraint firstItem="tHw-4T-nXe" firstAttribute="top" secondItem="rQ0-MH-iGO" secondAttribute="topMargin" constant="9" id="S3U-56-p3U"/>
<constraint firstItem="1wS-bb-6pY" firstAttribute="top" secondItem="shO-zj-uVn" secondAttribute="bottom" constant="1" id="TFn-UR-91P"/>
<constraint firstItem="shO-zj-uVn" firstAttribute="top" secondItem="rQ0-MH-iGO" secondAttribute="topMargin" constant="9" id="rge-fL-Dou"/>
<constraint firstAttribute="trailingMargin" secondItem="jN2-o8-9Pz" secondAttribute="trailing" constant="10" id="1wg-Bg-Ahc"/>
<constraint firstAttribute="trailing" secondItem="1wS-bb-6pY" secondAttribute="trailing" id="280-DA-W0V"/>
<constraint firstItem="1wS-bb-6pY" firstAttribute="top" secondItem="tHw-4T-nXe" secondAttribute="bottom" constant="1.5" id="Bgi-a1-zme"/>
<constraint firstItem="1wS-bb-6pY" firstAttribute="leading" secondItem="rQ0-MH-iGO" secondAttribute="leading" id="Jco-KV-Up5"/>
<constraint firstItem="tHw-4T-nXe" firstAttribute="leading" secondItem="rQ0-MH-iGO" secondAttribute="leadingMargin" constant="8" id="YDs-Dx-z8z"/>
<constraint firstItem="jN2-o8-9Pz" firstAttribute="top" secondItem="rQ0-MH-iGO" secondAttribute="topMargin" constant="6" id="byD-LM-yAp"/>
<constraint firstItem="tHw-4T-nXe" firstAttribute="top" secondItem="rQ0-MH-iGO" secondAttribute="topMargin" constant="9" id="hkL-Bm-ncq"/>
<constraint firstAttribute="bottom" secondItem="1wS-bb-6pY" secondAttribute="bottom" id="hnf-nn-t6q"/>
</constraints>
</tableViewCellContentView>
<connections>
......@@ -3275,7 +3279,7 @@
<constraints>
<constraint firstAttribute="height" constant="71" id="Iog-Ih-A2O"/>
</constraints>
<fontDescription key="fontDescription" type="system" weight="medium" pointSize="17"/>
<fontDescription key="fontDescription" type="system" weight="medium" pointSize="16"/>
<nil key="textColor"/>
<nil key="highlightedColor"/>
</label>
......@@ -3291,7 +3295,7 @@
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="y6a-zb-FQC" customClass="CircleButton" customModule="telecom" customModuleProvider="target">
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" misplaced="YES" text="160" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="VK7-Ln-Vru">
<frame key="frameInset" minX="28" minY="43" width="65" height="35"/>
<frame key="frameInset" minX="18" minY="33" width="65" height="35"/>
<fontDescription key="fontDescription" type="boldSystem" pointSize="24"/>
<color key="textColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
<nil key="highlightedColor"/>
......@@ -3299,16 +3303,25 @@
</subviews>
<color key="backgroundColor" red="0.0" green="0.50679506070000002" blue="1" alpha="1" colorSpace="calibratedRGB"/>
<constraints>
<constraint firstItem="VK7-Ln-Vru" firstAttribute="centerY" secondItem="y6a-zb-FQC" secondAttribute="centerY" id="DOU-yM-7XI"/>
<constraint firstAttribute="width" constant="120" id="iqd-3G-lvF"/>
<constraint firstItem="VK7-Ln-Vru" firstAttribute="centerX" secondItem="y6a-zb-FQC" secondAttribute="centerX" id="qoi-Z7-Pqr"/>
<constraint firstAttribute="height" constant="120" id="sgu-hs-1us"/>
<constraint firstItem="VK7-Ln-Vru" firstAttribute="centerY" secondItem="y6a-zb-FQC" secondAttribute="centerY" constant="0.5" id="DOU-yM-7XI"/>
<constraint firstAttribute="width" constant="100" id="iqd-3G-lvF"/>
<constraint firstItem="VK7-Ln-Vru" firstAttribute="centerX" secondItem="y6a-zb-FQC" secondAttribute="centerX" constant="0.5" id="qoi-Z7-Pqr"/>
<constraint firstAttribute="height" constant="100" id="sgu-hs-1us"/>
</constraints>
</view>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Центр поддержки потребителей" textAlignment="center" lineBreakMode="wordWrap" numberOfLines="3" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Y1c-JH-YHd">
<constraints>
<constraint firstAttribute="width" constant="120" id="KhW-az-71Q"/>
<constraint firstAttribute="height" constant="73" id="TLu-ua-pLg"/>
</constraints>
<fontDescription key="fontDescription" type="system" pointSize="14"/>
<nil key="textColor"/>
<nil key="highlightedColor"/>
</label>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="Iaz-8H-8v8" customClass="CircleButton" customModule="telecom" customModuleProvider="target">
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" misplaced="YES" text="165" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="SR9-wY-7dY">
<frame key="frameInset" minX="28" minY="43" width="65" height="35"/>
<frame key="frameInset" minX="18" minY="33" width="65" height="35"/>
<fontDescription key="fontDescription" type="boldSystem" pointSize="24"/>
<color key="textColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
<nil key="highlightedColor"/>
......@@ -3316,21 +3329,12 @@
</subviews>
<color key="backgroundColor" red="0.0" green="0.50679506070000002" blue="1" alpha="1" colorSpace="calibratedRGB"/>
<constraints>
<constraint firstAttribute="height" constant="120" id="SML-MD-pnR"/>
<constraint firstAttribute="width" constant="120" id="cWa-s3-ZZo"/>
<constraint firstItem="SR9-wY-7dY" firstAttribute="centerY" secondItem="Iaz-8H-8v8" secondAttribute="centerY" id="jsb-Xi-0c5"/>
<constraint firstItem="SR9-wY-7dY" firstAttribute="centerX" secondItem="Iaz-8H-8v8" secondAttribute="centerX" id="zY0-7M-9HZ"/>
<constraint firstAttribute="height" constant="100" id="SML-MD-pnR"/>
<constraint firstAttribute="width" constant="100" id="cWa-s3-ZZo"/>
<constraint firstItem="SR9-wY-7dY" firstAttribute="centerY" secondItem="Iaz-8H-8v8" secondAttribute="centerY" constant="0.5" id="jsb-Xi-0c5"/>
<constraint firstItem="SR9-wY-7dY" firstAttribute="centerX" secondItem="Iaz-8H-8v8" secondAttribute="centerX" constant="0.5" id="zY0-7M-9HZ"/>
</constraints>
</view>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Центр поддержки потребителей" textAlignment="center" lineBreakMode="wordWrap" numberOfLines="3" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Y1c-JH-YHd">
<constraints>
<constraint firstAttribute="width" constant="120" id="KhW-az-71Q"/>
<constraint firstAttribute="height" constant="73" id="TLu-ua-pLg"/>
</constraints>
<fontDescription key="fontDescription" type="system" pointSize="14"/>
<nil key="textColor"/>
<nil key="highlightedColor"/>
</label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Централизованное бюро ремонта" textAlignment="center" lineBreakMode="wordWrap" numberOfLines="3" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="3aE-BO-Tlu">
<constraints>
<constraint firstAttribute="height" constant="75" id="92w-lr-sja"/>
......@@ -3344,20 +3348,20 @@
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
<constraints>
<constraint firstAttribute="height" constant="224" id="1Lw-nU-f4H"/>
<constraint firstAttribute="trailing" secondItem="3aE-BO-Tlu" secondAttribute="trailing" constant="25" id="Fhv-Qb-han"/>
<constraint firstItem="y6a-zb-FQC" firstAttribute="leading" secondItem="WmK-wo-dAG" secondAttribute="leading" constant="22" id="Sal-Sk-c1Q"/>
<constraint firstItem="y6a-zb-FQC" firstAttribute="top" secondItem="WmK-wo-dAG" secondAttribute="top" constant="4" id="WdA-gI-bd3"/>
<constraint firstItem="Y1c-JH-YHd" firstAttribute="top" secondItem="y6a-zb-FQC" secondAttribute="bottom" constant="19" id="YCc-ue-FG7"/>
<constraint firstItem="Iaz-8H-8v8" firstAttribute="top" secondItem="WmK-wo-dAG" secondAttribute="top" constant="4" id="YnF-Aw-qfl"/>
<constraint firstAttribute="trailing" secondItem="Iaz-8H-8v8" secondAttribute="trailing" constant="25" id="l5w-bz-zwX"/>
<constraint firstItem="Y1c-JH-YHd" firstAttribute="leading" secondItem="WmK-wo-dAG" secondAttribute="leading" constant="22" id="nxI-AM-yEG"/>
<constraint firstItem="3aE-BO-Tlu" firstAttribute="top" secondItem="Iaz-8H-8v8" secondAttribute="bottom" constant="17" id="sKL-71-fkW"/>
<constraint firstAttribute="trailing" secondItem="3aE-BO-Tlu" secondAttribute="trailing" constant="8" id="Fhv-Qb-han"/>
<constraint firstItem="y6a-zb-FQC" firstAttribute="leading" secondItem="WmK-wo-dAG" secondAttribute="leading" constant="18" id="Sal-Sk-c1Q"/>
<constraint firstItem="y6a-zb-FQC" firstAttribute="top" secondItem="WmK-wo-dAG" secondAttribute="top" constant="28" id="WdA-gI-bd3"/>
<constraint firstItem="Y1c-JH-YHd" firstAttribute="top" secondItem="y6a-zb-FQC" secondAttribute="bottom" constant="15" id="YCc-ue-FG7"/>
<constraint firstItem="Iaz-8H-8v8" firstAttribute="top" secondItem="WmK-wo-dAG" secondAttribute="top" constant="28" id="YnF-Aw-qfl"/>
<constraint firstAttribute="trailing" secondItem="Iaz-8H-8v8" secondAttribute="trailing" constant="18" id="l5w-bz-zwX"/>
<constraint firstItem="Y1c-JH-YHd" firstAttribute="leading" secondItem="WmK-wo-dAG" secondAttribute="leading" constant="8" id="nxI-AM-yEG"/>
<constraint firstItem="3aE-BO-Tlu" firstAttribute="top" secondItem="Iaz-8H-8v8" secondAttribute="bottom" constant="13" id="sKL-71-fkW"/>
</constraints>
</view>
</subviews>
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
<constraints>
<constraint firstItem="7Hl-jg-F0e" firstAttribute="top" secondItem="hjy-NP-SPb" secondAttribute="bottom" constant="32" id="Fic-Dd-edZ"/>
<constraint firstItem="7Hl-jg-F0e" firstAttribute="top" secondItem="hjy-NP-SPb" secondAttribute="bottom" constant="16" id="Fic-Dd-edZ"/>
<constraint firstItem="WmK-wo-dAG" firstAttribute="leading" secondItem="WJ4-wm-n6l" secondAttribute="leading" constant="24" id="RAZ-nT-3eI"/>
<constraint firstItem="hjy-NP-SPb" firstAttribute="top" secondItem="WJ4-wm-n6l" secondAttribute="top" constant="29" id="Z4K-5J-9xJ"/>
<constraint firstAttribute="trailing" secondItem="hjy-NP-SPb" secondAttribute="trailing" constant="25" id="bdg-9R-Y5N"/>
......@@ -5906,8 +5910,7 @@
<color key="titleShadowColor" red="0.5" green="0.5" blue="0.5" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</state>
<connections>
<action selector="callBackConnect:" destination="dnQ-WR-vR5" eventType="touchUpInside" id="Q1F-d6-gB5"/>
<segue destination="rrg-4g-uK9" kind="show" identifier="callback" id="ubV-2x-Fxi"/>
<action selector="callBackButton:" destination="dnQ-WR-vR5" eventType="touchUpInside" id="FfK-Pc-78j"/>
</connections>
</button>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="9O6-Kz-CR5" customClass="UIButtonRoundedBlue" customModule="telecom" customModuleProvider="target">
......@@ -5920,7 +5923,7 @@
<color key="titleShadowColor" red="0.5" green="0.5" blue="0.5" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</state>
<connections>
<action selector="btnConnect:" destination="dnQ-WR-vR5" eventType="touchUpInside" id="Wmj-5V-iBJ"/>
<action selector="connectButton:" destination="dnQ-WR-vR5" eventType="touchUpInside" id="FHv-Te-qxx"/>
</connections>
</button>
</subviews>
......@@ -6065,7 +6068,7 @@
</constraints>
</view>
<connections>
<outlet property="callbackButton" destination="0iD-by-m2W" id="q9M-SJ-e1z"/>
<outlet property="callbackButton" destination="0iD-by-m2W" id="c4n-mp-7ld"/>
<outlet property="connectButton" destination="9O6-Kz-CR5" id="o6B-oR-TgK"/>
<outlet property="containerHeightConstrant" destination="WRr-Ld-ylO" id="khG-Vv-Lo2"/>
<outlet property="trueTableView" destination="0Ih-B4-d6G" id="TDs-hv-6aO"/>
......@@ -10420,6 +10423,7 @@
<image name="ic_person" width="24" height="24"/>
<image name="ic_refresh" width="24" height="24"/>
<image name="ic_send_button_white" width="24" height="24"/>
<image name="ic_visibility_off" width="24" height="24"/>
<image name="login_logo" width="206" height="33"/>
<image name="menu_pss_icon" width="22" height="22"/>
<image name="menu_pss_icon_selected" width="22" height="22"/>
......@@ -10428,9 +10432,9 @@
</resources>
<inferredMetricsTieBreakers>
<segue reference="DLz-YX-uIq"/>
<segue reference="ubV-2x-Fxi"/>
<segue reference="u3f-De-xYZ"/>
<segue reference="jYs-6B-rXI"/>
<segue reference="oez-C0-yuF"/>
<segue reference="jYs-6B-rXI"/>
<segue reference="u3f-De-xYZ"/>
<segue reference="Ve1-i7-bvj"/>
</inferredMetricsTieBreakers>
</document>
......@@ -2,7 +2,7 @@
"images" : [
{
"idiom" : "universal",
"filename" : "promo_1.png",
"filename" : "1onboarding_profile.png",
"scale" : "1x"
},
{
......
......@@ -2,7 +2,7 @@
"images" : [
{
"idiom" : "universal",
"filename" : "promo_2.png",
"filename" : "2onboarding_service.png",
"scale" : "1x"
},
{
......
......@@ -2,7 +2,7 @@
"images" : [
{
"idiom" : "universal",
"filename" : "promo_1.png",
"filename" : "3onboarding_payment.png",
"scale" : "1x"
},
{
......
{
"images" : [
{
"idiom" : "universal",
"filename" : "ic_visibility_off.png",
"scale" : "1x"
},
{
"idiom" : "universal",
"filename" : "ic_visibility_off_2x.png",
"scale" : "2x"
},
{
"idiom" : "universal",
"filename" : "ic_visibility_off_3x.png",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
\ No newline at end of file
{
"images" : [
{
"idiom" : "universal",
"filename" : "ic_visibility.png",
"scale" : "1x"
},
{
"idiom" : "universal",
"filename" : "ic_visibility_2x.png",
"scale" : "2x"
},
{
"idiom" : "universal",
"filename" : "ic_visibility_3x.png",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
\ No newline at end of file
......@@ -114,14 +114,14 @@
"software_rent.title" = "Аренда ПО";
// promo
"promo.title_0" = "Личный кабинет";
"promo.title_1" = "Спецпредложения";
"promo.title_2" = "Подключенные услуги";
"promo.title_0" = "Добро пожаловать";
"promo.title_1" = "Добро пожаловать";
"promo.title_2" = "Добро пожаловать";
"promo.title_3" = "promo title 4";
"promo.description_0" = "Доступ в личный кабинет абонента с мобильного телефона. Просмотр текущего баланса и счетов";
"promo.description_1" = "Мы составили несколько специальных предложений для вас!";
"promo.description_2" = "Посмотрите список текущих услуг, настройте или подключите новые";
"promo.description_0" = "Теперь Вам доступен личный кабинет с мобильного телефона. Авторизируйтесь и просмотрите данные своего профиля";
"promo.description_1" = "Просмотрите список подключенных услуг. Настройте или подключайте новые";
"promo.description_2" = "Просмотрите текущий баланс на оплату и историю счетов. Оплатите услуги онлайн без комиссии";
"promo.description_3" = "promo description 4";
// service_callback
......@@ -463,7 +463,7 @@
"login.error.incorrect_login_or_password" = "Неверный логин или пароль";
"login.text_field.your_email.placeholder" = "Ваш e-mail";
"login.text_field.your_guid_number.placeholder" = "Номер вашего лицевого счета";
"login.text_field.your_phone_number.placeholder" = "Ваш абонентский номер";
"login.text_field.your_phone_number.placeholder" = "Ваш абонентский номер (без +7)";
// Registration
......
......@@ -22,6 +22,7 @@ class KeyboardedViewController : UIViewController, UITextViewDelegate {
override func viewWillDisappear(animated: Bool) {
super.viewWillDisappear(animated)
self.view.endEditing(true)
print("viewWillDisappear")
}
func hideKeyboard(sender: AnyObject?) {
......
......@@ -71,6 +71,7 @@ class BotViewController: UIViewController {
func textFieldShouldReturn(textField: UITextField) -> Bool {
textField.resignFirstResponder()
self.tableView.scrollToBottom(true)
return true
}
......@@ -118,10 +119,10 @@ class BotViewController: UIViewController {
if botResult.count != 0 {
self.messagesList.append(botResult)
self.tableView.reloadData()
self.tableView.scrollToBottom(true)
} else {
self.addMessage("Извините, по вашему запросу ничего не нашлось", type: 0)
}
self.tableView.scrollToBottom(true)
}) { (error) in
AlertViewUtil.showErrorAlert(error, vc: self)
}
......@@ -136,10 +137,12 @@ class BotViewController: UIViewController {
if botResult.count != 0 {
self.messagesList.append(botResult)
self.tableView.reloadData()
self.tableView.scrollToBottom(true)
} else {
self.addMessage("Извините, по вашему запросу ничего не нашлось", type: 0)
}
self.messageField.text = ""
self.view.endEditing(true)
self.tableView.scrollToBottom(true)
}) { (error) in
AlertViewUtil.showErrorAlert(error, vc: self)
}
......
......@@ -221,6 +221,7 @@ extension AccountServicesViewController {
let device = Device()
device.device = self.accountServices?.megalineIdNets[index].device
device.linkId = self.accountServices?.megalineIdNets[index].linkID
let vc = self.storyboard!.instantiateViewControllerWithIdentifier("PublicWifiViewController") as! PublicWifiViewController
vc.device = device
......
......@@ -20,9 +20,7 @@ class FeedViewController: ViewControllerWithMenu {
self.navigationItem.title = "Главная"
SpinneredAlert.show(self)
AbonentInfoManager.sharedInstance.updateUserInfo()
refreshBalance()
tableView.estimatedRowHeight = 44.0;
tableView.rowHeight = UITableViewAutomaticDimension;
......@@ -30,6 +28,11 @@ class FeedViewController: ViewControllerWithMenu {
}
func refreshBalance() {
SpinneredAlert.show(self)
AbonentInfoManager.sharedInstance.updateUserInfo()
}
override func viewWillAppear(animated: Bool) {
super.viewWillAppear(animated)
configureBlueNavbar()
......
......@@ -17,6 +17,9 @@ class LKSettingsViewController: ViewControllerWithCustomTitle, UITableViewDelega
var rightBarButtonItem: UIBarButtonItem?
var params: [String: AnyObject] = [String: AnyObject]()
private let menuIcon = UIImage(named: "menu_icon")
private let menuButton: UIButton
override func viewWillAppear(animated: Bool) {
super.viewWillAppear(animated)
titleLabel = UILabel(frame: CGRect(x: 0, y: 0, width: 150, height: 36))
......@@ -27,11 +30,51 @@ class LKSettingsViewController: ViewControllerWithCustomTitle, UITableViewDelega
self.navigationItem.titleView = titleLabel
}
required init?(coder aDecoder: NSCoder) {
menuButton = UIButton(frame: CGRect(origin: CGPoint(x: 0, y: 0), size: menuIcon!.size))
super.init(coder: aDecoder)
}
override init(nibName nibNameOrNil: String?, bundle nibBundleOrNil: NSBundle?) {
menuButton = UIButton(frame: CGRect(origin: CGPoint(x: 0, y: 0), size: menuIcon!.size))
super.init(nibName: nibNameOrNil, bundle: nibBundleOrNil)
}
func addMenuBarButton() {
menuButton.setImage(menuIcon, forState: .Normal)
menuButton.setImage(UIImage(named: "menu_icon_highlighted"), forState: .Highlighted)
menuButton.addTarget(self, action: #selector(LKSettingsViewController.menuButton_TouchUpInside(_:)), forControlEvents: UIControlEvents.TouchUpInside)
self.navigationItem.leftBarButtonItem = UIBarButtonItem(customView: menuButton)
if UIDevice.currentDevice().userInterfaceIdiom == .Pad {
menuButton.enabled = !UIApplication.sharedApplication().statusBarOrientation.isLandscape
menuButton.hidden = UIApplication.sharedApplication().statusBarOrientation.isLandscape
}
if UIApplication.sharedApplication().statusBarOrientation.isLandscape {
menuButton.enabled = false
menuButton.hidden = true
} else {
menuButton.enabled = true
menuButton.hidden = false
}
}
func menuButton_TouchUpInside(sender: UIButton) {
if let rvc = self.navigationController!.parentViewController! as? RootVC {
rvc.openLeftSideViewControllerAnimated(true, completion: nil)
} else if let rvc = self.navigationController!.parentViewController! as? MainViewController {
let vc = rvc.parentViewController! as! RootVC
vc.openLeftSideViewControllerAnimated(true, completion: nil)
}
}
// MARK: View life cycle
override func viewDidLoad() {
navigationBarTitle = §"menu.settings"
PKNotification.loading(true)
addMenuBarButton()
NSNotificationCenter.defaultCenter().addObserver(self, selector: #selector(LKSettingsViewController.requestSettings),
name: AbonentInfoManager.NotificationNames.Update, object: AbonentInfoManager.sharedInstance)
......@@ -61,7 +104,7 @@ class LKSettingsViewController: ViewControllerWithCustomTitle, UITableViewDelega
placeholder: "",
apiField: "",
available: false
))
))
}
self._fields[self._fields.count - 2].append(TextField(text: "", title: "", placeholder: "", apiField: ""))
self.tableView.beginUpdates()
......@@ -255,33 +298,33 @@ class LKSettingsViewController: ViewControllerWithCustomTitle, UITableViewDelega
apiField: "",
available: false)
],
/*[
NumberField(
text: (§"settings.count_password_change").uppercaseString,
title: "settings.count_password_change",
placeholder: "7",
apiField: "in_max_pswd_change_attempt",
numberValues: [3,5,7,10]),
NumberField(
text: (§"settings.count_lk_login_before_change_password").uppercaseString,
title: "settings.count_lk_login_before_change_password",
placeholder: "60",
apiField: "in_max_logon_count",
numberValues: [10,20,30,40,50,60]),
NumberField(
text: (§"settings.count_unactiv_period").uppercaseString,
title: "settings.count_unactiv_period",
placeholder: "15",
apiField: "out_idle_timeout",
numberValues: [15,20,30,60]),
],*/
// [
// NumberField(
// text: (§"settings.count_password_change").uppercaseString,
// title: "settings.count_password_change",
// placeholder: "7",
// apiField: "in_max_pswd_change_attempt",
// numberValues: [3,5,7,10]),
// NumberField(
// text: (§"settings.count_lk_login_before_change_password").uppercaseString,
// title: "settings.count_lk_login_before_change_password",
// placeholder: "60",
// apiField: "in_max_logon_count",
// numberValues: [10,20,30,40,50,60]),
// NumberField(
// text: (§"settings.count_unactiv_period").uppercaseString,
// title: "settings.count_unactiv_period",
// placeholder: "15",
// apiField: "out_idle_timeout",
// numberValues: [15,20,30,60]),
// ],
[],
[
SwitchField(
text: §"settings.adv",
title: "settings.adv",
apiField: "in_advertisement"),
],
],
[],
[
SecureField(
......@@ -296,7 +339,7 @@ class LKSettingsViewController: ViewControllerWithCustomTitle, UITableViewDelega
text: (§"settings.retry_password").uppercaseString,
title: "settings.retry_password",
apiField: "retry_password"),
]
]
]
var name: String = ""
......@@ -340,7 +383,7 @@ class LKSettingsViewController: ViewControllerWithCustomTitle, UITableViewDelega
Facade.sharedInstance().getAbonentSettings({ (error) -> Void in
PKNotification.loading(false)
let alert = UIAlertView(title: "Ошибка", message: error.description, delegate: nil,
cancelButtonTitle: "OK")
cancelButtonTitle: "OK")
alert.show()
}, onSuccess: { (abonentSettings) -> Void in
self.abonentSettings = abonentSettings
......@@ -449,7 +492,7 @@ class LKSettingsViewController: ViewControllerWithCustomTitle, UITableViewDelega
onError: { (error) -> Void in
PKNotification.loading(false)
let alert = UIAlertView(title: "Ошибка", message: error.description, delegate: nil,
cancelButtonTitle: "OK")
cancelButtonTitle: "OK")
alert.show()
}, onSuccess: { (success) -> Void in
AbonentInfoManager.sharedInstance.updateUserInfo()
......@@ -459,7 +502,7 @@ class LKSettingsViewController: ViewControllerWithCustomTitle, UITableViewDelega
}, onHalfSuccess:{ (error) -> Void in
PKNotification.loading(false)
let alert = UIAlertView(title: "Ошибка", message: error, delegate: nil,
cancelButtonTitle: "OK")
cancelButtonTitle: "OK")
alert.show()
})
......
......@@ -24,8 +24,8 @@ class FirstStepOfRegistrationVC : StepViewController, UIPickerViewDataSource {
@IBOutlet weak var codeTextField: UITextField!
@IBOutlet weak var getCodeButton: UILabel!
private var serverItems : [ServerItem] = []
private var serverItem: ServerItem!
private var serverItems : [CallbackRegion] = []
private var serverItem: CallbackRegion!
private var serverNames: [String] = []
private var gradePicker: UIPickerView!
......@@ -92,7 +92,20 @@ class FirstStepOfRegistrationVC : StepViewController, UIPickerViewDataSource {
}
private func sendRequestGetServerListId() {
Facade.sharedInstance().getListServerId({ (serverItems) in
// Facade.sharedInstance().getListServerId({ (serverItems) in
// AbonentForRegister.sharedInstance().inServerId = serverItems[0].id!
// self.serverItems = serverItems
// self.serverItem = serverItems[0]
// self.serverNames = self.serverItems.map({$0.name ?? ""})
// self.regionTextField.inputView = self.gradePicker
// self.regionTextField.text = self.serverNames[0]
// }, onError: { (error) in
// print(error)
// }) {
//
// }
Facade.sharedInstance().getOfferRegions({ (serverItems) in
AbonentForRegister.sharedInstance().inServerId = serverItems[0].id!
self.serverItems = serverItems
self.serverItem = serverItems[0]
......
......@@ -17,6 +17,7 @@ class LoginViewController: ScrolledViewController, UIViewControllerTransitioning
@IBOutlet weak var btnPhoneNumberMode: UIButton!
@IBOutlet weak var btnLoginMode: UIButton!
@IBOutlet weak var lblOrMode: UILabel!
@IBOutlet weak var showPasswordIcon: UIImageView!
var isShowedAlert : Bool = false
let defaults = NSUserDefaults.standardUserDefaults()
......@@ -24,6 +25,12 @@ class LoginViewController: ScrolledViewController, UIViewControllerTransitioning
var lblPrefix: UILabel?
var isPhoneMode : Bool = true
var keyboardShowed : Bool = false
var passwordEnabled : Bool = false
var selectedRegion: CallbackRegion?
var cityButton: UIButton!
static var regions: [CallbackRegion] = []
static var regionNames: [String] = []
func showError(notification: NSNotification) {
self.processRequest(false)
......@@ -50,6 +57,12 @@ class LoginViewController: ScrolledViewController, UIViewControllerTransitioning
debugPrint("LoginViewController viewWillDisappear")
}
override func viewDidDisappear(animated: Bool) {
super.viewDidDisappear(animated)
print("viewDidDisappear")
}
private let _facade = Facade.sharedInstance()
private let _notificationCenter = NSNotificationCenter.defaultCenter()
......@@ -80,26 +93,45 @@ class LoginViewController: ScrolledViewController, UIViewControllerTransitioning
_loginTextField.applyUITextFieldStyle()
_passwordTextField.applyUITextFieldStyle()
debugPrint("Login viewDidLoad end")
let showPasswordGesture = UITapGestureRecognizer(target: self, action: #selector(LoginViewController.showPasswordEvent(_:)))
showPasswordIcon.userInteractionEnabled = true
showPasswordIcon.addGestureRecognizer(showPasswordGesture)
// NSNotificationCenter.defaultCenter().addObserver(self, selector: #selector(applicationWillResignActive), name: UIApplicationWillResignActiveNotification, object: nil)
}
func keyboardWillShow(notification: NSNotification) {
if (keyboardShowed) {
return
}
if let keyboardSize = (notification.userInfo?[UIKeyboardFrameBeginUserInfoKey] as? NSValue)?.CGRectValue() {
self.view.frame.origin.y -= (keyboardSize.height / 2)
func showPasswordEvent(tapGestureRecognizer: UITapGestureRecognizer) {
if passwordEnabled {
passwordEnabled = false
_passwordTextField.secureTextEntry = true
showPasswordIcon.image = UIImage(named: "ic_visibility_off")
} else {
passwordEnabled = true
_passwordTextField.secureTextEntry = false
showPasswordIcon.image = UIImage(named: "ic_visibility_on")
}
keyboardShowed = true
}
func keyboardWillShow(notification: NSNotification) {
// if (keyboardShowed) {
// return
// }
// if let keyboardSize = (notification.userInfo?[UIKeyboardFrameBeginUserInfoKey] as? NSValue)?.CGRectValue() {
// self.view.frame.origin.y -= (keyboardSize.height / 2)
// }
// keyboardShowed = true
}
func keyboardWillHide(notification: NSNotification) {
if (!keyboardShowed) {
return
}
if let keyboardSize = (notification.userInfo?[UIKeyboardFrameBeginUserInfoKey] as? NSValue)?.CGRectValue() {
self.view.frame.origin.y += (keyboardSize.height / 2)
}
keyboardShowed = false
// if (!keyboardShowed) {
// return
// }
// if let keyboardSize = (notification.userInfo?[UIKeyboardFrameBeginUserInfoKey] as? NSValue)?.CGRectValue() {
// self.view.frame.origin.y += (keyboardSize.height / 2)
// }
// keyboardShowed = false
}
override func viewDidAppear(animated: Bool) {
......@@ -140,8 +172,8 @@ class LoginViewController: ScrolledViewController, UIViewControllerTransitioning
fillFieldsWithDefaultValues()
self.loginTryCount = 0
_loginTextField.text = "ntcnjdsq" // 7278177224
_passwordTextField.text = "Fvbh1988"
_loginTextField.text = "7172682610" // ntcnjdsq 7278177224
_passwordTextField.text = "NewPassword1"
let loginFieldValue = _loginTextField.text
if containsLetters(_loginTextField.text!) {
......@@ -179,6 +211,7 @@ class LoginViewController: ScrolledViewController, UIViewControllerTransitioning
PKNotification.loading(false)
})
}
func generateRecoverAlert(recoverType: String) {
......@@ -226,6 +259,11 @@ class LoginViewController: ScrolledViewController, UIViewControllerTransitioning
self.isShowedAlert = true
let textField = alertVC.createTextField()
textField.placeholder = placeHolder
if recoverType == "phone" {
textField.tag = 101
}
alertVC.addTextField(textField)
alertVC.addButtonHandlers({ (button) -> Void in
}, rightButtonHandler: { (button) -> Void in
......@@ -246,7 +284,6 @@ class LoginViewController: ScrolledViewController, UIViewControllerTransitioning
alertVC.addTitleAndMessage(title, msg: message)
alertVC.addButtonTitles(rightButtonTitle: LS("login.alert.send"))
}
}
func hideShowedAlert() {
......@@ -378,17 +415,30 @@ class LoginViewController: ScrolledViewController, UIViewControllerTransitioning
actionSheet.addAction(UIAlertAction(title: LS("login.passsword_restoration.email"), style: .Default, handler: { (alertAction) in
self.generateRecoverAlert("email")
//self.presentViewController(self.generateRecoverAlert("email"), animated: true, completion: nil)
}))
actionSheet.addAction(UIAlertAction(title: LS("login.passsword_restoration.account"), style: .Default, handler: { (alertAction) in
self.generateRecoverAlert("guid")
//self.presentViewController(self.generateRecoverAlert("guid"), animated: true, completion: nil)
if StepViewController.regions.isEmpty {
SpinneredAlert.show(self)
Facade.sharedInstance().getOfferRegions({ (callbackRegions) in
LoginViewController.regions = callbackRegions
LoginViewController.regionNames = callbackRegions.map({$0.name ?? ""})
self.selectedRegion = LoginViewController.regions[0]
self.dismissViewControllerAnimated(true, completion: nil)
self.showHelpAlert()
}, onError: { (error) in
}) {
}
} else {
self.showHelpAlert()
}
}))
actionSheet.addAction(UIAlertAction(title: LS("login.passsword_restoration.phone_number"), style: .Default, handler: { (alertAction) in
self.generateRecoverAlert("phone")
//self.presentViewController(self.generateRecoverAlert("phone"), animated: true, completion: nil)
}))
actionSheet.addAction(UIAlertAction(title: LS("cancel"), style: .Cancel, handler: nil))
......@@ -449,4 +499,84 @@ class LoginViewController: ScrolledViewController, UIViewControllerTransitioning
_restorePasswordButton.setTitle(restorePassword, forState: .Normal)
}
func showHelpAlert() {
let customAlertVC = CustomAlertViewController.fromStoryboard()
customAlertVC.fillAndShowAlert(300, height: 300, presentingVC: self, closure: { (alertVC) -> Void in
customAlertVC.addTitleAndMessage("Восстановление пароля", msg: "По лицевому счету")
customAlertVC.addButtonTitles(rightButtonTitle: "Отправить")
for i in 0..<1 {
let textField = alertVC.createTextField()
var localizedId = ""
switch i {
case 0:
localizedId = "Лицевой счет"
break
default:
break
}
textField.placeholder = localizedId
customAlertVC.addTextField(textField)
}
// KeyboardUtil.changeKeyboardType(UIKeyboardType.NumberPad, textField: alertVC.textFields[1])
self.cityButton = UIButton(frame: CGRect(origin: CGPointZero, size: CGSize.zero))
self.cityButton.setTitle(self.selectedRegion?.name ?? "", forState: .Normal)
self.cityButton.setTitleColor(Color.BlueButtonColor, forState: .Normal)
self.cityButton.addTarget(self, action: #selector(LoginViewController.cityButton_touchUpInside(_:)), forControlEvents: .TouchUpInside)
self.cityButton.sizeToFit()
alertVC.textFields[0].tag = 101
customAlertVC.addView(self.cityButton)
customAlertVC.addButtonHandlers({ (button) -> Void in
}, rightButtonHandler: { (button) -> Void in
let guidField = alertVC.textFields[0].text
let guid = self.selectedRegion?.guid_server_id!
let data = "\(guid!)-\(guidField!)"
if guidField == "" || self.selectedRegion == nil {
AlertViewUtil.showIncorrectAlert()
} else {
PKNotification.loading(true)
let params = [
"type": "guid",
"data": data
] as [String: AnyObject]
print("params \(params)")
self.forgetPasswordSend(params)
}
})
})
}
func cityButton_touchUpInside(sender: UIButton) {
let acp = ActionSheetMultipleStringPicker(title: "", rows: [LoginViewController.regionNames], initialSelection: [0], doneBlock: {
picker, values, indexes in
print("values = \(values)")
print("indexes = \(indexes)")
dispatch_async(dispatch_get_main_queue()){
self.selectedRegion = LoginViewController.regions[values[0] as! Int]
self.cityButton.setTitle(LoginViewController.regions[values[0] as! Int].name ?? "", forState: .Normal)
}
return
}, cancelBlock: { ActionMultipleStringCancelBlock in return }, origin: sender)
acp.setDoneButton(UIBarButtonItem(title: LS("ok"), style: .Plain, target: self, action: Selector()))
acp.setCancelButton(UIBarButtonItem(title: LS("cancel"), style: .Plain, target: nil, action: Selector()))
acp.showActionSheetPicker()
}
dynamic private func applicationWillResignActive() {
self.view.endEditing(true)
}
}
......@@ -91,12 +91,15 @@ class StepViewController : ScrolledViewController, UIAlertViewDelegate, UIPicker
self.cityButton.addTarget(self, action: #selector(StepViewController.cityButton_touchUpInside(_:)), forControlEvents: .TouchUpInside)
self.cityButton.sizeToFit()
alertVC.textFields[1].tag = 101
customAlertVC.addView(self.cityButton)
customAlertVC.addButtonHandlers({ (button) -> Void in
}, rightButtonHandler: { (button) -> Void in
let fioTitle = alertVC.textFields[0].text
let phoneNumberTitle = alertVC.textFields[1].text
if fioTitle == "" || phoneNumberTitle == "" || self.selectedRegion == nil {
AlertViewUtil.showIncorrectAlert()
} else if containsLetters(phoneNumberTitle!) || phoneNumberTitle?.characters.count != 10 {
......@@ -105,6 +108,7 @@ class StepViewController : ScrolledViewController, UIAlertViewDelegate, UIPicker
let params:[String: AnyObject] = ["region": self.selectedRegion!.id!,
"phone": phoneNumberTitle!,
"type": 1,
"form_type": 1,
"name": fioTitle!,
"region_type": self.selectedRegion!.regionType!
]
......
......@@ -40,7 +40,7 @@ class PaymentsHistoryViewController: UIViewController, UITableViewDataSource, UI
}
@IBAction func pdfButton_click(sender: UIButton) {
var urlString = "http://telecom.kz/api/get_year_history.pdf?token=\(Facade.accessToken!)&client_id=\(Facade.clientId!)"
var urlString = "http://telecom.kz/api/get_year_history?token=\(Facade.accessToken!)&client_id=\(Facade.clientId!)"
let vc = KTWebViewController(url: urlString)
vc.title = LS("publishedCashes_pdfViewer_title")
vc.showCloseButton()
......
......@@ -128,7 +128,7 @@ class PublishedCashesViewController: UIViewController, UITableViewDataSource, UI
let accountId = String(Facade.accountId!)
let serverId = String(Facade.serverId!)
let periodId = String(self.periods[currentPeriodIndex!].period!)
let urlString = "http://telecom.kz/api/get_bill_history.pdf?token=\(Facade.accessToken!)&client_id=\(Facade.clientId!)&period_id=\(periodId)&abonent_id=\(accountId)&server_id=\(serverId)"
let urlString = "http://telecom.kz/api/get_bill_history?token=\(Facade.accessToken!)&client_id=\(Facade.clientId!)&period_id=\(periodId)&abonent_id=\(accountId)&server_id=\(serverId)"
let vc = KTWebViewController(url: urlString)
vc.title = LS("publishedCashes_pdfViewer_title")
vc.showCloseButton()
......@@ -151,8 +151,8 @@ class PublishedCashesViewController: UIViewController, UITableViewDataSource, UI
self.loading(true)
Facade.sharedInstance().getBillList(params, onSuccess: { (bills) in
if !bills.isEmpty {
self.currentBill = bills[0]
self.periodIdsBills[self.periods[self.currentPeriodIndex!].periodId!] = bills[0]
self.currentBill = bills[bills.count - 1]
self.periodIdsBills[self.periods[self.currentPeriodIndex!].periodId!] = bills[bills.count - 1]
}
}, onError: { (error) in
self.currentBill = nil
......
......@@ -10,68 +10,68 @@ import Foundation
import UIKit
class PublicWifiViewController : UIViewController, UITableViewDataSource, UITableViewDelegate {
@IBOutlet var tableView: UITableView!
let orderCellIdentifier = "orderCell"
var wifiOrders: [WifiBaseOrder] = []
var device:Device?
override func viewWillAppear(animated: Bool) {
super.viewWillAppear(animated)
configureBlueNavbar()
addBackButtonForDefault(.whiteColor())
localize()
}
override func viewDidLoad() {
super.viewDidLoad()
configureTableView()
PKNotification.loading(true)
requestPublicWifi()
}
func requestPublicWifi() {
let params = [
"access_token": Facade.accessToken!,
"client_id": Facade.clientId!,
"server_id": Facade.serverId!,
"abonent_id": Facade.accountId!,
"device": device!.device!
] as [String: AnyObject]
PKNotification.loading(true)
Facade.sharedInstance().getPublicWifi(params, onSuccess: { (wifiOrders) in
self.wifiOrders = wifiOrders
self.tableView.reloadData()
}, onError: { (error) in
AlertViewUtil.showIncorrectAlert(error)
}, onFinish: {() in
PKNotification.loading(false)
})
}
private func configureTableView() {
tableView.estimatedRowHeight = 150
tableView.rowHeight = UITableViewAutomaticDimension
}
@IBOutlet var tableView: UITableView!
let orderCellIdentifier = "orderCell"
var wifiOrders: [WifiBaseOrder] = []
var device:Device?
override func viewWillAppear(animated: Bool) {
super.viewWillAppear(animated)
configureBlueNavbar()
addBackButtonForDefault(.whiteColor())
localize()
}
override func viewDidLoad() {
super.viewDidLoad()
configureTableView()
PKNotification.loading(true)
requestPublicWifi()
}
func requestPublicWifi() {
let params = [
"access_token": Facade.accessToken!,
"client_id": Facade.clientId!,
"server_id": Facade.serverId!,
"abonent_id": Facade.accountId!,
"device": device!.device!
] as [String: AnyObject]
PKNotification.loading(true)
Facade.sharedInstance().getPublicWifi(params, onSuccess: { (wifiOrders) in
self.wifiOrders = wifiOrders
self.tableView.reloadData()
}, onError: { (error) in
AlertViewUtil.showIncorrectAlert(error)
}, onFinish: {() in
PKNotification.loading(false)
})
}
private func configureTableView() {
tableView.estimatedRowHeight = 150
tableView.rowHeight = UITableViewAutomaticDimension
}
}
// UITableViewDataSource
extension PublicWifiViewController {
func tableView(tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
return wifiOrders.count
}
func tableView(tableView: UITableView, cellForRowAtIndexPath indexPath: NSIndexPath) -> UITableViewCell {
let cell = tableView.dequeueReusableCellWithIdentifier(orderCellIdentifier, forIndexPath: indexPath) as! PublicWifiOrderCell
cell.fillCell(wifiOrders[indexPath.row], vc: self)
//cell.selectionStyle = .None
return cell
}
func tableView(tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
return wifiOrders.count
}
func tableView(tableView: UITableView, cellForRowAtIndexPath indexPath: NSIndexPath) -> UITableViewCell {
let cell = tableView.dequeueReusableCellWithIdentifier(orderCellIdentifier, forIndexPath: indexPath) as! PublicWifiOrderCell
cell.fillCell(wifiOrders[indexPath.row], vc: self)
return cell
}
}
extension PublicWifiViewController {
override var localizedId: String {
return "public_wifi"
}
override var localizedId: String {
return "public_wifi"
}
}
......@@ -73,17 +73,15 @@ class GetCodeViewController: KeyboardedViewController {
AbonentForRegister.sharedInstance().inIin = iinField.text!
AbonentForRegister.sharedInstance().inPhone = phoneField.text!
print(AbonentForRegister.sharedInstance().inServerId)
print(AbonentForRegister.sharedInstance().inAbonentId)
print(AbonentForRegister.sharedInstance().inIin)
print(AbonentForRegister.sharedInstance().inEmail)
print(AbonentForRegister.sharedInstance().inPhone)
let params: [String : String] = [
"server_id" : AbonentForRegister.sharedInstance().inServerId,
"abonent_id" : AbonentForRegister.sharedInstance().inAbonentId,
"iin" : AbonentForRegister.sharedInstance().inIin,
"email" : AbonentForRegister.sharedInstance().inEmail,
"phone" : AbonentForRegister.sharedInstance().inPhone
]
let params: [String : AnyObject] = ["server_id" : AbonentForRegister.sharedInstance().inServerId,
"abonent_id" : AbonentForRegister.sharedInstance().inAbonentId,
"iin" : AbonentForRegister.sharedInstance().inIin,
"email" : AbonentForRegister.sharedInstance().inEmail,
"phone" : AbonentForRegister.sharedInstance().inPhone]
print(params)
PKNotification.loading(true)
......
......@@ -29,7 +29,7 @@ class MenuTableController: UIViewController, UITableViewDataSource, UITableViewD
"ic_vpn_key",
"ic_wifi",
"ic_help_black",
"ic_help_black",
"ic_settings",
"ic_exit_to_app"
]
......
......@@ -10,122 +10,123 @@ import Foundation
import UIKit
class PromoViewController: UIViewController, UIScrollViewDelegate {
@IBOutlet weak var scrollView: UIScrollView!
@IBOutlet weak var bottomScrollView: UIScrollView!
@IBOutlet weak var imageView: UIImageView!
@IBOutlet weak var bottomView: UIView!
@IBOutlet weak var bottomViewTitleLabel: UILabel!
@IBOutlet weak var bottomViewDescriptionLabel: UILabel!
@IBOutlet weak var pageControl: UIPageControl!
@IBOutlet weak var okButton: BlueButton!
var frame: CGRect = CGRectMake(0, 0, 0, 0)
var close_touchUpInside: ((sender: UIButton) -> Void)?
var pagesCount = 3
var index: Int = 0
@IBAction func ok_touchUpInside(sender: UIButton) {
close_touchUpInside?(sender: sender)
self.view.removeFromSuperview()
self.removeFromParentViewController()
}
private func localizeSubviews() {
okButton.setTitle("Ok", forState: .Normal)
}
override func viewWillAppear(animated: Bool) {
super.viewWillAppear(animated)
localizeSubviews()
}
private func configureSubviews() {
bottomView.backgroundColor = Color.PromoBlueColor
}
private func configurePageControl() {
self.pageControl.numberOfPages = pagesCount
self.pageControl.currentPage = 0
self.view.bringSubviewToFront(pageControl)
}
private func configureImageView(imageView: UIImageView) {
imageView.contentMode = .ScaleAspectFill
imageView.layer.shadowColor = UIColor.blackColor().CGColor
imageView.layer.shadowOpacity = 0.7
imageView.layer.shadowOffset = CGSize(width: 2, height: 2)
imageView.layer.shadowRadius = 5
}
private func configureScrollViews() {
for index in 0..<pagesCount {
// top ScrollView
frame.origin.x = self.scrollView.frame.size.width * CGFloat(index)
frame.size = self.scrollView.frame.size
self.scrollView.pagingEnabled = true
let imageWrapperView = UIView(frame: frame)
let imageView = UIImageView(frame: frame)
configureImageView(imageView)
imageWrapperView.addSubview(imageView)
imageView.translatesAutoresizingMaskIntoConstraints = false
let views = ["image": imageView]
imageWrapperView.addConstraints(NSLayoutConstraint.constraintsWithVisualFormat("H:|-40-[image]-40-|", options: [], metrics: nil, views: views))
imageWrapperView.addConstraints(NSLayoutConstraint.constraintsWithVisualFormat("V:|-40-[image]|", options: [], metrics: nil, views: views))
imageView.image = UIImage(named: "promo_\(index)")
imageView.contentMode = .ScaleAspectFit
self.scrollView.addSubview(imageWrapperView)
// bottom ScrollView
let newFrame2 = CGRect(origin: CGPoint(x: self.bottomScrollView.frame.size.width * CGFloat(index), y: 0), size: self.bottomScrollView.frame.size)
let descriptionView = PromoDescriptionView.instanceFromNib()
descriptionView.frame = newFrame2
descriptionView.titleLabel.setTextAndSizeToFit(LS("promo.title_\(index)"))
descriptionView.descriptionLabel.setTextAndSizeToFit(LS("promo.description_\(index)"))
self.bottomScrollView.pagingEnabled = true
self.bottomScrollView.addSubview(descriptionView)
@IBOutlet weak var scrollView: UIScrollView!
@IBOutlet weak var bottomScrollView: UIScrollView!
@IBOutlet weak var imageView: UIImageView!
@IBOutlet weak var bottomView: UIView!
@IBOutlet weak var bottomViewTitleLabel: UILabel!
@IBOutlet weak var bottomViewDescriptionLabel: UILabel!
@IBOutlet weak var pageControl: UIPageControl!
@IBOutlet weak var okButton: BlueButton!
var frame: CGRect = CGRectMake(0, 0, 0, 0)
var close_touchUpInside: ((sender: UIButton) -> Void)?
var pagesCount = 3
var index: Int = 0
@IBAction func ok_touchUpInside(sender: UIButton) {
close_touchUpInside?(sender: sender)
self.view.removeFromSuperview()
self.removeFromParentViewController()
}
private func localizeSubviews() {
okButton.setTitle("Ok", forState: .Normal)
}
override func viewWillAppear(animated: Bool) {
super.viewWillAppear(animated)
localizeSubviews()
}
private func configureSubviews() {
bottomView.backgroundColor = Color.PromoBlueColor
}
private func configurePageControl() {
self.pageControl.numberOfPages = pagesCount
self.pageControl.currentPage = 0
self.view.bringSubviewToFront(pageControl)
}
private func configureImageView(imageView: UIImageView) {
imageView.contentMode = .ScaleAspectFill
imageView.layer.shadowColor = UIColor.blackColor().CGColor
imageView.layer.shadowOpacity = 0.7
imageView.layer.shadowOffset = CGSize(width: 2, height: 2)
imageView.layer.shadowRadius = 5
}
private func configureScrollViews() {
for index in 0..<pagesCount {
// top ScrollView
frame.origin.x = self.scrollView.frame.size.width * CGFloat(index)
frame.size = self.scrollView.frame.size
self.scrollView.pagingEnabled = true
let imageWrapperView = UIView(frame: frame)
let imageView = UIImageView(frame: frame)
configureImageView(imageView)
imageWrapperView.addSubview(imageView)
imageView.translatesAutoresizingMaskIntoConstraints = false
let views = ["image": imageView]
imageWrapperView.addConstraints(NSLayoutConstraint.constraintsWithVisualFormat("H:|-40-[image]-40-|", options: [], metrics: nil, views: views))
imageWrapperView.addConstraints(NSLayoutConstraint.constraintsWithVisualFormat("V:|-40-[image]|", options: [], metrics: nil, views: views))
imageView.image = UIImage(named: "promo_\(index)")
imageView.contentMode = .ScaleAspectFit
self.scrollView.addSubview(imageWrapperView)
// bottom ScrollView
let newFrame2 = CGRect(origin: CGPoint(x: self.bottomScrollView.frame.size.width * CGFloat(index), y: 0), size: self.bottomScrollView.frame.size)
let descriptionView = PromoDescriptionView.instanceFromNib()
descriptionView.frame = newFrame2
descriptionView.titleLabel.setTextAndSizeToFit(LS("promo.title_\(index)"))
descriptionView.descriptionLabel.setTextAndSizeToFit(LS("promo.description_\(index)"))
self.bottomScrollView.pagingEnabled = true
self.bottomScrollView.addSubview(descriptionView)
}
self.scrollView.contentSize = CGSizeMake(self.scrollView.frame.size.width * CGFloat(pagesCount), self.scrollView.frame.size.height)
self.bottomScrollView.contentSize = CGSizeMake(self.bottomScrollView.frame.size.width * CGFloat(pagesCount), self.bottomScrollView.frame.size.height)
pageControl.addTarget(self, action: #selector(PromoViewController.changePage(_:)), forControlEvents: UIControlEvents.ValueChanged)
}
self.scrollView.contentSize = CGSizeMake(self.scrollView.frame.size.width * CGFloat(pagesCount), self.scrollView.frame.size.height)
self.bottomScrollView.contentSize = CGSizeMake(self.bottomScrollView.frame.size.width * CGFloat(pagesCount), self.bottomScrollView.frame.size.height)
pageControl.addTarget(self, action: #selector(PromoViewController.changePage(_:)), forControlEvents: UIControlEvents.ValueChanged)
// MARK : TO CHANGE WHILE CLICKING ON PAGE CONTROL
func changePage(sender: UIPageControl) -> () {
let xforTop = CGFloat(pageControl.currentPage) * scrollView.frame.size.width
let xforBottom = CGFloat(pageControl.currentPage) * bottomScrollView.frame.size.width
UIView.animateWithDuration(0.4, animations: {
self.scrollView.contentOffset = CGPointMake(xforTop, 0)
self.bottomScrollView.contentOffset = CGPointMake(xforBottom, 0)
})
}
override func viewDidAppear(animated: Bool) {
super.viewDidAppear(animated)
configureScrollViews()
}
override func viewDidLoad() {
super.viewDidLoad()
configureSubviews()
configurePageControl()
}
}
// MARK : TO CHANGE WHILE CLICKING ON PAGE CONTROL
func changePage(sender: UIPageControl) -> () {
let xforTop = CGFloat(pageControl.currentPage) * scrollView.frame.size.width
let xforBottom = CGFloat(pageControl.currentPage) * bottomScrollView.frame.size.width
UIView.animateWithDuration(0.4, animations: {
self.scrollView.contentOffset = CGPointMake(xforTop, 0)
self.bottomScrollView.contentOffset = CGPointMake(xforBottom, 0)
})
}
override func viewDidAppear(animated: Bool) {
super.viewDidAppear(animated)
configureScrollViews()
}
override func viewDidLoad() {
super.viewDidLoad()
configureSubviews()
configurePageControl()
}
}
// UIScrollViewDelegate
extension PromoViewController {
func scrollViewDidScroll(scrollView: UIScrollView) {
if scrollView.isEqual(self.scrollView) {
bottomScrollView.contentOffset = CGPoint(x: scrollView.contentOffset.x, y: bottomScrollView.contentOffset.y)
} else {
self.scrollView.contentOffset = CGPoint(x: bottomScrollView.contentOffset.x, y: self.scrollView.contentOffset.y)
func scrollViewDidScroll(scrollView: UIScrollView) {
if scrollView.isEqual(self.scrollView) {
bottomScrollView.contentOffset = CGPoint(x: scrollView.contentOffset.x, y: bottomScrollView.contentOffset.y)
} else {
self.scrollView.contentOffset = CGPoint(x: bottomScrollView.contentOffset.x, y: self.scrollView.contentOffset.y)
}
}
func scrollViewDidEndDecelerating(scrollView: UIScrollView) {
let pageNumber = round(scrollView.contentOffset.x / scrollView.frame.size.width)
pageControl.currentPage = Int(pageNumber)
}
}
func scrollViewDidEndDecelerating(scrollView: UIScrollView) {
let pageNumber = round(scrollView.contentOffset.x / scrollView.frame.size.width)
pageControl.currentPage = Int(pageNumber)
}
}
......@@ -26,8 +26,8 @@ class CallbackViewController: KeyboardedViewController, UIPickerViewDataSource,
@IBOutlet weak var emailField: UITextField!
@IBOutlet weak var regionField: UITextField!
private var serverItems : [ServerItem] = []
private var serverItem: ServerItem!
private var serverItems : [CallbackRegion] = []
private var serverItem: CallbackRegion!
private var serverNames: [String] = []
private var gradePicker: UIPickerView!
......@@ -54,7 +54,30 @@ class CallbackViewController: KeyboardedViewController, UIPickerViewDataSource,
phoneField.tag = 101
Facade.sharedInstance().getListServerId({ (serverItems) in
// Facade.sharedInstance().getListServerId({ (serverItems) in
//
// self.serverItems = serverItems
// self.serverItem = serverItems[0]
// self.serverNames = self.serverItems.map({$0.name ?? ""})
// self.regionField.inputView = self.gradePicker
// self.regionField.text = self.serverNames[0]
//
// let serverID : Int = Facade.serverId!
//
// for serverModel in self.serverItems {
// if Int(serverModel.id!)! == serverID {
// self.serverItem = serverModel
// self.regionField.text = serverModel.name
// }
// }
//
// }, onError: { (error) in
// print(error)
// }) {
//
// }
Facade.sharedInstance().getOfferRegions({ (serverItems) in
self.serverItems = serverItems
self.serverItem = serverItems[0]
......@@ -62,6 +85,17 @@ class CallbackViewController: KeyboardedViewController, UIPickerViewDataSource,
self.regionField.inputView = self.gradePicker
self.regionField.text = self.serverNames[0]
let serverID : Int = Facade.serverId!
print("serverID = \(serverID)")
for serverModel in self.serverItems {
if Int(serverModel.guid_server_id!)! == serverID {
self.serverItem = serverModel
self.regionField.text = serverModel.name
}
}
}, onError: { (error) in
print(error)
}) {
......
......@@ -38,17 +38,18 @@ class ServiceItemScrollViewController: UIViewController, UITableViewDataSource,
@IBOutlet weak var webViewWrapperView: UIView!
var heightForRow: [Int: CGFloat] = [Int: CGFloat]()
@IBAction func callBackConnect(sender: AnyObject) {
@IBAction func connectButton(sender: AnyObject) {
let vc = self.storyboard!.instantiateViewControllerWithIdentifier("CallbackViewController") as! CallbackViewController
vc.service_id = serviceItem?.id
vc.type = 0
vc.type = 1 // заказ услуги
self.navigationController?.pushViewController(vc, animated: true)
}
@IBAction func btnConnect(sender: AnyObject) {
@IBAction func callBackButton(sender: AnyObject) {
let vc = self.storyboard!.instantiateViewControllerWithIdentifier("CallbackViewController") as! CallbackViewController
vc.service_id = serviceItem?.id
vc.type = 1
vc.type = 0 // обратный звонок
self.navigationController?.pushViewController(vc, animated: true)
}
......
......@@ -46,7 +46,8 @@ class SettingsViewController : ViewControllerWithMenu, UITableViewDataSource, UI
func tableView(tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
switch section {
case 0:
return 3
// return 3
return 0
case 1:
return cities.count
default:
......
......@@ -10,74 +10,77 @@ import Foundation
import UIKit
class PublicWifiOrderCell: UITableViewCell {
@IBOutlet weak var firstLabel: UILabel!
@IBOutlet weak var secondLabel: UILabel!
@IBOutlet weak var button: NextButton!
var vc: PublicWifiViewController?
var wifiBaseOrder: WifiBaseOrder?
override func awakeFromNib() {
super.awakeFromNib()
removeLeftMargin()
}
@IBAction func button_touchUpInside(sender: UIButton) {
let alert = UIAlertController(title: LS(self.wifiBaseOrder!.wifiOrderType! == .offer ? "public_wifi.make_subscribe_for_wifi" : "publie_wifi.sure_to_unsubscribe"), message: nil, preferredStyle: .Alert)
alert.addAction(UIAlertAction(title: LS("cancel"), style: .Cancel, handler: nil))
alert.addAction(UIAlertAction(title: "OK", style: .Default, handler: { (alertActiom) in
var params = [
"access_token": Facade.accessToken!,
"client_id": Facade.clientId!,
"server_id": Facade.serverId!,
"abonent_id": Facade.accountId!,
"device": self.vc!.device!.device!
] as [String: AnyObject]
self.parentViewController!.processRequest(true)
switch self.wifiBaseOrder!.wifiOrderType! {
case .offer:
params["tariff_id"] = (self.wifiBaseOrder as! WifiOffer).tariffId!
Facade.sharedInstance().connectWifi(params, onSuccess: {
self.vc!.requestPublicWifi()
}, onError: { (error) in
AlertViewUtil.showIncorrectAlert(error)
}, onFinish: {
self.parentViewController!.processRequest(false)
})
break
case .order:
params["link_id"] = (self.wifiBaseOrder as! WifiOfferOrder).id!
Facade.sharedInstance().disconnectWifi(params, onSuccess: {
self.vc!.requestPublicWifi()
}, onError: { (error) in
AlertViewUtil.showIncorrectAlert(error)
}, onFinish: {
self.parentViewController!.processRequest(false)
})
break
}
}))
self.vc?.presentViewController(alert, animated: true, completion: nil)
}
func fillCell(wifiBaseOrder: WifiBaseOrder, vc: PublicWifiViewController) {
self.vc = vc
self.wifiBaseOrder = wifiBaseOrder
switch wifiBaseOrder.wifiOrderType! {
case .offer:
let wifiOffer = wifiBaseOrder as! WifiOffer
firstLabel.text = AppLocalization.language() == Language.Kazakh ? wifiOffer.offerKz : wifiOffer.offerRu
secondLabel.text = "\(wifiOffer.price!)"
break
case .order:
let wifiOfferOrder = wifiBaseOrder as! WifiOfferOrder
firstLabel.text = AppLocalization.language() == Language.Kazakh ? wifiOfferOrder.tariffKz : wifiOfferOrder.tariffRu
secondLabel.text = "\(wifiOfferOrder.information!)"
break
@IBOutlet weak var firstLabel: UILabel!
@IBOutlet weak var secondLabel: UILabel!
@IBOutlet weak var button: NextButton!
var vc: PublicWifiViewController?
var wifiBaseOrder: WifiBaseOrder?
override func awakeFromNib() {
super.awakeFromNib()
removeLeftMargin()
}
@IBAction func button_touchUpInside(sender: UIButton) {
let alert = UIAlertController(title: LS(self.wifiBaseOrder!.wifiOrderType! == .offer ? "public_wifi.make_subscribe_for_wifi" : "publie_wifi.sure_to_unsubscribe"), message: nil, preferredStyle: .Alert)
alert.addAction(UIAlertAction(title: LS("cancel"), style: .Cancel, handler: nil))
alert.addAction(UIAlertAction(title: "OK", style: .Default, handler: { (alertActiom) in
var params = [
"access_token": Facade.accessToken!,
"client_id": Facade.clientId!,
"server_id": Facade.serverId!,
"abonent_id": Facade.accountId!,
"device": self.vc!.device!.device!,
"link_id" : self.vc!.device!.linkId!
] as [String: AnyObject]
print("params = \(params)")
self.parentViewController!.processRequest(true)
switch self.wifiBaseOrder!.wifiOrderType! {
case .offer:
params["tariff_id"] = (self.wifiBaseOrder as! WifiOffer).tariffId!
Facade.sharedInstance().connectWifi(params, onSuccess: {
self.vc!.requestPublicWifi()
}, onError: { (error) in
AlertViewUtil.showIncorrectAlert(error)
}, onFinish: {
self.parentViewController!.processRequest(false)
})
break
case .order:
Facade.sharedInstance().disconnectWifi(params, onSuccess: {
self.vc!.requestPublicWifi()
}, onError: { (error) in
AlertViewUtil.showIncorrectAlert(error)
}, onFinish: {
self.parentViewController!.processRequest(false)
})
break
}
}))
self.vc?.presentViewController(alert, animated: true, completion: nil)
}
func fillCell(wifiBaseOrder: WifiBaseOrder, vc: PublicWifiViewController) {
self.vc = vc
self.wifiBaseOrder = wifiBaseOrder
switch wifiBaseOrder.wifiOrderType! {
case .offer:
let wifiOffer = wifiBaseOrder as! WifiOffer
firstLabel.text = AppLocalization.language() == Language.Kazakh ? wifiOffer.offerKz : wifiOffer.offerRu
secondLabel.text = "\(wifiOffer.price!)"
break
case .order:
let wifiOfferOrder = wifiBaseOrder as! WifiOfferOrder
firstLabel.text = AppLocalization.language() == Language.Kazakh ? wifiOfferOrder.tariffKz : wifiOfferOrder.tariffRu
secondLabel.text = "\(wifiOfferOrder.information!)"
break
}
button.setTitle(wifiBaseOrder.wifiOrderType == .offer ? LS("public_wifi.make_subscribe"): LS("public_wifi.unsubscribe"), forState: .Normal)
}
button.setTitle(wifiBaseOrder.wifiOrderType == .offer ? LS("public_wifi.make_subscribe"): LS("public_wifi.unsubscribe"), forState: .Normal)
}
}
......@@ -22,7 +22,16 @@ class FeedPackagesCell: UITableViewCell, UICollectionViewDataSource, UICollectio
collectionView.dataSource = self
requestDynamicMenu()
}
@IBAction func packagesPressed(sender: AnyObject) {
let centerViewController = navController!.storyboard!.instantiateViewControllerWithIdentifier("ServiceMainViewController")
let vc = self.navController?.parentViewController
let rootVc = vc?.parentViewController
if let pvc = rootVc as? RootVC {
pvc.presentCenterViewController(centerViewController, animated: true)
}
}
func collectionView(collectionView: UICollectionView, numberOfItemsInSection section: Int) -> Int {
return feed.count
}
......@@ -54,4 +63,3 @@ class FeedPackagesCell: UITableViewCell, UICollectionViewDataSource, UICollectio
}
}
}
......@@ -13,15 +13,28 @@ class FeedPaymentCell: UITableViewCell {
@IBOutlet weak var lastPay: UILabel!
@IBOutlet weak var balance: UILabel!
@IBOutlet weak var payButton: BlueButton!
@IBOutlet weak var refreshButton: UIImageView!
var navController : UINavigationController?
override func awakeFromNib() {
super.awakeFromNib()
NSNotificationCenter.defaultCenter().addObserver(self, selector: #selector(FeedPaymentCell.updateLabels), name: AbonentInfoManager.NotificationNames.Update, object: AbonentInfoManager.sharedInstance)
NSNotificationCenter.defaultCenter().addObserver(self, selector: #selector(FeedPaymentCell.showError(_:)), name: AbonentInfoManager.NotificationNames.Error, object: AbonentInfoManager.sharedInstance)
let tapGestureRecognizer = UITapGestureRecognizer(target: self, action: #selector(FeedPaymentCell.imageTapped(_:)))
refreshButton.userInteractionEnabled = true
refreshButton.addGestureRecognizer(tapGestureRecognizer)
}
func imageTapped(tapGestureRecognizer: UITapGestureRecognizer) {
SpinneredAlert.show(self.navController!)
AbonentInfoManager.sharedInstance.updateUserInfo()
}
func updateLabels() {
if let abonentInfo = AbonentInfoManager.sharedInstance.abonentInfo {
let currency = "\(abonentInfo.balance ?? 0)".stringByReplacingOccurrencesOfString(".", withString: ",")
......
......@@ -17,7 +17,7 @@ class CircleButton: UIView {
}
func updateCornerRadius() {
layer.cornerRadius = 60
layer.cornerRadius = 50
layer.masksToBounds = true
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment