Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
K
kt-ios
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Виктор
kt-ios
Commits
efbec3b2
Commit
efbec3b2
authored
Oct 18, 2017
by
Olzhas Aldabergenov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
баги зафиксены
parent
a64525dd
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
17 changed files
with
263 additions
and
139 deletions
+263
-139
kt.xcscmblueprint
...deproj/project.xcworkspace/xcshareddata/kt.xcscmblueprint
+8
-1
UserInterfaceState.xcuserstate
...cuserdata/neox.xcuserdatad/UserInterfaceState.xcuserstate
+0
-0
UserInterfaceState.xcuserstate
...cuserdata/neox.xcuserdatad/UserInterfaceState.xcuserstate
+0
-0
Breakpoints_v2.xcbkptlist
...ata/neox.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist
+112
-78
Payment.swift
kt/Models/reports/Payment.swift
+22
-0
ServiceCallbackRequest.swift
kt/Models/requestModels/ServiceCallbackRequest.swift
+60
-50
Main.storyboard
kt/Resources/Base.lproj/Main.storyboard
+0
-0
Localization.strings
kt/Resources/en.lproj/Localization.strings
+3
-0
Localization.strings
kt/Resources/kk.lproj/Localization.strings
+3
-0
Localization.strings
kt/Resources/ru.lproj/Localization.strings
+6
-3
FeedViewController.swift
kt/ViewControllers/Cabinet/FeedViewController.swift
+9
-0
MainHelpViewController.swift
kt/ViewControllers/Cabinet/MainHelpViewController.swift
+3
-1
CallbackViewController.swift
kt/ViewControllers/Service/CallbackViewController.swift
+6
-2
ServiceItemScrollViewController.swift
...Controllers/Service/ServiceItemScrollViewController.swift
+3
-3
ServiceListController.swift
kt/ViewControllers/Service/ServiceListController.swift
+2
-0
ServiceTariffController.swift
kt/ViewControllers/Service/ServiceTariffController.swift
+4
-1
FeedPaymentCell.swift
kt/Views/FeedPaymentCell.swift
+22
-0
No files found.
kt.xcodeproj/project.xcworkspace/xcshareddata/kt.xcscmblueprint
View file @
efbec3b2
{
"DVTSourceControlWorkspaceBlueprintPrimaryRemoteRepositoryKey" : "
EA320F6FA9588ABC7C644742C268D060B5B8C40A
",
"DVTSourceControlWorkspaceBlueprintPrimaryRemoteRepositoryKey" : "
5DF1EA6381DC40CE02B4EA5633CD220EAAC76936
",
"DVTSourceControlWorkspaceBlueprintWorkingCopyRepositoryLocationsKey" : {
"c7b0ae48-b0eb-11de-8bdf-3374eb5c7316" : {
...
...
@@ -13,6 +13,7 @@
"60B8A7321A1344097175D02C5081DD3E085FA24A" : 0,
"79EA0C4F360E98830418AFAE1A03A39D646B0106" : 0,
"98b68a54-b8e4-d874-94f5-50d40778346d" : 0,
"5DF1EA6381DC40CE02B4EA5633CD220EAAC76936" : 9223372036854775807,
"B31A561B4D3E112910A9CF9566C46AB6DDBE8CDC" : 0,
"67620B5EFA902936DF04070AF595B76AB0333747" : 0,
"CD1557C3AE966BEDF3490D85F9712687801B146C" : 0,
...
...
@@ -29,6 +30,7 @@
"60B8A7321A1344097175D02C5081DD3E085FA24A" : "Lottery",
"79EA0C4F360E98830418AFAE1A03A39D646B0106" : "Lottery\/Alamofire-SwiftyJSON",
"98b68a54-b8e4-d874-94f5-50d40778346d" : "idoubs",
"5DF1EA6381DC40CE02B4EA5633CD220EAAC76936" : "kt-ios\/",
"B31A561B4D3E112910A9CF9566C46AB6DDBE8CDC" : "kt",
"67620B5EFA902936DF04070AF595B76AB0333747" : "library\/Alamofire",
"CD1557C3AE966BEDF3490D85F9712687801B146C" : "KT\/XCGLogger\/",
...
...
@@ -59,6 +61,11 @@
"DVTSourceControlWorkspaceBlueprintRemoteRepositoryIdentifierKey" : "58B98633C866AD3E226120F73CA1BDB10BF3BB43"
},
{
"DVTSourceControlWorkspaceBlueprintRemoteRepositoryURLKey" : "http:\/\/gitlab.arta.kz\/neox\/kt-ios.git",
"DVTSourceControlWorkspaceBlueprintRemoteRepositorySystemKey" : "com.apple.dt.Xcode.sourcecontrol.Git",
"DVTSourceControlWorkspaceBlueprintRemoteRepositoryIdentifierKey" : "5DF1EA6381DC40CE02B4EA5633CD220EAAC76936"
},
{
"DVTSourceControlWorkspaceBlueprintRemoteRepositoryURLKey" : "bitbucket.org:metalheadkz\/lottery.git",
"DVTSourceControlWorkspaceBlueprintRemoteRepositorySystemKey" : "com.apple.dt.Xcode.sourcecontrol.Git",
"DVTSourceControlWorkspaceBlueprintRemoteRepositoryIdentifierKey" : "60B8A7321A1344097175D02C5081DD3E085FA24A"
...
...
kt.xcodeproj/project.xcworkspace/xcuserdata/neox.xcuserdatad/UserInterfaceState.xcuserstate
0 → 100644
View file @
efbec3b2
File added
kt.xcworkspace/xcuserdata/neox.xcuserdatad/UserInterfaceState.xcuserstate
View file @
efbec3b2
No preview for this file type
kt.xcworkspace/xcuserdata/neox.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist
View file @
efbec3b2
...
...
@@ -57,84 +57,6 @@
shouldBeEnabled =
"No"
ignoreCount =
"0"
continueAfterRunningActions =
"No"
filePath =
"kt/ViewControllers/BotLeftMessageCell.swift"
timestampString =
"522067560.634483"
startingColumnNumber =
"9223372036854775807"
endingColumnNumber =
"9223372036854775807"
startingLineNumber =
"17"
endingLineNumber =
"17"
landmarkName =
"BotLeftMessageCell"
landmarkType =
"3"
>
<Locations>
<Location
shouldBeEnabled =
"No"
ignoreCount =
"0"
continueAfterRunningActions =
"No"
symbolName =
"telecom.BotLeftMessageCell.(phoneTextField in _63D593197C4535C43D99F9AF6E208A1C).getter : Swift.ImplicitlyUnwrappedOptional<__ObjC.UITextField>"
moduleName =
"telecom"
usesParentBreakpointCondition =
"Yes"
urlString =
"file:///Users/neox/Documents/%20telecom_old/kt/ViewControllers/BotLeftMessageCell.swift"
timestampString =
"522070506.521305"
startingColumnNumber =
"9223372036854775807"
endingColumnNumber =
"9223372036854775807"
startingLineNumber =
"17"
endingLineNumber =
"17"
offsetFromSymbolStart =
"35"
>
</Location>
<Location
shouldBeEnabled =
"No"
ignoreCount =
"0"
continueAfterRunningActions =
"No"
symbolName =
"telecom.BotLeftMessageCell.(phoneTextField in _63D593197C4535C43D99F9AF6E208A1C).setter : Swift.ImplicitlyUnwrappedOptional<__ObjC.UITextField>"
moduleName =
"telecom"
usesParentBreakpointCondition =
"Yes"
urlString =
"file:///Users/neox/Documents/%20telecom_old/kt/ViewControllers/BotLeftMessageCell.swift"
timestampString =
"522070506.52557"
startingColumnNumber =
"9223372036854775807"
endingColumnNumber =
"9223372036854775807"
startingLineNumber =
"17"
endingLineNumber =
"17"
offsetFromSymbolStart =
"65"
>
</Location>
<Location
shouldBeEnabled =
"No"
ignoreCount =
"0"
continueAfterRunningActions =
"No"
symbolName =
"telecom.BotLeftMessageCell.init (style : __C.UITableViewCellStyle, reuseIdentifier : Swift.Optional<Swift.String>) -> telecom.BotLeftMessageCell"
moduleName =
"telecom"
usesParentBreakpointCondition =
"Yes"
urlString =
"file:///Users/neox/Documents/%20telecom_old/kt/ViewControllers/BotLeftMessageCell.swift"
timestampString =
"522070506.527788"
startingColumnNumber =
"9223372036854775807"
endingColumnNumber =
"9223372036854775807"
startingLineNumber =
"17"
endingLineNumber =
"17"
offsetFromSymbolStart =
"255"
>
</Location>
<Location
shouldBeEnabled =
"No"
ignoreCount =
"0"
continueAfterRunningActions =
"No"
symbolName =
"telecom.BotLeftMessageCell.init (coder : __ObjC.NSCoder) -> Swift.Optional<telecom.BotLeftMessageCell>"
moduleName =
"telecom"
usesParentBreakpointCondition =
"Yes"
urlString =
"file:///Users/neox/Documents/%20telecom_old/kt/ViewControllers/BotLeftMessageCell.swift"
timestampString =
"522070506.530012"
startingColumnNumber =
"9223372036854775807"
endingColumnNumber =
"9223372036854775807"
startingLineNumber =
"17"
endingLineNumber =
"17"
offsetFromSymbolStart =
"165"
>
</Location>
</Locations>
</BreakpointContent>
</BreakpointProxy>
<BreakpointProxy
BreakpointExtensionID =
"Xcode.Breakpoint.FileBreakpoint"
>
<BreakpointContent
shouldBeEnabled =
"No"
ignoreCount =
"0"
continueAfterRunningActions =
"No"
filePath =
"kt/ViewControllers/Cabinet/MainKnowedgeViewController.swift"
timestampString =
"527420051.899478"
startingColumnNumber =
"9223372036854775807"
...
...
@@ -225,5 +147,117 @@
landmarkType =
"7"
>
</BreakpointContent>
</BreakpointProxy>
<BreakpointProxy
BreakpointExtensionID =
"Xcode.Breakpoint.FileBreakpoint"
>
<BreakpointContent
shouldBeEnabled =
"Yes"
ignoreCount =
"0"
continueAfterRunningActions =
"No"
filePath =
"kt/Categories/UIViewController+AddBackButton.swift"
timestampString =
"529824258.801666"
startingColumnNumber =
"9223372036854775807"
endingColumnNumber =
"9223372036854775807"
startingLineNumber =
"45"
endingLineNumber =
"45"
landmarkName =
"backFromModal()"
landmarkType =
"7"
>
</BreakpointContent>
</BreakpointProxy>
<BreakpointProxy
BreakpointExtensionID =
"Xcode.Breakpoint.FileBreakpoint"
>
<BreakpointContent
shouldBeEnabled =
"Yes"
ignoreCount =
"0"
continueAfterRunningActions =
"No"
filePath =
"kt/Categories/UIViewController+AddBackButton.swift"
timestampString =
"529824259.667812"
startingColumnNumber =
"9223372036854775807"
endingColumnNumber =
"9223372036854775807"
startingLineNumber =
"50"
endingLineNumber =
"50"
landmarkName =
"back()"
landmarkType =
"7"
>
</BreakpointContent>
</BreakpointProxy>
<BreakpointProxy
BreakpointExtensionID =
"Xcode.Breakpoint.FileBreakpoint"
>
<BreakpointContent
shouldBeEnabled =
"Yes"
ignoreCount =
"0"
continueAfterRunningActions =
"No"
filePath =
"kt/ViewControllers/Service/CallbackViewController.swift"
timestampString =
"529839831.534665"
startingColumnNumber =
"9223372036854775807"
endingColumnNumber =
"9223372036854775807"
startingLineNumber =
"166"
endingLineNumber =
"166"
landmarkName =
"sendButtonPressed(sender:)"
landmarkType =
"7"
>
</BreakpointContent>
</BreakpointProxy>
<BreakpointProxy
BreakpointExtensionID =
"Xcode.Breakpoint.FileBreakpoint"
>
<BreakpointContent
shouldBeEnabled =
"Yes"
ignoreCount =
"0"
continueAfterRunningActions =
"No"
filePath =
"kt/ViewControllers/Service/ServiceTariffController.swift"
timestampString =
"529908968.759975"
startingColumnNumber =
"9223372036854775807"
endingColumnNumber =
"9223372036854775807"
startingLineNumber =
"92"
endingLineNumber =
"92"
landmarkName =
"connectButton_TouchUpInside(sender:)"
landmarkType =
"7"
>
</BreakpointContent>
</BreakpointProxy>
<BreakpointProxy
BreakpointExtensionID =
"Xcode.Breakpoint.FileBreakpoint"
>
<BreakpointContent
shouldBeEnabled =
"Yes"
ignoreCount =
"0"
continueAfterRunningActions =
"No"
filePath =
"kt/ViewControllers/Service/ServiceTariffController.swift"
timestampString =
"529908968.759975"
startingColumnNumber =
"9223372036854775807"
endingColumnNumber =
"9223372036854775807"
startingLineNumber =
"101"
endingLineNumber =
"101"
landmarkName =
"prepareForSegue(segue:sender:)"
landmarkType =
"7"
>
</BreakpointContent>
</BreakpointProxy>
<BreakpointProxy
BreakpointExtensionID =
"Xcode.Breakpoint.FileBreakpoint"
>
<BreakpointContent
shouldBeEnabled =
"Yes"
ignoreCount =
"0"
continueAfterRunningActions =
"No"
filePath =
"kt/ViewControllers/Service/ServiceItemScrollViewController.swift"
timestampString =
"529906649.214457"
startingColumnNumber =
"9223372036854775807"
endingColumnNumber =
"9223372036854775807"
startingLineNumber =
"272"
endingLineNumber =
"272"
landmarkName =
"prepareForSegue(segue:sender:)"
landmarkType =
"7"
>
</BreakpointContent>
</BreakpointProxy>
<BreakpointProxy
BreakpointExtensionID =
"Xcode.Breakpoint.FileBreakpoint"
>
<BreakpointContent
shouldBeEnabled =
"Yes"
ignoreCount =
"0"
continueAfterRunningActions =
"No"
filePath =
"kt/ViewControllers/Service/ServiceItemScrollViewController.swift"
timestampString =
"529906650.745449"
startingColumnNumber =
"9223372036854775807"
endingColumnNumber =
"9223372036854775807"
startingLineNumber =
"275"
endingLineNumber =
"275"
landmarkName =
"prepareForSegue(segue:sender:)"
landmarkType =
"7"
>
</BreakpointContent>
</BreakpointProxy>
</Breakpoints>
</Bucket>
kt/Models/reports/Payment.swift
View file @
efbec3b2
...
...
@@ -43,4 +43,26 @@ class Payment {
// }
}
func
yyyyMMdd
()
->
String
?
{
guard
let
systemDate
=
systemDate
else
{
return
nil
}
let
dateFormatterGet
=
NSDateFormatter
()
dateFormatterGet
.
dateFormat
=
"yyyy-MM-dd"
return
dateFormatterGet
.
stringFromDate
(
self
.
systemDate
!
)
// let components = systemDate.getComponents()
// let year = components.year
// let month = components.month
// let dateFormatter = NSDateFormatter()
// dateFormatter.locale = AppLocalization.language().locale
// // if #available(iOS 9.0, *) {
// return "\(dateFormatter.standaloneMonthSymbols[month - 1].localizedCapitalizedString) \(year)"
// // } else {
// // Fallback on earlier versions
// // }
}
}
kt/Models/requestModels/ServiceCallbackRequest.swift
View file @
efbec3b2
...
...
@@ -10,55 +10,65 @@ import Foundation
class
ServiceCallbackRequest
{
var
cityId
:
String
?
var
serviceId
:
Int
?
var
fullName
:
String
?
var
phone
:
String
?
var
email
:
String
?
var
type
:
Int
?
var
isEmailValid
=
true
var
isPhoneValid
=
true
var
isBlank
=
false
var
validationMessage
=
""
init
(
cityId
:
String
?
=
nil
,
serviceId
:
Int
?
=
nil
,
fullName
:
String
?
=
nil
,
phone
:
String
?
=
nil
,
email
:
String
?
=
nil
,
type
:
Int
?
=
nil
)
{
self
.
cityId
=
cityId
self
.
serviceId
=
serviceId
self
.
fullName
=
fullName
self
.
phone
=
phone
self
.
email
=
email
self
.
type
=
type
}
func
validateFields
()
->
Bool
{
var
isValid
=
true
// if cityId == nil || serviceId == nil || fullName.isNilOrEmpty || phone.isNilOrEmpty || type == nil {
// isValid = false
// validationMessage = LS("error_fill_all_fields")
// } else {
//
// if phone?.characters.count < 10 || phone?.characters.count > 10 {
// isValid = false
// validationMessage = validationMessage == "" ? LS("service_callback.label.incorrect_phone") : "\(validationMessage); \(LS("service_callback.label.incorrect_phone"))"
// }
// if let email = email where isValidEmail(email) {
// validationMessage = validationMessage == "" ? LS("service_callback.label.incorrect_email") : "\(validationMessage); \(LS("service_callback.label.incorrect_email"))"
// }
// }
return
isValid
}
var
params
:
[
String
:
AnyObject
]
{
var
resultParams
:
[
String
:
AnyObject
]
=
[
"region"
:
cityId
!
,
"region_type"
:
"city"
,
"service_id"
:
serviceId
!
,
"name"
:
fullName
!
,
"phone"
:
phone
!
,
"type"
:
type
!
]
if
let
email
=
email
{
resultParams
[
"email"
]
=
email
var
cityId
:
String
?
var
serviceId
:
Int
?
var
fullName
:
String
?
var
phone
:
String
?
var
email
:
String
?
var
type
:
Int
?
var
isEmailValid
=
true
var
isPhoneValid
=
true
var
isBlank
=
false
var
validationMessage
=
""
var
formType
:
Int
?
var
userComment
:
String
?
init
(
cityId
:
String
?
=
nil
,
serviceId
:
Int
?
=
nil
,
fullName
:
String
?
=
nil
,
phone
:
String
?
=
nil
,
email
:
String
?
=
nil
,
type
:
Int
?
=
nil
,
formType
:
Int
?
=
nil
,
userComment
:
String
?
=
nil
)
{
self
.
cityId
=
cityId
self
.
serviceId
=
serviceId
self
.
fullName
=
fullName
self
.
phone
=
phone
self
.
email
=
email
self
.
type
=
type
self
.
formType
=
formType
self
.
userComment
=
userComment
}
func
validateFields
()
->
Bool
{
var
isValid
=
true
// if cityId == nil || serviceId == nil || fullName.isNilOrEmpty || phone.isNilOrEmpty || type == nil {
// isValid = false
// validationMessage = LS("error_fill_all_fields")
// } else {
//
// if phone?.characters.count < 10 || phone?.characters.count > 10 {
// isValid = false
// validationMessage = validationMessage == "" ? LS("service_callback.label.incorrect_phone") : "\(validationMessage); \(LS("service_callback.label.incorrect_phone"))"
// }
// if let email = email where isValidEmail(email) {
// validationMessage = validationMessage == "" ? LS("service_callback.label.incorrect_email") : "\(validationMessage); \(LS("service_callback.label.incorrect_email"))"
// }
// }
return
isValid
}
return
resultParams
as!
[
String
:
AnyObject
]
}
var
params
:
[
String
:
AnyObject
]
{
var
resultParams
:
[
String
:
AnyObject
]
=
[
"region"
:
cityId
!
,
"region_type"
:
"city"
,
"service_id"
:
serviceId
!
,
"name"
:
fullName
!
,
"phone"
:
phone
!
,
"type"
:
type
!
]
if
let
email
=
email
{
resultParams
[
"email"
]
=
email
}
if
let
formType
=
formType
{
resultParams
[
"form_type"
]
=
formType
}
if
let
userComment
=
userComment
{
resultParams
[
"user_comment"
]
=
userComment
}
return
resultParams
as!
[
String
:
AnyObject
]
}
}
kt/Resources/Base.lproj/Main.storyboard
View file @
efbec3b2
This diff is collapsed.
Click to expand it.
kt/Resources/en.lproj/Localization.strings
View file @
efbec3b2
...
...
@@ -609,3 +609,6 @@
"online_payment.label.incorrect_email" = "Incorrect email";
"online_payment.label.incorrect_guid_or_phone" = "Incorrect guid or phone number";
"online_payment.label.incorrect_payment_summ" = "Incorrect payment summ";
"callback_request" = "Заявка на обратный звонок";
"payment_last_format" = "Последний платеж: ";
kt/Resources/kk.lproj/Localization.strings
View file @
efbec3b2
...
...
@@ -608,3 +608,6 @@
"online_payment.label.incorrect_email" = "Қате email";
"online_payment.label.incorrect_guid_or_phone" = "Қате жеке шот немесе телефон нөмірі";
"online_payment.label.incorrect_payment_summ" = "Қате төлеу нөмірі";
"callback_request" = "Заявка на обратный звонок";
"payment_last_format" = "Последний платеж: ";
kt/Resources/ru.lproj/Localization.strings
View file @
efbec3b2
...
...
@@ -451,11 +451,11 @@
"login.passsword_restoration.account" = "По номеру лицевого счета";
"login.passsword_restoration.phone_number" = "По номеру телефона";
"login.alert.email.title" = "По адресу электронной почты";
"login.alert.email.message" = "Введите адрес электронной почты, указанный при регистрации и мы отправим вам данные для пароля";
"login.alert.email.message" = "Введите адрес электронной почты, указанный при регистрации и мы отправим вам данные для
восстановления
пароля";
"login.alert.account.title" = "По номеру счета";
"login.alert.account.message" = "Введите ваш номер счета и мы отправим вам данные для пароля";
"login.alert.phone_number.title" = "По номеру телефона";
"login.alert.phone_number.message" = "Введите ваш
номер телефона и мы отправим вам данные дл
я пароля";
"login.alert.phone_number.message" = "Введите ваш
абонентский номер телефона и мы отправим вам данные для восстановлени
я пароля";
"login.alert.send" = "Отправить";
"login.action_sheet.title" = "Выберите способ восстановления доступа";
"login.label.incorrect_data" = "Вы ввели неверные данные";
...
...
@@ -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" = "
Ваш абонентский номер (без +7)
";
"login.text_field.your_phone_number.placeholder" = "
без +7
";
// Registration
...
...
@@ -611,3 +611,6 @@
"online_payment.label.incorrect_email" = "Некорректный email";
"online_payment.label.incorrect_guid_or_phone" = "Некорректный лицевой счет или номер телефона";
"online_payment.label.incorrect_payment_summ" = "Некорректная сумма оплаты";
"callback_request" = "Заявка на обратный звонок";
"payment_last_format" = "Последний платеж: ";
kt/ViewControllers/Cabinet/FeedViewController.swift
View file @
efbec3b2
...
...
@@ -31,6 +31,15 @@ class FeedViewController: ViewControllerWithMenu {
func
refreshBalance
()
{
SpinneredAlert
.
show
(
self
)
AbonentInfoManager
.
sharedInstance
.
updateUserInfo
()
// Facade.sharedInstance().getPaymentList({ (payments) in
// print(payments)
//
// }, onError: { (error) in
// AlertViewUtil.showIncorrectAlert(error)
// }, onFinish: { () in
// })
}
override
func
viewWillAppear
(
animated
:
Bool
)
{
...
...
kt/ViewControllers/Cabinet/MainHelpViewController.swift
View file @
efbec3b2
...
...
@@ -47,7 +47,9 @@ class MainHelpViewController: ViewControllerWithMenu {
func
callbackAction
(
sender
:
UITapGestureRecognizer
)
{
let
vc
=
self
.
storyboard
!.
instantiateViewControllerWithIdentifier
(
"CallbackViewController"
)
as!
CallbackViewController
vc
.
service_id
=
0
vc
.
type
=
0
vc
.
type
=
1
// COLD
vc
.
formType
=
7
// mobile app
vc
.
user_comment
=
LocalizedString
(
"callback_request"
,
description
:
"Заявка на обратный звонок"
)
self
.
navigationController
?
.
pushViewController
(
vc
,
animated
:
true
)
}
...
...
kt/ViewControllers/Service/CallbackViewController.swift
View file @
efbec3b2
...
...
@@ -10,7 +10,7 @@ import UIKit
class
CallbackViewController
:
KeyboardedViewController
,
UIPickerViewDataSource
,
UIPickerViewDelegate
{
var
type
:
Int
?
var
type
:
Int
?
// 1 - COLD, 2 - HOT
var
region
:
String
?
var
phone
:
String
?
var
name
:
String
?
...
...
@@ -18,6 +18,7 @@ class CallbackViewController: KeyboardedViewController, UIPickerViewDataSource,
var
user_comment
:
String
?
var
service_id
:
Int
?
var
guid
:
String
?
var
formType
:
Int
?
// 7 - mobile app
weak
var
activeField
:
UITextField
?
...
...
@@ -158,7 +159,10 @@ class CallbackViewController: KeyboardedViewController, UIPickerViewDataSource,
}
@IBAction
func
sendButtonPressed
(
sender
:
AnyObject
)
{
let
request
=
ServiceCallbackRequest
(
cityId
:
self
.
serverItem
.
id
,
serviceId
:
service_id
,
fullName
:
filoField
.
text
,
phone
:
phoneField
.
text
,
email
:
emailField
.
text
,
type
:
type
)
let
request
=
ServiceCallbackRequest
(
cityId
:
self
.
serverItem
.
id
,
serviceId
:
service_id
,
fullName
:
filoField
.
text
,
phone
:
phoneField
.
text
,
email
:
emailField
.
text
,
type
:
type
,
formType
:
formType
,
userComment
:
user_comment
)
print
(
request
.
params
)
//return;
guard
request
.
validateFields
()
else
{
AlertViewUtil
.
showAlert
(
request
.
validationMessage
);
return
}
...
...
kt/ViewControllers/Service/ServiceItemScrollViewController.swift
View file @
efbec3b2
...
...
@@ -42,14 +42,14 @@ class ServiceItemScrollViewController: UIViewController, UITableViewDataSource,
@IBAction
func
connectButton
(
sender
:
AnyObject
)
{
let
vc
=
self
.
storyboard
!.
instantiateViewControllerWithIdentifier
(
"CallbackViewController"
)
as!
CallbackViewController
vc
.
service_id
=
serviceItem
?
.
id
vc
.
type
=
1
//
заказ услуги
vc
.
type
=
2
// HOT -
заказ услуги
self
.
navigationController
?
.
pushViewController
(
vc
,
animated
:
true
)
}
@IBAction
func
callBackButton
(
sender
:
AnyObject
)
{
let
vc
=
self
.
storyboard
!.
instantiateViewControllerWithIdentifier
(
"CallbackViewController"
)
as!
CallbackViewController
vc
.
service_id
=
serviceItem
?
.
id
vc
.
type
=
0
//
обратный звонок
vc
.
type
=
1
// COLD -
обратный звонок
self
.
navigationController
?
.
pushViewController
(
vc
,
animated
:
true
)
}
...
...
@@ -163,7 +163,7 @@ class ServiceItemScrollViewController: UIViewController, UITableViewDataSource,
super
.
viewDidLoad
()
print
(
self
.
serviceItemForLoading
)
//if (serviceItem != nil) {
//}
...
...
kt/ViewControllers/Service/ServiceListController.swift
View file @
efbec3b2
...
...
@@ -84,6 +84,8 @@ class ServiceListController: UIViewController, UITableViewDataSource, UITableVie
}
updateServicesList
()
self
.
servicesTableView
.
reloadData
()
}
else
{
self
.
navigationController
?
.
popViewControllerAnimated
(
true
)
}
}
...
...
kt/ViewControllers/Service/ServiceTariffController.swift
View file @
efbec3b2
...
...
@@ -86,7 +86,10 @@ class ServiceTariffController: UIViewController, UITableViewDataSource, UITableV
func
connectButton_TouchUpInside
(
sender
:
AnyObject
)
{
let
vc
=
self
.
storyboard
!.
instantiateViewControllerWithIdentifier
(
"CallbackViewController"
)
as!
CallbackViewController
vc
.
service_id
=
serviceItem
?
.
id
vc
.
type
=
1
vc
.
type
=
2
// HOT
print
(
serviceItem
?
.
name
)
print
(
rate
?
.
name
)
vc
.
user_comment
=
rate
?
.
name
// serviceItem?.name
self
.
navigationController
?
.
pushViewController
(
vc
,
animated
:
true
)
}
...
...
kt/Views/FeedPaymentCell.swift
View file @
efbec3b2
...
...
@@ -17,6 +17,16 @@ class FeedPaymentCell: UITableViewCell {
var
navController
:
UINavigationController
?
var
payments
:
[[
AnyObject
]]
=
[]
var
currentPaymentIndex
:
Int
?
{
didSet
{
if
let
currentPaymentIndex
=
currentPaymentIndex
{
let
firstPayment
=
(
payments
[
currentPaymentIndex
][
1
]
as!
[
Payment
])
.
first
!
lastPay
.
text
=
LocalizedString
(
"payment_last_format"
,
description
:
"Последний платеж: "
)
+
firstPayment
.
yyyyMMdd
()
!
}
}
}
override
func
awakeFromNib
()
{
super
.
awakeFromNib
()
...
...
@@ -33,13 +43,25 @@ class FeedPaymentCell: UITableViewCell {
func
imageTapped
(
tapGestureRecognizer
:
UITapGestureRecognizer
)
{
SpinneredAlert
.
show
(
self
.
navController
!
)
AbonentInfoManager
.
sharedInstance
.
updateUserInfo
()
requestLastPayment
()
}
func
requestLastPayment
()
{
Facade
.
sharedInstance
()
.
getPaymentList
({
(
payments
)
in
self
.
payments
=
payments
self
.
currentPaymentIndex
=
payments
.
count
>
0
?
payments
.
count
-
1
:
nil
},
onError
:
{
(
error
)
in
AlertViewUtil
.
showIncorrectAlert
(
error
)
},
onFinish
:
{
()
in
})
}
func
updateLabels
()
{
if
let
abonentInfo
=
AbonentInfoManager
.
sharedInstance
.
abonentInfo
{
let
currency
=
"
\(
abonentInfo
.
balance
??
0
)
"
.
stringByReplacingOccurrencesOfString
(
"."
,
withString
:
","
)
balance
.
text
=
"
\(
currency
)
тг."
}
requestLastPayment
()
}
func
showError
(
notification
:
NSNotification
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment