Selaa lähdekoodia

The user logs out and then logs in after switching accounts, the Home is not refreshed -- 用户登出切换账号后再登录,Home 没有刷新 resolve: #52
Optimize file download and allow duplicate file names -- 优化文件下载,允许文件名重复 resolve: #40
There should be a prompt when the query result is empty -- 查询结果为空时应该有提示 resolve: #51

Ray Zhang 5 vuotta sitten
vanhempi
commit
4cbc9bf396

+ 6 - 6
RA TradeFiling/RA TradeFiling.xcodeproj/project.pbxproj

@@ -73,7 +73,7 @@
 		3C5F8B552564FDD100CFD26A /* ResultViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 3C5F8B522564FDD100CFD26A /* ResultViewController.m */; };
 		3C5F8B562564FDD100CFD26A /* Result.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 3C5F8B532564FDD100CFD26A /* Result.storyboard */; };
 		3C5F8B8E2564FFC700CFD26A /* ResultViewController+QuickLook.m in Sources */ = {isa = PBXBuildFile; fileRef = 3C5F8B8D2564FFC700CFD26A /* ResultViewController+QuickLook.m */; };
-		3C5F8B982565001700CFD26A /* ApexResultMenuItem.m in Sources */ = {isa = PBXBuildFile; fileRef = 3C5F8B962565001700CFD26A /* ApexResultMenuItem.m */; };
+		3C5F8B982565001700CFD26A /* ResultMenuItem.m in Sources */ = {isa = PBXBuildFile; fileRef = 3C5F8B962565001700CFD26A /* ResultMenuItem.m */; };
 		3C5F8B9E2565003600CFD26A /* ResultPresenter.m in Sources */ = {isa = PBXBuildFile; fileRef = 3C5F8B9D2565003600CFD26A /* ResultPresenter.m */; };
 		3C5F8BB2256500F900CFD26A /* NSData+RAImageType.m in Sources */ = {isa = PBXBuildFile; fileRef = 3C5F8BB0256500F900CFD26A /* NSData+RAImageType.m */; };
 		3C5F8BB82565013B00CFD26A /* ResultBaseModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 3C5F8BB62565013B00CFD26A /* ResultBaseModel.m */; };
@@ -331,8 +331,8 @@
 		3C5F8B8C2564FFC700CFD26A /* ResultViewController+QuickLook.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "ResultViewController+QuickLook.h"; sourceTree = "<group>"; };
 		3C5F8B8D2564FFC700CFD26A /* ResultViewController+QuickLook.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "ResultViewController+QuickLook.m"; sourceTree = "<group>"; };
 		3C5F8B922565000200CFD26A /* ResultProtocol.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ResultProtocol.h; sourceTree = "<group>"; };
-		3C5F8B962565001700CFD26A /* ApexResultMenuItem.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ApexResultMenuItem.m; sourceTree = "<group>"; };
-		3C5F8B972565001700CFD26A /* ApexResultMenuItem.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ApexResultMenuItem.h; sourceTree = "<group>"; };
+		3C5F8B962565001700CFD26A /* ResultMenuItem.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ResultMenuItem.m; sourceTree = "<group>"; };
+		3C5F8B972565001700CFD26A /* ResultMenuItem.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ResultMenuItem.h; sourceTree = "<group>"; };
 		3C5F8B9C2565003600CFD26A /* ResultPresenter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ResultPresenter.h; sourceTree = "<group>"; };
 		3C5F8B9D2565003600CFD26A /* ResultPresenter.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ResultPresenter.m; sourceTree = "<group>"; };
 		3C5F8BB0256500F900CFD26A /* NSData+RAImageType.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = "NSData+RAImageType.m"; path = "../../common/NSData/NSData+RAImageType.m"; sourceTree = "<group>"; };
@@ -818,8 +818,8 @@
 				3C5F8B522564FDD100CFD26A /* ResultViewController.m */,
 				3C5F8B8C2564FFC700CFD26A /* ResultViewController+QuickLook.h */,
 				3C5F8B8D2564FFC700CFD26A /* ResultViewController+QuickLook.m */,
