refactor: remove unused classes and consolidate ViewModels in Core
Remove 9 unused types from Core (duplicate extension classes, TableSpec, ColumnSpec, LotLocation), move ComponentLotViewModel and OperatorViewModel from Client to Core, and refactor DataSync.Dev to use pipeline-based configuration. Fix Login.razor to use UserInfoDto directly.
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
using System.Text.Json;
|
||||
using JdeScoping.Client.Models;
|
||||
using JdeScoping.Core.ApiContracts.Auth;
|
||||
using Microsoft.JSInterop;
|
||||
|
||||
namespace JdeScoping.Client.Auth;
|
||||
@@ -19,7 +19,7 @@ public class UserStorageService : IUserStorageService
|
||||
_jsRuntime = jsRuntime;
|
||||
}
|
||||
|
||||
public async Task<UserInfoViewModel?> GetUserAsync()
|
||||
public async Task<UserInfoDto?> GetUserAsync()
|
||||
{
|
||||
try
|
||||
{
|
||||
@@ -29,7 +29,7 @@ public class UserStorageService : IUserStorageService
|
||||
return null;
|
||||
}
|
||||
|
||||
return JsonSerializer.Deserialize<UserInfoViewModel>(json, new JsonSerializerOptions
|
||||
return JsonSerializer.Deserialize<UserInfoDto>(json, new JsonSerializerOptions
|
||||
{
|
||||
PropertyNameCaseInsensitive = true
|
||||
});
|
||||
@@ -40,7 +40,7 @@ public class UserStorageService : IUserStorageService
|
||||
}
|
||||
}
|
||||
|
||||
public async Task SetUserAsync(UserInfoViewModel user)
|
||||
public async Task SetUserAsync(UserInfoDto user)
|
||||
{
|
||||
var json = JsonSerializer.Serialize(user);
|
||||
await _jsRuntime.InvokeVoidAsync("jdeScopingInterop.setSessionStorage", UserKey, json);
|
||||
|
||||
Reference in New Issue
Block a user