commit 6391f3f262886b1080c865192a927d62a4dd5cf7
Author: Dominik Chlouba <dchlouba@students.zcu.cz>
Date:   Tue May 4 00:10:40 2021 +0200

    Basic skeleton of goals fe pages
    refs #8725 @1.2548h

diff --git a/src/Core/Application/Leuze.Core.Application.UI/Shared/NavMenu.razor b/src/Core/Application/Leuze.Core.Application.UI/Shared/NavMenu.razor
index dc055f2..c61af0a 100644
--- a/src/Core/Application/Leuze.Core.Application.UI/Shared/NavMenu.razor
+++ b/src/Core/Application/Leuze.Core.Application.UI/Shared/NavMenu.razor
@@ -12,13 +12,19 @@
                 <span>Správa cílů</span>
             </div>
         </NavLink>
+        <NavLink href="/my-goals">
+            <div class="item">
+                <img src="/Resources/Icons/clipboard-list-check.svg" class="item_icon nav_icon_2" />
+                <span>Mé cíle</span>
+            </div>
+        </NavLink>
         <NavLink href="/users">
             <div class="item">
                 <img src="/Resources/Icons/user.svg" class="item_icon nav_icon_3" />
                 <span>Uživatelé</span>
             </div>
         </NavLink>
-</nav>
+    </nav>
 </aside>
 
 <Styled @bind-Classname="@_aside">
diff --git a/src/Modules/Goal/Application/Leuze.Modules.Goal.Application.UI/Class1.cs b/src/Modules/Goal/Application/Leuze.Modules.Goal.Application.UI/Class1.cs
deleted file mode 100644
index 666e4e1..0000000
--- a/src/Modules/Goal/Application/Leuze.Modules.Goal.Application.UI/Class1.cs
+++ /dev/null
@@ -1,8 +0,0 @@
-﻿using System;
-
-namespace Leuze.Modules.Goal.Application.UI
-{
-    public class Class1
-    {
-    }
-}
diff --git a/src/Modules/Goal/Application/Leuze.Modules.Goal.Application.UI/GoalUIExtension.cs b/src/Modules/Goal/Application/Leuze.Modules.Goal.Application.UI/GoalUIExtension.cs
new file mode 100644
index 0000000..84d7dd3
--- /dev/null
+++ b/src/Modules/Goal/Application/Leuze.Modules.Goal.Application.UI/GoalUIExtension.cs
@@ -0,0 +1,15 @@
+﻿using ExtCore.Infrastructure;
+
+namespace Leuze.Modules.Goal.Application.UI
+{
+    /// <summary>
+    /// 
+    /// </summary>
+    public class CoreUIExtension : ExtensionBase
+    {
+        /// <summary>
+        /// 
+        /// </summary>
+        public override string Name => "Goals UI Extension";
+    }
+}
diff --git a/src/Modules/Goal/Application/Leuze.Modules.Goal.Application.UI/Leuze.Modules.Goal.Application.UI.csproj b/src/Modules/Goal/Application/Leuze.Modules.Goal.Application.UI/Leuze.Modules.Goal.Application.UI.csproj
index 5ddffbe..996547a 100644
--- a/src/Modules/Goal/Application/Leuze.Modules.Goal.Application.UI/Leuze.Modules.Goal.Application.UI.csproj
+++ b/src/Modules/Goal/Application/Leuze.Modules.Goal.Application.UI/Leuze.Modules.Goal.Application.UI.csproj
@@ -1,4 +1,4 @@
-﻿<Project Sdk="Microsoft.NET.Sdk">
+﻿<Project Sdk="Microsoft.NET.Sdk.Web">
 
   <PropertyGroup>
     <AssemblyName>Leuze.Modules.Goal.Application.UI</AssemblyName>
@@ -9,13 +9,14 @@
 
   <PropertyGroup>
     <TargetFramework>net5.0</TargetFramework>