-				3C5F8B972565001700CFD26A /* ApexResultMenuItem.h */,
-				3C5F8B962565001700CFD26A /* ApexResultMenuItem.m */,
+				3C5F8B972565001700CFD26A /* ResultMenuItem.h */,
+				3C5F8B962565001700CFD26A /* ResultMenuItem.m */,
 				3C5F8B9C2565003600CFD26A /* ResultPresenter.h */,
 				3C5F8B9D2565003600CFD26A /* ResultPresenter.m */,
 				3C5F8BC5256503EC00CFD26A /* ResultAdditionView.h */,
@@ -1387,7 +1387,7 @@
 				3C7F377A2564C1E10033BF82 /* RABadgeNumberView.m in Sources */,
 				3C5F8CF5257A1EE100CFD26A /* ResultViewController+TableDelegate.m in Sources */,
 				3C7670512599B29D00588DB5 /* ResulteManifestCell.m in Sources */,
-				3C5F8B982565001700CFD26A /* ApexResultMenuItem.m in Sources */,
+				3C5F8B982565001700CFD26A /* ResultMenuItem.m in Sources */,
 				3C5F8C0F256508D400CFD26A /* SearchViewController.m in Sources */,
 				3C5F8C5F25650C0F00CFD26A /* ResultAddition.m in Sources */,
 				3C5F8BDB2565053700CFD26A /* SavedDetailViewController.m in Sources */,

BIN
RA TradeFiling/RA TradeFiling.xcodeproj/project.xcworkspace/xcuserdata/ruizhang.xcuserdatad/UserInterfaceState.xcuserstate


+ 173 - 13
RA TradeFiling/RA TradeFiling.xcodeproj/xcuserdata/ruizhang.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist

@@ -122,8 +122,8 @@
             filePath = "RA TradeFiling/Home/RAHomeViewController.m"
             startingColumnNumber = "9223372036854775807"
             endingColumnNumber = "9223372036854775807"
-            startingLineNumber = "721"
-            endingLineNumber = "721"
+            startingLineNumber = "754"
+            endingLineNumber = "754"
             landmarkName = "-loadData"
             landmarkType = "7">
          </BreakpointContent>
@@ -250,8 +250,8 @@
             filePath = "RA TradeFiling/Home/RAHomeViewController.m"
             startingColumnNumber = "9223372036854775807"
             endingColumnNumber = "9223372036854775807"
-            startingLineNumber = "977"
-            endingLineNumber = "977"
+            startingLineNumber = "1010"
+            endingLineNumber = "1010"
             landmarkName = "-showMoreOrderForSection:"
             landmarkType = "7">
          </BreakpointContent>
@@ -282,9 +282,9 @@
             filePath = "RA TradeFiling/Home/RAHomeViewController.m"
             startingColumnNumber = "9223372036854775807"
             endingColumnNumber = "9223372036854775807"
-            startingLineNumber = "667"
-            endingLineNumber = "667"
-            landmarkName = "-titleForSection:"
+            startingLineNumber = "700"
+            endingLineNumber = "700"
+            landmarkName = "-dashModelForIndexPath:"
             landmarkType = "7">
          </BreakpointContent>
       </BreakpointProxy>
@@ -314,8 +314,8 @@
             filePath = "RA TradeFiling/Home/RAHomeViewController.m"
             startingColumnNumber = "9223372036854775807"
             endingColumnNumber = "9223372036854775807"
-            startingLineNumber = "234"
-            endingLineNumber = "234"
+            startingLineNumber = "235"
+            endingLineNumber = "235"
             landmarkName = "-dashModelForIndex:"
             landmarkType = "7">
          </BreakpointContent>
@@ -906,8 +906,8 @@
             filePath = "RA TradeFiling/Home/RAHomeViewController.m"
             startingColumnNumber = "9223372036854775807"
             endingColumnNumber = "9223372036854775807"
-            startingLineNumber = "582"
-            endingLineNumber = "582"
+            startingLineNumber = "615"
+            endingLineNumber = "615"
             landmarkName = "-_updateUploadItem:withUploadCount:"
             landmarkType = "7">
          </BreakpointContent>
