generated from Integry/Template_NetMauiBlazorHybrid
Compare commits
4 Commits
b93f2f2d16
...
61ea1776b3
| Author | SHA1 | Date | |
|---|---|---|---|
| 61ea1776b3 | |||
| 2480a6a60c | |||
| dd5f354b14 | |||
| 6a8414ff6c |
@ -175,9 +175,7 @@ public class ManageDataService(
|
||||
|
||||
public async Task<List<ActivityDTO>> GetActivityTryLocalDb(WhereCondActivity whereCond)
|
||||
{
|
||||
List<StbActivity>? activities;
|
||||
|
||||
activities = await localDb.Get<StbActivity>(x =>
|
||||
var activities = await localDb.Get<StbActivity>(x =>
|
||||
(whereCond.ActivityId != null && x.ActivityId != null && whereCond.ActivityId.Equals(x.ActivityId)) ||
|
||||
(whereCond.Start != null && whereCond.End != null && x.EffectiveTime == null &&
|
||||
x.EstimatedTime >= whereCond.Start && x.EstimatedTime <= whereCond.End) ||
|
||||
@ -198,6 +196,7 @@ public class ManageDataService(
|
||||
|
||||
_ = UpdateDb(activities);
|
||||
}
|
||||
else return [];
|
||||
|
||||
return await MapActivity(activities);
|
||||
}
|
||||
@ -219,16 +218,7 @@ public class ManageDataService(
|
||||
|
||||
_ = UpdateDb(activities);
|
||||
}
|
||||
else
|
||||
{
|
||||
activities = await localDb.Get<StbActivity>(x =>
|
||||
(whereCond.ActivityId != null && x.ActivityId != null && whereCond.ActivityId.Equals(x.ActivityId)) ||
|
||||
(whereCond.Start != null && whereCond.End != null && x.EffectiveTime == null &&
|
||||
x.EstimatedTime >= whereCond.Start && x.EstimatedTime <= whereCond.End) ||
|
||||
(x.EffectiveTime >= whereCond.Start && x.EffectiveTime <= whereCond.End) ||
|
||||
(whereCond.ActivityId == null && (whereCond.Start == null || whereCond.End == null))
|
||||
);
|
||||
}
|
||||
else return await GetActivityTryLocalDb(whereCond);
|
||||
|
||||
return await MapActivity(activities);
|
||||
}
|
||||
|
||||
@ -29,8 +29,8 @@
|
||||
<ApplicationId>it.integry.salesbook</ApplicationId>
|
||||
|
||||
<!-- Versions -->
|
||||
<ApplicationDisplayVersion>2.1.0</ApplicationDisplayVersion>
|
||||
<ApplicationVersion>17</ApplicationVersion>
|
||||
<ApplicationDisplayVersion>2.1.1</ApplicationDisplayVersion>
|
||||
<ApplicationVersion>18</ApplicationVersion>
|
||||
|
||||
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'ios'">14.2</SupportedOSPlatformVersion>
|
||||
<!--<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'maccatalyst'">
|
||||
|
||||
@ -492,6 +492,8 @@
|
||||
// Selezione giorno in settimana
|
||||
private async Task SelezionaData(DateTime day)
|
||||
{
|
||||
if (IsLoading) return;
|
||||
|
||||
SelectedDate = day;
|
||||
|
||||
var cacheInternalMonth = _internalMonth;
|
||||
@ -513,6 +515,8 @@
|
||||
// Selezione giorno dal mese (chiude la vista mese!)
|
||||
private async Task SelezionaDataDalMese(DateTime day)
|
||||
{
|
||||
if (IsLoading) return;
|
||||
|
||||
SelectedDate = day;
|
||||
SliderAnimation = "collapse-animation";
|
||||
Expanded = false;
|
||||
|
||||
@ -15,12 +15,20 @@
|
||||
@inject PreloadService PreloadService
|
||||
@inject IMessenger Messenger
|
||||
|
||||
<SpinnerLayout FullScreen="true" />
|
||||
<SpinnerLayout FullScreen="true"/>
|
||||
|
||||
@code
|
||||
{
|
||||
protected override async Task OnInitializedAsync()
|
||||
{
|
||||
var lastSyncDate = LocalStorage.Get<DateTime>("last-sync");
|
||||
if (!FormFactor.IsWeb() && NetworkService.ConnectionAvailable && lastSyncDate.Equals(DateTime.MinValue))
|
||||
{
|
||||
var returnPath = System.Web.HttpUtility.UrlEncode("/");
|
||||
NavigationManager.NavigateTo($"/sync?path={returnPath}");
|
||||
return;
|
||||
}
|
||||
|
||||
NetworkService.ConnectionAvailable = NetworkService.IsNetworkAvailable();
|
||||
|
||||
await LoadNotification();
|
||||
@ -35,14 +43,6 @@
|
||||
Console.WriteLine($"Firebase init: {e.Message}");
|
||||
}
|
||||
|
||||
var lastSyncDate = LocalStorage.Get<DateTime>("last-sync");
|
||||
|
||||
if (!FormFactor.IsWeb() && NetworkService.ConnectionAvailable && lastSyncDate.Equals(DateTime.MinValue))
|
||||
{
|
||||
NavigationManager.NavigateTo("/sync");
|
||||
return;
|
||||
}
|
||||
|
||||
_ = StartSyncUser();
|
||||
NavigationManager.NavigateTo("/Calendar");
|
||||
}
|
||||
@ -60,9 +60,6 @@
|
||||
|
||||
private Task StartSyncUser()
|
||||
{
|
||||
return Task.Run(() =>
|
||||
{
|
||||
_ = PreloadService.PreloadUsersAsync();
|
||||
});
|
||||
return Task.Run(() => { _ = PreloadService.PreloadUsersAsync(); });
|
||||
}
|
||||
}
|
||||
|
||||
@ -42,7 +42,7 @@
|
||||
{
|
||||
<SpinnerLayout FullScreen="false"/>
|
||||
}
|
||||
else if (GroupedUserList?.Count > 0)
|
||||
else if (GroupedUserList.IsNullOrEmpty() || FilteredGroupedUserList.IsNullOrEmpty())
|
||||
{
|
||||
<Virtualize OverscanCount="20" Items="FilteredGroupedUserList" Context="item">
|
||||
@if (item.ShowHeader)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user