Skip to content

Commit

Permalink
Resolved Conflict
Browse files Browse the repository at this point in the history
  • Loading branch information
niitMobileLab authored and niitMobileLab committed May 10, 2016
2 parents 0718295 + 2dd6903 commit b0ab732
Show file tree
Hide file tree
Showing 22 changed files with 499 additions and 852 deletions.
4 changes: 2 additions & 2 deletions .sonar/report-task.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
projectKey=EmployeeDirectory
serverUrl=http://localhost:9000
dashboardUrl=http://localhost:9000/dashboard/index/EmployeeDirectory
ceTaskId=AVRw2SZggynix-1_sR4s
ceTaskUrl=http://localhost:9000/api/ce/task?id=AVRw2SZggynix-1_sR4s
ceTaskId=AVR_wuKTskRURc0muHRb
ceTaskUrl=http://localhost:9000/api/ce/task?id=AVR_wuKTskRURc0muHRb
9 changes: 4 additions & 5 deletions EmployeeDirectory.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@
D97F878B183A77E700A1390E /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D97F8765183A77E700A1390E /* UIKit.framework */; };
D97F878C183A77E700A1390E /* CoreData.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D97F8767183A77E700A1390E /* CoreData.framework */; };
D97F8794183A77E700A1390E /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = D97F8792183A77E700A1390E /* InfoPlist.strings */; };
D97F8796183A77E700A1390E /* EmployeeDirectoryTests.m in Sources */ = {isa = PBXBuildFile; fileRef = D97F8795183A77E700A1390E /* EmployeeDirectoryTests.m */; };
D97F87A1183A78D200A1390E /* Employee.m in Sources */ = {isa = PBXBuildFile; fileRef = D97F87A0183A78D200A1390E /* Employee.m */; };
D97F87A4183A79ED00A1390E /* ReportsViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = D97F87A3183A79ED00A1390E /* ReportsViewController.m */; };
D97F87B2183A7B7700A1390E /* amy_jones.jpg in Resources */ = {isa = PBXBuildFile; fileRef = D97F87A6183A7B7700A1390E /* amy_jones.jpg */; };
Expand Down Expand Up @@ -126,7 +125,6 @@
D97F8788183A77E700A1390E /* XCTest.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = XCTest.framework; path = Library/Frameworks/XCTest.framework; sourceTree = DEVELOPER_DIR; };
D97F8791183A77E700A1390E /* EmployeeDirectoryTests-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "EmployeeDirectoryTests-Info.plist"; sourceTree = "<group>"; };
D97F8793183A77E700A1390E /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = "<group>"; };
D97F8795183A77E700A1390E /* EmployeeDirectoryTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = EmployeeDirectoryTests.m; sourceTree = "<group>"; };
D97F879F183A78D200A1390E /* Employee.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Employee.h; sourceTree = "<group>"; };
D97F87A0183A78D200A1390E /* Employee.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = Employee.m; sourceTree = "<group>"; };
D97F87A2183A79ED00A1390E /* ReportsViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ReportsViewController.h; sourceTree = "<group>"; };
Expand Down Expand Up @@ -309,7 +307,6 @@
010486AA1CD36CB600E8B18B /* MasterViewControllerTests.m */,
010486A81CD36CAF00E8B18B /* ReportsViewControllerTests.m */,
010486A61CD36CA600E8B18B /* DetailViewControllerTests.m */,
D97F8795183A77E700A1390E /* EmployeeDirectoryTests.m */,
010486AE1CD379FB00E8B18B /* NetworkTests.m */,
D97F8790183A77E700A1390E /* Supporting Files */,
011E3C8E1CD322E800BE3E5B /* TestPrefixHeader.pch */,
Expand Down Expand Up @@ -551,7 +548,6 @@
files = (
010486AF1CD379FB00E8B18B /* NetworkTests.m in Sources */,
010486AB1CD36CB600E8B18B /* MasterViewControllerTests.m in Sources */,
D97F8796183A77E700A1390E /* EmployeeDirectoryTests.m in Sources */,
010486AD1CD36CBF00E8B18B /* LoginViewControllerTests.m in Sources */,
010486A91CD36CAF00E8B18B /* ReportsViewControllerTests.m in Sources */,
010486A71CD36CA600E8B18B /* DetailViewControllerTests.m in Sources */,
Expand Down Expand Up @@ -729,7 +725,10 @@
);
GCC_PRECOMPILE_PREFIX_HEADER = YES;
GCC_PREFIX_HEADER = EmployeeDirectoryTests/TestPrefixHeader.pch;
GCC_PREPROCESSOR_DEFINITIONS = "DEBUG=1";
GCC_PREPROCESSOR_DEFINITIONS = (
"DEBUG=1",
"TEST=1",
);
INFOPLIST_FILE = "EmployeeDirectoryTests/EmployeeDirectoryTests-Info.plist";
PRODUCT_BUNDLE_IDENTIFIER = "org.coenraets.${PRODUCT_NAME:rfc1034identifier}";
PRODUCT_NAME = "$(TARGET_NAME)";
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "0720"
version = "1.3">
version = "1.7">
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES">
Expand All @@ -10,7 +10,8 @@
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES">
shouldUseLaunchSchemeArgsEnv = "YES"
codeCoverageEnabled = "YES">
<Testables>
<TestableReference
skipped = "NO">
Expand All @@ -21,6 +22,10 @@
BlueprintName = "EmployeeDirectoryTests"
ReferencedContainer = "container:EmployeeDirectory.xcodeproj">
</BuildableReference>
<LocationScenarioReference
identifier = "com.apple.dt.IDEFoundation.CurrentLocationScenarioIdentifier"
referenceType = "1">
</LocationScenarioReference>
</TestableReference>
</Testables>
<AdditionalOptions>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<key>orderHint</key>
<integer>0</integer>
</dict>
<key>EmployeeDirectoryTests.xcscheme</key>
<key>EmployeeDirectoryTests.xcscheme_^#shared#^_</key>
<dict>
<key>orderHint</key>
<integer>5</integer>
Expand Down
2 changes: 1 addition & 1 deletion EmployeeDirectory/DetailViewController.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

