Compare commits

..

7 Commits

Author SHA1 Message Date
Developer 02
6e3bb6c3a0 feat: Enhance receiver input and table components
- Updated `ReceiverInputComponent` to support optional index parameter in the `filter` function to manage email input logic more effectively.
- Added `last_used_name` functionality in `ReceiverTableComponent` to auto-fill names based on the last used email name.
- Implemented email duplication prevention logic in `ReceiverTableComponent` to ensure unique email inputs.
- Refactored component lifecycle methods and data handling for improved performance and user experience.
2024-08-30 22:25:13 +02:00
Developer 02
d347ec420c feat: ReadAllAsync-Methode zur ReceiverRepository hinzugefügt
- `ReadAllAsync`-Methode hinzugefügt, um alle `Receiver`-Entitäten asynchron zurückzugeben.
- Stellt sicher, dass alle Empfänger abgerufen werden, während die vorhandene Abfragelogik mit `ReadBy` erhalten bleibt.
2024-08-30 11:58:00 +02:00
Developer 02
a011b677ea refactor: EnvelopeReceiver-Klasse refaktoriert, um eine Endlosschleife zu verhindern und die Datenabfrage zu verbessern
- `EnvelopeReceiver` in `EnvelopeReceiver` und `EnvelopeReceiverBase` aufgeteilt, um zirkuläre Abhängigkeiten zu vermeiden.
- `EnvelopeReceiverBasicDto` für vereinfachte Datenübertragungsobjekte erstellt.
- `ReceiverRepository` aktualisiert, um den zuletzt verwendeten Empfängernamen durch das Laden aktueller `EnvelopeReceiver`-Daten einzubeziehen.
- `ReceiverReadDto` angepasst, um `LastUsedName` zu erhalten und `EnvelopeReceivers` für die JSON-Serialisierung zu ignorieren.
2024-08-30 11:27:36 +02:00
Developer 02
8831436809 feat(controller): add endpoint to retrieve last used receiver name by email
- Implemented `Get` endpoint in `EnvelopeReceiverController` to fetch the last used receiver's name by email.
- Added handling for successful and failed responses, including proper status codes and logging.
2024-08-29 17:15:00 +02:00
Developer 02
1ededc1f64 feat(service): add ReadLastUsedReceiverNameByMail method to IEnvelopeReceiverService and EnvelopeReceiverService
- Added `ReadLastUsedReceiverNameByMail` method to `IEnvelopeReceiverService` interface.
- Implemented `ReadLastUsedReceiverNameByMail` method in `EnvelopeReceiverService` to retrieve the last used receiver's name by email and handle results with `DataResult`.
2024-08-29 16:57:45 +02:00
Developer 02
183c94fd0a Merge branch 'master' into feat/signFlow-gen 2024-08-29 16:49:30 +02:00
Developer 02
a0a5568d93 feat(repository): Methode ReadLastByReceiver zu IEnvelopeReceiverRepository und EnvelopeReceiverRepository hinzugefügt
- Methode `ReadLastByReceiver` zum Interface `IEnvelopeReceiverRepository` hinzugefügt.
- Methode `ReadLastByReceiver` in `EnvelopeReceiverRepository` implementiert, um den letzten `EnvelopeReceiver` anhand der E-Mail-Adresse abzurufen.
2024-08-29 16:04:19 +02:00
37 changed files with 265 additions and 302 deletions

View File

@@ -1,6 +1,6 @@
using DigitalData.Core.DTO;
using DigitalData.EmailProfilerDispatcher.Abstraction.Contracts;
using EnvelopeGenerator.Application.DTOs;
using EnvelopeGenerator.Application.DTOs.EnvelopeReceiver;
using EnvelopeGenerator.Common;
namespace EnvelopeGenerator.Application.Contracts

View File

@@ -1,6 +1,6 @@
using DigitalData.Core.Abstractions.Application;
using DigitalData.Core.DTO;
using EnvelopeGenerator.Application.DTOs;
using EnvelopeGenerator.Application.DTOs.EnvelopeReceiver;
using EnvelopeGenerator.Domain.Entities;
namespace EnvelopeGenerator.Application.Contracts
@@ -25,5 +25,7 @@ namespace EnvelopeGenerator.Application.Contracts
Task<DataResult<bool>> IsExisting(string envelopeReceiverId);
Task<DataResult<IEnumerable<EnvelopeReceiverDto>>> ReadByUsernameAsync(string username, int? min_status = null, int? max_status = null, params int[] ignore_statuses);
Task<DataResult<string?>> ReadLastUsedReceiverNameByMail(string mail);
}
}

View File

@@ -0,0 +1,26 @@
using DigitalData.EmailProfilerDispatcher.Abstraction.Attributes;
namespace EnvelopeGenerator.Application.DTOs.EnvelopeReceiver
{
public record EnvelopeReceiverBasicDto()
{
public int EnvelopeId { get; init; }
public int ReceiverId { get; init; }
public int Sequence { get; init; }
[TemplatePlaceholder("[NAME_RECEIVER]")]
public string? Name { get; init; }
public string? JobTitle { get; init; }
public string? CompanyName { get; init; }
public string? PrivateMessage { get; init; }
public DateTime AddedWhen { get; init; }
public DateTime? ChangedWhen { get; init; }
}
}

View File

@@ -0,0 +1,11 @@
using EnvelopeGenerator.Application.DTOs.Receiver;
namespace EnvelopeGenerator.Application.DTOs.EnvelopeReceiver
{
public record EnvelopeReceiverDto() : EnvelopeReceiverBasicDto()
{
public EnvelopeDto? Envelope { get; set; }
public ReceiverReadDto? Receiver { get; set; }
}
}

View File

