Преглед изворни кода

1.修改iOS Apex Driver首页统计数据点击,Save Password以及Order Detail电话号码可点击。

Pen Li пре 7 година
родитељ
комит
0eea3ff345
27 измењених фајлова са 269 додато и 117 уклоњено
  1. 2 2
      Redant Drivers/Apex And Drivers/AppDelegate.m
  2. 23 0
      Redant Drivers/Apex And Drivers/Assets.xcassets/check.imageset/Contents.json
  3. BIN
      Redant Drivers/Apex And Drivers/Assets.xcassets/check.imageset/check.png
  4. BIN
      Redant Drivers/Apex And Drivers/Assets.xcassets/check.imageset/check@2x.png
  5. BIN
      Redant Drivers/Apex And Drivers/Assets.xcassets/check.imageset/check@3x.png
  6. 23 0
      Redant Drivers/Apex And Drivers/Assets.xcassets/uncheck.imageset/Contents.json
  7. BIN
      Redant Drivers/Apex And Drivers/Assets.xcassets/uncheck.imageset/uncheck.png
  8. BIN
      Redant Drivers/Apex And Drivers/Assets.xcassets/uncheck.imageset/uncheck@2x.png
  9. BIN
      Redant Drivers/Apex And Drivers/Assets.xcassets/uncheck.imageset/uncheck@3x.png
  10. 2 1
      Redant Drivers/Apex And Drivers/Detail/Cell/RADetailLocationCell.m
  11. 2 1
      Redant Drivers/Apex And Drivers/Detail/Cell/RADetailMapCell.m
  12. 2 1
      Redant Drivers/Apex And Drivers/Detail/Cell/RADetailMultLineCell.m
  13. 2 1
      Redant Drivers/Apex And Drivers/Detail/Cell/RADetailSingleLineCell.m
  14. 81 77
      Redant Drivers/Apex And Drivers/Detail/Detail.storyboard
  15. 4 4
      Redant Drivers/Apex And Drivers/Detail/Model/RADetailLocationModel.m
  16. 4 4
      Redant Drivers/Apex And Drivers/Detail/Model/RADetailMapModel.m
  17. 3 0
      Redant Drivers/Apex And Drivers/Home/HomeHeader.xib
  18. 5 0
      Redant Drivers/Apex And Drivers/Home/RAHomeHeaderView.h
  19. 30 0
      Redant Drivers/Apex And Drivers/Home/RAHomeHeaderView.m
  20. 26 5
      Redant Drivers/Apex And Drivers/Home/RAHomeViewController.m
  21. 6 4
      Redant Drivers/Apex And Drivers/Login/Login.storyboard
  22. 1 1
      Redant Drivers/Apex And Drivers/Login/LoginViewController.h
  23. 7 5
      Redant Drivers/Apex And Drivers/Login/LoginViewController.m
  24. 5 2
      Redant Drivers/Apex And Drivers/Offline/RAOfflineHandler.m
  25. 12 3
      Redant Drivers/Apex And Drivers/RADataProvider.m
  26. 4 1
      Redant Drivers/Apex And Drivers/RASingleton.h
  27. 25 5
      Redant Drivers/Apex And Drivers/RASingleton.m

+ 2 - 2
Redant Drivers/Apex And Drivers/AppDelegate.m

@@ -39,9 +39,9 @@
     LoginViewController *rootVC = [LoginViewController viewControllerFromStoryboard];
     
     __weak typeof(self) weakSelf = self;