@@ -1066,8 +1066,8 @@
             filePath = "RA TradeFiling/Home/RAHomeViewController.m"
             startingColumnNumber = "9223372036854775807"
             endingColumnNumber = "9223372036854775807"
-            startingLineNumber = "81"
-            endingLineNumber = "81"
+            startingLineNumber = "82"
+            endingLineNumber = "82"
             landmarkName = "-setOrders:"
             landmarkType = "7">
          </BreakpointContent>
@@ -1216,5 +1216,165 @@
             landmarkType = "7">
          </BreakpointContent>
       </BreakpointProxy>
+      <BreakpointProxy
+         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
+         <BreakpointContent
+            uuid = "8F4CD891-5B51-4CE3-86B8-F90B58F2578D"
+            shouldBeEnabled = "Yes"
+            ignoreCount = "0"
+            continueAfterRunningActions = "No"
+            filePath = "../common/WK PDF+Web/WebViewController.m"
+            startingColumnNumber = "9223372036854775807"
+            endingColumnNumber = "9223372036854775807"
+            startingLineNumber = "31"
+            endingLineNumber = "31"
+            landmarkName = "-viewDidLoad"
+            landmarkType = "7">
+         </BreakpointContent>
+      </BreakpointProxy>
+      <BreakpointProxy
+         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
+         <BreakpointContent
+            uuid = "580E4EE3-92B0-407D-BF01-1AB955DF699A"
+            shouldBeEnabled = "Yes"
+            ignoreCount = "0"
+            continueAfterRunningActions = "No"
+            filePath = "RA TradeFiling/Detail/DetailPageViewController.m"
+            startingColumnNumber = "9223372036854775807"
+            endingColumnNumber = "9223372036854775807"
+            startingLineNumber = "729"
+            endingLineNumber = "729"
+            landmarkName = "-webView:didFinishNavigation:"
+            landmarkType = "7">
+         </BreakpointContent>
+      </BreakpointProxy>
+      <BreakpointProxy
+         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
+         <BreakpointContent
+            uuid = "65B9CB0C-7314-45A9-9713-BB18259A94B7"
+            shouldBeEnabled = "Yes"
+            ignoreCount = "0"
+            continueAfterRunningActions = "No"
+            filePath = "RA TradeFiling/Detail/DetailPageViewController.m"
+            startingColumnNumber = "9223372036854775807"
+            endingColumnNumber = "9223372036854775807"
+            startingLineNumber = "791"
+            endingLineNumber = "791"
+            landmarkName = "-webView:decidePolicyForNavigationAction:decisionHandler:"
+            landmarkType = "7">
+         </BreakpointContent>
+      </BreakpointProxy>
+      <BreakpointProxy
+         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
+         <BreakpointContent
+            uuid = "4B75B1F7-90AA-47AD-8D32-B8CBFF86BCB0"
+            shouldBeEnabled = "No"
+            ignoreCount = "0"
+            continueAfterRunningActions = "No"
+            filePath = "RA TradeFiling/Detail/DetailTabBarController.m"
+            startingColumnNumber = "9223372036854775807"
+            endingColumnNumber = "9223372036854775807"
+            startingLineNumber = "499"
+            endingLineNumber = "499"
+            landmarkName = "-menuClick:"
+            landmarkType = "7">
+         </BreakpointContent>
+      </BreakpointProxy>
+      <BreakpointProxy
+         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
+         <BreakpointContent
+            uuid = "2CDA231B-4404-4BC8-B2DB-BA536E9B5B70"
+            shouldBeEnabled = "Yes"
+            ignoreCount = "0"
+            continueAfterRunningActions = "No"
+            filePath = "RA TradeFiling/DataProvider/OfflineDataProvider.m"
+            startingColumnNumber = "9223372036854775807"
+            endingColumnNumber = "9223372036854775807"
+            startingLineNumber = "117"
+            endingLineNumber = "117"
+            landmarkName = "+request_fastdownload:url:completionHandler:"
+            landmarkType = "7">
+         </BreakpointContent>
+      </BreakpointProxy>
+      <BreakpointProxy
+         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
+         <BreakpointContent
+            uuid = "FC55FF2A-57C1-4B17-A1AF-09A4D9F5654E"
+            shouldBeEnabled = "No"
+            ignoreCount = "0"
+            continueAfterRunningActions = "No"
+            filePath = "RA TradeFiling/DataProvider/RADataProvider.m"
+            startingColumnNumber = "9223372036854775807"
+            endingColumnNumber = "9223372036854775807"
+            startingLineNumber = "104"
+            endingLineNumber = "104"
+            landmarkName = "+DownloadFile:url:completionHandler:"
+            landmarkType = "7">
+         </BreakpointContent>
+      </BreakpointProxy>
+      <BreakpointProxy
+         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
+         <BreakpointContent
+            uuid = "EB9FC2FD-AE77-4A8C-B6EE-9C5425AADA37"
+            shouldBeEnabled = "No"
+            ignoreCount = "0"
+            continueAfterRunningActions = "No"
+            filePath = "RA TradeFiling/Detail/DetailPageViewController.m"
+            startingColumnNumber = "9223372036854775807"
+            endingColumnNumber = "9223372036854775807"
+            startingLineNumber = "624"
+            endingLineNumber = "624"
+            landmarkName = "-showDocument:"
+            landmarkType = "7">
+         </BreakpointContent>
+      </BreakpointProxy>
+      <BreakpointProxy
+         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
+         <BreakpointContent
+            uuid = "2CC5FBAD-6352-4F6C-B541-727A76E13345"
+            shouldBeEnabled = "No"
+            ignoreCount = "0"
+            continueAfterRunningActions = "No"
+            filePath = "RA TradeFiling/DataProvider/OnlineDataProvider.m"
+            startingColumnNumber = "9223372036854775807"
+            endingColumnNumber = "9223372036854775807"
+            startingLineNumber = "163"
+            endingLineNumber = "163"
+            landmarkName = "+request_fastdownload:url:completionHandler:"
+            landmarkType = "7">
+         </BreakpointContent>
+      </BreakpointProxy>
+      <BreakpointProxy
+         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
+         <BreakpointContent
+            uuid = "09E94919-5829-442C-9A10-B720DEDF6D2E"
+            shouldBeEnabled = "No"
+            ignoreCount = "0"
+            continueAfterRunningActions = "No"
+            filePath = "../common/NetworkUtils.m"
+            startingColumnNumber = "9223372036854775807"
+            endingColumnNumber = "9223372036854775807"
+            startingLineNumber = "1040"
+            endingLineNumber = "1040"
+            landmarkName = "+request_file_fast:parameters:completionHandler:"
+            landmarkType = "7">
+         </BreakpointContent>
+      </BreakpointProxy>
+      <BreakpointProxy
+         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
+         <BreakpointContent
+            uuid = "87951D3D-2BCF-4A45-A8F3-A70A66191C91"
+            shouldBeEnabled = "No"
+            ignoreCount = "0"
+            continueAfterRunningActions = "No"
+            filePath = "RA TradeFiling/Result/ResultViewController+TableDataSource.m"
+            startingColumnNumber = "9223372036854775807"
+            endingColumnNumber = "9223372036854775807"
+            startingLineNumber = "42"
+            endingLineNumber = "42"
+            landmarkName = "-tableView:numberOfRowsInSection:"
+            landmarkType = "7">
+         </BreakpointContent>
+      </BreakpointProxy>
    </Breakpoints>
 </Bucket>

