Compare commits
No commits in common. "9c91650c6d2c7ed7ed50ad394a3ebbafa7fb86b1" and "7559c715c25e992e627466e344316f55874ef046" have entirely different histories.
9c91650c6d
...
7559c715c2
|
|
@ -10,10 +10,7 @@ namespace FruitBank.Common.Server
|
||||||
public class FruitBankConst : AcConst
|
public class FruitBankConst : AcConst
|
||||||
{
|
{
|
||||||
public static string ProjectIdString = "aad53443-2ee2-4650-8a99-97e907265e4e";
|
public static string ProjectIdString = "aad53443-2ee2-4650-8a99-97e907265e4e";
|
||||||
|
|
||||||
public static string MeasuringRoleSystemName = "Measuring";
|
public static string MeasuringRoleSystemName = "Measuring";
|
||||||
public static string MeasuringRevisorRoleSystemName = "MeasuringRevisor";
|
|
||||||
public static string IsMeasureableAttributeName = "IsMeasurable";
|
|
||||||
|
|
||||||
static FruitBankConst()
|
static FruitBankConst()
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -13,8 +13,6 @@ public class Shipping : MgEntityBase, IShipping
|
||||||
public string LicencePlate { get; set; }
|
public string LicencePlate { get; set; }
|
||||||
public bool IsAllMeasured { get; set; }
|
public bool IsAllMeasured { get; set; }
|
||||||
|
|
||||||
public DateTime? MeasuredDate { get; set; }
|
|
||||||
|
|
||||||
[Association(ThisKey = nameof(Id), OtherKey = nameof(ShippingDocument.ShippingId), CanBeNull = true)]
|
[Association(ThisKey = nameof(Id), OtherKey = nameof(ShippingDocument.ShippingId), CanBeNull = true)]
|
||||||
public List<ShippingDocument>? ShippingDocuments { get; set; }
|
public List<ShippingDocument>? ShippingDocuments { get; set; }
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,6 @@
|
||||||
using FruitBank.Common.Models;
|
using FruitBank.Common.Models;
|
||||||
using Mango.Nop.Core.Dtos;
|
using Mango.Nop.Core.Dtos;
|
||||||
using Mango.Nop.Core.Models;
|
using Mango.Nop.Core.Models;
|
||||||
using Nop.Core.Domain.Customers;
|
|
||||||
|
|
||||||
namespace FruitBank.Common.Interfaces;
|
namespace FruitBank.Common.Interfaces;
|
||||||
|
|
||||||
|
|
@ -39,7 +38,6 @@ public interface IFruitBankDataControllerCommon
|
||||||
|
|
||||||
#region Customer
|
#region Customer
|
||||||
public Task<List<CustomerDto>?> GetMeasuringUsers();
|
public Task<List<CustomerDto>?> GetMeasuringUsers();
|
||||||
public Task<List<CustomerRole>?> GetCustomerRolesByCustomerId(int customerId);
|
|
||||||
#endregion Customer
|
#endregion Customer
|
||||||
|
|
||||||
#region Product
|
#region Product
|
||||||
|
|
|
||||||
|
|
@ -1,9 +0,0 @@
|
||||||
namespace FruitBank.Common.Interfaces;
|
|
||||||
|
|
||||||
public interface IMeasuringAttributeValues
|
|
||||||
{
|
|
||||||
double? NetWeight { get; set; }
|
|
||||||
double? GrossWeight { get; set; }
|
|
||||||
|
|
||||||
bool? IsMeasurable { get; set; }
|
|
||||||
}
|
|
||||||
|
|
@ -10,7 +10,6 @@ public interface IShipping : IEntityInt, ITimeStampInfo
|
||||||
DateTime ShippingDate { get; set; }
|
DateTime ShippingDate { get; set; }
|
||||||
string LicencePlate { get; set; }
|
string LicencePlate { get; set; }
|
||||||
bool IsAllMeasured { get; set; }
|
bool IsAllMeasured { get; set; }
|
||||||
DateTime? MeasuredDate { get; set; }
|
|
||||||
|
|
||||||
public List<ShippingDocument>? ShippingDocuments { get; set; }
|
public List<ShippingDocument>? ShippingDocuments { get; set; }
|
||||||
}
|
}
|
||||||
|
|
@ -1,27 +0,0 @@
|
||||||
namespace FruitBank.Common.Interfaces;
|
|
||||||
|
|
||||||
public class MeasuringAttributeValues : IMeasuringAttributeValues
|
|
||||||
{
|
|
||||||
public double? NetWeight { get; set; }
|
|
||||||
public double? GrossWeight { get; set; }
|
|
||||||
public bool? IsMeasurable { get; set; }
|
|
||||||
|
|
||||||
public MeasuringAttributeValues()
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
public MeasuringAttributeValues(double? netWeight, double? grossWeight, bool? isMeasurable)
|
|
||||||
{
|
|
||||||
Initialize(netWeight, grossWeight, isMeasurable);
|
|
||||||
}
|
|
||||||
|
|
||||||
public void Initialize(double? netWeight, double? grossWeight, bool? isMeasurable)
|
|
||||||
{
|
|
||||||
NetWeight = netWeight;
|
|
||||||
GrossWeight = grossWeight;
|
|
||||||
IsMeasurable = isMeasurable;
|
|
||||||
}
|
|
||||||
|
|
||||||
public bool HasValues()
|
|
||||||
=> NetWeight != null && GrossWeight != null && IsMeasurable != null;
|
|
||||||
}
|
|
||||||
|
|
@ -1,46 +0,0 @@
|
||||||
using AyCode.Core;
|
|
||||||
using Mango.Nop.Core.Dtos;
|
|
||||||
using Mango.Nop.Core.Models;
|
|
||||||
using Nop.Core.Domain.Customers;
|
|
||||||
|
|
||||||
namespace FruitBank.Common.Models;
|
|
||||||
|
|
||||||
public class LoggedInModel
|
|
||||||
{
|
|
||||||
public bool IsLoggedIn => CustomerDto != null;
|
|
||||||
|
|
||||||
public CustomerDto? CustomerDto { get; private set; }
|
|
||||||
public List<CustomerRole> CustomerRoles { get; private set; } = [];
|
|
||||||
|
|
||||||
public LoggedInModel()
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
public LoggedInModel(CustomerDto? customerDto)
|
|
||||||
{
|
|
||||||
InitLoggedInCustomer(customerDto);
|
|
||||||
}
|
|
||||||
|
|
||||||
public LoggedInModel(MgLoginModelResponse loginModelResponse) : this(loginModelResponse.CustomerDto)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
public void InitLoggedInCustomer(CustomerDto? customerDto)
|
|
||||||
{
|
|
||||||
LogOut();
|
|
||||||
|
|
||||||
if (customerDto != null) CustomerDto = customerDto;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void InitCustomerRoles(List<CustomerRole> customerRoles)
|
|
||||||
{
|
|
||||||
CustomerRoles.Clear();
|
|
||||||
CustomerRoles.AddRange(customerRoles);
|
|
||||||
}
|
|
||||||
|
|
||||||
public void LogOut()
|
|
||||||
{
|
|
||||||
CustomerDto = null;
|
|
||||||
CustomerRoles.Clear();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -33,7 +33,6 @@ public class SignalRTags : AcSignalRTags
|
||||||
|
|
||||||
public const int GetMeasuringUsers = 70;
|
public const int GetMeasuringUsers = 70;
|
||||||
public const int GetCustomerDtoById = 71;
|
public const int GetCustomerDtoById = 71;
|
||||||
public const int GetCustomerRolesByCustomerId = 72;
|
|
||||||
|
|
||||||
public const int GetProductDtos = 80;
|
public const int GetProductDtos = 80;
|
||||||
public const int GetProductDtoById = 81;
|
public const int GetProductDtoById = 81;
|
||||||
|
|
|
||||||
|
|
@ -6,15 +6,12 @@ using FruitBank.Common.Interfaces;
|
||||||
using FruitBank.Common.Loggers;
|
using FruitBank.Common.Loggers;
|
||||||
using FruitBankHybrid.Shared.Services.SignalRs;
|
using FruitBankHybrid.Shared.Services.SignalRs;
|
||||||
using System.Diagnostics.CodeAnalysis;
|
using System.Diagnostics.CodeAnalysis;
|
||||||
using System.Runtime.InteropServices.JavaScript;
|
|
||||||
using FruitBank.Common;
|
|
||||||
|
|
||||||
namespace FruitBankHybrid.Shared.Tests
|
namespace FruitBankHybrid.Shared.Tests
|
||||||
{
|
{
|
||||||
[TestClass]
|
[TestClass]
|
||||||
public sealed class FruitBankClientTests
|
public sealed class FruitBankClientTests
|
||||||
{
|
{
|
||||||
private const int CustomerIdAasdDsserverCom = 6;//aasd@dsserver.com
|
|
||||||
private const string Fixture = "_test.temp";
|
private const string Fixture = "_test.temp";
|
||||||
|
|
||||||
private FruitBankSignalRClient _signalRClient = null!;
|
private FruitBankSignalRClient _signalRClient = null!;
|
||||||
|
|
@ -91,8 +88,7 @@ namespace FruitBankHybrid.Shared.Tests
|
||||||
var shippings = await _signalRClient.GetNotMeasuredShippings();
|
var shippings = await _signalRClient.GetNotMeasuredShippings();
|
||||||
|
|
||||||
Assert.IsNotNull(shippings);
|
Assert.IsNotNull(shippings);
|
||||||
var ShippingMeasuredDateAddDay = 1000; //dfd
|
Assert.IsTrue(shippings.All(s => !s.IsAllMeasured));
|
||||||
Assert.IsTrue(shippings.All(s => !s.IsAllMeasured || s.MeasuredDate != null || s.MeasuredDate < DateTime.Now.AddDays(ShippingMeasuredDateAddDay)));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//[TestMethod]
|
//[TestMethod]
|
||||||
|
|
@ -163,9 +159,7 @@ namespace FruitBankHybrid.Shared.Tests
|
||||||
|
|
||||||
[DataTestMethod]
|
[DataTestMethod]
|
||||||
[DataRow(1)]
|
[DataRow(1)]
|
||||||
[DataRow(2)]
|
//[DataRow(2)]
|
||||||
//[DataRow(3)]
|
|
||||||
//[DataRow(4)]
|
|
||||||
public async Task UpdateShippingItemTest(int shippingItemId)
|
public async Task UpdateShippingItemTest(int shippingItemId)
|
||||||
{
|
{
|
||||||
var originalShippingItem = await GetShippingItemByIdTest(shippingItemId);
|
var originalShippingItem = await GetShippingItemByIdTest(shippingItemId);
|
||||||
|
|
@ -255,17 +249,6 @@ namespace FruitBankHybrid.Shared.Tests
|
||||||
Assert.IsTrue(users.All(x => !x.Email.IsNullOrEmpty() && !x.Deleted));
|
Assert.IsTrue(users.All(x => !x.Email.IsNullOrEmpty() && !x.Deleted));
|
||||||
}
|
}
|
||||||
|
|
||||||
[TestMethod]
|
|
||||||
[DataRow(CustomerIdAasdDsserverCom)]
|
|
||||||
public async Task GetCustomerRolesByCustomerIdTest(int customerId)
|
|
||||||
{
|
|
||||||
var customerRoles = await _signalRClient.GetCustomerRolesByCustomerId(customerId);
|
|
||||||
|
|
||||||
Assert.IsNotNull(customerRoles);
|
|
||||||
Assert.IsTrue(customerRoles.Count > 0);
|
|
||||||
Assert.IsTrue(customerRoles.Any(cr => cr.SystemName == "Measuring"));
|
|
||||||
}
|
|
||||||
|
|
||||||
#endregion Customer
|
#endregion Customer
|
||||||
|
|
||||||
#region Product
|
#region Product
|
||||||
|
|
@ -282,7 +265,6 @@ namespace FruitBankHybrid.Shared.Tests
|
||||||
|
|
||||||
#endregion Product
|
#endregion Product
|
||||||
|
|
||||||
#region Login
|
|
||||||
[TestMethod]
|
[TestMethod]
|
||||||
[DataRow("aasd@dsserver.com", "Asdasd123456")]
|
[DataRow("aasd@dsserver.com", "Asdasd123456")]
|
||||||
public async Task LoginMeasuringUserTest_TrueIfHasCustomerDto(string email, string password)
|
public async Task LoginMeasuringUserTest_TrueIfHasCustomerDto(string email, string password)
|
||||||
|
|
@ -307,6 +289,5 @@ namespace FruitBankHybrid.Shared.Tests
|
||||||
Assert.IsFalse(loginModelResponse.ErrorMessage.IsNullOrWhiteSpace());
|
Assert.IsFalse(loginModelResponse.ErrorMessage.IsNullOrWhiteSpace());
|
||||||
Console.WriteLine($"Succes: {loginModelResponse.ErrorMessage}");
|
Console.WriteLine($"Succes: {loginModelResponse.ErrorMessage}");
|
||||||
}
|
}
|
||||||
#endregion Login
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -11,7 +11,7 @@
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="DevExpress.Blazor" Version="25.1.3" />
|
<PackageReference Include="DevExpress.Blazor" Version="25.1.*" />
|
||||||
<PackageReference Include="MessagePack" Version="3.1.4" />
|
<PackageReference Include="MessagePack" Version="3.1.4" />
|
||||||
<PackageReference Include="MessagePack.Annotations" Version="3.1.4" />
|
<PackageReference Include="MessagePack.Annotations" Version="3.1.4" />
|
||||||
<PackageReference Include="Microsoft.AspNetCore.Components.Web" Version="9.0.9" />
|
<PackageReference Include="Microsoft.AspNetCore.Components.Web" Version="9.0.9" />
|
||||||
|
|
@ -46,19 +46,19 @@
|
||||||
<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="DevExpress.Blazor.Resources.v25.1">
|
||||||
|
<HintPath>C:\Program Files\DevExpress 25.1\Components\Bin\NetCore\DevExpress.Blazor.Resources.v25.1.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="DevExpress.Blazor.v25.1">
|
<Reference Include="DevExpress.Blazor.v25.1">
|
||||||
|
<HintPath>C:\Program Files\DevExpress 25.1\Components\Bin\NetCore\DevExpress.Blazor.v25.1.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="DevExpress.Blazor.v25.1.Viewer">
|
<Reference Include="DevExpress.Blazor.v25.1.Viewer">
|
||||||
|
<HintPath>C:\Program Files\DevExpress 25.1\Components\Bin\NetCore\DevExpress.Blazor.v25.1.Viewer.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="DevExpress.Data.v25.1">
|
<Reference Include="DevExpress.Data.v25.1">
|
||||||
|
<HintPath>C:\Program Files\DevExpress 25.1\Components\Bin\NetCore\DevExpress.Data.v25.1.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="DevExpress.Utils.v25.1">
|
<Reference Include="DevExpress.Utils.v25.1">
|
||||||
|
<HintPath>C:\Program Files\DevExpress 25.1\Components\Bin\NetCore\DevExpress.Utils.v25.1.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<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>
|
||||||
|
|
|
||||||
|
|
@ -1,30 +1,23 @@
|
||||||
@using FruitBank.Common.Models
|
@inherits LayoutComponentBase
|
||||||
@inherits LayoutComponentBase
|
|
||||||
|
|
||||||
<div class="page">
|
<div class="page">
|
||||||
<div class="sidebar">
|
<div class="sidebar">
|
||||||
<NavMenu @ref="_navMenu" />
|
<NavMenu />
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<main>
|
<main>
|
||||||
<div class="top-row px-4">
|
<div class="top-row px-4">
|
||||||
@if (LoggedInModel.IsLoggedIn)
|
<a href="">Kijelentkezés</a>
|
||||||
{
|
</div>
|
||||||
<DxButton Text="Kijelentkezés" Click="OnLogoutClick" />
|
|
||||||
@* <a href="" on>Kijelentkezés</a> *@
|
|
||||||
}
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<article class="content px-4">
|
<article class="content px-4">
|
||||||
<CascadingValue Value="RefreshMainLayoutEventCallback">
|
@Body
|
||||||
@Body
|
</article>
|
||||||
</CascadingValue>
|
</main>
|
||||||
</article>
|
|
||||||
</main>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="blazor-error-ui" data-nosnippet>
|
<div id="blazor-error-ui" data-nosnippet>
|
||||||
An unhandled error has occurred.
|
An unhandled error has occurred.
|
||||||
<a href="." class="reload">Reload</a>
|
<a href="." class="reload">Reload</a>
|
||||||
<span class="dismiss">🗙</span>
|
<span class="dismiss">🗙</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -1,25 +0,0 @@
|
||||||
using FruitBank.Common.Models;
|
|
||||||
using Microsoft.AspNetCore.Components;
|
|
||||||
|
|
||||||
namespace FruitBankHybrid.Shared.Layout;
|
|
||||||
|
|
||||||
public partial class MainLayout : LayoutComponentBase
|
|
||||||
{
|
|
||||||
[Inject] public required LoggedInModel LoggedInModel { get; set; }
|
|
||||||
|
|
||||||
private EventCallback RefreshMainLayoutEventCallback => EventCallback.Factory.Create(this, RefreshMainLayout);
|
|
||||||
private NavMenu _navMenu = null!;
|
|
||||||
|
|
||||||
private void OnLogoutClick()
|
|
||||||
{
|
|
||||||
LoggedInModel.LogOut();
|
|
||||||
|
|
||||||
RefreshMainLayout();
|
|
||||||
}
|
|
||||||
|
|
||||||
public void RefreshMainLayout()
|
|
||||||
{
|
|
||||||
_navMenu.RefreshNavMenu();
|
|
||||||
StateHasChanged();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,8 +1,4 @@
|
||||||
@using AyCode.Core
|
<div class="top-row ps-3 navbar navbar-dark">
|
||||||
@using FruitBank.Common.Models
|
|
||||||
@inject LoggedInModel LoggedInModel
|
|
||||||
|
|
||||||
<div class="top-row ps-3 navbar navbar-dark">
|
|
||||||
<div class="container-fluid">
|
<div class="container-fluid">
|
||||||
<a class="navbar-brand" href="">FruitBank Measuring</a>
|
<a class="navbar-brand" href="">FruitBank Measuring</a>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -12,25 +8,21 @@
|
||||||
|
|
||||||
<div class="nav-scrollable" onclick="document.querySelector('.navbar-toggler').click()">
|
<div class="nav-scrollable" onclick="document.querySelector('.navbar-toggler').click()">
|
||||||
<nav class="flex-column">
|
<nav class="flex-column">
|
||||||
@if (LoggedInModel.IsLoggedIn)// || AcDomain.IsDeveloperVersion)
|
<div class="nav-item px-3">
|
||||||
{
|
<NavLink class="nav-link" href="" Match="NavLinkMatch.All">
|
||||||
<div class="nav-item px-3">
|
<span class="icon home-icon" aria-hidden="true"></span> Kezdőlap
|
||||||
<NavLink class="nav-link" href="" Match="NavLinkMatch.All">
|
</NavLink>
|
||||||
<span class="icon home-icon" aria-hidden="true"></span> Kezdőlap
|
</div>
|
||||||
</NavLink>
|
<div class="nav-item px-3">
|
||||||
</div>
|
<NavLink class="nav-link" href="MeasuringIn">
|
||||||
<div class="nav-item px-3">
|
<span class="icon counter-icon" aria-hidden="true"></span> Bejövő mérés
|
||||||
<NavLink class="nav-link" href="MeasuringIn">
|
</NavLink>
|
||||||
<span class="icon counter-icon" aria-hidden="true"></span> Bejövő mérés
|
</div>
|
||||||
</NavLink>
|
<div class="nav-item px-3">
|
||||||
</div>
|
<NavLink class="nav-link" href="MeasuringOut">
|
||||||
<div class="nav-item px-3">
|
<span class="icon counter-icon" aria-hidden="true"></span> Kimenő mérés
|
||||||
<NavLink class="nav-link" href="MeasuringOut">
|
</NavLink>
|
||||||
<span class="icon counter-icon" aria-hidden="true"></span> Kimenő mérés
|
</div>
|
||||||
</NavLink>
|
|
||||||
</div>
|
|
||||||
}
|
|
||||||
|
|
||||||
<div class="nav-item px-3">
|
<div class="nav-item px-3">
|
||||||
<NavLink class="nav-link" href="Login">
|
<NavLink class="nav-link" href="Login">
|
||||||
<span class="icon weather-icon" aria-hidden="true"></span> Bejelentkezés
|
<span class="icon weather-icon" aria-hidden="true"></span> Bejelentkezés
|
||||||
|
|
@ -40,10 +32,3 @@
|
||||||
</nav>
|
</nav>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@code
|
|
||||||
{
|
|
||||||
public void RefreshNavMenu()
|
|
||||||
{
|
|
||||||
StateHasChanged();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -0,0 +1,30 @@
|
||||||
|
<div class="top-row ps-3 navbar navbar-dark">
|
||||||
|
<div class="container-fluid">
|
||||||
|
<a class="navbar-brand" href="">FruitBankHybrid</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<input type="checkbox" title="Navigation menu" class="navbar-toggler" />
|
||||||
|
|
||||||
|
<div class="nav-scrollable" onclick="document.querySelector('.navbar-toggler').click()">
|
||||||
|
<nav class="flex-column">
|
||||||
|
<div class="nav-item px-3">
|
||||||
|
<NavLink class="nav-link" href="" Match="NavLinkMatch.All">
|
||||||
|
<span class="icon home-icon" aria-hidden="true"></span> Home
|
||||||
|
</NavLink>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="nav-item px-3">
|
||||||
|
<NavLink class="nav-link" href="counter">
|
||||||
|
<span class="icon counter-icon" aria-hidden="true"></span> Counter
|
||||||
|
</NavLink>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="nav-item px-3">
|
||||||
|
<NavLink class="nav-link" href="weather">
|
||||||
|
<span class="icon weather-icon" aria-hidden="true"></span> Weather
|
||||||
|
</NavLink>
|
||||||
|
</div>
|
||||||
|
</nav>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
@ -1,12 +1,9 @@
|
||||||
using FruitBank.Common.Models;
|
using Microsoft.AspNetCore.Components;
|
||||||
using Microsoft.AspNetCore.Components;
|
|
||||||
|
|
||||||
namespace FruitBankHybrid.Shared.Pages;
|
namespace FruitBankHybrid.Shared.Pages;
|
||||||
|
|
||||||
public partial class Home : ComponentBase
|
public partial class Home : ComponentBase
|
||||||
{
|
{
|
||||||
[Inject] public required LoggedInModel LoggedInModel { get; set; }
|
|
||||||
|
|
||||||
private string Factor => FormFactor.GetFormFactor();
|
private string Factor => FormFactor.GetFormFactor();
|
||||||
private string Platform => FormFactor.GetPlatform();
|
private string Platform => FormFactor.GetPlatform();
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -3,50 +3,46 @@
|
||||||
|
|
||||||
<h3>Bejelentkezés</h3>
|
<h3>Bejelentkezés</h3>
|
||||||
|
|
||||||
|
<DxFormLayout CaptionPosition="CaptionPosition.Vertical" CssClass="w-500">
|
||||||
@if (!LoggedInModel.IsLoggedIn)
|
<DxFormLayoutItem Caption="Válasszon felhasználót:" ColSpanMd="6">
|
||||||
{
|
<DxComboBox Data="@Users"
|
||||||
<DxFormLayout CaptionPosition="CaptionPosition.Vertical" CssClass="w-500">
|
@bind-Value="@SelectedUser"
|
||||||
<DxFormLayoutItem Caption="Válasszon felhasználót:" ColSpanMd="6">
|
Text="Select Employee"
|
||||||
<DxComboBox Data="@Users"
|
ValueFieldName="@nameof(CustomerDto.Id)"
|
||||||
@bind-Value="@SelectedUser"
|
TextFieldName="@nameof(CustomerDto.FullName)"
|
||||||
Text="Select Employee"
|
CssClass="cw-320"
|
||||||
ValueFieldName="@nameof(CustomerDto.Id)"
|
InputId="cbItemTemplate">
|
||||||
TextFieldName="@nameof(CustomerDto.FullName)"
|
<ItemDisplayTemplate Context="ctxCombo">
|
||||||
CssClass="cw-320"
|
<div class="combobox-item-template">
|
||||||
InputId="cbItemTemplate">
|
<img src="@GetImageFileName(ctxCombo.DataItem)" alt="@ctxCombo.DataItem.Email" />
|
||||||
<ItemDisplayTemplate Context="ctxCombo">
|
<div class="combobox-item-template-text">
|
||||||
<div class="combobox-item-template">
|
<span>@ctxCombo.DataItem.FullName</span>
|
||||||
<img src="@GetImageFileName(ctxCombo.DataItem)" alt="@ctxCombo.DataItem.Email" />
|
<span class="combobox-item-template-employee-phone">@ctxCombo.DataItem.Email</span>
|
||||||
<div class="combobox-item-template-text">
|
|
||||||
<span>@ctxCombo.DataItem.FullName</span>
|
|
||||||
<span class="combobox-item-template-employee-phone">@ctxCombo.DataItem.Email</span>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</ItemDisplayTemplate>
|
</div>
|
||||||
</DxComboBox>
|
</ItemDisplayTemplate>
|
||||||
</DxFormLayoutItem>
|
</DxComboBox>
|
||||||
|
</DxFormLayoutItem>
|
||||||
|
|
||||||
<DxFormLayoutItem Caption="Adja meg a jelszavát:" ColSpanMd="6">
|
<DxFormLayoutItem Caption="Adja meg a jelszavát:" ColSpanMd="6">
|
||||||
<DxTextBox @bind-Text="@PasswordValue"
|
<DxTextBox @bind-Text="@PasswordValue"
|
||||||
@onkeydown="OnPasswordKeyDown"
|
@onkeydown="OnPasswordKeyDown"
|
||||||
Password="true"
|
Password="true"
|
||||||
CssClass="cw-320"
|
CssClass="cw-320"
|
||||||
ClearButtonDisplayMode="DataEditorClearButtonDisplayMode.Auto"
|
ClearButtonDisplayMode="DataEditorClearButtonDisplayMode.Auto"
|
||||||
BindValueMode="BindValueMode.OnInput"
|
BindValueMode="BindValueMode.OnInput"
|
||||||
NullText="Enter password"
|
NullText="Enter password"
|
||||||
InputId="tbPassword" />
|
InputId="tbPassword" />
|
||||||
</DxFormLayoutItem>
|
</DxFormLayoutItem>
|
||||||
|
|
||||||
<DxFormLayoutItem ColSpanMd="12" BeginRow="true">
|
<DxFormLayoutItem ColSpanMd="12" BeginRow="true">
|
||||||
<DxButton Text="Bejelentkezés" Click="OnLoginClick" CssClass="w-100" />
|
<DxButton Text="Bejelentkezés" Click="OnLoginClick" CssClass="w-100" />
|
||||||
</DxFormLayoutItem>
|
</DxFormLayoutItem>
|
||||||
|
|
||||||
</DxFormLayout>
|
</DxFormLayout>
|
||||||
}
|
|
||||||
|
|
||||||
<div class="row w-100" style="margin-top: 30px;">
|
<div class="row w-100" style="margin-top: 30px;">
|
||||||
<div class="col-md-12">
|
<div class="col-md-12">
|
||||||
<b>@(LoggedInModel.CustomerDto == null ? LoginModelResponse?.ErrorMessage : LoggedInModel.CustomerDto.FullName + $" [{_rolesText}]")</b>
|
<b>@(LoginModelResponse?.CustomerDto == null ? LoginModelResponse?.ErrorMessage : LoginModelResponse?.CustomerDto.FullName)</b>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -3,7 +3,6 @@ using AyCode.Core.Loggers;
|
||||||
using AyCode.Interfaces.Users;
|
using AyCode.Interfaces.Users;
|
||||||
using AyCode.Utils.Extensions;
|
using AyCode.Utils.Extensions;
|
||||||
using FruitBank.Common.Loggers;
|
using FruitBank.Common.Loggers;
|
||||||
using FruitBank.Common.Models;
|
|
||||||
using FruitBankHybrid.Shared.Services.Loggers;
|
using FruitBankHybrid.Shared.Services.Loggers;
|
||||||
using FruitBankHybrid.Shared.Services.SignalRs;
|
using FruitBankHybrid.Shared.Services.SignalRs;
|
||||||
using Mango.Nop.Core.Dtos;
|
using Mango.Nop.Core.Dtos;
|
||||||
|
|
@ -18,7 +17,6 @@ public partial class Login : ComponentBase
|
||||||
{
|
{
|
||||||
[Inject] public required IEnumerable<IAcLogWriterClientBase> LogWriters { get; set; }
|
[Inject] public required IEnumerable<IAcLogWriterClientBase> LogWriters { get; set; }
|
||||||
[Inject] public required FruitBankSignalRClient FruitBankSignalRClient { get; set; }
|
[Inject] public required FruitBankSignalRClient FruitBankSignalRClient { get; set; }
|
||||||
[Inject] public required LoggedInModel LoggedInModel { get; set; }
|
|
||||||
|
|
||||||
private ILogger _logger = null!;
|
private ILogger _logger = null!;
|
||||||
private List<CustomerDto> Users { get; set; }
|
private List<CustomerDto> Users { get; set; }
|
||||||
|
|
@ -26,31 +24,20 @@ public partial class Login : ComponentBase
|
||||||
private string PasswordValue { get; set; } = string.Empty;
|
private string PasswordValue { get; set; } = string.Empty;
|
||||||
|
|
||||||
private MgLoginModelResponse? LoginModelResponse { get; set; }
|
private MgLoginModelResponse? LoginModelResponse { get; set; }
|
||||||
|
|
||||||
[CascadingParameter]
|
|
||||||
public EventCallback UpdateStyle { get; set; }
|
|
||||||
|
|
||||||
protected override async Task OnInitializedAsync()
|
protected override async Task OnInitializedAsync()
|
||||||
{
|
{
|
||||||
_logger = new LoggerClient<Login>(LogWriters.ToArray());
|
_logger = new LoggerClient<Login>(LogWriters.ToArray());
|
||||||
_logger.Info("OnInitializedAsync");
|
_logger.Info("OnInitializedAsync");
|
||||||
|
|
||||||
if (!LoggedInModel.IsLoggedIn)
|
Users = await FruitBankSignalRClient.GetMeasuringUsers() ?? [];
|
||||||
{
|
SelectedUser = Users.FirstOrDefault();
|
||||||
Users = await FruitBankSignalRClient.GetMeasuringUsers() ?? [];
|
|
||||||
SelectedUser = Users.FirstOrDefault();
|
|
||||||
}
|
|
||||||
else _rolesText = string.Join("; ", LoggedInModel.CustomerRoles.Select(x => x.Name));
|
|
||||||
|
|
||||||
await base.OnInitializedAsync();
|
await base.OnInitializedAsync();
|
||||||
}
|
}
|
||||||
|
|
||||||
private string _rolesText = string.Empty;
|
|
||||||
private async Task OnLoginClick()
|
private async Task OnLoginClick()
|
||||||
{
|
{
|
||||||
if (LoggedInModel.IsLoggedIn) return;
|
|
||||||
|
|
||||||
_rolesText = string.Empty;
|
|
||||||
if (SelectedUser == null || PasswordValue.IsNullOrWhiteSpace())
|
if (SelectedUser == null || PasswordValue.IsNullOrWhiteSpace())
|
||||||
{
|
{
|
||||||
LoginModelResponse = new MgLoginModelResponse
|
LoginModelResponse = new MgLoginModelResponse
|
||||||
|
|
@ -62,27 +49,11 @@ public partial class Login : ComponentBase
|
||||||
}
|
}
|
||||||
|
|
||||||
LoginModelResponse = await FruitBankSignalRClient.LoginMeasuringUser(SelectedUser.Email, PasswordValue);
|
LoginModelResponse = await FruitBankSignalRClient.LoginMeasuringUser(SelectedUser.Email, PasswordValue);
|
||||||
|
|
||||||
if (LoginModelResponse is { IsSuccesLogin: true })
|
|
||||||
{
|
|
||||||
LoggedInModel.InitLoggedInCustomer(LoginModelResponse.CustomerDto);
|
|
||||||
|
|
||||||
var customerRoles = await FruitBankSignalRClient.GetCustomerRolesByCustomerId(LoginModelResponse.CustomerDto!.Id);
|
|
||||||
if (customerRoles != null)
|
|
||||||
{
|
|
||||||
LoggedInModel.InitCustomerRoles(customerRoles);
|
|
||||||
|
|
||||||
_rolesText = string.Join("; ", LoggedInModel.CustomerRoles.Select(x => x.Name));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
await UpdateStyle.InvokeAsync();
|
|
||||||
StateHasChanged();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
protected async Task OnPasswordKeyDown(KeyboardEventArgs e)
|
protected async Task OnPasswordKeyDown(KeyboardEventArgs e)
|
||||||
{
|
{
|
||||||
if (!LoggedInModel.IsLoggedIn && e.Key == "Enter") await OnLoginClick();
|
if (e.Key == "Enter") await OnLoginClick();
|
||||||
}
|
}
|
||||||
|
|
||||||
private string GetImageFileName(CustomerDto employee)
|
private string GetImageFileName(CustomerDto employee)
|
||||||
|
|
|
||||||
|
|
@ -103,14 +103,14 @@
|
||||||
@* <DataAnnotationsValidator /> *@
|
@* <DataAnnotationsValidator /> *@
|
||||||
<DxFormLayout Data="@SelectedShippingItem" CaptionPosition="CaptionPosition.Vertical" CssClass="w-100" ItemUpdating="@((pair) => OnItemUpdating(pair.Key, pair.Value))">
|
<DxFormLayout Data="@SelectedShippingItem" CaptionPosition="CaptionPosition.Vertical" CssClass="w-100" ItemUpdating="@((pair) => OnItemUpdating(pair.Key, pair.Value))">
|
||||||
<DxFormLayoutItem CaptionCssClass="@(SelectedShippingItem.IsMeasured ? "text-success" : "")" Field="@nameof(ShippingItem.Name)" Caption="Item Name:" Enabled="false" ColSpanMd="6" />
|
<DxFormLayoutItem CaptionCssClass="@(SelectedShippingItem.IsMeasured ? "text-success" : "")" Field="@nameof(ShippingItem.Name)" Caption="Item Name:" Enabled="false" ColSpanMd="6" />
|
||||||
<DxFormLayoutItem Visible="false" CaptionCssClass="@(SelectedShippingItem.IsMeasured ? "text-success" : "")" Field="@nameof(ShippingItem.GrossWeight)" Caption="GrossWeight:" Enabled="false" ColSpanMd="3" />
|
<DxFormLayoutItem CaptionCssClass="@(SelectedShippingItem.IsMeasured ? "text-success" : "")" Field="@nameof(ShippingItem.GrossWeight)" Caption="GrossWeight:" Enabled="false" ColSpanMd="3" />
|
||||||
<DxFormLayoutItem Visible="false" CaptionCssClass="@(SelectedShippingItem.IsMeasured ? "text-success" : "")" Field="@nameof(ShippingItem.NetWeight)" Caption="NetWeight:" Enabled="false" ColSpanMd="3" />
|
<DxFormLayoutItem CaptionCssClass="@(SelectedShippingItem.IsMeasured ? "text-success" : "")" Field="@nameof(ShippingItem.NetWeight)" Caption="NetWeight:" Enabled="false" ColSpanMd="3" />
|
||||||
|
|
||||||
<DxFormLayoutItem CaptionCssClass="@(SelectedShippingItem.IsMeasured ? "text-success" : "")"
|
<DxFormLayoutItem CaptionCssClass="@(SelectedShippingItem.IsMeasured ? "text-success" : "")"
|
||||||
Field="@nameof(ShippingItem.MeasuredQuantity)"
|
Field="@nameof(ShippingItem.MeasuredQuantity)"
|
||||||
Caption="MeasuredQuantity:"
|
Caption="MeasuredQuantity:"
|
||||||
ColSpanMd="2"
|
ColSpanMd="2"
|
||||||
BeginRow="false">
|
BeginRow="true">
|
||||||
</DxFormLayoutItem>
|
</DxFormLayoutItem>
|
||||||
|
|
||||||
<DxFormLayoutItem CaptionCssClass="@(SelectedShippingItem.IsMeasured ? "text-success" : "")"
|
<DxFormLayoutItem CaptionCssClass="@(SelectedShippingItem.IsMeasured ? "text-success" : "")"
|
||||||
|
|
@ -127,7 +127,7 @@
|
||||||
ColSpanMd="2">
|
ColSpanMd="2">
|
||||||
</DxFormLayoutItem>
|
</DxFormLayoutItem>
|
||||||
|
|
||||||
<DxFormLayoutItem Visible="false" CaptionCssClass="@(SelectedShippingItem.IsMeasured ? "text-success" : "")"
|
<DxFormLayoutItem CaptionCssClass="@(SelectedShippingItem.IsMeasured ? "text-success" : "")"
|
||||||
Field="@nameof(ShippingItem.IsMeasured)"
|
Field="@nameof(ShippingItem.IsMeasured)"
|
||||||
Enabled="false" Caption="Sikeres mérés:" ColSpanMd="6">
|
Enabled="false" Caption="Sikeres mérés:" ColSpanMd="6">
|
||||||
</DxFormLayoutItem>
|
</DxFormLayoutItem>
|
||||||
|
|
|
||||||
|
|
@ -26,7 +26,6 @@ namespace FruitBankHybrid.Shared.Pages
|
||||||
{
|
{
|
||||||
[Inject] public required IEnumerable<IAcLogWriterClientBase> LogWriters { get; set; }
|
[Inject] public required IEnumerable<IAcLogWriterClientBase> LogWriters { get; set; }
|
||||||
[Inject] public required FruitBankSignalRClient FruitBankSignalRClient { get; set; }
|
[Inject] public required FruitBankSignalRClient FruitBankSignalRClient { get; set; }
|
||||||
[Inject] public required LoggedInModel LoggedInModel { get; set; }
|
|
||||||
|
|
||||||
private ILogger _logger = null!;
|
private ILogger _logger = null!;
|
||||||
|
|
||||||
|
|
@ -55,11 +54,14 @@ namespace FruitBankHybrid.Shared.Pages
|
||||||
|
|
||||||
private async Task RefreshShippingsFromDb(DateTime dateTime)
|
private async Task RefreshShippingsFromDb(DateTime dateTime)
|
||||||
{
|
{
|
||||||
var shippings = await FruitBankSignalRClient.GetNotMeasuredShippings() ?? [];
|
var shippings = await FruitBankSignalRClient.GetShippings() ?? [];
|
||||||
|
|
||||||
_shippingDates = shippings.Select(shipping => new ShippingDateModel(shipping.Id, shipping.ShippingDate.Date, shipping.IsAllMeasured)).ToList();
|
_shippingDates = shippings.Select(shipping => new ShippingDateModel(shipping.Id, shipping.ShippingDate.Date, shipping.IsAllMeasured)).ToList();
|
||||||
NotMeasuredShippings = shippings.Where(shipping => DaysEqual(shipping.ShippingDate.Date, dateTime)).ToList();
|
NotMeasuredShippings = shippings.Where(shipping => DaysEqual(shipping.ShippingDate.Date, dateTime)).ToList();
|
||||||
|
|
||||||
|
//if (getAllShipping) NotMeasuredShippings = await FruitBankSignalRClient.GetShippings() ?? [];
|
||||||
|
//else NotMeasuredShippings = await FruitBankSignalRClient.GetNotMeasuredShippings() ?? [];
|
||||||
|
|
||||||
SelectedShipping = NotMeasuredShippings.FirstOrDefault();
|
SelectedShipping = NotMeasuredShippings.FirstOrDefault();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -122,7 +124,6 @@ namespace FruitBankHybrid.Shared.Pages
|
||||||
SelectedShippingItem.MeasuredQuantity = shippingItemFromDb.MeasuredQuantity;
|
SelectedShippingItem.MeasuredQuantity = shippingItemFromDb.MeasuredQuantity;
|
||||||
SelectedShippingItem.MeasuredNetWeight = shippingItemFromDb.MeasuredNetWeight;
|
SelectedShippingItem.MeasuredNetWeight = shippingItemFromDb.MeasuredNetWeight;
|
||||||
SelectedShippingItem.MeasuredGrossWeight = shippingItemFromDb.MeasuredGrossWeight;
|
SelectedShippingItem.MeasuredGrossWeight = shippingItemFromDb.MeasuredGrossWeight;
|
||||||
//SelectedShippingItem.IsMeasurable = shippingItemFromDb.IsMeasurable;
|
|
||||||
SelectedShippingItem.IsMeasured = shippingItemFromDb.IsMeasured;
|
SelectedShippingItem.IsMeasured = shippingItemFromDb.IsMeasured;
|
||||||
|
|
||||||
if (SelectedShippingDocument != null)
|
if (SelectedShippingDocument != null)
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,4 @@
|
||||||
using FruitBank.Common.Models;
|
using Microsoft.AspNetCore.Components;
|
||||||
using Microsoft.AspNetCore.Components;
|
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
|
|
@ -10,6 +9,5 @@ namespace FruitBankHybrid.Shared.Pages
|
||||||
{
|
{
|
||||||
public partial class MeasuringOut : ComponentBase
|
public partial class MeasuringOut : ComponentBase
|
||||||
{
|
{
|
||||||
[Inject] public required LoggedInModel LoggedInModel { get; set; }
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -10,7 +10,6 @@ using FruitBank.Common.SignalRs;
|
||||||
using FruitBankHybrid.Shared.Services.Loggers;
|
using FruitBankHybrid.Shared.Services.Loggers;
|
||||||
using Mango.Nop.Core.Dtos;
|
using Mango.Nop.Core.Dtos;
|
||||||
using Mango.Nop.Core.Models;
|
using Mango.Nop.Core.Models;
|
||||||
using Nop.Core.Domain.Customers;
|
|
||||||
|
|
||||||
namespace FruitBankHybrid.Shared.Services.SignalRs
|
namespace FruitBankHybrid.Shared.Services.SignalRs
|
||||||
{
|
{
|
||||||
|
|
@ -95,9 +94,7 @@ namespace FruitBankHybrid.Shared.Services.SignalRs
|
||||||
|
|
||||||
public Task<List<CustomerDto>?> GetMeasuringUsers()
|
public Task<List<CustomerDto>?> GetMeasuringUsers()
|
||||||
=> GetAllAsync<List<CustomerDto>>(SignalRTags.GetMeasuringUsers);
|
=> GetAllAsync<List<CustomerDto>>(SignalRTags.GetMeasuringUsers);
|
||||||
|
|
||||||
public Task<List<CustomerRole>?> GetCustomerRolesByCustomerId(int customerId)
|
|
||||||
=> GetAllAsync<List<CustomerRole>>(SignalRTags.GetCustomerRolesByCustomerId, [customerId]);
|
|
||||||
#endregion Customer
|
#endregion Customer
|
||||||
|
|
||||||
#region Product
|
#region Product
|
||||||
|
|
|
||||||
|
|
@ -40,19 +40,19 @@
|
||||||
<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="DevExpress.Blazor.Resources.v25.1">
|
||||||
|
<HintPath>C:\Program Files\DevExpress 25.1\Components\Bin\NetCore\DevExpress.Blazor.Resources.v25.1.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="DevExpress.Blazor.v25.1">
|
<Reference Include="DevExpress.Blazor.v25.1">
|
||||||
|
<HintPath>C:\Program Files\DevExpress 25.1\Components\Bin\NetCore\DevExpress.Blazor.v25.1.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="DevExpress.Blazor.v25.1.Viewer">
|
<Reference Include="DevExpress.Blazor.v25.1.Viewer">
|
||||||
|
<HintPath>C:\Program Files\DevExpress 25.1\Components\Bin\NetCore\DevExpress.Blazor.v25.1.Viewer.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="DevExpress.Data.v25.1">
|
<Reference Include="DevExpress.Data.v25.1">
|
||||||
|
<HintPath>C:\Program Files\DevExpress 25.1\Components\Bin\NetCore\DevExpress.Data.v25.1.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="DevExpress.Utils.v25.1">
|
<Reference Include="DevExpress.Utils.v25.1">
|
||||||
|
<HintPath>C:\Program Files\DevExpress 25.1\Components\Bin\NetCore\DevExpress.Utils.v25.1.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,5 @@
|
||||||
using AyCode.Core.Loggers;
|
using AyCode.Core.Loggers;
|
||||||
using FruitBank.Common.Loggers;
|
using FruitBank.Common.Loggers;
|
||||||
using FruitBank.Common.Models;
|
|
||||||
using FruitBankHybrid.Shared.Services;
|
using FruitBankHybrid.Shared.Services;
|
||||||
using FruitBankHybrid.Shared.Services.SignalRs;
|
using FruitBankHybrid.Shared.Services.SignalRs;
|
||||||
using FruitBankHybrid.Web.Client.Services;
|
using FruitBankHybrid.Web.Client.Services;
|
||||||
|
|
@ -15,7 +14,6 @@ builder.Services.AddDevExpressBlazor(configure => configure.SizeMode = DevExpres
|
||||||
builder.Services.AddSingleton<IFormFactor, FormFactor>();
|
builder.Services.AddSingleton<IFormFactor, FormFactor>();
|
||||||
//builder.Services.AddScoped<ISignalRService, SignalRService>();
|
//builder.Services.AddScoped<ISignalRService, SignalRService>();
|
||||||
|
|
||||||
builder.Services.AddSingleton<LoggedInModel>();
|
|
||||||
builder.Services.AddScoped<FruitBankSignalRClient>();
|
builder.Services.AddScoped<FruitBankSignalRClient>();
|
||||||
|
|
||||||
#if DEBUG
|
#if DEBUG
|
||||||
|
|
|
||||||
|
|
@ -14,7 +14,7 @@
|
||||||
<ProjectReference Include="..\FruitBankHybrid.Shared\FruitBankHybrid.Shared.csproj" />
|
<ProjectReference Include="..\FruitBankHybrid.Shared\FruitBankHybrid.Shared.csproj" />
|
||||||
<ProjectReference Include="..\FruitBankHybrid.Web.Client\FruitBankHybrid.Web.Client.csproj" />
|
<ProjectReference Include="..\FruitBankHybrid.Web.Client\FruitBankHybrid.Web.Client.csproj" />
|
||||||
|
|
||||||
<PackageReference Include="DevExpress.Blazor" Version="25.1.3" />
|
<PackageReference Include="DevExpress.Blazor" Version="25.1.*" />
|
||||||
<PackageReference Include="MessagePack" Version="3.1.4" />
|
<PackageReference Include="MessagePack" Version="3.1.4" />
|
||||||
<PackageReference Include="MessagePack.Annotations" Version="3.1.4" />
|
<PackageReference Include="MessagePack.Annotations" Version="3.1.4" />
|
||||||
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.Server" Version="9.0.9" />
|
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.Server" Version="9.0.9" />
|
||||||
|
|
@ -57,19 +57,19 @@
|
||||||
<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="DevExpress.Blazor.Resources.v25.1">
|
||||||
|
<HintPath>C:\Program Files\DevExpress 25.1\Components\Bin\NetCore\DevExpress.Blazor.Resources.v25.1.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="DevExpress.Blazor.v25.1">
|
<Reference Include="DevExpress.Blazor.v25.1">
|
||||||
|
<HintPath>C:\Program Files\DevExpress 25.1\Components\Bin\NetCore\DevExpress.Blazor.v25.1.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="DevExpress.Blazor.v25.1.Viewer">
|
<Reference Include="DevExpress.Blazor.v25.1.Viewer">
|
||||||
|
<HintPath>C:\Program Files\DevExpress 25.1\Components\Bin\NetCore\DevExpress.Blazor.v25.1.Viewer.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="DevExpress.Data.v25.1">
|
<Reference Include="DevExpress.Data.v25.1">
|
||||||
|
<HintPath>C:\Program Files\DevExpress 25.1\Components\Bin\NetCore\DevExpress.Data.v25.1.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="DevExpress.Utils.v25.1">
|
<Reference Include="DevExpress.Utils.v25.1">
|
||||||
|
<HintPath>C:\Program Files\DevExpress 25.1\Components\Bin\NetCore\DevExpress.Utils.v25.1.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,5 @@
|
||||||
using AyCode.Core.Loggers;
|
using AyCode.Core.Loggers;
|
||||||
using FruitBank.Common;
|
using FruitBank.Common;
|
||||||
using FruitBank.Common.Models;
|
|
||||||
using FruitBank.Common.Server.Services.Loggers;
|
using FruitBank.Common.Server.Services.Loggers;
|
||||||
using FruitBank.Common.Server.Services.SignalRs;
|
using FruitBank.Common.Server.Services.SignalRs;
|
||||||
using FruitBankHybrid.Shared.Services;
|
using FruitBankHybrid.Shared.Services;
|
||||||
|
|
@ -15,9 +14,8 @@ builder.Services.AddMvc();
|
||||||
|
|
||||||
builder.Services.AddSingleton<IFormFactor, FormFactor>();
|
builder.Services.AddSingleton<IFormFactor, FormFactor>();
|
||||||
|
|
||||||
builder.Services.AddScoped<LoggedInModel>();
|
builder.Services.AddSingleton<LoggerToLoggerApiController>();
|
||||||
builder.Services.AddScoped<LoggerToLoggerApiController>();
|
builder.Services.AddSingleton<IAcLogWriterBase, ConsoleLogWriter>();
|
||||||
builder.Services.AddScoped<IAcLogWriterBase, ConsoleLogWriter>();
|
|
||||||
//builder.Services.AddSingleton<SessionService>();
|
//builder.Services.AddSingleton<SessionService>();
|
||||||
|
|
||||||
//builder.Services.AddScoped<IFruitBankDataControllerServer, FruitBankDataController>();
|
//builder.Services.AddScoped<IFruitBankDataControllerServer, FruitBankDataController>();
|
||||||
|
|
|
||||||
|
|
@ -1,12 +1,11 @@
|
||||||
using AyCode.Core.Loggers;
|
using FruitBankHybrid.Services;
|
||||||
using FruitBank.Common.Loggers;
|
|
||||||
using FruitBank.Common.Models;
|
|
||||||
using FruitBankHybrid.Services;
|
|
||||||
using FruitBankHybrid.Services.Loggers;
|
|
||||||
using FruitBankHybrid.Shared.Services;
|
using FruitBankHybrid.Shared.Services;
|
||||||
using FruitBankHybrid.Shared.Services.SignalRs;
|
|
||||||
//using DevExpress.Maui;
|
//using DevExpress.Maui;
|
||||||
using Microsoft.Extensions.Logging;
|
using Microsoft.Extensions.Logging;
|
||||||
|
using FruitBankHybrid.Shared.Services.SignalRs;
|
||||||
|
using FruitBank.Common.Loggers;
|
||||||
|
using AyCode.Core.Loggers;
|
||||||
|
using FruitBankHybrid.Services.Loggers;
|
||||||
|
|
||||||
namespace FruitBankHybrid
|
namespace FruitBankHybrid
|
||||||
{
|
{
|
||||||
|
|
@ -25,20 +24,18 @@ namespace FruitBankHybrid
|
||||||
fonts.AddFont("OpenSans-Regular.ttf", "OpenSansRegular");
|
fonts.AddFont("OpenSans-Regular.ttf", "OpenSansRegular");
|
||||||
});
|
});
|
||||||
|
|
||||||
// Add device-specific services used by the FruitBankHybrid.Shared project
|
// Add device-specific services used by the FruitBankHybrid.Shared project
|
||||||
builder.Services.AddSingleton<IFormFactor, FormFactor>();
|
builder.Services.AddSingleton<IFormFactor, FormFactor>();
|
||||||
|
//builder.Services.AddScoped<ISignalRService, SignalRService>();
|
||||||
builder.Services.AddSingleton<LoggedInModel>();
|
builder.Services.AddScoped<FruitBankSignalRClient>();
|
||||||
//builder.Services.AddScoped<ISignalRService, SignalRService>();
|
|
||||||
builder.Services.AddScoped<FruitBankSignalRClient>();
|
|
||||||
|
|
||||||
|
|
||||||
#if DEBUG
|
#if DEBUG
|
||||||
builder.Services.AddSingleton<IAcLogWriterClientBase, BrowserConsoleLogWriter>();
|
builder.Services.AddSingleton<IAcLogWriterClientBase, BrowserConsoleLogWriter>();
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
builder.Services.AddSingleton<IAcLogWriterClientBase, SignaRClientLogItemWriter>();
|
builder.Services.AddSingleton<IAcLogWriterClientBase, SignaRClientLogItemWriter>();
|
||||||
|
|
||||||
|
|
||||||
builder.Services.AddMauiBlazorWebView();
|
builder.Services.AddMauiBlazorWebView();
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue