Commit efbec3b2 by Olzhas Aldabergenov

баги зафиксены

parent a64525dd
{ {
"DVTSourceControlWorkspaceBlueprintPrimaryRemoteRepositoryKey" : "EA320F6FA9588ABC7C644742C268D060B5B8C40A", "DVTSourceControlWorkspaceBlueprintPrimaryRemoteRepositoryKey" : "5DF1EA6381DC40CE02B4EA5633CD220EAAC76936",
"DVTSourceControlWorkspaceBlueprintWorkingCopyRepositoryLocationsKey" : { "DVTSourceControlWorkspaceBlueprintWorkingCopyRepositoryLocationsKey" : {
"c7b0ae48-b0eb-11de-8bdf-3374eb5c7316" : { "c7b0ae48-b0eb-11de-8bdf-3374eb5c7316" : {
...@@ -13,6 +13,7 @@ ...@@ -13,6 +13,7 @@
"60B8A7321A1344097175D02C5081DD3E085FA24A" : 0, "60B8A7321A1344097175D02C5081DD3E085FA24A" : 0,
"79EA0C4F360E98830418AFAE1A03A39D646B0106" : 0, "79EA0C4F360E98830418AFAE1A03A39D646B0106" : 0,
"98b68a54-b8e4-d874-94f5-50d40778346d" : 0, "98b68a54-b8e4-d874-94f5-50d40778346d" : 0,
"5DF1EA6381DC40CE02B4EA5633CD220EAAC76936" : 9223372036854775807,
"B31A561B4D3E112910A9CF9566C46AB6DDBE8CDC" : 0, "B31A561B4D3E112910A9CF9566C46AB6DDBE8CDC" : 0,
"67620B5EFA902936DF04070AF595B76AB0333747" : 0, "67620B5EFA902936DF04070AF595B76AB0333747" : 0,
"CD1557C3AE966BEDF3490D85F9712687801B146C" : 0, "CD1557C3AE966BEDF3490D85F9712687801B146C" : 0,
...@@ -29,6 +30,7 @@ ...@@ -29,6 +30,7 @@
"60B8A7321A1344097175D02C5081DD3E085FA24A" : "Lottery", "60B8A7321A1344097175D02C5081DD3E085FA24A" : "Lottery",
"79EA0C4F360E98830418AFAE1A03A39D646B0106" : "Lottery\/Alamofire-SwiftyJSON", "79EA0C4F360E98830418AFAE1A03A39D646B0106" : "Lottery\/Alamofire-SwiftyJSON",
"98b68a54-b8e4-d874-94f5-50d40778346d" : "idoubs", "98b68a54-b8e4-d874-94f5-50d40778346d" : "idoubs",
"5DF1EA6381DC40CE02B4EA5633CD220EAAC76936" : "kt-ios\/",
"B31A561B4D3E112910A9CF9566C46AB6DDBE8CDC" : "kt", "B31A561B4D3E112910A9CF9566C46AB6DDBE8CDC" : "kt",
"67620B5EFA902936DF04070AF595B76AB0333747" : "library\/Alamofire", "67620B5EFA902936DF04070AF595B76AB0333747" : "library\/Alamofire",
"CD1557C3AE966BEDF3490D85F9712687801B146C" : "KT\/XCGLogger\/", "CD1557C3AE966BEDF3490D85F9712687801B146C" : "KT\/XCGLogger\/",
...@@ -59,6 +61,11 @@ ...@@ -59,6 +61,11 @@
"DVTSourceControlWorkspaceBlueprintRemoteRepositoryIdentifierKey" : "58B98633C866AD3E226120F73CA1BDB10BF3BB43" "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", "DVTSourceControlWorkspaceBlueprintRemoteRepositoryURLKey" : "bitbucket.org:metalheadkz\/lottery.git",
"DVTSourceControlWorkspaceBlueprintRemoteRepositorySystemKey" : "com.apple.dt.Xcode.sourcecontrol.Git", "DVTSourceControlWorkspaceBlueprintRemoteRepositorySystemKey" : "com.apple.dt.Xcode.sourcecontrol.Git",
"DVTSourceControlWorkspaceBlueprintRemoteRepositoryIdentifierKey" : "60B8A7321A1344097175D02C5081DD3E085FA24A" "DVTSourceControlWorkspaceBlueprintRemoteRepositoryIdentifierKey" : "60B8A7321A1344097175D02C5081DD3E085FA24A"
......
...@@ -57,84 +57,6 @@ ...@@ -57,84 +57,6 @@
shouldBeEnabled = "No" shouldBeEnabled = "No"
ignoreCount = "0" ignoreCount = "0"
continueAfterRunningActions = "No" 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&lt;__ObjC.UITextField&gt;"
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&lt;__ObjC.UITextField&gt;"
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&lt;Swift.String&gt;) -&gt; 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) -&gt; Swift.Optional&lt;telecom.BotLeftMessageCell&gt;"
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" filePath = "kt/ViewControllers/Cabinet/MainKnowedgeViewController.swift"
timestampString = "527420051.899478" timestampString = "527420051.899478"
startingColumnNumber = "9223372036854775807" startingColumnNumber = "9223372036854775807"
...@@ -225,5 +147,117 @@ ...@@ -225,5 +147,117 @@
landmarkType = "7"> landmarkType = "7">
</BreakpointContent> </BreakpointContent>
</BreakpointProxy> </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> </Breakpoints>
</Bucket> </Bucket>
...@@ -43,4 +43,26 @@ class Payment { ...@@ -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
// // }
}
} }
...@@ -20,31 +20,35 @@ class ServiceCallbackRequest { ...@@ -20,31 +20,35 @@ class ServiceCallbackRequest {
var isPhoneValid = true var isPhoneValid = true
var isBlank = false var isBlank = false
var validationMessage = "" 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) { 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.cityId = cityId
self.serviceId = serviceId self.serviceId = serviceId
self.fullName = fullName self.fullName = fullName
self.phone = phone self.phone = phone
self.email = email self.email = email
self.type = type self.type = type
self.formType = formType
self.userComment = userComment
} }
func validateFields() -> Bool { func validateFields() -> Bool {
var isValid = true var isValid = true
// if cityId == nil || serviceId == nil || fullName.isNilOrEmpty || phone.isNilOrEmpty || type == nil { // if cityId == nil || serviceId == nil || fullName.isNilOrEmpty || phone.isNilOrEmpty || type == nil {
// isValid = false // isValid = false
// validationMessage = LS("error_fill_all_fields") // validationMessage = LS("error_fill_all_fields")
// } else { // } else {
// //
// if phone?.characters.count < 10 || phone?.characters.count > 10 { // if phone?.characters.count < 10 || phone?.characters.count > 10 {
// isValid = false // isValid = false
// validationMessage = validationMessage == "" ? LS("service_callback.label.incorrect_phone") : "\(validationMessage); \(LS("service_callback.label.incorrect_phone"))" // validationMessage = validationMessage == "" ? LS("service_callback.label.incorrect_phone") : "\(validationMessage); \(LS("service_callback.label.incorrect_phone"))"
// } // }
// if let email = email where isValidEmail(email) { // if let email = email where isValidEmail(email) {
// validationMessage = validationMessage == "" ? LS("service_callback.label.incorrect_email") : "\(validationMessage); \(LS("service_callback.label.incorrect_email"))" // validationMessage = validationMessage == "" ? LS("service_callback.label.incorrect_email") : "\(validationMessage); \(LS("service_callback.label.incorrect_email"))"
// } // }
// } // }
return isValid return isValid
} }
...@@ -58,6 +62,12 @@ class ServiceCallbackRequest { ...@@ -58,6 +62,12 @@ class ServiceCallbackRequest {
if let email = email { if let email = email {
resultParams["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] return resultParams as! [String : AnyObject]
} }
......
...@@ -609,3 +609,6 @@ ...@@ -609,3 +609,6 @@
"online_payment.label.incorrect_email" = "Incorrect email"; "online_payment.label.incorrect_email" = "Incorrect email";
"online_payment.label.incorrect_guid_or_phone" = "Incorrect guid or phone number"; "online_payment.label.incorrect_guid_or_phone" = "Incorrect guid or phone number";
"online_payment.label.incorrect_payment_summ" = "Incorrect payment summ"; "online_payment.label.incorrect_payment_summ" = "Incorrect payment summ";
"callback_request" = "Заявка на обратный звонок";
"payment_last_format" = "Последний платеж: ";
...@@ -608,3 +608,6 @@ ...@@ -608,3 +608,6 @@
"online_payment.label.incorrect_email" = "Қате email"; "online_payment.label.incorrect_email" = "Қате email";
"online_payment.label.incorrect_guid_or_phone" = "Қате жеке шот немесе телефон нөмірі"; "online_payment.label.incorrect_guid_or_phone" = "Қате жеке шот немесе телефон нөмірі";
"online_payment.label.incorrect_payment_summ" = "Қате төлеу нөмірі"; "online_payment.label.incorrect_payment_summ" = "Қате төлеу нөмірі";
"callback_request" = "Заявка на обратный звонок";
"payment_last_format" = "Последний платеж: ";
...@@ -451,11 +451,11 @@ ...@@ -451,11 +451,11 @@
"login.passsword_restoration.account" = "По номеру лицевого счета"; "login.passsword_restoration.account" = "По номеру лицевого счета";
"login.passsword_restoration.phone_number" = "По номеру телефона"; "login.passsword_restoration.phone_number" = "По номеру телефона";
"login.alert.email.title" = "По адресу электронной почты"; "login.alert.email.title" = "По адресу электронной почты";
"login.alert.email.message" = "Введите адрес электронной почты, указанный при регистрации и мы отправим вам данные для пароля"; "login.alert.email.message" = "Введите адрес электронной почты, указанный при регистрации и мы отправим вам данные для восстановления пароля";
"login.alert.account.title" = "По номеру счета"; "login.alert.account.title" = "По номеру счета";
"login.alert.account.message" = "Введите ваш номер счета и мы отправим вам данные для пароля"; "login.alert.account.message" = "Введите ваш номер счета и мы отправим вам данные для пароля";
"login.alert.phone_number.title" = "По номеру телефона"; "login.alert.phone_number.title" = "По номеру телефона";
"login.alert.phone_number.message" = "Введите ваш номер телефона и мы отправим вам данные для пароля"; "login.alert.phone_number.message" = "Введите ваш абонентский номер телефона и мы отправим вам данные для восстановления пароля";
"login.alert.send" = "Отправить"; "login.alert.send" = "Отправить";
"login.action_sheet.title" = "Выберите способ восстановления доступа"; "login.action_sheet.title" = "Выберите способ восстановления доступа";
"login.label.incorrect_data" = "Вы ввели неверные данные"; "login.label.incorrect_data" = "Вы ввели неверные данные";
...@@ -463,7 +463,7 @@ ...@@ -463,7 +463,7 @@
"login.error.incorrect_login_or_password" = "Неверный логин или пароль"; "login.error.incorrect_login_or_password" = "Неверный логин или пароль";
"login.text_field.your_email.placeholder" = "Ваш e-mail"; "login.text_field.your_email.placeholder" = "Ваш e-mail";
"login.text_field.your_guid_number.placeholder" = "Номер вашего лицевого счета"; "login.text_field.your_guid_number.placeholder" = "Номер вашего лицевого счета";
"login.text_field.your_phone_number.placeholder" = "Ваш абонентский номер (без +7)"; "login.text_field.your_phone_number.placeholder" = "без +7";
// Registration // Registration
...@@ -611,3 +611,6 @@ ...@@ -611,3 +611,6 @@
"online_payment.label.incorrect_email" = "Некорректный email"; "online_payment.label.incorrect_email" = "Некорректный email";
"online_payment.label.incorrect_guid_or_phone" = "Некорректный лицевой счет или номер телефона"; "online_payment.label.incorrect_guid_or_phone" = "Некорректный лицевой счет или номер телефона";
"online_payment.label.incorrect_payment_summ" = "Некорректная сумма оплаты"; "online_payment.label.incorrect_payment_summ" = "Некорректная сумма оплаты";
"callback_request" = "Заявка на обратный звонок";
"payment_last_format" = "Последний платеж: ";
...@@ -31,6 +31,15 @@ class FeedViewController: ViewControllerWithMenu { ...@@ -31,6 +31,15 @@ class FeedViewController: ViewControllerWithMenu {
func refreshBalance() { func refreshBalance() {
SpinneredAlert.show(self) SpinneredAlert.show(self)
AbonentInfoManager.sharedInstance.updateUserInfo() AbonentInfoManager.sharedInstance.updateUserInfo()
// Facade.sharedInstance().getPaymentList({ (payments) in
// print(payments)
//
// }, onError: { (error) in
// AlertViewUtil.showIncorrectAlert(error)
// }, onFinish: { () in
// })
} }
override func viewWillAppear(animated: Bool) { override func viewWillAppear(animated: Bool) {
......
...@@ -47,7 +47,9 @@ class MainHelpViewController: ViewControllerWithMenu { ...@@ -47,7 +47,9 @@ class MainHelpViewController: ViewControllerWithMenu {
func callbackAction(sender:UITapGestureRecognizer) { func callbackAction(sender:UITapGestureRecognizer) {
let vc = self.storyboard!.instantiateViewControllerWithIdentifier("CallbackViewController") as! CallbackViewController let vc = self.storyboard!.instantiateViewControllerWithIdentifier("CallbackViewController") as! CallbackViewController
vc.service_id = 0 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) self.navigationController?.pushViewController(vc, animated: true)
} }
......
...@@ -10,7 +10,7 @@ import UIKit ...@@ -10,7 +10,7 @@ import UIKit
class CallbackViewController: KeyboardedViewController, UIPickerViewDataSource, UIPickerViewDelegate { class CallbackViewController: KeyboardedViewController, UIPickerViewDataSource, UIPickerViewDelegate {
var type: Int? var type: Int? // 1 - COLD, 2 - HOT
var region: String? var region: String?
var phone: String? var phone: String?
var name: String? var name: String?
...@@ -18,6 +18,7 @@ class CallbackViewController: KeyboardedViewController, UIPickerViewDataSource, ...@@ -18,6 +18,7 @@ class CallbackViewController: KeyboardedViewController, UIPickerViewDataSource,
var user_comment: String? var user_comment: String?
var service_id: Int? var service_id: Int?
var guid : String? var guid : String?
var formType: Int? // 7 - mobile app
weak var activeField: UITextField? weak var activeField: UITextField?
...@@ -158,7 +159,10 @@ class CallbackViewController: KeyboardedViewController, UIPickerViewDataSource, ...@@ -158,7 +159,10 @@ class CallbackViewController: KeyboardedViewController, UIPickerViewDataSource,
} }
@IBAction func sendButtonPressed(sender: AnyObject) { @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 { guard request.validateFields() else {
AlertViewUtil.showAlert(request.validationMessage); AlertViewUtil.showAlert(request.validationMessage);
return } return }
......
...@@ -42,14 +42,14 @@ class ServiceItemScrollViewController: UIViewController, UITableViewDataSource, ...@@ -42,14 +42,14 @@ class ServiceItemScrollViewController: UIViewController, UITableViewDataSource,
@IBAction func connectButton(sender: AnyObject) { @IBAction func connectButton(sender: AnyObject) {
let vc = self.storyboard!.instantiateViewControllerWithIdentifier("CallbackViewController") as! CallbackViewController let vc = self.storyboard!.instantiateViewControllerWithIdentifier("CallbackViewController") as! CallbackViewController
vc.service_id = serviceItem?.id vc.service_id = serviceItem?.id
vc.type = 1 // заказ услуги vc.type = 2 // HOT - заказ услуги
self.navigationController?.pushViewController(vc, animated: true) self.navigationController?.pushViewController(vc, animated: true)
} }
@IBAction func callBackButton(sender: AnyObject) { @IBAction func callBackButton(sender: AnyObject) {
let vc = self.storyboard!.instantiateViewControllerWithIdentifier("CallbackViewController") as! CallbackViewController let vc = self.storyboard!.instantiateViewControllerWithIdentifier("CallbackViewController") as! CallbackViewController
vc.service_id = serviceItem?.id vc.service_id = serviceItem?.id
vc.type = 0 // обратный звонок vc.type = 1 // COLD - обратный звонок
self.navigationController?.pushViewController(vc, animated: true) self.navigationController?.pushViewController(vc, animated: true)
} }
...@@ -163,7 +163,7 @@ class ServiceItemScrollViewController: UIViewController, UITableViewDataSource, ...@@ -163,7 +163,7 @@ class ServiceItemScrollViewController: UIViewController, UITableViewDataSource,
super.viewDidLoad() super.viewDidLoad()
print(self.serviceItemForLoading)
//if (serviceItem != nil) { //if (serviceItem != nil) {
//} //}
......
...@@ -84,6 +84,8 @@ class ServiceListController: UIViewController, UITableViewDataSource, UITableVie ...@@ -84,6 +84,8 @@ class ServiceListController: UIViewController, UITableViewDataSource, UITableVie
} }
updateServicesList() updateServicesList()
self.servicesTableView.reloadData() self.servicesTableView.reloadData()
} else {
self.navigationController?.popViewControllerAnimated(true)
} }
} }
......
...@@ -86,7 +86,10 @@ class ServiceTariffController: UIViewController, UITableViewDataSource, UITableV ...@@ -86,7 +86,10 @@ class ServiceTariffController: UIViewController, UITableViewDataSource, UITableV
func connectButton_TouchUpInside(sender: AnyObject) { func connectButton_TouchUpInside(sender: AnyObject) {
let vc = self.storyboard!.instantiateViewControllerWithIdentifier("CallbackViewController") as! CallbackViewController let vc = self.storyboard!.instantiateViewControllerWithIdentifier("CallbackViewController") as! CallbackViewController
vc.service_id = serviceItem?.id 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) self.navigationController?.pushViewController(vc, animated: true)
} }
......
...@@ -17,6 +17,16 @@ class FeedPaymentCell: UITableViewCell { ...@@ -17,6 +17,16 @@ class FeedPaymentCell: UITableViewCell {
var navController : UINavigationController? 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() { override func awakeFromNib() {
super.awakeFromNib() super.awakeFromNib()
...@@ -33,6 +43,17 @@ class FeedPaymentCell: UITableViewCell { ...@@ -33,6 +43,17 @@ class FeedPaymentCell: UITableViewCell {
func imageTapped(tapGestureRecognizer: UITapGestureRecognizer) { func imageTapped(tapGestureRecognizer: UITapGestureRecognizer) {
SpinneredAlert.show(self.navController!) SpinneredAlert.show(self.navController!)
AbonentInfoManager.sharedInstance.updateUserInfo() 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() { func updateLabels() {
...@@ -40,6 +61,7 @@ class FeedPaymentCell: UITableViewCell { ...@@ -40,6 +61,7 @@ class FeedPaymentCell: UITableViewCell {
let currency = "\(abonentInfo.balance ?? 0)".stringByReplacingOccurrencesOfString(".", withString: ",") let currency = "\(abonentInfo.balance ?? 0)".stringByReplacingOccurrencesOfString(".", withString: ",")
balance.text = "\(currency) тг." balance.text = "\(currency) тг."
} }
requestLastPayment()
} }
func showError(notification: NSNotification) { func showError(notification: NSNotification) {
......
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