+ 1 - 1
RA TradeFiling/RA TradeFiling/FAKE_DATA/detail_acem1.json

@@ -44,7 +44,7 @@
       "Consignee": "M S INTERNATIONAL INC<br />\r\n2095 N. BATAVIA STREET ORANGE,\t\t<br />\r\nCA USA 92865\t\t<br />\r\nTEL: 714-685-7500 TAX : (714) 685-7600\t\t<br />\r\nCONTACT PERSON: MR. MARTIN"
     },
     "item14": {
-      "Notify_Party": "M S INTERNATIONAL INC<br />\r\n2095 N. BATAVIA STREET ORANGE,\t\t<br />\r\nCA USA 92865\t\t<br />\r\nTEL: 714-685-7500 TAX : (714) 685-7600\t\t<br />\r\nCONTACT PERSON: MR. MARTIN"
+      "Notify_Party": "M S INTERNATIONAL INC\r\n2095 N. BATAVIA STREET ORANGE,\t\t<br />\r\nCA USA 92865\t\t<br />\r\nTEL: 714-685-7500 TAX : (714) 685-7600\t\t<br />\r\nCONTACT PERSON: MR. MARTIN"
     },
     "item15": {
       "Port_Of_Loading": "SHANGHAI, 31(SCHK : 57035)"

+ 52 - 19
RA TradeFiling/RA TradeFiling/Home/RAHomeViewController.m

@@ -56,6 +56,7 @@
 #import "HomeDasheManifestCellE.h"
 #import "HomeDasheManifestModelE.h"
 
+#import "RAUtils.h"
 
 #import "TFNavigationController.h"
 
@@ -298,6 +299,8 @@
     self.label_cache.layer.cornerRadius = 5.0f;
     self.label_cache.layer.masksToBounds = YES;
     
+    
+    [self checkActivation];
     [self checkPermission];
     [self clearNavigationbar];
     [self configureNavigationBar];
@@ -305,8 +308,16 @@
     [self registNotification];
 //    [self loadData];
     self.reloadFlag=true;
+    [self checkActivation];
+}
+- (void) checkActivation
+{
+    if(!RASingleton.sharedInstance.active)
+    {
+        NSString * msg=@"Our customer service will contact you to assist you complete the user activation";
+        [RAUtils message_alert:msg title:@"Message" controller:self];
+    }
 }
