Commit fd0d4f4f by Anand.suthar

fixes

parent 701c438c
...@@ -8,6 +8,7 @@ ...@@ -8,6 +8,7 @@
/* Begin PBXBuildFile section */ /* Begin PBXBuildFile section */
4ACEC34DA9643FC51768972C /* Pods_Bhagyashree.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 282A58176C30609705E92EDC /* Pods_Bhagyashree.framework */; }; 4ACEC34DA9643FC51768972C /* Pods_Bhagyashree.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 282A58176C30609705E92EDC /* Pods_Bhagyashree.framework */; };
B01A09C32135284A002C64B5 /* HTTPConnect.swift in Sources */ = {isa = PBXBuildFile; fileRef = B01A09C22135284A002C64B5 /* HTTPConnect.swift */; };
B01B217720EF878A002AC8D5 /* UserExt.swift in Sources */ = {isa = PBXBuildFile; fileRef = B01B217620EF878A002AC8D5 /* UserExt.swift */; }; B01B217720EF878A002AC8D5 /* UserExt.swift in Sources */ = {isa = PBXBuildFile; fileRef = B01B217620EF878A002AC8D5 /* UserExt.swift */; };
B01B217C20EF87E9002AC8D5 /* User.swift in Sources */ = {isa = PBXBuildFile; fileRef = B01B217B20EF87E9002AC8D5 /* User.swift */; }; B01B217C20EF87E9002AC8D5 /* User.swift in Sources */ = {isa = PBXBuildFile; fileRef = B01B217B20EF87E9002AC8D5 /* User.swift */; };
B024385120B52EF5007D12AE /* Fengshui.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = B024385020B52EF5007D12AE /* Fengshui.xcassets */; }; B024385120B52EF5007D12AE /* Fengshui.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = B024385020B52EF5007D12AE /* Fengshui.xcassets */; };
...@@ -536,6 +537,7 @@ ...@@ -536,6 +537,7 @@
282A58176C30609705E92EDC /* Pods_Bhagyashree.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Bhagyashree.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 282A58176C30609705E92EDC /* Pods_Bhagyashree.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Bhagyashree.framework; sourceTree = BUILT_PRODUCTS_DIR; };
748A45C133F59B5FE7C608D1 /* Pods-Bhagyashree.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Bhagyashree.debug.xcconfig"; path = "Pods/Target Support Files/Pods-Bhagyashree/Pods-Bhagyashree.debug.xcconfig"; sourceTree = "<group>"; }; 748A45C133F59B5FE7C608D1 /* Pods-Bhagyashree.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Bhagyashree.debug.xcconfig"; path = "Pods/Target Support Files/Pods-Bhagyashree/Pods-Bhagyashree.debug.xcconfig"; sourceTree = "<group>"; };
7A24BF177C4191DF34CBDA0F /* Pods-Bhagyashree.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Bhagyashree.release.xcconfig"; path = "Pods/Target Support Files/Pods-Bhagyashree/Pods-Bhagyashree.release.xcconfig"; sourceTree = "<group>"; }; 7A24BF177C4191DF34CBDA0F /* Pods-Bhagyashree.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Bhagyashree.release.xcconfig"; path = "Pods/Target Support Files/Pods-Bhagyashree/Pods-Bhagyashree.release.xcconfig"; sourceTree = "<group>"; };
B01A09C22135284A002C64B5 /* HTTPConnect.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HTTPConnect.swift; sourceTree = "<group>"; };
B01B217620EF878A002AC8D5 /* UserExt.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UserExt.swift; sourceTree = "<group>"; }; B01B217620EF878A002AC8D5 /* UserExt.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UserExt.swift; sourceTree = "<group>"; };
B01B217B20EF87E9002AC8D5 /* User.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = User.swift; sourceTree = "<group>"; }; B01B217B20EF87E9002AC8D5 /* User.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = User.swift; sourceTree = "<group>"; };
B024385020B52EF5007D12AE /* Fengshui.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Fengshui.xcassets; sourceTree = "<group>"; }; B024385020B52EF5007D12AE /* Fengshui.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Fengshui.xcassets; sourceTree = "<group>"; };
...@@ -1273,6 +1275,7 @@ ...@@ -1273,6 +1275,7 @@
children = ( children = (
B09212B220B805A200798423 /* API.swift */, B09212B220B805A200798423 /* API.swift */,
B09212B420B805B100798423 /* HTTP.swift */, B09212B420B805B100798423 /* HTTP.swift */,
B01A09C22135284A002C64B5 /* HTTPConnect.swift */,
); );
path = HTTP; path = HTTP;
sourceTree = "<group>"; sourceTree = "<group>";
...@@ -2522,6 +2525,7 @@ ...@@ -2522,6 +2525,7 @@
EC04CDFC2052CD7D00B425BB /* ChromaShadeSlider.swift in Sources */, EC04CDFC2052CD7D00B425BB /* ChromaShadeSlider.swift in Sources */,
EC04CFBB2052CF2A00B425BB /* CHIPageControlPuya.swift in Sources */, EC04CFBB2052CF2A00B425BB /* CHIPageControlPuya.swift in Sources */,
B0BC1BEA20F0E56200944FD3 /* Enquiry.swift in Sources */, B0BC1BEA20F0E56200944FD3 /* Enquiry.swift in Sources */,
B01A09C32135284A002C64B5 /* HTTPConnect.swift in Sources */,
B0B5717B212BFEC700593801 /* OnsiteFengshuiViewController.swift in Sources */, B0B5717B212BFEC700593801 /* OnsiteFengshuiViewController.swift in Sources */,
EC04CDEF2052CD6E00B425BB /* SellerInvoiceShippingDownloadController.swift in Sources */, EC04CDEF2052CD6E00B425BB /* SellerInvoiceShippingDownloadController.swift in Sources */,
B09212AC20B8055E00798423 /* DB.swift in Sources */, B09212AC20B8055E00798423 /* DB.swift in Sources */,
...@@ -2829,15 +2833,15 @@ ...@@ -2829,15 +2833,15 @@
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CLANG_ENABLE_MODULES = YES; CLANG_ENABLE_MODULES = YES;
CODE_SIGN_ENTITLEMENTS = Bhagyashree/Bhagyashree.entitlements; CODE_SIGN_ENTITLEMENTS = Bhagyashree/Bhagyashree.entitlements;
CODE_SIGN_IDENTITY = "iPhone Distribution"; CODE_SIGN_IDENTITY = "iPhone Developer";
CODE_SIGN_STYLE = Manual; CODE_SIGN_STYLE = Manual;
DEVELOPMENT_TEAM = S5AR757G56; DEVELOPMENT_TEAM = "";
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";
PRODUCT_NAME = "$(TARGET_NAME)"; PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE = "a5e812ba-74cb-472e-adf1-da31e8ca0c05"; PROVISIONING_PROFILE = "";
PROVISIONING_PROFILE_SPECIFIER = FengShui_Seller_AdHok; PROVISIONING_PROFILE_SPECIFIER = "";
SWIFT_OBJC_BRIDGING_HEADER = "Bhagyashree/MARKET PLACE/Seller Create Credit Memo/Bhagyashree-Bridging-Header.h"; SWIFT_OBJC_BRIDGING_HEADER = "Bhagyashree/MARKET PLACE/Seller Create Credit Memo/Bhagyashree-Bridging-Header.h";
SWIFT_OPTIMIZATION_LEVEL = "-Onone"; SWIFT_OPTIMIZATION_LEVEL = "-Onone";
SWIFT_VERSION = 4.0; SWIFT_VERSION = 4.0;
...@@ -2853,15 +2857,15 @@ ...@@ -2853,15 +2857,15 @@
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CLANG_ENABLE_MODULES = YES; CLANG_ENABLE_MODULES = YES;
CODE_SIGN_ENTITLEMENTS = Bhagyashree/Bhagyashree.entitlements; CODE_SIGN_ENTITLEMENTS = Bhagyashree/Bhagyashree.entitlements;
CODE_SIGN_IDENTITY = "iPhone Distribution"; CODE_SIGN_IDENTITY = "iPhone Developer";
CODE_SIGN_STYLE = Manual; CODE_SIGN_STYLE = Manual;
DEVELOPMENT_TEAM = S5AR757G56; DEVELOPMENT_TEAM = "";
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";
PRODUCT_NAME = "$(TARGET_NAME)"; PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE = "a5e812ba-74cb-472e-adf1-da31e8ca0c05"; PROVISIONING_PROFILE = "";
PROVISIONING_PROFILE_SPECIFIER = FengShui_Seller_AdHok; PROVISIONING_PROFILE_SPECIFIER = "";
SWIFT_OBJC_BRIDGING_HEADER = "Bhagyashree/MARKET PLACE/Seller Create Credit Memo/Bhagyashree-Bridging-Header.h"; SWIFT_OBJC_BRIDGING_HEADER = "Bhagyashree/MARKET PLACE/Seller Create Credit Memo/Bhagyashree-Bridging-Header.h";
SWIFT_VERSION = 4.0; SWIFT_VERSION = 4.0;
TARGETED_DEVICE_FAMILY = "1,2"; TARGETED_DEVICE_FAMILY = "1,2";
......
...@@ -6,22 +6,6 @@ ...@@ -6,22 +6,6 @@
<BreakpointProxy <BreakpointProxy
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint"> BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
<BreakpointContent <BreakpointContent
shouldBeEnabled = "No"
ignoreCount = "0"
continueAfterRunningActions = "No"
filePath = "Bhagyashree/Sunarc/Model/Appointment/AppointmentExt.swift"
timestampString = "556626783.326643"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "25"
endingLineNumber = "25"
landmarkName = "getAppointmentDetails(incrementId:success:failure:)"
landmarkType = "7">
</BreakpointContent>
</BreakpointProxy>
<BreakpointProxy
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
<BreakpointContent
shouldBeEnabled = "Yes" shouldBeEnabled = "Yes"
ignoreCount = "0" ignoreCount = "0"
continueAfterRunningActions = "No" continueAfterRunningActions = "No"
...@@ -73,13 +57,13 @@ ...@@ -73,13 +57,13 @@
shouldBeEnabled = "Yes" shouldBeEnabled = "Yes"
ignoreCount = "0" ignoreCount = "0"
continueAfterRunningActions = "No" continueAfterRunningActions = "No"
filePath = "Bhagyashree/Sunarc/Controller/Appointment/ServiceDetailViewController.swift" filePath = "Bhagyashree/Sunarc/Other/HTTP/HTTPConnect.swift"
timestampString = "556895749.937322" timestampString = "557140791.911939"
startingColumnNumber = "9223372036854775807" startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807" endingColumnNumber = "9223372036854775807"
startingLineNumber = "43" startingLineNumber = "120"
endingLineNumber = "43" endingLineNumber = "120"
landmarkName = "viewWillAppear(_:)" landmarkName = "tmpp(keyValueDict:keyValueFile:contentType:)"
landmarkType = "7"> landmarkType = "7">
</BreakpointContent> </BreakpointContent>
</BreakpointProxy> </BreakpointProxy>
...@@ -89,13 +73,13 @@ ...@@ -89,13 +73,13 @@
shouldBeEnabled = "Yes" shouldBeEnabled = "Yes"
ignoreCount = "0" ignoreCount = "0"
continueAfterRunningActions = "No" continueAfterRunningActions = "No"
filePath = "Bhagyashree/Sunarc/Controller/Appointment/ServiceDetailViewController.swift" filePath = "Bhagyashree/Sunarc/Other/HTTP/HTTPConnect.swift"
timestampString = "556895749.937796" timestampString = "557140792.927889"
startingColumnNumber = "9223372036854775807" startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807" endingColumnNumber = "9223372036854775807"
startingLineNumber = "56" startingLineNumber = "123"
endingLineNumber = "56" endingLineNumber = "123"
landmarkName = "viewWillAppear(_:)" landmarkName = "tmpp(keyValueDict:keyValueFile:contentType:)"
landmarkType = "7"> landmarkType = "7">
</BreakpointContent> </BreakpointContent>
</BreakpointProxy> </BreakpointProxy>
......
...@@ -15,7 +15,8 @@ var DEFAULT_WEBSITE_ID = "1" ...@@ -15,7 +15,8 @@ var DEFAULT_WEBSITE_ID = "1"
var BASE_DOMAIN = "http://54.251.144.17" var BASE_DOMAIN = "http://18.136.9.203" // test
//var BASE_DOMAIN = "http://54.251.144.17" // dev
//var BASE_DOMAIN = "http://13.251.93.24" //var BASE_DOMAIN = "http://13.251.93.24"
var HOST_NAME = BASE_DOMAIN+"/index.php/" var HOST_NAME = BASE_DOMAIN+"/index.php/"
......
...@@ -53,6 +53,9 @@ class ServiceDetailViewController: UIViewController { ...@@ -53,6 +53,9 @@ 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.btnStartMeeting.isHidden = true
self.btnEditResult.isHidden = true
self.tblServiceDetail.reloadData() self.tblServiceDetail.reloadData()
}, failure: { (errorMessage) in }, failure: { (errorMessage) in
if errorMessage.count > 0 { if errorMessage.count > 0 {
......
...@@ -21,9 +21,7 @@ extension Appointment { ...@@ -21,9 +21,7 @@ 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()
...@@ -44,10 +42,8 @@ extension Appointment { ...@@ -44,10 +42,8 @@ extension Appointment {
"id": User.customerId, "id": User.customerId,
] ]
HTTP().connectionWithRequestObject(api: API.COMPLETED_SERVICE, parameters: parameters, method: .post, indicator: true, success: { (response) in HTTPConnect.connectWithRequestObject(api: API.COMPLETED_SERVICE, parameters: parameters, method: "POST", contentType: "application/json", indicator: true, success: { (response) in
print(response)
if let validJSON = response as? [[String: Any]] { if let validJSON = response as? [[String: Any]] {
if let data = validJSON[0]["data"] as? [String: Any] { if let data = validJSON[0]["data"] as? [String: Any] {
...@@ -59,11 +55,12 @@ extension Appointment { ...@@ -59,11 +55,12 @@ extension Appointment {
} else { } else {
failure("Incorrect data format") failure("Incorrect data format")
} }
}) { (errorMessage) in }) { (errorMessage) in
failure(errorMessage) failure(errorMessage)
} }
} }
......
//
// HTTPConnect.swift
// Bhagyashree
//
// Created by SunarcMAC on 28/08/18.
// Copyright © 2018 Sunarc. All rights reserved.
//
import Foundation
import SVProgressHUD
class HTTPConnect {
class func connectWithRequestObject(api: String, parameters: Any?, method: String, contentType: String, indicator: Bool, success: @escaping (_ json: Any) -> (), failure: @escaping (_ errorMessage: String) -> ()) -> Void {
if indicator == true {
SVProgressHUD.show()
}
let headers = [
"authkey": UserDefaults.standard.value(forKey: "authKey") as! String,
"content-type": contentType
]
var postData: Data?
if let parameters = parameters {
postData = try! JSONSerialization.data(withJSONObject: parameters, options: [])
}
print(HOST_NAME+API.UPDATE_RESULT)
print(parameters ?? "No parameters")
print(headers)
let request = NSMutableURLRequest(url: NSURL(string: HOST_NAME+api)! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = method
request.allHTTPHeaderFields = headers
request.httpBody = postData
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
DispatchQueue.main.async {
SVProgressHUD.dismiss()
if (error != nil) {
failure(error!.localizedDescription)
} else {
do {
let json = try JSONSerialization.jsonObject(with: data!, options: .mutableContainers)
success(json)
} catch let myJSONError {
failure(myJSONError.localizedDescription)
}
}
}
})
dataTask.resume()
}
func tmpp(keyValueDict: [String: Any]?, keyValueFile: [String: Any]?, contentType: String) {
let headers = [
"authkey": UserDefaults.standard.value(forKey: "authKey") as! String,
"content-type": contentType
]
let boundary = "----WebKitFormBoundary7MA4YWxkTrZu0gW"
var body = ""
// 1. Add key values dict
if let keyValueDict_ = keyValueDict {
for (key, value) in keyValueDict_ {
body += "--\(boundary)\r\n"
body += "Content-Disposition:form-data; name=\"\(key)\""
body += "\r\n\r\n\(value)"
}
}
// 2. Add files
if let keyValueFile_ = keyValueFile {
for (key, value) in keyValueFile_ {
if let fileLocalPath = value as? String {
let fileContent = try! String(contentsOfFile: fileLocalPath, encoding: String.Encoding.utf8)
body += "--\(boundary)\r\n"
body += "Content-Disposition:form-data; name=\"\(key)\""
body += "; filename=\"fileName\"\r\n"
body += "Content-Type: \(contentType)\r\n\r\n"
body += fileContent
}
}
}
let request = NSMutableURLRequest(url: NSURL(string: "http://13.228.97.103/index.php/mobikulhttp/checkout/addToCart")! as URL,
cachePolicy: .useProtocolCachePolicy,
timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = body.data(using: .utf8)
let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
print(error!)
} else {
let httpResponse = response as? HTTPURLResponse
print(httpResponse!)
}
})
dataTask.resume()
}
}
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