@@ -1,31 +0,0 @@
using DigitalData.EmailProfilerDispatcher.Abstraction.Attributes;
using EnvelopeGenerator.Application.DTOs.Receiver;
namespace EnvelopeGenerator.Application.DTOs
{
public record EnvelopeReceiverDto()
{
public int EnvelopeId { get; set; }
public int ReceiverId { get; set; }
public int Sequence { get; set; }
[TemplatePlaceholder("[NAME_RECEIVER]")]
public string? Name { get; set; }
public string? JobTitle { get; set; }
public string? CompanyName { get; set; }
public string? PrivateMessage { get; set; }
public DateTime AddedWhen { get; set; }
public DateTime? ChangedWhen { get; set; }
public EnvelopeDto? Envelope { get; set; }
public ReceiverReadDto? Receiver { get; set; }
}
}

View File

@@ -1,4 +1,6 @@
using DigitalData.Core.DTO;
using EnvelopeGenerator.Application.DTOs.EnvelopeReceiver;
using System.Text.Json.Serialization;
namespace EnvelopeGenerator.Application.DTOs.Receiver
{
@@ -6,6 +8,12 @@ namespace EnvelopeGenerator.Application.DTOs.Receiver
int Id,
string EmailAddress,
string Signature,
DateTime AddedWhen
) : BaseDTO<int>(Id);
DateTime AddedWhen
) : BaseDTO<int>(Id)
{
[JsonIgnore]
public IEnumerable<EnvelopeReceiverBasicDto>? EnvelopeReceivers { get; init; }
public string? LastUsedName => EnvelopeReceivers?.LastOrDefault()?.Name;
};
}

View File

@@ -14,7 +14,7 @@
<PackageReference Include="AutoMapper" Version="13.0.1" />
<PackageReference Include="DigitalData.Core.Abstractions" Version="1.0.1.1" />
<PackageReference Include="DigitalData.Core.Application" Version="1.0.0" />
<PackageReference Include="DigitalData.Core.DTO" Version="1.0.0" />
<PackageReference Include="DigitalData.Core.DTO" Version="1.0.0.1" />
<PackageReference Include="DigitalData.EmailProfilerDispatcher" Version="1.0.0" />
<PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="7.0.18" />
<PackageReference Include="UserManager.Application" Version="1.0.0" />

View File

@@ -1,6 +1,7 @@
using AutoMapper;
using EnvelopeGenerator.Application.DTOs;
using EnvelopeGenerator.Application.DTOs.EnvelopeHistory;
using EnvelopeGenerator.Application.DTOs.EnvelopeReceiver;
using EnvelopeGenerator.Application.DTOs.Receiver;
using EnvelopeGenerator.Domain.Entities;
@@ -43,6 +44,7 @@ namespace EnvelopeGenerator.Application.MappingProfiles
CreateMap<ReceiverCreateDto, Receiver>();
CreateMap<ReceiverUpdateDto, Receiver>();
CreateMap<UserReceiverDto, UserReceiver>();
CreateMap<EnvelopeReceiverBase, EnvelopeReceiverBasicDto>();
}
}
}

View File

@@ -210,9 +210,6 @@
<data name="UnexpectedError" xml:space="preserve">
<value>Ein unerwarteter Fehler ist aufgetreten.</value>
</data>
<data name="WelcomeToTheESignPortal" xml:space="preserve">
<value>Herzlich willkommen im eSign-Portal</value>
</data>
<data name="WrongAccessCode" xml:space="preserve">
<value>Ungültiger Zugangscode.</value>
</data>

View File

@@ -210,9 +210,6 @@
<data name="UnexpectedError" xml:space="preserve">
<value>An unexpected error has occurred.</value>
</data>
<data name="WelcomeToTheESignPortal" xml:space="preserve">
<value>Welcome to the eSign portal</value>
</data>
<data name="WrongAccessCode" xml:space="preserve">
<value>Invalid access code.</value>
</data>

View File

@@ -5,7 +5,7 @@ using DigitalData.EmailProfilerDispatcher.Abstraction.DTOs.EmailOut;
using DigitalData.EmailProfilerDispatcher.Abstraction.Services;
using DigitalData.UserManager.Application;
using EnvelopeGenerator.Application.Contracts;
using EnvelopeGenerator.Application.DTOs;
using EnvelopeGenerator.Application.DTOs.EnvelopeReceiver;
using EnvelopeGenerator.Common;
using Microsoft.Extensions.Localization;
using Microsoft.Extensions.Logging;
@@ -14,7 +14,7 @@ using static EnvelopeGenerator.Common.Constants;
namespace EnvelopeGenerator.Application.Services
{
public class EnvelopeMailService : EmailOutService, IEnvelopeMailService
public class EnvelopeMailService : EmailOutService, IEnvelopeMailService
{
private readonly IEmailTemplateService _tempService;
private readonly IEnvelopeReceiverService _envRcvService;

View File

@@ -2,7 +2,7 @@
using DigitalData.Core.Application;
using DigitalData.Core.DTO;
using EnvelopeGenerator.Application.Contracts;
using EnvelopeGenerator.Application.DTOs;
using EnvelopeGenerator.Application.DTOs.EnvelopeReceiver;
using EnvelopeGenerator.Application.Resources;
using EnvelopeGenerator.Domain.Entities;
using EnvelopeGenerator.Infrastructure.Contracts;
@@ -122,5 +122,11 @@ namespace EnvelopeGenerator.Application.Services
var dto_list = _mapper.MapOrThrow<IEnumerable<EnvelopeReceiverDto>>(er_list);
return Result.Success(dto_list);
}
public async Task<DataResult<string?>> ReadLastUsedReceiverNameByMail(string mail)
{
var er = await _repository.ReadLastByReceiver(mail);
return er is null ? Result.Fail<string?>().Notice(LogLevel.None, Flag.NotFound) : Result.Success(er.Name);
}
}
}

View File

