Commit 1a3bb3d0 by Anand.suthar

Fix issues

parent fd0d4f4f
......@@ -2061,7 +2061,7 @@
EC04CD312052CC0100B425BB = {
CreatedOnToolsVersion = 9.2;
LastSwiftMigration = 0920;
ProvisioningStyle = Manual;
ProvisioningStyle = Automatic;
SystemCapabilities = {
com.apple.Push = {
enabled = 1;
......@@ -2834,11 +2834,11 @@
CLANG_ENABLE_MODULES = YES;
CODE_SIGN_ENTITLEMENTS = Bhagyashree/Bhagyashree.entitlements;
CODE_SIGN_IDENTITY = "iPhone Developer";
CODE_SIGN_STYLE = Manual;
DEVELOPMENT_TEAM = "";
CODE_SIGN_STYLE = Automatic;
DEVELOPMENT_TEAM = WC72QNYT4F;
INFOPLIST_FILE = Bhagyashree/Info.plist;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = "com.gdi.yuanzhongsiu-seller";
PRODUCT_BUNDLE_IDENTIFIER = "com.gdi.yuanzhongsiu-seller-dev2";
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE = "";
PROVISIONING_PROFILE_SPECIFIER = "";
......@@ -2858,11 +2858,11 @@
CLANG_ENABLE_MODULES = YES;
CODE_SIGN_ENTITLEMENTS = Bhagyashree/Bhagyashree.entitlements;
CODE_SIGN_IDENTITY = "iPhone Developer";
CODE_SIGN_STYLE = Manual;
DEVELOPMENT_TEAM = "";
CODE_SIGN_STYLE = Automatic;
DEVELOPMENT_TEAM = WC72QNYT4F;
INFOPLIST_FILE = Bhagyashree/Info.plist;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = "com.gdi.yuanzhongsiu-seller";
PRODUCT_BUNDLE_IDENTIFIER = "com.gdi.yuanzhongsiu-seller-dev2";
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE = "";
PROVISIONING_PROFILE_SPECIFIER = "";
......
......@@ -83,5 +83,85 @@
landmarkType = "7">
</BreakpointContent>
</BreakpointProxy>
<BreakpointProxy
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
<BreakpointContent
shouldBeEnabled = "Yes"
ignoreCount = "0"
continueAfterRunningActions = "No"
filePath = "Bhagyashree/Sunarc/Model/Appointment/AppointmentExt.swift"
timestampString = "557220733.8655649"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "25"
endingLineNumber = "25"
landmarkName = "unknown"
landmarkType = "0">
</BreakpointContent>
</BreakpointProxy>
<BreakpointProxy
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
<BreakpointContent
shouldBeEnabled = "Yes"
ignoreCount = "0"
continueAfterRunningActions = "No"
filePath = "Bhagyashree/Sunarc/Model/UserExt.swift"
timestampString = "557228254.156836"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "236"
endingLineNumber = "236"
landmarkName = "callAPI(oldPassword:newPassword:success:failure:)"
landmarkType = "7">
</BreakpointContent>
</BreakpointProxy>
<BreakpointProxy
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
<BreakpointContent
shouldBeEnabled = "Yes"
ignoreCount = "0"
continueAfterRunningActions = "No"
filePath = "Bhagyashree/Sunarc/Controller/Me/ChangePasswordViewController.swift"
timestampString = "557228596.9233069"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "32"
endingLineNumber = "32"
landmarkName = "unknown"
landmarkType = "0">
</BreakpointContent>
</BreakpointProxy>
<BreakpointProxy
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
<BreakpointContent
shouldBeEnabled = "Yes"
ignoreCount = "0"
continueAfterRunningActions = "No"
filePath = "Bhagyashree/Sunarc/Controller/Me/ChangePasswordViewController.swift"
timestampString = "557228598.131186"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "30"
endingLineNumber = "30"
landmarkName = "unknown"
landmarkType = "0">
</BreakpointContent>
</BreakpointProxy>
<BreakpointProxy
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
<BreakpointContent
shouldBeEnabled = "Yes"
ignoreCount = "0"
continueAfterRunningActions = "No"
filePath = "Bhagyashree/Sunarc/Model/UserExt.swift"
timestampString = "557228607.042542"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "238"
endingLineNumber = "238"
landmarkName = "changePassword(oldPassword:newPassword:success:failure:)"
landmarkType = "7">
</BreakpointContent>
</BreakpointProxy>
</Breakpoints>
</Bucket>
......@@ -17,7 +17,7 @@
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<key>CFBundleVersion</key>
<string>8</string>
<string>9</string>
<key>Fabric</key>
<dict>
<key>APIKey</key>
......
......@@ -54,16 +54,28 @@ class ServiceDetailViewController: UIViewController {
if let orderId = self.orderId {
self.appointment.detailOfComlpeted(orderId: orderId, success: {
self.serviceStatus = .completed
self.btnStartMeeting.isHidden = true
self.btnEditResult.isHidden = true
self.tblServiceDetail.reloadData()
self.showHideButtons()
}, failure: { (errorMessage) in
if errorMessage.count > 0 {
self.view.showToast(errorMessage, position: .bottom, popTime: 2.0, dismissOnTap: false)
}
self.showHideButtons()
})
}
}) { (errorMessage) in
self.view.showToast(errorMessage, position: .bottom, popTime: 2.0, dismissOnTap: false)
}
}
}
func showHideButtons() {
switch self.serviceStatus {
case .tbc:
self.btnStartMeeting.isHidden = false
......@@ -81,17 +93,8 @@ class ServiceDetailViewController: UIViewController {
self.btnStartMeeting.isHidden = true
self.btnEditResult.isHidden = true
}
}) { (errorMessage) in
self.view.showToast(errorMessage, position: .bottom, popTime: 2.0, dismissOnTap: false)
}
}
}
}
......
......@@ -25,9 +25,6 @@ class VideoCallingViewController: UIViewController {
override func viewDidLoad() {
super.viewDidLoad()
print(orderId)
initializeAgoraEngine()
setupVideo()
setupLocalVideo()
......@@ -102,9 +99,6 @@ extension VideoCallingViewController {
agoraKit.setupLocalVideo(videoCanvas)
}
func joinChannel() {
self.view.showToast(orderId, position: .bottom, popTime: 2.0, dismissOnTap: false)
agoraKit.joinChannel(byToken: nil, channelId: orderId, info:nil, uid:0) {[weak self] (sid, uid, elapsed) -> Void in
// Join channel "demoChannel1"
if let weakSelf = self {
......
......@@ -122,11 +122,19 @@ extension HomePageViewController: UITableViewDelegate, UITableViewDataSource {
let order = dashboard.orders[indexPath.row-1]
if order.products.first?.serviceType == .BOOKING {
if order.status == .SERVICE_ONGOING {
let videoCallVC = Utils.viewController(storyboardName: "Appointment", ofType: VideoCallingViewController.self)
videoCallVC.orderId = order.orderId!
self.navigationController?.pushViewController(videoCallVC, animated: true)
} else {
let appointmentdetails = Utils.viewController(storyboardName: "Appointment", ofType: ServiceDetailViewController.self)
appointmentdetails.serviceStatus = .tbc
appointmentdetails.incrementId = order.incrementId
appointmentdetails.orderId = order.orderId
self.navigationController?.pushViewController(appointmentdetails, animated: true)
}
} else if order.products.first?.serviceType == .FAQ {
if order.status == .PROCESSING {
......@@ -194,31 +202,27 @@ class SellerProfileCell: UITableViewCell {
if statusSwitch.isOn == true {
Dashboard.goOnlineOffline(status: true, success: {
Database.database().reference().child("sellers").setValue(["\(User.customerId)": "online"])
self.delegate.showToast(message: "You are now online")
self.lblStatus.text = "Online"
// Dashboard.goOnlineOffline(status: true, success: {
// self.delegate.showToast(message: "You are now online")
// self.lblStatus.text = "Online"
// }) { (message) in
// self.delegate.showToast(message: message)
// statusSwitch.setOn(false, animated: true)
// }
}) { (message) in
self.delegate.showToast(message: message)
statusSwitch.setOn(false, animated: true)
}
} else {
Dashboard.goOnlineOffline(status: false, success: {
Database.database().reference().child("sellers").setValue(["\(User.customerId)": "offline"])
self.delegate.showToast(message: "You are now offline")
self.lblStatus.text = "Offline"
// Dashboard.goOnlineOffline(status: false, success: {
// self.delegate.showToast(message: "You are now offline")
// self.lblStatus.text = "Offline"
// }) { (message) in
// self.delegate.showToast(message: message)
// statusSwitch.setOn(true, animated: true)
// }
}) { (message) in
self.delegate.showToast(message: message)
statusSwitch.setOn(true, animated: true)
}
}
......
......@@ -115,6 +115,7 @@ extension OnlineEnquiryViewController {
let actionYes = UIAlertAction(title: "Yes", style: .default) { (_) in
UpdateOrder.toComplete(orderId: self.orderId, success: {
self.ref.child("isServiceEnd").setValue(true)
self.navigationController?.popToRootViewController(animated: true)
}, failuer: { (errorMessage) in
self.view.showToast(errorMessage, position: .bottom, popTime: 2.0, dismissOnTap: false)
......
......@@ -10,6 +10,10 @@ import UIKit
class ChangePasswordViewController: UIViewController {
@IBOutlet var txtCurrentPassword: UITextField!
@IBOutlet var txtNewPassword: UITextField!
@IBOutlet var txtConfirmPassword: UITextField!
override func viewDidLoad() {
super.viewDidLoad()
}
......@@ -20,4 +24,45 @@ class ChangePasswordViewController: UIViewController {
}
@IBAction func confirm() {
if self.validations() == false {
return
}
User.changePassword(oldPassword: txtCurrentPassword.text!, newPassword: txtNewPassword.text!, success: {
print("success")
}) { (errorMessage) in
print(errorMessage)
}
}
func validations() -> Bool {
if txtCurrentPassword.text?.count == 0 {
self.view.showToast("Please enter current password", position: .bottom, popTime: 2.0, dismissOnTap: false)
return false
}
if txtNewPassword.text?.count == 0 {
self.view.showToast("Please enter new password", position: .bottom, popTime: 2.0, dismissOnTap: false)
return false
}
if txtConfirmPassword.text?.count == 0 {
self.view.showToast("Please enter new password", position: .bottom, popTime: 2.0, dismissOnTap: false)
return false
}
if txtCurrentPassword.text != txtConfirmPassword.text {
self.view.showToast("New password and current password should be same", position: .bottom, popTime: 2.0, dismissOnTap: false)
return false
}
return true
}
}
......@@ -102,6 +102,9 @@ class Appointment {
for image in images {
self.images = self.images + "," + image
}
if self.images.count > 0 {
self.images.removeFirst()
}
}
if let audios = json["reply_audio"] as? [String] {
self.audio = ""
......@@ -127,7 +130,7 @@ class Appointment {
var timing: String {
get {
if self.bookingFrom != nil && self.bookingTill != nil {
return self.bookingFrom!+self.bookingTill! // TO DO
return self.bookingFrom! + "-" + self.bookingTill! // TO DO
}
if self.bookingFrom != nil {
return self.bookingFrom!
......
......@@ -22,6 +22,8 @@ extension Appointment {
HTTP().connectionWithRequestObjectFormUrl(api: API.VIEW_ORDER, parameters: parameters, method: .post, indicator: true, success: { (response) in
print(response)
if let validJSON = response as? [String: Any] {
self.initWithJSON(json: validJSON)
success()
......
......@@ -228,6 +228,20 @@ extension User {
}
class func changePassword(oldPassword: String, newPassword: String, success: @escaping () -> Void, failure: @escaping (_ errorMessage: String) -> Void) {
let paramenters = ["currentPassword": oldPassword, "newPassword": newPassword]
HTTP().connectionWithRequestObject(api: API.CHANGE_PASWORD, parameters: paramenters, method: .put, indicator: true, success: { (response) in
print(response)
}) { (errorMessage) in
failure(errorMessage)
}
}
}
......
......@@ -33,7 +33,7 @@ class API {
static let COMPLETED_SERVICE = "/rest/V1/service/completed"
static let CORPORATE_CULTURE = "/rest/V1/bannerInfo"
static let REGENERATE_TOKEN = "/rest/V1/customer/regenerate"
static let CHANGE_PASWORD = "/rest/V1/customers/me/password"
// Appointment
static let VIEW_ORDER = "mobikulmphttp/marketplace/viewOrder"
......
......@@ -584,7 +584,7 @@
<constraint firstAttribute="height" constant="70" id="VVO-LI-z6l"/>
</constraints>
</imageView>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="Fu5-VY-bcA" customClass="DrawView" customModule="Bhagyashree" customModuleProvider="target">
<view hidden="YES" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="Fu5-VY-bcA" customClass="DrawView" customModule="Bhagyashree" customModuleProvider="target">
<rect key="frame" x="9" y="255" width="159" height="32"/>
<subviews>
<imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="Audio" translatesAutoresizingMaskIntoConstraints="NO" id="e0b-8x-2hk">
......
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