Skip to content

Commit

Permalink
Merge pull request #134 from varianter/import-competences-from-bemanning
Browse files Browse the repository at this point in the history
  • Loading branch information
trulshj authored Nov 9, 2024
2 parents 2743562 + 993e76f commit fc51d57
Show file tree
Hide file tree
Showing 12 changed files with 571 additions and 12 deletions.
3 changes: 3 additions & 0 deletions Chewbacca.sln.DotSettings
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<wpf:ResourceDictionary xml:space="preserve" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:s="clr-namespace:System;assembly=mscorlib" xmlns:ss="urn:shemas-jetbrains-com:settings-storage-xaml" xmlns:wpf="http://schemas.microsoft.com/winfx/2006/xaml/presentation">
<s:Boolean x:Key="/Default/UserDictionary/Words/=bemanning/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=variantdash/@EntryIndexedValue">True</s:Boolean></wpf:ResourceDictionary>
9 changes: 5 additions & 4 deletions src/ApplicationCore/Models/EmployeeInformation.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,18 @@ namespace ApplicationCore.Models;

public record EmployeeInformation
{
public string Email { get; init; } = null!;
public string Name { get; init; } = null!;
public required string Email { get; init; }
public required string Name { get; init; }
public string? Telephone { get; init; }
public string? ImageUrl { get; init; }
public string? ImageThumbUrl { get; init; }
public string OfficeName { get; init; } = null!;
public required string OfficeName { get; init; }
public DateTime StartDate { get; init; }
public DateTime? EndDate { get; set; }
public string? AccountNumber { get; init; }
public string? Address { get; init; }
public string? ZipCode { get; init; }
public string? City { get; init; }
public string CountryCode { get; set; } = null!;
public required string CountryCode { get; set; }
public List<string> Competences { get; set; } = [];
}
13 changes: 13 additions & 0 deletions src/Infrastructure/ApiClients/DTOs/VibesConsultantDTO.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
namespace Infrastructure.ApiClients.DTOs;

public class VibesConsultantDTO
{
public required string Email { get; set; }
public required List<CompetenceDTO> Competences { get; set; }
}

public class CompetenceDTO
{
public required string Id { get; set; }
public required string Name { get; set; }
}
4 changes: 4 additions & 0 deletions src/Infrastructure/ApiClients/IVibesApiClient.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using Infrastructure.ApiClients.DTOs;

using Refit;

namespace Infrastructure.ApiClients;
Expand All @@ -11,4 +12,7 @@ public interface IVibesApiClient

[Get("/v0/{companyCountry}/consultants/employment")]
Task<IEnumerable<VibesEmploymentDTO>> GetEmploymentDates(string companyCountry);

[Get("/v0/{companyCountry}/consultants")]
Task<IEnumerable<VibesConsultantDTO>> GetConsultants(string companyCountry);
}
5 changes: 4 additions & 1 deletion src/Infrastructure/Entities/EmployeeEntity.cs
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ public record EmployeeEntity
public string? ZipCode { get; set; }
public string? City { get; set; }

public List<string> Competences { get; set; } = new();

public EmergencyContactEntity? EmergencyContact { get; set; }
public EmployeeAllergiesAndDietaryPreferencesEntity? AllergiesAndDietaryPreferences { get; set; }

Expand Down Expand Up @@ -63,7 +65,8 @@ public static Employee ToEmployee(this EmployeeEntity employeeEntity)
ImageThumbUrl = employeeEntity.ImageThumbUrl,
OfficeName = employeeEntity.OfficeName,
StartDate = employeeEntity.StartDate,
ZipCode = employeeEntity.ZipCode
ZipCode = employeeEntity.ZipCode,
Competences = employeeEntity.Competences
},
EmergencyContact = employeeEntity.EmergencyContact != null
? new EmergencyContact
Expand Down
Loading

0 comments on commit fc51d57

Please sign in to comment.