@@ -1,45 +1,10 @@
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.ComponentModel.DataAnnotations.Schema;
namespace EnvelopeGenerator.Domain.Entities
{
[Table("TBSIG_ENVELOPE_RECEIVER", Schema = "dbo")]
public class EnvelopeReceiver
public class EnvelopeReceiver : EnvelopeReceiverBase
{
[Key]
[Column("ENVELOPE_ID")]
public int EnvelopeId { get; set; }
[Key]
[Column("RECEIVER_ID")]
public int ReceiverId { get; set; }
[Required]
[Column("SEQUENCE")]
public int Sequence { get; set; }
[Column("NAME", TypeName = "nvarchar(128)")]
public string? Name { get; set; }
[Column("JOB_TITLE", TypeName = "nvarchar(128)")]
public string? JobTitle { get; set; }
[Column("COMPANY_NAME", TypeName = "nvarchar(128)")]
public string? CompanyName { get; set; }
[Column("PRIVATE_MESSAGE", TypeName = "nvarchar(max)")]
public string? PrivateMessage { get; set; }
[Column("ACCESS_CODE", TypeName = "nvarchar(64)")]
public string? AccessCode { get; set; }
[Required]
[Column("ADDED_WHEN", TypeName = "datetime")]
public DateTime AddedWhen { get; set; }
[Column("CHANGED_WHEN", TypeName = "datetime")]
public DateTime? ChangedWhen { get; set; }
[ForeignKey("EnvelopeId")]
public Envelope? Envelope { get; set; }

View File

@@ -0,0 +1,43 @@
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
namespace EnvelopeGenerator.Domain.Entities
{
[Table("TBSIG_ENVELOPE_RECEIVER", Schema = "dbo")]
public class EnvelopeReceiverBase
{
[Key]
[Column("ENVELOPE_ID")]
public int EnvelopeId { get; set; }
[Key]
[Column("RECEIVER_ID")]
public int ReceiverId { get; set; }
[Required]
[Column("SEQUENCE")]
public int Sequence { get; set; }
[Column("NAME", TypeName = "nvarchar(128)")]
public string? Name { get; set; }
[Column("JOB_TITLE", TypeName = "nvarchar(128)")]
public string? JobTitle { get; set; }
[Column("COMPANY_NAME", TypeName = "nvarchar(128)")]
public string? CompanyName { get; set; }
[Column("PRIVATE_MESSAGE", TypeName = "nvarchar(max)")]
public string? PrivateMessage { get; set; }
[Column("ACCESS_CODE", TypeName = "nvarchar(64)")]
public string? AccessCode { get; set; }
[Required]
[Column("ADDED_WHEN", TypeName = "datetime")]
public DateTime AddedWhen { get; set; }
[Column("CHANGED_WHEN", TypeName = "datetime")]
public DateTime? ChangedWhen { get; set; }
}
}

View File

@@ -22,5 +22,7 @@ namespace EnvelopeGenerator.Domain.Entities
[Required]
[Column("ADDED_WHEN", TypeName = "datetime")]
public DateTime AddedWhen { get; set; }
public IEnumerable<EnvelopeReceiver>? EnvelopeReceivers { get; init; }
}
}

View File

