Compare commits

...

2 Commits

15 changed files with 119 additions and 56 deletions

View File

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

View File

@@ -1,7 +1,5 @@
using DigitalData.EmailProfilerDispatcher.Domain.Attributes; using DigitalData.EmailProfilerDispatcher.Abstraction.Attributes;
using DigitalData.UserManager.Application.DTOs.User; using DigitalData.UserManager.Application.DTOs.User;
using DigitalData.UserManager.Domain.Entities;
using EnvelopeGenerator.Application.DTOs.EnvelopeHistory;
using EnvelopeGenerator.Domain.Entities; using EnvelopeGenerator.Domain.Entities;
namespace EnvelopeGenerator.Application.DTOs namespace EnvelopeGenerator.Application.DTOs

View File

@@ -1,6 +1,4 @@
using DigitalData.EmailProfilerDispatcher.Domain.Attributes; using DigitalData.EmailProfilerDispatcher.Abstraction.Attributes;
using System.ComponentModel.DataAnnotations.Schema;
using System.Text.Json.Serialization;
namespace EnvelopeGenerator.Application.DTOs namespace EnvelopeGenerator.Application.DTOs
{ {

View File

@@ -12,10 +12,12 @@
<ItemGroup> <ItemGroup>
<PackageReference Include="AutoMapper" Version="13.0.1" /> <PackageReference Include="AutoMapper" Version="13.0.1" />
<PackageReference Include="DigitalData.Core.Abstractions" Version="1.0.0" /> <PackageReference Include="DigitalData.Core.Abstractions" Version="1.0.1.1" />
<PackageReference Include="DigitalData.Core.API" Version="1.0.2.1" />
<PackageReference Include="DigitalData.Core.Application" Version="1.0.0" /> <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" />
<PackageReference Include="DigitalData.Core.Infrastructure" Version="1.0.0" /> <PackageReference Include="DigitalData.Core.Infrastructure" Version="1.0.1.1" />
<PackageReference Include="DigitalData.EmailProfilerDispatcher" Version="1.0.0" />
<PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="7.0.18" /> <PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="7.0.18" />
</ItemGroup> </ItemGroup>
@@ -24,15 +26,6 @@
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<Reference Include="DigitalData.EmailProfilerDispatcher.Application">
<HintPath>..\..\EmailProfilerDispatcher\DigitalData.EmailProfilerDispatcher.Application\bin\Debug\net7.0\DigitalData.EmailProfilerDispatcher.Application.dll</HintPath>
</Reference>
<Reference Include="DigitalData.EmailProfilerDispatcher.Domain">
<HintPath>..\..\EmailProfilerDispatcher\DigitalData.EmailProfilerDispatcher.Application\bin\Debug\net7.0\DigitalData.EmailProfilerDispatcher.Domain.dll</HintPath>
</Reference>
<Reference Include="DigitalData.EmailProfilerDispatcher.Infrastructure">
<HintPath>..\..\EmailProfilerDispatcher\DigitalData.EmailProfilerDispatcher.Application\bin\Debug\net7.0\DigitalData.EmailProfilerDispatcher.Infrastructure.dll</HintPath>
</Reference>
<Reference Include="DigitalData.UserManager.Application"> <Reference Include="DigitalData.UserManager.Application">
<HintPath>..\..\WebUserManager\DigitalData.UserManager.Application\bin\Debug\net7.0\DigitalData.UserManager.Application.dll</HintPath> <HintPath>..\..\WebUserManager\DigitalData.UserManager.Application\bin\Debug\net7.0\DigitalData.UserManager.Application.dll</HintPath>
</Reference> </Reference>

View File

@@ -1,8 +1,8 @@
using AutoMapper; using AutoMapper;
using DigitalData.Core.DTO; using DigitalData.Core.DTO;
using DigitalData.EmailProfilerDispatcher.Application.DTOs.EmailOut; using DigitalData.EmailProfilerDispatcher.Abstraction.Contracts;
using DigitalData.EmailProfilerDispatcher.Application.Services; using DigitalData.EmailProfilerDispatcher.Abstraction.DTOs.EmailOut;
using DigitalData.EmailProfilerDispatcher.Infrastructure.Contracts; using DigitalData.EmailProfilerDispatcher.Abstraction.Services;
using DigitalData.UserManager.Application; using DigitalData.UserManager.Application;
using EnvelopeGenerator.Application.Contracts; using EnvelopeGenerator.Application.Contracts;
using EnvelopeGenerator.Application.DTOs; using EnvelopeGenerator.Application.DTOs;

View File

@@ -7,10 +7,12 @@
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="DigitalData.Core.Abstractions" Version="1.0.0" /> <PackageReference Include="DigitalData.Core.Abstractions" Version="1.0.1.1" />
<PackageReference Include="DigitalData.Core.API" Version="1.0.2.1" />
<PackageReference Include="DigitalData.Core.Application" Version="1.0.0" /> <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" />
<PackageReference Include="DigitalData.Core.Infrastructure" Version="1.0.0" /> <PackageReference Include="DigitalData.Core.Infrastructure" Version="1.0.1.1" />
<PackageReference Include="DigitalData.EmailProfilerDispatcher.Abstraction" Version="1.0.0" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>

View File

@@ -76,7 +76,7 @@
}, },
"defaultConfiguration": "development", "defaultConfiguration": "development",
"options": { "options": {
"proxyConfig": "src/proxy.conf.json" "proxyConfig": "proxy.conf.json"
} }
}, },
"extract-i18n": { "extract-i18n": {

View File

@@ -7,11 +7,11 @@
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="DigitalData.Core.Abstractions" Version="1.0.0" /> <PackageReference Include="DigitalData.Core.Abstractions" Version="1.0.1.1" />
<PackageReference Include="DigitalData.Core.API" Version="1.0.1" /> <PackageReference Include="DigitalData.Core.API" Version="1.0.2.1" />
<PackageReference Include="DigitalData.Core.Application" Version="1.0.0" /> <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" />
<PackageReference Include="DigitalData.Core.Infrastructure" Version="1.0.0" /> <PackageReference Include="DigitalData.Core.Infrastructure" Version="1.0.1.1" />
<PackageReference Include="Microsoft.AspNetCore.OpenApi" Version="7.0.15" /> <PackageReference Include="Microsoft.AspNetCore.OpenApi" Version="7.0.15" />
<PackageReference Include="Swashbuckle.AspNetCore" Version="6.5.0" /> <PackageReference Include="Swashbuckle.AspNetCore" Version="6.5.0" />
<PackageReference Include="System.DirectoryServices" Version="7.0.1" /> <PackageReference Include="System.DirectoryServices" Version="7.0.1" />

View File

@@ -1,8 +1,9 @@
using DigitalData.EmailProfilerDispatcher.Domain.Entities; using DigitalData.EmailProfilerDispatcher.Abstraction.Entities;
using DigitalData.UserManager.Infrastructure;
using EnvelopeGenerator.Domain.Entities; using EnvelopeGenerator.Domain.Entities;
using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore;
namespace DigitalData.UserManager.Infrastructure.Repositories namespace EnvelopeGenerator.Infrastructure
{ {
public class EGDbContext : DbContext public class EGDbContext : DbContext
{ {

View File

@@ -7,8 +7,8 @@
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="DigitalData.Core.Abstractions" Version="1.0.0" /> <PackageReference Include="DigitalData.Core.Abstractions" Version="1.0.1.1" />
<PackageReference Include="DigitalData.Core.Infrastructure" Version="1.0.0" /> <PackageReference Include="DigitalData.Core.Infrastructure" Version="1.0.1.1" />
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="7.0.16" /> <PackageReference Include="Microsoft.EntityFrameworkCore" Version="7.0.16" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="7.0.15"> <PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="7.0.15">
<PrivateAssets>all</PrivateAssets> <PrivateAssets>all</PrivateAssets>
@@ -22,9 +22,6 @@
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<Reference Include="DigitalData.EmailProfilerDispatcher.Domain">
<HintPath>..\..\EmailProfilerDispatcher\DigitalData.EmailProfilerDispatcher.Application\bin\Debug\net7.0\DigitalData.EmailProfilerDispatcher.Domain.dll</HintPath>
</Reference>
<Reference Include="DigitalData.UserManager.Domain"> <Reference Include="DigitalData.UserManager.Domain">
<HintPath>..\..\WebUserManager\DigitalData.UserManager.Domain\bin\Debug\net7.0\DigitalData.UserManager.Domain.dll</HintPath> <HintPath>..\..\WebUserManager\DigitalData.UserManager.Domain\bin\Debug\net7.0\DigitalData.UserManager.Domain.dll</HintPath>
</Reference> </Reference>

View File

@@ -12,11 +12,12 @@
<ItemGroup> <ItemGroup>
<PackageReference Include="AutoMapper" Version="13.0.1" /> <PackageReference Include="AutoMapper" Version="13.0.1" />
<PackageReference Include="DigitalData.Core.Abstractions" Version="1.0.0" /> <PackageReference Include="DigitalData.Core.Abstractions" Version="1.0.1.1" />
<PackageReference Include="DigitalData.Core.API" Version="1.0.0" /> <PackageReference Include="DigitalData.Core.API" Version="1.0.2.1" />
<PackageReference Include="DigitalData.Core.Application" Version="1.0.0" /> <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" />
<PackageReference Include="DigitalData.Core.Infrastructure" Version="1.0.0" /> <PackageReference Include="DigitalData.Core.Infrastructure" Version="1.0.1.1" />
<PackageReference Include="DigitalData.EmailProfilerDispatcher" Version="1.0.0" />
<PackageReference Include="HtmlSanitizer" Version="8.0.865" /> <PackageReference Include="HtmlSanitizer" Version="8.0.865" />
<PackageReference Include="Microsoft.AspNetCore.OpenApi" Version="7.0.4" /> <PackageReference Include="Microsoft.AspNetCore.OpenApi" Version="7.0.4" />
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="7.0.16" /> <PackageReference Include="Microsoft.EntityFrameworkCore" Version="7.0.16" />
@@ -52,15 +53,6 @@
<Reference Include="DevExpress.Data.v21.2"> <Reference Include="DevExpress.Data.v21.2">
<HintPath>D:\ProgramFiles\DevExpress 21.2\Components\Bin\Framework\DevExpress.Data.v21.2.dll</HintPath> <HintPath>D:\ProgramFiles\DevExpress 21.2\Components\Bin\Framework\DevExpress.Data.v21.2.dll</HintPath>
</Reference> </Reference>
<Reference Include="DigitalData.EmailProfilerDispatcher.Application">
<HintPath>..\..\EmailProfilerDispatcher\DigitalData.EmailProfilerDispatcher.Application\bin\Debug\net7.0\DigitalData.EmailProfilerDispatcher.Application.dll</HintPath>
</Reference>
<Reference Include="DigitalData.EmailProfilerDispatcher.Domain">
<HintPath>..\..\EmailProfilerDispatcher\DigitalData.EmailProfilerDispatcher.Application\bin\Debug\net7.0\DigitalData.EmailProfilerDispatcher.Domain.dll</HintPath>
</Reference>
<Reference Include="DigitalData.EmailProfilerDispatcher.Infrastructure">
<HintPath>..\..\EmailProfilerDispatcher\DigitalData.EmailProfilerDispatcher.Application\bin\Debug\net7.0\DigitalData.EmailProfilerDispatcher.Infrastructure.dll</HintPath>
</Reference>
<Reference Include="DigitalData.Modules.Base"> <Reference Include="DigitalData.Modules.Base">
<HintPath>..\..\DDModules\Base\bin\Debug\DigitalData.Modules.Base.dll</HintPath> <HintPath>..\..\DDModules\Base\bin\Debug\DigitalData.Modules.Base.dll</HintPath>
</Reference> </Reference>

View File

@@ -13,8 +13,9 @@ using DigitalData.Core.DTO;
using System.Text.Encodings.Web; using System.Text.Encodings.Web;
using Ganss.Xss; using Ganss.Xss;
using Microsoft.Extensions.Options; using Microsoft.Extensions.Options;
using DigitalData.EmailProfilerDispatcher.Application;
using EnvelopeGenerator.Application; using EnvelopeGenerator.Application;
using DigitalData.EmailProfilerDispatcher;
using EnvelopeGenerator.Infrastructure;
var logger = LogManager.Setup().LoadConfigurationFromAppSettings().GetCurrentClassLogger(); var logger = LogManager.Setup().LoadConfigurationFromAppSettings().GetCurrentClassLogger();
logger.Info("Logging initialized!"); logger.Info("Logging initialized!");

View File

@@ -3,11 +3,15 @@
const signatures = [] const signatures = []
for(var element of document.elements){ for(var element of document.elements){
const [annotation, formField, annotation2, formFieldDate] = await Annotation.createSignature(element) const [annotation, formField, annotation_date, formFieldDate, annotation_postcode, formFieldPostcode, annotation_city, formFieldCity] = await Annotation.createSignature(element)
signatures.push(annotation) signatures.push(annotation)
signatures.push(formField) signatures.push(formField)
signatures.push(annotation2) signatures.push(annotation_date)
signatures.push(formFieldDate) signatures.push(formFieldDate)
signatures.push(annotation_postcode)
signatures.push(formFieldPostcode)
signatures.push(annotation_city)
signatures.push(formFieldCity)
} }
return [...signatures ] return [...signatures ]
@@ -42,7 +46,6 @@
}) })
//date //date
var city = await getCity();
const id_date = PSPDFKit.generateInstantId() const id_date = PSPDFKit.generateInstantId()
const annotation_date = new PSPDFKit.Annotations.WidgetAnnotation({ const annotation_date = new PSPDFKit.Annotations.WidgetAnnotation({
id: id_date, id: id_date,
@@ -51,21 +54,74 @@
backgroundColor: PSPDFKit.Color.DarkBlue, backgroundColor: PSPDFKit.Color.DarkBlue,
blendMode: 'multiply', blendMode: 'multiply',
boundingBox: new PSPDFKit.Geometry.Rect({ boundingBox: new PSPDFKit.Geometry.Rect({
width: width * 1.5, width: width * 0.75,
height: height / 2, height: height / 2,
top: top + height + 25, top: top + height + 25,
left: left - width * .25, left: left - width * .25,
}), }),
fontSize:8 fontSize:8,
additionalActions: {
onFormat: new PSPDFKit.Actions.JavaScriptAction({
script: `AFDate_FormatEx("dd/mm/yyyy")`,
}),
}
}) })
const formFieldDate = new PSPDFKit.FormFields.TextFormField({ const formFieldDate = new PSPDFKit.FormFields.TextFormField({
name: id_date, name: id_date,
annotationIds: PSPDFKit.Immutable.List([annotation_date.id]), annotationIds: PSPDFKit.Immutable.List([annotation_date.id]),
value: getLocaleDateString() + ", " + city value: locale_date_dd_mm_yyyy()
}) })
return [annotation, formField, annotation_date, formFieldDate] //post_code
var location = await getLocation();
const id_postcode = PSPDFKit.generateInstantId()
const annotation_postcode = new PSPDFKit.Annotations.WidgetAnnotation({
id: id_postcode,
pageIndex: page,
formFieldName: id_postcode,
backgroundColor: PSPDFKit.Color.DarkBlue,
blendMode: 'multiply',
boundingBox: new PSPDFKit.Geometry.Rect({
width: width * 0.45,
height: height / 2,
top: top + height + 25,
left: left - width * .25 + width * 0.80,
}),
fontSize:8
})
const formFieldPostcode = new PSPDFKit.FormFields.TextFormField({
name: id_postcode,
annotationIds: PSPDFKit.Immutable.List([annotation_postcode.id]),
value: location.postalCode
})
//city
var location = await getLocation();
const id_city = PSPDFKit.generateInstantId()
const annotation_city = new PSPDFKit.Annotations.WidgetAnnotation({
id: id_city,
pageIndex: page,
formFieldName: id_city,
backgroundColor: PSPDFKit.Color.DarkBlue,
blendMode: 'multiply',
boundingBox: new PSPDFKit.Geometry.Rect({
width: width * 0.75,
height: height / 2,
top: top + height + 25,
left: left - width * .25 + width * 1.30,
}),
fontSize:8
})
const formFieldCity = new PSPDFKit.FormFields.TextFormField({
name: id_city,
annotationIds: PSPDFKit.Immutable.List([annotation_city.id]),
value: location.city
})
return [annotation, formField, annotation_date, formFieldDate, annotation_postcode, formFieldPostcode, annotation_city, formFieldCity]
} }
static createTextBox(element) { static createTextBox(element) {

View File

@@ -29,4 +29,29 @@ async function getCity() {
} }
} }
const getLocaleDateString = _ => new Date().toLocaleDateString('de-DE') async function getLocation() {
try {
const coords = await getCoordinates();
const response = await fetch(`https://nominatim.openstreetmap.org/reverse?format=json&lat=${coords.latitude}&lon=${coords.longitude}`);
const data = await response.json();
if (data && data.address) {
const city = data.address.city || data.address.town || data.address.village || data.address.hamlet;
const postalCode = data.address.postcode;
return { postalCode: postalCode, city: city };
}
} catch {
return { postalCode: '', city: '' };
}
}
const getLocaleDateString = _ => new Date().toLocaleDateString('de-DE')
function locale_date_dd_mm_yyyy() {
const today = new Date();
const day = String(today.getDate()).padStart(2, '0');
const month = String(today.getMonth() + 1).padStart(2, '0');
const year = String(today.getFullYear()).slice(-4);
console.log(`${day}/${month}/${year}`)
return `${day}/${month}/${year}`;
}