Commit 098f06b8 by SunARcTech2

fix audio progress

parent e7d846fe
No preview for this file type
...@@ -10,7 +10,23 @@ ...@@ -10,7 +10,23 @@
ignoreCount = "0" ignoreCount = "0"
continueAfterRunningActions = "No" continueAfterRunningActions = "No"
filePath = "Bhagyashree/Sunarc/Controller/Appointment/CompletedServicesViewController.swift" filePath = "Bhagyashree/Sunarc/Controller/Appointment/CompletedServicesViewController.swift"
timestampString = "560762814.7603379" timestampString = "561474733.3110501"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "130"
endingLineNumber = "130"
landmarkName = "tableView(_:didSelectRowAt:)"
landmarkType = "7">
</BreakpointContent>
</BreakpointProxy>
<BreakpointProxy
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
<BreakpointContent
shouldBeEnabled = "Yes"
ignoreCount = "0"
continueAfterRunningActions = "No"
filePath = "Bhagyashree/Sunarc/Controller/Appointment/ServicesListViewController.swift"
timestampString = "560761689.705489"
startingColumnNumber = "9223372036854775807" startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807" endingColumnNumber = "9223372036854775807"
startingLineNumber = "128" startingLineNumber = "128"
...@@ -25,12 +41,12 @@ ...@@ -25,12 +41,12 @@
shouldBeEnabled = "Yes" shouldBeEnabled = "Yes"
ignoreCount = "0" ignoreCount = "0"
continueAfterRunningActions = "No" continueAfterRunningActions = "No"
filePath = "Bhagyashree/Sunarc/Controller/Appointment/OnGoingServicesViewController.swift" filePath = "Bhagyashree/Sunarc/Controller/Appointment/InvalidServicesViewController.swift"
timestampString = "560762814.760757" timestampString = "561474733.311178"
startingColumnNumber = "9223372036854775807" startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807" endingColumnNumber = "9223372036854775807"
startingLineNumber = "133" startingLineNumber = "130"
endingLineNumber = "133" endingLineNumber = "130"
landmarkName = "tableView(_:didSelectRowAt:)" landmarkName = "tableView(_:didSelectRowAt:)"
landmarkType = "7"> landmarkType = "7">
</BreakpointContent> </BreakpointContent>
...@@ -41,12 +57,12 @@ ...@@ -41,12 +57,12 @@
shouldBeEnabled = "Yes" shouldBeEnabled = "Yes"
ignoreCount = "0" ignoreCount = "0"
continueAfterRunningActions = "No" continueAfterRunningActions = "No"
filePath = "Bhagyashree/Sunarc/Controller/Appointment/ServicesListViewController.swift" filePath = "Bhagyashree/Sunarc/Controller/Me/MyOngoingServiceOrderViewController.swift"
timestampString = "560761689.705489" timestampString = "561474733.311242"
startingColumnNumber = "9223372036854775807" startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807" endingColumnNumber = "9223372036854775807"
startingLineNumber = "128" startingLineNumber = "130"
endingLineNumber = "128" endingLineNumber = "130"
landmarkName = "tableView(_:didSelectRowAt:)" landmarkName = "tableView(_:didSelectRowAt:)"
landmarkType = "7"> landmarkType = "7">
</BreakpointContent> </BreakpointContent>
...@@ -57,12 +73,12 @@ ...@@ -57,12 +73,12 @@
shouldBeEnabled = "Yes" shouldBeEnabled = "Yes"
ignoreCount = "0" ignoreCount = "0"
continueAfterRunningActions = "No" continueAfterRunningActions = "No"
filePath = "Bhagyashree/Sunarc/Controller/Appointment/ProcessingViewController.swift" filePath = "Bhagyashree/Sunarc/Controller/Me/MyUploadResultViewController.swift"
timestampString = "560762814.760976" timestampString = "561474733.3116601"
startingColumnNumber = "9223372036854775807" startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807" endingColumnNumber = "9223372036854775807"
startingLineNumber = "128" startingLineNumber = "123"
endingLineNumber = "128" endingLineNumber = "123"
landmarkName = "tableView(_:didSelectRowAt:)" landmarkName = "tableView(_:didSelectRowAt:)"
landmarkType = "7"> landmarkType = "7">
</BreakpointContent> </BreakpointContent>
...@@ -73,8 +89,8 @@ ...@@ -73,8 +89,8 @@
shouldBeEnabled = "Yes" shouldBeEnabled = "Yes"
ignoreCount = "0" ignoreCount = "0"
continueAfterRunningActions = "No" continueAfterRunningActions = "No"
filePath = "Bhagyashree/Sunarc/Controller/Appointment/InvalidServicesViewController.swift" filePath = "Bhagyashree/Sunarc/Controller/Me/MyAllServiceOrderViewController.swift"
timestampString = "560762814.761176" timestampString = "561474733.311718"
startingColumnNumber = "9223372036854775807" startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807" endingColumnNumber = "9223372036854775807"
startingLineNumber = "128" startingLineNumber = "128"
...@@ -89,12 +105,12 @@ ...@@ -89,12 +105,12 @@
shouldBeEnabled = "Yes" shouldBeEnabled = "Yes"
ignoreCount = "0" ignoreCount = "0"
continueAfterRunningActions = "No" continueAfterRunningActions = "No"
filePath = "Bhagyashree/Sunarc/Controller/Me/MyOngoingServiceOrderViewController.swift" filePath = "Bhagyashree/Sunarc/Controller/Me/MyAllServiceOrderViewController.swift"
timestampString = "560761702.329962" timestampString = "561474733.311767"
startingColumnNumber = "9223372036854775807" startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807" endingColumnNumber = "9223372036854775807"
startingLineNumber = "128" startingLineNumber = "124"
endingLineNumber = "128" endingLineNumber = "124"
landmarkName = "tableView(_:didSelectRowAt:)" landmarkName = "tableView(_:didSelectRowAt:)"
landmarkType = "7"> landmarkType = "7">
</BreakpointContent> </BreakpointContent>
...@@ -105,12 +121,12 @@ ...@@ -105,12 +121,12 @@
shouldBeEnabled = "Yes" shouldBeEnabled = "Yes"
ignoreCount = "0" ignoreCount = "0"
continueAfterRunningActions = "No" continueAfterRunningActions = "No"
filePath = "Bhagyashree/Sunarc/Controller/Me/MyUploadResultViewController.swift" filePath = "Bhagyashree/Sunarc/Controller/Appointment/OnGoingServicesViewController.swift"
timestampString = "560761704.866033" timestampString = "561474733.311851"
startingColumnNumber = "9223372036854775807" startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807" endingColumnNumber = "9223372036854775807"
startingLineNumber = "121" startingLineNumber = "110"
endingLineNumber = "121" endingLineNumber = "110"
landmarkName = "tableView(_:didSelectRowAt:)" landmarkName = "tableView(_:didSelectRowAt:)"
landmarkType = "7"> landmarkType = "7">
</BreakpointContent> </BreakpointContent>
...@@ -121,13 +137,13 @@ ...@@ -121,13 +137,13 @@
shouldBeEnabled = "Yes" shouldBeEnabled = "Yes"
ignoreCount = "0" ignoreCount = "0"
continueAfterRunningActions = "No" continueAfterRunningActions = "No"
filePath = "Bhagyashree/Sunarc/Controller/Me/MyAllServiceOrderViewController.swift" filePath = "Bhagyashree/Sunarc/Controller/Appointment/ServiceDetailViewController.swift"
timestampString = "561463021.489835" timestampString = "561541052.811942"
startingColumnNumber = "9223372036854775807" startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807" endingColumnNumber = "9223372036854775807"
startingLineNumber = "127" startingLineNumber = "433"
endingLineNumber = "127" endingLineNumber = "433"
landmarkName = "tableView(_:didSelectRowAt:)" landmarkName = "tableView(_:cellForRowAt:)"
landmarkType = "7"> landmarkType = "7">
</BreakpointContent> </BreakpointContent>
</BreakpointProxy> </BreakpointProxy>
...@@ -137,13 +153,13 @@ ...@@ -137,13 +153,13 @@
shouldBeEnabled = "Yes" shouldBeEnabled = "Yes"
ignoreCount = "0" ignoreCount = "0"
continueAfterRunningActions = "No" continueAfterRunningActions = "No"
filePath = "Bhagyashree/Sunarc/Controller/Me/MyAllServiceOrderViewController.swift" filePath = "Bhagyashree/Sunarc/Controller/Appointment/ServiceDetailViewController.swift"
timestampString = "561463021.489903" timestampString = "561541052.812016"
startingColumnNumber = "9223372036854775807" startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807" endingColumnNumber = "9223372036854775807"
startingLineNumber = "124" startingLineNumber = "436"
endingLineNumber = "124" endingLineNumber = "436"
landmarkName = "tableView(_:didSelectRowAt:)" landmarkName = "tableView(_:cellForRowAt:)"
landmarkType = "7"> landmarkType = "7">
</BreakpointContent> </BreakpointContent>
</BreakpointProxy> </BreakpointProxy>
...@@ -153,13 +169,13 @@ ...@@ -153,13 +169,13 @@
shouldBeEnabled = "Yes" shouldBeEnabled = "Yes"
ignoreCount = "0" ignoreCount = "0"
continueAfterRunningActions = "No" continueAfterRunningActions = "No"
filePath = "Bhagyashree/Sunarc/Model/Appointment/AppointmentExt.swift" filePath = "Bhagyashree/Sunarc/Controller/Appointment/ServiceDetailViewController.swift"
timestampString = "561371554.977618" timestampString = "561541052.8120691"
startingColumnNumber = "9223372036854775807" startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807" endingColumnNumber = "9223372036854775807"
startingLineNumber = "49" startingLineNumber = "427"
endingLineNumber = "49" endingLineNumber = "427"
landmarkName = "detailOfComlpeted(orderId:success:failure:)" landmarkName = "tableView(_:cellForRowAt:)"
landmarkType = "7"> landmarkType = "7">
</BreakpointContent> </BreakpointContent>
</BreakpointProxy> </BreakpointProxy>
...@@ -169,13 +185,13 @@ ...@@ -169,13 +185,13 @@
shouldBeEnabled = "Yes" shouldBeEnabled = "Yes"
ignoreCount = "0" ignoreCount = "0"
continueAfterRunningActions = "No" continueAfterRunningActions = "No"
filePath = "Bhagyashree/Sunarc/Model/Appointment/AppointmentExt.swift" filePath = "Bhagyashree/Sunarc/Controller/Appointment/ServiceDetailViewController.swift"
timestampString = "561371554.978444" timestampString = "561541052.812117"
startingColumnNumber = "9223372036854775807" startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807" endingColumnNumber = "9223372036854775807"
startingLineNumber = "25" startingLineNumber = "447"
endingLineNumber = "25" endingLineNumber = "447"
landmarkName = "getAppointmentDetails(incrementId:success:failure:)" landmarkName = "playingAudioAtIndex(index:)"
landmarkType = "7"> landmarkType = "7">
</BreakpointContent> </BreakpointContent>
</BreakpointProxy> </BreakpointProxy>
...@@ -185,13 +201,13 @@ ...@@ -185,13 +201,13 @@
shouldBeEnabled = "Yes" shouldBeEnabled = "Yes"
ignoreCount = "0" ignoreCount = "0"
continueAfterRunningActions = "No" continueAfterRunningActions = "No"
filePath = "Bhagyashree/Sunarc/Controller/Home/OnlineEnquiryViewController.swift" filePath = "Bhagyashree/Sunarc/Controller/Appointment/ServiceDetailViewController.swift"
timestampString = "561470641.929803" timestampString = "561541052.812166"
startingColumnNumber = "9223372036854775807" startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807" endingColumnNumber = "9223372036854775807"
startingLineNumber = "216" startingLineNumber = "469"
endingLineNumber = "216" endingLineNumber = "469"
landmarkName = "endRecordAudio()" landmarkName = "play()"
landmarkType = "7"> landmarkType = "7">
</BreakpointContent> </BreakpointContent>
</BreakpointProxy> </BreakpointProxy>
...@@ -201,13 +217,13 @@ ...@@ -201,13 +217,13 @@
shouldBeEnabled = "Yes" shouldBeEnabled = "Yes"
ignoreCount = "0" ignoreCount = "0"
continueAfterRunningActions = "No" continueAfterRunningActions = "No"
filePath = "Bhagyashree/Sunarc/Controller/Home/OnlineEnquiryViewController.swift" filePath = "Bhagyashree/Sunarc/Model/Appointment/EditResult.swift"
timestampString = "561470641.9298739" timestampString = "561541052.812215"
startingColumnNumber = "9223372036854775807" startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807" endingColumnNumber = "9223372036854775807"
startingLineNumber = "227" startingLineNumber = "85"
endingLineNumber = "227" endingLineNumber = "85"
landmarkName = "endRecordAudio()" landmarkName = "updateResult(for:success:failure:)"
landmarkType = "7"> landmarkType = "7">
</BreakpointContent> </BreakpointContent>
</BreakpointProxy> </BreakpointProxy>
...@@ -217,13 +233,13 @@ ...@@ -217,13 +233,13 @@
shouldBeEnabled = "Yes" shouldBeEnabled = "Yes"
ignoreCount = "0" ignoreCount = "0"
continueAfterRunningActions = "No" continueAfterRunningActions = "No"
filePath = "Bhagyashree/Sunarc/Controller/Home/OnlineEnquiryViewController.swift" filePath = "Bhagyashree/Sunarc/Controller/Appointment/EditResultViewController.swift"
timestampString = "561470641.929929" timestampString = "561625019.129765"
startingColumnNumber = "9223372036854775807" startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807" endingColumnNumber = "9223372036854775807"
startingLineNumber = "231" startingLineNumber = "70"
endingLineNumber = "231" endingLineNumber = "70"
landmarkName = "endRecordAudio()" landmarkName = "submit()"
landmarkType = "7"> landmarkType = "7">
</BreakpointContent> </BreakpointContent>
</BreakpointProxy> </BreakpointProxy>
...@@ -233,13 +249,13 @@ ...@@ -233,13 +249,13 @@
shouldBeEnabled = "Yes" shouldBeEnabled = "Yes"
ignoreCount = "0" ignoreCount = "0"
continueAfterRunningActions = "No" continueAfterRunningActions = "No"
filePath = "Bhagyashree/Sunarc/Controller/Home/OnlineEnquiryViewController.swift" filePath = "Bhagyashree/Sunarc/Controller/Appointment/EditResultViewController.swift"
timestampString = "561470641.929978" timestampString = "561625019.129848"
startingColumnNumber = "9223372036854775807" startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807" endingColumnNumber = "9223372036854775807"
startingLineNumber = "220" startingLineNumber = "71"
endingLineNumber = "220" endingLineNumber = "71"
landmarkName = "endRecordAudio()" landmarkName = "submit()"
landmarkType = "7"> landmarkType = "7">
</BreakpointContent> </BreakpointContent>
</BreakpointProxy> </BreakpointProxy>
...@@ -249,13 +265,13 @@ ...@@ -249,13 +265,13 @@
shouldBeEnabled = "Yes" shouldBeEnabled = "Yes"
ignoreCount = "0" ignoreCount = "0"
continueAfterRunningActions = "No" continueAfterRunningActions = "No"
filePath = "Bhagyashree/Sunarc/Controller/Home/OnlineEnquiryViewController.swift" filePath = "Bhagyashree/Sunarc/Model/Appointment/EditResult.swift"
timestampString = "561470641.930027" timestampString = "561541052.812366"
startingColumnNumber = "9223372036854775807" startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807" endingColumnNumber = "9223372036854775807"
startingLineNumber = "200" startingLineNumber = "26"
endingLineNumber = "200" endingLineNumber = "26"
landmarkName = "endRecordAudio()" landmarkName = "updateResult(for:success:failure:)"
landmarkType = "7"> landmarkType = "7">
</BreakpointContent> </BreakpointContent>
</BreakpointProxy> </BreakpointProxy>
......
...@@ -19,7 +19,7 @@ ...@@ -19,7 +19,7 @@
<key>CFBundleShortVersionString</key> <key>CFBundleShortVersionString</key>
<string>1.0</string> <string>1.0</string>
<key>CFBundleVersion</key> <key>CFBundleVersion</key>
<string>2</string> <string>18</string>
<key>Fabric</key> <key>Fabric</key>
<dict> <dict>
<key>APIKey</key> <key>APIKey</key>
......
...@@ -17,6 +17,7 @@ class PlayAudioCell: UITableViewCell { ...@@ -17,6 +17,7 @@ class PlayAudioCell: UITableViewCell {
// var audioRecording: AudioRecording? // var audioRecording: AudioRecording?
var delegate: PlayAudioCellDelegate! var delegate: PlayAudioCellDelegate!
@IBOutlet var btnPlay: UIButton! @IBOutlet var btnPlay: UIButton!
@IBOutlet var audioSlider: UISlider!
var audioRecording: AudioRecording? { var audioRecording: AudioRecording? {
...@@ -35,6 +36,7 @@ class PlayAudioCell: UITableViewCell { ...@@ -35,6 +36,7 @@ class PlayAudioCell: UITableViewCell {
@IBAction func playAudio() { @IBAction func playAudio() {
if audioRecording?.isPlaying == true { if audioRecording?.isPlaying == true {
Audio.pause() Audio.pause()
delegate.audioPlayingAt(index: 10000)
} else { } else {
playAudioFile() playAudioFile()
delegate.audioPlayingAt(index: audioRecording!.audioIndex) delegate.audioPlayingAt(index: audioRecording!.audioIndex)
...@@ -49,7 +51,13 @@ class PlayAudioCell: UITableViewCell { ...@@ -49,7 +51,13 @@ class PlayAudioCell: UITableViewCell {
}, failure: { (errorMesaage) in }, failure: { (errorMesaage) in
self.viewController()?.view.showToast(errorMesaage, position: .bottom, popTime: 2.0, dismissOnTap: false) self.viewController()?.view.showToast(errorMesaage, position: .bottom, popTime: 2.0, dismissOnTap: false)
}) { (progress, duration) in }) { (progress, duration) in
print("progress = \(progress) duration = \(duration)") self.audioSlider.maximumValue = duration
self.audioSlider.value = progress
if Int(duration) == Int(progress) {
self.delegate.audioPlayingAt(index: 10000)
}
} }
} }
......
...@@ -108,15 +108,17 @@ extension CompletedServicesViewController: UITableViewDelegate, UITableViewDataS ...@@ -108,15 +108,17 @@ extension CompletedServicesViewController: UITableViewDelegate, UITableViewDataS
let selectedService = service.services[indexPath.row] let selectedService = service.services[indexPath.row]
if selectedService.serviceType == .BOOKING { if selectedService.typeId == "booking" {
// if selectedService.serviceType == .BOOKING {
let appointmentdetails = Utils.viewController(storyboardName: "Appointment", ofType: ServiceDetailViewController.self) let appointmentdetails = Utils.viewController(storyboardName: "Appointment", ofType: ServiceDetailViewController.self)
appointmentdetails.orderStatus = .COMPLETE appointmentdetails.orderStatus = .COMPLETE
// appointmentdetails.serviceStatus = .completed // appointmentdetails.serviceStatus = .completed
appointmentdetails.incrementId = selectedService.incrementId appointmentdetails.incrementId = selectedService.incrementId
appointmentdetails.orderId = selectedService.orderId appointmentdetails.orderId = selectedService.orderId
self.navigationController?.pushViewController(appointmentdetails, animated: true) self.navigationController?.pushViewController(appointmentdetails, animated: true)
} else if selectedService.serviceType == .FAQ { } else if selectedService.typeId == "faq" {
// } else if selectedService.serviceType == .FAQ {
if selectedService.status == .PROCESSING { if selectedService.status == .PROCESSING {
let chatViewController = Utils.viewController(storyboardName: "Home", ofType: OnlineEnquiryViewController.self) let chatViewController = Utils.viewController(storyboardName: "Home", ofType: OnlineEnquiryViewController.self)
if let orderId = selectedService.orderId { if let orderId = selectedService.orderId {
...@@ -130,8 +132,8 @@ extension CompletedServicesViewController: UITableViewDelegate, UITableViewDataS ...@@ -130,8 +132,8 @@ extension CompletedServicesViewController: UITableViewDelegate, UITableViewDataS
enquiryDetailsViewController.orderId = selectedService.orderId! enquiryDetailsViewController.orderId = selectedService.orderId!
self.navigationController?.pushViewController(enquiryDetailsViewController, animated: true) self.navigationController?.pushViewController(enquiryDetailsViewController, animated: true)
} }
} else if selectedService.typeId == "forms"{
} else if selectedService.serviceType == .FORM{ // } else if selectedService.serviceType == .FORM{
if let form = Form.VC(with: selectedService.incrementId!, orderId: selectedService.orderId!, categoryType: selectedService.categoryType){ if let form = Form.VC(with: selectedService.incrementId!, orderId: selectedService.orderId!, categoryType: selectedService.categoryType){
self.navigationController?.pushViewController(form, animated: true) self.navigationController?.pushViewController(form, animated: true)
} }
......
...@@ -22,10 +22,9 @@ class EditResultViewController: BaseViewController { ...@@ -22,10 +22,9 @@ class EditResultViewController: BaseViewController {
var recommendedProducts = [RecommendProduct]() var recommendedProducts = [RecommendProduct]()
var isAllowAccessMicrophone = true var isAllowAccessMicrophone = true
var orderId = "0" var orderId = "0"
var editResult = EditResult() var editResult = EditResult()
var audioPlayedAtIndex = 10000
override func viewDidLoad() { override func viewDidLoad() {
super.viewDidLoad() super.viewDidLoad()
...@@ -67,6 +66,10 @@ extension EditResultViewController { ...@@ -67,6 +66,10 @@ extension EditResultViewController {
let alertActionNo = UIAlertAction(title: "No", style: .default) { (action) in } let alertActionNo = UIAlertAction(title: "No", style: .default) { (action) in }
let alertActionYes = UIAlertAction(title: "Yes", style: .default) { (action) in let alertActionYes = UIAlertAction(title: "Yes", style: .default) { (action) in
print(self.imagesForResult.count)
print(self.audioRecordings.count)
self.editResult.images = self.imagesForResult self.editResult.images = self.imagesForResult
self.editResult.audios = self.audioRecordings self.editResult.audios = self.audioRecordings
self.editResult.products = self.recommendedProducts self.editResult.products = self.recommendedProducts
...@@ -181,6 +184,15 @@ extension EditResultViewController: UITableViewDelegate, UITableViewDataSource { ...@@ -181,6 +184,15 @@ extension EditResultViewController: UITableViewDelegate, UITableViewDataSource {
audioRecordings[indexPath.row].audioIndex = indexPath.row audioRecordings[indexPath.row].audioIndex = indexPath.row
playAudioCell.audioRecording = audioRecordings[indexPath.row] playAudioCell.audioRecording = audioRecordings[indexPath.row]
playAudioCell.delegate = self playAudioCell.delegate = self
playAudioCell.audioSlider.value = 0
playAudioCell.btnPlay.tag = indexPath.row
if audioPlayedAtIndex == indexPath.row {
playAudioCell.btnPlay.setBackgroundImage(UIImage(named: "pause"), for: .normal)
} else {
playAudioCell.btnPlay.setBackgroundImage(UIImage(named: "play"), for: .normal)
}
return playAudioCell return playAudioCell
default: default:
return UITableViewCell() return UITableViewCell()
...@@ -283,13 +295,16 @@ extension EditResultViewController: PlayAudioCellDelegate { ...@@ -283,13 +295,16 @@ extension EditResultViewController: PlayAudioCellDelegate {
func audioPlayingAt(index: Int) { func audioPlayingAt(index: Int) {
for (arrayIndex, audioRecording) in audioRecordings.enumerated() {
if arrayIndex == index { audioPlayedAtIndex = index
audioRecording.isPlaying = true
} else { // for (arrayIndex, audioRecording) in audioRecordings.enumerated() {
audioRecording.isPlaying = false // if arrayIndex == index {
} // audioRecording.isPlaying = true
} // } else {
// audioRecording.isPlaying = false
// }
// }
tblresult.reloadData() tblresult.reloadData()
} }
......
...@@ -108,14 +108,16 @@ extension InvalidServicesViewController: UITableViewDelegate, UITableViewDataSou ...@@ -108,14 +108,16 @@ extension InvalidServicesViewController: UITableViewDelegate, UITableViewDataSou
let selectedService = service.services[indexPath.row] let selectedService = service.services[indexPath.row]
if selectedService.serviceType == .BOOKING { if selectedService.typeId == "booking"{
// if selectedService.serviceType == .BOOKING {
let appointmentdetails = Utils.viewController(storyboardName: "Appointment", ofType: ServiceDetailViewController.self) let appointmentdetails = Utils.viewController(storyboardName: "Appointment", ofType: ServiceDetailViewController.self)
appointmentdetails.orderStatus = .CLOSED appointmentdetails.orderStatus = .CLOSED
// appointmentdetails.serviceStatus = .completed // appointmentdetails.serviceStatus = .completed
appointmentdetails.incrementId = selectedService.incrementId appointmentdetails.incrementId = selectedService.incrementId
appointmentdetails.orderId = selectedService.orderId appointmentdetails.orderId = selectedService.orderId
self.navigationController?.pushViewController(appointmentdetails, animated: true) self.navigationController?.pushViewController(appointmentdetails, animated: true)
} else if selectedService.serviceType == .FAQ { } else if selectedService.typeId == "faq" {
// } else if selectedService.serviceType == .FAQ {
if selectedService.status == .PROCESSING { if selectedService.status == .PROCESSING {
let chatViewController = Utils.viewController(storyboardName: "Home", ofType: OnlineEnquiryViewController.self) let chatViewController = Utils.viewController(storyboardName: "Home", ofType: OnlineEnquiryViewController.self)
...@@ -130,8 +132,8 @@ extension InvalidServicesViewController: UITableViewDelegate, UITableViewDataSou ...@@ -130,8 +132,8 @@ extension InvalidServicesViewController: UITableViewDelegate, UITableViewDataSou
enquiryDetailsViewController.orderId = selectedService.orderId! enquiryDetailsViewController.orderId = selectedService.orderId!
self.navigationController?.pushViewController(enquiryDetailsViewController, animated: true) self.navigationController?.pushViewController(enquiryDetailsViewController, animated: true)
} }
} else if selectedService.typeId == "forms"{
} else if selectedService.serviceType == .FORM{ // } else if selectedService.serviceType == .FORM{
if let form = Form.VC(with: selectedService.incrementId!, orderId: selectedService.orderId!, categoryType: selectedService.categoryType){ if let form = Form.VC(with: selectedService.incrementId!, orderId: selectedService.orderId!, categoryType: selectedService.categoryType){
self.navigationController?.pushViewController(form, animated: true) self.navigationController?.pushViewController(form, animated: true)
} }
......
...@@ -107,8 +107,8 @@ extension OnGoingServicesViewController: UITableViewDelegate, UITableViewDataSou ...@@ -107,8 +107,8 @@ extension OnGoingServicesViewController: UITableViewDelegate, UITableViewDataSou
let selectedService = service.services[indexPath.row] let selectedService = service.services[indexPath.row]
if selectedService.typeId! == "booking" {
if selectedService.serviceType == .BOOKING { // if selectedService.serviceType == .BOOKING {
if selectedService.status == .SERVICE_ONGOING { if selectedService.status == .SERVICE_ONGOING {
let videoCallVC = Utils.viewController(storyboardName: "Appointment", ofType: VideoCallingViewController.self) let videoCallVC = Utils.viewController(storyboardName: "Appointment", ofType: VideoCallingViewController.self)
videoCallVC.orderId = selectedService.orderId! videoCallVC.orderId = selectedService.orderId!
...@@ -120,7 +120,8 @@ extension OnGoingServicesViewController: UITableViewDelegate, UITableViewDataSou ...@@ -120,7 +120,8 @@ extension OnGoingServicesViewController: UITableViewDelegate, UITableViewDataSou
// appointmentdetails.incrementId = selectedService.incrementId // appointmentdetails.incrementId = selectedService.incrementId
// appointmentdetails.orderId = selectedService.orderId // appointmentdetails.orderId = selectedService.orderId
// self.navigationController?.pushViewController(appointmentdetails, animated: true) // self.navigationController?.pushViewController(appointmentdetails, animated: true)
} else if selectedService.serviceType == .FAQ { } else if selectedService.typeId == "faq" {
// } else if selectedService.serviceType == .FAQ {
if selectedService.status == .PROCESSING { if selectedService.status == .PROCESSING {
let chatViewController = Utils.viewController(storyboardName: "Home", ofType: OnlineEnquiryViewController.self) let chatViewController = Utils.viewController(storyboardName: "Home", ofType: OnlineEnquiryViewController.self)
...@@ -135,8 +136,8 @@ extension OnGoingServicesViewController: UITableViewDelegate, UITableViewDataSou ...@@ -135,8 +136,8 @@ extension OnGoingServicesViewController: UITableViewDelegate, UITableViewDataSou
enquiryDetailsViewController.orderId = selectedService.orderId! enquiryDetailsViewController.orderId = selectedService.orderId!
self.navigationController?.pushViewController(enquiryDetailsViewController, animated: true) self.navigationController?.pushViewController(enquiryDetailsViewController, animated: true)
} }
} else if selectedService.typeId == "forms"{
} else if selectedService.serviceType == .FORM{ // } else if selectedService.serviceType == .FORM{
if let form = Form.VC(with: selectedService.incrementId!, orderId: selectedService.orderId!, categoryType: selectedService.categoryType) { if let form = Form.VC(with: selectedService.incrementId!, orderId: selectedService.orderId!, categoryType: selectedService.categoryType) {
self.navigationController?.pushViewController(form, animated: true) self.navigationController?.pushViewController(form, animated: true)
......
...@@ -107,15 +107,16 @@ extension ProcessingViewController: UITableViewDelegate, UITableViewDataSource { ...@@ -107,15 +107,16 @@ extension ProcessingViewController: UITableViewDelegate, UITableViewDataSource {
let selectedService = service.services[indexPath.row] let selectedService = service.services[indexPath.row]
if selectedService.typeId == "booking"{
if selectedService.serviceType == .BOOKING { // if selectedService.serviceType == .BOOKING {
let appointmentdetails = Utils.viewController(storyboardName: "Appointment", ofType: ServiceDetailViewController.self) let appointmentdetails = Utils.viewController(storyboardName: "Appointment", ofType: ServiceDetailViewController.self)
appointmentdetails.orderStatus = .PROCESSING appointmentdetails.orderStatus = .PROCESSING
// appointmentdetails.serviceStatus = .tbc // appointmentdetails.serviceStatus = .tbc
appointmentdetails.incrementId = selectedService.incrementId appointmentdetails.incrementId = selectedService.incrementId
appointmentdetails.orderId = selectedService.orderId appointmentdetails.orderId = selectedService.orderId
self.navigationController?.pushViewController(appointmentdetails, animated: true) self.navigationController?.pushViewController(appointmentdetails, animated: true)
} else if selectedService.serviceType == .FAQ { } else if selectedService.typeId == "faq"{
// } else if selectedService.serviceType == .FAQ {
if selectedService.status == .PROCESSING { if selectedService.status == .PROCESSING {
let chatViewController = Utils.viewController(storyboardName: "Home", ofType: OnlineEnquiryViewController.self) let chatViewController = Utils.viewController(storyboardName: "Home", ofType: OnlineEnquiryViewController.self)
...@@ -130,8 +131,8 @@ extension ProcessingViewController: UITableViewDelegate, UITableViewDataSource { ...@@ -130,8 +131,8 @@ extension ProcessingViewController: UITableViewDelegate, UITableViewDataSource {
enquiryDetailsViewController.orderId = selectedService.orderId! enquiryDetailsViewController.orderId = selectedService.orderId!
self.navigationController?.pushViewController(enquiryDetailsViewController, animated: true) self.navigationController?.pushViewController(enquiryDetailsViewController, animated: true)
} }
} else if selectedService.typeId == "forms"{
} else if selectedService.serviceType == .FORM{ // } else if selectedService.serviceType == .FORM{
if let form = Form.VC(with: selectedService.incrementId!, orderId: selectedService.orderId!, categoryType: selectedService.categoryType) { if let form = Form.VC(with: selectedService.incrementId!, orderId: selectedService.orderId!, categoryType: selectedService.categoryType) {
self.navigationController?.pushViewController(form, animated: true) self.navigationController?.pushViewController(form, animated: true)
......
...@@ -425,15 +425,16 @@ extension MasterReplyCell: UITableViewDelegate, UITableViewDataSource, ResultAud ...@@ -425,15 +425,16 @@ extension MasterReplyCell: UITableViewDelegate, UITableViewDataSource, ResultAud
func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
let audioCell = tableView.dequeueReusableCell(withIdentifier: "ResultAudioCell", for: indexPath) as! ResultAudioCell let audioCell = tableView.dequeueReusableCell(withIdentifier: "ResultAudioCell", for: indexPath) as! ResultAudioCell
audioCell.audioPath = arrayOfAudios[indexPath.row] audioCell.audioPath = arrayOfAudios[indexPath.row]
audioCell.cellIndex = indexPath.row
audioCell.delegate = self audioCell.delegate = self
audioCell.btnPlay.tag = 0 audioCell.btnPlay.tag = indexPath.row
audioCell.audioSlider.value = 0
if indexPath.row == playingAudioAtIndex { if indexPath.row == playingAudioAtIndex {
audioCell.btnPlay.setBackgroundImage(UIImage(named: "pause"), for: .normal) audioCell.btnPlay.setBackgroundImage(UIImage(named: "pause"), for: .normal)
audioCell.btnPlay.tag = 8080 audioCell.isPlayingAudio = true
} else { } else {
audioCell.btnPlay.setBackgroundImage(UIImage(named: "play"), for: .normal) audioCell.btnPlay.setBackgroundImage(UIImage(named: "play"), for: .normal)
audioCell.isPlayingAudio = false
} }
return audioCell return audioCell
} }
...@@ -456,16 +457,16 @@ protocol ResultAudioCellDelegate { ...@@ -456,16 +457,16 @@ protocol ResultAudioCellDelegate {
class ResultAudioCell: UITableViewCell { class ResultAudioCell: UITableViewCell {
@IBOutlet var btnPlay: UIButton! @IBOutlet var btnPlay: UIButton!
@IBOutlet var audioSlider: UISlider!
var audioPath: String? var audioPath: String?
var delegate: ResultAudioCellDelegate? var delegate: ResultAudioCellDelegate?
var cellIndex = 0 var cellIndex = 0
var isPlayingAudio = false
@IBAction func play() { @IBAction func play() {
print("tag = \(btnPlay.tag)")
if btnPlay.tag == 8080 { if isPlayingAudio == true {
Audio.pause() Audio.pause()
btnPlay.tag = 0 btnPlay.tag = 0
delegate?.playingAudioAtIndex(index: 1000) delegate?.playingAudioAtIndex(index: 1000)
...@@ -473,14 +474,15 @@ class ResultAudioCell: UITableViewCell { ...@@ -473,14 +474,15 @@ class ResultAudioCell: UITableViewCell {
} }
if let audioPath = audioPath { if let audioPath = audioPath {
delegate?.playingAudioAtIndex(index: btnPlay.tag)
Audio.playAudio(audioPath: audioPath, success: { Audio.playAudio(audioPath: audioPath, success: {
}, failure: { (errorMesaage) in }, failure: { (errorMesaage) in
self.viewController()?.view.showToast(errorMesaage, position: .bottom, popTime: 2.0, dismissOnTap: false) self.viewController()?.view.showToast(errorMesaage, position: .bottom, popTime: 2.0, dismissOnTap: false)
}) { (progress, duration) in }) { (progress, duration) in
print("progress = \(progress) duration = \(duration)") self.audioSlider.maximumValue = duration
self.audioSlider.value = progress
} }
} else { } else {
......
...@@ -145,8 +145,9 @@ extension HomePageViewController: UITableViewDelegate, UITableViewDataSource { ...@@ -145,8 +145,9 @@ 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?.typeId == "booking" {
// if order.products.first?.serviceType == .BOOKING {
if order.status == .SERVICE_ONGOING { if order.status == .SERVICE_ONGOING {
let videoCallVC = Utils.viewController(storyboardName: "Appointment", ofType: VideoCallingViewController.self) let videoCallVC = Utils.viewController(storyboardName: "Appointment", ofType: VideoCallingViewController.self)
videoCallVC.orderId = order.orderId! videoCallVC.orderId = order.orderId!
...@@ -159,7 +160,8 @@ extension HomePageViewController: UITableViewDelegate, UITableViewDataSource { ...@@ -159,7 +160,8 @@ extension HomePageViewController: UITableViewDelegate, UITableViewDataSource {
self.navigationController?.pushViewController(appointmentdetails, animated: true) self.navigationController?.pushViewController(appointmentdetails, animated: true)
} }
} else if order.products.first?.serviceType == .FAQ { } else if order.products.first?.typeId == "faq" {
// } else if order.products.first?.serviceType == .FAQ {
if order.status == .PROCESSING { if order.status == .PROCESSING {
let chatViewController = Utils.viewController(storyboardName: "Home", ofType: OnlineEnquiryViewController.self) let chatViewController = Utils.viewController(storyboardName: "Home", ofType: OnlineEnquiryViewController.self)
...@@ -178,7 +180,8 @@ extension HomePageViewController: UITableViewDelegate, UITableViewDataSource { ...@@ -178,7 +180,8 @@ extension HomePageViewController: UITableViewDelegate, UITableViewDataSource {
self.navigationController?.pushViewController(enquiryDetailsViewController, animated: true) self.navigationController?.pushViewController(enquiryDetailsViewController, animated: true)
} }
} else if order.products.first?.serviceType == .FORM{ } else if order.products.first?.typeId == "forms" {
// } else if order.products.first?.serviceType == .FORM{
if order.status == .COMPLETE { if order.status == .COMPLETE {
......
...@@ -32,6 +32,7 @@ class OnlineEnquiryViewController: BaseViewController { ...@@ -32,6 +32,7 @@ class OnlineEnquiryViewController: BaseViewController {
var customerId: String? var customerId: String?
var chatCountId = "" var chatCountId = ""
var recordingPermissionGranted = false var recordingPermissionGranted = false
var playAudioAtIndex: Int64 = 10000
override func viewDidLoad() { override func viewDidLoad() {
super.viewDidLoad() super.viewDidLoad()
...@@ -277,11 +278,27 @@ extension OnlineEnquiryViewController: UITableViewDelegate, UITableViewDataSourc ...@@ -277,11 +278,27 @@ extension OnlineEnquiryViewController: UITableViewDelegate, UITableViewDataSourc
if chat.name == "Seller" { if chat.name == "Seller" {
let masterAudioCell = tableView.dequeueReusableCell(withIdentifier: "masterAudio") as! OnlineEnquiryMasterAudioCell let masterAudioCell = tableView.dequeueReusableCell(withIdentifier: "masterAudio") as! OnlineEnquiryMasterAudioCell
masterAudioCell.audioPath = chat.msg masterAudioCell.audioPath = chat.msg
masterAudioCell.delegate = self
masterAudioCell.btnPlay.tag = indexPath.row
masterAudioCell.progressSlider.value = 0.0
if playAudioAtIndex == indexPath.row {
masterAudioCell.btnPlay.setBackgroundImage(UIImage(named: "pause"), for: .normal)
} else {
masterAudioCell.btnPlay.setBackgroundImage(UIImage(named: "play"), for: .normal)
}
return masterAudioCell return masterAudioCell
} else { } else {
let customerAudioCell = tableView.dequeueReusableCell(withIdentifier: "customerAudio") as! OnlineEnquiryCustomerAudioCell let customerAudioCell = tableView.dequeueReusableCell(withIdentifier: "customerAudio") as! OnlineEnquiryCustomerAudioCell
customerAudioCell.audioPath = chat.msg customerAudioCell.audioPath = chat.msg
customerAudioCell.customerProfileImage = customerProfileImage customerAudioCell.customerProfileImage = customerProfileImage
customerAudioCell.delegate = self
customerAudioCell.btnPlay.tag = indexPath.row
customerAudioCell.progressSlider.value = 0.0
if playAudioAtIndex == indexPath.row {
customerAudioCell.btnPlay.setBackgroundImage(UIImage(named: "pause"), for: .normal)
} else {
customerAudioCell.btnPlay.setBackgroundImage(UIImage(named: "play"), for: .normal)
}
return customerAudioCell return customerAudioCell
} }
} }
...@@ -290,6 +307,12 @@ extension OnlineEnquiryViewController: UITableViewDelegate, UITableViewDataSourc ...@@ -290,6 +307,12 @@ extension OnlineEnquiryViewController: UITableViewDelegate, UITableViewDataSourc
} }
} }
extension OnlineEnquiryViewController: OnlineEnquiryMasterAudioCellDelegate, OnlineEnquiryCustomerAudioCellDelegate {
func playPausTapped(atIndex: Int64) {
playAudioAtIndex = atIndex
self.tblChat.reloadData()
}
}
extension OnlineEnquiryViewController: UITextViewDelegate { extension OnlineEnquiryViewController: UITextViewDelegate {
...@@ -352,16 +375,24 @@ class OnlineEnquiryCustomerCell: UITableViewCell { ...@@ -352,16 +375,24 @@ class OnlineEnquiryCustomerCell: UITableViewCell {
} }
} }
protocol OnlineEnquiryMasterAudioCellDelegate {
func playPausTapped(atIndex: Int64)
}
class OnlineEnquiryMasterAudioCell: UITableViewCell { class OnlineEnquiryMasterAudioCell: UITableViewCell {
@IBOutlet var btnPlay: UIButton! @IBOutlet var btnPlay: UIButton!
var audioPath: String?
@IBOutlet var imgMaster: UIImageView! @IBOutlet var imgMaster: UIImageView!
@IBOutlet var progressSlider: UISlider! @IBOutlet var progressSlider: UISlider!
var audioPath: String?
var delegate: OnlineEnquiryMasterAudioCellDelegate?
var isAudioPlaying = false
@IBAction func play() { @IBAction func play() {
delegate?.playPausTapped(atIndex: Int64(btnPlay!.tag))
if let audioPath = audioPath { if let audioPath = audioPath {
Audio.playAudio(audioPath: audioPath, success: { Audio.playAudio(audioPath: audioPath, success: {
...@@ -389,16 +420,24 @@ class OnlineEnquiryMasterAudioCell: UITableViewCell { ...@@ -389,16 +420,24 @@ class OnlineEnquiryMasterAudioCell: UITableViewCell {
} }
protocol OnlineEnquiryCustomerAudioCellDelegate {
func playPausTapped(atIndex: Int64)
}
class OnlineEnquiryCustomerAudioCell: UITableViewCell { class OnlineEnquiryCustomerAudioCell: UITableViewCell {
@IBOutlet var btnPlay: UIButton! @IBOutlet var btnPlay: UIButton!
var audioPath: String?
var customerProfileImage: String?
@IBOutlet var imgCostomer: UIImageView! @IBOutlet var imgCostomer: UIImageView!
@IBOutlet var progressSlider: UISlider! @IBOutlet var progressSlider: UISlider!
var audioPath: String?
var customerProfileImage: String?
var delegate: OnlineEnquiryCustomerAudioCellDelegate?
@IBAction func play() { @IBAction func play() {
delegate?.playPausTapped(atIndex: Int64(btnPlay!.tag))
if let audioPath = audioPath { if let audioPath = audioPath {
Audio.playAudio(audioPath: audioPath, success: { Audio.playAudio(audioPath: audioPath, success: {
......
...@@ -123,8 +123,8 @@ extension MyAllServiceOrderViewController: UITableViewDelegate, UITableViewDataS ...@@ -123,8 +123,8 @@ extension MyAllServiceOrderViewController: UITableViewDelegate, UITableViewDataS
let selectedService = service.services[indexPath.row] let selectedService = service.services[indexPath.row]
if selectedService.typeId == "booking" {
if selectedService.serviceType == .BOOKING { // if selectedService.serviceType == .BOOKING {
let appointmentdetails = Utils.viewController(storyboardName: "Appointment", ofType: ServiceDetailViewController.self) let appointmentdetails = Utils.viewController(storyboardName: "Appointment", ofType: ServiceDetailViewController.self)
switch service.services[indexPath.row].status { switch service.services[indexPath.row].status {
case .CANCELED: case .CANCELED:
...@@ -151,7 +151,8 @@ extension MyAllServiceOrderViewController: UITableViewDelegate, UITableViewDataS ...@@ -151,7 +151,8 @@ extension MyAllServiceOrderViewController: UITableViewDelegate, UITableViewDataS
appointmentdetails.incrementId = selectedService.incrementId appointmentdetails.incrementId = selectedService.incrementId
appointmentdetails.orderId = selectedService.orderId appointmentdetails.orderId = selectedService.orderId
self.navigationController?.pushViewController(appointmentdetails, animated: true) self.navigationController?.pushViewController(appointmentdetails, animated: true)
} else if selectedService.serviceType == .FAQ { } else if selectedService.typeId == "faq" {
// } else if selectedService.serviceType == .FAQ {
if selectedService.status == .PROCESSING { if selectedService.status == .PROCESSING {
let chatViewController = Utils.viewController(storyboardName: "Home", ofType: OnlineEnquiryViewController.self) let chatViewController = Utils.viewController(storyboardName: "Home", ofType: OnlineEnquiryViewController.self)
...@@ -170,8 +171,8 @@ extension MyAllServiceOrderViewController: UITableViewDelegate, UITableViewDataS ...@@ -170,8 +171,8 @@ extension MyAllServiceOrderViewController: UITableViewDelegate, UITableViewDataS
enquiryDetailsViewController.customerName = service.services[indexPath.row].customerName enquiryDetailsViewController.customerName = service.services[indexPath.row].customerName
self.navigationController?.pushViewController(enquiryDetailsViewController, animated: true) self.navigationController?.pushViewController(enquiryDetailsViewController, animated: true)
} }
} else if selectedService.typeId == "form" {
} else if selectedService.serviceType == .FORM{ // } else if selectedService.serviceType == .FORM{
if selectedService.status == .COMPLETE { if selectedService.status == .COMPLETE {
let appointmentdetails = Utils.viewController(storyboardName: "Appointment", ofType: ServiceDetailViewController.self) let appointmentdetails = Utils.viewController(storyboardName: "Appointment", ofType: ServiceDetailViewController.self)
......
...@@ -101,14 +101,15 @@ extension MyCompletedOrdersViewController: UITableViewDelegate, UITableViewDataS ...@@ -101,14 +101,15 @@ extension MyCompletedOrdersViewController: UITableViewDelegate, UITableViewDataS
let selectedService = service.services[indexPath.row] let selectedService = service.services[indexPath.row]
if selectedService.typeId == "booking" {
if selectedService.serviceType == .BOOKING { // if selectedService.serviceType == .BOOKING {
let appointmentdetails = Utils.viewController(storyboardName: "Appointment", ofType: ServiceDetailViewController.self) let appointmentdetails = Utils.viewController(storyboardName: "Appointment", ofType: ServiceDetailViewController.self)
appointmentdetails.serviceStatus = .completed appointmentdetails.serviceStatus = .completed
appointmentdetails.incrementId = selectedService.incrementId appointmentdetails.incrementId = selectedService.incrementId
appointmentdetails.orderId = selectedService.orderId appointmentdetails.orderId = selectedService.orderId
self.navigationController?.pushViewController(appointmentdetails, animated: true) self.navigationController?.pushViewController(appointmentdetails, animated: true)
} else if selectedService.serviceType == .FAQ { } else if selectedService.typeId == "faq" {
// } else if selectedService.serviceType == .FAQ {
if selectedService.status == .PROCESSING { if selectedService.status == .PROCESSING {
let chatViewController = Utils.viewController(storyboardName: "Home", ofType: OnlineEnquiryViewController.self) let chatViewController = Utils.viewController(storyboardName: "Home", ofType: OnlineEnquiryViewController.self)
...@@ -126,7 +127,8 @@ extension MyCompletedOrdersViewController: UITableViewDelegate, UITableViewDataS ...@@ -126,7 +127,8 @@ extension MyCompletedOrdersViewController: UITableViewDelegate, UITableViewDataS
self.navigationController?.pushViewController(enquiryDetailsViewController, animated: true) self.navigationController?.pushViewController(enquiryDetailsViewController, animated: true)
} }
} else if selectedService.serviceType == .FORM{ } else if selectedService.typeId == "forms" {
// } else if selectedService.serviceType == .FORM{
let appointmentdetails = Utils.viewController(storyboardName: "Appointment", ofType: ServiceDetailViewController.self) let appointmentdetails = Utils.viewController(storyboardName: "Appointment", ofType: ServiceDetailViewController.self)
appointmentdetails.incrementId = selectedService.incrementId appointmentdetails.incrementId = selectedService.incrementId
......
...@@ -102,7 +102,8 @@ extension MyOngoingServiceOrderViewController: UITableViewDelegate, UITableViewD ...@@ -102,7 +102,8 @@ extension MyOngoingServiceOrderViewController: UITableViewDelegate, UITableViewD
let selectedService = service.services[indexPath.row] let selectedService = service.services[indexPath.row]
if selectedService.serviceType == .BOOKING { if selectedService.typeId == "booking" {
// if selectedService.serviceType == .BOOKING {
if selectedService.status == .SERVICE_ONGOING { if selectedService.status == .SERVICE_ONGOING {
let videoCallVC = Utils.viewController(storyboardName: "Appointment", ofType: VideoCallingViewController.self) let videoCallVC = Utils.viewController(storyboardName: "Appointment", ofType: VideoCallingViewController.self)
...@@ -115,7 +116,8 @@ extension MyOngoingServiceOrderViewController: UITableViewDelegate, UITableViewD ...@@ -115,7 +116,8 @@ extension MyOngoingServiceOrderViewController: UITableViewDelegate, UITableViewD
// appointmentdetails.incrementId = selectedService.incrementId // appointmentdetails.incrementId = selectedService.incrementId
// appointmentdetails.orderId = selectedService.orderId // appointmentdetails.orderId = selectedService.orderId
// self.navigationController?.pushViewController(appointmentdetails, animated: true) // self.navigationController?.pushViewController(appointmentdetails, animated: true)
} else if selectedService.serviceType == .FAQ { } else if selectedService.typeId == "faq" {
// } else if selectedService.serviceType == .FAQ {
if selectedService.status == .PROCESSING { if selectedService.status == .PROCESSING {
let chatViewController = Utils.viewController(storyboardName: "Home", ofType: OnlineEnquiryViewController.self) let chatViewController = Utils.viewController(storyboardName: "Home", ofType: OnlineEnquiryViewController.self)
...@@ -131,7 +133,8 @@ extension MyOngoingServiceOrderViewController: UITableViewDelegate, UITableViewD ...@@ -131,7 +133,8 @@ extension MyOngoingServiceOrderViewController: UITableViewDelegate, UITableViewD
self.navigationController?.pushViewController(enquiryDetailsViewController, animated: true) self.navigationController?.pushViewController(enquiryDetailsViewController, animated: true)
} }
} else if selectedService.serviceType == .FORM{ } else if selectedService.typeId == "forms" {
// } else if selectedService.serviceType == .FORM{
if let form = Form.VC(with: selectedService.incrementId!, orderId: selectedService.orderId!, categoryType: selectedService.categoryType){ if let form = Form.VC(with: selectedService.incrementId!, orderId: selectedService.orderId!, categoryType: selectedService.categoryType){
self.navigationController?.pushViewController(form, animated: true) self.navigationController?.pushViewController(form, animated: true)
......
...@@ -102,13 +102,15 @@ extension MyUploadResultViewController: UITableViewDelegate, UITableViewDataSour ...@@ -102,13 +102,15 @@ extension MyUploadResultViewController: UITableViewDelegate, UITableViewDataSour
let selectedService = service.services[indexPath.row] let selectedService = service.services[indexPath.row]
if selectedService.serviceType == .BOOKING { if selectedService.typeId == "booking" {
// if selectedService.serviceType == .BOOKING {
let appointmentdetails = Utils.viewController(storyboardName: "Appointment", ofType: ServiceDetailViewController.self) let appointmentdetails = Utils.viewController(storyboardName: "Appointment", ofType: ServiceDetailViewController.self)
appointmentdetails.serviceStatus = .tbc appointmentdetails.serviceStatus = .tbc
appointmentdetails.incrementId = selectedService.incrementId appointmentdetails.incrementId = selectedService.incrementId
appointmentdetails.orderId = selectedService.orderId appointmentdetails.orderId = selectedService.orderId
self.navigationController?.pushViewController(appointmentdetails, animated: true) self.navigationController?.pushViewController(appointmentdetails, animated: true)
} else if selectedService.serviceType == .FAQ { } else if selectedService.typeId == "faq" {
// } else if selectedService.serviceType == .FAQ {
if selectedService.status == .PROCESSING { if selectedService.status == .PROCESSING {
let chatViewController = Utils.viewController(storyboardName: "Home", ofType: OnlineEnquiryViewController.self) let chatViewController = Utils.viewController(storyboardName: "Home", ofType: OnlineEnquiryViewController.self)
...@@ -124,7 +126,8 @@ extension MyUploadResultViewController: UITableViewDelegate, UITableViewDataSour ...@@ -124,7 +126,8 @@ extension MyUploadResultViewController: UITableViewDelegate, UITableViewDataSour
self.navigationController?.pushViewController(enquiryDetailsViewController, animated: true) self.navigationController?.pushViewController(enquiryDetailsViewController, animated: true)
} }
} else if selectedService.serviceType == .FORM{ } else if selectedService.typeId == "forms" {
// } else if selectedService.serviceType == .FORM{
if let form = Form.VC(with: selectedService.incrementId!, orderId: selectedService.orderId!, categoryType: selectedService.categoryType) { if let form = Form.VC(with: selectedService.incrementId!, orderId: selectedService.orderId!, categoryType: selectedService.categoryType) {
self.navigationController?.pushViewController(form, animated: true) self.navigationController?.pushViewController(form, animated: true)
......
...@@ -23,6 +23,9 @@ class EditResult { ...@@ -23,6 +23,9 @@ class EditResult {
func updateResult(for orderId: String, success: @escaping () -> Void, failure: @escaping (_ errorMesage: String) -> Void) { func updateResult(for orderId: String, success: @escaping () -> Void, failure: @escaping (_ errorMesage: String) -> Void) {
print(self.images.count)
print(self.audios.count)
self.uploadAudios(index: 0) { self.uploadAudios(index: 0) {
self.uploadImages(index: 0) { self.uploadImages(index: 0) {
...@@ -30,6 +33,13 @@ class EditResult { ...@@ -30,6 +33,13 @@ class EditResult {
self.uploadedProducts = self.uploadedProducts + "," + product.entityId! self.uploadedProducts = self.uploadedProducts + "," + product.entityId!
} }
if self.uploadedImages.count > 0 {
self.uploadedImages.removeFirst()
}
if self.uploadedAudios.count > 0 {
self.uploadedAudios.removeFirst()
}
let parameters: [String: Any] = ["storeId": UserDefaults.standard.value(forKey: "storeId") as! String, let parameters: [String: Any] = ["storeId": UserDefaults.standard.value(forKey: "storeId") as! String,
"orderId": orderId, "orderId": orderId,
"reply_text": self.message, "reply_text": self.message,
...@@ -38,7 +48,6 @@ class EditResult { ...@@ -38,7 +48,6 @@ class EditResult {
"products": self.uploadedProducts "products": self.uploadedProducts
] ]
SVProgressHUD.show() SVProgressHUD.show()
let headers = [ let headers = [
...@@ -184,7 +193,6 @@ class EditResult { ...@@ -184,7 +193,6 @@ class EditResult {
} }
} }
} }
} }
} }
......
...@@ -54,67 +54,70 @@ class Product { ...@@ -54,67 +54,70 @@ class Product {
var qty: Int = 0 var qty: Int = 0
var serviceType = ServiceType.UNKNOWN var serviceType = ServiceType.UNKNOWN
var categoryType = CategoryType.Unknown var categoryType = CategoryType.Unknown
var typeId: String?
func initWithJSON(json: Any) { func initWithJSON(json: Any) {
if let response = json as? [String: Any] { if let response = json as? [String: Any] {
self.productId = response["productId"] as? String self.productId = response["productId"] as? String
self.name = response["name"] as? String self.name = response["name"] as? String
self.qty = response["qty"] as! Int self.qty = response["qty"] as! Int
self.typeId = response["typeId"] as? String
if let categoryType_ = response["category_type"] as? String {
self.categoryType = CategoryType(rawValue: categoryType_)! // if let categoryType_ = response["category_type"] as? String {
// self.categoryType = CategoryType(rawValue: categoryType_)!
switch self.categoryType { //
case .OnlineFAQ: // switch self.categoryType {
self.serviceType = .FAQ // case .OnlineFAQ:
// self.serviceType = .FAQ
case .FortuneOfTheYear: //
fallthrough // case .FortuneOfTheYear:
case .VideoFortuneTelling: // fallthrough
fallthrough // case .VideoFortuneTelling:
case .OnlineFaceReading: // fallthrough
self.serviceType = .BOOKING // case .OnlineFaceReading:
// self.serviceType = .BOOKING
//
case .IndividualNamingServiceNamed: //
fallthrough // case .IndividualNamingServiceNamed:
case .IndividualNamingServiceReNamedChangeName: // fallthrough
fallthrough // case .IndividualNamingServiceReNamedChangeName:
case .CompanyNamingServiceNamed: // fallthrough
fallthrough // case .CompanyNamingServiceNamed:
case .CompanyNamingServiceReNamedChangeName: // fallthrough
fallthrough // case .CompanyNamingServiceReNamedChangeName:
case .FloorPlanFengShuiGeomancy: // fallthrough
fallthrough // case .FloorPlanFengShuiGeomancy:
case .FloorPlanFengShuiCorporateFengShui: // fallthrough
fallthrough // case .FloorPlanFengShuiCorporateFengShui:
case .OnsiteServiceGeomancy: // fallthrough
fallthrough // case .OnsiteServiceGeomancy:
case .OnsiteServiceCorporateFengShui: // fallthrough
fallthrough // case .OnsiteServiceCorporateFengShui:
case .Groundbreaking: // fallthrough
fallthrough // case .Groundbreaking:
case .Registration: // fallthrough
fallthrough // case .Registration:
case .MovingHouse: // fallthrough
fallthrough // case .MovingHouse:
case .MovingCompany: // fallthrough
fallthrough // case .MovingCompany:
case .StartOpeningBusiness: // fallthrough
fallthrough // case .StartOpeningBusiness:
case .Marriage: // fallthrough
fallthrough // case .Marriage:
case .GODSetting: // fallthrough
fallthrough // case .GODSetting:
case .BedSetting: // fallthrough
self.serviceType = .FORM // case .BedSetting:
// self.serviceType = .FORM
case .MoreServices: //
self.serviceType = .MORE // case .MoreServices:
case .Unknown: // self.serviceType = .MORE
self.serviceType = .UNKNOWN // case .Unknown:
} // self.serviceType = .UNKNOWN
} // }
// }
} }
} }
......
...@@ -39,6 +39,8 @@ class Service { ...@@ -39,6 +39,8 @@ class Service {
var serviceType = ServiceType.UNKNOWN var serviceType = ServiceType.UNKNOWN
var categoryType = CategoryType.Unknown var categoryType = CategoryType.Unknown
var typeId: String?
var currentPage = 1 var currentPage = 1
var maxPageNo = 0 var maxPageNo = 0
...@@ -48,8 +50,6 @@ class Service { ...@@ -48,8 +50,6 @@ class Service {
func initWithJSON(json: [String: Any]) { func initWithJSON(json: [String: Any]) {
print(json)
if let status = json["status"] as? String { if let status = json["status"] as? String {
self.status = MyServiceStatus(rawValue: status)! self.status = MyServiceStatus(rawValue: status)!
} }
...@@ -62,60 +62,61 @@ class Service { ...@@ -62,60 +62,61 @@ class Service {
self.productName = productInfo["name"] as? String self.productName = productInfo["name"] as? String
self.productId = productInfo["productId"] as? String self.productId = productInfo["productId"] as? String
self.customerId = productInfo["customer_id"] as? String self.customerId = productInfo["customer_id"] as? String
self.typeId = productInfo["typeId"] as? String
if let categoryType_ = productInfo["category_type"] as? String {
self.categoryType = CategoryType(rawValue: categoryType_)! // if let categoryType_ = productInfo["category_type"] as? String {
// self.categoryType = CategoryType(rawValue: categoryType_)!
switch self.categoryType { //
case .OnlineFAQ: // switch self.categoryType {
self.serviceType = .FAQ // case .OnlineFAQ:
// self.serviceType = .FAQ
case .FortuneOfTheYear: //
fallthrough // case .FortuneOfTheYear:
case .VideoFortuneTelling: // fallthrough
fallthrough // case .VideoFortuneTelling:
case .OnlineFaceReading: // fallthrough
self.serviceType = .BOOKING // case .OnlineFaceReading:
// self.serviceType = .BOOKING
case .IndividualNamingServiceNamed: //
fallthrough // case .IndividualNamingServiceNamed:
case .IndividualNamingServiceReNamedChangeName: // fallthrough
fallthrough // case .IndividualNamingServiceReNamedChangeName:
case .CompanyNamingServiceNamed: // fallthrough
fallthrough // case .CompanyNamingServiceNamed:
case .CompanyNamingServiceReNamedChangeName: // fallthrough
fallthrough // case .CompanyNamingServiceReNamedChangeName:
case .FloorPlanFengShuiGeomancy: // fallthrough
fallthrough // case .FloorPlanFengShuiGeomancy:
case .FloorPlanFengShuiCorporateFengShui: // fallthrough
fallthrough // case .FloorPlanFengShuiCorporateFengShui:
case .OnsiteServiceGeomancy: // fallthrough
fallthrough // case .OnsiteServiceGeomancy:
case .OnsiteServiceCorporateFengShui: // fallthrough
fallthrough // case .OnsiteServiceCorporateFengShui:
case .Groundbreaking: // fallthrough
fallthrough // case .Groundbreaking:
case .Registration: // fallthrough
fallthrough // case .Registration:
case .MovingHouse: // fallthrough
fallthrough // case .MovingHouse:
case .MovingCompany: // fallthrough
fallthrough // case .MovingCompany:
case .StartOpeningBusiness: // fallthrough
fallthrough // case .StartOpeningBusiness:
case .Marriage: // fallthrough
fallthrough // case .Marriage:
case .GODSetting: // fallthrough
fallthrough // case .GODSetting:
case .BedSetting: // fallthrough
self.serviceType = .FORM // case .BedSetting:
// self.serviceType = .FORM
case .MoreServices: //
self.serviceType = .MORE // case .MoreServices:
case .Unknown: // self.serviceType = .MORE
self.serviceType = .UNKNOWN // case .Unknown:
} // self.serviceType = .UNKNOWN
} // }
// }
} }
} }
......
...@@ -16,8 +16,9 @@ class Audio { ...@@ -16,8 +16,9 @@ class Audio {
var audioPlayer: AVPlayer? var audioPlayer: AVPlayer?
var audioPlayerForLocalFile: AVAudioPlayer? var audioPlayerForLocalFile: AVAudioPlayer?
var currentRecordingPath: String? var currentRecordingPath: String?
var timer: Timer?
static let shared = Audio() static let shared = Audio()
var Timestamp: String { var Timestamp: String {
let date = Date(); let date = Date();
let formatter = DateFormatter() let formatter = DateFormatter()
...@@ -63,8 +64,7 @@ class Audio { ...@@ -63,8 +64,7 @@ class Audio {
class func playAudio(audioPath: String, success:() -> Void, failure: (_ message: String) -> Void, progress: @escaping (_ progress: Float, _ duration: Float) -> Void) { class func playAudio(audioPath: String, success:() -> Void, failure: (_ message: String) -> Void, progress: @escaping (_ progress: Float, _ duration: Float) -> Void) {
// class func playAudio(audioPath: String, success:() -> Void, failure: (_ message: String) -> Void) { // class func playAudio(audioPath: String, success:() -> Void, failure: (_ message: String) -> Void) {
if audioPath.first == "/" { // local file path if audioPath.first == "/" { // local file path
let audioURL = URL(fileURLWithPath: audioPath) let audioURL = URL(fileURLWithPath: audioPath)
do { do {
...@@ -74,6 +74,21 @@ class Audio { ...@@ -74,6 +74,21 @@ class Audio {
try Audio.shared.audioPlayerForLocalFile = AVAudioPlayer(contentsOf: audioURL) try Audio.shared.audioPlayerForLocalFile = AVAudioPlayer(contentsOf: audioURL)
Audio.shared.audioPlayerForLocalFile!.prepareToPlay() Audio.shared.audioPlayerForLocalFile!.prepareToPlay()
Audio.shared.audioPlayerForLocalFile!.play() Audio.shared.audioPlayerForLocalFile!.play()
Audio.shared.timer = Timer.scheduledTimer(withTimeInterval: 1.0, repeats: true) { (timer) in
let currentTime = Float(Audio.shared.audioPlayerForLocalFile!.currentTime)
let duration = Float(Audio.shared.audioPlayerForLocalFile!.duration)
progress(Float(currentTime), Float(duration.isNaN == true ? 0.0 : duration))
if Audio.shared.audioPlayerForLocalFile?.isPlaying == true {
progress(Float(currentTime), Float(duration.isNaN == true ? 0.0 : duration))
} else {
progress(1000.0, 1000.0)
Audio.shared.timer?.invalidate()
}
}
success() success()
} catch { } catch {
failure(error.localizedDescription) failure(error.localizedDescription)
...@@ -112,6 +127,7 @@ class Audio { ...@@ -112,6 +127,7 @@ class Audio {
if Audio.shared.audioPlayer != nil { if Audio.shared.audioPlayer != nil {
Audio.shared.audioPlayer!.pause() Audio.shared.audioPlayer!.pause()
Audio.shared.audioPlayerForLocalFile?.pause() Audio.shared.audioPlayerForLocalFile?.pause()
Audio.shared.timer?.invalidate()
} }
} }
......
...@@ -558,10 +558,18 @@ ...@@ -558,10 +558,18 @@
<action selector="play" destination="r0F-XL-bfW" eventType="touchUpInside" id="6BG-4Q-rEd"/> <action selector="play" destination="r0F-XL-bfW" eventType="touchUpInside" id="6BG-4Q-rEd"/>
</connections> </connections>
</button> </button>
<slider opaque="NO" userInteractionEnabled="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" minValue="0.0" maxValue="1" translatesAutoresizingMaskIntoConstraints="NO" id="eRI-gr-3X6">
<rect key="frame" x="32" y="-0.5" width="305" height="31"/>
<color key="minimumTrackTintColor" red="0.023529411760000001" green="0.41960784309999999" blue="0.64313725489999995" alpha="1" colorSpace="calibratedRGB"/>
<color key="maximumTrackTintColor" red="0.87450980389999999" green="0.97254901959999995" blue="0.99607843139999996" alpha="0.5" colorSpace="custom" customColorSpace="sRGB"/>
</slider>
</subviews> </subviews>
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> <color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<constraints> <constraints>
<constraint firstAttribute="trailing" secondItem="eRI-gr-3X6" secondAttribute="trailing" constant="8" id="E12-st-hRI"/>
<constraint firstItem="eRI-gr-3X6" firstAttribute="leading" secondItem="yGv-zf-IaV" secondAttribute="trailing" constant="10" id="JE2-ds-xDi"/>
<constraint firstItem="yGv-zf-IaV" firstAttribute="top" secondItem="Rx1-Ax-3f5" secondAttribute="top" constant="4" id="Rqw-PN-6oS"/> <constraint firstItem="yGv-zf-IaV" firstAttribute="top" secondItem="Rx1-Ax-3f5" secondAttribute="top" constant="4" id="Rqw-PN-6oS"/>
<constraint firstItem="eRI-gr-3X6" firstAttribute="centerY" secondItem="yGv-zf-IaV" secondAttribute="centerY" id="iVP-1F-Vgc"/>
<constraint firstAttribute="bottom" secondItem="yGv-zf-IaV" secondAttribute="bottom" constant="4" id="l4s-1u-KjK"/> <constraint firstAttribute="bottom" secondItem="yGv-zf-IaV" secondAttribute="bottom" constant="4" id="l4s-1u-KjK"/>
<constraint firstItem="yGv-zf-IaV" firstAttribute="leading" secondItem="Rx1-Ax-3f5" secondAttribute="leading" constant="3" id="zyH-E2-dlH"/> <constraint firstItem="yGv-zf-IaV" firstAttribute="leading" secondItem="Rx1-Ax-3f5" secondAttribute="leading" constant="3" id="zyH-E2-dlH"/>
</constraints> </constraints>
...@@ -583,6 +591,7 @@ ...@@ -583,6 +591,7 @@
</constraints> </constraints>
</tableViewCellContentView> </tableViewCellContentView>
<connections> <connections>
<outlet property="audioSlider" destination="eRI-gr-3X6" id="G8U-IS-bqV"/>
<outlet property="btnPlay" destination="yGv-zf-IaV" id="Kdj-5n-7R4"/> <outlet property="btnPlay" destination="yGv-zf-IaV" id="Kdj-5n-7R4"/>
</connections> </connections>
</tableViewCell> </tableViewCell>
...@@ -1545,37 +1554,37 @@ ...@@ -1545,37 +1554,37 @@
<rect key="frame" x="0.0" y="0.0" width="375" height="44"/> <rect key="frame" x="0.0" y="0.0" width="375" height="44"/>
<autoresizingMask key="autoresizingMask"/> <autoresizingMask key="autoresizingMask"/>
<subviews> <subviews>
<imageView userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="audioPlay" translatesAutoresizingMaskIntoConstraints="NO" id="Vd1-Qh-LRC">
<rect key="frame" x="11" y="3" width="39" height="38"/>
<constraints>
<constraint firstAttribute="width" constant="39" id="4hP-kc-Y97"/>
<constraint firstAttribute="height" constant="38" id="FW3-5w-7Av"/>
</constraints>
</imageView>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="7Ar-da-bPa"> <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="7Ar-da-bPa">
<rect key="frame" x="0.0" y="0.0" width="89" height="44"/> <rect key="frame" x="0.0" y="0.0" width="47" height="44"/>
<constraints> <constraints>
<constraint firstAttribute="height" constant="44" id="Ne6-iw-IEu"/> <constraint firstAttribute="width" constant="47" id="TMw-AN-UkD"/>
<constraint firstAttribute="width" constant="89" id="ez5-RD-L9b"/> <constraint firstAttribute="height" constant="44" id="yBa-IU-Yk2"/>
</constraints> </constraints>
<state key="normal"> <state key="normal" backgroundImage="play">
<color key="titleColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> <color key="titleColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
</state> </state>
<connections> <connections>
<action selector="playAudio" destination="EvU-sv-eXU" eventType="touchUpInside" id="UnW-zD-sTt"/> <action selector="playAudio" destination="EvU-sv-eXU" eventType="touchUpInside" id="UnW-zD-sTt"/>
</connections> </connections>
</button> </button>
<slider opaque="NO" userInteractionEnabled="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" minValue="0.0" maxValue="1" translatesAutoresizingMaskIntoConstraints="NO" id="8QS-WD-X05">
<rect key="frame" x="53" y="7" width="309" height="31"/>
<color key="minimumTrackTintColor" red="0.023529411760000001" green="0.41960784309999999" blue="0.64313725489999995" alpha="1" colorSpace="calibratedRGB"/>
<color key="maximumTrackTintColor" red="0.87450980389999999" green="0.97254901959999995" blue="0.99607843139999996" alpha="0.5" colorSpace="custom" customColorSpace="sRGB"/>
</slider>
</subviews> </subviews>
<constraints> <constraints>
<constraint firstItem="Vd1-Qh-LRC" firstAttribute="top" secondItem="3fD-Vq-g7O" secondAttribute="top" constant="3" id="5ai-C5-pkv"/> <constraint firstAttribute="trailing" secondItem="8QS-WD-X05" secondAttribute="trailing" constant="15" id="2rK-p9-Jy9"/>
<constraint firstItem="7Ar-da-bPa" firstAttribute="top" secondItem="3fD-Vq-g7O" secondAttribute="top" id="GC0-CK-Htq"/> <constraint firstItem="7Ar-da-bPa" firstAttribute="leading" secondItem="3fD-Vq-g7O" secondAttribute="leading" id="4bn-hg-QNQ"/>
<constraint firstItem="7Ar-da-bPa" firstAttribute="leading" secondItem="3fD-Vq-g7O" secondAttribute="leading" id="PhO-Ke-Ijq"/> <constraint firstItem="8QS-WD-X05" firstAttribute="leading" secondItem="7Ar-da-bPa" secondAttribute="trailing" constant="8" id="cRo-iF-LTL"/>
<constraint firstItem="Vd1-Qh-LRC" firstAttribute="leading" secondItem="3fD-Vq-g7O" secondAttribute="leading" constant="11" id="jl3-rd-0Rl"/> <constraint firstItem="8QS-WD-X05" firstAttribute="top" secondItem="3fD-Vq-g7O" secondAttribute="top" constant="7" id="fjI-Ua-wzP"/>
<constraint firstAttribute="bottom" secondItem="7Ar-da-bPa" secondAttribute="bottom" id="knO-e4-FMR"/> <constraint firstItem="7Ar-da-bPa" firstAttribute="centerY" secondItem="3fD-Vq-g7O" secondAttribute="centerY" id="kB7-eu-QKO"/>
<constraint firstAttribute="bottom" secondItem="8QS-WD-X05" secondAttribute="bottom" constant="7" id="uvg-g3-Yyb"/>
</constraints> </constraints>
</tableViewCellContentView> </tableViewCellContentView>
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> <color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<connections> <connections>
<outlet property="audioSlider" destination="8QS-WD-X05" id="Bzq-xV-2da"/>
<outlet property="btnPlay" destination="7Ar-da-bPa" id="EYS-QQ-H5U"/> <outlet property="btnPlay" destination="7Ar-da-bPa" id="EYS-QQ-H5U"/>
</connections> </connections>
</tableViewCell> </tableViewCell>
...@@ -2780,7 +2789,6 @@ ...@@ -2780,7 +2789,6 @@
<resources> <resources>
<image name="Audio" width="64" height="81"/> <image name="Audio" width="64" height="81"/>
<image name="appointment" width="20" height="20"/> <image name="appointment" width="20" height="20"/>
<image name="audioPlay" width="1559" height="1562"/>
<image name="back" width="18" height="31"/> <image name="back" width="18" height="31"/>
<image name="border" width="228" height="228"/> <image name="border" width="228" height="228"/>
<image name="cellCardView" width="712" height="230"/> <image name="cellCardView" width="712" height="230"/>
......
...@@ -1626,7 +1626,7 @@ ...@@ -1626,7 +1626,7 @@
<constraint firstAttribute="height" constant="45" id="XbZ-vL-zoL"/> <constraint firstAttribute="height" constant="45" id="XbZ-vL-zoL"/>
<constraint firstAttribute="width" constant="45" id="Z29-nc-MV1"/> <constraint firstAttribute="width" constant="45" id="Z29-nc-MV1"/>
</constraints> </constraints>
<state key="normal" image="play"/> <state key="normal" backgroundImage="play"/>
<connections> <connections>
<action selector="play" destination="vtw-sw-ByE" eventType="touchUpInside" id="1bv-0J-FCh"/> <action selector="play" destination="vtw-sw-ByE" eventType="touchUpInside" id="1bv-0J-FCh"/>
</connections> </connections>
...@@ -1683,7 +1683,7 @@ ...@@ -1683,7 +1683,7 @@
<constraint firstAttribute="width" constant="45" id="79P-yY-OHu"/> <constraint firstAttribute="width" constant="45" id="79P-yY-OHu"/>
<constraint firstAttribute="height" constant="45" id="kNY-xT-qzo"/> <constraint firstAttribute="height" constant="45" id="kNY-xT-qzo"/>
</constraints> </constraints>
<state key="normal" image="play"/> <state key="normal" backgroundImage="play"/>
<connections> <connections>
<action selector="play" destination="LQQ-dP-WjW" eventType="touchUpInside" id="REZ-mg-ckA"/> <action selector="play" destination="LQQ-dP-WjW" eventType="touchUpInside" id="REZ-mg-ckA"/>
</connections> </connections>
......
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