@property (strong, nonatomic) NSManagedObjectContext *managedObjectContext;
@property (strong, nonatomic) Employee *employee;

@property (strong, nonatomic) NSMutableArray *actions;
@property (weak, nonatomic) IBOutlet UIView *listContainer;
@property (weak, nonatomic) IBOutlet UILabel *nameLabel;
@property (weak, nonatomic) IBOutlet UILabel *titleLabel;
Expand Down
18 changes: 4 additions & 14 deletions EmployeeDirectory/DetailViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
#import "Utility.h"

@interface DetailViewController ()
@property NSMutableArray *actions;

@property (strong, nonatomic) Employee *manager;
@property (strong, nonatomic) NSArray *reports;
@end
Expand Down Expand Up @@ -66,7 +66,8 @@ - (void)configureView
}

-(void)setUpActionsData
{
{

self.actions = [[NSMutableArray alloc] init];

NSDictionary *callOffice = [NSDictionary dictionaryWithObjectsAndKeys:@"Call Office", @"label", self.employee.officePhone, @"data", @"call", @"command", nil];
Expand All @@ -75,9 +76,6 @@ -(void)setUpActionsData
NSDictionary *callCell = [NSDictionary dictionaryWithObjectsAndKeys:@"Call Cell", @"label", self.employee.cellPhone, @"data", @"call", @"command", nil];
[self.actions addObject:callCell];

NSDictionary *sms = [NSDictionary dictionaryWithObjectsAndKeys:@"SMS", @"label", self.employee.cellPhone, @"data", @"sms", @"command", nil];
[self.actions addObject:sms];

NSDictionary *email = [NSDictionary dictionaryWithObjectsAndKeys:@"Email", @"label", self.employee.email, @"data", @"email", @"command", nil];
[self.actions addObject:email];

Expand Down Expand Up @@ -130,7 +128,7 @@ - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
static NSString *CellIdentifier = @"Cell";
UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier forIndexPath:indexPath];
UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];

// Configure the cell...

Expand All @@ -155,9 +153,6 @@ - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath
NSString *phoneStr = [[NSString alloc] initWithFormat:@"tel:%@",data];
NSURL *phoneURL = [[NSURL alloc] initWithString:phoneStr];
[[UIApplication sharedApplication] openURL:phoneURL];

} else if ([command isEqualToString:@"sms"]) {

} else if ([command isEqualToString:@"email"]) {
[[Utility sharedManager] setActionName:command label:data];

Expand All @@ -180,9 +175,4 @@ - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath
}
}

- (CGFloat)tableView:(UITableView *)tableView heightForFooterInSection:(NSInteger)section {
// This will create a "invisible" footer hiding the empty Table View cells
return 0.01f;
}

@end
15 changes: 6 additions & 9 deletions EmployeeDirectory/LoginViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,11 @@ -(void)validateCredentials:(NSString*)userName password:(NSString*)pwd
{
NSDictionary *data = [[Network sharedManager] getEmployeesData];
[self setUpData:data];

// Added to prevent going to next screen while unit testing this method
if([[[NSProcessInfo processInfo] arguments] containsObject:@"-FNTesting"])
return;

[self showNextScreen];
}
else
Expand Down Expand Up @@ -176,15 +181,7 @@ -(BOOL)HasEmployeeData

}