-
 - (void)viewWillAppear:(BOOL)animated {
     [super viewWillAppear:animated];
     
@@ -498,6 +509,9 @@
 }
 
 - (void)registNotification {
+    
+    
+    [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(handleNotification:) name:RA_NOTIFICATION_LOGOUT object:nil];
 //    [RASingleton.sharedInstance writeLog:[NSString stringWithFormat:@"%s",__func__]];
 //    [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(receiveNewOrderNotification:) name:RANotificationHandleOrder object:nil];
 //    [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(receiveReloadNotification:) name:RANotificationReloadHome object:nil];
@@ -505,6 +519,25 @@
 //    [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(receiveUploadFinishNotification:) name:RANotificationChangeUpload object:nil];
 }
 
+- (void)handleNotification:(NSNotification *)notification {
+    
+    
+//    NSAssert(true, @"setup does not implement");
+    
+//    AppDelegate *appDelegate = (AppDelegate *)[[UIApplication sharedApplication] delegate];
+    if ([notification.name isEqualToString:RA_NOTIFICATION_LOGOUT]) {
+        
+//        [appDelegate Logout];
+//        [(LoginViewController *)self.logoutbar.firstObject clear];
+        self.reloadFlag = true;
+        
+        
+//        [self.navigationController.navigationBar setHidden:true];
+//
+    }
+
+}
+
 - (void)checkPermission {
     
     CLAuthorizationStatus locationAuthoriztionAstatus = [CLLocationManager authorizationStatus];
@@ -992,26 +1025,26 @@
 }
 
 #pragma mark - Nofitication Selector
