Files
Mitgliederverwaltung/src/main.js
T
shahondin1624 139f014c29
Database Portability Tests / Unit Tests (PlatformHelper) (pull_request) Failing after 42s
Database Portability Tests / Integration (mysql) (pull_request) Has been skipped
Database Portability Tests / Integration (postgres) (pull_request) Has been skipped
Database Portability Tests / Integration (sqlite) (pull_request) Has been skipped
Database Portability Tests / Verify no MySQL-specific SQL (pull_request) Successful in 4s
feat: extend Abfrage-Builder with NOT, visual brackets, and full field coverage (Closes #194)
Backend (QueryService):
- AST supports optional `not: true` flag on groups and leaves, translated
  to SQL `NOT (...)` wrappers; existing queries without `not` unchanged
- New member fields: notizen, zusatz_notizen, einwilligung_datum,
  juleica_nummer, juleica_ablaufdatum
- New related-entity fields via EXISTS subqueries: telefon, email,
  familie_name, beitrag_bezahlt_jahr, beitrag_offen_jahr, beitrag_betrag,
  lager_teilnahme, lager_name, verletzung_vorhanden
- Allergien (verschlüsselt): server-side decrypt-and-filter for content
  operators; pure SQL null/empty check for is_empty/is_not_empty; audit
  log records field+op+user but never the value
- Fields now carry a `group` label for grouped rendering in the UI
- Depth cap kept at 10 (Backend-Validierung) - no hard frontend limit

Frontend (QueryBuilder.vue):
- NICHT toggle on each leaf condition (¬ button) and on each group header
- Visual brackets `(` `)` rendered around nested groups
- "Klammer auflösen" button that lifts children into the parent when
  logic is compatible and the group isn't negated
- Fields dropdown grouped by category (Mitglied, Adresse, Kontakt,
  Familie, Beiträge, Lager, Gesundheit)
- Encrypted fields flagged with 🔒 badge
- Removed hard `depth < 3` nesting cap

Tests: 25 new QueryService tests covering NOT semantics, EXISTS joins,
allergien decrypt path, audit-log value masking, and backwards
compatibility with legacy ASTs. All 1118 unit + 13 integration tests pass.

Version bumped to 0.2.8 in all three locations.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-17 20:16:43 +02:00

50 lines
1.8 KiB
JavaScript

/**
* Mitgliederverwaltung Vue.js entry point.
*
* Bootstraps the Vue 3 app with Pinia store and Vue Router,
* mounted into the #mitgliederverwaltung container.
*/
import { createApp } from 'vue'
import { createPinia } from 'pinia'
import App from './App.vue'
import router from './router.js'
// @nextcloud/vue v9 expects loadState("core","apps") to be an array,
// but Nextcloud 28 provides it as an object keyed by app ID.
// Patch it before mounting so @nextcloud/vue's .find() call works.
const appsStateEl = document.querySelector('input[id="initial-state-core-apps"]')
if (appsStateEl) {
try {
const decoded = JSON.parse(atob(appsStateEl.value))
if (decoded && !Array.isArray(decoded)) {
appsStateEl.value = btoa(JSON.stringify(Object.values(decoded)))
}
} catch (_) {
// ignore — let @nextcloud/vue handle the fallback
}
}
const app = createApp(App)
app.use(createPinia())
app.use(router)
// @nextcloud/vue v9 reads appName/appVersion via Vue's inject(),
// not via webpack DefinePlugin globals.
app.provide('appName', 'mitgliederverwaltung')
app.provide('appVersion', '0.2.8')
app.mount('#mitgliederverwaltung')
// Inject global button style fix after all NcButton styles have loaded.
// NcButton's scoped CSS sets overflow:hidden on .button-vue__text which
// truncates button labels. CSS-in-Vue can't reliably override scoped styles,
// so we inject a <style> tag directly.
const fixStyle = document.createElement('style')
fixStyle.textContent = `
#mitgliederverwaltung .button-vue { overflow: visible; padding: 0 16px; white-space: nowrap; }
#mitgliederverwaltung .button-vue .button-vue__text { overflow: visible !important; }
#mitgliederverwaltung .button-vue--icon-only { padding: 0; }
#mitgliederverwaltung .app-navigation-entry.active { border-radius: var(--border-radius-element, 8px) !important; }
`
document.head.appendChild(fixStyle)