Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Show login and logout button #196

Merged
merged 11 commits into from
Jul 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions src/Services/CRM/Api/Api.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk.Web">

<PropertyGroup>
<TargetFramework>net7.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<DockerComposeProjectPath>../../../docker-compose.dcproj</DockerComposeProjectPath>
Expand All @@ -21,11 +21,11 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="MediatR" Version="11.1.0" />
<PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="7.0.0" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="7.0.0">
<PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="8.0.7" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="8.0.7">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
<PackageReference Include="Swashbuckle.AspNetCore" Version="6.2.3" />
<PackageReference Include="Swashbuckle.AspNetCore" Version="6.6.2" />
</ItemGroup>
</Project>
4 changes: 2 additions & 2 deletions src/Services/CRM/Api/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
#See https://aka.ms/containerfastmode to understand how Visual Studio uses this Dockerfile to build your images for faster debugging.

FROM mcr.microsoft.com/dotnet/aspnet:7.0 AS base
FROM mcr.microsoft.com/dotnet/aspnet:8.0 AS base
WORKDIR /app
EXPOSE 80
EXPOSE 443

FROM mcr.microsoft.com/dotnet/sdk:7.0 AS build
FROM mcr.microsoft.com/dotnet/sdk:8.0 AS build
WORKDIR /src
COPY ["Services/CRM/Api/Api.csproj", "Services/CRM/Api/"]
COPY ["Services/CRM/Application/Application.csproj", "Services/CRM/Application/"]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
using System;
using System.Net;
using System.Threading.Tasks;
using System.Net;
using KDVManager.Services.CRM.Application.Exceptions;
using System.Text.Json;
using System.Text.Json.Serialization;
using Microsoft.AspNetCore.Http;

namespace KDVManager.Services.CRM.Api.Middleware;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
using System;
using Microsoft.AspNetCore.Builder;

