Revize 68d94a97
Přidáno uživatelem Dominik Chlouba před téměř 4 roky(ů)
src/Core/Application/Leuze.Core.Application.UI/App.razor | ||
---|---|---|
5 | 5 |
<Found Context="routeData"> |
6 | 6 |
<AuthorizeRouteView RouteData="@routeData" DefaultLayout="@typeof(MainLayout)"> |
7 | 7 |
<NotAuthorized> |
8 |
<RedirectToLogin />
|
|
8 |
<p>Nemáte potřebná oprávnění</p>
|
|
9 | 9 |
</NotAuthorized> |
10 | 10 |
<Authorizing> |
11 | 11 |
<p>Just checking with the boss you can come in.</p> |
src/Core/Application/Leuze.Core.Application.UI/Leuze.Core.Application.UI.csproj | ||
---|---|---|
25 | 25 |
<PackageReference Include="Blazored.Toast" Version="3.1.2" /> |
26 | 26 |
<PackageReference Include="Blazored.Typeahead" Version="4.6.0" /> |
27 | 27 |
<PackageReference Include="BlazorStyled" Version="3.1.0" /> |
28 |
<PackageReference Include="ChartJs.Blazor.Fork" Version="2.0.2" /> |
|
28 | 29 |
<PackageReference Include="Microsoft.AspNetCore.Authentication.Cookies" Version="2.2.0" /> |
29 | 30 |
<PackageReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Design" Version="5.0.2" /> |
30 | 31 |
</ItemGroup> |
src/Core/Application/Leuze.Core.Application.UI/Pages/Index.razor | ||
---|---|---|
1 | 1 |
@page "/" |
2 | 2 |
@layout MainLayout |
3 | 3 |
@attribute [Authorize] |
4 |
@using ChartJs.Blazor.PieChart |
|
4 | 5 |
|
5 | 6 |
<AuthorizeView> |
6 | 7 |
<h1>Vítejte, @context.User.Identity?.Name</h1> |
7 |
</AuthorizeView> |
|
8 |
<div> |
|
9 |
<div> |
|
10 |
<label>Od</label> |
|
11 |
<input type="date" /> |
|
12 |
</div> |
|
13 |
<div> |
|
14 |
<label>Do</label> |
|
15 |
<input type="date" /> |
|
16 |
</div> |
|
17 |
<div> |
|
18 |
<label>Uživatel</label> |
|
19 |
<select> |
|
20 |
<option value="">Já</option> |
|
21 |
</select> |
|
22 |
</div> |
|
23 |
</div> |
|
24 |
<div style="width:100%;height:350px;"> |
|
25 |
<Chart Config="_config"></Chart> |
|
26 |
</div> |
|
27 |
</AuthorizeView> |
|
28 |
|
|
29 |
@code { |
|
30 |
private PieConfig _config; |
|
31 |
|
|
32 |
protected override void OnInitialized() |
|
33 |
{ |
|
34 |
_config = new PieConfig |
|
35 |
{ |
|
36 |
Options = new PieOptions |
|
37 |
{ |
|
38 |
Responsive = true, |
|
39 |
Title = new OptionsTitle |
|
40 |
{ |
|
41 |
Display = true, |
|
42 |
Text = "ChartJs.Blazor Pie Chart" |
|
43 |
} |
|
44 |
} |
|
45 |
}; |
|
46 |
|
|
47 |
foreach (string color in new[] { "Neschválené", "Aktivní", "Uzavřené" }) |
|
48 |
{ |
|
49 |
_config.Data.Labels.Add(color); |
|
50 |
} |
|
51 |
|
|
52 |
PieDataset<int> dataset = new PieDataset<int>(new[] { 6, 5, 3 }) |
|
53 |
{ |
|
54 |
BackgroundColor = new[] |
|
55 |
{ |
|
56 |
ColorUtil.ColorHexString(255, 99, 132), // Slice 1 aka "Red" |
|
57 |
ColorUtil.ColorHexString(255, 205, 86), // Slice 2 aka "Yellow" |
|
58 |
ColorUtil.ColorHexString(75, 192, 192), // Slice 3 aka "Green" |
|
59 |
} |
|
60 |
}; |
|
61 |
|
|
62 |
_config.Data.Datasets.Add(dataset); |
|
63 |
} |
|
64 |
} |
src/Core/Application/Leuze.Core.Application.UI/Pages/Users/List.razor | ||
---|---|---|
1 | 1 |
@page "/Users" |
2 |
@attribute [Authorize] |
|
2 |
@attribute [Authorize(Roles = "Admin")]
|
|
3 | 3 |
@layout MainLayout |
4 | 4 |
@inject IMediator _mediator |
5 | 5 |
@inject IStringLocalizer<List> T |
src/Core/Application/Leuze.Core.Application.UI/Pages/_Host.cshtml | ||
---|---|---|
33 | 33 |
} |
34 | 34 |
<component type="typeof(App)" render-mode="ServerPrerendered" /> |
35 | 35 |
<script src="_framework/blazor.server.js"></script> |
36 |
<script src="https://cdn.jsdelivr.net/npm/chart.js@2.9.4/dist/Chart.min.js"></script> |
|
37 |
|
|
38 |
<!-- This is the glue between Blazor and Chart.js --> |
|
39 |
<script src="_content/ChartJs.Blazor.Fork/ChartJsBlazorInterop.js"></script> |
|
36 | 40 |
</body> |
37 | 41 |
</html> |
src/Core/Application/Leuze.Core.Application.UI/_Imports.razor | ||
---|---|---|
26 | 26 |
@using Leuze.Core.Domain.Domains.Users |
27 | 27 |
@using Microsoft.Extensions.Localization |
28 | 28 |
@using Microsoft.AspNetCore.Localization |
29 |
@using Blazored.Typeahead |
|
29 |
@using Blazored.Typeahead |
|
30 |
@using ChartJs.Blazor; |
|
31 |
@using ChartJs.Blazor.Common |
|
32 |
@using ChartJs.Blazor.Common.Axes |
|
33 |
@using ChartJs.Blazor.Common.Axes.Ticks |
|
34 |
@using ChartJs.Blazor.Common.Enums |
|
35 |
@using ChartJs.Blazor.Common.Handlers |
|
36 |
@using ChartJs.Blazor.Common.Time |
|
37 |
@using ChartJs.Blazor.Util |
|
38 |
@using ChartJs.Blazor.Interop |
src/Modules/Goal/Application/Leuze.Modules.Goal.Application.UI/Pages/Components/CreateDefinitionRangeAside.razor | ||
---|---|---|
9 | 9 |
</div> |
10 | 10 |
</div> |
11 | 11 |
<div class="review_detail_body"> |
12 |
<div class="review_description_title">@T["Start"]</div> |
|
13 |
<input type="date" /> |
|
14 |
<div class="review_description_title">@T["End"]</div> |
|
15 |
<input type="date" /> |
|
16 |
<div class="review_description_title">@T["Result"]</div> |
|
17 |
<input type="number" /> |
|
12 |
<div class="input_row"> |
|
13 |
<label class="input_label">@T["Start"]<span style="color:#ff0000">*</span></label> |
|
14 |
<input type="date" /> |
|
15 |
</div> |
|
16 |
<div class="input_row"> |
|
17 |
<label class="input_label">@T["End"]<span style="color:#ff0000">*</span></label> |
|
18 |
<input type="date" /> |
|
19 |
</div> |
|
20 |
<div class="input_row"> |
|
21 |
<label class="input_label">@T["Result"]</label> |
|
22 |
<input type="number" /> |
|
23 |
</div> |
|
18 | 24 |
</div> |
19 | 25 |
<div class="review_detail_footer"> |
20 | 26 |
<button>@T["Save"]</button> |
... | ... | |
26 | 32 |
<BlazorStyled.Styled @bind-Classname="@_aside"> |
27 | 33 |
right: @(Show ? "0" : "-615")px; |
28 | 34 |
</BlazorStyled.Styled> |
35 |
<BlazorStyled.Styled> |
|
36 |
.input_row { |
|
37 |
margin-bottom: 24px; |
|
38 |
} |
|
39 |
.input_row input:not([type="checkbox"]) { |
|
40 |
width: calc(100% - 34px); |
|
41 |
padding: 12px 16px; |
|
42 |
border-radius: 4px; |
|
43 |
border: 1px solid #C8C8C8; |
|
44 |
font-size: 14px; |
|
45 |
} |
|
46 |
.input_row label.input_label { |
|
47 |
font-size: 16px; |
|
48 |
font-weight: 700; |
|
49 |
color: #111111; |
|
50 |
padding-bottom: 4px; |
|
51 |
display: block; |
|
52 |
} |
|
53 |
</BlazorStyled.Styled> |
|
29 | 54 |
<BlazorStyled.Styled> |
30 | 55 |
.review_detail { |
31 | 56 |
width: 600px; |
... | ... | |
55 | 80 |
} |
56 | 81 |
|
57 | 82 |
.review_detail_body{ |
58 |
padding: 16px 0;
|
|
83 |
padding: 16px 24px;
|
|
59 | 84 |
height: calc(100% - 143px - 50px - 12px); |
60 | 85 |
overflow-y: auto; |
61 | 86 |
overflow-x: hidden; |
src/Modules/Goal/Application/Leuze.Modules.Goal.Application.UI/Pages/Components/CreateGoalAside.razor | ||
---|---|---|
9 | 9 |
</div> |
10 | 10 |
</div> |
11 | 11 |
<div class="review_detail_body"> |
12 |
<div class="review_description_title">@T["Name"]</div> |
|
13 |
<input type="text" /> |
|
14 |
<div class="review_description_title">@T["Description"]</div> |
|
15 |
<textarea></textarea> |
|
12 |
<div class="input_row"> |
|
13 |
<label class="input_label">@T["Name"]</label> |
|
14 |
<input type="text" /> |
|
15 |
</div> |
|
16 |
<div class="input_row"> |
|
17 |
<label class="input_label">@T["Description"]</label> |
|
18 |
<textarea></textarea> |
|
19 |
</div> |
|
16 | 20 |
</div> |
17 | 21 |
<div class="review_detail_footer"> |
18 | 22 |
<button>@T["Create"]</button> |
... | ... | |
23 | 27 |
<BlazorStyled.Styled @bind-Classname="@_aside"> |
24 | 28 |
right: @(Show ? "0" : "-615")px; |
25 | 29 |
</BlazorStyled.Styled> |
30 |
<BlazorStyled.Styled> |
|
31 |
.input_row { |
|
32 |
margin-bottom: 24px; |
|
33 |
} |
|
34 |
.input_row input:not([type="checkbox"]), .input_row textarea { |
|
35 |
width: calc(100% - 34px); |
|
36 |
padding: 12px 16px; |
|
37 |
border-radius: 4px; |
|
38 |
border: 1px solid #C8C8C8; |
|
39 |
font-size: 14px; |
|
40 |
} |
|
41 |
.input_row label.input_label { |
|
42 |
font-size: 16px; |
|
43 |
font-weight: 700; |
|
44 |
color: #111111; |
|
45 |
padding-bottom: 4px; |
|
46 |
display: block; |
|
47 |
} |
|
48 |
</BlazorStyled.Styled> |
|
26 | 49 |
<BlazorStyled.Styled> |
27 | 50 |
.review_detail { |
28 | 51 |
width: 600px; |
... | ... | |
52 | 75 |
} |
53 | 76 |
|
54 | 77 |
.review_detail_body{ |
55 |
padding: 16px 0;
|
|
78 |
padding: 16px 24px;
|
|
56 | 79 |
height: calc(100% - 143px - 50px - 12px); |
57 | 80 |
overflow-y: auto; |
58 | 81 |
overflow-x: hidden; |
src/Modules/Goal/Application/Leuze.Modules.Goal.Application.UI/Pages/Components/CreateGoalDefinition.razor | ||
---|---|---|
9 | 9 |
</div> |
10 | 10 |
</div> |
11 | 11 |
<div class="review_detail_body"> |
12 |
<div class="review_description_title">@T["Name"]</div> |
|
13 |
<input type="text" /> |
|
14 |
<div class="review_description_title">@T["User"]</div> |
|
15 |
<select> |
|
16 |
<option value="" disabled>@T["SelectUser"]</option> |
|
17 |
</select> |
|
18 |
<div class="review_description_title">@T["Hours"]</div> |
|
19 |
<input type="number" /> |
|
20 |
<div class="review_description_title">@T["Finance"]</div> |
|
21 |
<input type="number" /> |
|
12 |
<div class="input_row"> |
|
13 |
<label class="input_label">@T["Name"]</label> |
|
14 |
<input type="number" /> |
|
15 |
</div> |
|
16 |
<div class="input_row"> |
|
17 |
<label class="input_label">@T["User"]</label> |
|
18 |
<select> |
|
19 |
<option value="" disabled>@T["SelectUser"]</option> |
|
20 |
</select> |
|
21 |
</div> |
|
22 |
<div class="input_row"> |
|
23 |
<label class="input_label">@T["Hours"]</label> |
|
24 |
<input type="number" /> |
|
25 |
</div> |
|
26 |
<div class="input_row"> |
|
27 |
<label class="input_label">@T["Finance"]</label> |
|
28 |
<input type="number" /> |
|
29 |
</div> |
|
22 | 30 |
</div> |
23 | 31 |
<div class="review_detail_footer"> |
24 | 32 |
<button>@T["Create"]</button> |
... | ... | |
29 | 37 |
<BlazorStyled.Styled @bind-Classname="@_aside"> |
30 | 38 |
right: @(Show ? "0" : "-615")px; |
31 | 39 |
</BlazorStyled.Styled> |
40 |
<BlazorStyled.Styled> |
|
41 |
.input_row { |
|
42 |
margin-bottom: 24px; |
|
43 |
} |
|
44 |
.input_row select { |
|
45 |
width: 100%; |
|
46 |
padding: 12px 16px; |
|
47 |
border-radius: 4px; |
|
48 |
border: 1px solid rgb(200, 200, 200); |
|
49 |
font-size: 14px; |
|
50 |
} |
|
51 |
.input_row input:not([type="checkbox"]) { |
|
52 |
width: calc(100% - 34px); |
|
53 |
padding: 12px 16px; |
|
54 |
border-radius: 4px; |
|
55 |
border: 1px solid #C8C8C8; |
|
56 |
font-size: 14px; |
|
57 |
} |
|
58 |
.input_row label.input_label { |
|
59 |
font-size: 16px; |
|
60 |
font-weight: 700; |
|
61 |
color: #111111; |
|
62 |
padding-bottom: 4px; |
|
63 |
display: block; |
|
64 |
} |
|
65 |
</BlazorStyled.Styled> |
|
32 | 66 |
<BlazorStyled.Styled> |
33 | 67 |
.review_detail { |
34 | 68 |
width: 600px; |
... | ... | |
58 | 92 |
} |
59 | 93 |
|
60 | 94 |
.review_detail_body{ |
61 |
padding: 16px 0;
|
|
95 |
padding: 16px 24px;
|
|
62 | 96 |
height: calc(100% - 143px - 50px - 12px); |
63 | 97 |
overflow-y: auto; |
64 | 98 |
overflow-x: hidden; |
src/Modules/Goal/Application/Leuze.Modules.Goal.Application.UI/Pages/Components/ReviewDetailAside.razor | ||
---|---|---|
63 | 63 |
} |
64 | 64 |
|
65 | 65 |
.review_detail_body{ |
66 |
padding: 16px 0;
|
|
66 |
padding: 16px 24px;
|
|
67 | 67 |
height: calc(100% - 143px - 50px - 12px); |
68 | 68 |
overflow-y: auto; |
69 | 69 |
overflow-x: hidden; |
src/Modules/Goal/Application/Leuze.Modules.Goal.Application.UI/Pages/GoalRanges.razor | ||
---|---|---|
29 | 29 |
<td>-</td> |
30 | 30 |
<td> |
31 | 31 |
<div class="flex"> |
32 |
<div> |
|
33 |
<i class="fal fa-download"></i> |
|
34 |
@T["Export"] |
|
35 |
</div> |
|
32 | 36 |
<div @onclick='() => _nav.NavigateTo("/goals/overview/test")'> |
33 | 37 |
<i class="fal fa-eye"></i> |
34 | 38 |
@T["Open"] |
... | ... | |
48 | 52 |
</table> |
49 | 53 |
@if (Ranges.Count > 0) |
50 | 54 |
{ |
51 |
<div class="pagination"> |
|
55 |
<!--<div class="pagination">
|
|
52 | 56 |
<div class="left"> |
53 | 57 |
<button class="pagination_button"><img class="pagination_icon" src="/Resources/Icons/chevron-double-left.svg" /></button> |
54 | 58 |
<button class="pagination_button"><img class="pagination_icon" src="/Resources/Icons/chevron-left.svg" /></button> |
... | ... | |
57 | 61 |
<button class="pagination_button"><img class="pagination_icon" src="/Resources/Icons/chevron-double-right.svg" /></button> |
58 | 62 |
</div> |
59 | 63 |
<div class="right">@T["Show"] <b>@Ranges.Count @T["From"] @Total</b></div> |
60 |
</div> |
|
64 |
</div>-->
|
|
61 | 65 |
} |
62 | 66 |
} |
63 | 67 |
else |
... | ... | |
70 | 74 |
.flex{ |
71 | 75 |
display: grid; |
72 | 76 |
align-items: center; |
73 |
grid-template-columns: repeat(3, 100px);
|
|
77 |
grid-template-columns: repeat(4, 100px);
|
|
74 | 78 |
justify-content: right; |
75 | 79 |
} |
76 | 80 |
.flex > div:not(:last-child) { |
src/Modules/Goal/Application/Leuze.Modules.Goal.Application.UI/Pages/GoalsManagement.razor | ||
---|---|---|
54 | 54 |
</table> |
55 | 55 |
@if (Ranges.Count > 0) |
56 | 56 |
{ |
57 |
<div class="pagination"> |
|
57 |
<!--<div class="pagination">
|
|
58 | 58 |
<div class="left"> |
59 | 59 |
<button class="pagination_button"><img class="pagination_icon" src="/Resources/Icons/chevron-double-left.svg" /></button> |
60 | 60 |
<button class="pagination_button"><img class="pagination_icon" src="/Resources/Icons/chevron-left.svg" /></button> |
... | ... | |
63 | 63 |
<button class="pagination_button"><img class="pagination_icon" src="/Resources/Icons/chevron-double-right.svg" /></button> |
64 | 64 |
</div> |
65 | 65 |
<div class="right">@T["Show"] <b>@Ranges.Count @T["From"] @Total</b></div> |
66 |
</div> |
|
66 |
</div>-->
|
|
67 | 67 |
} |
68 | 68 |
} |
69 | 69 |
else |
src/Modules/Goal/Application/Leuze.Modules.Goal.Application.UI/Pages/MyGoalDefinition.razor | ||
---|---|---|
35 | 35 |
</table> |
36 | 36 |
@if (Definitions.Count > 0) |
37 | 37 |
{ |
38 |
<div class="pagination"> |
|
38 |
<!--<div class="pagination">
|
|
39 | 39 |
<div class="left"> |
40 | 40 |
<button class="pagination_button"><img class="pagination_icon" src="/Resources/Icons/chevron-double-left.svg" /></button> |
41 | 41 |
<button class="pagination_button"><img class="pagination_icon" src="/Resources/Icons/chevron-left.svg" /></button> |
... | ... | |
44 | 44 |
<button class="pagination_button"><img class="pagination_icon" src="/Resources/Icons/chevron-double-right.svg" /></button> |
45 | 45 |
</div> |
46 | 46 |
<div class="right">@T["Show"] <b>@Definitions.Count @T["From"] @Total</b></div> |
47 |
</div> |
|
47 |
</div>-->
|
|
48 | 48 |
} |
49 | 49 |
} |
50 | 50 |
else |
src/Modules/Goal/Application/Leuze.Modules.Goal.Application.UI/Resources/Pages/GoalRanges.cs-CZ.resx | ||
---|---|---|
129 | 129 |
<data name="End" xml:space="preserve"> |
130 | 130 |
<value>Platnost do</value> |
131 | 131 |
</data> |
132 |
<data name="Export" xml:space="preserve"> |
|
133 |
<value>Exportovat</value> |
|
134 |
</data> |
|
132 | 135 |
<data name="From" xml:space="preserve"> |
133 | 136 |
<value>z</value> |
134 | 137 |
</data> |
Také k dispozici: Unified diff
UI changes, dashboard graphs and filters draft