1 Commits
Author SHA1 Message Date
marcoandClaude Opus 4.8 44183274fb v0.1.40 — Include-Gruppen für mehrere Apps (Bulk)
Build & Release MSI / build-msi (push) Canceled after 0s
Mehrfachauswahl-Leiste bekommt "Gruppe zuweisen…" (Include) neben der
Ausschlussgruppe; Intent Required/Available wählbar. Backend verarbeitet
Include/Exclude über denselben Lade-Merge-Ersetze-Pfad
(Add-GraphAppTargetAssignment -Kind), neuer Endpoint /bulk-assign.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-12-02 15:01:28 +01:00
7 changed files with 115 additions and 41 deletions

No files matched your search

+14
View File
@@ -5,6 +5,20 @@ Versionierung folgt [Semantic Versioning](https://semver.org/lang/de/) — solan
--- ---
## [0.1.40] - 2026-12-02
Include-Gruppen für mehrere Apps (Bulk).
### Neu
- **Gruppe für mehrere Apps zuweisen (Bulk)**: Die Mehrfachauswahl-Leiste im Apps-Tab hat jetzt neben *Ausschlussgruppe…* die Aktion **„Gruppe zuweisen…"** für reguläre Include-Zuweisungen. Im Dialog wählt man Aktion (zuweisen/entfernen), Intent (**Required** und/oder **Available**) und die Gruppe — analog zur Ausschlussgruppe. Neuer Endpoint `POST /api/apps/assignments/bulk-assign`; der bestehende `/bulk-exclude` bleibt erhalten.
### Geändert
- Die Zuweisungs-Logik im Backend (`Add-GraphAppTargetAssignment`) verarbeitet Include- und Exclude-Ziele über denselben Lade-Merge-Ersetze-Pfad; bestehende Zuweisungen bleiben erhalten, Duplikate werden übersprungen.
---
## [0.1.39] - 2026-11-18 ## [0.1.39] - 2026-11-18
Bulk-Ausschlussgruppen für Apps, App-Typ-Filter. Bulk-Ausschlussgruppen für Apps, App-Typ-Filter.
+1 -1
View File
@@ -190,7 +190,7 @@ $script:State = [pscustomobject]@{
Session = @() # geplante Zuweisungen Session = @() # geplante Zuweisungen
} }
$script:ToolVersion = "0.1.39" $script:ToolVersion = "0.1.40"
$script:BuildStamp = Get-Date -Format "yyyy-MM-dd HH:mm:ss" $script:BuildStamp = Get-Date -Format "yyyy-MM-dd HH:mm:ss"
Write-Host "" Write-Host ""
+1 -1
View File
@@ -12,7 +12,7 @@ if (Test-Path "$x64Dotnet\dotnet.exe") {
$env:DOTNET_ROOT = "C:\Program Files\dotnet" $env:DOTNET_ROOT = "C:\Program Files\dotnet"
} }
$version = "0.1.39" $version = "0.1.40"
$src = "\\Mac\Home\ClaudePRJ\Intune Manager" $src = "\\Mac\Home\ClaudePRJ\Intune Manager"
$stage = "$env:TEMP\IntuneManagerStage" $stage = "$env:TEMP\IntuneManagerStage"
$installerDir = "$src\installer" $installerDir = "$src\installer"
+19 -10
View File
@@ -48,7 +48,8 @@ function Invoke-ApiHandler {
"POST /api/membership/bulk" { return Get-MembershipBulkEndpoint -Body $Body } "POST /api/membership/bulk" { return Get-MembershipBulkEndpoint -Body $Body }
"POST /api/assignments/apply" { return Invoke-ApplyEndpoint -Body $Body } "POST /api/assignments/apply" { return Invoke-ApplyEndpoint -Body $Body }
"POST /api/apps/assignments/bulk-exclude" { return Invoke-AppBulkExcludeEndpoint -Body $Body } "POST /api/apps/assignments/bulk-exclude" { return Invoke-AppBulkAssignEndpoint -Body $Body }
"POST /api/apps/assignments/bulk-assign" { return Invoke-AppBulkAssignEndpoint -Body $Body }
"GET /api/tenants" { return Get-TenantsEndpoint } "GET /api/tenants" { return Get-TenantsEndpoint }
"POST /api/tenants/switch" { return Switch-TenantEndpoint -Body $Body } "POST /api/tenants/switch" { return Switch-TenantEndpoint -Body $Body }
@@ -3278,13 +3279,14 @@ function Add-AppAssignmentEndpoint {
return @{ ok = $true; appId = $AppId; intent = $intent; targets = @($targets); count = $targets.Count } return @{ ok = $true; appId = $AppId; intent = $intent; targets = @($targets); count = $targets.Count }
} }
function Invoke-AppBulkExcludeEndpoint { function Invoke-AppBulkAssignEndpoint {
# Weist MEHREREN Apps in einem Rutsch EINE Ausschlussgruppe zu — oder entfernt # Weist MEHREREN Apps in einem Rutsch EINE Gruppe zu — als Include ODER als
# sie wieder. Body: # Ausschluss — oder entfernt sie wieder. Body:
# { appIds: [ "<id>", ... ], # { appIds: [ "<id>", ... ],
# groupId: "<guid>", # groupId: "<guid>",
# groupName: "<optional Anzeigename>", # groupName: "<optional Anzeigename>",
# intents: [ "required", "available" ], # mind. einer # intents: [ "required", "available" ], # mind. einer
# kind: "include" | "exclude", # Default "exclude" (Rueckwaerts-Kompat.)
# action: "add" | "remove" } # Default "add" # action: "add" | "remove" } # Default "add"
param($Body) param($Body)
$err = Test-Connected $err = Test-Connected
@@ -3309,6 +3311,11 @@ function Invoke-AppBulkExcludeEndpoint {
$action = if ($Body.action) { ([string]$Body.action).ToLower() } else { "add" } $action = if ($Body.action) { ([string]$Body.action).ToLower() } else { "add" }
if ($action -notin @('add','remove')) { return @{ __status = 400; error = "action muss 'add' oder 'remove' sein" } } if ($action -notin @('add','remove')) { return @{ __status = 400; error = "action muss 'add' oder 'remove' sein" } }
# Default 'exclude' haelt die alte /bulk-exclude-Route (und den Detail-Panel-
# Remove) rueckwaerts-kompatibel, auch wenn kein kind mitgeschickt wird.
$kind = if ($Body.kind) { ([string]$Body.kind).ToLower() } else { "exclude" }
if ($kind -notin @('include','exclude')) { return @{ __status = 400; error = "kind muss 'include' oder 'exclude' sein" } }
# Gruppennamen aufloesen (fuer Logging/Cache). Falls nicht mitgeliefert: Graph fragen. # Gruppennamen aufloesen (fuer Logging/Cache). Falls nicht mitgeliefert: Graph fragen.
$groupName = if ($Body.groupName) { [string]$Body.groupName } else { "" } $groupName = if ($Body.groupName) { [string]$Body.groupName } else { "" }
if ([string]::IsNullOrWhiteSpace($groupName)) { if ([string]::IsNullOrWhiteSpace($groupName)) {
@@ -3325,7 +3332,8 @@ function Invoke-AppBulkExcludeEndpoint {
} }
if ([string]::IsNullOrWhiteSpace($groupName)) { $groupName = $groupId } if ([string]::IsNullOrWhiteSpace($groupName)) { $groupName = $groupId }
Write-Host "[BULK EXCLUDE] action=$action group='$groupName' intents=$($intents -join '+') apps=$($appIds.Count)" -ForegroundColor Cyan $logTag = if ($kind -eq 'include') { 'BULK INCLUDE' } else { 'BULK EXCLUDE' }
Write-Host "[$logTag] action=$action group='$groupName' intents=$($intents -join '+') apps=$($appIds.Count)" -ForegroundColor Cyan
$results = @() $results = @()
$okCount = 0 $okCount = 0
@@ -3336,11 +3344,11 @@ function Invoke-AppBulkExcludeEndpoint {
try { try {
$changed = 0 $changed = 0
if ($action -eq 'add') { if ($action -eq 'add') {
$r = Add-GraphAppExclusion -AppId $appId -GroupId $groupId -Intents $intents $r = Add-GraphAppTargetAssignment -AppId $appId -GroupId $groupId -Intents $intents -Kind $kind
$changed = [int]$r.added $changed = [int]$r.added
} else { } else {
foreach ($intent in $intents) { foreach ($intent in $intents) {
$removed = Remove-GraphAppAssignmentByGroup -AppId $appId -GroupId $groupId -Intent $intent -TargetKind 'exclude' $removed = Remove-GraphAppAssignmentByGroup -AppId $appId -GroupId $groupId -Intent $intent -TargetKind $kind
$changed += @($removed).Count $changed += @($removed).Count
} }
} }
@@ -3364,16 +3372,17 @@ function Invoke-AppBulkExcludeEndpoint {
try { $j = $rawBody | ConvertFrom-Json; if ($j.error.message) { $graphMsg = [string]$j.error.message } } catch {} try { $j = $rawBody | ConvertFrom-Json; if ($j.error.message) { $graphMsg = [string]$j.error.message } } catch {}
} }
$friendly = if ($graphMsg) { $graphMsg } else { $details.Friendly } $friendly = if ($graphMsg) { $graphMsg } else { $details.Friendly }
Write-Host "[BULK EXCLUDE] FAIL $appName [$($details.Code)] $friendly" -ForegroundColor Red Write-Host "[$logTag] FAIL $appName [$($details.Code)] $friendly" -ForegroundColor Red
if ($rawBody) { Write-Host "[BULK EXCLUDE] GRAPH-BODY: $rawBody" -ForegroundColor DarkYellow } if ($rawBody) { Write-Host "[$logTag] GRAPH-BODY: $rawBody" -ForegroundColor DarkYellow }
$results += @{ appId = $appId; appName = $appName; ok = $false; error = $friendly; code = $details.Code } $results += @{ appId = $appId; appName = $appName; ok = $false; error = $friendly; code = $details.Code }
} }
} }
Write-Host "[BULK EXCLUDE] OK=$okCount FAIL=$failCount" -ForegroundColor Green Write-Host "[$logTag] OK=$okCount FAIL=$failCount" -ForegroundColor Green
return @{ return @{
ok = ($failCount -eq 0) ok = ($failCount -eq 0)
action = $action action = $action
kind = $kind
groupId = $groupId groupId = $groupId
groupName = $groupName groupName = $groupName
intents = @($intents) intents = @($intents)
+15 -11
View File
@@ -446,20 +446,24 @@ function Add-GraphAppAssignment {
Invoke-MgGraphRequest -Uri "https://graph.microsoft.com/beta/deviceAppManagement/mobileApps/$AppId/assign" -Method POST -Body $body Invoke-MgGraphRequest -Uri "https://graph.microsoft.com/beta/deviceAppManagement/mobileApps/$AppId/assign" -Method POST -Body $body
} }
function Add-GraphAppExclusion { function Add-GraphAppTargetAssignment {
# Fuegt EINER App eine Ausschlussgruppe (exclusionGroupAssignmentTarget) fuer # Fuegt EINER App eine Gruppen-Zuweisung fuer einen oder mehrere Intents hinzu —
# einen oder mehrere Intents hinzu. Wie bei /assign ueblich: bestehende # entweder als Include (groupAssignmentTarget) ODER als Ausschluss
# Zuweisungen laden, die Ausschluesse mergen (Duplikate ueberspringen) und den # (exclusionGroupAssignmentTarget). Wie bei /assign ueblich: bestehende
# VOLLEN Satz in EINEM Request schicken (sonst wuerde /assign alles ersetzen). # Zuweisungen laden, die neuen mergen (Duplikate ueberspringen) und den VOLLEN
# Satz in EINEM Request schicken (sonst wuerde /assign alles ersetzen).
param( param(
[Parameter(Mandatory=$true)][string]$AppId, [Parameter(Mandatory=$true)][string]$AppId,
[Parameter(Mandatory=$true)][string]$GroupId, # GUID der Ausschlussgruppe [Parameter(Mandatory=$true)][string]$GroupId, # GUID der Gruppe
[string[]]$Intents = @('required') # "required" und/oder "available" [string[]]$Intents = @('required'), # "required" und/oder "available"
[ValidateSet('include','exclude')][string]$Kind = 'exclude'
) )
$wanted = @(@($Intents) | ForEach-Object { ([string]$_).ToLower() } | $wanted = @(@($Intents) | ForEach-Object { ([string]$_).ToLower() } |
Where-Object { $_ -in @('required','available') } | Select-Object -Unique) Where-Object { $_ -in @('required','available') } | Select-Object -Unique)
if ($wanted.Count -eq 0) { throw "Kein gueltiger Intent (required/available) uebergeben." } if ($wanted.Count -eq 0) { throw "Kein gueltiger Intent (required/available) uebergeben." }
$odataType = if ($Kind -eq 'include') { '#microsoft.graph.groupAssignmentTarget' } else { '#microsoft.graph.exclusionGroupAssignmentTarget' }
$existing = Get-GraphMobileAppAssignments -AppId $AppId $existing = Get-GraphMobileAppAssignments -AppId $AppId
$assignments = @() $assignments = @()
$seen = @{} $seen = @{}
@@ -477,18 +481,18 @@ function Add-GraphAppExclusion {
} }
$added = 0 $added = 0
foreach ($intent in $wanted) { foreach ($intent in $wanted) {
$key = $intent + '|#microsoft.graph.exclusionGroupAssignmentTarget|' + $GroupId $key = $intent + '|' + $odataType + '|' + $GroupId
if ($seen.ContainsKey($key)) { continue } if ($seen.ContainsKey($key)) { continue } # schon mit diesem Intent/Typ zugewiesen
$seen[$key] = $true $seen[$key] = $true
$assignments += @{ $assignments += @{
'@odata.type' = '#microsoft.graph.mobileAppAssignment' '@odata.type' = '#microsoft.graph.mobileAppAssignment'
intent = $intent intent = $intent
target = @{ '@odata.type' = '#microsoft.graph.exclusionGroupAssignmentTarget'; groupId = [string]$GroupId } target = @{ '@odata.type' = $odataType; groupId = [string]$GroupId }
settings = $null settings = $null
} }
$added++ $added++
} }
if ($added -eq 0) { return @{ added = 0 } } # schon fuer alle Intents ausgeschlossen if ($added -eq 0) { return @{ added = 0 } } # schon fuer alle Intents vorhanden
$body = @{ mobileAppAssignments = @($assignments) } $body = @{ mobileAppAssignments = @($assignments) }
# WICHTIG: Body selbst serialisieren (Depth hoch genug). Die implizite # WICHTIG: Body selbst serialisieren (Depth hoch genug). Die implizite
# Serialisierung von Invoke-MgGraphRequest macht aus verschachtelten Werten # Serialisierung von Invoke-MgGraphRequest macht aus verschachtelten Werten
+57 -11
View File
@@ -29,8 +29,9 @@ const State = {
selectedAppIds: new Set(), selectedAppIds: new Set(),
}; };
// Kontext des Bulk-Ausschluss-Dialogs (gewählte Gruppe) // Kontext des Bulk-Dialogs (gewählte Gruppe + Art: include|exclude)
let bulkExcludeGroup = null; // { id, name } | null let bulkExcludeGroup = null; // { id, name } | null
let bulkKind = 'exclude'; // 'include' | 'exclude'
let bxGroupTimer = null; let bxGroupTimer = null;
let bxGroupAbort = null; let bxGroupAbort = null;
@@ -3402,8 +3403,10 @@ function updateBulkBar() {
const n = State.selectedAppIds.size; const n = State.selectedAppIds.size;
const cnt = document.getElementById('appBulkCount'); const cnt = document.getElementById('appBulkCount');
if (cnt) cnt.textContent = String(n); if (cnt) cnt.textContent = String(n);
const btnI = document.getElementById('btnBulkInclude');
const btnX = document.getElementById('btnBulkExclude'); const btnX = document.getElementById('btnBulkExclude');
const btnC = document.getElementById('btnBulkClear'); const btnC = document.getElementById('btnBulkClear');
if (btnI) btnI.disabled = n === 0;
if (btnX) btnX.disabled = n === 0; if (btnX) btnX.disabled = n === 0;
if (btnC) btnC.disabled = n === 0; if (btnC) btnC.disabled = n === 0;
// "Alle sichtbaren"-Checkbox zum Zustand der Liste synchronisieren // "Alle sichtbaren"-Checkbox zum Zustand der Liste synchronisieren
@@ -3461,17 +3464,49 @@ function bxAction() {
return el ? el.value : 'add'; return el ? el.value : 'add';
} }
// Texte je nach Art (Include-Zuweisung vs. Ausschluss)
function bxTexts() {
return bulkKind === 'include'
? {
title: 'Gruppe für mehrere Apps',
addTitle: 'Gruppe zuweisen', addDesc: 'Gruppe als Zuweisung zu den gewählten Apps hinzufügen.',
removeTitle: 'Zuweisung entfernen', removeDesc: 'Diese Gruppen-Zuweisung von den gewählten Apps wieder entfernen.',
intentHint: 'Als welche Zuweisung? Available (Firmenportal) und/oder Required (Zwangsinstallation). Mind. einer.',
groupLabel: 'Gruppe suchen',
applyAdd: 'Gruppe zuweisen', applyRemove: 'Zuweisung entfernen',
}
: {
title: 'Ausschlussgruppe für mehrere Apps',
addTitle: 'Ausschluss zuweisen', addDesc: 'Gruppe als Ausschluss zu den gewählten Apps hinzufügen.',
removeTitle: 'Ausschluss entfernen', removeDesc: 'Diese Ausschlussgruppe von den gewählten Apps wieder entfernen.',
intentHint: 'In Intune hängt ein Ausschluss immer an einem Intent. Mind. einer muss gewählt sein.',
groupLabel: 'Ausschlussgruppe suchen',
applyAdd: 'Ausschluss zuweisen', applyRemove: 'Ausschluss entfernen',
};
}
function updateBxApplyBtn() { function updateBxApplyBtn() {
const btn = document.getElementById('bxApply'); const btn = document.getElementById('bxApply');
if (!btn) return; if (!btn) return;
const t = bxTexts();
const ok = !!bulkExcludeGroup && bxSelectedIntents().length > 0 && State.selectedAppIds.size > 0; const ok = !!bulkExcludeGroup && bxSelectedIntents().length > 0 && State.selectedAppIds.size > 0;
btn.disabled = !ok; btn.disabled = !ok;
btn.textContent = bxAction() === 'remove' ? 'Ausschluss entfernen' : 'Ausschluss zuweisen'; btn.textContent = bxAction() === 'remove' ? t.applyRemove : t.applyAdd;
} }
function openBulkExcludeModal() { function openBulkModal(kind) {
if (State.selectedAppIds.size === 0) { toast('Keine Apps ausgewählt', 'warn'); return; } if (State.selectedAppIds.size === 0) { toast('Keine Apps ausgewählt', 'warn'); return; }
bulkKind = (kind === 'include') ? 'include' : 'exclude';
resetBxGroup(); resetBxGroup();
// Texte im Dialog an die Art anpassen
const t = bxTexts();
const set = (id, txt) => { const el = document.getElementById(id); if (el) el.textContent = txt; };
set('bxTitle', t.title);
set('bxAddTitle', t.addTitle); set('bxAddDesc', t.addDesc);
set('bxRemoveTitle', t.removeTitle); set('bxRemoveDesc', t.removeDesc);
set('bxIntentHint', t.intentHint); set('bxGroupLabel', t.groupLabel);
const summary = document.getElementById('bxAppSummary'); const summary = document.getElementById('bxAppSummary');
if (summary) { if (summary) {
const ids = [...State.selectedAppIds]; const ids = [...State.selectedAppIds];
@@ -3516,25 +3551,31 @@ async function submitBulkExclude() {
const group = bulkExcludeGroup; const group = bulkExcludeGroup;
const intents = bxSelectedIntents(); const intents = bxSelectedIntents();
const action = bxAction(); const action = bxAction();
const kind = bulkKind;
const appIds = [...State.selectedAppIds]; const appIds = [...State.selectedAppIds];
if (!group || intents.length === 0 || appIds.length === 0) return; if (!group || intents.length === 0 || appIds.length === 0) return;
const noun = kind === 'include' ? 'Zuweisung' : 'Ausschluss';
const verb = action === 'remove' ? 'Entferne' : 'Setze'; const verb = action === 'remove' ? 'Entferne' : 'Setze';
setLoading(`${verb} Ausschluss "${group.name}" für ${appIds.length} App(s)...`); setLoading(`${verb} ${noun} "${group.name}" für ${appIds.length} App(s)...`);
try { try {
const res = await api('/api/apps/assignments/bulk-exclude', { const res = await api('/api/apps/assignments/bulk-assign', {
method: 'POST', method: 'POST',
body: { appIds, groupId: group.id, groupName: group.name, intents, action }, body: { appIds, groupId: group.id, groupName: group.name, intents, action, kind },
timeoutMs: 600000, timeoutMs: 600000,
}); });
closeModal('modalBulkExclude'); closeModal('modalBulkExclude');
const ok = res.success || 0, fail = res.errors || 0; const ok = res.success || 0, fail = res.errors || 0;
// Client-State nachziehen — nur für erfolgreich geänderte Apps // Client-State nachziehen — nur für erfolgreich geänderte Apps.
// Include -> Available/RequiredGroups, Exclude -> Available/RequiredExclusions.
const okIds = new Set((res.results || []).filter(r => r.ok).map(r => r.appId)); const okIds = new Set((res.results || []).filter(r => r.ok).map(r => r.appId));
for (const app of State.apps) { for (const app of State.apps) {
if (!okIds.has(app.AppId)) continue; if (!okIds.has(app.AppId)) continue;
for (const intent of intents) { for (const intent of intents) {
const key = intent === 'available' ? 'AvailableExclusions' : 'RequiredExclusions'; const avail = intent === 'available';
const key = kind === 'include'
? (avail ? 'AvailableGroups' : 'RequiredGroups')
: (avail ? 'AvailableExclusions' : 'RequiredExclusions');
if (!Array.isArray(app[key])) app[key] = []; if (!Array.isArray(app[key])) app[key] = [];
if (action === 'add') { if (action === 'add') {
if (!app[key].some(g => g.GroupId === group.id)) { if (!app[key].some(g => g.GroupId === group.id)) {
@@ -3544,9 +3585,13 @@ async function submitBulkExclude() {
app[key] = app[key].filter(g => g.GroupId !== group.id); app[key] = app[key].filter(g => g.GroupId !== group.id);
} }
} }
if (kind === 'include') {
app.AvailableCount = (app.AvailableGroups || []).length;
app.RequiredCount = (app.RequiredGroups || []).length;
}
} }
if (fail === 0) { if (fail === 0) {
toast(`Ausschluss für ${ok} App(s) ${action === 'remove' ? 'entfernt' : 'gesetzt'}`, 'ok'); toast(`${noun} für ${ok} App(s) ${action === 'remove' ? 'entfernt' : 'gesetzt'}`, 'ok');
} else { } else {
const failNames = (res.results || []).filter(r => !r.ok).map(r => r.appName); const failNames = (res.results || []).filter(r => !r.ok).map(r => r.appName);
toast(`${ok} ok, ${fail} fehlgeschlagen: ${failNames.slice(0, 5).join(', ')}`, 'warn', 'Teilweise fehlgeschlagen'); toast(`${ok} ok, ${fail} fehlgeschlagen: ${failNames.slice(0, 5).join(', ')}`, 'warn', 'Teilweise fehlgeschlagen');
@@ -3554,7 +3599,7 @@ async function submitBulkExclude() {
// Bulk-Auswahl nach dem Lauf leeren und neu rendern // Bulk-Auswahl nach dem Lauf leeren und neu rendern
clearAppSelection(); clearAppSelection();
} catch (e) { } catch (e) {
toast(e.message, 'err', 'Bulk-Ausschluss fehlgeschlagen'); toast(e.message, 'err', 'Bulk-Zuweisung fehlgeschlagen');
} finally { } finally {
clearLoading(); clearLoading();
} }
@@ -3563,7 +3608,8 @@ async function submitBulkExclude() {
// --- Bulk-Verkabelung --- // --- Bulk-Verkabelung ---
document.getElementById('btnAppBulk')?.addEventListener('click', () => toggleAppBulkMode()); document.getElementById('btnAppBulk')?.addEventListener('click', () => toggleAppBulkMode());
document.getElementById('btnBulkClear')?.addEventListener('click', () => clearAppSelection()); document.getElementById('btnBulkClear')?.addEventListener('click', () => clearAppSelection());
document.getElementById('btnBulkExclude')?.addEventListener('click', () => openBulkExcludeModal()); document.getElementById('btnBulkInclude')?.addEventListener('click', () => openBulkModal('include'));
document.getElementById('btnBulkExclude')?.addEventListener('click', () => openBulkModal('exclude'));
document.getElementById('appBulkSelectAll')?.addEventListener('change', e => bulkSelectAllVisible(e.target.checked)); document.getElementById('appBulkSelectAll')?.addEventListener('change', e => bulkSelectAllVisible(e.target.checked));
document.getElementById('bxApply')?.addEventListener('click', () => submitBulkExclude()); document.getElementById('bxApply')?.addEventListener('click', () => submitBulkExclude());
document.querySelectorAll('input[name="bxAction"]').forEach(el => el.addEventListener('change', updateBxApplyBtn)); document.querySelectorAll('input[name="bxAction"]').forEach(el => el.addEventListener('change', updateBxApplyBtn));
+8 -7
View File
@@ -242,7 +242,8 @@
</label> </label>
<span class="app-bulk-count"><strong id="appBulkCount">0</strong> ausgewählt</span> <span class="app-bulk-count"><strong id="appBulkCount">0</strong> ausgewählt</span>
<div class="app-bulk-spacer"></div> <div class="app-bulk-spacer"></div>
<button type="button" id="btnBulkExclude" class="btn btn-primary btn-sm" disabled>Ausschlussgruppe zuweisen…</button> <button type="button" id="btnBulkInclude" class="btn btn-primary btn-sm" disabled>Gruppe zuweisen…</button>
<button type="button" id="btnBulkExclude" class="btn btn-secondary btn-sm" disabled>Ausschlussgruppe…</button>
<button type="button" id="btnBulkClear" class="btn btn-ghost btn-sm" disabled>Auswahl leeren</button> <button type="button" id="btnBulkClear" class="btn btn-ghost btn-sm" disabled>Auswahl leeren</button>
</div> </div>
@@ -859,12 +860,12 @@
</div> </div>
</div> </div>
<!-- MODAL: Bulk-Ausschlussgruppe --> <!-- MODAL: Bulk-Gruppenzuweisung (Include ODER Ausschluss) -->
<div id="modalBulkExclude" class="modal hidden"> <div id="modalBulkExclude" class="modal hidden">
<div class="modal-backdrop" data-close></div> <div class="modal-backdrop" data-close></div>
<div class="modal-box modal-lg"> <div class="modal-box modal-lg">
<div class="modal-head"> <div class="modal-head">
<h3>Ausschlussgruppe für mehrere Apps</h3> <h3 id="bxTitle">Gruppe für mehrere Apps</h3>
<button class="modal-close" data-close aria-label="Schließen">×</button> <button class="modal-close" data-close aria-label="Schließen">×</button>
</div> </div>
<div class="modal-body"> <div class="modal-body">
@@ -873,11 +874,11 @@
<div class="bx-action-grid"> <div class="bx-action-grid">
<label class="bx-action"> <label class="bx-action">
<input type="radio" name="bxAction" value="add" checked> <input type="radio" name="bxAction" value="add" checked>
<span class="bx-action-body"><span class="bx-action-title">Ausschluss zuweisen</span><span class="bx-action-desc">Gruppe als Ausschluss zu den gewählten Apps hinzufügen.</span></span> <span class="bx-action-body"><span class="bx-action-title" id="bxAddTitle">Zuweisen</span><span class="bx-action-desc" id="bxAddDesc">Gruppe zu den gewählten Apps hinzufügen.</span></span>
</label> </label>
<label class="bx-action"> <label class="bx-action">
<input type="radio" name="bxAction" value="remove"> <input type="radio" name="bxAction" value="remove">
<span class="bx-action-body"><span class="bx-action-title">Ausschluss entfernen</span><span class="bx-action-desc">Diese Ausschlussgruppe von den gewählten Apps wieder entfernen.</span></span> <span class="bx-action-body"><span class="bx-action-title" id="bxRemoveTitle">Entfernen</span><span class="bx-action-desc" id="bxRemoveDesc">Diese Gruppe von den gewählten Apps wieder entfernen.</span></span>
</label> </label>
</div> </div>
</div> </div>
@@ -891,10 +892,10 @@
<label class="check-chip"><input type="checkbox" id="bxIntentRequired" checked><span>Required</span></label> <label class="check-chip"><input type="checkbox" id="bxIntentRequired" checked><span>Required</span></label>
<label class="check-chip"><input type="checkbox" id="bxIntentAvailable"><span>Available</span></label> <label class="check-chip"><input type="checkbox" id="bxIntentAvailable"><span>Available</span></label>
</div> </div>
<div class="form-hint">In Intune hängt ein Ausschluss immer an einem Intent. Mind. einer muss gewählt sein.</div> <div class="form-hint" id="bxIntentHint">Die Zuweisung hängt immer an einem Intent. Mind. einer muss gewählt sein.</div>
</div> </div>
<div class="form-group"> <div class="form-group">
<label class="lbl" for="bxGroupSearch">Ausschlussgruppe suchen</label> <label class="lbl" for="bxGroupSearch" id="bxGroupLabel">Gruppe suchen</label>
<input type="search" id="bxGroupSearch" class="input" placeholder="Gruppenname… (min. 2 Zeichen)" autocomplete="off"> <input type="search" id="bxGroupSearch" class="input" placeholder="Gruppenname… (min. 2 Zeichen)" autocomplete="off">
<div id="bxGroupResults" class="cg-existing-results"></div> <div id="bxGroupResults" class="cg-existing-results"></div>
<div id="bxGroupSelected" class="form-hint"></div> <div id="bxGroupSelected" class="form-hint"></div>