Compare commits
15 Commits
v2.1.3(20)
...
3fd5410bf5
| Author | SHA1 | Date | |
|---|---|---|---|
| 3fd5410bf5 | |||
| e338e7d253 | |||
| d982aa9bf5 | |||
| 39c34e7c7d | |||
| 1f530bc130 | |||
| a4c2eee49d | |||
| 70a34eef06 | |||
| c61ebe348c | |||
| e586279c6b | |||
| 85e227a5cb | |||
| 71ce027fb8 | |||
| 9318d7bd3f | |||
| 3ae0a7f7d1 | |||
| 2879008c20 | |||
| 0dfc0baa28 |
8
salesbook.Maui/Core/System/GenericSystemService.cs
Normal file
8
salesbook.Maui/Core/System/GenericSystemService.cs
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
using salesbook.Shared.Core.Interface.System;
|
||||||
|
|
||||||
|
namespace salesbook.Maui.Core.System;
|
||||||
|
|
||||||
|
public class GenericSystemService : IGenericSystemService
|
||||||
|
{
|
||||||
|
public string GetCurrentAppVersion() => AppInfo.VersionString;
|
||||||
|
}
|
||||||
@@ -7,6 +7,7 @@ using MudBlazor.Services;
|
|||||||
using MudExtensions.Services;
|
using MudExtensions.Services;
|
||||||
using salesbook.Maui.Core.RestClient.IntegryApi;
|
using salesbook.Maui.Core.RestClient.IntegryApi;
|
||||||
using salesbook.Maui.Core.Services;
|
using salesbook.Maui.Core.Services;
|
||||||
|
using salesbook.Maui.Core.System;
|
||||||
using salesbook.Maui.Core.System.Network;
|
using salesbook.Maui.Core.System.Network;
|
||||||
using salesbook.Maui.Core.System.Notification;
|
using salesbook.Maui.Core.System.Notification;
|
||||||
using salesbook.Maui.Core.System.Notification.Push;
|
using salesbook.Maui.Core.System.Notification.Push;
|
||||||
@@ -16,6 +17,7 @@ using salesbook.Shared.Core.Dto.PageState;
|
|||||||
using salesbook.Shared.Core.Helpers;
|
using salesbook.Shared.Core.Helpers;
|
||||||
using salesbook.Shared.Core.Interface;
|
using salesbook.Shared.Core.Interface;
|
||||||
using salesbook.Shared.Core.Interface.IntegryApi;
|
using salesbook.Shared.Core.Interface.IntegryApi;
|
||||||
|
using salesbook.Shared.Core.Interface.System;
|
||||||
using salesbook.Shared.Core.Interface.System.Network;
|
using salesbook.Shared.Core.Interface.System.Network;
|
||||||
using salesbook.Shared.Core.Interface.System.Notification;
|
using salesbook.Shared.Core.Interface.System.Notification;
|
||||||
using salesbook.Shared.Core.Messages.Activity.Copy;
|
using salesbook.Shared.Core.Messages.Activity.Copy;
|
||||||
@@ -102,6 +104,7 @@ namespace salesbook.Maui
|
|||||||
builder.Services.AddSingleton<IFormFactor, FormFactor>();
|
builder.Services.AddSingleton<IFormFactor, FormFactor>();
|
||||||
builder.Services.AddSingleton<IAttachedService, AttachedService>();
|
builder.Services.AddSingleton<IAttachedService, AttachedService>();
|
||||||
builder.Services.AddSingleton<INetworkService, NetworkService>();
|
builder.Services.AddSingleton<INetworkService, NetworkService>();
|
||||||
|
builder.Services.AddSingleton<IGenericSystemService, GenericSystemService>();
|
||||||
builder.Services.AddSingleton<LocalDbService>();
|
builder.Services.AddSingleton<LocalDbService>();
|
||||||
|
|
||||||
_ = typeof(System.Runtime.InteropServices.SafeHandle);
|
_ = typeof(System.Runtime.InteropServices.SafeHandle);
|
||||||
|
|||||||
@@ -51,6 +51,9 @@
|
|||||||
<key>NSPhotoLibraryAddUsageDescription</key>
|
<key>NSPhotoLibraryAddUsageDescription</key>
|
||||||
<string>Permette all'app di salvare file o immagini nella tua libreria fotografica se necessario.</string>
|
<string>Permette all'app di salvare file o immagini nella tua libreria fotografica se necessario.</string>
|
||||||
|
|
||||||
|
<key>NSBluetoothAlwaysUsageDescription</key>
|
||||||
|
<string>Alcune librerie di sistema potrebbero accedere al Bluetooth. L’app non utilizza direttamente il Bluetooth.</string>
|
||||||
|
|
||||||
<key>UIBackgroundModes</key>
|
<key>UIBackgroundModes</key>
|
||||||
<array>
|
<array>
|
||||||
<string>remote-notification</string>
|
<string>remote-notification</string>
|
||||||
|
|||||||
@@ -29,8 +29,8 @@
|
|||||||
<ApplicationId>it.integry.salesbook</ApplicationId>
|
<ApplicationId>it.integry.salesbook</ApplicationId>
|
||||||
|
|
||||||
<!-- Versions -->
|
<!-- Versions -->
|
||||||
<ApplicationDisplayVersion>2.1.3</ApplicationDisplayVersion>
|
<ApplicationDisplayVersion>2.1.5</ApplicationDisplayVersion>
|
||||||
<ApplicationVersion>20</ApplicationVersion>
|
<ApplicationVersion>23</ApplicationVersion>
|
||||||
|
|
||||||
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'ios'">14.2</SupportedOSPlatformVersion>
|
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'ios'">14.2</SupportedOSPlatformVersion>
|
||||||
<!--<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'maccatalyst'">
|
<!--<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'maccatalyst'">
|
||||||
@@ -120,6 +120,7 @@
|
|||||||
<PublishTrimmed>true</PublishTrimmed>
|
<PublishTrimmed>true</PublishTrimmed>
|
||||||
<PublishAot>true</PublishAot>
|
<PublishAot>true</PublishAot>
|
||||||
<MonoAotMode>Hybrid</MonoAotMode>
|
<MonoAotMode>Hybrid</MonoAotMode>
|
||||||
|
<MtouchLink>None</MtouchLink>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
|||||||
@@ -1,8 +1,10 @@
|
|||||||
@page "/login"
|
@page "/login"
|
||||||
@using salesbook.Shared.Components.Layout.Spinner
|
@using salesbook.Shared.Components.Layout.Spinner
|
||||||
|
@using salesbook.Shared.Core.Interface.System
|
||||||
@using salesbook.Shared.Core.Services
|
@using salesbook.Shared.Core.Services
|
||||||
@inject IUserAccountService UserAccountService
|
@inject IUserAccountService UserAccountService
|
||||||
@inject AppAuthenticationStateProvider AuthenticationStateProvider
|
@inject AppAuthenticationStateProvider AuthenticationStateProvider
|
||||||
|
@inject IGenericSystemService GenericSystemService
|
||||||
|
|
||||||
@if (Spinner)
|
@if (Spinner)
|
||||||
{
|
{
|
||||||
@@ -34,7 +36,7 @@ else
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="my-4 login-footer">
|
<div class="my-4 login-footer">
|
||||||
<span>Powered by</span>
|
<span>@($"v{GenericSystemService.GetCurrentAppVersion()} | Powered by")</span>
|
||||||
<img src="_content/salesbook.Shared/images/logoIntegry.svg" class="img-fluid" alt="Integry">
|
<img src="_content/salesbook.Shared/images/logoIntegry.svg" class="img-fluid" alt="Integry">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
@page "/PersonalInfo"
|
@page "/PersonalInfo"
|
||||||
@attribute [Authorize]
|
@attribute [Authorize]
|
||||||
@using salesbook.Shared.Components.Layout
|
@using salesbook.Shared.Components.Layout
|
||||||
|
@using salesbook.Shared.Components.SingleElements
|
||||||
@using salesbook.Shared.Core.Authorization.Enum
|
@using salesbook.Shared.Core.Authorization.Enum
|
||||||
@using salesbook.Shared.Core.Interface
|
@using salesbook.Shared.Core.Interface
|
||||||
@using salesbook.Shared.Core.Interface.System.Network
|
@using salesbook.Shared.Core.Interface.System.Network
|
||||||
@@ -16,7 +17,8 @@
|
|||||||
<div class="container content pb-safe-area">
|
<div class="container content pb-safe-area">
|
||||||
<div class="container-primary-info">
|
<div class="container-primary-info">
|
||||||
<div class="section-primary-info">
|
<div class="section-primary-info">
|
||||||
<MudAvatar Style="height: 70px; width: 70px; font-size: 2rem; font-weight: bold" Color="Color.Secondary">
|
<MudAvatar Style="height: 70px; width: 70px; font-size: 2rem; font-weight: bold"
|
||||||
|
Color="Color.Secondary">
|
||||||
@UtilityString.ExtractInitials(UserSession.User.Fullname)
|
@UtilityString.ExtractInitials(UserSession.User.Fullname)
|
||||||
</MudAvatar>
|
</MudAvatar>
|
||||||
|
|
||||||
@@ -24,7 +26,8 @@
|
|||||||
<span class="info-nome">@UserSession.User.Fullname</span>
|
<span class="info-nome">@UserSession.User.Fullname</span>
|
||||||
@if (UserSession.User.KeyGroup is not null)
|
@if (UserSession.User.KeyGroup is not null)
|
||||||
{
|
{
|
||||||
<span class="info-section">@(((KeyGroupEnum)UserSession.User.KeyGroup).ConvertToHumanReadable())</span>
|
<span
|
||||||
|
class="info-section">@(((KeyGroupEnum)UserSession.User.KeyGroup).ConvertToHumanReadable())</span>
|
||||||
}
|
}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -113,6 +116,8 @@
|
|||||||
</MudButton>
|
</MudButton>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<AppVersion/>
|
||||||
}
|
}
|
||||||
|
|
||||||
@code {
|
@code {
|
||||||
|
|||||||
@@ -1,12 +1,15 @@
|
|||||||
@page "/sync"
|
@page "/sync"
|
||||||
@page "/sync/{DateFilter}"
|
@page "/sync/{DateFilter}"
|
||||||
@using salesbook.Shared.Components.Layout.Spinner
|
@using salesbook.Shared.Components.Layout.Spinner
|
||||||
|
@using salesbook.Shared.Components.SingleElements
|
||||||
@using salesbook.Shared.Core.Interface
|
@using salesbook.Shared.Core.Interface
|
||||||
@inject ISyncDbService syncDb
|
@inject ISyncDbService syncDb
|
||||||
@inject IManageDataService manageData
|
@inject IManageDataService manageData
|
||||||
|
|
||||||
<SyncSpinner Elements="@Elements"/>
|
<SyncSpinner Elements="@Elements"/>
|
||||||
|
|
||||||
|
<AppVersion/>
|
||||||
|
|
||||||
@code {
|
@code {
|
||||||
[Parameter] public string? DateFilter { get; set; }
|
[Parameter] public string? DateFilter { get; set; }
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,6 @@
|
|||||||
|
@using salesbook.Shared.Core.Interface.System
|
||||||
|
@inject IGenericSystemService GenericSystemService
|
||||||
|
|
||||||
|
<div class="app-version">
|
||||||
|
<span>@($"v{GenericSystemService.GetCurrentAppVersion()}")</span>
|
||||||
|
</div>
|
||||||
@@ -0,0 +1,11 @@
|
|||||||
|
.app-version{
|
||||||
|
width: 100%;
|
||||||
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
|
margin: 8px 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.app-version span{
|
||||||
|
font-size: smaller;
|
||||||
|
color: var(--mud-palette-gray-darker);
|
||||||
|
}
|
||||||
@@ -214,7 +214,8 @@
|
|||||||
@if (item.p.Type == AttachedDTO.TypeAttached.Position)
|
@if (item.p.Type == AttachedDTO.TypeAttached.Position)
|
||||||
{
|
{
|
||||||
<MudChip T="string" Icon="@Icons.Material.Rounded.LocationOn" Color="Color.Success"
|
<MudChip T="string" Icon="@Icons.Material.Rounded.LocationOn" Color="Color.Success"
|
||||||
OnClick="@(() => OpenPosition(item.p))" OnClose="@(() => OnRemoveAttached(item.index))">
|
OnClick="@(() => OpenPosition(item.p))"
|
||||||
|
OnClose="@(() => OnRemoveAttached(item.index))">
|
||||||
@item.p.Description
|
@item.p.Description
|
||||||
</MudChip>
|
</MudChip>
|
||||||
}
|
}
|
||||||
@@ -234,7 +235,8 @@
|
|||||||
{
|
{
|
||||||
foreach (var file in ActivityFileList)
|
foreach (var file in ActivityFileList)
|
||||||
{
|
{
|
||||||
<MudChip T="string" OnClick="@(() => OpenAttached(file.Id, file.FileName))" OnClose="@(() => DeleteAttach(file))" Color="Color.Default">
|
<MudChip T="string" OnClick="@(() => OpenAttached(file.Id, file.FileName))"
|
||||||
|
OnClose="@(() => DeleteAttach(file))" Color="Color.Default">
|
||||||
@file.FileName
|
@file.FileName
|
||||||
</MudChip>
|
</MudChip>
|
||||||
}
|
}
|
||||||
@@ -458,7 +460,10 @@
|
|||||||
|
|
||||||
Users = await ManageData.GetTable<StbUser>();
|
Users = await ManageData.GetTable<StbUser>();
|
||||||
if (!ActivityModel.UserName.IsNullOrEmpty())
|
if (!ActivityModel.UserName.IsNullOrEmpty())
|
||||||
|
{
|
||||||
SelectedUser = Users.FindLast(x => x.UserName.Equals(ActivityModel.UserName));
|
SelectedUser = Users.FindLast(x => x.UserName.Equals(ActivityModel.UserName));
|
||||||
|
await InvokeAsync(StateHasChanged);
|
||||||
|
}
|
||||||
|
|
||||||
if (!IsNew && Id != null)
|
if (!IsNew && Id != null)
|
||||||
ActivityFileList = await IntegryApiService.GetActivityFile(Id);
|
ActivityFileList = await IntegryApiService.GetActivityFile(Id);
|
||||||
@@ -576,6 +581,9 @@
|
|||||||
{
|
{
|
||||||
ActivityModel.CodAnag = parts[0];
|
ActivityModel.CodAnag = parts[0];
|
||||||
ActivityModel.Cliente = parts[1];
|
ActivityModel.Cliente = parts[1];
|
||||||
|
|
||||||
|
var isCliente = Clienti.FirstOrDefault(x => x.CodAnag != null && x.CodAnag.Equals(ActivityModel.CodAnag));
|
||||||
|
ActivityModel.TipoAnag = isCliente == null ? "P" : "C";
|
||||||
}
|
}
|
||||||
|
|
||||||
OnAfterChangeValue();
|
OnAfterChangeValue();
|
||||||
@@ -593,6 +601,7 @@
|
|||||||
if (com.CodAnag != null)
|
if (com.CodAnag != null)
|
||||||
{
|
{
|
||||||
ActivityModel.CodAnag = com.CodAnag;
|
ActivityModel.CodAnag = com.CodAnag;
|
||||||
|
ActivityModel.TipoAnag = com.TipoAnag;
|
||||||
ActivityModel.Cliente = Clienti
|
ActivityModel.Cliente = Clienti
|
||||||
.Where(x => x.CodAnag != null && x.CodAnag.Equals(com.CodAnag))
|
.Where(x => x.CodAnag != null && x.CodAnag.Equals(com.CodAnag))
|
||||||
.Select(x => x.RagSoc)
|
.Select(x => x.RagSoc)
|
||||||
@@ -605,6 +614,7 @@
|
|||||||
{
|
{
|
||||||
ActivityModel.CodAnag = null;
|
ActivityModel.CodAnag = null;
|
||||||
ActivityModel.Cliente = null;
|
ActivityModel.Cliente = null;
|
||||||
|
ActivityModel.TipoAnag = null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@@ -613,6 +623,7 @@
|
|||||||
ActivityModel.Commessa = null;
|
ActivityModel.Commessa = null;
|
||||||
ActivityModel.CodAnag = null;
|
ActivityModel.CodAnag = null;
|
||||||
ActivityModel.Cliente = null;
|
ActivityModel.Cliente = null;
|
||||||
|
ActivityModel.TipoAnag = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
OnAfterChangeValue();
|
OnAfterChangeValue();
|
||||||
|
|||||||
@@ -0,0 +1,6 @@
|
|||||||
|
namespace salesbook.Shared.Core.Interface.System;
|
||||||
|
|
||||||
|
public interface IGenericSystemService
|
||||||
|
{
|
||||||
|
string GetCurrentAppVersion();
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user