Rename salesbook

This commit is contained in:
2025-06-26 10:08:21 +02:00
parent a34e673cd2
commit 3f2b7a6bb5
164 changed files with 267 additions and 262 deletions

View File

@@ -0,0 +1,35 @@
@page "/Error"
@using System.Diagnostics
<PageTitle>Error</PageTitle>
<h1 class="text-danger">Error.</h1>
<h2 class="text-danger">An error occurred while processing your request.</h2>
@if (ShowRequestId)
{
<p>
<strong>Request ID:</strong> <code>@RequestId</code>
</p>
}
<h3>Development Mode</h3>
<p>
Swapping to <strong>Development</strong> environment will display more detailed information about the error that occurred.
</p>
<p>
<strong>The Development environment shouldn't be enabled for deployed applications.</strong>
It can result in displaying sensitive information from exceptions to end users.
For local debugging, enable the <strong>Development</strong> environment by setting the <strong>ASPNETCORE_ENVIRONMENT</strong> environment variable to <strong>Development</strong>
and restarting the app.
</p>
@code {
private string? RequestId { get; set; }
private bool ShowRequestId => !string.IsNullOrEmpty(RequestId);
protected override void OnInitialized()
{
RequestId = Guid.NewGuid().ToString();
}
}

View File

@@ -0,0 +1,11 @@
@using System.Net.Http
@using System.Net.Http.Json
@using Microsoft.AspNetCore.Components.Forms
@using Microsoft.AspNetCore.Components.Routing
@using Microsoft.AspNetCore.Components.Web
@using static Microsoft.AspNetCore.Components.Web.RenderMode
@using Microsoft.AspNetCore.Components.Web.Virtualization
@using Microsoft.JSInterop
@using salesbook.Web
@using salesbook.Shared.Components
@using salesbook.Shared

View File

@@ -0,0 +1,15 @@
using salesbook.Shared.Core.Interface;
namespace salesbook.Web.Core.Services;
public class FormFactor : IFormFactor
{
public string GetFormFactor()
{
return "Web";
}
public string GetPlatform()
{
return Environment.OSVersion.ToString();
}
}

View File

@@ -0,0 +1,39 @@
using System.Linq.Expressions;
using salesbook.Shared.Core.Dto;
using salesbook.Shared.Core.Entity;
using salesbook.Shared.Core.Interface;
namespace salesbook.Web.Core.Services;
public class ManageDataService : IManageDataService
{
public Task<List<T>> GetTable<T>(Expression<Func<T, bool>>? whereCond = null) where T : new()
{
throw new NotImplementedException();
}
public Task<List<ActivityDTO>> GetActivity(Expression<Func<StbActivity, bool>>? whereCond = null)
{
throw new NotImplementedException();
}
public Task InsertOrUpdate<T>(T objectToSave)
{
throw new NotImplementedException();
}
public Task Delete<T>(T objectToDelete)
{
throw new NotImplementedException();
}
public Task DeleteActivity(ActivityDTO activity)
{
throw new NotImplementedException();
}
public Task ClearDb()
{
throw new NotImplementedException();
}
}

View File

@@ -0,0 +1,12 @@
using salesbook.Shared.Core.Interface;
namespace salesbook.Web.Core.Services;
public class NetworkService : INetworkService
{
public bool IsNetworkAvailable()
{
return true;
}
}

View File

@@ -0,0 +1,31 @@
using salesbook.Shared.Core.Interface;
namespace salesbook.Web.Core.Services;
public class SyncDbService : ISyncDbService
{
public Task GetAndSaveActivity(string? dateFilter = null)
{
throw new NotImplementedException();
}
public Task GetAndSaveCommesse(string? dateFilter = null)
{
throw new NotImplementedException();
}
public Task GetAndSaveProspect(string? dateFilter = null)
{
throw new NotImplementedException();
}
public Task GetAndSaveClienti(string? dateFilter = null)
{
throw new NotImplementedException();
}
public Task GetAndSaveSettings(string? dateFilter = null)
{
throw new NotImplementedException();
}
}

33
salesbook.Web/Program.cs Normal file
View File

@@ -0,0 +1,33 @@
using IntegryApiClient.Blazor;
using Microsoft.AspNetCore.Components.Authorization;
using Microsoft.AspNetCore.Components.Web;
using Microsoft.AspNetCore.Components.WebAssembly.Hosting;
using MudBlazor.Services;
using salesbook.Shared.Components;
using salesbook.Shared.Core.Interface;
using salesbook.Shared.Core.Services;
using salesbook.Web.Core.Services;
var builder = WebAssemblyHostBuilder.CreateDefault(args);
builder.Services.AddMudServices();
builder.Services.AddAuthorizationCore();
builder.Services.AddScoped<IFormFactor, FormFactor>();
builder.Services.AddScoped<INetworkService, NetworkService>();
builder.Services.AddScoped<IIntegryApiService, IntegryApiService>();
builder.Services.AddScoped<ISyncDbService, SyncDbService>();
builder.Services.AddScoped<IManageDataService, ManageDataService>();
builder.Services.AddScoped<AppAuthenticationStateProvider>();
builder.Services.AddScoped<AuthenticationStateProvider>(provider => provider.GetRequiredService<AppAuthenticationStateProvider>());
builder.Services.UseLoginAzienda("f0484398-1f8b-42f5-ab79-5282c164e1d8");
builder.RootComponents.Add<Routes>("#app");
builder.RootComponents.Add<HeadOutlet>("head::after");
builder.Services.AddScoped(_ => new HttpClient { BaseAddress = new Uri(builder.HostEnvironment.BaseAddress) });
var host = builder.Build();
await host.RunAsync();