+    <OutputType>Library</OutputType>
     <Nullable>enable</Nullable>
     <GenerateDocumentationFile>true</GenerateDocumentationFile>
   </PropertyGroup>
 
   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
     <OutputPath>..\..\..\..\Presentation\Leuze.Modules\</OutputPath>
-    <DocumentationFile>..\..\..\..\docs\Leuze.Modules.Goal.Application.UI.xml</DocumentationFile>
+    <DocumentationFile>..\..\..\..\..\docs\Leuze.Modules.Goal.Application.UI.xml</DocumentationFile>
   </PropertyGroup>
 
   <ItemGroup>
@@ -23,4 +24,8 @@
     <ProjectReference Include="..\Leuze.Modules.Goal.Application\Leuze.Modules.Goal.Application.csproj" />
   </ItemGroup>
 
+  <ItemGroup>
+    <Folder Include="Pages\Components\" />
+  </ItemGroup>
+
 </Project>
diff --git a/src/Modules/Goal/Application/Leuze.Modules.Goal.Application.UI/Pages/GoalDefinitionDetail.razor b/src/Modules/Goal/Application/Leuze.Modules.Goal.Application.UI/Pages/GoalDefinitionDetail.razor
new file mode 100644
index 0000000..28c1ac9
--- /dev/null
+++ b/src/Modules/Goal/Application/Leuze.Modules.Goal.Application.UI/Pages/GoalDefinitionDetail.razor
@@ -0,0 +1,190 @@
+﻿@page "/goal/detail"
+<div class="section_header">
+    <h2>Mé definice cílů</h2>
+</div>
+<div>From - to</div>
+<section>
+    <div class="goal_def_item goal_item_closed">
+        <div class="goal_def_name">Název cíle</div>
+        <div class="goal_def_bottom">
+            <div class="goal_creator">
+                <span>David Vytvořílek</span>
+                <span>3. 5. 2021</span>
+            </div>
+            <div class="goal_percentile">
+                <span>80%</span>
+                <span>150%</span>
+            </div>
+        </div>
+    </div>
+</section>
+<aside class="goal_detail">
+    <div class="goal_detail_header">
+        Tools budou zde
+    </div>
+    <div class="goal_detail_body">
+        <div class="goal_detail_area">
+            <input class="goal_name" type="text" placeholder="Zadejte název cíle" />
+            <div class="goal_description_title">Popis cíle</div>
+            <textarea class="goal_description" placeholder="Vyplňte popis cíle"></textarea>
+        </div>
+        <div class="goal_communication_area">
+            <div class="goal_communication_item">
+                Dominik Chlouba vytvořil tento cíl. <span class="date">3. 5. 2021</span>
+            </div>
+            <div class="goal_communication_item">
+                <div class="item_tool">
+                    <div>Dominik Chlouba přidal komentář. <span class="date">3. 5. 2021</span></div>
+                    <div>Edit Smazat</div>
+                </div>
+                <p>It is a long established fact that a reader will be distracted by the readable content of a page when looking at its layout.</p>
+            </div>
+            <div class="goal_communication_item">
+                Dominik Chlouba aktualizoval popis cíle. <span class="date">3. 5. 2021</span>
+            </div>
+            <div class="goal_communication_item">
+                Dominik Chlouba aktualizoval popis cíle. <span class="date">3. 5. 2021</span>
+            </div>
+            <div class="goal_communication_item">
+                Dominik Chlouba aktualizoval popis cíle. <span class="date">3. 5. 2021</span>
+            </div>
+            <div class="goal_communication_item">
+                Dominik Chlouba aktualizoval popis cíle. <span class="date">3. 5. 2021</span>
+            </div>
+            <div class="goal_communication_item">
+                Dominik Chlouba aktualizoval popis cíle. <span class="date">3. 5. 2021</span>
+            </div>
+        </div>
+    </div>
+    <div class="goal_detail_footer">
+        <textarea placeholder="Přidat soukromý či veřejný komentář"></textarea>
+        <div class="goal_comment_tools">
+            <select>
+                <option value="private">Soukromý</option>
+                <option value="public">Veřejný</option>
+            </select>
+            <button>Přidat komentář</button>
+        </div>
+    </div>
+</aside>
+<BlazorStyled.Styled>
+    .section_header {
+    display: flex;
+    justify-content: space-between;
+    align-items: center;
+    }
+    .section_header h2 {
+    color: #111111;
+    font-size: 36px;
+    margin: 0;
+    }
+</BlazorStyled.Styled>
+<BlazorStyled.Styled>
+    .goal_detail {
+    width: 500px;
+    height: 100%;
+    position: fixed;
+    top: 0;
+    right: 0;
+    background-color: white;
+    -webkit-box-shadow: 0 0 5px 0 rgba(0,0,0,0.05);
+    -moz-box-shadow: 0 0 5px 0 rgba(0,0,0,0.05);
+    box-shadow: 0 0 5px 0 rgba(0,0,0,0.05);
+    }
+
+    .goal_detail_header {
+    padding: 12px 24px;
+    border-bottom: 1px solid #11111122;
+    height: 26px;
+    display: grid;
+    align-items: center;
+    }
+
+    .goal_detail_body {
+    padding: 0 0 12px 0;
+    height: calc(100% - 143px - 50px - 12px);
+    overflow-y: auto;
+    background-color: #F6F8F9;
+    overflow-x: hidden;
+    }
+    .goal_detail_area {
+    background-color: white;
+    padding-top: 12px;
+    }
+    .goal_detail_body .goal_name {
+    padding: 8px 12px;
+    border: 1px solid white;
+    width: calc(100% - 24px);
+    outline: none;
+    margin: 12px 24px 12px 24px;
+    }
+    .goal_detail_body .goal_description {
+    padding: 8px 12px;
+    border: 1px solid white;
+    width: calc(100% - 24px);
+    outline: none;
+    margin: 12px 24px 24px 24px;
+    }
+    .goal_detail_body .goal_description_title {
+    margin: 0 24px;
+    }
+    .goal_detail_body .goal_name:hover, .goal_detail_body .goal_description:hover {
+    border: 1px solid #EEEEEE;
+    }
+    .goal_detail_body .goal_name:focus, .goal_detail_body .goal_description:focus {
+    border: 1px solid #A8A8A8;
+    }
+
+    .goal_communication_area {
+    padding: 12px 0;
+    }
+    .goal_communication_area .goal_communication_item {
+    background-color: #F6F8F9;
+    padding: 12px 0;
+    margin: 0 24px;
+    }
+    .goal_communication_area .goal_communication_item span.date {
+    color: #A8A8A8;
+    }
+    .goal_communication_area .goal_communication_item .item_tool {
+    display: flex;
+    justify-content: space-between;
+    align-items: center;
+    }
+    .goal_communication_area .goal_communication_item:not(:last-child) {
+    border-bottom: 1px solid #11111122;
+    }
+
+    .goal_detail_footer{
+    background-color: #F6F8F9;
+    padding: 24px;
+    border-top: 1px solid #11111122;
+    height: 94px;
+    }
+    .goal_detail_footer textarea{
+    border-radius: 4px;
+    border: 1px solid gray;
+    resize: none;
+    padding: 8px 12px;
+    height: 50px;
+    width: calc(100% - 26px);
+    margin-bottom: 12px;
+    }
+    .goal_detail_footer .goal_comment_tools {
+    display: flex;
+    justify-content: space-between;
+    align-items: center;
+    }
+    .goal_detail_footer .goal_comment_tools select {
+    border: none;
+    outline: none;
+    background-color: #F6F8F9;
+    }
+    .goal_detail_footer .goal_comment_tools button {
+
+    }
+</BlazorStyled.Styled>
+
+@code {
+
+}
diff --git a/src/Modules/Goal/Application/Leuze.Modules.Goal.Application.UI/Pages/MyGoalDefinition.razor b/src/Modules/Goal/Application/Leuze.Modules.Goal.Application.UI/Pages/MyGoalDefinition.razor
new file mode 100644
index 0000000..fa10fd0
--- /dev/null
+++ b/src/Modules/Goal/Application/Leuze.Modules.Goal.Application.UI/Pages/MyGoalDefinition.razor
@@ -0,0 +1,63 @@
+﻿@page "/my-goals"
+<div class="section_header">
+    <h2>Mé definice cílů</h2>
+</div>
+<section>
+    <Microsoft.AspNetCore.Components.Routing.NavLink href="/goal/detail">
+        <div class="goal_def_item goal_item_closed">
+            <div class="goal_def_name">Název definice</div>
+            <div class="goal_def_bottom">
+                <div class="goal_def_date">
+                    <span>From - to</span>
+                </div>
+                <div class="goal_def_vari">VARI value</div>
+            </div>
+        </div>
+    </Microsoft.AspNetCore.Components.Routing.NavLink>
+</section>
+<BlazorStyled.Styled>
+    .section_header {
+    display: flex;
+    justify-content: space-between;
+    align-items: center;
+    }
+    .section_header h2 {
+    color: #111111;
+    font-size: 36px;
+    margin: 0;
+    }
+</BlazorStyled.Styled>
+<BlazorStyled.Styled>
+    .goal_def_item {
+    -webkit-box-shadow: 0 0 5px 0 rgba(0,0,0,0.05);
+    -moz-box-shadow: 0 0 5px 0 rgba(0,0,0,0.05);
+    box-shadow: 0 0 5px 0 rgba(0,0,0,0.05);
+    padding: 12px 24px;
+    border-radius: 4px;
+    width: calc(100% - 48px);
+    transition: .25s transform;
+    cursor: pointer;
+    }
+    .goal_def_item:hover {
+    transform: scale(1.005);
+    }
+    .goal_item_closed{
+    opacity: .5;
+    border: 1px solid #00000088;
+    }
+    .goal_def_name {
+    font-size: 18px;
+    font-weight: 700;
+    color: #111111;
+    font-family: 'Arial';
+    }
+    .goal_def_bottom {
+    display: flex;
+    justify-content: space-between;
+    align-items: center;
+    }
+</BlazorStyled.Styled>
+
+@code {
+
+}
diff --git a/src/Modules/Goal/Application/Leuze.Modules.Goal.Application.UI/_Imports.razor b/src/Modules/Goal/Application/Leuze.Modules.Goal.Application.UI/_Imports.razor
new file mode 100644
index 0000000..5f28270
--- /dev/null
+++ b/src/Modules/Goal/Application/Leuze.Modules.Goal.Application.UI/_Imports.razor
@@ -0,0 +1 @@
+﻿
\ No newline at end of file
diff --git a/src/Modules/Goal/Application/Leuze.Modules.Goal.Application/CQRS/Goals/Commands/CreateGoal.cs b/src/Modules/Goal/Application/Leuze.Modules.Goal.Application/CQRS/Goals/Commands/CreateGoal.cs
index 15fd37f..b94bcb6 100644
--- a/src/Modules/Goal/Application/Leuze.Modules.Goal.Application/CQRS/Goals/Commands/CreateGoal.cs
+++ b/src/Modules/Goal/Application/Leuze.Modules.Goal.Application/CQRS/Goals/Commands/CreateGoal.cs
@@ -1,10 +1,12 @@
 ﻿using Leuze.Core.Application.CQRS;
