Commit 1a3bb3d0 by Anand.suthar

Fix issues

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