View File

@@ -0,0 +1,48 @@
{
"$schema": "http://json.schemastore.org/launchsettings.json",
"iisSettings": {
"windowsAuthentication": false,
"anonymousAuthentication": true,
"iisExpress": {
"applicationUrl": "http://localhost:18277",
"sslPort": 44379
}
},
"profiles": {
"http": {
"commandName": "Project",
"dotnetRunMessages": true,
"launchBrowser": true,
"applicationUrl": "http://localhost:5153",
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
}
},
"http debugger": {
"commandName": "Project",
"dotnetRunMessages": true,
"launchBrowser": true,
"inspectUri": "{wsProtocol}://{url.hostname}:{url.port}/_framework/debug/ws-proxy?browser={browserInspectUri}",
"applicationUrl": "http://localhost:5154;http://0.0.0.0:5154",
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
}
},
"https": {
"commandName": "Project",
"dotnetRunMessages": true,
"launchBrowser": true,
"applicationUrl": "https://localhost:7125;http://localhost:5153",
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
}
},
"IIS Express": {
"commandName": "IISExpress",
"launchBrowser": true,
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
}
}
}
}

View File

@@ -0,0 +1,8 @@
{
"Logging": {
"LogLevel": {
"Default": "Information",
"Microsoft.AspNetCore": "Warning"
}
}
}

View File

@@ -0,0 +1,9 @@
{
"Logging": {
"LogLevel": {
"Default": "Information",
"Microsoft.AspNetCore": "Warning"
}
},
"AllowedHosts": "*"
}

View File

@@ -0,0 +1,33 @@
<Project Sdk="Microsoft.NET.Sdk.BlazorWebAssembly">
<PropertyGroup>
<TargetFramework>net9.0</TargetFramework>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
</PropertyGroup>
<ItemGroup>
<Compile Remove="Services\**" />
<Content Remove="Services\**" />
<EmbeddedResource Remove="Services\**" />
<MauiCss Remove="Services\**" />
<MauiXaml Remove="Services\**" />
<None Remove="Services\**" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="IntegryApiClient.Blazor" Version="1.1.4" />
<PackageReference Include="Microsoft.AspNetCore.Components.Authorization" Version="9.0.5" />
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly" Version="9.0.5" />
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.DevServer" Version="9.0.5" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\salesbook.Shared\salesbook.Shared.csproj" />
</ItemGroup>
<ItemGroup>
<Folder Include="wwwroot\" />
</ItemGroup>
</Project>

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

View File

@@ -0,0 +1,42 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<base href="/" />
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Nunito:ital,wght@0,200..1000;1,200..1000&display=swap" rel="stylesheet">
<link href="_content/salesbook.Shared/css/bootstrap/bootstrap.min.css" rel="stylesheet">
<link href="_content/salesbook.Shared/css/bootstrap/bootstrap-icons.min.css" rel="stylesheet" />
<link href="_content/MudBlazor/MudBlazor.min.css" rel="stylesheet" />
<link rel="stylesheet" href="_content/salesbook.Shared/css/remixicon/remixicon.css" />
<link rel="stylesheet" href="_content/salesbook.Shared/css/app.css" />
<link rel="stylesheet" href="_content/salesbook.Shared/css/default-theme.css" />
<link rel="stylesheet" href="salesbook.Web.styles.css" />
</head>
<body>
<div id="app">
<div class="spinner-container">
<span class="loader"></span>
</div>
</div>
<script src="_framework/blazor.webassembly.js"></script>
<script src="_content/salesbook.Shared/js/bootstrap/bootstrap.bundle.min.js"></script>
<!-- Add chart.js reference if chart components are used in your application. -->
<!--<script src="_content/ConSegna.Shared/js/bootstrap/chart.umd.js" integrity="sha512-gQhCDsnnnUfaRzD8k1L5llCCV6O9HN09zClIzzeJ8OJ9MpGmIlCxm+pdCkqTwqJ4JcjbojFr79rl2F1mzcoLMQ==" crossorigin="anonymous" referrerpolicy="no-referrer"></script>-->
<!-- Add chartjs-plugin-datalabels.min.js reference if chart components with data label feature is used in your application. -->
<!--<script src="_content/ConSegna.Shared/js/bootstrap/chartjs-plugin-datalabels.min.js" integrity="sha512-JPcRR8yFa8mmCsfrw4TNte1ZvF1e3+1SdGMslZvmrzDYxS69J7J49vkFL8u6u8PlPJK+H3voElBtUCzaXj+6ig==" crossorigin="anonymous" referrerpolicy="no-referrer"></script>-->
<!-- Add sortable.js reference if SortableList component is used in your application. -->
<!--<script src="_content/ConSegna.Shared/js/bootstrap/Sortable.min.js"></script>-->
<script src="_content/MudBlazor/MudBlazor.min.js"></script>
<script src="_content/salesbook.Shared/js/main.js"></script>
</body>
</html>