Completed Report Module

This commit is contained in:
2024-08-08 18:47:13 +05:30
parent 0348f07230
commit 08bf5514e2
29 changed files with 1216 additions and 117 deletions

View File

@@ -0,0 +1,99 @@
//
// MyOrderDetailsVC.swift
// WOKA
//
// Created by MacBook Pro on 08/08/24.
//
import UIKit
import Alamofire
class MyOrderDetailsVC: UIViewController {
@IBOutlet weak var orderIDNumber: UILabel!
@IBOutlet weak var airWayBillNo: UILabel!
@IBOutlet weak var status: UILabel!
@IBOutlet weak var expectedDate: UILabel!
@IBOutlet weak var tableView: UITableView!
var orderID : String?
var data : OrderDetailsDM.ResultData?
override func viewDidLoad() {
super.viewDidLoad()
setupCell()
if let orderID{
getOrdersDetails(orderID: orderID)
}
}
func setupCell(){
tableView.register(UINib(nibName: K.CellIdentifier.SideBarNav.myOrderDetailsCell, bundle: nil), forCellReuseIdentifier: K.CellIdentifier.SideBarNav.myOrderDetailsCell)
tableView.delegate = self
tableView.dataSource = self
}
// MARK: - Get MyORders
func getOrdersDetails(orderID : String){
Utilities.startProgressHUD()
let headers : HTTPHeaders = ["Accept-Language" : AuthFunc.shareInstance.languageSelected == .english ? "English" : "Hindi",
"access-token": AuthFunc.shareInstance.getAccessToken()]
let url = "\(APIEndPoints.SideBarNav.order_status_track )/\(orderID)"
NetworkManager.shareInstance.apiRequest(url: url, method: .get, headers : headers) { [weak self](result : Result<BaseResponseModel<OrderDetailsDM>, NetworkManager.APIError>) in
switch result{
case .success(let data):
switch data.success{
case 0:
Utilities.dismissProgressHUD()
return
case 1:
Utilities.dismissProgressHUD()
guard let data = data.data?.result?.first , let self else{return}
self.data = data
self.tableView.reloadData()
setData()
default:
break
}
case .failure(let error):
Utilities.dismissProgressHUD()
print(error)
}
}
}
func scrollToBottom(animated: Bool) {
let bottomOffset = CGPoint(x: 0, y: tableView.contentSize.height - tableView.bounds.size.height)
if bottomOffset.y > 0 {
tableView.setContentOffset(bottomOffset, animated: animated)
}
}
func setData(){
if let data{
self.orderIDNumber.text = orderID ?? "NA"
self.airWayBillNo.text = data.awbno
self.status.text = data.shipmentLatestStatus
self.expectedDate.text = data.edd
}
}
}
// MARK: - TableView DataSource , Delegates
extension MyOrderDetailsVC : TableViewSRC{
func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
return self.data?.scanDetail?.count ?? 0
}
func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
let cell = tableView.dequeueReusableCell(withIdentifier: K.CellIdentifier.SideBarNav.myOrderDetailsCell) as! MyOrderDetailsCell
if let data = self.data?.scanDetail?[indexPath.row]{
cell.setData(data: data)
}
return cell
}
}

View File

@@ -11,11 +11,12 @@ class MyOrdersVC: UIViewController {
var vm = MyOrdersVM()
@IBOutlet weak var tableView: UITableView!
override func viewDidLoad() {
super.viewDidLoad()
vm.vc = self
vm.initView()
}
override func viewWillAppear(_ animated: Bool) {
@@ -39,3 +40,26 @@ class MyOrdersVC: UIViewController {
}
}
// MARK: - TableView DataSource , Delegates
extension MyOrdersVC : TableViewSRC{
func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
return vm.orderData.count
}
func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
let cell = tableView.dequeueReusableCell(withIdentifier: K.CellIdentifier.SideBarNav.myOrderCell) as! MyOrderCell
let data = vm.orderData[indexPath.row]
cell.setData(data: data)
return cell
}
func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
let sb = UIStoryboard(name: K.StoryBoard.sideBarNav, bundle: nil)
let vcPush = sb.instantiateViewController(withIdentifier: K.StoryBoardID.SideBarNav.myOrderDetailsVC) as! MyOrderDetailsVC
let orderID = vm.orderData[indexPath.row].orderID
vcPush.orderID = orderID
self.navigationController?.present(vcPush, animated: true)
}
}

View File

@@ -0,0 +1,48 @@
//
// OrderDetailsDM.swift
// WOKA
//
// Created by MacBook Pro on 08/08/24.
//
import Foundation
// MARK: - OrderDetailsDM
struct OrderDetailsDM: Codable {
let result: [ResultData]?
// MARK: - ResultData
struct ResultData: Codable {
let awbno: String?
let orderno: String?
let ordertype, shipmentLatestStatusCode, shipmentLatestStatus, edd: String?
let scanDetail: [ScanDetail]?
enum CodingKeys: String, CodingKey {
case awbno, orderno, ordertype
case shipmentLatestStatusCode = "shipment_latest_status_code"
case shipmentLatestStatus = "shipment_latest_status"
case edd
case scanDetail = "scan_detail"
}
}
// MARK: - ScanDetail
struct ScanDetail: Codable {
let awbno: String?
let orderno: String?
let status, statusCode, updatedDate, location: String?
let expDelivery, reasonCode, remarks: String?
enum CodingKeys: String, CodingKey {
case awbno, orderno, status
case statusCode = "status_code"
case updatedDate = "updated_date"
case location
case expDelivery = "exp_delivery"
case reasonCode = "reason_code"
case remarks
}
}
}

View File