-
-- (void)receiveNewOrderNotification:(NSNotification *)notification {
-    [self loadData];
-}
-
-- (void)receiveReloadNotification:(NSNotification *)notification {
-    [self loadData];
-}
-
-- (void)receiveCheckDetailNofitication:(NSNotification *)notification {
 //
-//    NSDictionary *userInfo = [notification userInfo];
-//    if (userInfo) {
-//        NSString *orderId = [userInfo objectForKey:@"order_id"];
-//        if (orderId) {
-//            [self _checkOrder:orderId];
-//        }
-//    }
+//- (void)receiveNewOrderNotification:(NSNotification *)notification {
+//    [self loadData];
+//}
 //
-}
+//- (void)receiveReloadNotification:(NSNotification *)notification {
+//    [self loadData];
+//}
+//
+//- (void)receiveCheckDetailNofitication:(NSNotification *)notification {
+////
+////    NSDictionary *userInfo = [notification userInfo];
+////    if (userInfo) {
+////        NSString *orderId = [userInfo objectForKey:@"order_id"];
+////        if (orderId) {
+////            [self _checkOrder:orderId];
+////        }
+////    }
+////
+//}
 
 - (void)receiveUploadFinishNotification:(NSNotification *)notification {
     

+ 1 - 1
RA TradeFiling/RA TradeFiling/Login/LoginViewController.m

@@ -103,7 +103,7 @@
 //
 //            [defaults synchronize];
             
-            [RASingleton.sharedInstance login:self.editUser.text.lowercaseString password:self.editPassword.text firstName:result[@"nick_name"] companyList:result[@"company"] functions:result[@"function_panel"]];
+            [RASingleton.sharedInstance login:self.editUser.text.lowercaseString password:self.editPassword.text firstName:result[@"nick_name"] companyList:result[@"company"] functions:result[@"function_panel"] active:result[@"active"]];
             RASingleton.sharedInstance.fields=result[@"fields"];
             
 //            RASingleton.sharedInstance.user=self.editUser.text.lowercaseString;

+ 2 - 1
RA TradeFiling/RA TradeFiling/RASingleton.h

@@ -24,6 +24,7 @@ typedef enum {
 
 @property (nonatomic,copy,readonly) NSString *user;
 @property (nonatomic,copy,readonly) NSString *password;
+@property (nonatomic,assign) bool *active;
 @property (nonatomic,copy,readonly) NSArray *companylist;
 @property (nonatomic,assign) int companyid;
 //@property (nonatomic,strong) CLLocation *currentLocation;
@@ -57,7 +58,7 @@ typedef enum {
 
 - (NSString *)savedPassword;
 
-- (void)login:(NSString *)user password:(NSString *)password firstName:(NSString *)firstName companyList:(NSArray*) companylist functions:(NSDictionary*)function_panel;
+- (void)login:(NSString *)user password:(NSString *)password firstName:(NSString *)firstName companyList:(NSArray*) companylist functions:(NSDictionary*)function_panel active:(bool) active;
 - (void)changePassword:(NSString *)newpassword ;
 
 - (BOOL)autoLogin;

+ 5 - 1
RA TradeFiling/RA TradeFiling/RASingleton.m

@@ -109,7 +109,7 @@ static RASingleton *singleton;
     _password = newpassword;
     [self saveUserInfo];
 }
-- (void)login:(NSString *)user password:(NSString *)password firstName:(NSString *)firstName companyList:(NSArray*) companylist functions:(NSDictionary*)function_panel
+- (void)login:(NSString *)user password:(NSString *)password firstName:(NSString *)firstName companyList:(NSArray*) companylist functions:(NSDictionary*)function_panel active:(bool) active
 {
     _user = user;
     _password = password;
@@ -120,6 +120,8 @@ static RASingleton *singleton;
     
     _firstName = firstName;
     _functionPanel = function_panel;
+    
+    _active = active;
     [self saveUserInfo];
     self.isLogin=true;
     
@@ -161,6 +163,8 @@ static RASingleton *singleton;
     _firstName = nil;
     _functionPanel=nil;
     
+    _active = false;
+    
     self.isLogin=false;
 //    if (!self.savePassword) {
 //        NSUserDefaults *defaults =[NSUserDefaults standardUserDefaults];

+ 9 - 0
RA TradeFiling/RA TradeFiling/Result/Result.storyboard

@@ -24,6 +24,12 @@
                                     <outlet property="delegate" destination="uCe-yF-zR4" id="i0z-cu-Och"/>
                                 </connections>
                             </tableView>
+                            <label hidden="YES" opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="No Record" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="FcA-4n-f9r">
+                                <rect key="frame" x="167" y="437.5" width="80.5" height="21"/>
+                                <fontDescription key="fontDescription" type="system" pointSize="17"/>
+                                <nil key="textColor"/>
+                                <nil key="highlightedColor"/>
+                            </label>
                         </subviews>
                         <viewLayoutGuide key="safeArea" id="Obh-UZ-tr1"/>
                         <color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
@@ -32,9 +38,12 @@
                             <constraint firstItem="FRa-E3-EBQ" firstAttribute="leading" secondItem="Obh-UZ-tr1" secondAttribute="leading" id="dJE-OG-vQj"/>
                             <constraint firstItem="Obh-UZ-tr1" firstAttribute="trailing" secondItem="FRa-E3-EBQ" secondAttribute="trailing" id="fQ9-m7-CUF"/>
                             <constraint firstItem="FRa-E3-EBQ" firstAttribute="top" secondItem="Obh-UZ-tr1" secondAttribute="top" id="ira-PK-3Co"/>
+                            <constraint firstItem="FcA-4n-f9r" firstAttribute="centerX" secondItem="1gR-6n-IsX" secondAttribute="centerX" id="jTC-ft-mS0"/>
+                            <constraint firstItem="FcA-4n-f9r" firstAttribute="centerY" secondItem="1gR-6n-IsX" secondAttribute="centerY" id="k85-3E-IuJ"/>
                         </constraints>
                     </view>
                     <connections>
+                        <outlet property="labelNoRecord" destination="FcA-4n-f9r" id="VE6-SI-q5O"/>
                         <outlet property="resultTableView" destination="FRa-E3-EBQ" id="tjw-4v-Lqv"/>
                     </connections>
                 </viewController>

+ 1 - 1
RA TradeFiling/RA TradeFiling/Result/ApexResultMenuItem.h → RA TradeFiling/RA TradeFiling/Result/ResultMenuItem.h

@@ -9,7 +9,7 @@
 #import <Foundation/Foundation.h>
 
 
-@interface ApexResultMenuItem : NSObject
+@interface ResultMenuItem : NSObject
 
 @property (nonatomic,copy) NSString *title;
 @property (nonatomic,copy) NSString *action;

+ 2 - 2
RA TradeFiling/RA TradeFiling/Result/ApexResultMenuItem.m → RA TradeFiling/RA TradeFiling/Result/ResultMenuItem.m

@@ -6,9 +6,9 @@
 //  Copyright © 2019 United Software Applications, Inc. All rights reserved.
 //
 
-#import "ApexResultMenuItem.h"
+#import "ResultMenuItem.h"
 
-@implementation ApexResultMenuItem
+@implementation ResultMenuItem
 
 - (void)setValue:(id)value forUndefinedKey:(NSString *)key {
     

+ 2 - 2
RA TradeFiling/RA TradeFiling/Result/ResultPresenter.h

@@ -11,7 +11,7 @@
 FOUNDATION_EXTERN const NSUInteger ResultMaxDispalyAdditionCount;
 
 @protocol ResultProtocol;
-@class ResultBaseModel, ApexResultMenuItem;
+@class ResultBaseModel, ResultMenuItem;
 @interface ResultPresenter : NSObject
 
 @property (nonatomic,weak) id<ResultProtocol> delegate;
@@ -23,7 +23,7 @@ FOUNDATION_EXTERN const NSUInteger ResultMaxDispalyAdditionCount;
 @property (nonatomic,readonly,strong) NSArray *actions;///< Detail Parameter, from query table actions_info
 @property (nonatomic,strong) NSDictionary *actionParams;///< Click Cell Action Parameters
 @property (nonatomic,assign) BOOL dirty;
-@property (nonatomic,readonly,strong) NSArray<ApexResultMenuItem *> *menuItems;
+@property (nonatomic,readonly,strong) NSArray<ResultMenuItem *> *menuItems;
 
 
 - (instancetype)initWithParameters:(NSDictionary *)params;

+ 4 - 4
RA TradeFiling/RA TradeFiling/Result/ResultPresenter.m

@@ -16,7 +16,7 @@
 #import "ResulteManifestModel.h"
 //#import "ApexResultAirBookingModel.h"
 //#import "ApexResultBLInfoModel.h"
-#import "ApexResultMenuItem.h"
+#import "ResultMenuItem.h"
 //#import "ApexResultAirAwbInfoModel.h"
 #import "RASingleton.h"
 #import "AppDelegate.h"
@@ -42,7 +42,7 @@ static const NSInteger detal = 20;
 @property (nonatomic,strong) NSArray<ResultBaseModel *> *dataArray;
 @property (nonatomic,strong) NSArray *rowActions;
 @property (nonatomic,strong) NSArray *actions;
-@property (nonatomic,strong) NSArray<ApexResultMenuItem *> *menuItems;
+@property (nonatomic,strong) NSArray<ResultMenuItem *> *menuItems;
 
 @end
 
@@ -124,7 +124,7 @@ static const NSInteger detal = 20;
     [params setObject:[NSNumber numberWithInteger:detal] forKey:@"limit"];
     [params setObject:displayFields forKey:@"columns"];
     
-    
+
     [RADataProvider Search:params completionHandler:^(NSMutableDictionary *result) {
         
         NSMutableDictionary * json = result;
@@ -228,7 +228,7 @@ static const NSInteger detal = 20;
                     NSMutableArray *tmpArr = [NSMutableArray array];
                     for (NSDictionary *item in menuArr) {
                         
-                        ApexResultMenuItem *menuItem = [ApexResultMenuItem new];
+                        ResultMenuItem *menuItem = [ResultMenuItem new];
                         [menuItem setValuesForKeysWithDictionary:item];
                         [tmpArr addObject:menuItem];
                     }

+ 2 - 0
RA TradeFiling/RA TradeFiling/Result/ResultViewController+TableDataSource.m

@@ -38,6 +38,8 @@
 @implementation ResultViewController (TableDataSource)
 
 - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
+    
+
     return self.presenter.dataCount;
 }
 

+ 1 - 0
RA TradeFiling/RA TradeFiling/Result/ResultViewController.h

@@ -13,6 +13,7 @@
 
 @property (nonatomic, readonly, strong) UITableView *tableView;
 @property (nonatomic, readonly, strong) ResultPresenter *presenter;
+@property (weak, nonatomic) IBOutlet UILabel *labelNoRecord;
 
 + (instancetype)resultViewController:(NSDictionary *)params;
 

+ 6 - 3
RA TradeFiling/RA TradeFiling/Result/ResultViewController.m

@@ -27,7 +27,7 @@
 #import "ResultCustomerCell.h"
 #import "ResultISFCell.h"
 #import "ResulteManifestCell.h"
-#import "ApexResultMenuItem.h"
+#import "ResultMenuItem.h"
 #import "const.h"
 
 @interface ResultViewController ()<ResultProtocol, JLRefreshDelegate>
@@ -172,7 +172,10 @@
 - (void)onSuccess:(NSString *)title {
     [self.curRefresh endRefresh];
     [self.tableView reloadData];
-    
+    if(self.presenter.dataCount==0)
+        self.labelNoRecord.hidden=false;
+    else
+        self.labelNoRecord.hidden=true;
     self.title = title;
 }
 
@@ -228,7 +231,7 @@
         __weak typeof(self) weakSelf = self;
         UIAlertController *alertVC = [UIAlertController alertControllerWithTitle:nil message:nil preferredStyle:UIAlertControllerStyleActionSheet];
 
-        for (ApexResultMenuItem *item in self.presenter.menuItems) {
+        for (ResultMenuItem *item in self.presenter.menuItems) {
             
             UIAlertAction *itemAction = [UIAlertAction actionWithTitle:item.title style:UIAlertActionStyleDefault handler:^(UIAlertAction *action) {
                 

+ 1 - 1
RA TradeFiling/RA TradeFiling/config.h

@@ -12,7 +12,7 @@
 #define JSON_TIMEOUT 60
 #define fake_data false
 #ifdef DEBUG
-    #define test_server
+//    #define test_server
 //    #define fake_data true
 #else
 //    #define fake_data false

+ 4 - 0
common/NetworkUtils.m

@@ -1072,6 +1072,10 @@ repeat:
             }
             NSError *error = nil;
             
+            if([[NSFileManager defaultManager] fileExistsAtPath:path])
+            {
+                [[NSFileManager defaultManager] removeItemAtPath:path error:nil];
+            }
             [[NSFileManager defaultManager] copyItemAtPath:location.path toPath:path error:&error];
             
 //            [[NSFileManager defaultManager] copyItemAtURL:[NSURL URLWithString:location.path] toURL:[NSURL URLWithString:path] error:&error];