Revize 85effbce
Přidáno uživatelem Milan Hotovec před téměř 4 roky(ů)
src/Modules/Goal/Application/Leuze.Modules.Goal.Application.UI/Pages/GoalDefinitionDetail.razor | ||
---|---|---|
7 | 7 |
|
8 | 8 |
<div class="section_header"> |
9 | 9 |
<div> |
10 |
<h2>@_definition.Name</h2> |
|
10 |
<h2>@_definition?.Name</h2>
|
|
11 | 11 |
<div class="definition_daterange"> |
12 | 12 |
<i class="fal fa-clock"></i> |
13 |
@_definition.GDArea.From.ToShortDateString() - @_definition.GDArea.To.ToShortDateString()
|
|
13 |
@_definition?.GDArea?.From.ToShortDateString() - @_definition?.GDArea?.To.ToShortDateString()
|
|
14 | 14 |
</div> |
15 | 15 |
</div> |
16 | 16 |
<div class="header_buttons"> |
src/Modules/Goal/Domain/Leuze.Modules.Goal.Domain/Domains/GlobalDefinitionArea.cs | ||
---|---|---|
29 | 29 |
|
30 | 30 |
public static GlobalDefinitionArea Default() |
31 | 31 |
{ |
32 |
return new GlobalDefinitionArea(); |
|
32 |
return new GlobalDefinitionArea() { From = DateTime.MinValue, To = DateTime.MaxValue};
|
|
33 | 33 |
} |
34 | 34 |
|
35 | 35 |
public Guid Id { get; private set; } |
src/Modules/Goal/Domain/Leuze.Modules.Goal.Domain/Domains/GoalDefinition.cs | ||
---|---|---|
33 | 33 |
|
34 | 34 |
public static GoalDefinition Default() |
35 | 35 |
{ |
36 |
return new GoalDefinition(); |
|
36 |
return new GoalDefinition() { GDArea = GlobalDefinitionArea.Default()};
|
|
37 | 37 |
} |
38 | 38 |
|
39 | 39 |
public Guid Id { get; private set; } |
src/Modules/Goal/Infrastructure/Leuze.Modules.Goal.Infrastructure.Persistence/Repositories/GoalDefinitionRepository.cs | ||
---|---|---|
57 | 57 |
|
58 | 58 |
public async Task<GoalDefinition> GetByIdAsync(Guid id) |
59 | 59 |
{ |
60 |
//return await dbSet.Where(item => item.Id == id).SingleOrDefaultAsync(); |
|
61 |
return await dbSet.FindAsync(id); |
|
60 |
return await dbSet.Where(item => item.Id == id).Include(o => o.GDArea).FirstOrDefaultAsync(); |
|
62 | 61 |
} |
63 | 62 |
|
64 | 63 |
public async Task<bool> SetVariProjectHoursAsync(Guid id, double variHours) |
Také k dispozici: Unified diff
Bug Fix