@@ -669,34 +669,178 @@
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="OrderBottom" translatesAutoresizingMaskIntoConstraints="NO" id="uST-2b-cz5">
<rect key="frame" x="0.0" y="606" width="414" height="320"/>
</imageView>
<tableView clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" dataMode="prototypes" style="plain" separatorStyle="none" rowHeight="-1" estimatedRowHeight="-1" sectionHeaderHeight="-1" estimatedSectionHeaderHeight="-1" sectionFooterHeight="-1" estimatedSectionFooterHeight="-1" translatesAutoresizingMaskIntoConstraints="NO" id="jgA-2K-hR1">
<rect key="frame" x="0.0" y="48" width="414" height="814"/>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
</tableView>
</subviews>
<viewLayoutGuide key="safeArea" id="RtW-jF-CpU"/>
<color key="backgroundColor" red="0.82745098039215681" green="0.93725490196078431" blue="0.97254901960784312" alpha="1" colorSpace="calibratedRGB"/>
<constraints>
<constraint firstItem="jgA-2K-hR1" firstAttribute="leading" secondItem="RtW-jF-CpU" secondAttribute="leading" id="0PL-3g-7wZ"/>
<constraint firstAttribute="bottom" secondItem="uST-2b-cz5" secondAttribute="bottom" constant="-30" id="FHy-EH-6qI"/>
<constraint firstItem="uST-2b-cz5" firstAttribute="height" secondItem="6qN-3r-YK8" secondAttribute="height" multiplier="0.357143" id="RWm-br-45y"/>
<constraint firstItem="RtW-jF-CpU" firstAttribute="trailing" secondItem="uST-2b-cz5" secondAttribute="trailing" id="SKC-J8-UrF"/>
<constraint firstItem="jgA-2K-hR1" firstAttribute="bottom" secondItem="RtW-jF-CpU" secondAttribute="bottom" id="pVR-NO-Mn0"/>
<constraint firstItem="jgA-2K-hR1" firstAttribute="top" secondItem="RtW-jF-CpU" secondAttribute="top" id="qUe-UL-MzV"/>
<constraint firstItem="jgA-2K-hR1" firstAttribute="trailing" secondItem="RtW-jF-CpU" secondAttribute="trailing" id="t0B-4g-MTp"/>
<constraint firstItem="uST-2b-cz5" firstAttribute="leading" secondItem="RtW-jF-CpU" secondAttribute="leading" id="v2g-Sy-ZG1"/>
</constraints>
</view>
<connections>
<outlet property="tableView" destination="jgA-2K-hR1" id="c4m-gY-4Vw"/>
</connections>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="4at-4P-i4I" userLabel="First Responder" customClass="UIResponder" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="4120" y="-34"/>
<point key="canvasLocation" x="4118.840579710145" y="-34.151785714285715"/>
</scene>
<!--My Order DetailsVC-->
<scene sceneID="MJH-Nj-Tty">
<objects>
<viewController storyboardIdentifier="MyOrderDetailsVC" id="iq2-ef-Mlf" customClass="MyOrderDetailsVC" customModule="WOKA" customModuleProvider="target" sceneMemberID="viewController">
<view key="view" contentMode="scaleToFill" id="xrt-Pk-mPa">
<rect key="frame" x="0.0" y="0.0" width="414" height="896"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="hfz-KR-Jh7">
<rect key="frame" x="0.0" y="0.0" width="414" height="15"/>
<color key="backgroundColor" name="ImageDarkBlue"/>
<constraints>
<constraint firstAttribute="height" constant="15" id="CtV-ZL-cNd"/>
</constraints>
</view>
<stackView opaque="NO" contentMode="scaleToFill" axis="vertical" spacing="7" translatesAutoresizingMaskIntoConstraints="NO" id="yKd-Wm-7Eb">
<rect key="frame" x="10" y="58" width="394" height="150.5"/>
<subviews>
<stackView opaque="NO" contentMode="scaleToFill" axis="vertical" alignment="center" translatesAutoresizingMaskIntoConstraints="NO" id="gHG-Sq-26N">
<rect key="frame" x="10" y="15" width="374" height="24"/>
<subviews>
<stackView opaque="NO" contentMode="scaleToFill" alignment="center" spacing="3" translatesAutoresizingMaskIntoConstraints="NO" id="qa1-U8-wO9">
<rect key="frame" x="91.5" y="0.0" width="191" height="24"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="252" text="Order ID :" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="0pK-Sr-Zu5">
<rect key="frame" x="0.0" y="0.0" width="87" height="24"/>
<fontDescription key="fontDescription" name="Exo2-Bold" family="Exo 2" pointSize="20"/>
<color key="textColor" name="ImageDarkBlue"/>
<nil key="highlightedColor"/>
</label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="252" text="W12121212" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="XOs-lG-BTm">
<rect key="frame" x="90" y="0.0" width="101" height="24"/>
<fontDescription key="fontDescription" name="Exo2-Bold" family="Exo 2" pointSize="20"/>
<color key="textColor" name="ImageDarkBlue"/>
<nil key="highlightedColor"/>
</label>
</subviews>
</stackView>
</subviews>
</stackView>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="Tmr-Rh-Yrb">
<rect key="frame" x="10" y="46" width="374" height="10"/>
<color key="backgroundColor" systemColor="systemBackgroundColor"/>
<constraints>
<constraint firstAttribute="height" constant="10" id="aWw-aP-Xz1"/>
</constraints>
</view>
<stackView opaque="NO" contentMode="scaleToFill" spacing="3" translatesAutoresizingMaskIntoConstraints="NO" id="Yxd-Vl-RCh">
<rect key="frame" x="10" y="63" width="374" height="19.5"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="252" text="AIRWAY BILL NUMBER :" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="fQg-ea-PMw">
<rect key="frame" x="0.0" y="0.0" width="135" height="19.5"/>
<fontDescription key="fontDescription" name="Exo2-Regular" family="Exo 2" pointSize="13"/>
<color key="textColor" white="0.66666666669999997" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<nil key="highlightedColor"/>
</label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="249" verticalHuggingPriority="252" text="W12121212" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="hBF-FJ-TnF">
<rect key="frame" x="138" y="0.0" width="236" height="19.5"/>
<fontDescription key="fontDescription" name="Exo2-Bold" family="Exo 2" pointSize="16"/>
<color key="textColor" name="ImageDarkBlue"/>
<nil key="highlightedColor"/>
</label>
</subviews>
</stackView>
<stackView opaque="NO" contentMode="scaleToFill" spacing="3" translatesAutoresizingMaskIntoConstraints="NO" id="AnB-y4-ytG">
<rect key="frame" x="10" y="89.5" width="374" height="19.5"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="252" text="STATUS :" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="zM4-Fp-a8u">
<rect key="frame" x="0.0" y="0.0" width="51" height="19.5"/>
<fontDescription key="fontDescription" name="Exo2-Regular" family="Exo 2" pointSize="13"/>
<color key="textColor" white="0.66666666669999997" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<nil key="highlightedColor"/>
</label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="249" verticalHuggingPriority="252" text="W12121212" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="75q-hi-LB9">
<rect key="frame" x="54" y="0.0" width="320" height="19.5"/>
<fontDescription key="fontDescription" name="Exo2-Bold" family="Exo 2" pointSize="16"/>
<color key="textColor" name="ImageDarkBlue"/>
<nil key="highlightedColor"/>
</label>
</subviews>
</stackView>
<stackView opaque="NO" contentMode="scaleToFill" spacing="3" translatesAutoresizingMaskIntoConstraints="NO" id="0ZT-T1-3cR">
<rect key="frame" x="10" y="116" width="374" height="19.5"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="252" text="EXPECTED DATE :" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="YyJ-JQ-UN1">
<rect key="frame" x="0.0" y="0.0" width="101" height="19.5"/>
<fontDescription key="fontDescription" name="Exo2-Regular" family="Exo 2" pointSize="13"/>
<color key="textColor" white="0.66666666669999997" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<nil key="highlightedColor"/>
</label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="249" verticalHuggingPriority="252" text="W12121212" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="2nO-72-dWp">
<rect key="frame" x="104" y="0.0" width="270" height="19.5"/>
<fontDescription key="fontDescription" name="Exo2-Bold" family="Exo 2" pointSize="16"/>
<color key="textColor" name="ImageDarkBlue"/>
<nil key="highlightedColor"/>
</label>
</subviews>
</stackView>
</subviews>
<edgeInsets key="layoutMargins" top="15" left="10" bottom="15" right="10"/>
</stackView>
<tableView clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" dataMode="prototypes" style="plain" separatorStyle="none" rowHeight="-1" estimatedRowHeight="-1" sectionHeaderHeight="-1" estimatedSectionHeaderHeight="-1" sectionFooterHeight="-1" estimatedSectionFooterHeight="-1" translatesAutoresizingMaskIntoConstraints="NO" id="MeS-Fv-FWi">
<rect key="frame" x="0.0" y="213.5" width="414" height="643.5"/>
<color key="backgroundColor" systemColor="systemBackgroundColor"/>
</tableView>
</subviews>
<viewLayoutGuide key="safeArea" id="EUh-wH-T1u"/>
<color key="backgroundColor" systemColor="systemBackgroundColor"/>
<constraints>
<constraint firstItem="yKd-Wm-7Eb" firstAttribute="top" secondItem="EUh-wH-T1u" secondAttribute="top" constant="10" id="Eze-3L-ONQ"/>
<constraint firstItem="EUh-wH-T1u" firstAttribute="bottom" secondItem="MeS-Fv-FWi" secondAttribute="bottom" constant="5" id="I1j-1P-h2P"/>
<constraint firstItem="MeS-Fv-FWi" firstAttribute="top" secondItem="yKd-Wm-7Eb" secondAttribute="bottom" constant="5" id="Ws2-Im-96q"/>
<constraint firstItem="EUh-wH-T1u" firstAttribute="trailing" secondItem="MeS-Fv-FWi" secondAttribute="trailing" id="YgT-Bw-if4"/>
<constraint firstItem="MeS-Fv-FWi" firstAttribute="leading" secondItem="EUh-wH-T1u" secondAttribute="leading" id="dkd-J0-hhe"/>
<constraint firstItem="EUh-wH-T1u" firstAttribute="trailing" secondItem="yKd-Wm-7Eb" secondAttribute="trailing" constant="10" id="e26-Iv-7pz"/>
<constraint firstItem="yKd-Wm-7Eb" firstAttribute="leading" secondItem="EUh-wH-T1u" secondAttribute="leading" constant="10" id="hgh-IK-imM"/>
<constraint firstItem="hfz-KR-Jh7" firstAttribute="top" secondItem="xrt-Pk-mPa" secondAttribute="top" id="nDY-B0-Hyh"/>
<constraint firstItem="hfz-KR-Jh7" firstAttribute="leading" secondItem="EUh-wH-T1u" secondAttribute="leading" id="rk1-gR-XeE"/>
<constraint firstItem="EUh-wH-T1u" firstAttribute="trailing" secondItem="hfz-KR-Jh7" secondAttribute="trailing" id="yLe-Mk-rd6"/>
</constraints>
</view>
<connections>
<outlet property="airWayBillNo" destination="hBF-FJ-TnF" id="7CS-13-G5N"/>
<outlet property="expectedDate" destination="2nO-72-dWp" id="tlh-7p-D8l"/>
<outlet property="orderIDNumber" destination="XOs-lG-BTm" id="SgR-et-rLR"/>
<outlet property="status" destination="75q-hi-LB9" id="Y5O-w2-id5"/>
<outlet property="tableView" destination="MeS-Fv-FWi" id="v5B-8C-dLj"/>
</connections>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="LT3-ar-WYS" userLabel="First Responder" customClass="UIResponder" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="4935" y="-34"/>
</scene>
</scenes>
<designables>
<designable name="arD-av-w7V">
<size key="intrinsicContentSize" width="169.5" height="21"/>
<size key="intrinsicContentSize" width="119.5" height="21"/>
</designable>
<designable name="fZS-d6-t0h">
<size key="intrinsicContentSize" width="169" height="21"/>
<size key="intrinsicContentSize" width="119" height="21"/>
</designable>
<designable name="fiK-Gg-JDj">
<size key="intrinsicContentSize" width="169.5" height="21"/>
<size key="intrinsicContentSize" width="119.5" height="21"/>
</designable>
<designable name="zMI-2r-pRQ">
<size key="intrinsicContentSize" width="169" height="21"/>
<size key="intrinsicContentSize" width="119" height="21"/>
</designable>
</designables>
<resources>
@@ -710,6 +854,9 @@
<image name="SupportBottomArrow" width="16" height="16"/>
<image name="SupportGirlImage" width="166" height="166"/>
<image name="WokaLogo" width="2224" height="450.5"/>
<namedColor name="ImageDarkBlue">
<color red="0.035000000149011612" green="0.0" blue="0.36500000953674316" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</namedColor>
<namedColor name="TextDarkBlue">
<color red="0.10599999874830246" green="0.050999999046325684" blue="0.60399997234344482" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</namedColor>

