Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
56 commits
Select commit Hold shift + click to select a range
87fc9db
feat(issue-102): update front views for pfr-centr.com
live-dev999 Jan 2, 2022
aaefb77
feat(issue-102): update home page
live-dev999 Jan 4, 2022
1a44404
feat(issue-140): e-sender connect to email server
live-dev999 Jan 10, 2022
5ee6aed
feat(issue-140): e-sender connect to email server
live-dev999 Jan 10, 2022
53abdc0
fix(issue-142): update project file of e-sender
live-dev999 Jan 10, 2022
c6efc18
fix(issue-142): update project file of e-sender
live-dev999 Jan 10, 2022
03a7bf3
chore: update loggers for all
live-dev999 Jan 10, 2022
e5ba41c
feat(issue-116): implement the store of memory
live-dev999 Jan 11, 2022
0b1f6c7
feat(issue-116): implement the store of memory
live-dev999 Jan 11, 2022
a61f5e1
feat(issue-146): e-sender mvc project convert to api
live-dev999 Jan 11, 2022
9dcea52
feat(issue-146): e-sender mvc project convert to api
live-dev999 Jan 11, 2022
d166c2e
chore(issue-146): add a little changes for e-sender
live-dev999 Jan 13, 2022
53c881d
chore(issue-146): add a little changes for e-sender
live-dev999 Jan 13, 2022
854711a
feat(issue-149): implement api gateway for e-sender api
live-dev999 Jan 13, 2022
aeaf196
style(issue-149): code cleanup
live-dev999 Jan 13, 2022
3188b2b
feat(issue-149): implement api gateway for e-sender api
live-dev999 Jan 13, 2022
de2ab3a
ref(issue-149): update classes for gateway web-api
live-dev999 Jan 14, 2022
2d265ee
style(issue-149): code cleanup
live-dev999 Jan 14, 2022
70bbd3c
feat(issue-153): add polly lib for the web gateway api
live-dev999 Jan 14, 2022
b1e5be9
feat(issue-153): add polly lib for the web gateway api
live-dev999 Jan 14, 2022
3dcab0f
feat(issue-113): add empty solution of On-Tracker
live-dev999 Jan 16, 2022
dec1c7f
feat(issue-156): add test skeleton for on-tracker
live-dev999 Jan 16, 2022
9d7822d
feat(issue-156): add test skeleton for on-tracker
live-dev999 Jan 16, 2022
10e6f3f
feat(issue-158): update .net core 2.1 to 2.2
live-dev999 Jan 16, 2022
4eea4d8
feat(issue-158): update .net core 2.1 to 2.2
live-dev999 Jan 16, 2022
8d1bd76
feat(issue-102): update views of web client.
live-dev999 Jan 18, 2022
bf5f73c
feat(issue-164): add prototype page for specialists of pfr-app web ve…
live-dev999 Jan 18, 2022
7279e02
feat(issue-164): update the header component
live-dev999 Jan 18, 2022
f81f4d9
feat(issue-164): update the header & specialists page of pfr-app web …
live-dev999 Jan 18, 2022
257e5ab
feat(issue-164): update the specialists page of pfr-app web version
live-dev999 Jan 18, 2022
ec5dc12
feat(issue-164): update test for pages of pfr-app web version
live-dev999 Jan 18, 2022
9543975
feat(issue-164): update specialist view of pfr-app web version and re…
live-dev999 Jan 22, 2022
025a0ad
feat(issue-162): add feature e-sender service to o2-auth
live-dev999 Jan 18, 2022
31218d4
feat(issue-162): add feature e-sender service to o2-auth
live-dev999 Jan 22, 2022
90678f2
feat(issue-161): add the e-sender feature to gateway of web version
live-dev999 Jan 16, 2022
4f9b8de
feat(issue-161): add feature e-sender service to o2-auth
live-dev999 Jan 18, 2022
17347e9
feat(issue-161): add the e-sender feature to gateway of web version
live-dev999 Jan 22, 2022
6d2a1d3
feat(issue-150): add data layer to e-sender api
live-dev999 Jan 22, 2022
d36dd60
feat(issue-150): add data layer to e-sender api
live-dev999 Jan 22, 2022
7459c47
feat(issue-182): update pages for is4
live-dev999 Jan 30, 2022
d6c7476
feat(issue-174): add the basic structure
live-dev999 Jan 30, 2022
dd670ab
feat(issue-186): delete old pfr-app
live-dev999 Feb 5, 2022
cc8004f
feat(issue-186): add 3 project of micro-frontends
live-dev999 Feb 6, 2022
91b3a56
feat(issue-188): recreate project pfr-app for ios and android
live-dev999 Feb 6, 2022
6e4471c
feat(issue-187): add migrate sql script to json file
live-dev999 Feb 6, 2022
7b39495
feat(issue-188): update logo for ios pfr-app
live-dev999 Feb 6, 2022
19dd20c
feat(issue-118): update left menu and add logout button
live-dev999 Feb 6, 2022
ae2aa61
feat(issue-188): update left menu pfr-app mobile client
live-dev999 Feb 7, 2022
ac50269
docs(issue-180): update readme.md
live-dev999 Feb 8, 2022
68bb1b4
docs(issue-180): add script ps1
live-dev999 Feb 8, 2022
8ce0269
docs(issue-180): add info of version numbers
live-dev999 Feb 8, 2022
21e21e7
feat(issue-188): add skeleton for mobile pfr-app
live-dev999 Feb 8, 2022
d2467b4
feat(issue-174): add the basic structure of smalltalk api
live-dev999 Feb 8, 2022
37fb6ab
feat(issue-182): update pages for is4
live-dev999 Feb 8, 2022
b7a0f85
feat(issue-187): add migrate sql script to json file
live-dev999 Feb 8, 2022
90dc3c5
feat(issue-186): integrate microfrontend in pfr-app web client
live-dev999 Feb 8, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
27 changes: 26 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -193,4 +193,29 @@ AK name - 'AK_columnName_columnNameId'