-    rootVC.loginSuccessful = ^(NSString *user,NSString *password){
+    rootVC.loginSuccessful = ^(NSString *user,NSString *password, NSString *firstName){
         
-        [[RASingleton sharedInstance] loginUser:user password:password];
+        [[RASingleton sharedInstance] loginUser:user password:password firstName:firstName];
         
         [weakSelf showHomeVC];
     };

+ 23 - 0
Redant Drivers/Apex And Drivers/Assets.xcassets/check.imageset/Contents.json

@@ -0,0 +1,23 @@
+{
+  "images" : [
+    {
+      "idiom" : "universal",
+      "filename" : "check.png",
+      "scale" : "1x"
+    },
+    {
+      "idiom" : "universal",
+      "filename" : "check@2x.png",
+      "scale" : "2x"
+    },
+    {
+      "idiom" : "universal",
+      "filename" : "check@3x.png",
+      "scale" : "3x"
+    }
+  ],
+  "info" : {
+    "version" : 1,
+    "author" : "xcode"
+  }
+}

BIN
Redant Drivers/Apex And Drivers/Assets.xcassets/check.imageset/check.png


BIN
Redant Drivers/Apex And Drivers/Assets.xcassets/check.imageset/check@2x.png


BIN
Redant Drivers/Apex And Drivers/Assets.xcassets/check.imageset/check@3x.png


+ 23 - 0
Redant Drivers/Apex And Drivers/Assets.xcassets/uncheck.imageset/Contents.json

@@ -0,0 +1,23 @@
+{
+  "images" : [
+    {
+      "idiom" : "universal",
+      "filename" : "uncheck.png",
+      "scale" : "1x"
+    },
+    {
+      "idiom" : "universal",
+      "filename" : "uncheck@2x.png",
+      "scale" : "2x"
+    },
+    {
+      "idiom" : "universal",
+      "filename" : "uncheck@3x.png",
+      "scale" : "3x"
+    }
+  ],
+  "info" : {
+    "version" : 1,
+    "author" : "xcode"
+  }
+}

BIN
Redant Drivers/Apex And Drivers/Assets.xcassets/uncheck.imageset/uncheck.png


BIN
Redant Drivers/Apex And Drivers/Assets.xcassets/uncheck.imageset/uncheck@2x.png


BIN
Redant Drivers/Apex And Drivers/Assets.xcassets/uncheck.imageset/uncheck@3x.png


+ 2 - 1
Redant Drivers/Apex And Drivers/Detail/Cell/RADetailLocationCell.m

@@ -14,7 +14,7 @@
 
 @property (strong, nonatomic) IBOutlet UILabel *titleLabel;
 @property (strong, nonatomic) IBOutlet UIButton *navigationBtn;
-@property (strong, nonatomic) IBOutlet UILabel *valueLabel;
+@property (strong, nonatomic) IBOutlet UITextView *valueLabel;
 
 
 @end
@@ -25,6 +25,7 @@
 - (void)awakeFromNib {
     [super awakeFromNib];
     // Initialization code
+    self.valueLabel.textContainerInset = UIEdgeInsetsMake(0, -5, 0, -5);
 }
 
 - (void)setSelected:(BOOL)selected animated:(BOOL)animated {

+ 2 - 1
Redant Drivers/Apex And Drivers/Detail/Cell/RADetailMapCell.m

@@ -14,7 +14,7 @@
 
 @property (strong, nonatomic) IBOutlet UILabel *titleLabel;
 //@property (strong, nonatomic) IBOutlet MKMapView *mapView;
-@property (strong, nonatomic) IBOutlet UILabel *valueLabel;
+@property (strong, nonatomic) IBOutlet UITextView *valueLabel;
 @property (strong, nonatomic) IBOutlet UIButton *navigationBtn;
 
 
@@ -25,6 +25,7 @@
 - (void)awakeFromNib {
     [super awakeFromNib];
     // Initialization code
+    self.valueLabel.textContainerInset = UIEdgeInsetsMake(0, -5, 0, -5);
 }
 
 - (void)setSelected:(BOOL)selected animated:(BOOL)animated {

+ 2 - 1
Redant Drivers/Apex And Drivers/Detail/Cell/RADetailMultLineCell.m

@@ -11,7 +11,7 @@
 
 @interface RADetailMultLineCell ()
 
-@property (strong, nonatomic) IBOutlet UILabel *valueLabel;
+@property (strong, nonatomic) IBOutlet UITextView *valueLabel;
 
 
 @end
@@ -21,6 +21,7 @@
 - (void)awakeFromNib {
     [super awakeFromNib];
     // Initialization code
+    self.valueLabel.textContainerInset = UIEdgeInsetsMake(0, -5, 0, -5);
 }
 
 - (void)setSelected:(BOOL)selected animated:(BOOL)animated {

+ 2 - 1
Redant Drivers/Apex And Drivers/Detail/Cell/RADetailSingleLineCell.m

@@ -12,7 +12,7 @@
 @interface RADetailSingleLineCell ()
 
 @property (strong, nonatomic) IBOutlet UILabel *titleLable;
-@property (strong, nonatomic) IBOutlet UILabel *valueLabel;
+@property (strong, nonatomic) IBOutlet UITextView *valueLabel;
 
 
 @end
@@ -22,6 +22,7 @@
 - (void)awakeFromNib {
     [super awakeFromNib];
     // Initialization code
+    self.valueLabel.textContainerInset = UIEdgeInsetsMake(0, -5, 0, -5);
 }
 
 - (void)setSelected:(BOOL)selected animated:(BOOL)animated {

+ 81 - 77
Redant Drivers/Apex And Drivers/Detail/Detail.storyboard

@@ -19,14 +19,14 @@
                         <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
                         <subviews>
                             <tableView clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" dataMode="prototypes" style="plain" separatorStyle="default" rowHeight="-1" estimatedRowHeight="-1" sectionHeaderHeight="28" sectionFooterHeight="28" translatesAutoresizingMaskIntoConstraints="NO" id="Xxs-Bp-xwk">
-                                <rect key="frame" x="0.0" y="20" width="375" height="647"/>
+                                <rect key="frame" x="0.0" y="20" width="600" height="580"/>
                                 <color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
                                 <prototypes>
                                     <tableViewCell clipsSubviews="YES" contentMode="scaleToFill" preservesSuperviewLayoutMargins="YES" selectionStyle="default" indentationWidth="10" reuseIdentifier="RADetailSingleLineCell" rowHeight="70" id="PRr-DR-Xqo" customClass="RADetailSingleLineCell">
-                                        <rect key="frame" x="0.0" y="28" width="375" height="70"/>
+                                        <rect key="frame" x="0.0" y="28" width="600" height="70"/>
                                         <autoresizingMask key="autoresizingMask"/>
                                         <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" preservesSuperviewLayoutMargins="YES" insetsLayoutMarginsFromSafeArea="NO" tableViewCell="PRr-DR-Xqo" id="HGR-qE-k8g">
-                                            <rect key="frame" x="0.0" y="0.0" width="375" height="69.5"/>
+                                            <rect key="frame" x="0.0" y="0.0" width="600" height="69.5"/>
                                             <autoresizingMask key="autoresizingMask"/>
                                             <subviews>
                                                 <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Order ID" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="IcX-EB-asg">
@@ -38,75 +38,68 @@
                                                     <nil key="textColor"/>
                                                     <nil key="highlightedColor"/>
                                                 </label>
-                                                <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="20180530001200" textAlignment="natural" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="L7s-6m-7Rs">
-                                                    <rect key="frame" x="5" y="27" width="590" height="37.5"/>
+                                                <textView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" scrollEnabled="NO" editable="NO" text="AFS1234568978964" textAlignment="natural" translatesAutoresizingMaskIntoConstraints="NO" id="339-2d-d83">
+                                                    <rect key="frame" x="5" y="31" width="590" height="33.5"/>
+                                                    <color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
                                                     <fontDescription key="fontDescription" type="system" pointSize="15"/>
-                                                    <nil key="textColor"/>
-                                                    <nil key="highlightedColor"/>
-                                                </label>
+                                                    <textInputTraits key="textInputTraits" autocapitalizationType="sentences"/>
+                                                    <dataDetectorType key="dataDetectorTypes" phoneNumber="YES"/>
+                                                </textView>
                                             </subviews>
                                             <constraints>
                                                 <constraint firstItem="IcX-EB-asg" firstAttribute="top" secondItem="HGR-qE-k8g" secondAttribute="top" constant="5" id="JTx-I2-fau"/>
-                                                <constraint firstItem="L7s-6m-7Rs" firstAttribute="leading" secondItem="IcX-EB-asg" secondAttribute="leading" id="RFT-Jc-9je"/>
+                                                <constraint firstItem="339-2d-d83" firstAttribute="trailing" secondItem="IcX-EB-asg" secondAttribute="trailing" id="Xua-Ur-H2B"/>
+                                                <constraint firstItem="339-2d-d83" firstAttribute="leading" secondItem="IcX-EB-asg" secondAttribute="leading" id="bI4-DX-boe"/>
                                                 <constraint firstItem="IcX-EB-asg" firstAttribute="leading" secondItem="HGR-qE-k8g" secondAttribute="leading" constant="5" id="ceh-Sw-2hB"/>
-                                                <constraint firstItem="L7s-6m-7Rs" firstAttribute="top" secondItem="IcX-EB-asg" secondAttribute="bottom" constant="1" id="n6f-Ba-NC2"/>
-                                                <constraint firstItem="L7s-6m-7Rs" firstAttribute="trailing" secondItem="IcX-EB-asg" secondAttribute="trailing" id="o0G-gr-RAA"/>
+                                                <constraint firstItem="339-2d-d83" firstAttribute="top" secondItem="IcX-EB-asg" secondAttribute="bottom" constant="5" id="fGG-su-Nqd"/>
                                                 <constraint firstAttribute="trailing" secondItem="IcX-EB-asg" secondAttribute="trailing" constant="5" id="uYy-kz-oiJ"/>
-                                                <constraint firstAttribute="bottom" secondItem="L7s-6m-7Rs" secondAttribute="bottom" constant="5" id="zwI-Qi-tnt"/>
+                                                <constraint firstAttribute="bottom" secondItem="339-2d-d83" secondAttribute="bottom" constant="5" id="v5W-xi-Jlz"/>
                                             </constraints>
                                         </tableViewCellContentView>
                                         <connections>
                                             <outlet property="titleLable" destination="IcX-EB-asg" id="p20-UP-YZv"/>
-                                            <outlet property="valueLabel" destination="L7s-6m-7Rs" id="c0Y-7M-8Vt"/>
+                                            <outlet property="valueLabel" destination="339-2d-d83" id="ujL-SS-vJD"/>
                                         </connections>
                                     </tableViewCell>
                                     <tableViewCell clipsSubviews="YES" contentMode="scaleToFill" preservesSuperviewLayoutMargins="YES" selectionStyle="default" indentationWidth="10" reuseIdentifier="RADetailMultLineCell" rowHeight="90" id="hLY-jO-rx0" customClass="RADetailMultLineCell">
-                                        <rect key="frame" x="0.0" y="98" width="375" height="90"/>
+                                        <rect key="frame" x="0.0" y="98" width="600" height="90"/>
                                         <autoresizingMask key="autoresizingMask"/>
                                         <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" preservesSuperviewLayoutMargins="YES" insetsLayoutMarginsFromSafeArea="NO" tableViewCell="hLY-jO-rx0" id="xPv-W6-2E0">
-                                            <rect key="frame" x="0.0" y="0.0" width="375" height="89.5"/>
+                                            <rect key="frame" x="0.0" y="0.0" width="600" height="89.5"/>
                                             <autoresizingMask key="autoresizingMask"/>
                                             <subviews>
-                                                <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="nxW-Ig-F5h">
+                                                <textView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" scrollEnabled="NO" editable="NO" textAlignment="natural" translatesAutoresizingMaskIntoConstraints="NO" id="j9q-8m-bG1">
                                                     <rect key="frame" x="5" y="5" width="590" height="79.5"/>
+                                                    <color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
                                                     <string key="text">DEMURRAGE LFD
 TERMINAL PICKUP APPT
 DELIVERY  APPT(setup wiwhse)
 PICKUP ON</string>
                                                     <fontDescription key="fontDescription" type="system" pointSize="15"/>
-                                                    <nil key="textColor"/>
-                                                    <nil key="highlightedColor"/>
-                                                </label>
+                                                    <textInputTraits key="textInputTraits" autocapitalizationType="sentences"/>
+                                                    <dataDetectorType key="dataDetectorTypes" phoneNumber="YES"/>
+                                                </textView>
                                             </subviews>
                                             <constraints>
-                                                <constraint firstAttribute="bottom" secondItem="nxW-Ig-F5h" secondAttribute="bottom" constant="5" id="GyO-p5-EVV"/>
-                                                <constraint firstAttribute="trailing" secondItem="nxW-Ig-F5h" secondAttribute="trailing" constant="5" id="LvG-rE-wMJ"/>
-                                                <constraint firstItem="nxW-Ig-F5h" firstAttribute="top" secondItem="xPv-W6-2E0" secondAttribute="top" constant="5" id="jxJ-Pf-0Pr"/>
-                                                <constraint firstItem="nxW-Ig-F5h" firstAttribute="leading" secondItem="xPv-W6-2E0" secondAttribute="leading" constant="5" id="u8Z-wy-aFV"/>
+                                                <constraint firstItem="j9q-8m-bG1" firstAttribute="top" secondItem="xPv-W6-2E0" secondAttribute="top" constant="5" id="85g-rE-I92"/>
+                                                <constraint firstAttribute="bottom" secondItem="j9q-8m-bG1" secondAttribute="bottom" constant="5" id="bwp-JZ-X55"/>
+                                                <constraint firstAttribute="trailing" secondItem="j9q-8m-bG1" secondAttribute="trailing" constant="5" id="nrc-Fr-dOJ"/>
+                                                <constraint firstItem="j9q-8m-bG1" firstAttribute="leading" secondItem="xPv-W6-2E0" secondAttribute="leading" constant="5" id="rA0-Vz-hqf"/>
                                             </constraints>
                                         </tableViewCellContentView>
                                         <connections>
-                                            <outlet property="valueLabel" destination="nxW-Ig-F5h" id="yM0-iy-Epm"/>
+                                            <outlet property="valueLabel" destination="j9q-8m-bG1" id="ri1-w7-Qeb"/>
                                         </connections>
                                     </tableViewCell>
                                     <tableViewCell clipsSubviews="YES" contentMode="scaleToFill" preservesSuperviewLayoutMargins="YES" selectionStyle="default" indentationWidth="10" reuseIdentifier="RADetailLocationCell" rowHeight="100" id="2RY-c8-4kR" customClass="RADetailLocationCell">
-                                        <rect key="frame" x="0.0" y="188" width="375" height="100"/>
+                                        <rect key="frame" x="0.0" y="188" width="600" height="100"/>
                                         <autoresizingMask key="autoresizingMask"/>
                                         <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" preservesSuperviewLayoutMargins="YES" insetsLayoutMarginsFromSafeArea="NO" tableViewCell="2RY-c8-4kR" id="8uQ-ij-SSa">
-                                            <rect key="frame" x="0.0" y="0.0" width="375" height="99.5"/>
+                                            <rect key="frame" x="0.0" y="0.0" width="600" height="99.5"/>
                                             <autoresizingMask key="autoresizingMask"/>
                                             <subviews>
-                                                <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="ECt-q4-gbV">
-                                                    <rect key="frame" x="5" y="31" width="260" height="63.5"/>
-                                                    <string key="text">TRANS PACIFIC CONTAINER SERVICE
-BERTH 30 2800 7TH ST
-OAKLAND,CA</string>
-                                                    <fontDescription key="fontDescription" type="system" pointSize="15"/>
-                                                    <nil key="textColor"/>
-                                                    <nil key="highlightedColor"/>
-                                                </label>
                                                 <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="E85-g7-fwi">
-                                                    <rect key="frame" x="325" y="43" width="40" height="40"/>
+                                                    <rect key="frame" x="550" y="43" width="40" height="40"/>
                                                     <constraints>
                                                         <constraint firstAttribute="height" constant="40" id="Bt5-LJ-HeT"/>
                                                         <constraint firstAttribute="width" constant="40" id="vza-Ko-Kz7"/>
@@ -117,7 +110,7 @@ OAKLAND,CA</string>
                                                     </connections>
                                                 </button>
                                                 <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Pick Up" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="off-5x-hpV">
-                                                    <rect key="frame" x="5" y="5" width="365" height="21"/>
+                                                    <rect key="frame" x="5" y="5" width="590" height="21"/>
                                                     <constraints>
                                                         <constraint firstAttribute="height" constant="21" id="Pn5-ru-O79"/>
                                                     </constraints>
@@ -125,34 +118,44 @@ OAKLAND,CA</string>
                                                     <nil key="textColor"/>
                                                     <nil key="highlightedColor"/>
                                                 </label>
+                                                <textView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" scrollEnabled="NO" editable="NO" textAlignment="natural" translatesAutoresizingMaskIntoConstraints="NO" id="LUn-5q-wvP">
+                                                    <rect key="frame" x="5" y="31" width="540" height="63.5"/>
+                                                    <color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
+                                                    <string key="text">TRANS PACIFIC CONTAINER SERVICE
+BERTH 30 2800 7TH ST
+OAKLAND,CA</string>
+                                                    <fontDescription key="fontDescription" type="system" pointSize="15"/>
+                                                    <textInputTraits key="textInputTraits" autocapitalizationType="sentences"/>
+                                                    <dataDetectorType key="dataDetectorTypes" phoneNumber="YES"/>
+                                                </textView>
                                             </subviews>
                                             <constraints>
-                                                <constraint firstItem="ECt-q4-gbV" firstAttribute="leading" secondItem="8uQ-ij-SSa" secondAttribute="leading" constant="5" id="17n-XI-PAS"/>
                                                 <constraint firstItem="off-5x-hpV" firstAttribute="leading" secondItem="8uQ-ij-SSa" secondAttribute="leading" constant="5" id="BQI-Ha-9lP"/>
-                                                <constraint firstAttribute="bottom" secondItem="ECt-q4-gbV" secondAttribute="bottom" constant="5" id="C2P-AA-Ri7"/>
+                                                <constraint firstAttribute="bottom" secondItem="LUn-5q-wvP" secondAttribute="bottom" constant="5" id="ELx-Y7-JWR"/>
                                                 <constraint firstItem="off-5x-hpV" firstAttribute="top" secondItem="8uQ-ij-SSa" secondAttribute="top" constant="5" id="K6e-CH-Pjd"/>
-                                                <constraint firstItem="ECt-q4-gbV" firstAttribute="top" secondItem="off-5x-hpV" secondAttribute="bottom" constant="5" id="cna-9u-WJh"/>
+                                                <constraint firstAttribute="trailing" secondItem="LUn-5q-wvP" secondAttribute="trailing" constant="55" id="ghW-k4-CMX"/>
+                                                <constraint firstItem="LUn-5q-wvP" firstAttribute="centerY" secondItem="E85-g7-fwi" secondAttribute="centerY" id="ghf-pJ-EOA"/>
                                                 <constraint firstAttribute="trailing" secondItem="E85-g7-fwi" secondAttribute="trailing" constant="10" id="lQq-bo-Keq"/>
-                                                <constraint firstItem="E85-g7-fwi" firstAttribute="leading" relation="greaterThanOrEqual" secondItem="ECt-q4-gbV" secondAttribute="trailing" constant="5" id="w7k-4C-7bW"/>
-                                                <constraint firstItem="E85-g7-fwi" firstAttribute="centerY" secondItem="ECt-q4-gbV" secondAttribute="centerY" id="wLX-D8-Sto"/>
+                                                <constraint firstItem="LUn-5q-wvP" firstAttribute="top" secondItem="off-5x-hpV" secondAttribute="bottom" constant="5" id="liz-ra-bSr"/>
+                                                <constraint firstItem="LUn-5q-wvP" firstAttribute="leading" secondItem="8uQ-ij-SSa" secondAttribute="leading" constant="5" id="xLd-qC-9sv"/>
                                                 <constraint firstAttribute="trailing" secondItem="off-5x-hpV" secondAttribute="trailing" constant="5" id="zj7-JY-cEr"/>
                                             </constraints>
                                         </tableViewCellContentView>
                                         <connections>
                                             <outlet property="navigationBtn" destination="E85-g7-fwi" id="ADi-0u-fQp"/>
                                             <outlet property="titleLabel" destination="off-5x-hpV" id="ciX-Sg-fpd"/>
-                                            <outlet property="valueLabel" destination="ECt-q4-gbV" id="1EL-lB-2tL"/>
+                                            <outlet property="valueLabel" destination="LUn-5q-wvP" id="FF4-Cz-Leg"/>
                                         </connections>
                                     </tableViewCell>
                                     <tableViewCell clipsSubviews="YES" contentMode="scaleToFill" preservesSuperviewLayoutMargins="YES" selectionStyle="default" indentationWidth="10" reuseIdentifier="RADetailActionsCell" rowHeight="100" id="22c-X4-T1m" customClass="RADetailActionsCell">
-                                        <rect key="frame" x="0.0" y="288" width="375" height="100"/>
+                                        <rect key="frame" x="0.0" y="288" width="600" height="100"/>
                                         <autoresizingMask key="autoresizingMask"/>
                                         <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" preservesSuperviewLayoutMargins="YES" insetsLayoutMarginsFromSafeArea="NO" tableViewCell="22c-X4-T1m" id="f99-Y7-BOd">
-                                            <rect key="frame" x="0.0" y="0.0" width="375" height="99.5"/>
+                                            <rect key="frame" x="0.0" y="0.0" width="600" height="99.5"/>
                                             <autoresizingMask key="autoresizingMask"/>
                                             <subviews>
                                                 <collectionView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" scrollEnabled="NO" dataMode="prototypes" translatesAutoresizingMaskIntoConstraints="NO" id="iKo-LB-QEE">
-                                                    <rect key="frame" x="0.0" y="0.0" width="600" height="99.5"/>
+                                                    <rect key="frame" x="0.0" y="0.0" width="375" height="99.5"/>
                                                     <color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
                                                     <collectionViewFlowLayout key="collectionViewLayout" minimumLineSpacing="10" minimumInteritemSpacing="10" id="p8G-wr-zEn">
                                                         <size key="itemSize" width="224" height="50"/>
@@ -162,7 +165,7 @@ OAKLAND,CA</string>
                                                     </collectionViewFlowLayout>
                                                     <cells>
                                                         <collectionViewCell opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" reuseIdentifier="RADetailActionSubCell" id="NRo-Hn-zDX" customClass="RADetailActionSubCell">
-                                                            <rect key="frame" x="0.0" y="0.0" width="224" height="50"/>
+                                                            <rect key="frame" x="75.5" y="0.0" width="224" height="50"/>
                                                             <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
                                                             <view key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" insetsLayoutMarginsFromSafeArea="NO">
                                                                 <rect key="frame" x="0.0" y="0.0" width="224" height="50"/>
@@ -214,23 +217,14 @@ OAKLAND,CA</string>
                                         </connections>
                                     </tableViewCell>
                                     <tableViewCell clipsSubviews="YES" contentMode="scaleToFill" preservesSuperviewLayoutMargins="YES" selectionStyle="default" indentationWidth="10" reuseIdentifier="RADetailMapCell" rowHeight="100" id="sLQ-ry-Yxv" customClass="RADetailMapCell">
-                                        <rect key="frame" x="0.0" y="388" width="375" height="100"/>
+                                        <rect key="frame" x="0.0" y="388" width="600" height="100"/>
                                         <autoresizingMask key="autoresizingMask"/>
                                         <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" preservesSuperviewLayoutMargins="YES" insetsLayoutMarginsFromSafeArea="NO" tableViewCell="sLQ-ry-Yxv" id="3xH-7S-3HD">
-                                            <rect key="frame" x="0.0" y="0.0" width="375" height="99.5"/>
+                                            <rect key="frame" x="0.0" y="0.0" width="600" height="99.5"/>
                                             <autoresizingMask key="autoresizingMask"/>
                                             <subviews>
-                                                <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="PFm-sQ-c4b">
-                                                    <rect key="frame" x="5" y="31" width="260" height="63.5"/>
-                                                    <string key="text">TRANS PACIFIC CONTAINER SERVICE
-BERTH 30 2800 7TH ST
-OAKLAND,CA</string>
-                                                    <fontDescription key="fontDescription" type="system" pointSize="15"/>
-                                                    <nil key="textColor"/>
-                                                    <nil key="highlightedColor"/>
-                                                </label>
                                                 <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Pick Up" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="xB6-BK-ueh">
-                                                    <rect key="frame" x="5" y="5" width="365" height="21"/>
+                                                    <rect key="frame" x="5" y="5" width="590" height="21"/>
                                                     <constraints>
                                                         <constraint firstAttribute="height" constant="21" id="fu8-8j-kB0"/>
                                                     </constraints>
@@ -239,7 +233,7 @@ OAKLAND,CA</string>
                                                     <nil key="highlightedColor"/>
                                                 </label>
                                                 <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="ev3-or-KB1">
-                                                    <rect key="frame" x="325" y="43" width="40" height="40"/>
+                                                    <rect key="frame" x="550" y="43" width="40" height="40"/>
                                                     <constraints>
                                                         <constraint firstAttribute="height" constant="40" id="7wS-i9-I5v"/>
                                                         <constraint firstAttribute="width" constant="40" id="SOy-eZ-AVi"/>
@@ -249,30 +243,40 @@ OAKLAND,CA</string>
                                                         <action selector="navigationBtnClick:" destination="sLQ-ry-Yxv" eventType="touchUpInside" id="bBe-wQ-Bh4"/>
                                                     </connections>
                                                 </button>
+                                                <textView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" scrollEnabled="NO" editable="NO" textAlignment="natural" translatesAutoresizingMaskIntoConstraints="NO" id="5BM-ek-pkN">
+                                                    <rect key="frame" x="5" y="31" width="540" height="63.5"/>
+                                                    <color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
+                                                    <string key="text">TRANS PACIFIC CONTAINER SERVICE
+BERTH 30 2800 7TH ST
+OAKLAND,CA</string>
+                                                    <fontDescription key="fontDescription" type="system" pointSize="14"/>
+                                                    <textInputTraits key="textInputTraits" autocapitalizationType="sentences"/>
+                                                    <dataDetectorType key="dataDetectorTypes" phoneNumber="YES"/>
+                                                </textView>
                                             </subviews>
                                             <constraints>
-                                                <constraint firstItem="ev3-or-KB1" firstAttribute="centerY" secondItem="PFm-sQ-c4b" secondAttribute="centerY" id="Hpl-vQ-mvZ"/>
+                                                <constraint firstItem="5BM-ek-pkN" firstAttribute="top" secondItem="xB6-BK-ueh" secondAttribute="bottom" constant="5" id="0GY-38-uZx"/>
+                                                <constraint firstAttribute="bottom" secondItem="5BM-ek-pkN" secondAttribute="bottom" constant="5" id="8Ao-Cr-oWt"/>
+                                                <constraint firstAttribute="trailing" secondItem="5BM-ek-pkN" secondAttribute="trailing" constant="55" id="CfV-6F-qHd"/>
                                                 <constraint firstItem="xB6-BK-ueh" firstAttribute="top" secondItem="3xH-7S-3HD" secondAttribute="top" constant="5" id="KSy-vK-d3g"/>
-                                                <constraint firstItem="PFm-sQ-c4b" firstAttribute="top" secondItem="xB6-BK-ueh" secondAttribute="bottom" constant="5" id="RvK-I5-aUn"/>
-                                                <constraint firstItem="ev3-or-KB1" firstAttribute="leading" relation="greaterThanOrEqual" secondItem="PFm-sQ-c4b" secondAttribute="trailing" constant="5" id="TYF-kk-BvU"/>
+                                                <constraint firstItem="5BM-ek-pkN" firstAttribute="centerY" secondItem="ev3-or-KB1" secondAttribute="centerY" id="WQf-6c-0PV"/>
                                                 <constraint firstAttribute="trailing" secondItem="ev3-or-KB1" secondAttribute="trailing" constant="10" id="b23-nc-OSg"/>
                                                 <constraint firstItem="xB6-BK-ueh" firstAttribute="leading" secondItem="3xH-7S-3HD" secondAttribute="leading" constant="5" id="eGw-aX-50a"/>
-                                                <constraint firstItem="PFm-sQ-c4b" firstAttribute="leading" secondItem="3xH-7S-3HD" secondAttribute="leading" constant="5" id="eSs-EX-al6"/>
-                                                <constraint firstAttribute="bottom" secondItem="PFm-sQ-c4b" secondAttribute="bottom" constant="5" id="fmQ-Bh-2j8"/>
                                                 <constraint firstAttribute="trailing" secondItem="xB6-BK-ueh" secondAttribute="trailing" constant="5" id="uYg-df-E7T"/>
+                                                <constraint firstItem="5BM-ek-pkN" firstAttribute="leading" secondItem="3xH-7S-3HD" secondAttribute="leading" constant="5" id="wMZ-Ea-MmE"/>
                                             </constraints>
                                         </tableViewCellContentView>
                                         <connections>
                                             <outlet property="navigationBtn" destination="ev3-or-KB1" id="IjI-gL-BJn"/>
                                             <outlet property="titleLabel" destination="xB6-BK-ueh" id="qka-5z-4Nn"/>
-                                            <outlet property="valueLabel" destination="PFm-sQ-c4b" id="oNG-uG-bHW"/>
+                                            <outlet property="valueLabel" destination="5BM-ek-pkN" id="Sgb-Qq-4j0"/>
                                         </connections>
                                     </tableViewCell>
                                     <tableViewCell clipsSubviews="YES" contentMode="scaleToFill" preservesSuperviewLayoutMargins="YES" selectionStyle="default" indentationWidth="10" reuseIdentifier="RADetailPhotoCell" rowHeight="100" id="44Q-BL-fjP" customClass="RADetailPhotoCell">
-                                        <rect key="frame" x="0.0" y="488" width="375" height="100"/>
+                                        <rect key="frame" x="0.0" y="488" width="600" height="100"/>
                                         <autoresizingMask key="autoresizingMask"/>
                                         <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" preservesSuperviewLayoutMargins="YES" insetsLayoutMarginsFromSafeArea="NO" tableViewCell="44Q-BL-fjP" id="k4f-vX-hlb">
-                                            <rect key="frame" x="0.0" y="0.0" width="375" height="99.5"/>
+                                            <rect key="frame" x="0.0" y="0.0" width="600" height="99.5"/>
                                             <autoresizingMask key="autoresizingMask"/>
                                             <subviews>
                                                 <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="M6V-ez-t4d">
@@ -282,7 +286,7 @@ OAKLAND,CA</string>
                                                     <nil key="highlightedColor"/>
                                                 </label>
                                                 <imageView contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="x23-Ma-VwQ">
-                                                    <rect key="frame" x="505.5" y="5" width="89.5" height="89.5"/>
+                                                    <rect key="frame" x="280.5" y="5" width="89.5" height="89.5"/>
                                                     <gestureRecognizers/>
                                                     <constraints>
                                                         <constraint firstAttribute="width" secondItem="x23-Ma-VwQ" secondAttribute="height" multiplier="89:89" id="Gi9-rt-ewa"/>
@@ -305,14 +309,14 @@ OAKLAND,CA</string>
                                         </connections>
                                     </tableViewCell>
                                     <tableViewCell clipsSubviews="YES" contentMode="scaleToFill" preservesSuperviewLayoutMargins="YES" selectionStyle="default" indentationWidth="10" reuseIdentifier="RADetailSignatureCell" rowHeight="150" id="KBG-tu-iKo" customClass="RADetailSignatureCell">
-                                        <rect key="frame" x="0.0" y="588" width="375" height="150"/>
+                                        <rect key="frame" x="0.0" y="588" width="600" height="150"/>
                                         <autoresizingMask key="autoresizingMask"/>
                                         <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" preservesSuperviewLayoutMargins="YES" insetsLayoutMarginsFromSafeArea="NO" tableViewCell="KBG-tu-iKo" id="EcS-EV-o0B">
-                                            <rect key="frame" x="0.0" y="0.0" width="375" height="149.5"/>
+                                            <rect key="frame" x="0.0" y="0.0" width="600" height="149.5"/>
                                             <autoresizingMask key="autoresizingMask"/>
                                             <subviews>
                                                 <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="ErT-qT-9u6">
-                                                    <rect key="frame" x="5" y="5" width="590" height="21"/>
+                                                    <rect key="frame" x="5" y="5" width="365" height="21"/>
                                                     <constraints>
                                                         <constraint firstAttribute="height" constant="21" id="E3n-pS-av8"/>
                                                     </constraints>
@@ -321,7 +325,7 @@ OAKLAND,CA</string>
                                                     <nil key="highlightedColor"/>
                                                 </label>
                                                 <imageView contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="na6-0y-zBR">
-                                                    <rect key="frame" x="5" y="31" width="590" height="113.5"/>
+                                                    <rect key="frame" x="5" y="31" width="365" height="113.5"/>
                                                 </imageView>
                                             </subviews>
                                             <constraints>
@@ -372,18 +376,18 @@ OAKLAND,CA</string>
                         <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
                         <subviews>
                             <tableView clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" dataMode="prototypes" style="plain" separatorStyle="default" rowHeight="-1" estimatedRowHeight="-1" sectionHeaderHeight="28" sectionFooterHeight="28" translatesAutoresizingMaskIntoConstraints="NO" id="dkO-Ta-IQf">
-                                <rect key="frame" x="0.0" y="20" width="375" height="647"/>
+                                <rect key="frame" x="0.0" y="20" width="600" height="580"/>
                                 <color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
                                 <prototypes>
                                     <tableViewCell clipsSubviews="YES" contentMode="scaleToFill" preservesSuperviewLayoutMargins="YES" selectionStyle="default" indentationWidth="10" reuseIdentifier="RADetailActionSelectionCell" id="8M5-Ka-QBN" customClass="RADetailActionSelectionCell">
-                                        <rect key="frame" x="0.0" y="28" width="375" height="44"/>
+                                        <rect key="frame" x="0.0" y="28" width="600" height="44"/>
                                         <autoresizingMask key="autoresizingMask"/>
                                         <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" preservesSuperviewLayoutMargins="YES" insetsLayoutMarginsFromSafeArea="NO" tableViewCell="8M5-Ka-QBN" id="CTw-dI-j8V">
-                                            <rect key="frame" x="0.0" y="0.0" width="375" height="43.5"/>
+                                            <rect key="frame" x="0.0" y="0.0" width="600" height="43.5"/>
                                             <autoresizingMask key="autoresizingMask"/>
                                             <subviews>
                                                 <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="DSZ-Hp-4ld">
-                                                    <rect key="frame" x="5" y="0.0" width="595" height="43.5"/>
+                                                    <rect key="frame" x="5" y="0.0" width="370" height="43.5"/>
                                                     <fontDescription key="fontDescription" type="system" pointSize="17"/>
                                                     <nil key="textColor"/>
                                                     <nil key="highlightedColor"/>

+ 4 - 4
Redant Drivers/Apex And Drivers/Detail/Model/RADetailLocationModel.m

@@ -8,7 +8,7 @@
 
 #import "RADetailLocationModel.h"
 
-static const CGFloat SpaceWidth = 90.0f;
+static const CGFloat SpaceWidth = 60.0f;
 static const CGFloat SpaceHeight = 38.0f;
 
 @implementation RADetailLocationModel {
@@ -50,14 +50,14 @@ static const CGFloat SpaceHeight = 38.0f;
                                          options:(NSStringDrawingUsesLineFragmentOrigin | NSStringDrawingUsesFontLeading)
                                       attributes:@{NSFontAttributeName:[UIFont systemFontOfSize:15.0f]}
                                          context:nil].size.height;
-    CGFloat navBtnHeight = 70.0f;
+    CGFloat navBtnHeight = 40.0f;
     if (h < navBtnHeight) { // navigation button height
         h = navBtnHeight;
     }
     
     _height = h + SpaceHeight;
-    if (_height < 106.0f) {
-        _height = 106.0f;
+    if (_height < 80.0f) {
+        _height = 80.0f;
     }
 }
 

+ 4 - 4
Redant Drivers/Apex And Drivers/Detail/Model/RADetailMapModel.m

@@ -8,7 +8,7 @@
 
 #import "RADetailMapModel.h"
 
-static const CGFloat SpaceWidth = 90.0f;
+static const CGFloat SpaceWidth = 60.0f;
 static const CGFloat SpaceHeight = 38.0f;
 
 @implementation RADetailMapModel {
@@ -53,14 +53,14 @@ static const CGFloat SpaceHeight = 38.0f;
                                             options:(NSStringDrawingUsesLineFragmentOrigin | NSStringDrawingUsesFontLeading)
                                          attributes:@{NSFontAttributeName:[UIFont systemFontOfSize:15.0f]}
                                             context:nil].size.height;
-    CGFloat navBtnHeight = 70.0f;
+    CGFloat navBtnHeight = 40.0f;
     if (h < navBtnHeight) { // navigation button height
         h = navBtnHeight;
     }
     
     _height = h + SpaceHeight;
-    if (_height < 106.0f) {
-        _height = 106.0f;
+    if (_height < 80.0f) {
+        _height = 80.0f;
     }
 }
 

+ 3 - 0
Redant Drivers/Apex And Drivers/Home/HomeHeader.xib

@@ -358,12 +358,15 @@
             <connections>
                 <outlet property="FinishCountLabel" destination="apL-NL-f18" id="p7I-uf-608"/>
                 <outlet property="NewCountLabel" destination="U0M-Uc-xWZ" id="7DF-6T-Oia"/>
+                <outlet property="NewCountView" destination="xlF-8W-Q64" id="W5v-tp-pyr"/>
                 <outlet property="ProcessingCountLabel" destination="vBo-bi-6Qy" id="6fO-7e-9ZT"/>
                 <outlet property="availableBtn" destination="zav-l2-wiC" id="dGa-tn-DL6"/>
                 <outlet property="availableTitleLabel" destination="Hae-rx-iyX" id="Mlr-72-rTe"/>
                 <outlet property="backgroundView" destination="q6Y-ok-z0V" id="O1Q-PB-BO0"/>
+                <outlet property="finishedCountView" destination="thx-28-zRP" id="NWi-mF-IVL"/>
                 <outlet property="messageBtn" destination="g4U-M8-oMo" id="s8m-Kt-9Rw"/>
                 <outlet property="messageNewFlagView" destination="IZH-5n-rpN" id="T99-W6-rlo"/>
+                <outlet property="processingCountView" destination="PMs-34-A9a" id="i9f-IZ-XTN"/>
                 <outlet property="settingBtn" destination="vJn-m4-oEg" id="rqD-th-mZy"/>
                 <outlet property="signoutBtn" destination="DoZ-Kc-GDv" id="gj7-9F-yXR"/>
             </connections>

+ 5 - 0
Redant Drivers/Apex And Drivers/Home/RAHomeHeaderView.h

@@ -15,6 +15,11 @@
 - (void)settingClick:(UIButton *)sender;
 - (void)availableClick:(UIButton *)sender;
 - (void)messageClick:(UIButton *)sender;
+- (void)newOrderClick:(id)sender;
+- (void)processingOrderClick:(id)sender;
+- (void)finishedOrderClick:(id)sender;
+
+
 
 @end
 

+ 30 - 0
Redant Drivers/Apex And Drivers/Home/RAHomeHeaderView.m

@@ -28,6 +28,9 @@
 @property (nonatomic,strong) IBOutlet UIButton *messageBtn;
 
 @property (nonatomic,strong) IBOutlet UIImageView *messageNewFlagView;
+@property (nonatomic,strong) IBOutlet UIView *NewCountView;
+@property (nonatomic,strong) IBOutlet UIView *processingCountView;
+@property (nonatomic,strong) IBOutlet UIView *finishedCountView;
 
 @end
 
@@ -43,6 +46,15 @@
     self.NewOrderCount = self.ProcessingOrderCount = self.FinishOrderCount = 0;
     self.availabel = self.existNewMessage = NO;
     
+    UITapGestureRecognizer *newTap = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(newOrderClick:)];
+    [self.NewCountView addGestureRecognizer:newTap];
+    
+    UITapGestureRecognizer *proTap = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(processingOrderClick:)];
+    [self.processingCountView addGestureRecognizer:proTap];
+    
+    UITapGestureRecognizer *finTap = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(finishedOrderClick:)];
+    [self.finishedCountView addGestureRecognizer:finTap];
+    
     _gradientLayer = [CAGradientLayer layer];
     
     UIColor *orangeWhiteColor =  ApexDriverOrangeWhiteColor;
@@ -126,4 +138,22 @@
     }
 }
 