View File

@@ -9,15 +9,30 @@ import UIKit
class MyOrderCell: UITableViewCell {
@IBOutlet weak var orderNumber: UILabel!
@IBOutlet weak var placedOn: UILabel!
@IBOutlet weak var airwayBillNumber: UILabel!
@IBOutlet weak var courierNumber: UILabel!
@IBOutlet weak var price: UILabel!
override func awakeFromNib() {
super.awakeFromNib()
// Initialization code
self.backgroundColor = .clear
}
override func setSelected(_ selected: Bool, animated: Bool) {
super.setSelected(selected, animated: animated)
// Configure the view for the selected state
}
func setData(data : OrderListingDM.Datum){
self.orderNumber.text = data.orderID
self.placedOn.text = data.orderBookedDateTime
self.airwayBillNumber.text = (data.airwaybilno == "" || data.airwaybilno == nil) ? "NA" : data.airwaybilno
self.courierNumber.text = (data.courier == "" || data.courier == nil) ? "NA" : data.courier
self.price.text = data.grandTotal?.toString()
}
@IBAction func trackBtnTapped(_ sender: UIButton) {
}
}

View File

@@ -20,51 +20,51 @@
<objects>
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/>
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
<tableViewCell contentMode="scaleToFill" selectionStyle="default" indentationWidth="10" rowHeight="166" id="KGk-i7-Jjw" customClass="MyOrderCell" customModule="WOKA" customModuleProvider="target">
<rect key="frame" x="0.0" y="0.0" width="422" height="166"/>
<tableViewCell contentMode="scaleToFill" selectionStyle="none" indentationWidth="10" rowHeight="264" id="KGk-i7-Jjw" customClass="MyOrderCell" customModule="WOKA" customModuleProvider="target">
<rect key="frame" x="0.0" y="0.0" width="422" height="264"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="KGk-i7-Jjw" id="H2p-sc-9uM">
<rect key="frame" x="0.0" y="0.0" width="422" height="166"/>
<rect key="frame" x="0.0" y="0.0" width="422" height="264"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="thq-h9-HTk">
<rect key="frame" x="10" y="10" width="402" height="146"/>
<rect key="frame" x="10" y="10" width="402" height="244"/>
<subviews>
<stackView opaque="NO" contentMode="scaleToFill" axis="vertical" spacing="10" translatesAutoresizingMaskIntoConstraints="NO" id="om1-xl-cHl">
<rect key="frame" x="0.0" y="0.0" width="402" height="146"/>
<stackView opaque="NO" contentMode="scaleToFill" axis="vertical" spacing="7" translatesAutoresizingMaskIntoConstraints="NO" id="om1-xl-cHl">
<rect key="frame" x="0.0" y="0.0" width="402" height="244"/>
<subviews>
<stackView opaque="NO" contentMode="scaleToFill" distribution="equalSpacing" spacing="5" translatesAutoresizingMaskIntoConstraints="NO" id="fFg-2g-NQo">
<rect key="frame" x="5" y="5" width="392" height="21.666666666666668"/>
<rect key="frame" x="10" y="15.000000000000002" width="382" height="17.666666666666671"/>
<subviews>
<stackView opaque="NO" contentMode="scaleToFill" spacing="3" translatesAutoresizingMaskIntoConstraints="NO" id="H3K-qQ-uIB">
<rect key="frame" x="0.0" y="0.0" width="164.66666666666666" height="21.666666666666668"/>
<rect key="frame" x="0.0" y="0.0" width="132" height="17.666666666666668"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="249" verticalHuggingPriority="252" text="Order ID :" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="tNd-xw-5fU">
<rect key="frame" x="0.0" y="0.0" width="71" height="21.666666666666668"/>
<fontDescription key="fontDescription" name="Exo2-Regular" family="Exo 2" pointSize="17"/>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="249" verticalHuggingPriority="252" text="Order ID :" lineBreakMode="wordWrap" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="tNd-xw-5fU">
<rect key="frame" x="0.0" y="0.0" width="58.333333333333336" height="17.666666666666668"/>
<fontDescription key="fontDescription" name="Exo2-Regular" family="Exo 2" pointSize="14"/>
<color key="textColor" name="ImageDarkBlue"/>
<nil key="highlightedColor"/>
</label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="252" text="W12121212" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="qjR-wR-llK">
<rect key="frame" x="74" y="0.0" width="90.666666666666686" height="21.666666666666668"/>
<fontDescription key="fontDescription" name="Exo2-Bold" family="Exo 2" pointSize="18"/>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="252" text="W12121212" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="qjR-wR-llK">
<rect key="frame" x="61.333333333333321" y="0.0" width="70.666666666666686" height="17.666666666666668"/>
<fontDescription key="fontDescription" name="Exo2-Bold" family="Exo 2" pointSize="14"/>
<color key="textColor" name="ImageDarkBlue"/>
<nil key="highlightedColor"/>
</label>
</subviews>
</stackView>
<stackView opaque="NO" contentMode="scaleToFill" spacing="3" translatesAutoresizingMaskIntoConstraints="NO" id="tsW-Oy-qce">
<rect key="frame" x="227.33333333333337" y="0.0" width="164.66666666666663" height="21.666666666666668"/>
<rect key="frame" x="342.33333333333331" y="0.0" width="39.666666666666686" height="17.666666666666668"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="249" verticalHuggingPriority="252" text="Order ID :" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="CTh-M7-uPa">
<rect key="frame" x="0.0" y="0.0" width="71" height="21.666666666666668"/>
<fontDescription key="fontDescription" name="Exo2-Regular" family="Exo 2" pointSize="17"/>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="249" verticalHuggingPriority="252" text="INR" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="CTh-M7-uPa">
<rect key="frame" x="0.0" y="0.0" width="25.666666666666668" height="17.666666666666668"/>
<fontDescription key="fontDescription" name="Exo2-Regular" family="Exo 2" pointSize="16"/>
<color key="textColor" name="ImageDarkBlue"/>
<nil key="highlightedColor"/>
</label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="252" text="W12121212" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="DxS-tx-EWT">
<rect key="frame" x="73.999999999999972" y="0.0" width="90.666666666666657" height="21.666666666666668"/>
<fontDescription key="fontDescription" name="Exo2-Bold" family="Exo 2" pointSize="18"/>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="252" text="0" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="DxS-tx-EWT">
<rect key="frame" x="28.666666666666686" y="0.0" width="11" height="17.666666666666668"/>
<fontDescription key="fontDescription" name="Exo2-Bold" family="Exo 2" pointSize="17"/>
<color key="textColor" name="ImageDarkBlue"/>
<nil key="highlightedColor"/>
</label>
@@ -73,43 +73,132 @@
</subviews>
</stackView>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="cbL-y4-34J">
<rect key="frame" x="5" y="36.666666666666664" width="392" height="0.3333333333333357"/>
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<rect key="frame" x="10" y="39.666666666666664" width="382" height="0.3333333333333357"/>
<color key="backgroundColor" white="0.66666666666666663" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<constraints>
<constraint firstAttribute="height" constant="0.29999999999999999" id="yM2-6x-UgH"/>
</constraints>
</view>
<stackView opaque="NO" contentMode="scaleToFill" distribution="equalSpacing" spacing="3" translatesAutoresizingMaskIntoConstraints="NO" id="Dbe-aH-UFu">
<rect key="frame" x="5" y="47" width="392" height="94"/>
<stackView opaque="NO" contentMode="scaleToFill" axis="vertical" spacing="2" translatesAutoresizingMaskIntoConstraints="NO" id="zTN-Hj-3ve">
<rect key="frame" x="10" y="47" width="382" height="45"/>
<subviews>
<stackView opaque="NO" contentMode="scaleToFill" axis="vertical" spacing="2" translatesAutoresizingMaskIntoConstraints="NO" id="zTN-Hj-3ve">
<rect key="frame" x="0.0" y="0.0" width="90.666666666666671" height="94"/>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="249" verticalHuggingPriority="252" text="PLACED ON" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="LIE-Az-C4m">
<rect key="frame" x="0.0" y="0.0" width="382" height="19.333333333333332"/>
<fontDescription key="fontDescription" name="Exo2-Regular" family="Exo 2" pointSize="16"/>
<color key="textColor" white="0.66666666666666663" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<nil key="highlightedColor"/>
</label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" usesAttributedText="YES" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="3e7-GB-nb5">
<rect key="frame" x="0.0" y="21.333333333333329" width="382" height="23.666666666666671"/>
<attributedString key="attributedText">
<fragment content="0/0/0000">
<attributes>
<color key="NSColor" name="ImageDarkBlue"/>
<font key="NSFont" size="15" name="Exo2-Regular"/>
<paragraphStyle key="NSParagraphStyle" alignment="left" lineBreakMode="wordWrapping" baseWritingDirection="natural" tighteningFactorForTruncation="0.0"/>
</attributes>
</fragment>
</attributedString>
<nil key="highlightedColor"/>
</label>
</subviews>
</stackView>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="JsU-OW-6Qh">
<rect key="frame" x="10" y="99" width="382" height="0.3333333333333286"/>
<color key="backgroundColor" white="0.66666666669999997" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<constraints>
<constraint firstAttribute="height" constant="0.29999999999999999" id="9ia-4Z-nDS"/>
</constraints>
</view>
<stackView opaque="NO" contentMode="scaleToFill" distribution="equalSpacing" spacing="10" translatesAutoresizingMaskIntoConstraints="NO" id="DpM-gd-VKI">
<rect key="frame" x="10" y="106.33333333333331" width="382" height="122.66666666666669"/>
<subviews>
<stackView opaque="NO" contentMode="scaleToFill" axis="vertical" distribution="fillEqually" spacing="7" translatesAutoresizingMaskIntoConstraints="NO" id="iwt-Jo-ze3">
<rect key="frame" x="0.0" y="0.0" width="159" height="122.66666666666667"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="249" verticalHuggingPriority="252" text="PLACED ON" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="LIE-Az-C4m">
<rect key="frame" x="0.0" y="0.0" width="90.666666666666671" height="20.666666666666668"/>
<fontDescription key="fontDescription" name="Exo2-Regular" family="Exo 2" pointSize="17"/>
<color key="textColor" name="ImageDarkBlue"/>
<nil key="highlightedColor"/>
</label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="W12121212" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="3e7-GB-nb5">
<rect key="frame" x="0.0" y="22.666666666666671" width="90.666666666666671" height="71.333333333333329"/>
<fontDescription key="fontDescription" name="Exo2-Bold" family="Exo 2" pointSize="18"/>
<color key="textColor" name="ImageDarkBlue"/>
<nil key="highlightedColor"/>
</label>
<stackView opaque="NO" contentMode="scaleToFill" axis="vertical" spacing="2" translatesAutoresizingMaskIntoConstraints="NO" id="zGn-XW-9mE">
<rect key="frame" x="0.0" y="0.0" width="159" height="57.666666666666664"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="249" verticalHuggingPriority="252" text="AIRWAY BILL NUMBER" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Ogb-A2-eeS">
<rect key="frame" x="0.0" y="0.0" width="159" height="19.333333333333332"/>
<fontDescription key="fontDescription" name="Exo2-Regular" family="Exo 2" pointSize="16"/>
<color key="textColor" white="0.66666666666666663" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<nil key="highlightedColor"/>
</label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" verticalCompressionResistancePriority="749" text="W12121212" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="JOe-v5-bpU">
<rect key="frame" x="0.0" y="21.333333333333332" width="159" height="36.333333333333343"/>
<fontDescription key="fontDescription" name="Exo2-Bold" family="Exo 2" pointSize="17"/>
<color key="textColor" name="ImageDarkBlue"/>
<nil key="highlightedColor"/>
</label>
</subviews>
</stackView>
<stackView opaque="NO" contentMode="scaleToFill" axis="vertical" spacing="2" translatesAutoresizingMaskIntoConstraints="NO" id="cxD-ln-seY">
<rect key="frame" x="0.0" y="64.666666666666671" width="159" height="58"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="249" verticalHuggingPriority="252" text="COURIER" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="riF-vR-xpB">
<rect key="frame" x="0.0" y="0.0" width="159" height="19.333333333333332"/>
<fontDescription key="fontDescription" name="Exo2-Regular" family="Exo 2" pointSize="16"/>
<color key="textColor" white="0.66666666669999997" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<nil key="highlightedColor"/>
</label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" verticalCompressionResistancePriority="749" text="W12121212" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="EEm-nj-Jes">
<rect key="frame" x="0.0" y="21.333333333333339" width="159" height="36.666666666666657"/>
<fontDescription key="fontDescription" name="Exo2-Bold" family="Exo 2" pointSize="17"/>
<color key="textColor" name="ImageDarkBlue"/>
<nil key="highlightedColor"/>
</label>
</subviews>
</stackView>
</subviews>
</stackView>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="NZy-Uo-gaT">
<rect key="frame" x="342" y="0.0" width="50" height="94"/>
<color key="backgroundColor" systemColor="linkColor"/>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="7L6-Gp-tOF">
<rect key="frame" x="262" y="0.0" width="120" height="122.66666666666667"/>
<subviews>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" hasAttributedTitle="YES" translatesAutoresizingMaskIntoConstraints="NO" id="ZtE-R4-viL">
<rect key="frame" x="0.0" y="61.333333333333329" width="120" height="40"/>
<color key="backgroundColor" name="ImageDarkBlue"/>
<constraints>
<constraint firstAttribute="height" constant="40" id="99Z-Yf-ySM"/>
</constraints>
<color key="tintColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/>
<state key="normal">
<attributedString key="attributedTitle">
<fragment content="Track">
<attributes>
<font key="NSFont" size="16" name="Exo2-Bold"/>
</attributes>
</fragment>
</attributedString>
</state>
<userDefinedRuntimeAttributes>
<userDefinedRuntimeAttribute type="number" keyPath="cornerRadius">
<integer key="value" value="20"/>
</userDefinedRuntimeAttribute>
</userDefinedRuntimeAttributes>
<connections>
<action selector="trackBtnTapped:" destination="KGk-i7-Jjw" eventType="touchUpInside" id="LBo-ng-IGH"/>
</connections>
</button>
</subviews>
<color key="backgroundColor" systemColor="systemBackgroundColor"/>
<constraints>
<constraint firstAttribute="width" constant="50" id="Nwj-FX-GjI"/>
<constraint firstItem="ZtE-R4-viL" firstAttribute="centerX" secondItem="7L6-Gp-tOF" secondAttribute="centerX" id="Rhe-8e-iNf"/>
<constraint firstItem="ZtE-R4-viL" firstAttribute="leading" secondItem="7L6-Gp-tOF" secondAttribute="leading" id="Ysu-dU-Mnr"/>
<constraint firstAttribute="trailing" secondItem="ZtE-R4-viL" secondAttribute="trailing" id="asE-8W-tGw"/>
<constraint firstItem="ZtE-R4-viL" firstAttribute="centerY" secondItem="7L6-Gp-tOF" secondAttribute="centerY" constant="20" id="cs8-5b-C4I"/>
<constraint firstAttribute="width" constant="120" id="fMH-2v-3Ju"/>
</constraints>
</view>
</subviews>
</stackView>
</subviews>
<edgeInsets key="layoutMargins" top="5" left="5" bottom="5" right="5"/>
<constraints>
<constraint firstItem="zTN-Hj-3ve" firstAttribute="top" secondItem="om1-xl-cHl" secondAttribute="top" constant="47" id="68Q-f6-G0b"/>
<constraint firstItem="JsU-OW-6Qh" firstAttribute="top" secondItem="om1-xl-cHl" secondAttribute="top" constant="99" id="GAI-Ja-85y"/>
</constraints>
<edgeInsets key="layoutMargins" top="15" left="10" bottom="15" right="10"/>
</stackView>
</subviews>
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
@@ -126,6 +215,7 @@
</userDefinedRuntimeAttributes>
</view>
</subviews>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<constraints>
<constraint firstItem="thq-h9-HTk" firstAttribute="top" secondItem="H2p-sc-9uM" secondAttribute="top" constant="10" id="6zo-Pn-31L"/>
<constraint firstAttribute="bottom" secondItem="thq-h9-HTk" secondAttribute="bottom" constant="10" id="8Qs-K0-RDx"/>
@@ -134,15 +224,22 @@
</constraints>
</tableViewCellContentView>
<viewLayoutGuide key="safeArea" id="njF-e1-oar"/>
<point key="canvasLocation" x="216.79389312977099" y="62.676056338028175"/>
<connections>
<outlet property="airwayBillNumber" destination="JOe-v5-bpU" id="ZDQ-ek-eVS"/>
<outlet property="courierNumber" destination="EEm-nj-Jes" id="KPx-f5-tgh"/>
<outlet property="orderNumber" destination="qjR-wR-llK" id="43i-OV-KSt"/>
<outlet property="placedOn" destination="3e7-GB-nb5" id="Dro-SJ-AUm"/>
<outlet property="price" destination="DxS-tx-EWT" id="kPZ-cS-OFA"/>
</connections>
<point key="canvasLocation" x="216.79389312977099" y="95.774647887323951"/>
</tableViewCell>
</objects>
<resources>
<namedColor name="ImageDarkBlue">
<color red="0.035000000149011612" green="0.0" blue="0.36500000953674316" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</namedColor>
<systemColor name="linkColor">
<color red="0.0" green="0.47843137250000001" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<systemColor name="systemBackgroundColor">
<color white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
</systemColor>
</resources>
</document>