-using Leuze.Core.Domain.Domains.Users.Services.Abstractions;
+using Leuze.Core.Domain.Repositories;
 using Leuze.Modules.Goal.Domain.Domains;
 using Leuze.Modules.Goal.Domain.Repositories;
+using Microsoft.AspNetCore.Components.Authorization;
 using System;
 using System.Collections.Generic;
 using System.Linq;
+using System.Security.Claims;
 using System.Text;
 using System.Threading;
 using System.Threading.Tasks;
@@ -22,19 +24,24 @@ namespace Leuze.Modules.Goal.Application.CQRS.Goals.Commands
         {
             private readonly IGoalItemRepository _goalItemRepo;
             private readonly IGoalDefinitionRepository _goalDefinitionRepo;
-            private readonly IDomainUserProvider _domainUserProvider;
+            private readonly AuthenticationStateProvider _authenticationStateProvider;
+            private readonly IDomainUserRepository _domainUserRepository;
 
-            public Handler(IGoalItemRepository goalItemRepo, IGoalDefinitionRepository goalDefinitionRepo, IDomainUserProvider domainuserProvider)
+            public Handler(IGoalItemRepository goalItemRepo, IGoalDefinitionRepository goalDefinitionRepo, 
+                AuthenticationStateProvider authenticationStateProvider, IDomainUserRepository domainUserRepository)
             {
                 _goalItemRepo = goalItemRepo;
                 _goalDefinitionRepo = goalDefinitionRepo;
-                _domainUserProvider = domainuserProvider;
+                _authenticationStateProvider = authenticationStateProvider;
+                _domainUserRepository = domainUserRepository;
             }
 
             public async Task<RequestResponse<Response>> Handle(Command request, CancellationToken cancellationToken)
             {
                 //TODO: user muze byt null, ale to my nechceme!!!
-                var user = await _domainUserProvider.GetCurrentUserAsync();
+                var state = await _authenticationStateProvider.GetAuthenticationStateAsync();
+                var id = Guid.Parse(state.User!.FindFirst(ClaimTypes.NameIdentifier)!.Value);
+                var user = await _domainUserRepository.GetByIdAsync(id);
                 var goalDef = await _goalDefinitionRepo.GetByIdAsync(request.GoalDefinitionId);
 
                 if(goalDef == null)
diff --git a/src/Modules/Goal/Application/Leuze.Modules.Goal.Application/Leuze.Modules.Goal.Application.csproj b/src/Modules/Goal/Application/Leuze.Modules.Goal.Application/Leuze.Modules.Goal.Application.csproj
index b9d062e..7112824 100644
--- a/src/Modules/Goal/Application/Leuze.Modules.Goal.Application/Leuze.Modules.Goal.Application.csproj
+++ b/src/Modules/Goal/Application/Leuze.Modules.Goal.Application/Leuze.Modules.Goal.Application.csproj
@@ -15,7 +15,7 @@
 
   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
     <OutputPath>..\..\..\..\Presentation\Leuze.Modules\</OutputPath>
-    <DocumentationFile>..\..\..\..\docs\Leuze.Modules.Goal.Application.xml</DocumentationFile>
+    <DocumentationFile>..\..\..\..\..\docs\Leuze.Modules.Goal.Application.xml</DocumentationFile>
   </PropertyGroup>
 
   <ItemGroup>
diff --git a/src/Modules/Goal/Domain/Leuze.Modules.Goal.Domain/Leuze.Modules.Goal.Domain.csproj b/src/Modules/Goal/Domain/Leuze.Modules.Goal.Domain/Leuze.Modules.Goal.Domain.csproj
index e278922..ca45641 100644
--- a/src/Modules/Goal/Domain/Leuze.Modules.Goal.Domain/Leuze.Modules.Goal.Domain.csproj
+++ b/src/Modules/Goal/Domain/Leuze.Modules.Goal.Domain/Leuze.Modules.Goal.Domain.csproj
@@ -15,7 +15,7 @@
 
   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
     <OutputPath>..\..\..\..\Presentation\Leuze.Modules\</OutputPath>
-    <DocumentationFile>..\..\..\..\docs\Leuze.Modules.Goal.Domain.xml</DocumentationFile>
+    <DocumentationFile>..\..\..\..\..\docs\Leuze.Modules.Goal.Domain.xml</DocumentationFile>
   </PropertyGroup>
 
   <ItemGroup>
diff --git a/src/Modules/Goal/Infrastructure/Leuze.Modules.Goal.Infrastructure.Persistence/DependencyInjection.cs b/src/Modules/Goal/Infrastructure/Leuze.Modules.Goal.Infrastructure.Persistence/DependencyInjection.cs
index c52a5da..02cd40d 100644
--- a/src/Modules/Goal/Infrastructure/Leuze.Modules.Goal.Infrastructure.Persistence/DependencyInjection.cs
+++ b/src/Modules/Goal/Infrastructure/Leuze.Modules.Goal.Infrastructure.Persistence/DependencyInjection.cs
@@ -1,5 +1,5 @@
 ﻿using ExtCore.Infrastructure.Actions;
-using Leuze.Core.Infrastructure.Persistence.Extensions;
+using Leuze.Modules.Goal.Infrastructure.Persistence.Extensions;
 using Microsoft.AspNetCore.Builder;
 using Microsoft.Extensions.DependencyInjection;
 using System;
@@ -42,6 +42,9 @@ namespace Leuze.Modules.Goal.Infrastructure.Persistence
         /// </summary>
         /// <param name="applicationBuilder"></param>
         /// <param name="serviceProvider"></param>
-        public void Execute(IApplicationBuilder applicationBuilder, IServiceProvider serviceProvider) => applicationBuilder.MigrateDatabase();
+        public void Execute(IApplicationBuilder applicationBuilder, IServiceProvider serviceProvider)
+        {
+
+        }
     }
 }