+- (void)newOrderClick:(id)sender {
+    if (self.delegate && [self.delegate respondsToSelector:@selector(newOrderClick:)]) {
+        [self.delegate newOrderClick:self.NewCountView];
+    }
+}
+
+- (void)processingOrderClick:(id)sender {
+    if (self.delegate && [self.delegate respondsToSelector:@selector(processingOrderClick:)]) {
+        [self.delegate processingOrderClick:self.processingCountView];
+    }
+}
+
+- (void)finishedOrderClick:(id)sender {
+    if (self.delegate && [self.delegate respondsToSelector:@selector(finishedOrderClick:)]) {
+        [self.delegate finishedOrderClick:self.finishedCountView];
+    }
+}
+
 @end

+ 26 - 5
Redant Drivers/Apex And Drivers/Home/RAHomeViewController.m

@@ -176,7 +176,7 @@
 //
 //    self.navigationItem.rightBarButtonItems = @[logoutItem,uploadListItem];
     
-    self.title = RASingleton.sharedInstance.user;
+    self.title = [NSString stringWithFormat:@"%@ %@",RASingleton.sharedInstance.user,RASingleton.sharedInstance.firstName];
 }
 
 - (void)registNotification {
@@ -489,12 +489,11 @@
     [self.navigationController pushViewController:detailVC animated:YES];
 }
 