@@ -37,19 +37,19 @@ export class ReceiverInputComponent implements OnInit, OnChanges {
private setupFiltering(): void {
this.filteredOptions = this.control.valueChanges.pipe(
startWith(''),
map(value => this.filter(value || '', this.options)),
map(value => this.filter(value || '', this.options, this.index)),
);
}
control = new FormControl('');
filteredOptions!: Observable<string[]>;
@Input() options: string[] = [];
@Input() filter: (value: string, options: string[]) => string[] = value => {
@Input() filter: (value: string, options: string[], index?: number) => string[] = value => {
const filterValue = value.toLowerCase();
return this.options.filter(option => option.toLowerCase().includes(filterValue));
}
@Input() index?: number;
public get text(): string {
return this.control.value || '';

View File

@@ -1,8 +1,8 @@
<table mat-table [dataSource]="receiverData" class="mat-elevation-z8">
<ng-container matColumnDef="email">
<th mat-header-cell *matHeaderCellDef> Email </th>
<td mat-cell *matCellDef="let element">
<receiver-input [options]="receiver_mails" [filter]="receiver_filter"></receiver-input>
<td mat-cell *matCellDef="let element; let i = index">
<receiver-input [options]="receiver_mails" [filter]="receiver_filter" [index]="i"></receiver-input>
</td>
</ng-container>

View File

@@ -34,24 +34,39 @@ export class ReceiverTableComponent implements OnInit {
constructor(private receiverService: ReceiverService) { }
async ngOnInit() {
this.receiver_mails = await this.receiverService.getReceiverAsync().then((receivers: any[]) => receivers.map(r => r.emailAddress));
const receivers = await this.receiverService.getReceiverAsync();
this.receiver_mails = receivers.map((r: any) => r.emailAddress);
this.last_used_name = receivers.reduce((acc: any, r: any) => {
acc[r.emailAddress] = r.lastUsedName;
return acc;
}, {} as { [key: string]: string | null });
}
receiver_filter: (value: string, options: string[]) => string[] = (value, options) => {
receiver_filter: (value: string, options: string[], index?: number) => string[] = (value, options, index) => {
const filterValue = value.toLowerCase();
// set the name if it is used befor
const name = this.last_used_name[value];
if (name && index)
this.receiverData.at(index)!.name = name
// !!! do not allow email duplication !!!
var similarMails = this.receiver_mails.filter(m => m.toLocaleLowerCase() === value.toLocaleLowerCase() && m !== value)
if (similarMails.length > 0 && index != undefined) {
this.receiverInputs[index].text = similarMails[0];
}
console.log(this.receiverInputs.length + " - " + index)
// if added into last row
if (value.length > 0 && (this.receiverInputs.at(-1)?.lenght ?? 0) > 0) {
this.receiverData.at(-1)!.accessCode = generateAccessCode();
this.receiverData.push({ email: "", name: "", accessCode: "" });
this.update();
}
else if (value.length == 0) {
for (var i = 0; i < this.receiverInputs.length - 1; i++) {
if (this.receiverInputs[i].lenght === 0) {
this.receiverData.splice(i, 1);
this.update();
}
// delete the row with out mail
else if (value.length === 0 && this.receiverInputs.length - 1 !== index) {
if ( this.receiverInputs.length > 1 && this.receiverInputs[index!]?.lenght === 0) {
this.receiverData.splice(index!, 1);
this.update();
}
}
@@ -59,6 +74,7 @@ export class ReceiverTableComponent implements OnInit {
}
receiver_mails: string[] = [];
last_used_name: { [key: string]: string | null } = {};
@ViewChildren(ReceiverInputComponent) receiverInputsQueryList!: QueryList<ReceiverInputComponent>;
get receiverInputs(): ReceiverInputComponent[] {

View File

@@ -6,6 +6,7 @@ using Microsoft.AspNetCore.Mvc;
namespace EnvelopeGenerator.GeneratorAPI.Controllers
{
[Route("api/[controller]")]
[Authorize]
[ApiController]
public class EnvelopeReceiverController : ControllerBase
{
@@ -17,8 +18,7 @@ namespace EnvelopeGenerator.GeneratorAPI.Controllers
_logger = logger;
_erService = envelopeReceiverService;
}
[Authorize]
[HttpGet]
public async Task<IActionResult> GetEnvelopeReceiver([FromQuery] int? min_status = null, [FromQuery] int? max_status = null, [FromQuery] int[]? ignore_status = null)
{
@@ -49,5 +49,28 @@ namespace EnvelopeGenerator.GeneratorAPI.Controllers
return new StatusCodeResult(StatusCodes.Status500InternalServerError);
}
}
[HttpGet("receiver-name/{mail}")]
public async Task<IActionResult> GetReceiverName([FromRoute] string mail)
{
try
{
return await _erService.ReadLastUsedReceiverNameByMail(mail).ThenAsync(
Success: res => res is null ? Ok(string.Empty) : Ok(res),
Fail: IActionResult (msg, ntc) =>
{
if (ntc.HasFlag(Flag.NotFound))
return NotFound();
_logger.LogNotice(ntc);
return StatusCode(StatusCodes.Status500InternalServerError);
});
}
catch(Exception ex)
{
_logger.LogError(ex, "{message}", ex.Message);
return StatusCode(StatusCodes.Status500InternalServerError);
}
}
}
}

View File

@@ -20,5 +20,7 @@ namespace EnvelopeGenerator.Infrastructure.Contracts
Task<string?> ReadAccessCodeByIdAsync(int envelopeId, int receiverId);
Task<IEnumerable<EnvelopeReceiver>> ReadByUsernameAsync(string username, int? min_status = null, int? max_status = null, params int[] ignore_statuses);
Task<EnvelopeReceiver?> ReadLastByReceiver(string email);
}
}

View File

@@ -1,5 +1,4 @@
using DigitalData.Core.Infrastructure;
using DigitalData.UserManager.Infrastructure.Repositories;
using EnvelopeGenerator.Domain.Entities;
using EnvelopeGenerator.Infrastructure.Contracts;
using Microsoft.EntityFrameworkCore;
@@ -76,5 +75,10 @@ namespace EnvelopeGenerator.Infrastructure.Repositories
return await query.Include(er => er.Envelope).Include(er => er.Receiver).ToListAsync();
}
public async Task<EnvelopeReceiver?> ReadLastByReceiver(string email)
{
return await _dbSet.Where(er => er.Receiver!.EmailAddress == email).OrderBy(er => er.EnvelopeId).LastOrDefaultAsync();
}
}
}

View File

@@ -11,7 +11,7 @@ namespace EnvelopeGenerator.Infrastructure.Repositories
{
}
protected IQueryable<Receiver> ReadBy(string? emailAddress = null, string? signature = null)
protected IQueryable<Receiver> ReadBy(string? emailAddress = null, string? signature = null, bool withLastUsedName = true)
{
IQueryable<Receiver> query = _dbSet.AsNoTracking();
@@ -21,9 +21,17 @@ namespace EnvelopeGenerator.Infrastructure.Repositories
if(signature is not null)
query = query.Where(r => r.Signature == signature);
// envelope receivers are ignored (with '[JsonIgnore]' attribute). The reson to add them is to get the las used receiver name
if (withLastUsedName)
{
query = query.Include(r => r.EnvelopeReceivers!.OrderByDescending(er => er.EnvelopeId).Take(1));
}
return query;
}
public async Task<Receiver?> ReadByAsync(string? emailAddress = null, string? signature = null) => await ReadBy(emailAddress, signature).FirstOrDefaultAsync();
public async override Task<IEnumerable<Receiver>> ReadAllAsync() => await ReadBy().ToListAsync();
}
}

View File

