This commit is contained in:
Thomas Fransolet 2025-08-14 23:24:30 +02:00
parent 4d755549af
commit cbf3a3c7f5
8 changed files with 1280 additions and 9 deletions

View File

@ -280,7 +280,7 @@ namespace ManagerService.Controllers
if (appConfigurationLinkDTO == null)
throw new ArgumentNullException("appConfigurationLink param is null");
AppConfigurationLink appConfigurationLink = _myInfoMateDbContext.AppConfigurationLinks.FirstOrDefault(acl => acl.Id == appConfigurationLinkDTO.id);
AppConfigurationLink appConfigurationLink = _myInfoMateDbContext.AppConfigurationLinks.Include(acl => acl.Configuration).Include(acl => acl.Device).FirstOrDefault(acl => acl.Id == appConfigurationLinkDTO.id);
if (appConfigurationLink == null)
throw new KeyNotFoundException("appConfigurationLink does not exist");

View File

@ -34,10 +34,12 @@ namespace ManagerService.DTOs
public LayoutMainPageType layoutMainPage { get; set; } // Specific Kiosk
public string LoaderImageUrl { get; set; } // Specific Kiosk
public string loaderImageId { get; set; } // Specific Kiosk
public string PrimaryColor { get; set; } // Specific Kiosk
public string loaderImageUrl { get; set; } // Specific Kiosk
public string SecondaryColor { get; set; } // Specific Kiosk
public string primaryColor { get; set; } // Specific Kiosk
public string secondaryColor { get; set; } // Specific Kiosk
}
}

View File

@ -71,6 +71,10 @@ namespace ManagerService.Data
order = Order,
isActive = IsActive,
weightMasonryGrid = WeightMasonryGrid,
primaryColor = PrimaryColor,
secondaryColor = SecondaryColor,
loaderImageId = LoaderImageId,
loaderImageUrl = LoaderImageUrl,
isDate = IsDate,
isHour = IsHour,
roundedValue = RoundedValue,
@ -88,6 +92,10 @@ namespace ManagerService.Data
Order = appConfigurationLinkDTO.order;
IsActive = appConfigurationLinkDTO.isActive;
WeightMasonryGrid = appConfigurationLinkDTO?.weightMasonryGrid;
PrimaryColor = appConfigurationLinkDTO.primaryColor;
SecondaryColor = appConfigurationLinkDTO.secondaryColor;
LoaderImageId = appConfigurationLinkDTO.loaderImageId;
LoaderImageUrl = appConfigurationLinkDTO.loaderImageUrl;
IsDate = appConfigurationLinkDTO.isDate;
IsHour = appConfigurationLinkDTO.isHour;
RoundedValue = appConfigurationLinkDTO.roundedValue;

View File

@ -1,6 +1,7 @@
using ManagerService.DTOs;
using System;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
namespace ManagerService.Data
{
@ -37,6 +38,7 @@ namespace ManagerService.Data
//[BsonElement("ConfigurationId")]
//[BsonRequired]
[Required]
[ForeignKey("ConfigurationId")]
public string ConfigurationId { get; set; }
//[BsonElement("Connected")]
@ -79,7 +81,7 @@ namespace ManagerService.Data
ipAddressWLAN = IpAddressWLAN,
ipAddressETH = IpAddressETH,
connected = Connected,
configuration = Configuration.Label,
configuration = Configuration?.Label,
configurationId = ConfigurationId,
dateUpdate = DateUpdate,
dateCreation = DateCreation,

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,28 @@
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace ManagerService.Migrations
{
/// <inheritdoc />
public partial class Updatedmisc0 : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.RenameColumn(
name: "isActive",
table: "Sections",
newName: "IsActive");
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.RenameColumn(
name: "IsActive",
table: "Sections",
newName: "isActive");
}
}
}

View File

@ -348,6 +348,9 @@ namespace ManagerService.Migrations
.IsRequired()
.HasColumnType("text");
b.Property<bool>("IsActive")
.HasColumnType("boolean");
b.Property<bool>("IsBeacon")
.HasColumnType("boolean");
@ -383,9 +386,6 @@ namespace ManagerService.Migrations
b.Property<int>("Type")
.HasColumnType("integer");
b.Property<bool>("isActive")
.HasColumnType("boolean");
b.HasKey("Id");
b.HasIndex("SectionMenuId");

View File

@ -188,7 +188,7 @@ namespace ManagerService
app.UseCors(
#if DEBUG
options => options
.SetIsOriginAllowed(origin => string.IsNullOrEmpty(origin) || origin == "http://localhost:55628")
.SetIsOriginAllowed(origin => string.IsNullOrEmpty(origin) || origin == "http://localhost:52172")
.AllowAnyMethod()
.AllowAnyHeader()
.AllowCredentials()