-- (void)showMoreOrderForSection:(NSInteger)section {
+- (void)showMoreControllerWithTitle:(NSString *)title Type:(RAOrderStatus)type {
     
-    RAHomeSectionModel *sectionModel = [self.sectionArray objectAtIndex:section];
     RAHomeMoreViewController *homeMoreVC = [RAHomeMoreViewController viewControllerFromStoryboard];
-    homeMoreVC.title = sectionModel.title;
-    homeMoreVC.type = sectionModel.type;
+    homeMoreVC.title = title;
+    homeMoreVC.type = type;
     
     __weak typeof(self) weakSelf = self;
     homeMoreVC.backendFlagOrderClickBlk = ^{
@@ -504,6 +503,13 @@
     [self.navigationController pushViewController:homeMoreVC animated:YES];
 }
 
+- (void)showMoreOrderForSection:(NSInteger)section {
+    
+    RAHomeSectionModel *sectionModel = [self.sectionArray objectAtIndex:section];
+    
+    [self showMoreControllerWithTitle:sectionModel.title Type:sectionModel.type];
+}
+
 #pragma mark - Nofitication Selector
 
 - (void)receiveNewOrderNotification:(NSNotification *)notification {
@@ -552,4 +558,19 @@
     [self.navigationController pushViewController:messageVC animated:YES];
 }
 
+- (void)newOrderClick:(id)sender {
+    
+    [self showMoreControllerWithTitle:@"New Order" Type:RAOrderStatusNew];
+}
+
+- (void)processingOrderClick:(id)sender {
+    
+    [self showMoreControllerWithTitle:@"Processing Order" Type:RAOrderStatusProcessing];
+}
+
+- (void)finishedOrderClick:(id)sender {
+    
+    [self showMoreControllerWithTitle:@"Finished Order" Type:RAOrderStatusFinish];
+}
+
 @end

+ 6 - 4
Redant Drivers/Apex And Drivers/Login/Login.storyboard

@@ -54,14 +54,15 @@
                                             <action selector="LoginButtonClick:" destination="bft-hS-tbx" eventType="touchUpInside" id="0hN-aU-ntl"/>
                                         </connections>
                                     </button>
-                                    <button hidden="YES" opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="vy2-V9-9ML">
-                                        <rect key="frame" x="20" y="120" width="127" height="18"/>
+                                    <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="vy2-V9-9ML">
+                                        <rect key="frame" x="20" y="119" width="131" height="20"/>
                                         <inset key="insetFor6xAndEarlier" minX="0.0" minY="70" maxX="0.0" maxY="-70"/>
                                         <fontDescription key="fontDescription" type="system" pointSize="15"/>
-                                        <state key="normal" title="  Save password" image="unchecked_32">
+                                        <state key="normal" title="  Save password" image="uncheck">
                                             <color key="titleColor" red="0.0" green="0.50196081400000003" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
                                             <color key="titleShadowColor" red="0.5" green="0.5" blue="0.5" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
                                         </state>
+                                        <state key="selected" image="check"/>
                                     </button>
                                     <activityIndicatorView hidden="YES" opaque="NO" contentMode="scaleToFill" horizontalHuggingPriority="750" verticalHuggingPriority="750" animating="YES" style="gray" translatesAutoresizingMaskIntoConstraints="NO" id="n26-yz-BRQ">
                                         <rect key="frame" x="287" y="119" width="20" height="20"/>
@@ -243,7 +244,8 @@
         </scene>
     </scenes>
     <resources>
+        <image name="check" width="20" height="20"/>
         <image name="driver_logo" width="253" height="109"/>
-        <image name="unchecked_32" width="16" height="16"/>
+        <image name="uncheck" width="20" height="20"/>
     </resources>
 </document>

+ 1 - 1
Redant Drivers/Apex And Drivers/Login/LoginViewController.h

@@ -11,7 +11,7 @@
 
 @interface LoginViewController : RABaseViewController<UITextFieldDelegate>
 
-@property (nonatomic , copy) void (^loginSuccessful)(NSString *user,NSString *password);
+@property (nonatomic , copy) void (^loginSuccessful)(NSString *user,NSString *password, NSString *firstName);
 @property (strong, nonatomic) IBOutlet UIButton *checkSavePassword;
 @property (strong, nonatomic) IBOutlet UITextField *editUser;
 @property (strong, nonatomic) IBOutlet UITextField *editPassword;

+ 7 - 5
Redant Drivers/Apex And Drivers/Login/LoginViewController.m

@@ -26,8 +26,8 @@
 - (void)viewDidLoad
 {
     [super viewDidLoad];
-    [self.checkSavePassword setImage:[UIImage imageNamed:@"unchecked_32.png"] forState:UIControlStateNormal];
-    [self.checkSavePassword setImage:[UIImage imageNamed:@"checked_32.png"] forState:UIControlStateSelected];
+    [self.checkSavePassword setImage:[UIImage imageNamed:@"uncheck"] forState:UIControlStateNormal];
+    [self.checkSavePassword setImage:[UIImage imageNamed:@"check"] forState:UIControlStateSelected];
     
     
     self.editUser.delegate = self;
@@ -67,10 +67,10 @@
     {
         self.editUser.text=user;
         self.editPassword.text=password;
-        self.checkSavePassword.selected=true;
-        
     }
     
+    self.checkSavePassword.selected = RASingleton.sharedInstance.savePassword;
+    
     [self clearNavigationbar];
     [self configureNavigationBar];
 }
@@ -202,8 +202,9 @@
             
             if (ret==RESULT_TRUE)
             {
+                NSString *firstName = [loginInfo objectForKey:@"firstName"];
                 if(self.loginSuccessful)
-                    self.loginSuccessful(self.editUser.text.lowercaseString,self.editPassword.text);
+                    self.loginSuccessful(self.editUser.text.lowercaseString,self.editPassword.text, firstName);
             }
             else
             {
@@ -257,6 +258,7 @@
 -(void)checkboxClick:(UIButton *)btn
 {
     btn.selected = !btn.selected;
+    RASingleton.sharedInstance.savePassword = btn.selected;
 }
 //- (IBAction)onRetrievePassword:(UIButton *)sender {
 //}

+ 5 - 2
Redant Drivers/Apex And Drivers/Offline/RAOfflineHandler.m

@@ -107,8 +107,11 @@ static dispatch_semaphore_t _lock;
     }
     
     NSData *data = [NSData dataWithContentsOfFile:path];
-    NSDictionary *dic = [NSJSONSerialization JSONObjectWithData:data options:NSJSONReadingMutableContainers error:nil];
-    return dic;
+    if (data) {
+        NSDictionary *dic = [NSJSONSerialization JSONObjectWithData:data options:NSJSONReadingMutableContainers error:nil];
+        return dic;
+    }
+    return nil;
 }
 
 /**

+ 12 - 3
Redant Drivers/Apex And Drivers/RADataProvider.m

@@ -176,7 +176,10 @@
 + (NSDictionary *)requestOrderList {
     
     if (RASingleton.sharedInstance.offline) {
-        return [[RAOfflineHandler defaultHandler] requestOfflineHome];
+        NSDictionary *result = [[RAOfflineHandler defaultHandler] requestOfflineHome];
+        if (result) {
+            return result;
+        }
     }
     
     NSMutableDictionary *params = [NSMutableDictionary dictionary];
@@ -205,7 +208,10 @@
 + (NSDictionary *)requestOrderDetail:(NSString *)orderID type:(NSInteger)type type2:(NSString *)type2 statusNo:(NSString *)statusNo {
     
     if (RASingleton.sharedInstance.offline) {
-        return [[RAOfflineHandler defaultHandler] requestOfflineDetailForOrder:orderID withOrderType:type];
+        NSDictionary *result = [[RAOfflineHandler defaultHandler] requestOfflineDetailForOrder:orderID withOrderType:type];
+        if (result) {
+            return result;
+        }
     }
     
     NSMutableDictionary *params = [NSMutableDictionary dictionary];
@@ -237,7 +243,10 @@
 + (NSDictionary *)requestUpdateOrder:(NSString *)orderID driverAction:(NSInteger)action index:(NSInteger)idx {
     
     if (RASingleton.sharedInstance.offline) {
-        return [[RAOfflineHandler defaultHandler] requestOfflineEditOrder:orderID withAction:idx];
+        NSDictionary *result = [[RAOfflineHandler defaultHandler] requestOfflineEditOrder:orderID withAction:idx];
+        if (result) {
+            return result;
+        }
     }
     
 //    return [self loadFakeData:@"fake_order_edit.json"];

+ 4 - 1
Redant Drivers/Apex And Drivers/RASingleton.h

@@ -37,6 +37,9 @@ typedef enum {
 
 @property (nonatomic,assign) RABackgroundReportType backgroundReportType;///<后台位置报告权限类型
 
+@property (nonatomic,copy) NSString *firstName;
+@property (nonatomic,assign) BOOL savePassword;
+
 @property (nonatomic,assign) BOOL offline;
 
 - (void)saveUserInfo;
@@ -45,7 +48,7 @@ typedef enum {
 
 - (NSString *)savedPassword;
 
-- (void)loginUser:(NSString *)user password:(NSString *)password;
+- (void)loginUser:(NSString *)user password:(NSString *)password firstName:(NSString *)firstName;
 
 - (BOOL)autoLogin;
 

+ 25 - 5
Redant Drivers/Apex And Drivers/RASingleton.m

@@ -27,10 +27,18 @@ static RASingleton *singleton;
     dispatch_once(&tocken, ^{
         singleton = [[RASingleton alloc] init];
         singleton->_secretKey = @"usai";
+        singleton->_savePassword = [[[NSUserDefaults standardUserDefaults] objectForKey:@"savePassword"] boolValue];
     });
     return singleton;
 }
 
+- (void)setSavePassword:(BOOL)savePassword {
+    _savePassword = savePassword;
+    
+    NSUserDefaults *defaults =[NSUserDefaults standardUserDefaults];
+    [defaults setObject:@(_savePassword) forKey:@"savePassword"];
+}
+
 #pragma mark - User
 
 - (NSString *)secretKey {
@@ -59,9 +67,11 @@ static RASingleton *singleton;
         NSUserDefaults *defaults =[NSUserDefaults standardUserDefaults];
         [defaults removeObjectForKey:@"user"];
         [defaults removeObjectForKey:@"password"];
+        [defaults removeObjectForKey:@"firstName"];
         
         [defaults setValue:self.encryptUser forKey:@"user"];
         [defaults setValue:self.encryptPassword forKey:@"password"];
+        [defaults setObject:self.firstName forKey:@"firstName"];
         [defaults setBool:TRUE forKey:@"autologin"];
         [defaults synchronize];
     }
@@ -77,9 +87,14 @@ static RASingleton *singleton;
     return password;
 }
 
-- (void)loginUser:(NSString *)user password:(NSString *)password {
+- (NSString *)savedFirstName {
+    return [[NSUserDefaults standardUserDefaults] stringForKey:@"firstName"];
+}
+
+- (void)loginUser:(NSString *)user password:(NSString *)password firstName:(NSString *)firstName {
     _user = user;
     _password = password;
+    _firstName = firstName;
     
     [self saveUserInfo];
     
@@ -89,6 +104,7 @@ static RASingleton *singleton;
 - (BOOL)autoLogin {
     _user = [self savedUser];
     _password = [self savedPassword];
+    _firstName = [self savedFirstName];
     
     return _user.length && _password.length;
 }
@@ -111,11 +127,15 @@ static RASingleton *singleton;
 - (void)logout {
     _user = nil;
     _password = nil;
+    _firstName = nil;
     
-    NSUserDefaults *defaults =[NSUserDefaults standardUserDefaults];
-    [defaults removeObjectForKey:@"user"];
-    [defaults removeObjectForKey:@"password"];
-    [defaults synchronize];
+    if (!self.savePassword) {
+        NSUserDefaults *defaults =[NSUserDefaults standardUserDefaults];
+        [defaults removeObjectForKey:@"user"];
+        [defaults removeObjectForKey:@"password"];
+        [defaults removeObjectForKey:@"firstName"];
+        [defaults synchronize];
+    }
 }
 
 - (void)changePassword:(NSString *)password {