Compare commits

..

3 Commits

Author SHA1 Message Date
Loretta 2eaf74b199 fixes 2025-10-23 06:34:40 +02:00
Loretta 00ec5d341c refactoring, cleanup v1.1... 2025-10-22 16:20:28 +02:00
Loretta 88c0fbec54 refactoring, cleanup, etc... 2025-10-22 15:16:04 +02:00
14 changed files with 174 additions and 168 deletions

View File

@ -35,7 +35,6 @@
<HintPath>..\..\..\..\Aycode\Source\AyCode.Core\AyCode.Services.Server\bin\FruitBank\Debug\net9.0\AyCode.Services.Server.dll</HintPath> <HintPath>..\..\..\..\Aycode\Source\AyCode.Core\AyCode.Services.Server\bin\FruitBank\Debug\net9.0\AyCode.Services.Server.dll</HintPath>
</Reference> </Reference>
<Reference Include="Microsoft.AspNetCore.SignalR.Core"> <Reference Include="Microsoft.AspNetCore.SignalR.Core">
<!--<HintPath>C:\Program Files\dotnet\packs\Microsoft.AspNetCore.App.Ref\9.0.9\ref\net9.0\Microsoft.AspNetCore.SignalR.Core.dll</HintPath>-->
<HintPath>C:\Program Files\dotnet\packs\Microsoft.AspNetCore.App.Ref\9.0.10\ref\net9.0\Microsoft.AspNetCore.SignalR.Core.dll</HintPath> <HintPath>C:\Program Files\dotnet\packs\Microsoft.AspNetCore.App.Ref\9.0.10\ref\net9.0\Microsoft.AspNetCore.SignalR.Core.dll</HintPath>
</Reference> </Reference>
<Reference Include="Mango.Nop.Core"> <Reference Include="Mango.Nop.Core">

View File

@ -1,8 +1,11 @@
using FruitBank.Common.Loggers; using AyCode.Core.Loggers;
using FruitBank.Common.Loggers;
using Mango.Nop.Core.Loggers; using Mango.Nop.Core.Loggers;
namespace FruitBank.Common.Server.Services.Loggers; namespace FruitBank.Common.Server.Services.Loggers;
public class LoggerToLoggerApiController : Logger<LoggerToLoggerApiController> public class LoggerToLoggerApiController : Logger<LoggerToLoggerApiController>
{ {
public LoggerToLoggerApiController(params IAcLogWriterBase[] logWriters) : base(logWriters)
{ }
} }

View File

@ -36,6 +36,11 @@ public class DevAdminSignalRHub : AcWebSignalRHubWithSessionBase<SignalRTags, Lo
DynamicMethodCallModels.Add(new AcDynamicMethodCallModel<SignalRAttribute>(customOrderSignalREndpoint)); DynamicMethodCallModels.Add(new AcDynamicMethodCallModel<SignalRAttribute>(customOrderSignalREndpoint));
} }
protected override void LogContextUserNameAndId()
{
return;
base.LogContextUserNameAndId();
}
//public override Task OnReceiveMessage(int messageTag, byte[]? message, int? requestId) //public override Task OnReceiveMessage(int messageTag, byte[]? message, int? requestId)
//{ //{
// return ProcessOnReceiveMessage(messageTag, message, requestId, async tagName => // return ProcessOnReceiveMessage(messageTag, message, requestId, async tagName =>

View File

@ -40,10 +40,6 @@
<Reference Include="Nop.Core"> <Reference Include="Nop.Core">
<HintPath>..\..\NopCommerce.Common\4.70\Libraries\Mango.Nop.Core\bin\FruitBank\Debug\net9.0\Nop.Core.dll</HintPath> <HintPath>..\..\NopCommerce.Common\4.70\Libraries\Mango.Nop.Core\bin\FruitBank\Debug\net9.0\Nop.Core.dll</HintPath>
</Reference> </Reference>
<Reference Include="Nop.Core">
<HintPath>..\..\NopCommerce.Common\4.70\Libraries\Mango.Nop.Core\bin\FruitBank\Debug\net9.0\Mango.Nop.Core.dll</HintPath>
</Reference>
</ItemGroup> </ItemGroup>
</Project> </Project>

View File