View File

@@ -0,0 +1,40 @@
//
// MyOrderDetailsCell.swift
// WOKA
//
// Created by MacBook Pro on 08/08/24.
//
import UIKit
class MyOrderDetailsCell: UITableViewCell {
@IBOutlet weak var detailDate: UILabel!
@IBOutlet weak var detailTime: UILabel!
@IBOutlet weak var remarks: UILabel!
@IBOutlet weak var location: UILabel!
override func awakeFromNib() {
super.awakeFromNib()
// Initialization code
}
override func setSelected(_ selected: Bool, animated: Bool) {
super.setSelected(selected, animated: animated)
}
func setData(data : OrderDetailsDM.ScanDetail){
self.remarks.text = "Order " + (data.remarks ?? "NA")
self.location.text = "Arrived at " + (data.location ?? "NA")
if let updateDate = data.updatedDate , let formattedDate = DateFormatterLib.dateMods(dateStr: updateDate, dateCurrentFormat: .yyyy_MM_dd_HH_mm_ss, dateReturnFormat: .d__MM, stringOrDate: .string).0{
self.detailDate.text = formattedDate
}
if let updateTime = data.updatedDate , let formattedDate = DateFormatterLib.dateMods(dateStr: updateTime, dateCurrentFormat: .yyyy_MM_dd_HH_mm_ss, dateReturnFormat: .h_mm_a, stringOrDate: .string).0{
self.detailTime.text = formattedDate
}
}
}

