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

@@ -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>