@ -7,8 +7,12 @@ public static class FruitBankConstClient
{ {
public static string DefaultLocale = "en-US"; public static string DefaultLocale = "en-US";
//public static string BaseUrl = "https://localhost:59579"; //FrutiBank nop public static string BaseUrl = "https://localhost:59579"; //FrutiBank nop
#if RELEASE
public static string BaseUrl = "https://shop.fruitbank.hu"; //FrutiBank nop public static string BaseUrl = "https://shop.fruitbank.hu"; //FrutiBank nop
#endif
//public static string BaseUrl = "http://10.0.2.2:59579"; //FrutiBank (android) nop //public static string BaseUrl = "http://10.0.2.2:59579"; //FrutiBank (android) nop
//public static string BaseUrl = "https://localhost:7144"; //HybridApp //public static string BaseUrl = "https://localhost:7144"; //HybridApp

View File

@ -29,6 +29,8 @@ namespace FruitBankHybrid.Shared.Tests
[TestInitialize] [TestInitialize]
public void TestInit() public void TestInit()
{ {
if (!FruitBankConstClient.BaseUrl.Contains("localhost:")) throw new Exception("NEM LOCALHOST-ON TESZTELÜNK!");
_signalRClient = new FruitBankSignalRClient(new List<IAcLogWriterClientBase> _signalRClient = new FruitBankSignalRClient(new List<IAcLogWriterClientBase>
{ {
//new ConsoleLogWriter(AppType.TestUnit, LogLevel.Detail, nameof(FruitBankClientTests)), //new ConsoleLogWriter(AppType.TestUnit, LogLevel.Detail, nameof(FruitBankClientTests)),

View File

@ -34,15 +34,12 @@
<Reference Include="Mango.Nop.Core"> <Reference Include="Mango.Nop.Core">
<HintPath>..\..\NopCommerce.Common\4.70\Libraries\Mango.Nop.Core\bin\FruitBank\Debug\net9.0\Mango.Nop.Core.dll</HintPath> <HintPath>..\..\NopCommerce.Common\4.70\Libraries\Mango.Nop.Core\bin\FruitBank\Debug\net9.0\Mango.Nop.Core.dll</HintPath>
</Reference> </Reference>
<Reference Include="Mango.Nop.Services">
<HintPath>..\..\NopCommerce.Common\4.70\Libraries\Mango.Nop.Services\bin\FruitBank\Debug\net9.0\Mango.Nop.Services.dll</HintPath>
</Reference>
<Reference Include="Nop.Core"> <Reference Include="Nop.Core">
<HintPath>..\..\NopCommerce.Common\4.70\Libraries\Mango.Nop.Core\bin\FruitBank\Debug\net9.0\Nop.Core.dll</HintPath> <HintPath>..\..\NopCommerce.Common\4.70\Libraries\Mango.Nop.Core\bin\FruitBank\Debug\net9.0\Nop.Core.dll</HintPath>
</Reference> </Reference>
<Reference Include="Nop.Data">
<HintPath>..\..\NopCommerce.Common\4.70\Libraries\Mango.Nop.Core\bin\FruitBank\Debug\net9.0\Nop.Data.dll</HintPath>
</Reference>
<Reference Include="Nop.Services">
<HintPath>..\..\NopCommerce.Common\4.70\Libraries\Mango.Nop.Core\bin\FruitBank\Debug\net9.0\Nop.Services.dll</HintPath>
</Reference>
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>

View File

@ -1,5 +1,6 @@
using AyCode.Core.Enums; using AyCode.Core.Enums;
using AyCode.Core.Loggers; using AyCode.Core.Loggers;
using FruitBank.Common;
using FruitBank.Common.Loggers; using FruitBank.Common.Loggers;
using FruitBankHybrid.Shared.Services.SignalRs; using FruitBankHybrid.Shared.Services.SignalRs;
using Nop.Core.Domain.Orders; using Nop.Core.Domain.Orders;
@ -16,6 +17,8 @@ public sealed class OrderClientTests
[TestInitialize] [TestInitialize]
public void TestInit() public void TestInit()
{ {
if (!FruitBankConstClient.BaseUrl.Contains("localhost:")) throw new Exception("NEM LOCALHOST-ON TESZTELÜNK!");
_signalRClient = new FruitBankSignalRClient(new List<IAcLogWriterClientBase> _signalRClient = new FruitBankSignalRClient(new List<IAcLogWriterClientBase>
{ {
//new ConsoleLogWriter(AppType.TestUnit, LogLevel.Detail, nameof(FruitBankClientTests)), //new ConsoleLogWriter(AppType.TestUnit, LogLevel.Detail, nameof(FruitBankClientTests)),

View File

@ -3,7 +3,7 @@ using DevExpress.Blazor.Internal;
namespace FruitBankHybrid.Shared.Extensions; namespace FruitBankHybrid.Shared.Extensions;
public static class DevextremeComponentExtension public static class DevexpressComponentExtensions
{ {
public static async Task ShowMessageBoxAsync(this IDialogService messageBox, string title, string text, MessageBoxRenderStyle messageBoxRenderStyle) public static async Task ShowMessageBoxAsync(this IDialogService messageBox, string title, string text, MessageBoxRenderStyle messageBoxRenderStyle)
{ {

View File

@ -1,4 +1,4 @@
<Project Sdk="Microsoft.NET.Sdk.Razor"> <Project Sdk="Microsoft.NET.Sdk.Razor">
<PropertyGroup> <PropertyGroup>
<TargetFramework>net9.0</TargetFramework> <TargetFramework>net9.0</TargetFramework>

View File

@ -71,25 +71,27 @@
</DxComboBox> </DxComboBox>
</DxFormLayoutItem> </DxFormLayoutItem>
@switch (SelectedOrder) @if (SelectedOrder == null)
{ {
case null:
<DxFormLayoutItem ColSpanMd="2" /> <DxFormLayoutItem ColSpanMd="2" />
break; }
else
case { MeasurementOwnerId: 0, IsComplete: false } when HasMeasuringAccess: {
if (SelectedOrder is { MeasurementOwnerId: 0, IsComplete: false } && HasMeasuringAccess)
{
<DxFormLayoutItem ColSpanMd="2"> <DxFormLayoutItem ColSpanMd="2">
<DxButton Enabled="@(HasMeasuringAccess && SelectedOrder?.MeasurementOwnerId == 0)" Visible="@(SelectedOrder != null)" CssClass="w-100" <DxButton Enabled="@(HasMeasuringAccess && SelectedOrder?.MeasurementOwnerId == 0)" Visible="(SelectedOrder != null)"
Text="@(HasMeasuringAccess && SelectedOrder?.MeasurementOwnerId == 0 ? "Indítás" : "Folyamatban...")" CssClass="w-100"
Text="@(HasMeasuringAccess && SelectedOrder?.MeasurementOwnerId == 0 ? " Indítás" : "Folyamatban...")"
Click="() => OnStartMeasuringClick()" /> Click="() => OnStartMeasuringClick()" />
</DxFormLayoutItem> </DxFormLayoutItem>
break; }
else
default: {
<DxFormLayoutItem ColSpanMd="2" Caption="Indította" CaptionCssClass="@(SelectedOrder?.IsMeasured == true ? "text-success" : "")"> <DxFormLayoutItem ColSpanMd="2" Caption="Indította" CaptionCssClass="@(SelectedOrder?.IsMeasured == true ? " text-success" : "" )">
<DxTextBox Enabled="false" Text="@(LoggedInModel.MeasuringUsers.FirstOrDefault(x => x.Id == SelectedOrder?.MeasurementOwnerId)?.LastName)" /> <DxTextBox Enabled="false" Text="@(LoggedInModel.MeasuringUsers.FirstOrDefault(x => x.Id == SelectedOrder?.MeasurementOwnerId)?.LastName)" />
</DxFormLayoutItem> </DxFormLayoutItem>
break; }
} }
@* <DxFormLayoutItem ColSpanMd="1"></DxFormLayoutItem> *@ @* <DxFormLayoutItem ColSpanMd="1"></DxFormLayoutItem> *@

View File

@ -174,8 +174,11 @@ namespace FruitBankHybrid.Shared.Pages
private async Task OnStartMeasuringClick() private async Task OnStartMeasuringClick()
{ {
if (SelectedOrder != null && LoggedInModel.IsLoggedIn && SelectedOrder.MeasurementOwnerId == 0) if (SelectedOrder == null || !LoggedInModel.IsLoggedIn || SelectedOrder.MeasurementOwnerId != 0) return;
{
var confirmed = !LoggedInModel.IsRevisor || await DialogService.ShowConfirmBoxAsync("Megerősítés", "Ha elindítja a mérést, senki más nem tudja befelyezni! Biztoan folytatja?", MessageBoxRenderStyle.Info);
if (!confirmed) return;
var responseOrderDto = await FruitBankSignalRClient.StartMeasuring(SelectedOrder.Id, LoggedInModel.CustomerDto!.Id); var responseOrderDto = await FruitBankSignalRClient.StartMeasuring(SelectedOrder.Id, LoggedInModel.CustomerDto!.Id);
if (responseOrderDto != null) if (responseOrderDto != null)
{ {
@ -189,13 +192,12 @@ namespace FruitBankHybrid.Shared.Pages
StateHasChanged(); StateHasChanged();
} }
}
private async Task OnMeasuringAuditorClick() private async Task OnMeasuringAuditorClick()
{ {
if (SelectedOrder != null && LoggedInModel.IsRevisor && SelectedOrder.IsMeasured && SelectedOrder.OrderStatus != OrderStatus.Complete) if (SelectedOrder != null && LoggedInModel.IsRevisor && SelectedOrder.IsMeasured && SelectedOrder.OrderStatus != OrderStatus.Complete)
{ {
if (await DialogService.ShowConfirmBoxAsync("Megerősítés", "Biztoan jóváhagyja a rendelést? Jóváhagyás után a mérések nem módosíthatóak!", MessageBoxRenderStyle.Danger)) if (await DialogService.ShowConfirmBoxAsync("Megerősítés", "Biztoan jóváhagyja a rendelést? Jóváhagyás után a mérések nem módosíthatóak!", MessageBoxRenderStyle.Info))
{ {
var responseOrderDto = await FruitBankSignalRClient.SetOrderStatusToComplete(SelectedOrder.Id, LoggedInModel.CustomerDto!.Id); var responseOrderDto = await FruitBankSignalRClient.SetOrderStatusToComplete(SelectedOrder.Id, LoggedInModel.CustomerDto!.Id);
if (responseOrderDto != null) if (responseOrderDto != null)

View File

@ -39,21 +39,14 @@
<Reference Include="AyCode.Utils"> <Reference Include="AyCode.Utils">
<HintPath>..\..\..\..\Aycode\Source\AyCode.Core\AyCode.Services.Server\bin\FruitBank\Debug\net9.0\AyCode.Utils.dll</HintPath> <HintPath>..\..\..\..\Aycode\Source\AyCode.Core\AyCode.Services.Server\bin\FruitBank\Debug\net9.0\AyCode.Utils.dll</HintPath>
</Reference> </Reference>
<Reference Include="DevExpress.Blazor.Resources.v25.1"> <Reference Include="Nop.Core">
<HintPath>..\..\NopCommerce.Common\4.70\Libraries\Mango.Nop.Core\bin\FruitBank\Debug\net9.0\Nop.Core.dll</HintPath>
</Reference>
<Reference Include="DevExpress.Blazor.v25.1">
</Reference>
<Reference Include="DevExpress.Blazor.v25.1.Viewer">
</Reference>
<Reference Include="DevExpress.Data.v25.1">
</Reference>
<Reference Include="DevExpress.Utils.v25.1">
</Reference> </Reference>
<Reference Include="DevExpress.Blazor.Resources.v25.1"></Reference>
<Reference Include="DevExpress.Blazor.v25.1"></Reference>
<Reference Include="DevExpress.Blazor.v25.1.Viewer"></Reference>
<Reference Include="DevExpress.Data.v25.1"></Reference>
<Reference Include="DevExpress.Utils.v25.1"></Reference>
</ItemGroup> </ItemGroup>
</Project> </Project>

View File

@ -1,12 +1,12 @@
<Project Sdk="Microsoft.NET.Sdk.Web"> <Project Sdk="Microsoft.NET.Sdk.Web">
<PropertyGroup> <PropertyGroup>
<TargetFramework>net9.0</TargetFramework> <TargetFramework>net9.0</TargetFramework>
<Nullable>enable</Nullable> <Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings> <ImplicitUsings>enable</ImplicitUsings>
<!--<PublishTrimmed>true</PublishTrimmed>-->
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<ProjectReference Include="..\FruitBank.Common.Server\FruitBank.Common.Server.csproj" /> <ProjectReference Include="..\FruitBank.Common.Server\FruitBank.Common.Server.csproj" />
<ProjectReference Include="..\FruitBank.Common\FruitBank.Common.csproj" /> <ProjectReference Include="..\FruitBank.Common\FruitBank.Common.csproj" />