Primo sviluppo sincronizzazione e migliorie ui

This commit is contained in:
2025-05-19 16:47:21 +02:00
parent 6f08ba87be
commit 626408412b
66 changed files with 1824 additions and 91 deletions

View File

@@ -0,0 +1,17 @@
using Template.Shared.Core.Helpers.Enum;
namespace Template.Shared.Core.Helpers;
public static class ActivityCategoryHelper
{
public static string ConvertToHumanReadable(this ActivityCategoryEnum activityType)
{
return activityType switch
{
ActivityCategoryEnum.Memo => "memo",
ActivityCategoryEnum.Interna => "inerna",
ActivityCategoryEnum.Commessa => "commessa",
_ => throw new ArgumentOutOfRangeException(nameof(activityType), activityType, null)
};
}
}

View File

@@ -0,0 +1,8 @@
namespace Template.Shared.Core.Helpers.Enum;
public enum ActivityCategoryEnum
{
Memo = 0,
Interna = 1,
Commessa = 2
}

View File

@@ -0,0 +1,6 @@
namespace Template.Shared.Core.Helpers.Enum;
public enum ActivityStatusEnum
{
}

View File

@@ -0,0 +1,13 @@
using AutoMapper;
using Template.Shared.Core.Dto;
using Template.Shared.Core.Entity;
namespace Template.Shared.Core.Helpers;
public class MappingProfile : Profile
{
public MappingProfile()
{
CreateMap<StbActivity, ActivityDTO>();
}
}

View File

@@ -0,0 +1,13 @@
using System.Collections;
namespace ConSegna.Shared.Core.Helpers;
public static class ObjectExtensions
{
public static bool IsNullOrEmpty(this IEnumerable? obj) =>
obj == null || obj.GetEnumerator().MoveNext() == false;
public static bool IsNullOrEmpty(this string? obj) =>
string.IsNullOrEmpty(obj);
}