From 1512357460626b883b0ef54d10cfc2d8f4277d48 Mon Sep 17 00:00:00 2001 From: Piotr Kus Date: Thu, 30 Jan 2025 20:25:47 +0100 Subject: [PATCH] * Renamed files * Added SentToSl field * Changed launchSettings.json --- FaKrosnoApi/Program.cs | 4 +- .../FaKrosnoEfDataModel.csproj | 2 +- .../{appsettings.json => appsettings_F.json} | 0 .../Components/Pages/EdiCustomerOrders.razor | 3 + .../Properties/launchSettings.json | 80 ++++++++++--------- .../Dtos/EdiCustomerOrderDto.cs | 1 + .../SytelineSaAppEfDataModel.csproj | 2 +- .../{appsettings.json => appsettings_FA.json} | 0 8 files changed, 50 insertions(+), 42 deletions(-) rename FaKrosnoEfDataModel/{appsettings.json => appsettings_F.json} (100%) rename SytelineSaAppEfDataModel/{appsettings.json => appsettings_FA.json} (100%) diff --git a/FaKrosnoApi/Program.cs b/FaKrosnoApi/Program.cs index 2b2996b..c325dd0 100644 --- a/FaKrosnoApi/Program.cs +++ b/FaKrosnoApi/Program.cs @@ -29,6 +29,8 @@ builder.Services.AddOpenApiDocument(config => // Configure AutoMapper builder.Services.AddAutoMapper(typeof(FaKrosnoMappingProfile), typeof(SytelineSaAppMappingProfile)); + + // Configure JWT Authentication builder.Services.AddAuthentication(options => { @@ -56,8 +58,6 @@ builder.Services.AddScoped(); var app = builder.Build(); -app.Urls.Add("http://0.0.0.0:5555"); - // Configure the HTTP request pipeline. //if (app.Environment.IsDevelopment()) //{ diff --git a/FaKrosnoEfDataModel/FaKrosnoEfDataModel.csproj b/FaKrosnoEfDataModel/FaKrosnoEfDataModel.csproj index e08b4c1..c238b1a 100644 --- a/FaKrosnoEfDataModel/FaKrosnoEfDataModel.csproj +++ b/FaKrosnoEfDataModel/FaKrosnoEfDataModel.csproj @@ -23,7 +23,7 @@ - + Always diff --git a/FaKrosnoEfDataModel/appsettings.json b/FaKrosnoEfDataModel/appsettings_F.json similarity index 100% rename from FaKrosnoEfDataModel/appsettings.json rename to FaKrosnoEfDataModel/appsettings_F.json diff --git a/OrdersManagement/Components/Pages/EdiCustomerOrders.razor b/OrdersManagement/Components/Pages/EdiCustomerOrders.razor index b69baf2..3cae0d4 100644 --- a/OrdersManagement/Components/Pages/EdiCustomerOrders.razor +++ b/OrdersManagement/Components/Pages/EdiCustomerOrders.razor @@ -62,6 +62,9 @@ @context.SlOrderNumber + + @context.SentToSl + diff --git a/OrdersManagement/Properties/launchSettings.json b/OrdersManagement/Properties/launchSettings.json index ae807c9..919aa72 100644 --- a/OrdersManagement/Properties/launchSettings.json +++ b/OrdersManagement/Properties/launchSettings.json @@ -1,45 +1,49 @@ { "$schema": "http://json.schemastore.org/launchsettings.json", - "iisSettings": { - "windowsAuthentication": false, - "anonymousAuthentication": true, - "iisExpress": { - "applicationUrl": "http://localhost:61370", - "sslPort": 44319 + "iisSettings": { + "windowsAuthentication": false, + "anonymousAuthentication": true, + "iis": { + "applicationUrl": "http://localhost:80", + "sslPort": 443 + }, + "iisExpress": { + "applicationUrl": "http://localhost:61370", + "sslPort": 44319 + } + }, + "profiles": { + "IIS": { + "commandName": "IIS", + "launchBrowser": true, + "environmentVariables": { + "ASPNETCORE_ENVIRONMENT": "Production" } }, - "profiles": { - "IIS": { - "commandName": "IIS", - "launchBrowser": true, - "environmentVariables": { - "ASPNETCORE_ENVIRONMENT": "Development" - } - }, - "http": { - "commandName": "Project", - "dotnetRunMessages": true, - "launchBrowser": true, - "applicationUrl": "http://localhost:5295", - "environmentVariables": { - "ASPNETCORE_ENVIRONMENT": "Development" - } - }, - "https": { - "commandName": "Project", - "dotnetRunMessages": true, - "launchBrowser": true, - "applicationUrl": "https://localhost:7215;http://localhost:5295", - "environmentVariables": { - "ASPNETCORE_ENVIRONMENT": "Development" - } - }, - "IIS Express": { - "commandName": "IISExpress", - "launchBrowser": true, - "environmentVariables": { - "ASPNETCORE_ENVIRONMENT": "Development" - } + "IIS Express": { + "commandName": "IISExpress", + "launchBrowser": true, + "environmentVariables": { + "ASPNETCORE_ENVIRONMENT": "Development" + } + }, + "http": { + "commandName": "Project", + "dotnetRunMessages": true, + "launchBrowser": true, + "applicationUrl": "http://localhost:5295", + "environmentVariables": { + "ASPNETCORE_ENVIRONMENT": "Development" + } + }, + "https": { + "commandName": "Project", + "dotnetRunMessages": true, + "launchBrowser": true, + "applicationUrl": "https://localhost:7215;http://localhost:5295", + "environmentVariables": { + "ASPNETCORE_ENVIRONMENT": "Development" } } } +} \ No newline at end of file diff --git a/SytelineSaAppEfDataModel/Dtos/EdiCustomerOrderDto.cs b/SytelineSaAppEfDataModel/Dtos/EdiCustomerOrderDto.cs index 95237dd..e11c8aa 100644 --- a/SytelineSaAppEfDataModel/Dtos/EdiCustomerOrderDto.cs +++ b/SytelineSaAppEfDataModel/Dtos/EdiCustomerOrderDto.cs @@ -104,6 +104,7 @@ namespace SytelineSaAppEfDataModel.Dtos public string TranslatedStatus => TranslateStatus(Status); public string? SlOrderNumber => EdiCustomerOrderTranslates.MaxBy(x => x.CreatedDate)?.CoCoNum; + public string SentToSl => Posted == 1 ? "TAK" : "NIE"; public IEnumerable EdiCustomerOrderLines { get; set; } = new List(); public IEnumerable EdiCustomerOrderTranslates { get; set; } = new List(); diff --git a/SytelineSaAppEfDataModel/SytelineSaAppEfDataModel.csproj b/SytelineSaAppEfDataModel/SytelineSaAppEfDataModel.csproj index 9ebcc82..c44357d 100644 --- a/SytelineSaAppEfDataModel/SytelineSaAppEfDataModel.csproj +++ b/SytelineSaAppEfDataModel/SytelineSaAppEfDataModel.csproj @@ -23,7 +23,7 @@ - + Always diff --git a/SytelineSaAppEfDataModel/appsettings.json b/SytelineSaAppEfDataModel/appsettings_FA.json similarity index 100% rename from SytelineSaAppEfDataModel/appsettings.json rename to SytelineSaAppEfDataModel/appsettings_FA.json