@@ -10,11 +10,11 @@ using DigitalData.Core.API;
using EnvelopeGenerator.Application;
using Microsoft.Extensions.Localization;
using DigitalData.Core.DTO;
using EnvelopeGenerator.Application.DTOs;
using Microsoft.AspNetCore.Localization;
using System.Text.Encodings.Web;
using EnvelopeGenerator.Web.Models;
using EnvelopeGenerator.Application.Resources;
using EnvelopeGenerator.Application.DTOs.EnvelopeReceiver;
namespace EnvelopeGenerator.Web.Controllers
{

View File

@@ -1,12 +1,12 @@
using DigitalData.Core.DTO;
using EnvelopeGenerator.Application.Contracts;
using EnvelopeGenerator.Application.DTOs;
using EnvelopeGenerator.Application.DTOs.EnvelopeReceiver;
using Microsoft.AspNetCore.Mvc;
using System.Net;
namespace EnvelopeGenerator.Web.Controllers.Test
{
[ApiController]
[ApiController]
[Route("api/test/[controller]")]
public class TestEnvelopeMailController : ControllerBase
{

View File

@@ -1,10 +1,10 @@
using DigitalData.Core.API;
using DigitalData.Core.DTO;
using EnvelopeGenerator.Application.Contracts;
using EnvelopeGenerator.Application.DTOs;
using EnvelopeGenerator.Application;
using EnvelopeGenerator.Domain.Entities;
using Microsoft.AspNetCore.Mvc;
using EnvelopeGenerator.Application.DTOs.EnvelopeReceiver;
namespace EnvelopeGenerator.Web.Controllers.Test
{

View File

@@ -5,13 +5,9 @@
ViewData["Title"] = _localizer[WebKey.DocProtected];
var userCulture = ViewData["UserCulture"] as Culture;
}
<div class="page container py-4 px-4">
<div class="page container py-5 px-2">
<header class="text-center">
<div class="header-1 alert alert-secondary" role="alert">
<h3 class="text">@_localizer[WebKey.WelcomeToTheESignPortal]</h3>
<img class="cursor-logo" src="/img/cursor_logo.png" />
</div>
<div class="icon locked mt-4 mb-1">
<div class="icon locked">
<svg xmlns="http://www.w3.org/2000/svg" width="72" height="72" fill="currentColor" class="bi bi-shield-lock" viewBox="0 0 16 16">
<path d="M5.338 1.59a61 61 0 0 0-2.837.856.48.48 0 0 0-.328.39c-.554 4.157.726 7.19 2.253 9.188a10.7 10.7 0 0 0 2.287 2.233c.346.244.652.42.893.533q.18.085.293.118a1 1 0 0 0 .101.025 1 1 0 0 0 .1-.025q.114-.034.294-.118c.24-.113.547-.29.893-.533a10.7 10.7 0 0 0 2.287-2.233c1.527-1.997 2.807-5.031 2.253-9.188a.48.48 0 0 0-.328-.39c-.651-.213-1.75-.56-2.837-.855C9.552 1.29 8.531 1.067 8 1.067c-.53 0-1.552.223-2.662.524zM5.072.56C6.157.265 7.31 0 8 0s1.843.265 2.928.56c1.11.3 2.229.655 2.887.87a1.54 1.54 0 0 1 1.044 1.262c.596 4.477-.787 7.795-2.465 9.99a11.8 11.8 0 0 1-2.517 2.453 7 7 0 0 1-1.048.625c-.28.132-.581.24-.829.24s-.548-.108-.829-.24a7 7 0 0 1-1.048-.625 11.8 11.8 0 0 1-2.517-2.453C1.928 10.487.545 7.169 1.141 2.692A1.54 1.54 0 0 1 2.185 1.43 63 63 0 0 1 5.072.56" />
<path d="M9.5 6.5a1.5 1.5 0 0 1-1 1.415l.385 1.99a.5.5 0 0 1-.491.595h-.788a.5.5 0 0 1-.49-.595l.384-1.99a1.5 1.5 0 1 1 2-1.415" />

View File

@@ -4,10 +4,10 @@
@{
var nonce = _accessor.HttpContext?.Items["csp-nonce"] as string;
}
@using DigitalData.Core.DTO;
@using EnvelopeGenerator.Application.DTOs;
@using Newtonsoft.Json
@using Newtonsoft.Json.Serialization
@ using DigitalData.Core.DTO;
@ using EnvelopeGenerator.Application.DTOs;
@ using Newtonsoft.Json
@ using Newtonsoft.Json.Serialization
@model EnvelopeReceiverDto;
<partial name="_CookieConsentPartial" />
@{

View File

@@ -1,10 +1,10 @@
@{
var nonce = _accessor.HttpContext?.Items["csp-nonce"] as string;
}
@using DigitalData.Core.DTO;
@using EnvelopeGenerator.Application.DTOs;
@using Newtonsoft.Json
@using Newtonsoft.Json.Serialization
@ using DigitalData.Core.DTO;
@ using EnvelopeGenerator.Application.DTOs;
@ using Newtonsoft.Json
@ using Newtonsoft.Json.Serialization
@model EnvelopeReceiverDto;
@{
ViewData["Title"] = _localizer[WebKey.SignDoc];
@@ -21,43 +21,40 @@
}
<div class="d-flex flex-column min-vh-100">
<nav class="navbar navbar-light bg-light">
<div class="container">
<div class="container-fluid">
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarToggleExternalContent" aria-controls="navbarToggleExternalContent" aria-expanded="false" aria-label="Toggle navigation">
<span class="material-symbols-outlined">
more_vert
</span>
<span class="navbar-toggler-icon"></span>
</button>
<div class="envelope-message">
<span class="icon material-symbols-outlined">history_edu</span>
<span class="message navbar-brand">@($"{_localizer[WebKey.Hello]} {Model.Name}, {@envelope?.Message}".TrySanitize(_sanitizer))</span>
</div>
<div class="logo">
<img class="cursor-img" src="~/img/cursor_logo.png" alt="...">
<div class="navbar-brand me-auto ms-5 envelope-message">@($"{_localizer[WebKey.Hello]} {Model.Name}, {@envelope?.Message}".TrySanitize(_sanitizer))</div>
<div class="col-1 p-0 m-0 me-3 d-flex">
<img src="~/img/digital_data.svg" alt="...">
</div>
</div>
</nav>
<div class="collapse show bg-light " id="navbarToggleExternalContent" data-bs-theme="light">
<div class="card sender-card p-1 mb-3">
<div class="row g-0">
<div class="col p-0 m-0">
<div class="card-body p-0 m-0 ms-4">
<h5 class="card-title p-0 m-0">
<span class="signature-process-title">@($"{_localizer[WebKey.SigningProcessTitle]}: ".TrySanitize(_sanitizer))</span>
<span class="signature-process-name">@($"{envelope?.Title}".TrySanitize(_sanitizer))</span>
</h5>
<p class="card-text p-0 m-0">@Html.Raw(string.Format(_localizer[WebKey.EnvelopeInfo1], pages.Count(), stPageIndexes).TrySanitize(_hlSanitizer))</p>
<p class="card-text p-0 m-0">
<small class="text-body-secondary">
@Html.Raw(string.Format(_localizer[WebKey.EnvelopeInfo2], /* sanitize separately but don't sanitize the URI */
envelope?.AddedWhen.ToString(userCulture?.Info?.DateTimeFormat).TrySanitize(_sanitizer),
$"{sender?.Prename} {sender?.Name}".TrySanitize(_sanitizer),
sender?.Email.TrySanitize(_sanitizer),
envelope?.Title.TrySanitize(_sanitizer),
sender?.Prename.TrySanitize(_sanitizer),
sender?.Name.TrySanitize(_sanitizer),
sender?.Email.TrySanitize(_sanitizer)))
</small>
</p>
<div class="collapse show" id="navbarToggleExternalContent" data-bs-theme="light">
<div class="bg-light p-1">
<div class="card sender-card mb-3">
<div class="row g-0">
<div class="col p-0 m-0">
<div class="card-body p-0 m-0 ms-4">
<h5 class="card-title p-0 m-0">
<span class="signature-process-title">@($"{_localizer[WebKey.SigningProcessTitle]}: ".TrySanitize(_sanitizer))</span>
<span class="signature-process-name">@($"{envelope?.Title}".TrySanitize(_sanitizer))</span>
</h5>
<p class="card-text p-0 m-0">@Html.Raw(string.Format(_localizer[WebKey.EnvelopeInfo1], pages.Count(), stPageIndexes).TrySanitize(_hlSanitizer))</p>
<p class="card-text p-0 m-0">
<small class="text-body-secondary">
@Html.Raw(string.Format(_localizer[WebKey.EnvelopeInfo2], /* sanitize separately but don't sanitize the URI */
envelope?.AddedWhen.ToString(userCulture?.Info?.DateTimeFormat).TrySanitize(_sanitizer),
$"{sender?.Prename} {sender?.Name}".TrySanitize(_sanitizer),
sender?.Email.TrySanitize(_sanitizer),
envelope?.Title.TrySanitize(_sanitizer),
sender?.Prename.TrySanitize(_sanitizer),
sender?.Name.TrySanitize(_sanitizer),
sender?.Email.TrySanitize(_sanitizer)))
</small>
</p>
</div>
</div>
</div>
</div>

View File

@@ -13,20 +13,12 @@
<link rel="stylesheet" href="~/lib/bootstrap/dist/css/bootstrap.min.css" />
<link rel="stylesheet" href="~/lib/sweetalert2/sweetalert2.min.css" />
<link rel="stylesheet" href="~/css/site.min.css" asp-append-version="true" />
<link rel="stylesheet" href="~/css/cursor.min.css" asp-append-version="true" />
<link rel="stylesheet" href="~/EnvelopeGenerator.Web.styles.css" asp-append-version="true" />
<link rel="stylesheet" href="~/lib/flag-icons-main/css/flag-icons.min.css" asp-append-version="true" />
<link rel="stylesheet" href="~/lib/alertifyjs/css/alertify.min.css" />
<link rel="stylesheet" href="~/lib/alertifyjs/css/themes/default.min.css" />
<link href="https://fonts.googleapis.com/icon?family=Material+Symbols+Outlined" rel="stylesheet">
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL,GRAD@24,400,0,0" />
</head>
<body>
<style>
.material-symbols-outlined {
font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24
}
</style>
@if (ViewData["EnvelopeKey"] is string envelopeKey)
{
<script nonce="@nonce">const ENV_KEY = "@envelopeKey.TrySanitize(_sanitizer)"</script>

View File

@@ -33,6 +33,5 @@
public static readonly string RejectionInfo1_ext = nameof(RejectionInfo1_ext);
public static readonly string RejectionInfo2_ext = nameof(RejectionInfo2_ext);
public static readonly string SigningProcessTitle = nameof(SigningProcessTitle);
public static readonly string WelcomeToTheESignPortal = nameof(WelcomeToTheESignPortal);
}
}

View File

@@ -20,9 +20,9 @@
"Content-Security-Policy": [ // The first format parameter {0} will be replaced by the nonce value.
"default-src 'self'",
"script-src 'self' 'nonce-{0}' 'unsafe-eval'",
"style-src 'self' 'unsafe-inline' https://fonts.googleapis.com:*",
"style-src 'self' 'unsafe-inline'",
"img-src 'self' data: https: blob:",
"font-src 'self' https://fonts.gstatic.com:*",
"font-src 'self'",
"connect-src 'self' https://nominatim.openstreetmap.org:* http://localhost:* https://localhost:* ws://localhost:* wss://localhost:* blob:",
"frame-src 'self'",
"media-src 'self'",

View File

@@ -58,11 +58,5 @@
"inputFiles": [
"wwwroot/lib/bootstrap-cookie-consent-settings-main/bootstrap-cookie-consent-settings.js"
]
},
{
"outputFileName": "wwwroot/css/cursor.min.css",
"inputFiles": [
"wwwroot/css/cursor.css"
]
}
]

View File

@@ -1,8 +0,0 @@
.cursor-logo {
width: 7rem;
padding-top: 1rem;
}
.cursor-img {
width: 5rem;
}

View File

@@ -1 +0,0 @@
.cursor-logo{width:7rem;padding-top:1rem}.cursor-img{width:5rem}

View File

@@ -10,15 +10,12 @@
height: 80vh;
}
.navbar-toggler {
border: 0;
}
.btn-group {
margin-right: 10vw;
margin-bottom: 10vh;
}
.btn_refresh, .btn_reject, .btn_complete {
height:2.5rem;
}
@@ -166,43 +163,8 @@ footer#page-footer {
border-radius: 3.125rem;
}
.navbar .container {
display: flex;
padding: 0;
margin: 0;
}
.navbar-toggler {
padding: 0;
margin: 0;
width: 4rem;
left: 0;
}
.envelope-message {
position: absolute;
display: flex;
width: calc(100% - 8rem);
align-items: center;
justify-content: start;
margin-left: 4rem;
}
.envelope-message .icon {
margin-right: 0.5rem;
}
.envelope-message .message {
font-family: 'Roboto', sans-serif;
font-size: 16px;
font-weight: 550;
}
.logo {
width: 5rem;
position: absolute;
right: 0;
margin-right:2rem;
}
.none-display {
@@ -262,79 +224,18 @@ footer#page-footer {
z-index: 1050;
}
.header-1 {
align-items: center;
justify-content: space-between;
margin-top:0;
padding-top: 0;
}
.header-1 .text {
text-align: center;
margin-left: 1.5vw;
margin-top:0;
padding-top: 0;
}
.header-1 .logo {
width: 9rem;
margin-top:0;
padding-top: 0;
}
/* styles for mobile responsiveness */
@media (max-height: 850px) {
.navbar .container {
display: flex;
padding: 0;
margin: 0;
}
.navbar-toggler {
padding: 0;
margin: 0;
width: 4rem;
left: 0;
}
.envelope-message {
width: calc(100% - 4rem -9rem);
}
.envelope-message .message {
font-size: 14px;
font-weight: 550;
}
.logo {
width: 9rem;
position: absolute;
right: 0;
margin-right: 0rem;
}
.card-text, .card-text {
font-size: 0.6rem; /* Font size reduced */
margin: 0rem;
padding: 0rem;
}
.highlight {
font-weight: 700;
font-size: 0.5rem;
}
.signature-process-title, .signature-process-name {
font-size: 0.7rem;
}
}
@media (max-width: 767px) {
.navbar {
flex-direction: column;
align-items: flex-start;
}
.navbar-toggler {
transform: scale(0.75);
padding: 0;
}
.navbar-brand {
font-size: 0.5rem;
text-align: center;
@@ -342,25 +243,14 @@ footer#page-footer {
text-overflow: ellipsis;
}
.envelope-message {
width: calc(100% - 4rem - 4.5rem);
margin-left: 3rem;
.collapse .card-text, .collapsing .card-text {
font-size: 0.6rem; /* Font size reduced */
margin: 0rem;
padding: 0rem;
}
.envelope-message .message {
font-size: 12px;
font-weight: 550;
}
.envelope-message .icon {
margin-right: 0.1rem;
font-size: 1rem
}
.logo {
width: 5rem;
right: 0;
margin-right: 1rem;
.sender-card .card-body {
padding: 0.5rem;
}
.btn_group {
@@ -376,6 +266,10 @@ footer#page-footer {
display: none;
}
img {
max-width: 4rem;
}
.page {
margin-top: 1rem;
max-width: 90%;
@@ -385,10 +279,29 @@ footer#page-footer {
.page section {
max-width: 90%;
}
}
@media (max-height: 600px) {
.collapse {
height: 4rem;
.highlight {
font-weight: 700;
font-size: 0.5rem;
}
.signature-process-title, .signature-process-name {
font-size: 0.7rem;
}
}
@media (max-height: 850px) {
.collapse .card-text, .collapsing .card-text {
font-size: 0.5rem; /* Font size reduced */
margin: 0rem;
padding: 0rem;
}
.highlight {
font-weight: 700;
font-size: 0.5rem;
}
.signature-process-title, .signature-process-name {
font-size: 0.7rem;
}
}

View File

@@ -1 +1 @@
#app{background:#808080;width:100vw;height:80vh}.navbar-toggler{border:0}.btn-group{margin-right:10vw;margin-bottom:10vh}.btn_refresh,.btn_reject,.btn_complete{height:2.5rem}.btn_complete .icon,.btn_reject .icon,.btn_refresh .icon{width:1.1rem}.btn_complete span,.btn_reject span,.btn_refresh span{vertical-align:middle}.button-finish{transition:background-color linear 300ms;background-color:#059669;color:#fff;border-left:0}.button-finish:hover,.button-finish:focus,.button-finish:active{background-color:#10b981;color:#fff}.button-reject{transition:background-color linear 300ms;background-color:#d97706;color:#fff;border-left:0}.button-reject:hover,.button-reject:focus,.button-reject:active{background-color:#f59e0b;color:#fff}.button-reset{transition:background-color linear 300ms;background-color:#2563eb;color:#fff;border-left:0}.button-reset:hover,.button-reset:focus,.button-reset:active{background-color:#3b82f6;color:#fff}body{background-color:#bbb}.page{margin-top:3rem;background:#fff;border-radius:.313rem;box-shadow:rgba(9,30,66,.25) 0 .25rem .5rem -.125rem,rgba(9,30,66,.08) 0 0 0 .063rem;max-width:40rem}.page section{max-width:30rem;margin:0 auto}.page header .icon{display:inline-block;border-radius:6.25rem;padding:.938rem;margin-bottom:2rem}.page header .icon.admin{background-color:#331904;color:#fecba1}.page header .icon.locked{background-color:#ffc107;color:#000}.page header .icon.signed{background-color:#146c43;color:#fff}.page header .icon.rejected{background-color:#e4d8d5;color:#fff}.page .form{max-width:30rem;margin:2rem auto;display:flex;gap:1rem}#form-access-code>.input,#form-admin-password>.input{flex-grow:1}#page-admin header .icon{background-color:#331904;color:#fecba1}.envelope{display:block;border:.063rem solid #eee;margin-bottom:1rem;padding:.5rem}footer#page-footer{color:#333;max-width:40rem;margin-top:1rem;font-size:.85rem}footer#page-footer a,footer#page-footer a:link,footer#page-footer a:hover,footer#page-footer a:visited,footer#page-footer a:focus{color:#444}.sender-card{background-color:transparent;border:0}.sender-card .row{height:7vh}.sender-card img{height:7vh;background-color:#d1cfcf;border-radius:3.125rem}.navbar .container{display:flex;padding:0;margin:0}.navbar-toggler{padding:0;margin:0;width:4rem;left:0}.envelope-message{position:absolute;display:flex;width:calc(100% - 8rem);align-items:center;justify-content:start;margin-left:4rem}.envelope-message .icon{margin-right:.5rem}.envelope-message .message{font-family:'Roboto',sans-serif;font-size:16px;font-weight:550}.logo{width:5rem;position:absolute;right:0;margin-right:2rem}.none-display{display:none}.dropdown-flag img,.img-flag{width:30%;height:70%}.dropdown-flag{height:75%;width:75%}.increase-dropdown-height{min-height:25rem}.dropdown-flag .select2-container{width:100%!important;max-width:11.25rem}.lang-item{font-size:.85rem}#langDropdownMenuButton{min-width:4vw}.highlight{font-weight:700;font-size:.85rem}.signature-process-title,.signature-process-name{font-size:1.125rem}.mail-link{color:#000;text-decoration:none}.mail-link:hover{text-decoration:underline}#flex-action-panel{z-index:1050}.header-1{align-items:center;justify-content:space-between;margin-top:0;padding-top:0}.header-1 .text{text-align:center;margin-left:1.5vw;margin-top:0;padding-top:0}.header-1 .logo{width:9rem;margin-top:0;padding-top:0}@media(max-height:850px){.navbar .container{display:flex;padding:0;margin:0}.navbar-toggler{padding:0;margin:0;width:4rem;left:0}.envelope-message{width:calc(100% - 4rem - 9rem)}.envelope-message .message{font-size:14px;font-weight:550}.logo{width:9rem;position:absolute;right:0;margin-right:0}.card-text,.card-text{font-size:.6rem;margin:0;padding:0}.highlight{font-weight:700;font-size:.5rem}.signature-process-title,.signature-process-name{font-size:.7rem}}@media(max-width:767px){.navbar{flex-direction:column;align-items:flex-start}.navbar-brand{font-size:.5rem;text-align:center;overflow:hidden;text-overflow:ellipsis}.envelope-message{width:calc(100% - 4rem - 4.5rem);margin-left:3rem}.envelope-message .message{font-size:12px;font-weight:550}.envelope-message .icon{margin-right:.1rem;font-size:1rem}.logo{width:5rem;right:0;margin-right:1rem}.btn_group{position:fixed;flex-direction:row;bottom:.5rem;right:.5rem}.img-fluid{width:1.2rem;height:100%;display:none}.page{margin-top:1rem;max-width:90%;padding:.5rem}.page section{max-width:90%}}@media(max-height:600px){.collapse{height:4rem}}
#app{background:#808080;width:100vw;height:80vh}.btn-group{margin-right:10vw;margin-bottom:10vh}.btn_refresh,.btn_reject,.btn_complete{height:2.5rem}.btn_complete .icon,.btn_reject .icon,.btn_refresh .icon{width:1.1rem}.btn_complete span,.btn_reject span,.btn_refresh span{vertical-align:middle}.button-finish{transition:background-color linear 300ms;background-color:#059669;color:#fff;border-left:0}.button-finish:hover,.button-finish:focus,.button-finish:active{background-color:#10b981;color:#fff}.button-reject{transition:background-color linear 300ms;background-color:#d97706;color:#fff;border-left:0}.button-reject:hover,.button-reject:focus,.button-reject:active{background-color:#f59e0b;color:#fff}.button-reset{transition:background-color linear 300ms;background-color:#2563eb;color:#fff;border-left:0}.button-reset:hover,.button-reset:focus,.button-reset:active{background-color:#3b82f6;color:#fff}body{background-color:#bbb}.page{margin-top:3rem;background:#fff;border-radius:.313rem;box-shadow:rgba(9,30,66,.25) 0 .25rem .5rem -.125rem,rgba(9,30,66,.08) 0 0 0 .063rem;max-width:40rem}.page section{max-width:30rem;margin:0 auto}.page header .icon{display:inline-block;border-radius:6.25rem;padding:.938rem;margin-bottom:2rem}.page header .icon.admin{background-color:#331904;color:#fecba1}.page header .icon.locked{background-color:#ffc107;color:#000}.page header .icon.signed{background-color:#146c43;color:#fff}.page header .icon.rejected{background-color:#e4d8d5;color:#fff}.page .form{max-width:30rem;margin:2rem auto;display:flex;gap:1rem}#form-access-code>.input,#form-admin-password>.input{flex-grow:1}#page-admin header .icon{background-color:#331904;color:#fecba1}.envelope{display:block;border:.063rem solid #eee;margin-bottom:1rem;padding:.5rem}footer#page-footer{color:#333;max-width:40rem;margin-top:1rem;font-size:.85rem}footer#page-footer a,footer#page-footer a:link,footer#page-footer a:hover,footer#page-footer a:visited,footer#page-footer a:focus{color:#444}.sender-card{background-color:transparent;border:0}.sender-card .row{height:7vh}.sender-card img{height:7vh;background-color:#d1cfcf;border-radius:3.125rem}.envelope-message{font-family:'Roboto',sans-serif}.none-display{display:none}.dropdown-flag img,.img-flag{width:30%;height:70%}.dropdown-flag{height:75%;width:75%}.increase-dropdown-height{min-height:25rem}.dropdown-flag .select2-container{width:100%!important;max-width:11.25rem}.lang-item{font-size:.85rem}#langDropdownMenuButton{min-width:4vw}.highlight{font-weight:700;font-size:.85rem}.signature-process-title,.signature-process-name{font-size:1.125rem}.mail-link{color:#000;text-decoration:none}.mail-link:hover{text-decoration:underline}#flex-action-panel{z-index:1050}@media(max-width:767px){.navbar{flex-direction:column;align-items:flex-start}.navbar-toggler{transform:scale(.75);padding:0}.navbar-brand{font-size:.5rem;text-align:center;overflow:hidden;text-overflow:ellipsis}.collapse .card-text,.collapsing .card-text{font-size:.6rem;margin:0;padding:0}.sender-card .card-body{padding:.5rem}.btn_group{position:fixed;flex-direction:row;bottom:.5rem;right:.5rem}.img-fluid{width:1.2rem;height:100%;display:none}img{max-width:4rem}.page{margin-top:1rem;max-width:90%;padding:.5rem}.page section{max-width:90%}.highlight{font-weight:700;font-size:.5rem}.signature-process-title,.signature-process-name{font-size:.7rem}}@media(max-height:850px){.collapse .card-text,.collapsing .card-text{font-size:.5rem;margin:0;padding:0}.highlight{font-weight:700;font-size:.5rem}.signature-process-title,.signature-process-name{font-size:.7rem}}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 68 KiB