## License
[![FOSSA Status](https://app.fossa.com/api/projects/git%2Bgithub.com%2FLiveDevTeam%2FO2NextGen.svg?type=large)](https://app.fossa.com/projects/git%2Bgithub.com%2FLiveDevTeam%2FO2NextGen?ref=badge_large)
[![FOSSA Status](https://app.fossa.com/api/projects/git%2Bgithub.com%2FLiveDevTeam%2FO2NextGen.svg?type=large)](https://app.fossa.com/projects/git%2Bgithub.com%2FLiveDevTeam%2FO2NextGen?ref=badge_large)


# Versions

#### Version information for an assembly consists of the following four values:

```
1.0.0.0
```

Description
```
major - Major Version
minor - Minor Version
build number - Build Number
0 - alpha
sample: 1.1.0.1 like (1.1-a.1)
1 - beta
sample: 1.1.1.2 like (1.1-b.2)
2 - release candidate
sample: 1.1.2.1 like (1.1-rc.1)
3 - release
sample: 1.1.3.3 like (1.1-r.3)
revision - git revision
```
Binary file added design/pfr-app/export/Icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added design/pfr-app/export/iOS App Icon Template.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added design/pfr-app/export/icon_20pt.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added design/pfr-app/export/icon_20pt@2x.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added design/pfr-app/export/icon_20pt@3x.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added design/pfr-app/export/icon_29pt.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added design/pfr-app/export/icon_29pt@2x.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added design/pfr-app/export/icon_29pt@3x.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added design/pfr-app/export/icon_40pt.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added design/pfr-app/export/icon_40pt@2x.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added design/pfr-app/export/icon_40pt@3x.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added design/pfr-app/export/icon_60pt@2x.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added design/pfr-app/export/icon_60pt@3x.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added design/pfr-app/export/icon_76pt.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added design/pfr-app/export/icon_76pt@2x.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added design/pfr-app/export/icon_83.5@2x.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
namespace O2NextGen.Web.BFF.Core.Config
{
public class UrlsConfig
{
public string ESenderUrl { get; set; }
public string CGenUrl { get; set; }
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
using Microsoft.AspNetCore.Antiforgery;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using O2NextGen.Web.BFF.Core.Features.Auth.Models;

namespace O2NextGen.Web.BFF.Core.Features.Auth
{
[Route("auth")]
public class AuthController : ControllerBase
{
private readonly IAntiforgery _antiForgery;

public AuthController(IAntiforgery antiForgery)
{
_antiForgery = antiForgery;
}

[HttpGet]
[Route("info")]
public ActionResult<AuthInfoModel> GetInfo()
{
var tokens = _antiForgery.GetAndStoreTokens(HttpContext);
HttpContext.Response.Cookies.Append(
"XSRF-TOKEN",
tokens.RequestToken,
//allow JS to grab the cookie to put it in the request header
new CookieOptions() {HttpOnly = false});

return new AuthInfoModel
{
Name = User.FindFirst("name").Value
};
}

/*
* No need to do anything here, as the auth middleware will take care of redirecting to IdentityServer4.
* When the user is authenticated and gets back here, we can redirect to the desired url.
*/
[HttpGet]
[Route("login")]
public IActionResult Login([FromQuery] string returnUrl)
{
return Redirect(string.IsNullOrWhiteSpace(returnUrl) ? "/" : returnUrl);
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
namespace O2NextGen.Web.BFF.Core.Features.Auth.Models
{
public class AuthInfoModel
{
public string Name { get; set; }
}
}
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Mvc;

namespace O2NextGen.Mobile.BFF.Core.Features.CGen
namespace O2NextGen.Web.BFF.Core.Features.C_Gen
{
[Route("api/features/c-gen/[controller]")]
public class CertificatesController : Controller
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Mvc;

namespace O2NextGen.Mobile.BFF.Core.Features.CGen
namespace O2NextGen.Web.BFF.Core.Features.C_Gen
{
[Route("api/features/c-gen/[controller]")]
public class VersionController : Controller
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
using System;
using System.Threading;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Mvc;
using O2NextGen.Web.BFF.Core.Features.E_Sender.Models;
using O2NextGen.Web.BFF.Core.Features.E_Sender.Services;

namespace O2NextGen.Web.BFF.Core.Features.E_Sender
{
[Route("api/features/e-sender")]
public class ESenderController : Controller
{
private readonly IESenderService _senderService;

public ESenderController(IESenderService senderService)
{
_senderService = senderService;
}

#region Methods

[HttpGet]
[Route("")]
public async Task<IActionResult> GetAllAsync()
{
throw new NotImplementedException();
}

[HttpGet]
[Route("{id}")]
public async Task<IActionResult> GetByIdAsync(long id, CancellationToken ct)
{
var result =await _senderService.GetAsync(id, ct);
return Ok(result);
}

[HttpPut]
[Route("id")]
public async Task<IActionResult> UpdateAsync(long id, [FromBody] MailRequestViewModel model,
CancellationToken ct)
{
throw new NotImplementedException();
}

[HttpPost]
[HttpPut]
[Route("")]
public async Task<IActionResult> AddAsync([FromBody] MailRequestViewModel model, CancellationToken ct)
{
var result = await _senderService.AddAsync(model, ct);
return CreatedAtAction(nameof(GetByIdAsync), new {id = result.Id}, result);
}

#endregion

[HttpDelete]
[Route("id")]
public async Task<IActionResult> RemoveAsync(long id, CancellationToken ct)
{
throw new NotImplementedException();
}
}
}

Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
namespace O2NextGen.Web.BFF.Core.Features.E_Sender.Models
{
public class MailRequestViewModel
{
public long Id { get; set; }
public string From { get; set; }
public string To { get; set; }
public string Body { get; set; }
public string Subject { get; set; }
}
}

Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
using System;
using System.Net.Http;
using System.Threading;
using System.Threading.Tasks;
using Microsoft.Extensions.Options;
using O2NextGen.Web.BFF.Core.Config;
using O2NextGen.Web.BFF.Core.Features.E_Sender.Models;

namespace O2NextGen.Web.BFF.Core.Features.E_Sender.Services
{
public class ESenderService: IESenderService
{
private readonly HttpClient _httpClient;
private readonly IOptions<UrlsConfig> _config;
private string ApiVersion { get; } = "1.0";

public ESenderService(HttpClient httpClient, IOptions<UrlsConfig> config)
{
_httpClient = httpClient ?? throw new ArgumentNullException(nameof(httpClient));
_config = config ?? throw new ArgumentNullException(nameof(config));
}
public async Task<MailRequestViewModel> AddAsync(MailRequestViewModel model, CancellationToken ct)
{
var response = await _httpClient.PostAsJsonAsync("api/emailsender",model,ct);
return await response.Content.ReadAsAsync<MailRequestViewModel>(ct);
}

public async Task<MailRequestViewModel> GetAsync(long id, CancellationToken ct)
{
var response = await _httpClient.GetAsync($"api/emailsender/{id}",ct);
return await response.Content.ReadAsAsync<MailRequestViewModel>(ct);

}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
using System.Threading;
using System.Threading.Tasks;
using O2NextGen.Web.BFF.Core.Features.E_Sender.Models;

namespace O2NextGen.Web.BFF.Core.Features.E_Sender.Services
{
public interface IESenderService
{
Task<MailRequestViewModel> AddAsync(MailRequestViewModel model, CancellationToken ct);
Task<MailRequestViewModel> GetAsync(long id, CancellationToken ct);
}
}
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Mvc;

namespace O2NextGen.Web.BFF.Core.Features.ESender
namespace O2NextGen.Web.BFF.Core.Features.E_Sender
{
[Route("api/features/e-sender/[controller]")]
public class VersionController : Controller
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
using System.Collections.Generic;
using System.Net.Http;
using System.Net.Http.Headers;
using System.Threading;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Authentication;
using Microsoft.AspNetCore.Http;

namespace O2NextGen.Web.BFF.Core.Infrastructure
{
public class HttpClientAuthorizationDelegatingHandler
: DelegatingHandler
{
private readonly IHttpContextAccessor _httpContextAccesor;

public HttpClientAuthorizationDelegatingHandler(IHttpContextAccessor httpContextAccesor)
{
_httpContextAccesor = httpContextAccesor;
}

protected override async Task<HttpResponseMessage> SendAsync(HttpRequestMessage request,
CancellationToken cancellationToken)
{
var authorizationHeader = _httpContextAccesor.HttpContext
.Request.Headers["Authorization"];

if (!string.IsNullOrEmpty(authorizationHeader))
{
request.Headers.Add("Authorization", new List<string>() {authorizationHeader});
}

var token = await GetToken();

if (token != null)
{
request.Headers.Authorization = new AuthenticationHeaderValue("Bearer", token);
}

return await base.SendAsync(request, cancellationToken);
}

async Task<string> GetToken()
{
const string ACCESS_TOKEN = "access_token";

return await _httpContextAccesor.HttpContext
.GetTokenAsync(ACCESS_TOKEN);
}
}
}
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk.Web">

<PropertyGroup>
<TargetFramework>netcoreapp2.1</TargetFramework>
<TargetFramework>netcoreapp2.2</TargetFramework>
</PropertyGroup>

<ItemGroup>
Expand All @@ -13,7 +13,9 @@

<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.App" />
<PackageReference Include="Microsoft.AspNetCore.Razor.Design" Version="2.1.2" PrivateAssets="All" />
<PackageReference Include="Microsoft.Extensions.Http.Polly">
<Version>2.2.0</Version>
</PackageReference>
</ItemGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,5 @@
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore;
using Microsoft.AspNetCore;
using Microsoft.AspNetCore.Hosting;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.Logging;

namespace O2NextGen.Web.BFF.Core
{
Expand Down
Loading