namespace KDVManager.Services.CRM.Api.Middleware
namespace KDVManager.Services.CRM.Api.Middleware
{
public static class ExceptionHandlerMiddlewareExtension
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
using System.ComponentModel.DataAnnotations;
using KDVManager.Services.CRM.Application.Exceptions;
using ValidationException = KDVManager.Services.CRM.Application.Exceptions.ValidationException;

public class ValidationError
Expand Down
3 changes: 0 additions & 3 deletions src/Services/CRM/Api/Services/TenantService/TenantService.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
using System;
using KDVManager.Services.CRM.Application.Contracts.Services;
using Microsoft.AspNetCore.Http;
using Microsoft.Extensions.Primitives;
using KDVManager.Services.CRM.Application.Exceptions;

namespace KDVManager.Services.CRM.Api.Services;
Expand Down
10 changes: 5 additions & 5 deletions src/Services/CRM/Application/Application.csproj
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net7.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
</PropertyGroup>
<ItemGroup>
<Folder Include="Contracts\" />
Expand All @@ -12,9 +12,9 @@
<ProjectReference Include="..\Domain\Domain.csproj" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="AutoMapper.Extensions.Microsoft.DependencyInjection" Version="12.0.0" />
<PackageReference Include="AutoMapper" Version="12.0.0" />
<PackageReference Include="MediatR.Extensions.Microsoft.DependencyInjection" Version="11.0.0" />
<PackageReference Include="FluentValidation" Version="11.4.0" />
<PackageReference Include="AutoMapper.Extensions.Microsoft.DependencyInjection" Version="12.0.1" />
<PackageReference Include="AutoMapper" Version="12.0.1" />
<PackageReference Include="MediatR.Extensions.Microsoft.DependencyInjection" Version="11.1.0" />
<PackageReference Include="FluentValidation" Version="11.9.2" />
</ItemGroup>
</Project>
4 changes: 1 addition & 3 deletions src/Services/CRM/Application/ConfigureServices.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
using System;
using System.Reflection;
using System.Reflection;
using MediatR;
using Microsoft.Extensions.DependencyInjection;

namespace Microsoft.Extensions.DependencyInjection;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
using KDVManager.Services.CRM.Domain.Interfaces;
using MediatR;

namespace KDVManager.Services.CRM.Application.Contracts.Pagination
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
using System;
using System.Collections.Generic;
using System.Collections.Generic;
using System.Threading.Tasks;
using KDVManager.Services.CRM.Domain.Entities;
using KDVManager.Services.CRM.Domain.Interfaces;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
using System;
using System.Collections.Generic;
using System.Collections.Generic;
using System.Threading.Tasks;
using KDVManager.Services.CRM.Domain.Entities;
using KDVManager.Services.CRM.Domain.Interfaces;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
using System;
namespace KDVManager.Services.CRM.Application.Contracts.Validation
namespace KDVManager.Services.CRM.Application.Contracts.Validation
{
public class ValidationError
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
using System;
using System.Threading;
using System.Threading.Tasks;
using FluentValidation;
using KDVManager.Services.CRM.Application.Contracts.Persistence;
using FluentValidation;

namespace KDVManager.Services.CRM.Application.Features.Children.Commands.CreateChild;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
using System;
using System.Threading;
using System.Threading;
using System.Threading.Tasks;
using AutoMapper;
using KDVManager.Services.CRM.Application.Contracts.Persistence;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
using System;
using System.Threading;
using System.Threading;
using System.Threading.Tasks;
using AutoMapper;
using KDVManager.Services.CRM.Application.Contracts.Persistence;
using KDVManager.Services.CRM.Application.Features.Children.Commands.CreateChild;
using KDVManager.Services.CRM.Domain.Entities;
using MediatR;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
using System;
using System.Threading;
using System.Threading.Tasks;
using FluentValidation;
using KDVManager.Services.CRM.Application.Contracts.Persistence;
using FluentValidation;

namespace KDVManager.Services.CRM.Application.Features.Children.Commands.UpdateChild;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
using System;
using System.Threading;
using System.Threading;
using System.Threading.Tasks;
using AutoMapper;
using KDVManager.Services.CRM.Application.Contracts.Persistence;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
using System;
using System.Collections.Generic;
using KDVManager.Services.CRM.Domain;
using KDVManager.Services.CRM.Application.Contracts.Pagination;
using KDVManager.Services.CRM.Application.Contracts.Pagination;
using MediatR;

namespace KDVManager.Services.CRM.Application.Features.Children.Queries.GetChildList
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
using System;
using System.Collections.Generic;
using System.Collections.Generic;
using System.Threading;
using System.Threading.Tasks;
using AutoMapper;
using KDVManager.Services.CRM.Application.Contracts.Persistence;
using KDVManager.Services.CRM.Application.Contracts.Pagination;
using KDVManager.Services.CRM.Domain.Entities;
using MediatR;

namespace KDVManager.Services.CRM.Application.Features.Children.Queries.GetChildList;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
using System;
using FluentValidation;
using FluentValidation;

namespace KDVManager.Services.CRM.Application.Features.People.Commands.AddPerson;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
using System;
using System.Collections.Generic;
using KDVManager.Services.CRM.Domain;
using KDVManager.Services.CRM.Application.Contracts.Pagination;
using KDVManager.Services.CRM.Application.Contracts.Pagination;
using MediatR;

namespace KDVManager.Services.CRM.Application.Features.People.Queries.GetPersonList;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
using System;
using System.Collections.Generic;
using System.Collections.Generic;
using System.Threading;
using System.Threading.Tasks;
using AutoMapper;
using KDVManager.Services.CRM.Application.Contracts.Persistence;
using KDVManager.Services.CRM.Application.Contracts.Pagination;
using KDVManager.Services.CRM.Domain.Entities;
using MediatR;

namespace KDVManager.Services.CRM.Application.Features.People.Queries.GetPersonList;
Expand Down
3 changes: 1 addition & 2 deletions src/Services/CRM/Application/Profiles/MappingProfile.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
using System;
using AutoMapper;
using AutoMapper;
using KDVManager.Services.CRM.Application.Contracts.Pagination;
using KDVManager.Services.CRM.Application.Features.Children.Commands.CreateChild;
using KDVManager.Services.CRM.Application.Features.Children.Commands.UpdateChild;
Expand Down
2 changes: 1 addition & 1 deletion src/Services/CRM/Domain/Domain.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net7.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
</PropertyGroup>

<ItemGroup>
Expand Down
3 changes: 1 addition & 2 deletions src/Services/CRM/Infrastructure/ChildManagementDbContext.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
using System;
using KDVManager.Services.CRM.Domain.Entities;
using KDVManager.Services.CRM.Domain.Entities;
using KDVManager.Services.CRM.Application.Contracts.Services;
using Microsoft.EntityFrameworkCore;
using System.Threading.Tasks;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
using System;
using KDVManager.Services.CRM.Domain.Entities;
using KDVManager.Services.CRM.Domain.Entities;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Metadata.Builders;

Expand Down
4 changes: 1 addition & 3 deletions src/Services/CRM/Infrastructure/ConfigureServices.cs
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
using System;
using KDVManager.Services.CRM.Application.Contracts.Persistence;
using KDVManager.Services.CRM.Application.Contracts.Persistence;
using KDVManager.Services.CRM.Infrastructure;
using KDVManager.Services.CRM.Infrastructure.Repositories;
using Microsoft.EntityFrameworkCore;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;

namespace Microsoft.Extensions.DependencyInjection;

Expand Down
6 changes: 3 additions & 3 deletions src/Services/CRM/Infrastructure/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#See https://aka.ms/containerfastmode to understand how Visual Studio uses this Dockerfile to build your images for faster debugging.
FROM mcr.microsoft.com/dotnet/sdk:7.0 AS build
FROM mcr.microsoft.com/dotnet/sdk:8.0 AS build
WORKDIR /src
COPY ["Services/CRM/Api/Api.csproj", "Services/CRM/Api/"]
COPY ["Services/CRM/Application/Application.csproj", "Services/CRM/Application/"]
Expand All @@ -9,11 +9,11 @@ RUN dotnet restore "Services/CRM/Api/Api.csproj"
COPY . .
WORKDIR "/src/Services/CRM/Infrastructure"

RUN dotnet tool install -g dotnet-ef --version 7.0.0
RUN dotnet tool install -g dotnet-ef --version 8.0.0
ENV PATH $PATH:/root/.dotnet/tools
RUN dotnet ef migrations bundle --self-contained -r linux-x64 --startup-project "../Api" --context MigrationDbContext

FROM ubuntu:22.10 AS migrator
FROM ubuntu:24.04 AS migrator

RUN apt-get update && apt-get install -qqq libicu-dev libssl-dev

Expand Down
6 changes: 3 additions & 3 deletions src/Services/CRM/Infrastructure/Infrastructure.csproj
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net7.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Npgsql.EntityFrameworkCore.PostgreSQL" Version="7.0.0" />
<PackageReference Include="Microsoft.Extensions.Options.ConfigurationExtensions" Version="7.0.0" />
<PackageReference Include="Npgsql.EntityFrameworkCore.PostgreSQL" Version="8.0.4" />
<PackageReference Include="Microsoft.Extensions.Options.ConfigurationExtensions" Version="8.0.0" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Domain\Domain.csproj" />
Expand Down
3 changes: 1 addition & 2 deletions src/Services/CRM/Infrastructure/MigrationDbContext.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
using System;
using KDVManager.Services.CRM.Domain.Entities;
using KDVManager.Services.CRM.Domain.Entities;
using Microsoft.EntityFrameworkCore;

namespace KDVManager.Services.CRM.Infrastructure
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
using System;
using System.Linq;
using System.Linq;
using System.Collections.Generic;
using System.Threading.Tasks;
using KDVManager.Services.CRM.Application.Contracts.Persistence;
Expand Down
8 changes: 4 additions & 4 deletions src/Services/Scheduling/Api/Api.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk.Web">

<PropertyGroup>
<TargetFramework>net7.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<DockerComposeProjectPath>../../../docker-compose.dcproj</DockerComposeProjectPath>
Expand All @@ -21,11 +21,11 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="MediatR" Version="11.1.0" />
<PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="7.0.0" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="7.0.0">
<PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="8.0.7" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="8.0.7">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
<PackageReference Include="Swashbuckle.AspNetCore" Version="6.2.3" />
<PackageReference Include="Swashbuckle.AspNetCore" Version="6.6.2" />
</ItemGroup>
</Project>
10 changes: 1 addition & 9 deletions src/Services/Scheduling/Api/Controllers/GroupsController.cs
Original file line number Diff line number Diff line change
@@ -1,17 +1,9 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using KDVManager.Services.Scheduling.Application.Features.Groups.Commands.AddGroup;
using KDVManager.Services.Scheduling.Application.Features.Groups.Commands.AddGroup;
using KDVManager.Services.Scheduling.Application.Features.Groups.Queries.ListGroups;
using MediatR;
using Microsoft.AspNetCore.Mvc;
using Microsoft.Extensions.Logging;
using Microsoft.AspNetCore.Authorization;
using KDVManager.Services.Scheduling.Application.Contracts.Pagination;
using System.Net;
using KDVManager.Services.Scheduling.Application.Contracts.Persistence;
using System.Net.Mime;
using KDVManager.Services.Scheduling.Application.Features.Groups.Commands.DeleteGroup;

namespace KDVManager.Services.Scheduling.Api.Controllers;
Expand Down
Loading