Changeset 1675 for trunk


Ignore:
Timestamp:
01/27/16 16:55:06 (8 years ago)
Author:
nanardon
Message:

Without date add some date to graph

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/LATMOS-Accounts-Web/lib/LATMOS/Accounts/Web/Controller/Json/Employment.pm

    r1674 r1675  
    5353    my %done; 
    5454 
    55     foreach my $emp ( 
    56         sort { $a cmp $b } 
     55    my @dates = sort { $a cmp $b } 
    5756        map { $employments{$_}->{end}  } 
    58         grep { $employments{$_}->{end} } (keys %employments)) { 
     57        grep { $employments{$_}->{end} } (keys %employments); 
    5958 
     59    if (!@dates) { 
     60        push(@dates, $now); 
     61        foreach (1 .. 12) { 
     62            push(@dates, DateTime->now->add(months => $_)->ymd); 
     63        } 
     64    } 
     65 
     66    foreach my $emp (@dates) { 
    6067        $done{$emp} and next; 
    6168        $done{$emp} = 1; 
Note: See TracChangeset for help on using the changeset viewer.