ソースを参照

- 소스 머지를 위해 커밋

KaRam Kim 8 年 前
コミット
4aba8de5d3

+ 6 - 6
OneCable.xcodeproj/project.pbxproj

@@ -1259,7 +1259,7 @@
 /* Begin PBXShellScriptBuildPhase section */
 		27BC1E0D72C144B1471B5B4D /* [CP] Copy Pods Resources */ = {
 			isa = PBXShellScriptBuildPhase;
-			buildActionMask = 12;
+			buildActionMask = 8;
 			files = (
 			);
 			inputPaths = (
@@ -1267,14 +1267,14 @@
 			name = "[CP] Copy Pods Resources";
 			outputPaths = (
 			);
-			runOnlyForDeploymentPostprocessing = 0;
+			runOnlyForDeploymentPostprocessing = 1;
 			shellPath = /bin/sh;
 			shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-OneCable/Pods-OneCable-resources.sh\"\n";
 			showEnvVarsInLog = 0;
 		};
 		93ADEA80A8C04811E0886259 /* [CP] Embed Pods Frameworks */ = {
 			isa = PBXShellScriptBuildPhase;
-			buildActionMask = 12;
+			buildActionMask = 8;
 			files = (
 			);
 			inputPaths = (
@@ -1282,21 +1282,21 @@
 			name = "[CP] Embed Pods Frameworks";
 			outputPaths = (
 			);
-			runOnlyForDeploymentPostprocessing = 0;
+			runOnlyForDeploymentPostprocessing = 1;
 			shellPath = /bin/sh;
 			shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-OneCable/Pods-OneCable-frameworks.sh\"\n";
 			showEnvVarsInLog = 0;
 		};
 		A57656181E518A1D002D0AE2 /* ShellScript */ = {
 			isa = PBXShellScriptBuildPhase;
-			buildActionMask = 12;
+			buildActionMask = 8;
 			files = (
 			);
 			inputPaths = (
 			);
 			outputPaths = (
 			);
-			runOnlyForDeploymentPostprocessing = 0;
+			runOnlyForDeploymentPostprocessing = 1;
 			shellPath = /bin/sh;
 			shellScript = "${PODS_ROOT}/Fabric/run 880f3dee7e6be7a796fab928aafeee250c7867e2 cd7015c4f4a84ac451c1239e79ac4d79f8789bf567e4a50643d45f604248b1e7";
 		};

+ 2 - 1
OneCable/Base.lproj/Localizable.strings

@@ -130,7 +130,8 @@
 
 
 //Home Member
-
+"마스터" = "마스터";
+"멤버" = "멤버";
 
 //SignUp
 

+ 13 - 41
OneCable/Classes/ViewControllers/HomeMemberScreens/HomeMemberViewController.m

@@ -21,8 +21,6 @@
 #import "HomeMemberViewController.h"
 #import "JYPullToRefreshController.h"
 
-#import "MoreBtnModel.h"
-
 #define kfMemberTableViewCellHeight 100.0f
 #define kiCellInset 10
 #define kiCellItem 2
@@ -56,8 +54,6 @@
     BOOL _isNotFirstLoading, _isDeleteMode;
     NSInteger _deviceFlag;
     NSString *_masterNickname;
-    
-    NSMutableArray<MoreBtnModel *> *_arrMoreBtn;
 }
 
 @property (strong, nonatomic) JYPullToRefreshController *refreshController;
@@ -231,12 +227,12 @@
 //    NSMutableArray *btnArray = [NSMutableArray arrayWithObjects:[NSNumber numberWithInteger:masterChange],[NSNumber numberWithInteger:add],[NSNumber numberWithInteger:del], nil];
 //
 //    [self toggleOptionsWithArray:sender btnArray:btnArray];
-    [self toggleOptionsWithArray:sender btnArray:_arrMoreBtn];
+    [self toggleOptionsWithArray:sender btnArray:_moreBtnArray];
 }
 
 - (void)setMoreBtnArray {
-    if (_arrMoreBtn == nil) {
-        _arrMoreBtn = [NSMutableArray array];
+    if (_moreBtnArray == nil) {
+        _moreBtnArray = [NSMutableArray array];
     }
     
     if (![[JDFacade facade].loginUser hasHomeHub]) {
@@ -268,12 +264,12 @@
                 default:
                     break;
             }
-            [_arrMoreBtn addObject:btnModel];
+            [_moreBtnArray addObject:btnModel];
         }
     }
     else {
         MoreBtnModel *btnModel = [[MoreBtnModel alloc] initWithTyep:Refresh isEnable:YES];
-        [_arrMoreBtn addObject:btnModel];
+        [_moreBtnArray addObject:btnModel];
     }
     
     