diff --git a/src/Modules/Goal/Infrastructure/Leuze.Modules.Goal.Infrastructure.Persistence/Leuze.Modules.Goal.Infrastructure.Persistence.csproj b/src/Modules/Goal/Infrastructure/Leuze.Modules.Goal.Infrastructure.Persistence/Leuze.Modules.Goal.Infrastructure.Persistence.csproj
index a7077d3..6d59db4 100644
--- a/src/Modules/Goal/Infrastructure/Leuze.Modules.Goal.Infrastructure.Persistence/Leuze.Modules.Goal.Infrastructure.Persistence.csproj
+++ b/src/Modules/Goal/Infrastructure/Leuze.Modules.Goal.Infrastructure.Persistence/Leuze.Modules.Goal.Infrastructure.Persistence.csproj
@@ -15,7 +15,7 @@
 
   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
     <OutputPath>..\..\..\..\Presentation\Leuze.Modules\</OutputPath>
-    <DocumentationFile>..\..\..\..\docs\Leuze.Modules.Goal.Infrastructure.Persistence.xml</DocumentationFile>
+    <DocumentationFile>..\..\..\..\..\docs\Leuze.Modules.Goal.Infrastructure.Persistence.xml</DocumentationFile>
   </PropertyGroup>
 
   <ItemGroup>
diff --git a/tests/Core/Leuze.Tests.Core/LoginTests.cs b/tests/Core/Leuze.Tests.Core/LoginTests.cs
index ca660f8..837e1ca 100644
--- a/tests/Core/Leuze.Tests.Core/LoginTests.cs
+++ b/tests/Core/Leuze.Tests.Core/LoginTests.cs
@@ -1,14 +1,10 @@
 using System;
 using System.Threading.Tasks;
 using FluentAssertions;
-using Leuze.Core.Application.CQRS.Auth.Commads;
+using Leuze.Core.Application.CQRS.Auth.Commands;
 using Leuze.Core.Application.Identity;
-using Leuze.Core.Domain.Repositories;
-using Leuze.Core.Infrastructure.Persistence.Repository;
 using Leuze.Tests.Configuration;
 using MediatR;
-using Microsoft.AspNetCore.Http;
-using Microsoft.AspNetCore.Identity.UI.V4.Pages.Internal.Account.Manage;
 using Microsoft.Extensions.DependencyInjection;
 using Xunit;
 