/* In a storyboard-based application, you will often want to do a little preparation before navigation
// In a storyboard-based application, you will often want to do a little preparation before navigation// In a storyboard-based application, you will often want to do a little preparation before navigation// In a storyboard-based application, you will often want to do a little preparation before navigation// In a storyboard-based application, you will often want to do a little preparation before navigation// In a storyboard-based application, you will often want to do a little preparation before navigation// In a storyboard-based application, you will often want to do a little preparation before navigation// In a storyboard-based application, you will often want to do a little preparation before navigation// In a storyboard-based application, you will often want to do a little preparation before navigation
// In a storyboard-based application, you will often want to do a little preparation before navigation// In a storyboard-based application, you will often want to do a little preparation before navigation// In a storyboard-based application, you will often want to do a little preparation before navigation// In a storyboard-based application, you will often want to do a little preparation before navigation// In a storyboard-based application, you will often want to do a little preparation before navigation// In a storyboard-based application, you will often want to do a little preparation before navigation// In a storyboard-based application, you will often want to do a little preparation before navigation
// In a storyboard-based application, you will often want to do a little preparation before navigation// In a storyboard-based application, you will often want to do a little preparation before navigation// In a storyboard-based application, you will often want to do a little preparation before navigation
// In a storyboard-based application, you will often want to do a little preparation before navigation
// In a storyboard-based application, you will often want to do a little preparation before navigation// In a storyboard-based application, you will often want to do a little preparation before navigation
// In a storyboard-based application, you will often want to do a little preparation before navigation
// In a storyboard-based application, you will often want to do a little preparation before navigation
// In a storyboard-based application, you will often want to do a little preparation before navigation// In a storyboard-based application, you will often want to do a little preparation before navigation// In a storyboard-based application, you will often want to do a little preparation before navigation// In a storyboard-based application, you will often want to do a little preparation before navigation// In a storyboard-based application, you will often want to do a little preparation before navigation// In a storyboard-based application, you will often want to do a little preparation before navigation// In a storyboard-based application, you will often want to do a little preparation before navigation// In a storyboard-based application, you will often want to do a little preparation before navigation// In a storyboard-based application, you will often want to do a little preparation before navigation// In a storyboard-based application, you will often want to do a little preparation before navigation// In a storyboard-based application, you will often want to do a little preparation before navigation// In a storyboard-based application, you will often want to do a little preparation before navigation// In a storyboard-based application, you will often want to do a little preparation before navigation// In a storyboard-based application, you will often want to do a little preparation before navigation// In a storyboard-based application, you will often want to do a little preparation before navigation// In a storyboard-based application, you will often want to do a little preparation before navigation// In a storyboard-based application, you will often want to do a little preparation before navigation// In a storyboard-based application, you will often want to do a little preparation before navigation// In a storyboard-based application, you will often want to do a little preparation before navigation// In a storyboard-based application, you will often want to do a little preparation before navigation// In a storyboard-based application, you will often want to do a little preparation before navigation// In a storyboard-based application, you will often want to do a little preparation before navigation*/
// In a storyboard-based application, you will often want to do a little preparation before navigation*/
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
// Get the new view controller using [segue destinationViewController].
// Pass the selected object to the new view controller.
Expand Down
1 change: 1 addition & 0 deletions EmployeeDirectory/MasterViewController.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
@interface MasterViewController : UITableViewController <NSFetchedResultsControllerDelegate>

@property (strong, nonatomic) NSManagedObjectContext *managedObjectContext;
@property (strong, nonatomic) NSArray *employees;

- (bool)searchForText:(NSString *)searchText;
-(void)logoutPressed;
Expand Down
15 changes: 2 additions & 13 deletions EmployeeDirectory/MasterViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
#import "Utility.h"

@interface MasterViewController () <UISearchDisplayDelegate, UISearchBarDelegate>
@property (strong, nonatomic) NSArray *employees;

@property (strong, nonatomic) NSArray *filteredEmployees;
@property (strong, nonatomic) NSFetchRequest *searchFetchRequest;
@end
Expand Down Expand Up @@ -102,7 +102,7 @@ - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger

- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
UITableViewCell *cell = [self.tableView dequeueReusableCellWithIdentifier:@"Cell" forIndexPath:indexPath];
UITableViewCell *cell = [self.tableView dequeueReusableCellWithIdentifier:@"Cell" ];

Employee *employee = nil;
if (tableView == self.tableView)
Expand All @@ -120,17 +120,6 @@ - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(N
return cell;
}

- (BOOL)tableView:(UITableView *)tableView canEditRowAtIndexPath:(NSIndexPath *)indexPath
{
// Return NO if you do not want the specified item to be editable.
return NO;
}

- (BOOL)tableView:(UITableView *)tableView canMoveRowAtIndexPath:(NSIndexPath *)indexPath
{
// The table view should not be re-orderable.
return NO;
}

- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender
{
Expand Down
Loading

0 comments on commit b0ab732

Please sign in to comment.