View File

@@ -0,0 +1,149 @@
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="32700.99.1234" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
<device id="retina6_12" orientation="portrait" appearance="light"/>
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="22685"/>
<capability name="Named colors" minToolsVersion="9.0"/>
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
<capability name="System colors in document resources" minToolsVersion="11.0"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<customFonts key="customFonts">
<array key="Exo2-Bold.ttf">
<string>Exo2-Bold</string>
</array>
<array key="Exo2-SemiBold.ttf">
<string>Exo2-SemiBold</string>
</array>
</customFonts>
<objects>
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/>
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
<tableViewCell contentMode="scaleToFill" selectionStyle="none" indentationWidth="10" rowHeight="199" id="KGk-i7-Jjw" customClass="MyOrderDetailsCell" customModule="WOKA" customModuleProvider="target">
<rect key="frame" x="0.0" y="0.0" width="468" height="199"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="KGk-i7-Jjw" id="H2p-sc-9uM">
<rect key="frame" x="0.0" y="0.0" width="468" height="199"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
<stackView opaque="NO" contentMode="scaleToFill" spacing="10" translatesAutoresizingMaskIntoConstraints="NO" id="tuS-MR-68P">
<rect key="frame" x="10" y="10" width="448" height="179"/>
<subviews>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="pYg-sY-suY">
<rect key="frame" x="0.0" y="0.0" width="90" height="179"/>
<subviews>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="wHA-Sl-2VK">
<rect key="frame" x="44" y="0.0" width="2" height="72.333333333333329"/>
<color key="backgroundColor" red="0.40000000000000002" green="0.59999999999999998" blue="0.0" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<constraints>
<constraint firstAttribute="height" relation="greaterThanOrEqual" constant="30" id="TTz-pc-Jv1"/>
<constraint firstAttribute="width" constant="2" id="ZWO-To-B7u"/>
</constraints>
</view>
<stackView opaque="NO" contentMode="scaleToFill" axis="vertical" alignment="center" spacing="2" translatesAutoresizingMaskIntoConstraints="NO" id="OoM-Hv-kdl">
<rect key="frame" x="16.666666666666671" y="72.333333333333329" width="57" height="34.666666666666671"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="249" verticalHuggingPriority="252" text="00/00" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Htn-OT-8NJ">
<rect key="frame" x="6.6666666666666679" y="0.0" width="43.333333333333329" height="17"/>
<fontDescription key="fontDescription" name="Exo2-Bold" family="Exo 2" pointSize="14"/>
<color key="textColor" name="ImageDarkBlue"/>
<nil key="highlightedColor"/>
</label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" verticalCompressionResistancePriority="749" usesAttributedText="YES" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="2NE-Ax-JqO">
<rect key="frame" x="0.0" y="19" width="57" height="15.666666666666664"/>
<attributedString key="attributedText">
<fragment content="00:00 AM">
<attributes>
<color key="NSColor" name="ImageDarkBlue"/>
<font key="NSFont" size="13" name="Exo2-Medium"/>
<paragraphStyle key="NSParagraphStyle" alignment="left" lineBreakMode="wordWrapping" baseWritingDirection="natural" tighteningFactorForTruncation="0.0"/>
</attributes>
</fragment>
</attributedString>
<nil key="highlightedColor"/>
</label>
</subviews>
</stackView>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="Bda-Ks-Efh">
<rect key="frame" x="44" y="107" width="2" height="72"/>
<color key="backgroundColor" red="0.40000000000000002" green="0.59999999999999998" blue="0.0" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<constraints>
<constraint firstAttribute="height" relation="greaterThanOrEqual" constant="30" id="SsZ-SR-wVh"/>
<constraint firstAttribute="width" constant="2" id="hvX-Mh-sMn"/>
</constraints>
</view>
</subviews>
<color key="backgroundColor" systemColor="systemBackgroundColor"/>
<constraints>
<constraint firstAttribute="width" constant="90" id="BMY-2h-G7c"/>
<constraint firstItem="wHA-Sl-2VK" firstAttribute="centerX" secondItem="pYg-sY-suY" secondAttribute="centerX" id="CqE-62-5cL"/>
<constraint firstItem="OoM-Hv-kdl" firstAttribute="centerX" secondItem="pYg-sY-suY" secondAttribute="centerX" id="JeX-ug-wo0"/>
<constraint firstItem="Bda-Ks-Efh" firstAttribute="top" secondItem="OoM-Hv-kdl" secondAttribute="bottom" id="Of5-qJ-J4K"/>
<constraint firstItem="OoM-Hv-kdl" firstAttribute="top" secondItem="wHA-Sl-2VK" secondAttribute="bottom" id="Q4i-UB-Z2u"/>
<constraint firstAttribute="bottom" secondItem="Bda-Ks-Efh" secondAttribute="bottom" id="aJc-6Y-3Qz"/>
<constraint firstItem="wHA-Sl-2VK" firstAttribute="top" secondItem="pYg-sY-suY" secondAttribute="top" id="nRC-W8-jHL"/>
<constraint firstItem="Bda-Ks-Efh" firstAttribute="centerX" secondItem="pYg-sY-suY" secondAttribute="centerX" id="pGQ-Gu-D9V"/>
</constraints>
</view>
<stackView opaque="NO" contentMode="scaleToFill" distribution="fillEqually" alignment="center" spacing="7" translatesAutoresizingMaskIntoConstraints="NO" id="2P1-Vl-K4d">
<rect key="frame" x="100" y="0.0" width="348" height="179"/>
<subviews>
<stackView opaque="NO" contentMode="scaleToFill" axis="vertical" spacing="2" translatesAutoresizingMaskIntoConstraints="NO" id="b9J-bS-Szw">
<rect key="frame" x="0.0" y="71.666666666666671" width="348" height="35.666666666666671"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="249" verticalHuggingPriority="252" text="NA" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="p1u-nq-gX6">
<rect key="frame" x="0.0" y="0.0" width="348" height="18"/>
<fontDescription key="fontDescription" name="Exo2-SemiBold" family="Exo 2" pointSize="15"/>
<color key="textColor" name="ImageDarkBlue"/>
<nil key="highlightedColor"/>
</label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" verticalCompressionResistancePriority="749" usesAttributedText="YES" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Pss-ov-DeE">
<rect key="frame" x="0.0" y="20" width="348" height="15.666666666666664"/>
<attributedString key="attributedText">
<fragment content="NA">
<attributes>
<color key="NSColor" name="ImageDarkBlue"/>
<font key="NSFont" size="13" name="Exo2-Regular"/>
<paragraphStyle key="NSParagraphStyle" alignment="left" lineBreakMode="wordWrapping" baseWritingDirection="natural" tighteningFactorForTruncation="0.0"/>
</attributes>
</fragment>
</attributedString>
<nil key="highlightedColor"/>
</label>
</subviews>
</stackView>
</subviews>
</stackView>
</subviews>
<constraints>
<constraint firstItem="OoM-Hv-kdl" firstAttribute="centerY" secondItem="b9J-bS-Szw" secondAttribute="centerY" id="aus-Io-bYv"/>
</constraints>
</stackView>
</subviews>
<constraints>
<constraint firstItem="tuS-MR-68P" firstAttribute="top" secondItem="H2p-sc-9uM" secondAttribute="top" constant="10" id="7rb-dI-kNi"/>
<constraint firstAttribute="trailing" secondItem="tuS-MR-68P" secondAttribute="trailing" constant="10" id="E4b-rJ-F7e"/>
<constraint firstAttribute="bottom" secondItem="tuS-MR-68P" secondAttribute="bottom" constant="10" id="ohd-JH-8tI"/>
<constraint firstItem="tuS-MR-68P" firstAttribute="leading" secondItem="H2p-sc-9uM" secondAttribute="leading" constant="10" id="sgJ-RY-PWA"/>
</constraints>
</tableViewCellContentView>
<viewLayoutGuide key="safeArea" id="njF-e1-oar"/>
<connections>
<outlet property="detailDate" destination="Htn-OT-8NJ" id="RgY-mH-YvR"/>
<outlet property="detailTime" destination="2NE-Ax-JqO" id="Qug-ox-mJd"/>
<outlet property="location" destination="Pss-ov-DeE" id="efh-Kh-QfX"/>
<outlet property="remarks" destination="p1u-nq-gX6" id="B6z-8x-Owz"/>
</connections>
<point key="canvasLocation" x="204.58015267175571" y="74.295774647887328"/>
</tableViewCell>
</objects>
<resources>
<namedColor name="ImageDarkBlue">
<color red="0.035000000149011612" green="0.0" blue="0.36500000953674316" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</namedColor>
<systemColor name="systemBackgroundColor">
<color white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
</systemColor>
</resources>
</document>

