Переглянути джерело

1.修改Homer,增加离线等SideBar功能。

Pen Li 8 роки тому
батько
коміт
4c0bb682c7

BIN
RedAnt ERP Mobile/RedAnt ERP Mobile.xcworkspace/xcuserdata/macmini1.xcuserdatad/UserInterfaceState.xcuserstate


+ 86 - 2
RedAnt ERP Mobile/common/Functions/MainViewController.m

@@ -1722,7 +1722,32 @@
     [map setValue:@"rect_change_password" forKey:@"img"];
     [self.sideMenuItems addObject:map.copy];
 
-    #ifdef BUILD_NPD
+#ifdef BUILD_NPD
+    if(appDelegate.user_type==USER_ROLE_EMPLOYEE)
+    {
+        [map setValue:@"Offline Setting" forKey:@"title"];
+        [map setValue:@"rect_market_news" forKey:@"img"];
+        [self.sideMenuItems addObject:map.copy];
+        
+    }
+    if (appDelegate.user && appDelegate.user_type == USER_ROLE_CUSTOMER) {
+        [map setValue:@"Price Setting" forKey:@"title"];
+        //        [map setValue:@"rect_market_news" forKey:@"img"];
+        [self.sideMenuItems addObject:map.copy];
+    }
+    if (appDelegate.user && appDelegate.user_type == USER_ROLE_CUSTOMER) {
+        if ([Singleton sharedInstance].global_lock) {
+            [map setValue:@"Unlock" forKey:@"title"];
+        } else {
+            [map setValue:@"Lock" forKey:@"title"];
+        }
+        
+        [self.sideMenuItems addObject:map.copy];
+    }
+    
+# endif
+    
+#ifdef BUILD_HOMER
     if(appDelegate.user_type==USER_ROLE_EMPLOYEE)
     {
         [map setValue:@"Offline Setting" forKey:@"title"];
@@ -1791,6 +1816,24 @@
     [self.sideMenuItems addObject:map.copy];
  #endif   
     
+#ifdef BUILD_HOMER
+    [map setValue:@"BLOG" forKey:@"title"];
+    [map setValue:@"rect_change_password" forKey:@"img"];
+    [self.sideMenuItems addObject:map.copy];
+    
+    [map setValue:@"HOMER Website" forKey:@"title"];
+    [map setValue:@"rect_change_password" forKey:@"img"];
+    [self.sideMenuItems addObject:map.copy];
+    
+    [map setValue:@"HOMER Policy" forKey:@"title"];
+    [map setValue:@"rect_change_password" forKey:@"img"];
+    [self.sideMenuItems addObject:map.copy];
+    
+    [map setValue:@"Simplified Buying Program" forKey:@"title"];
+    [map setValue:@"rect_change_password" forKey:@"img"];
+    [self.sideMenuItems addObject:map.copy];
+#endif
+    
 
     
     [self.sideMenuTable reloadData];
@@ -2090,9 +2133,17 @@
         
         NSString* url = URL_BLOG;
         
+#ifdef BUILD_HOMER
+        NSString* title = @"HOMER BLOG";
+        
+#endif
         
+#ifdef BUILD_NPD
         NSString* title = @"NPD BLOG";
         
+#endif
+        
+        
         WebViewController *ViewController = [self.storyboard instantiateViewControllerWithIdentifier:@"WebViewController"];
         ViewController.url = url;
         ViewController.title = title;
@@ -2143,6 +2194,23 @@
         
         
         
+        [self.navigationController pushViewController:ViewController animated:YES];
+        
+    }
+    else if([title isEqualToString:@"HOMER Website"])
+    {
+        
+        NSString* url = @"https://homelegance.com/";
+        
+        NSString* title = @"HOMER";
+
+        
+        WebViewController *ViewController = [self.storyboard instantiateViewControllerWithIdentifier:@"WebViewController"];
+        ViewController.url = url;
+        ViewController.title = title;
+        
+        
+        
         [self.navigationController pushViewController:ViewController animated:YES];
         
     }
@@ -2168,7 +2236,23 @@
         [self.navigationController pushViewController:ViewController animated:YES];
         
     }
-    
+    else if([title isEqualToString:@"HOMER Policy"])
+    {
+        
+        NSString* url = URL_NPD_POLICY;
+        
+        NSString* title = @"HOMER Policy";
+
+        
+        WebViewController *ViewController = [self.storyboard instantiateViewControllerWithIdentifier:@"WebViewController"];
+        ViewController.url = url;
+        ViewController.title = title;
+        
+        
+        
+        [self.navigationController pushViewController:ViewController animated:YES];
+        
+    }
     else if([title isEqualToString:@"Simplified Buying Program"])
     {
         

+ 1 - 1
RedAnt ERP Mobile/common/Functions/sidemenu/LoginViewController.m

@@ -43,7 +43,7 @@
     
 #ifdef BUILD_HOMER
     self.title=@"HOMER";
-    self.checkOfflineMode.hidden=true;
+    self.checkOfflineMode.hidden = NO;
     self.requestLoginBtn.hidden = YES;
 #endif