@@ -320,7 +316,8 @@
     
     if (!_masterNickname) {
         
-        NSString *path = [NSString stringWithFormat:API_GET_HOMEGROUP_MEMBERS, [[JDFacade facade].loginUser custId], [[JDFacade facade].loginUser ctrtGrpId]];
+        NSString *path = [[JDFacade facade] getUrlWithCustAndGroupID:API_GET_HOMEGROUP_MEMBERS aditional:nil];
+//        NSString *path = [NSString stringWithFormat:API_GET_HOMEGROUP_MEMBERS, [[JDFacade facade].loginUser custId], [[JDFacade facade].loginUser ctrtGrpId]];
         
         [[RequestHandler handler] sendAsyncGetRequestAPIPath:path parameters:nil modelClass:[HomeMemberListModel class] completion:^(id responseObject) {
             if (!responseObject) {//응답결과가 잘못되었거나 없을 경우,
@@ -361,7 +358,8 @@
         return;
     }
     
-    NSString *path = [NSString stringWithFormat:API_GET_HOMEGROUP_MEMBERS, [[JDFacade facade].loginUser custId], [[JDFacade facade].loginUser ctrtGrpId]];
+    NSString *path = [[JDFacade facade] getUrlWithCustAndGroupID:API_GET_HOMEGROUP_MEMBERS aditional:nil];
+//    NSString *path = [NSString stringWithFormat:API_GET_HOMEGROUP_MEMBERS, [[JDFacade facade].loginUser custId], [[JDFacade facade].loginUser ctrtGrpId]];
 
     [[RequestHandler handler] sendAsyncGetRequestAPIPath:path parameters:nil modelClass:[HomeMemberListModel class] completion:^(id responseObject) {
         if (!responseObject) {//응답결과가 잘못되었거나 없을 경우,
@@ -460,7 +458,7 @@
         
         [cell.btnProfile sd_setBackgroundImageWithURL:[NSURL URLWithString:member.imageFileName] forState:UIControlStateNormal placeholderImage:nil options:SDWebImageRefreshCached];
         
-        cell.lblNickname.text = member.nickname;
+        cell.lblNickname.text = @"";
         cell.lblMemID.text = member.memberId;
         
         if ([member.memberTypeCode isEqualToString:KNEET_MEMBER_TYPE_HOME]) {
@@ -490,6 +488,9 @@
         cell.chkSelect.value = member;
         cell.chkSelect.checked = [cell.chkSelect getCheckStatusFromValue];
         
+        cell.btnDelete.hidden = !(_isDeleteMode && [member.gradeCode isEqualToString:KNEET_MEMBER_SIMPLE] && _memberList.count > 1);
+        cell.btnDelete.value = member;
+        
         rcell = cell;
     } else {
         HomeMemberAddCollectionCell *cell = [collectionView dequeueReusableCellWithReuseIdentifier:@"AddCollectionCellIdentifier" forIndexPath:indexPath];
@@ -507,37 +508,8 @@
 }
 
 
-//- (UICollectionReusableView *)collectionView:(UICollectionView *)collectionView
-//           viewForSupplementaryElementOfKind:(NSString *)kind
-//                                 atIndexPath:(NSIndexPath *)indexPath
-//{
-//
-//    HomeMemberCollectionFooterView *footerView = [collectionView dequeueReusableSupplementaryViewOfKind:UICollectionElementKindSectionFooter
-//                                                                                    withReuseIdentifier:@"FooterIdentifier" forIndexPath:indexPath];
-
-//    [footerView.btnAdd.label setUnderLine:footerView.btnAdd.label.text];
-//    if (![footerView.btnAdd actionsForTarget:self forControlEvent:UIControlEventTouchUpInside]) {
-//        [footerView.btnAdd addTarget:self action:@selector(addNewMember) forControlEvents:UIControlEventTouchUpInside];
-//    }
-//    return footerView;
-//}
-
-//- (CGSize)collectionView:(UICollectionView *)collectionView layout:(UICollectionViewLayout*)collectionViewLayout referenceSizeForFooterInSection:(NSInteger)section {
-//    if (_memberList.count % _deviceFlag != 0 || [JDFacade facade].loginUser.level < 90 || _isDeleteMode)  {//마스터 권한이 아니거나, 짝수가 아닐 경우
-//        return CGSizeZero;
-//    }
-    
-//    return CGSizeMake(ViewWidth(_collectionView), 168.0f);
-//}
-
 - (CGSize)collectionView:(UICollectionView *)collectionView layout:(UICollectionViewLayout *)collectionViewLayout sizeForItemAtIndexPath:(NSIndexPath *)indexPath {
-    NSLog(@"Phone View Size : %f", IPHONE_WIDTH);
-    NSLog(@"Collection View Size : %f", ViewWidth(_collectionView));
-    NSLog(@"Cell Width Size : %f", (ViewWidth(_collectionView)-kiCellInset) / kiCellItem);
-    NSLog(@"Cell Height Size : %f", ((ViewWidth(_collectionView)-kiCellInset)+kiCellRatio) / kiCellItem);
-
     return CGSizeMake((ViewWidth(_collectionView)-kiCellInset) / kiCellItem, ((ViewWidth(_collectionView)-kiCellInset)+kiCellRatio) / kiCellItem);
-    //    return CGSizeMake((ViewWidth(_collectionView)-(_deviceFlag*kiCellInsetSize)) / _deviceFlag, 168.0f);
 }
 
 // Cell 사이 최소 간격

+ 2 - 0
OneCable/Classes/ViewControllers/JDViewController.h

@@ -8,6 +8,7 @@
 #import "JDObject.h"
 #import "KNTableViewCell.h"
 #import "KNView.h"
+#import "MoreBtnModel.h"
 
 
 @class CustomTableView;
@@ -16,6 +17,7 @@
 
 @protected
     NSMutableArray *_popooverOptionArray;
+    NSMutableArray<MoreBtnModel *> *_moreBtnArray;
     __weak UIView *_mainView;
 }
 

+ 2 - 2
OneCable/Classes/ViewControllers/SettingsScreens/PwdPopupView.m

@@ -36,7 +36,7 @@
             self.frame = [UIScreen mainScreen].bounds;
             self.lblTitle.text = NSLocalizedString(@"비밀번호 변경",nil);
 
-
+            _txtPwd.delegate = self;
             _txtPwd.secureTextEntry = YES;
             _txtPwd.keyboardType = UIKeyboardTypeDefault;
             _txtPwd.returnKeyType = UIReturnKeyNext;
@@ -115,7 +115,6 @@
 #pragma mark - CustomTextField
 
 - (BOOL)textFieldShouldReturn:(UITextField *)textField {
-    NSLog(@"이쪽으로 안들어오나?");
     if ([textField isEqual:_txtPwdConfirm]) {
         [self btnConfirmTouched:nil];
     }
@@ -127,4 +126,5 @@
 }
 
 
+
 @end