View File

@@ -13,6 +13,8 @@ class MyOrdersVM{
weak var vc : MyOrdersVC!
var cartButton: UIBarButtonItem!
var pageNo = 1
var orderData = [OrderListingDM.Datum]()
func initView(){
vc.title = "MY ORDERS".localized(loc: AuthFunc.shareInstance.languageSelected.rawValue)
@@ -32,9 +34,16 @@ class MyOrdersVM{
}
}
setupCell()
getOrders()
}
func setupCell(){
vc.tableView.register(UINib(nibName: K.CellIdentifier.SideBarNav.myOrderCell, bundle: nil), forCellReuseIdentifier: K.CellIdentifier.SideBarNav.myOrderCell)
vc.tableView.delegate = vc.self
vc.tableView.dataSource = vc.self
}
@objc func cartButtonTapped(){
if AuthFunc.shareInstance.guestUserLoginPopUp() { return}
@@ -60,13 +69,15 @@ class MyOrdersVM{
return
case 1:
Utilities.dismissProgressHUD()
guard let data = data.data?.result else{return}
print(data)
guard let data = data.data?.result?.data else{return}
self.orderData = data
self.vc.tableView.reloadData()
default:
break
}
case .failure(let error):
Utilities.dismissProgressHUD()
print(error)
}
}
}