issue history logic done, with rough ui
This commit is contained in:
parent
e60bd809d1
commit
d086ff1b2c
|
@ -44,7 +44,8 @@
|
|||
NSMutableArray* detailItems = [[NSMutableArray alloc] init];
|
||||
NSArray* dataArray = [dic objectForKey:@"details"];
|
||||
for (NSDictionary* detailDic in dataArray) {
|
||||
[detailItems addObject:[[OZLModelIssueJournalDetail alloc] initWithDictionary:detailDic]];
|
||||
OZLModelIssueJournalDetail* detail = [[OZLModelIssueJournalDetail alloc] initWithDictionary:detailDic];
|
||||
[detailItems addObject:detail];
|
||||
}
|
||||
_detailArray = detailItems;
|
||||
return self;
|
||||
|
|
|
@ -45,7 +45,11 @@
|
|||
_createdOn = [dic objectForKey:@"created_on"];
|
||||
_lastLoginIn = [dic objectForKey:@"last_login_on"];
|
||||
|
||||
_name = _login;
|
||||
_name = [dic objectForKey:@"name"];
|
||||
if (_name == nil) {
|
||||
_name = _login;
|
||||
}
|
||||
|
||||
return self;
|
||||
}
|
||||
|
||||
|
|
|
@ -103,13 +103,14 @@
|
|||
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
|
||||
{
|
||||
static NSString *CellIdentifier = @"timeEntryCell";
|
||||
UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier forIndexPath:indexPath];
|
||||
UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier ];
|
||||
if (!cell) {
|
||||
cell = [[UITableViewCell alloc]
|
||||
initWithStyle:UITableViewCellStyleSubtitle reuseIdentifier:CellIdentifier];
|
||||
initWithStyle:UITableViewCellStyleValue1 reuseIdentifier:CellIdentifier];
|
||||
}
|
||||
OZLModelIssueJournal* journal = [_journalList objectAtIndex:indexPath.row];
|
||||
cell.textLabel.text = journal.user.name;
|
||||
[cell.textLabel setText: journal.user.name];
|
||||
[cell.detailTextLabel setText:[NSString stringWithFormat:@"number of change: %d",journal.detailArray.count]];
|
||||
return cell;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue