This commit is contained in:
2026-06-02 15:46:13 +02:00
25 changed files with 951 additions and 215 deletions
+4 -7
View File
@@ -17,10 +17,7 @@
@if (UserContext.Role < UserRole.TechN1) { <WriteGuard /> return; }
<div class="card">
<div class="form-group">
<label class="form-label">Site URL</label>
<input class="form-input" @bind="_siteUrl" placeholder="@Session.CurrentProfile!.TenantUrl" />
</div>
<SitePicker Profile="Session.CurrentProfile!" @bind-SelectedSites="_sites" Single="true" />
<div class="form-group">
<label class="form-label">CSV File (GroupName, GroupUrl, Email, Role)</label>
<InputFile OnChange="LoadFile" accept=".csv" class="form-input" />
@@ -74,7 +71,7 @@
}
@code {
private string _siteUrl = string.Empty;
private List<SiteInfo> _sites = new();
private List<CsvValidationRow<BulkMemberRow>> _rows = new();
private bool _running; private string _status = string.Empty, _error = string.Empty;
private int _current, _total;
@@ -94,8 +91,8 @@
_error = string.Empty; _summary = null; _running = true;
_cts = new CancellationTokenSource();
var validRows = _rows.Where(r => r.IsValid && r.Record != null).Select(r => r.Record!).ToList();
if (string.IsNullOrWhiteSpace(_siteUrl)) { _error = "Please enter a site URL."; _running = false; return; }
var siteUrl = _siteUrl.Trim();
var siteUrl = _sites.FirstOrDefault()?.Url;
if (string.IsNullOrWhiteSpace(siteUrl)) { _error = "Please select a site."; _running = false; return; }
var progress = new Progress<OperationProgress>(p => { _status = p.Message; _current = p.Current; _total = p.Total; InvokeAsync(StateHasChanged); });
try
{