Compare commits
No commits in common. "main" and "v1.0.1" have entirely different histories.
|
@ -1,5 +1,4 @@
|
|||
VITE_SERVER_ADDRESS = backend_url #ohne pfad
|
||||
VITE_APP_NAME_OVERWRITE = Mitgliederverwaltung # overwrites FF Admin
|
||||
VITE_IMPRINT_LINK = https://mywebsite-imprint-url
|
||||
VITE_PRIVACY_LINK = https://mywebsite-privacy-url
|
||||
VITE_CUSTOM_LOGIN_MESSAGE = betrieben von xy
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
VITE_SERVER_ADDRESS = __SERVERADDRESS__
|
||||
VITE_APP_NAME_OVERWRITE = __APPNAMEOVERWRITE__
|
||||
VITE_IMPRINT_LINK = __IMPRINTLINK__
|
||||
VITE_PRIVACY_LINK = __PRIVACYLINK__
|
||||
VITE_CUSTOM_LOGIN_MESSAGE = __CUSTOMLOGINMESSAGE__
|
12
README.md
|
@ -6,7 +6,7 @@ Administration für Feuerwehren und Vereine.
|
|||
|
||||
Dieses Repository dient hauptsächlich zur Verwaltung der Mitgliederdaten, aber auch zur Verwaltung weiterer Daten der Feuerwehr oder eines Vereins. Es ist ein Frontend-Client, der auf die Daten des [ff-admin-server Backends](https://forgejo.jk-effects.cloud/Ehrenamt/ff-admin-server) zugreift. Die Webapp bietet eine Möglichkeit Mitgliederdaten zu verwalten, Protokolle zu schreiben und Kaledereinträge zu erstellen. Benutzer können eingeladen und Rollen zugewiesen werden.
|
||||
|
||||
Eine Demo dieser Seite finden Sie unter [https://admin-demo.ff-admin.de](https://admin-demo.ff-admin.de).
|
||||
Eine Demo dieser Seite finden Sie unter [https://ff-admin-demo.jk-effects.cloud](https://ff-admin-demo.jk-effects.cloud).
|
||||
|
||||
Für die Verwendung muss ein TOTP-Code eingegeben werden.
|
||||
|
||||
|
@ -31,15 +31,13 @@ services:
|
|||
restart: unless-stopped
|
||||
|
||||
#environment:
|
||||
# - SERVERADDRESS=<backend_url (https://... | http://...)> # wichtig: ohne Pfad
|
||||
# - APPNAMEOVERWRITE=Mitgliederverwaltung # ersetzt den Namen FF-Admin auf der Login-Seite und sonstigen Positionen in der Oberfläche
|
||||
# - SERVERADDRESS=<backend_url (https://... | http://...)> # wichtig: ohne pfad
|
||||
# - IMPRINTLINK=https://mywebsite-imprint-url
|
||||
# - PRIVACYLINK=https://mywebsite-privacy-url
|
||||
# - CUSTOMLOGINMESSAGE=betrieben von xy
|
||||
#volumes:
|
||||
# - <volume|local path>/favicon.ico:/usr/share/nginx/html/favicon.ico # 48x48 px Auflösung
|
||||
# - <volume|local path>/favicon.png:/usr/share/nginx/html/favicon.png # 512x512 px Auflösung - wird als pwa Icon genutzt
|
||||
# - <volume|local path>/Logo.png:/usr/share/nginx/html/Logo.png
|
||||
# - <volume|local path>/myfavicon.png:/usr/share/nginx/html/favicon.png
|
||||
# - <volume|local path>/mylogo.png:/usr/share/nginx/html/Logo.png
|
||||
```
|
||||
|
||||
Wenn keine Server-Adresse angegeben wird, wird versucht das Backend unter der URL des Frontends zu erreichen. Dazu muss das Backend auf der gleichen URL wie das Frontend laufen. Zur Unterscheidung von Frontend und Backend bei gleicher URL müssen alle Anfragen mit dem PathPrefix `/api` an das Backend weitergeleitet werden.
|
||||
|
@ -64,7 +62,7 @@ npm run start
|
|||
|
||||
### Konfiguration
|
||||
|
||||
Ein eigenes Favicon und Logo kann über das verwenden Volume ausgetauscht werden. Es dürfen jedoch nur einzelne Dateien ausgetauscht werden.
|
||||
Ein eigenes favicon und Logo kann über ein volume ausgetauscht werden.
|
||||
|
||||
## Einrichtung
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
# FF Admin
|
||||
|
||||
## FF Admin ist eine Verwaltungsoberfläche für die Feuerwehr oder andere Vereine:
|
||||
## FF Admin ist eine Verwaltungsoberfläche für die Feuerwehr:
|
||||
|
||||
FF Admin bietet folgende Module:
|
||||
- Mitgliederverwaltung
|
||||
|
@ -23,6 +23,3 @@ FF Admin ist in Verein, Wehr, Einstellungen und Nutzerverwaltung getrennt.
|
|||
Die den Modulen zugrunde liegenden Daten können in den Einstellungen gesetzt werden.
|
||||
|
||||
Fast alle Daten lassen sich einstellen, damit es keine Einschränkungen in der Auswahl von Werten... gibt. Diese Modularität muss allerdings bei einigen Modulen gesondert eingestellt werden.
|
||||
|
||||
## Verwendung
|
||||
Damit FF Admin auch für andere Vereine genutzt werden kann, muss keine erweiterte Konfiguration vorgenommen werden. Am besten ist es alle nicht benötigten Module in der Berechtigungsverwaltung zu deaktivieren. So wird normalerweise der Abschnitt Wehr nicht außerhalb der Feuerwehr benötigt. So müssen hier lediglich keine Berechtigungen vergeben werden und das Modul ist außer für Administratoren oder Owner nicht sichtbar.
|
||||
|
|
|
@ -1,22 +1,15 @@
|
|||
#!/bin/sh
|
||||
|
||||
keys="SERVERADDRESS APPNAMEOVERWRITE IMPRINTLINK PRIVACYLINK CUSTOMLOGINMESSAGE"
|
||||
files="/usr/share/nginx/html/assets/config-*.js /usr/share/nginx/html/manifest.webmanifest"
|
||||
keys="SERVERADDRESS IMPRINTLINK PRIVACYLINK CUSTOMLOGINMESSAGE"
|
||||
|
||||
# Replace env vars in files served by NGINX
|
||||
for file in $files
|
||||
for file in /usr/share/nginx/html/assets/config-*.js
|
||||
do
|
||||
echo "Processing $file ...";
|
||||
for key in $keys
|
||||
do
|
||||
# Get environment variable
|
||||
value=$(eval echo "\$$key")
|
||||
|
||||
# Set default value for APPNAMEOVERWRITE if empty
|
||||
if [ "$key" = "APPNAMEOVERWRITE" ] && [ -z "$value" ]; then
|
||||
value="FF Admin"
|
||||
fi
|
||||
|
||||
echo "replace $key by $value"
|
||||
|
||||
# replace __[variable_name]__ value with environment variable
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
<meta charset="UTF-8" />
|
||||
<link rel="icon" type="image/png" href="/favicon.png" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<title>Mitgliederverwaltung</title>
|
||||
</head>
|
||||
<body>
|
||||
<div id="app"></div>
|
||||
|
|
4
package-lock.json
generated
|
@ -1,12 +1,12 @@
|
|||
{
|
||||
"name": "ff-admin",
|
||||
"version": "1.2.0",
|
||||
"version": "1.0.1",
|
||||
"lockfileVersion": 3,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "ff-admin",
|
||||
"version": "1.2.0",
|
||||
"version": "1.0.1",
|
||||
"license": "GPL-3.0-only",
|
||||
"dependencies": {
|
||||
"@fullcalendar/core": "^6.1.15",
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "ff-admin",
|
||||
"version": "1.2.0",
|
||||
"version": "1.0.1",
|
||||
"description": "Feuerwehr/Verein Mitgliederverwaltung UI",
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
|
@ -12,7 +12,7 @@
|
|||
"lint": "eslint . --ext .vue,.js,.jsx,.cjs,.mjs,.ts,.tsx,.cts,.mts --fix --ignore-path .gitignore",
|
||||
"format": "prettier --write src/",
|
||||
"bnp": "npm run build-only && npm run preview",
|
||||
"generate-pwa-assets": "pwa-assets-generator --preset minimal-2023 public/fw-wappen.png"
|
||||
"generate-pwa-assets": "pwa-assets-generator --preset minimal-2023 public/CM.svg"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
{
|
||||
"id": "0",
|
||||
"name": "administration-db",
|
||||
"createdAt": "2025-01-12T13:30:56.612Z",
|
||||
"updatedAt": "2025-01-12T13:30:56.612Z",
|
||||
"createdAt": "2025-01-08T15:50:20.331Z",
|
||||
"updatedAt": "2025-01-08T15:50:20.331Z",
|
||||
"databaseType": "mariadb",
|
||||
"tables": [
|
||||
{
|
||||
|
@ -1291,18 +1291,6 @@
|
|||
},
|
||||
{
|
||||
"id": "101",
|
||||
"name": "postalCode",
|
||||
"type": {
|
||||
"name": "varchar",
|
||||
"id": "varchar"
|
||||
},
|
||||
"unique": false,
|
||||
"nullable": true,
|
||||
"primaryKey": false,
|
||||
"createdAt": 1736688552836
|
||||
},
|
||||
{
|
||||
"id": "102",
|
||||
"name": "city",
|
||||
"type": {
|
||||
"id": "varchar",
|
||||
|
@ -1317,7 +1305,7 @@
|
|||
"createdAt": 1734524896260
|
||||
},
|
||||
{
|
||||
"id": "103",
|
||||
"id": "102",
|
||||
"name": "street",
|
||||
"type": {
|
||||
"id": "varchar",
|
||||
|
@ -1332,7 +1320,7 @@
|
|||
"createdAt": 1734524896260
|
||||
},
|
||||
{
|
||||
"id": "104",
|
||||
"id": "103",
|
||||
"name": "streetNumber",
|
||||
"type": {
|
||||
"id": "int",
|
||||
|
@ -1345,7 +1333,7 @@
|
|||
"createdAt": 1734524896260
|
||||
},
|
||||
{
|
||||
"id": "105",
|
||||
"id": "104",
|
||||
"name": "streetNumberAddition",
|
||||
"type": {
|
||||
"id": "varchar",
|
||||
|
@ -1360,7 +1348,7 @@
|
|||
"createdAt": 1734524896260
|
||||
},
|
||||
{
|
||||
"id": "106",
|
||||
"id": "105",
|
||||
"name": "typeId",
|
||||
"type": {
|
||||
"id": "int",
|
||||
|
@ -1372,7 +1360,7 @@
|
|||
"createdAt": 1734524896260
|
||||
},
|
||||
{
|
||||
"id": "107",
|
||||
"id": "106",
|
||||
"name": "memberId",
|
||||
"type": {
|
||||
"id": "int",
|
||||
|
@ -1384,7 +1372,7 @@
|
|||
"createdAt": 1734524896260
|
||||
},
|
||||
{
|
||||
"id": "108",
|
||||
"id": "107",
|
||||
"name": "isSMSAlarming",
|
||||
"type": {
|
||||
"id": "tinyint",
|
||||
|
@ -1399,7 +1387,7 @@
|
|||
],
|
||||
"indexes": [
|
||||
{
|
||||
"id": "109",
|
||||
"id": "108",
|
||||
"name": "PRIMARY",
|
||||
"unique": true,
|
||||
"fieldIds": [
|
||||
|
@ -1408,20 +1396,20 @@
|
|||
"createdAt": 1734524896260
|
||||
},
|
||||
{
|
||||
"id": "110",
|
||||
"id": "109",
|
||||
"name": "FK_21994db635b47e07f45b2686a51",
|
||||
"unique": false,
|
||||
"fieldIds": [
|
||||
"106"
|
||||
"105"
|
||||
],
|
||||
"createdAt": 1734524896260
|
||||
},
|
||||
{
|
||||
"id": "111",
|
||||
"id": "110",
|
||||
"name": "FK_fc5f59e5c9aafdedd25ed8ed36e",
|
||||
"unique": false,
|
||||
"fieldIds": [
|
||||
"107"
|
||||
"106"
|
||||
],
|
||||
"createdAt": 1734524896260
|
||||
}
|
||||
|
@ -1433,14 +1421,14 @@
|
|||
"diagramId": "7gb18czobyir"
|
||||
},
|
||||
{
|
||||
"id": "112",
|
||||
"id": "111",
|
||||
"name": "member_qualifications",
|
||||
"schema": "administration",
|
||||
"x": -250.37357560579426,
|
||||
"y": 82.72883357238302,
|
||||
"fields": [
|
||||
{
|
||||
"id": "113",
|
||||
"id": "112",
|
||||
"name": "id",
|
||||
"type": {
|
||||
"id": "int",
|
||||
|
@ -1452,7 +1440,7 @@
|
|||
"createdAt": 1734524896259
|
||||
},
|
||||
{
|
||||
"id": "114",
|
||||
"id": "113",
|
||||
"name": "note",
|
||||
"type": {
|
||||
"id": "varchar",
|
||||
|
@ -1467,7 +1455,7 @@
|
|||
"createdAt": 1734524896259
|
||||
},
|
||||
{
|
||||
"id": "115",
|
||||
"id": "114",
|
||||
"name": "start",
|
||||
"type": {
|
||||
"id": "date",
|
||||
|
@ -1479,7 +1467,7 @@
|
|||
"createdAt": 1734524896259
|
||||
},
|
||||
{
|
||||
"id": "116",
|
||||
"id": "115",
|
||||
"name": "end",
|
||||
"type": {
|
||||
"id": "date",
|
||||
|
@ -1492,7 +1480,7 @@
|
|||
"createdAt": 1734524896259
|
||||
},
|
||||
{
|
||||
"id": "117",
|
||||
"id": "116",
|
||||
"name": "terminationReason",
|
||||
"type": {
|
||||
"id": "varchar",
|
||||
|
@ -1507,7 +1495,7 @@
|
|||
"createdAt": 1734524896259
|
||||
},
|
||||
{
|
||||
"id": "118",
|
||||
"id": "117",
|
||||
"name": "memberId",
|
||||
"type": {
|
||||
"id": "int",
|
||||
|
@ -1519,7 +1507,7 @@
|
|||
"createdAt": 1734524896259
|
||||
},
|
||||
{
|
||||
"id": "119",
|
||||
"id": "118",
|
||||
"name": "qualificationId",
|
||||
"type": {
|
||||
"id": "int",
|
||||
|
@ -1533,29 +1521,29 @@
|
|||
],
|
||||
"indexes": [
|
||||
{
|
||||
"id": "120",
|
||||
"id": "119",
|
||||
"name": "PRIMARY",
|
||||
"unique": true,
|
||||
"fieldIds": [
|
||||
"113"
|
||||
"112"
|
||||
],
|
||||
"createdAt": 1734524896259
|
||||
},
|
||||
{
|
||||
"id": "120",
|
||||
"name": "FK_98b70e687c35709d2f01b3d7d74",
|
||||
"unique": false,
|
||||
"fieldIds": [
|
||||
"117"
|
||||
],
|
||||
"createdAt": 1734524896259
|
||||
},
|
||||
{
|
||||
"id": "121",
|
||||
"name": "FK_98b70e687c35709d2f01b3d7d74",
|
||||
"unique": false,
|
||||
"fieldIds": [
|
||||
"118"
|
||||
],
|
||||
"createdAt": 1734524896259
|
||||
},
|
||||
{
|
||||
"id": "122",
|
||||
"name": "FK_dbebe53df1caa0b6715a220b0ea",
|
||||
"unique": false,
|
||||
"fieldIds": [
|
||||
"119"
|
||||
"118"
|
||||
],
|
||||
"createdAt": 1734524896259
|
||||
}
|
||||
|
@ -1567,14 +1555,14 @@
|
|||
"diagramId": "7gb18czobyir"
|
||||
},
|
||||
{
|
||||
"id": "123",
|
||||
"id": "122",
|
||||
"name": "executive_position",
|
||||
"schema": "administration",
|
||||
"x": -542.0601569820527,
|
||||
"y": 474.7348899814151,
|
||||
"fields": [
|
||||
{
|
||||
"id": "124",
|
||||
"id": "123",
|
||||
"name": "id",
|
||||
"type": {
|
||||
"id": "int",
|
||||
|
@ -1586,7 +1574,7 @@
|
|||
"createdAt": 1734524896260
|
||||
},
|
||||
{
|
||||
"id": "125",
|
||||
"id": "124",
|
||||
"name": "position",
|
||||
"type": {
|
||||
"id": "varchar",
|
||||
|
@ -1602,11 +1590,11 @@
|
|||
],
|
||||
"indexes": [
|
||||
{
|
||||
"id": "126",
|
||||
"id": "125",
|
||||
"name": "PRIMARY",
|
||||
"unique": true,
|
||||
"fieldIds": [
|
||||
"124"
|
||||
"123"
|
||||
],
|
||||
"createdAt": 1734524896260
|
||||
}
|
||||
|
@ -1618,14 +1606,14 @@
|
|||
"diagramId": "7gb18czobyir"
|
||||
},
|
||||
{
|
||||
"id": "127",
|
||||
"id": "126",
|
||||
"name": "qualification",
|
||||
"schema": "administration",
|
||||
"x": -568.0578068648438,
|
||||
"y": 192.56221408776412,
|
||||
"fields": [
|
||||
{
|
||||
"id": "128",
|
||||
"id": "127",
|
||||
"name": "id",
|
||||
"type": {
|
||||
"id": "int",
|
||||
|
@ -1637,7 +1625,7 @@
|
|||
"createdAt": 1734524896260
|
||||
},
|
||||
{
|
||||
"id": "129",
|
||||
"id": "128",
|
||||
"name": "qualification",
|
||||
"type": {
|
||||
"id": "varchar",
|
||||
|
@ -1651,7 +1639,7 @@
|
|||
"createdAt": 1734524896260
|
||||
},
|
||||
{
|
||||
"id": "130",
|
||||
"id": "129",
|
||||
"name": "description",
|
||||
"type": {
|
||||
"id": "varchar",
|
||||
|
@ -1668,11 +1656,11 @@
|
|||
],
|
||||
"indexes": [
|
||||
{
|
||||
"id": "131",
|
||||
"id": "130",
|
||||
"name": "PRIMARY",
|
||||
"unique": true,
|
||||
"fieldIds": [
|
||||
"128"
|
||||
"127"
|
||||
],
|
||||
"createdAt": 1734524896260
|
||||
}
|
||||
|
@ -1686,27 +1674,27 @@
|
|||
],
|
||||
"relationships": [
|
||||
{
|
||||
"id": "132",
|
||||
"id": "131",
|
||||
"name": "FK_1fd52c8f109123e5a2c67dc2c83",
|
||||
"sourceSchema": "administration",
|
||||
"targetSchema": "administration",
|
||||
"sourceTableId": "1",
|
||||
"targetTableId": "123",
|
||||
"targetTableId": "122",
|
||||
"sourceFieldId": "7",
|
||||
"targetFieldId": "124",
|
||||
"targetFieldId": "123",
|
||||
"sourceCardinality": "many",
|
||||
"targetCardinality": "one",
|
||||
"createdAt": 1734524896262,
|
||||
"diagramId": "7gb18czobyir"
|
||||
},
|
||||
{
|
||||
"id": "133",
|
||||
"id": "132",
|
||||
"name": "FK_21994db635b47e07f45b2686a51",
|
||||
"sourceSchema": "administration",
|
||||
"targetSchema": "administration",
|
||||
"sourceTableId": "96",
|
||||
"targetTableId": "71",
|
||||
"sourceFieldId": "106",
|
||||
"sourceFieldId": "105",
|
||||
"targetFieldId": "72",
|
||||
"sourceCardinality": "many",
|
||||
"targetCardinality": "one",
|
||||
|
@ -1714,7 +1702,7 @@
|
|||
"diagramId": "7gb18czobyir"
|
||||
},
|
||||
{
|
||||
"id": "134",
|
||||
"id": "133",
|
||||
"name": "FK_2912b056a5d0b7977360a986164",
|
||||
"sourceSchema": "administration",
|
||||
"targetSchema": "administration",
|
||||
|
@ -1728,7 +1716,7 @@
|
|||
"diagramId": "7gb18czobyir"
|
||||
},
|
||||
{
|
||||
"id": "135",
|
||||
"id": "134",
|
||||
"name": "FK_3b4b41597707b13086e71727422",
|
||||
"sourceSchema": "administration",
|
||||
"targetSchema": "administration",
|
||||
|
@ -1742,13 +1730,13 @@
|
|||
"diagramId": "7gb18czobyir"
|
||||
},
|
||||
{
|
||||
"id": "136",
|
||||
"id": "135",
|
||||
"name": "FK_98b70e687c35709d2f01b3d7d74",
|
||||
"sourceSchema": "administration",
|
||||
"targetSchema": "administration",
|
||||
"sourceTableId": "112",
|
||||
"sourceTableId": "111",
|
||||
"targetTableId": "60",
|
||||
"sourceFieldId": "118",
|
||||
"sourceFieldId": "117",
|
||||
"targetFieldId": "61",
|
||||
"sourceCardinality": "many",
|
||||
"targetCardinality": "one",
|
||||
|
@ -1756,7 +1744,7 @@
|
|||
"diagramId": "7gb18czobyir"
|
||||
},
|
||||
{
|
||||
"id": "137",
|
||||
"id": "136",
|
||||
"name": "FK_a47e04bfd3671d8a375d1896d25",
|
||||
"sourceSchema": "administration",
|
||||
"targetSchema": "administration",
|
||||
|
@ -1770,7 +1758,7 @@
|
|||
"diagramId": "7gb18czobyir"
|
||||
},
|
||||
{
|
||||
"id": "138",
|
||||
"id": "137",
|
||||
"name": "FK_ba47b44c2ddf34c1bcc75df6675",
|
||||
"sourceSchema": "administration",
|
||||
"targetSchema": "administration",
|
||||
|
@ -1784,21 +1772,21 @@
|
|||
"diagramId": "7gb18czobyir"
|
||||
},
|
||||
{
|
||||
"id": "139",
|
||||
"id": "138",
|
||||
"name": "FK_dbebe53df1caa0b6715a220b0ea",
|
||||
"sourceSchema": "administration",
|
||||
"targetSchema": "administration",
|
||||
"sourceTableId": "112",
|
||||
"targetTableId": "127",
|
||||
"sourceFieldId": "119",
|
||||
"targetFieldId": "128",
|
||||
"sourceTableId": "111",
|
||||
"targetTableId": "126",
|
||||
"sourceFieldId": "118",
|
||||
"targetFieldId": "127",
|
||||
"sourceCardinality": "many",
|
||||
"targetCardinality": "one",
|
||||
"createdAt": 1734524896262,
|
||||
"diagramId": "7gb18czobyir"
|
||||
},
|
||||
{
|
||||
"id": "140",
|
||||
"id": "139",
|
||||
"name": "FK_e9fd4d37c4ac0fb08bd6eeeda3c",
|
||||
"sourceSchema": "administration",
|
||||
"targetSchema": "administration",
|
||||
|
@ -1812,13 +1800,13 @@
|
|||
"diagramId": "7gb18czobyir"
|
||||
},
|
||||
{
|
||||
"id": "141",
|
||||
"id": "140",
|
||||
"name": "FK_fc5f59e5c9aafdedd25ed8ed36e",
|
||||
"sourceSchema": "administration",
|
||||
"targetSchema": "administration",
|
||||
"sourceTableId": "96",
|
||||
"targetTableId": "60",
|
||||
"sourceFieldId": "107",
|
||||
"sourceFieldId": "106",
|
||||
"targetFieldId": "61",
|
||||
"sourceCardinality": "many",
|
||||
"targetCardinality": "one",
|
||||
|
@ -1828,7 +1816,7 @@
|
|||
],
|
||||
"dependencies": [
|
||||
{
|
||||
"id": "142",
|
||||
"id": "141",
|
||||
"schema": "administration",
|
||||
"tableId": "60",
|
||||
"dependentSchema": "administration",
|
||||
|
@ -1837,25 +1825,25 @@
|
|||
"diagramId": "7gb18czobyir"
|
||||
},
|
||||
{
|
||||
"id": "143",
|
||||
"id": "142",
|
||||
"schema": "administration",
|
||||
"tableId": "127",
|
||||
"tableId": "126",
|
||||
"dependentSchema": "administration",
|
||||
"dependentTableId": "86",
|
||||
"createdAt": 1734524897266,
|
||||
"diagramId": "7gb18czobyir"
|
||||
},
|
||||
{
|
||||
"id": "144",
|
||||
"id": "143",
|
||||
"schema": "administration",
|
||||
"tableId": "112",
|
||||
"tableId": "111",
|
||||
"dependentSchema": "administration",
|
||||
"dependentTableId": "86",
|
||||
"createdAt": 1734524897267,
|
||||
"diagramId": "7gb18czobyir"
|
||||
},
|
||||
{
|
||||
"id": "145",
|
||||
"id": "144",
|
||||
"schema": "administration",
|
||||
"tableId": "60",
|
||||
"dependentSchema": "administration",
|
||||
|
@ -1864,7 +1852,7 @@
|
|||
"diagramId": "7gb18czobyir"
|
||||
},
|
||||
{
|
||||
"id": "146",
|
||||
"id": "145",
|
||||
"schema": "administration",
|
||||
"tableId": "1",
|
||||
"dependentSchema": "administration",
|
||||
|
@ -1873,7 +1861,7 @@
|
|||
"diagramId": "7gb18czobyir"
|
||||
},
|
||||
{
|
||||
"id": "147",
|
||||
"id": "146",
|
||||
"schema": "administration",
|
||||
"tableId": "60",
|
||||
"dependentSchema": "administration",
|
||||
|
@ -1882,7 +1870,7 @@
|
|||
"diagramId": "7gb18czobyir"
|
||||
},
|
||||
{
|
||||
"id": "148",
|
||||
"id": "147",
|
||||
"schema": "administration",
|
||||
"tableId": "56",
|
||||
"dependentSchema": "administration",
|
||||
|
@ -1891,7 +1879,7 @@
|
|||
"diagramId": "7gb18czobyir"
|
||||
},
|
||||
{
|
||||
"id": "149",
|
||||
"id": "148",
|
||||
"schema": "administration",
|
||||
"tableId": "35",
|
||||
"dependentSchema": "administration",
|
||||
|
@ -1900,16 +1888,16 @@
|
|||
"diagramId": "7gb18czobyir"
|
||||
},
|
||||
{
|
||||
"id": "150",
|
||||
"id": "149",
|
||||
"schema": "administration",
|
||||
"tableId": "123",
|
||||
"tableId": "122",
|
||||
"dependentSchema": "administration",
|
||||
"dependentTableId": "11",
|
||||
"createdAt": 1734524897283,
|
||||
"diagramId": "7gb18czobyir"
|
||||
},
|
||||
{
|
||||
"id": "151",
|
||||
"id": "150",
|
||||
"schema": "administration",
|
||||
"tableId": "60",
|
||||
"dependentSchema": "administration",
|
||||
|
|
BIN
public/Logo.png
Before Width: | Height: | Size: 34 KiB After Width: | Height: | Size: 39 KiB |
Before Width: | Height: | Size: 650 KiB After Width: | Height: | Size: 647 KiB |
Before Width: | Height: | Size: 11 MiB After Width: | Height: | Size: 11 MiB |
Before Width: | Height: | Size: 9.4 KiB |
Before Width: | Height: | Size: 29 KiB After Width: | Height: | Size: 516 KiB |
|
@ -5,16 +5,10 @@
|
|||
<a v-if="config.privacy_link" :href="config.privacy_link" target="_blank">Impressum</a>
|
||||
</div>
|
||||
<p v-if="config.custom_login_message">{{ config.custom_login_message }}</p>
|
||||
<p>
|
||||
©
|
||||
<a href="https://forgejo.jk-effects.cloud/Ehrenamt/ff-admin" target="_blank">Admin-Portal</a>
|
||||
by
|
||||
<a href="https://jk-effects.com" target="_blank">JK Effects</a>
|
||||
</p>
|
||||
|
||||
<a href="https://jk-effects.com" target="_blank"> © Admin-Portal by JK Effects </a>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { config } from '@/config'
|
||||
import { config } from '../config'
|
||||
</script>
|
|
@ -2,7 +2,7 @@
|
|||
<header class="flex flex-row h-16 min-h-16 justify-between p-3 md:px-5 bg-white shadow-sm">
|
||||
<RouterLink to="/" class="flex flex-row gap-2 align-bottom w-fit h-full">
|
||||
<img src="/Logo.png" alt="LOGO" class="h-full w-auto" />
|
||||
<h1 v-if="false" class="font-bold text-3xl w-fit whitespace-nowrap">{{config.app_name_overwrite || "FF Admin"}}</h1>
|
||||
<h1 v-if="false" class="font-bold text-3xl w-fit whitespace-nowrap">FF Admin</h1>
|
||||
</RouterLink>
|
||||
<div class="flex flex-row gap-2 items-center">
|
||||
<div v-if="authCheck" class="hidden md:flex flex-row gap-2 h-full align-middle">
|
||||
|
@ -30,7 +30,6 @@ import { useAuthStore } from "@/stores/auth";
|
|||
import { useNavigationStore } from "@/stores/admin/navigation";
|
||||
import TopLevelLink from "./admin/TopLevelLink.vue";
|
||||
import UserMenu from "./UserMenu.vue";
|
||||
import { config } from "@/config"
|
||||
</script>
|
||||
|
||||
<script lang="ts">
|
||||
|
|
|
@ -113,10 +113,10 @@ export default defineComponent({
|
|||
},
|
||||
methods: {
|
||||
...mapActions(useNotificationStore, ["revoke"]),
|
||||
close(id: string) {
|
||||
close(id: number) {
|
||||
this.revoke(id);
|
||||
},
|
||||
hovering(id: string, value: boolean, timeout?: number) {
|
||||
hovering(id: number, value: boolean, timeout?: number) {
|
||||
if (value) {
|
||||
clearTimeout(this.timeouts[id]);
|
||||
} else {
|
||||
|
|
|
@ -159,7 +159,7 @@ const loadPage = (newPage: number | ".") => {
|
|||
if (pageEnd > entryCount.value) pageEnd = entryCount.value;
|
||||
|
||||
let loadedElementCount = filterData(props.items, searchString.value, pageStart, pageEnd).length;
|
||||
|
||||
console.log(loadedElementCount, props.maxEntriesPerPage, pageStart, pageEnd)
|
||||
if (loadedElementCount < props.maxEntriesPerPage && (pageEnd != props.totalCount || loadedElementCount == 0))
|
||||
emit("loadData", pageStart, props.maxEntriesPerPage, searchString.value);
|
||||
|
||||
|
|
|
@ -1,182 +0,0 @@
|
|||
<template>
|
||||
<div class="w-full">
|
||||
<Combobox v-model="selected" :disabled="disabled" multiple>
|
||||
<ComboboxLabel>{{ title }}</ComboboxLabel>
|
||||
<div class="relative mt-1">
|
||||
<ComboboxInput
|
||||
class="rounded-md shadow-sm relative block w-full px-3 py-2 border border-gray-300 focus:border-primary placeholder-gray-500 text-gray-900 rounded-b-md focus:outline-none focus:ring-0 focus:z-10 sm:text-sm resize-none"
|
||||
@input="query = $event.target.value"
|
||||
/>
|
||||
<ComboboxButton class="absolute inset-y-0 right-0 flex items-center pr-2">
|
||||
<ChevronUpDownIcon class="h-5 w-5 text-gray-400" aria-hidden="true" />
|
||||
</ComboboxButton>
|
||||
<TransitionRoot
|
||||
leave="transition ease-in duration-100"
|
||||
leaveFrom="opacity-100"
|
||||
leaveTo="opacity-0"
|
||||
@after-leave="query = ''"
|
||||
>
|
||||
<ComboboxOptions
|
||||
class="absolute mt-1 max-h-60 w-full overflow-auto rounded-md bg-white py-1 text-base shadow-md ring-1 ring-black/5 focus:outline-none sm:text-sm"
|
||||
>
|
||||
<ComboboxOption v-if="loading || deferingSearch" as="template" disabled>
|
||||
<li class="flex flex-row gap-2 text-text relative cursor-default select-none py-2 pl-3 pr-4">
|
||||
<Spinner />
|
||||
<span class="font-normal block truncate">suche</span>
|
||||
</li>
|
||||
</ComboboxOption>
|
||||
<ComboboxOption v-else-if="filtered.length === 0 && query == ''" as="template" disabled>
|
||||
<li class="text-text relative cursor-default select-none py-2 pl-3 pr-4">
|
||||
<span class="font-normal block truncate">tippe, um zu suchen...</span>
|
||||
</li>
|
||||
</ComboboxOption>
|
||||
<ComboboxOption v-else-if="filtered.length === 0" as="template" disabled>
|
||||
<li class="text-text relative cursor-default select-none py-2 pl-3 pr-4">
|
||||
<span class="font-normal block truncate">Keine Auswahl gefunden.</span>
|
||||
</li>
|
||||
</ComboboxOption>
|
||||
|
||||
<ComboboxOption
|
||||
v-if="!(loading || deferingSearch)"
|
||||
v-for="member in filtered"
|
||||
as="template"
|
||||
:key="member.id"
|
||||
:value="member.id"
|
||||
v-slot="{ selected, active }"
|
||||
>
|
||||
<li
|
||||
class="relative cursor-default select-none py-2 pl-10 pr-4"
|
||||
:class="{
|
||||
'bg-primary text-white': active,
|
||||
'text-gray-900': !active,
|
||||
}"
|
||||
>
|
||||
<span class="block truncate" :class="{ 'font-medium': selected, 'font-normal': !selected }">
|
||||
{{ member.firstname }} {{ member.lastname }} {{ member.nameaffix }}
|
||||
</span>
|
||||
<span
|
||||
v-if="selected"
|
||||
class="absolute inset-y-0 left-0 flex items-center pl-3"
|
||||
:class="{ 'text-white': active, 'text-primary': !active }"
|
||||
>
|
||||
<CheckIcon class="h-5 w-5" aria-hidden="true" />
|
||||
</span>
|
||||
</li>
|
||||
</ComboboxOption>
|
||||
</ComboboxOptions>
|
||||
</TransitionRoot>
|
||||
</div>
|
||||
</Combobox>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { defineComponent, type PropType } from "vue";
|
||||
import { mapState, mapActions } from "pinia";
|
||||
import {
|
||||
Combobox,
|
||||
ComboboxLabel,
|
||||
ComboboxInput,
|
||||
ComboboxButton,
|
||||
ComboboxOptions,
|
||||
ComboboxOption,
|
||||
TransitionRoot,
|
||||
} from "@headlessui/vue";
|
||||
import { CheckIcon, ChevronUpDownIcon } from "@heroicons/vue/20/solid";
|
||||
import { useMemberStore } from "@/stores/admin/club/member/member";
|
||||
import type { MemberViewModel } from "@/viewmodels/admin/club/member/member.models";
|
||||
import difference from "lodash.difference";
|
||||
import Spinner from "../Spinner.vue";
|
||||
</script>
|
||||
|
||||
<script lang="ts">
|
||||
export default defineComponent({
|
||||
props: {
|
||||
modelValue: {
|
||||
type: Array as PropType<Array<number>>,
|
||||
default: [],
|
||||
},
|
||||
title: String,
|
||||
disabled: {
|
||||
type: Boolean,
|
||||
default: false,
|
||||
},
|
||||
},
|
||||
emits: ["update:model-value", "add:difference", "remove:difference", "add:member", "add:memberByArray"],
|
||||
watch: {
|
||||
modelValue() {
|
||||
if (this.initialLoaded) return;
|
||||
this.initialLoaded = true;
|
||||
this.loadMembersInitial();
|
||||
},
|
||||
query() {
|
||||
this.deferingSearch = true;
|
||||
clearTimeout(this.timer);
|
||||
this.timer = setTimeout(() => {
|
||||
this.deferingSearch = false;
|
||||
this.search();
|
||||
}, 600);
|
||||
},
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
initialLoaded: false as boolean,
|
||||
loading: false as boolean,
|
||||
deferingSearch: false as boolean,
|
||||
timer: undefined as any,
|
||||
query: "" as string,
|
||||
filtered: [] as Array<MemberViewModel>,
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
selected: {
|
||||
get() {
|
||||
return this.modelValue;
|
||||
},
|
||||
set(val: Array<number>) {
|
||||
this.$emit("update:model-value", val);
|
||||
if (this.modelValue.length < val.length) {
|
||||
let diff = difference(val, this.modelValue);
|
||||
if (diff.length != 1) return;
|
||||
this.$emit("add:difference", diff[0]);
|
||||
this.$emit("add:member", this.getMemberFromSearch(diff[0]));
|
||||
} else {
|
||||
let diff = difference(this.modelValue, val);
|
||||
if (diff.length != 1) return;
|
||||
this.$emit("remove:difference", diff[0]);
|
||||
}
|
||||
},
|
||||
},
|
||||
},
|
||||
mounted() {
|
||||
this.loadMembersInitial();
|
||||
},
|
||||
methods: {
|
||||
...mapActions(useMemberStore, ["searchMembers", "getMembersByIds"]),
|
||||
search() {
|
||||
this.filtered = [];
|
||||
if (this.query == "") return;
|
||||
this.loading = true;
|
||||
this.searchMembers(this.query)
|
||||
.then((res) => {
|
||||
this.filtered = res.data;
|
||||
})
|
||||
.catch((err) => {})
|
||||
.finally(() => {
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
getMemberFromSearch(id: number) {
|
||||
return this.filtered.find((f) => f.id == id);
|
||||
},
|
||||
loadMembersInitial() {
|
||||
if (this.modelValue.length == 0) return;
|
||||
this.getMembersByIds(this.modelValue)
|
||||
.then((res) => {
|
||||
this.$emit("add:memberByArray", res.data);
|
||||
})
|
||||
.catch(() => {});
|
||||
},
|
||||
},
|
||||
});
|
||||
</script>
|
|
@ -24,7 +24,7 @@ export default defineComponent({
|
|||
default: "LINK",
|
||||
},
|
||||
link: {
|
||||
type: Object as PropType<string | { name: string, params?:{[key:string]:string} }>,
|
||||
type: Object as PropType<string | { name: string }>,
|
||||
default: "/",
|
||||
},
|
||||
active: {
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<template>
|
||||
<div class="w-full md:max-w-md">
|
||||
<div class="flex flex-col items-center">
|
||||
<p class="text-xl font-medium">Termin erstellen</p>
|
||||
<p class="text-xl font-medium">Termintyp erstellen</p>
|
||||
</div>
|
||||
<br />
|
||||
<form class="flex flex-col gap-4 py-2" @submit.prevent="triggerCreate">
|
||||
|
@ -124,7 +124,11 @@
|
|||
|
||||
<div class="flex flex-row justify-end">
|
||||
<div class="flex flex-row gap-4 py-2">
|
||||
<button primary-outline @click="closeModal" :disabled="status == 'loading' || status?.status == 'success'">
|
||||
<button
|
||||
primary-outline
|
||||
@click="closeModal"
|
||||
:disabled="status != null && status != 'loading' && status?.status != 'failed'"
|
||||
>
|
||||
abbrechen
|
||||
</button>
|
||||
</div>
|
||||
|
@ -190,7 +194,6 @@ export default defineComponent({
|
|||
location: formData.location.value,
|
||||
allDay: this.allDay,
|
||||
};
|
||||
this.status = "loading";
|
||||
this.createCalendar(createCalendar)
|
||||
.then(() => {
|
||||
this.status = { status: "success" };
|
||||
|
|
|
@ -38,9 +38,7 @@
|
|||
|
||||
<div class="flex flex-row justify-end">
|
||||
<div class="flex flex-row gap-4 py-2">
|
||||
<button primary-outline @click="closeModal" :disabled="status == 'loading' || status?.status == 'success'">
|
||||
abbrechen
|
||||
</button>
|
||||
<button primary-outline @click="closeModal" :disabled="status != null">abbrechen</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -80,7 +78,6 @@ export default defineComponent({
|
|||
...mapActions(useModalStore, ["closeModal"]),
|
||||
...mapActions(useCalendarStore, ["deleteCalendar"]),
|
||||
triggerDelete() {
|
||||
this.status = "loading";
|
||||
this.deleteCalendar(this.data)
|
||||
.then(() => {
|
||||
this.status = { status: "success" };
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
@click="deleteCalendar"
|
||||
/>
|
||||
<div class="flex flex-col items-center">
|
||||
<p class="text-xl font-medium">Termin erstellen</p>
|
||||
<p class="text-xl font-medium">Termintyp erstellen</p>
|
||||
</div>
|
||||
<br />
|
||||
<Spinner v-if="loading == 'loading'" class="mx-auto" />
|
||||
|
@ -166,7 +166,11 @@
|
|||
|
||||
<div class="flex flex-row justify-end">
|
||||
<div class="flex flex-row gap-4 py-2">
|
||||
<button primary-outline @click="closeModal" :disabled="status == 'loading' || status?.status == 'success'">
|
||||
<button
|
||||
primary-outline
|
||||
@click="closeModal"
|
||||
:disabled="status != null && status != 'loading' && status?.status != 'failed'"
|
||||
>
|
||||
abbrechen / schließen
|
||||
</button>
|
||||
</div>
|
||||
|
@ -260,7 +264,6 @@ export default defineComponent({
|
|||
location: formData.location.value,
|
||||
allDay: this.calendar.allDay,
|
||||
};
|
||||
this.status = "loading";
|
||||
this.updateCalendar(updateCalendar)
|
||||
.then(() => {
|
||||
this.fetchItem();
|
||||
|
|
|
@ -133,7 +133,6 @@ export default defineComponent({
|
|||
birthdate: formData.birthdate.value,
|
||||
internalId: formData.internalId.value,
|
||||
};
|
||||
this.status = "loading";
|
||||
this.createMember(createMember)
|
||||
.then(() => {
|
||||
this.status = { status: "success" };
|
||||
|
|
|
@ -72,7 +72,6 @@ export default defineComponent({
|
|||
...mapActions(useModalStore, ["closeModal"]),
|
||||
...mapActions(useMemberStore, ["deleteMember"]),
|
||||
triggerDelete() {
|
||||
this.status = "loading";
|
||||
this.deleteMember(this.data)
|
||||
.then(() => {
|
||||
this.status = { status: "success" };
|
||||
|
|
|
@ -140,7 +140,6 @@ export default defineComponent({
|
|||
given: formData.given.checked,
|
||||
awardId: this.selectedAward.id,
|
||||
};
|
||||
this.status = "loading";
|
||||
this.createMemberAward(createMemberAward)
|
||||
.then(() => {
|
||||
this.status = { status: "success" };
|
||||
|
|
|
@ -65,7 +65,6 @@ export default defineComponent({
|
|||
...mapActions(useModalStore, ["closeModal"]),
|
||||
...mapActions(useMemberAwardStore, ["deleteMemberAward"]),
|
||||
triggerDelete() {
|
||||
this.status = "loading";
|
||||
this.deleteMemberAward(this.data)
|
||||
.then(() => {
|
||||
this.status = { status: "success" };
|
||||
|
|
|
@ -83,9 +83,7 @@
|
|||
|
||||
<div class="flex flex-row justify-end">
|
||||
<div class="flex flex-row gap-4 py-2">
|
||||
<button primary-outline @click="closeModal" :disabled="status == 'loading' || status?.status == 'success'">
|
||||
schließen
|
||||
</button>
|
||||
<button primary-outline @click="closeModal" :disabled="status != null">schließen</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -169,7 +167,6 @@ export default defineComponent({
|
|||
given: formData.given.checked,
|
||||
awardId: this.memberAward.awardId,
|
||||
};
|
||||
this.status = "loading";
|
||||
this.updateMemberAward(updateMemberAward)
|
||||
.then(() => {
|
||||
this.fetchItem();
|
||||
|
|
|
@ -166,7 +166,7 @@ export default defineComponent({
|
|||
preferred: formData.preferred.checked,
|
||||
mobile: formData.mobile?.value,
|
||||
email: formData.email?.value,
|
||||
postalCode: formData.postalCode?.value,
|
||||
postalCode: formData.postalCode.value,
|
||||
city: formData.city?.value,
|
||||
street: formData.street?.value,
|
||||
streetNumber: formData.streetNumber?.value,
|
||||
|
@ -175,7 +175,6 @@ export default defineComponent({
|
|||
isSMSAlarming: formData.isSMSAlarming?.checked,
|
||||
typeId: this.selectedCommunicationType.id,
|
||||
};
|
||||
this.status = "loading";
|
||||
this.createCommunication(createCommunication)
|
||||
.then(() => {
|
||||
this.status = { status: "success" };
|
||||
|
|
|
@ -68,7 +68,6 @@ export default defineComponent({
|
|||
...mapActions(useModalStore, ["closeModal"]),
|
||||
...mapActions(useCommunicationStore, ["deleteCommunication"]),
|
||||
triggerDelete() {
|
||||
this.status = "loading";
|
||||
this.deleteCommunication(this.data)
|
||||
.then(() => {
|
||||
this.status = { status: "success" };
|
||||
|
|
|
@ -62,9 +62,7 @@
|
|||
|
||||
<div class="flex flex-row justify-end">
|
||||
<div class="flex flex-row gap-4 py-2">
|
||||
<button primary-outline @click="closeModal" :disabled="status == 'loading' || status?.status == 'success'">
|
||||
schließen
|
||||
</button>
|
||||
<button primary-outline @click="closeModal" :disabled="status != null">schließen</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -146,7 +144,6 @@ export default defineComponent({
|
|||
isNewsletterMain: formData.isNewsletterMain.checked,
|
||||
isSMSAlarming: formData.isSMSAlarming?.checked,
|
||||
};
|
||||
this.status = "loading";
|
||||
this.updateCommunication(updateCommunication)
|
||||
.then(() => {
|
||||
this.fetchItem();
|
||||
|
|
|
@ -141,7 +141,6 @@ export default defineComponent({
|
|||
note: formData.note.value,
|
||||
executivePositionId: this.selectedExecutivePosition.id,
|
||||
};
|
||||
this.status = "loading";
|
||||
this.createMemberExecutivePosition(createMemberExecutivePosition)
|
||||
.then(() => {
|
||||
this.status = { status: "success" };
|
||||
|
|
|
@ -65,7 +65,6 @@ export default defineComponent({
|
|||
...mapActions(useModalStore, ["closeModal"]),
|
||||
...mapActions(useMemberExecutivePositionStore, ["deleteMemberExecutivePosition"]),
|
||||
triggerDelete() {
|
||||
this.status = "loading";
|
||||
this.deleteMemberExecutivePosition(this.data)
|
||||
.then(() => {
|
||||
this.status = { status: "success" };
|
||||
|
|
|
@ -89,9 +89,7 @@
|
|||
|
||||
<div class="flex flex-row justify-end">
|
||||
<div class="flex flex-row gap-4 py-2">
|
||||
<button primary-outline @click="closeModal" :disabled="status == 'loading' || status?.status == 'success'">
|
||||
schließen
|
||||
</button>
|
||||
<button primary-outline @click="closeModal" :disabled="status != null">schließen</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -178,7 +176,6 @@ export default defineComponent({
|
|||
note: formData.note.value,
|
||||
executivePositionId: this.memberExecutivePosition.executivePositionId,
|
||||
};
|
||||
this.status = "loading";
|
||||
this.updateMemberExecutivePosition(updateMemberExecutivePosition)
|
||||
.then(() => {
|
||||
this.fetchItem();
|
||||
|
|
|
@ -148,7 +148,6 @@ export default defineComponent({
|
|||
note: formData.note.value,
|
||||
qualificationId: this.selectedQualification.id,
|
||||
};
|
||||
this.status = "loading";
|
||||
this.createMemberQualification(createMemberQualification)
|
||||
.then(() => {
|
||||
this.status = { status: "success" };
|
||||
|
|
|
@ -69,7 +69,6 @@ export default defineComponent({
|
|||
...mapActions(useModalStore, ["closeModal"]),
|
||||
...mapActions(useMemberQualificationStore, ["deleteMemberQualification"]),
|
||||
triggerDelete() {
|
||||
this.status = "loading";
|
||||
this.deleteMemberQualification(this.data)
|
||||
.then(() => {
|
||||
this.status = { status: "success" };
|
||||
|
|
|
@ -90,9 +90,7 @@
|
|||
|
||||
<div class="flex flex-row justify-end">
|
||||
<div class="flex flex-row gap-4 py-2">
|
||||
<button primary-outline @click="closeModal" :disabled="status == 'loading' || status?.status == 'success'">
|
||||
schließen
|
||||
</button>
|
||||
<button primary-outline @click="closeModal" :disabled="status != null">schließen</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -177,7 +175,6 @@ export default defineComponent({
|
|||
terminationReason: formData.terminationReason.value,
|
||||
qualificationId: this.memberQualification.qualificationId,
|
||||
};
|
||||
this.status = "loading";
|
||||
this.updateMemberQualification(updateMemberQualification)
|
||||
.then(() => {
|
||||
this.fetchItem();
|
||||
|
|
|
@ -131,7 +131,6 @@ export default defineComponent({
|
|||
start: formData.start.value,
|
||||
statusId: this.selectedStatus.id,
|
||||
};
|
||||
this.status = "loading";
|
||||
this.createMembership(createMember)
|
||||
.then(() => {
|
||||
this.status = { status: "success" };
|
||||
|
|
|
@ -67,7 +67,6 @@ export default defineComponent({
|
|||
...mapActions(useModalStore, ["closeModal"]),
|
||||
...mapActions(useMembershipStore, ["deleteMembership"]),
|
||||
triggerDelete() {
|
||||
this.status = "loading";
|
||||
this.deleteMembership(this.data)
|
||||
.then(() => {
|
||||
this.status = { status: "success" };
|
||||
|
|
|
@ -86,9 +86,7 @@
|
|||
|
||||
<div class="flex flex-row justify-end">
|
||||
<div class="flex flex-row gap-4 py-2">
|
||||
<button primary-outline @click="closeModal" :disabled="status == 'loading' || status?.status == 'success'">
|
||||
schließen
|
||||
</button>
|
||||
<button primary-outline @click="closeModal" :disabled="status != null">schließen</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -172,7 +170,6 @@ export default defineComponent({
|
|||
terminationReason: formData.terminationReason.value,
|
||||
statusId: this.membership.statusId,
|
||||
};
|
||||
this.status = "loading";
|
||||
this.updateMembership(updateMembership)
|
||||
.then(() => {
|
||||
this.fetchItem();
|
||||
|
|
|
@ -61,7 +61,6 @@ export default defineComponent({
|
|||
let createNewsletter: CreateNewsletterViewModel = {
|
||||
title: formData.title.value,
|
||||
};
|
||||
this.status = "loading";
|
||||
this.createNewsletter(createNewsletter)
|
||||
.then(() => {
|
||||
this.status = { status: "success" };
|
||||
|
|
|
@ -1,44 +0,0 @@
|
|||
<template>
|
||||
<div class="w-full md:max-w-md">
|
||||
<div class="flex flex-col items-center">
|
||||
<p class="text-xl font-medium">Newsletter Mail-Versand Logs</p>
|
||||
</div>
|
||||
<br />
|
||||
|
||||
<div class="h-96 overflow-y-scroll">
|
||||
<p v-for="entry in mailSourceMessages">
|
||||
{{ entry }}
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div class="flex flex-row justify-end">
|
||||
<div class="flex flex-row gap-4 py-2">
|
||||
<button primary-outline @click="closeModal">
|
||||
abbrechen
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { defineComponent } from "vue";
|
||||
import { mapState, mapActions } from "pinia";
|
||||
import { useModalStore } from "@/stores/modal";
|
||||
import { useNewsletterPrintoutStore } from "@/stores/admin/club/newsletter/newsletterPrintout";
|
||||
</script>
|
||||
|
||||
<script lang="ts">
|
||||
export default defineComponent({
|
||||
data() {
|
||||
return {
|
||||
};
|
||||
},
|
||||
computed:{
|
||||
...mapState(useNewsletterPrintoutStore, ["mailSourceMessages"])
|
||||
},
|
||||
methods: {
|
||||
...mapActions(useModalStore, ["closeModal"]),
|
||||
},
|
||||
});
|
||||
</script>
|
|
@ -1,50 +0,0 @@
|
|||
<template>
|
||||
<div class="w-full md:max-w-md">
|
||||
<div class="flex flex-col items-center">
|
||||
<p class="text-xl font-medium">Newsletter Druck-Prozess Logs</p>
|
||||
</div>
|
||||
<br />
|
||||
|
||||
<div class="flex flex-col gap-2 h-96 overflow-y-scroll">
|
||||
<div
|
||||
v-for="entry in pdfSourceMessages"
|
||||
class="flex flex-row gap-2 border border-gray-200 rounded-md p-1 items-center"
|
||||
>
|
||||
<SuccessCheckmark v-if="entry.factor == 'success'" class="w-5 h-5" />
|
||||
<InformationCircleIcon v-else-if="entry.factor == 'info'" class="w-5 h-5 min-h-5 min-w-5 text-gray-500" />
|
||||
<FailureXMark v-else-if="entry.factor == 'failed'" class="w-5 h-5" />
|
||||
<p>{{ entry.iteration }}/{{ entry.total }}: {{ entry.msg }}</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="flex flex-row justify-end">
|
||||
<div class="flex flex-row gap-4 py-2">
|
||||
<button primary-outline @click="closeModal">abbrechen</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { defineComponent } from "vue";
|
||||
import { mapState, mapActions } from "pinia";
|
||||
import { useModalStore } from "@/stores/modal";
|
||||
import { useNewsletterPrintoutStore } from "@/stores/admin/club/newsletter/newsletterPrintout";
|
||||
import SuccessCheckmark from "@/components/SuccessCheckmark.vue";
|
||||
import { InformationCircleIcon } from "@heroicons/vue/24/solid";
|
||||
import FailureXMark from "@/components/FailureXMark.vue";
|
||||
</script>
|
||||
|
||||
<script lang="ts">
|
||||
export default defineComponent({
|
||||
data() {
|
||||
return {};
|
||||
},
|
||||
computed: {
|
||||
...mapState(useNewsletterPrintoutStore, ["pdfSourceMessages"]),
|
||||
},
|
||||
methods: {
|
||||
...mapActions(useModalStore, ["closeModal"]),
|
||||
},
|
||||
});
|
||||
</script>
|
|
@ -64,7 +64,6 @@ export default defineComponent({
|
|||
title: formData.title.value,
|
||||
date: formData.date.value,
|
||||
};
|
||||
this.status = "loading";
|
||||
this.createProtocol(createProtocol)
|
||||
.then(() => {
|
||||
this.status = { status: "success" };
|
||||
|
|
|
@ -19,9 +19,7 @@
|
|||
|
||||
<div class="flex flex-row justify-end">
|
||||
<div class="flex flex-row gap-4 py-2">
|
||||
<button primary-outline @click="closeModal" :disabled="status == 'loading' || status?.status == 'success'">
|
||||
abbrechen
|
||||
</button>
|
||||
<button primary-outline @click="closeModal" :disabled="status != null">abbrechen</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -59,7 +57,6 @@ export default defineComponent({
|
|||
let createAward: CreateAwardViewModel = {
|
||||
award: formData.award.value,
|
||||
};
|
||||
this.status = "loading";
|
||||
this.createAward(createAward)
|
||||
.then(() => {
|
||||
this.status = { status: "success" };
|
||||
|
|
|
@ -16,9 +16,7 @@
|
|||
|
||||
<div class="flex flex-row justify-end">
|
||||
<div class="flex flex-row gap-4 py-2">
|
||||
<button primary-outline @click="closeModal" :disabled="status == 'loading' || status?.status == 'success'">
|
||||
abbrechen
|
||||
</button>
|
||||
<button primary-outline @click="closeModal" :disabled="status != null">abbrechen</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -59,7 +57,6 @@ export default defineComponent({
|
|||
...mapActions(useModalStore, ["closeModal"]),
|
||||
...mapActions(useAwardStore, ["deleteAward"]),
|
||||
triggerDelete() {
|
||||
this.status = "loading";
|
||||
this.deleteAward(this.data)
|
||||
.then(() => {
|
||||
this.status = { status: "success" };
|
||||
|
|
|
@ -32,7 +32,11 @@
|
|||
|
||||
<div class="flex flex-row justify-end">
|
||||
<div class="flex flex-row gap-4 py-2">
|
||||
<button primary-outline @click="closeModal" :disabled="status == 'loading' || status?.status == 'success'">
|
||||
<button
|
||||
primary-outline
|
||||
@click="closeModal"
|
||||
:disabled="status != null && status != 'loading' && status?.status != 'failed'"
|
||||
>
|
||||
abbrechen
|
||||
</button>
|
||||
</div>
|
||||
|
@ -49,6 +53,8 @@ import SuccessCheckmark from "@/components/SuccessCheckmark.vue";
|
|||
import FailureXMark from "@/components/FailureXMark.vue";
|
||||
import { useCalendarTypeStore } from "@/stores/admin/settings/calendarType";
|
||||
import type { CreateCalendarTypeViewModel } from "@/viewmodels/admin/settings/calendarType.models";
|
||||
import { Listbox, ListboxButton, ListboxOptions, ListboxOption, ListboxLabel } from "@headlessui/vue";
|
||||
import { CheckIcon, ChevronUpDownIcon } from "@heroicons/vue/20/solid";
|
||||
</script>
|
||||
|
||||
<script lang="ts">
|
||||
|
@ -74,9 +80,8 @@ export default defineComponent({
|
|||
type: formData.type.value,
|
||||
color: formData.color.value,
|
||||
nscdr: formData.nscdr.checked,
|
||||
passphrase: formData.passphrase?.value,
|
||||
passphrase: formData.passphrase.value,
|
||||
};
|
||||
this.status = "loading";
|
||||
this.createCalendarType(createCalendarType)
|
||||
.then(() => {
|
||||
this.status = { status: "success" };
|
||||
|
|
|
@ -16,9 +16,7 @@
|
|||
|
||||
<div class="flex flex-row justify-end">
|
||||
<div class="flex flex-row gap-4 py-2">
|
||||
<button primary-outline @click="closeModal" :disabled="status == 'loading' || status?.status == 'success'">
|
||||
abbrechen
|
||||
</button>
|
||||
<button primary-outline @click="closeModal" :disabled="status != null">abbrechen</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -58,7 +56,6 @@ export default defineComponent({
|
|||
...mapActions(useModalStore, ["closeModal"]),
|
||||
...mapActions(useCalendarTypeStore, ["deleteCalendarType"]),
|
||||
triggerDelete() {
|
||||
this.status = "loading";
|
||||
this.deleteCalendarType(this.data)
|
||||
.then(() => {
|
||||
this.status = { status: "success" };
|
||||
|
|
|
@ -65,9 +65,7 @@
|
|||
|
||||
<div class="flex flex-row justify-end">
|
||||
<div class="flex flex-row gap-4 py-2">
|
||||
<button primary-outline @click="closeModal" :disabled="status == 'loading' || status?.status == 'success'">
|
||||
abbrechen
|
||||
</button>
|
||||
<button primary-outline @click="closeModal" :disabled="status != null">abbrechen</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -116,7 +114,6 @@ export default defineComponent({
|
|||
type: formData.communicationType.value,
|
||||
fields: this.selectedFields,
|
||||
};
|
||||
this.status = "loading";
|
||||
this.createCommunicationType(createCommunicationType)
|
||||
.then(() => {
|
||||
this.status = { status: "success" };
|
||||
|
|
|
@ -16,9 +16,7 @@
|
|||
|
||||
<div class="flex flex-row justify-end">
|
||||
<div class="flex flex-row gap-4 py-2">
|
||||
<button primary-outline @click="closeModal" :disabled="status == 'loading' || status?.status == 'success'">
|
||||
abbrechen
|
||||
</button>
|
||||
<button primary-outline @click="closeModal" :disabled="status != null">abbrechen</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -58,7 +56,6 @@ export default defineComponent({
|
|||
...mapActions(useModalStore, ["closeModal"]),
|
||||
...mapActions(useCommunicationTypeStore, ["deleteCommunicationType"]),
|
||||
triggerDelete() {
|
||||
this.status = "loading";
|
||||
this.deleteCommunicationType(this.data)
|
||||
.then(() => {
|
||||
this.status = { status: "success" };
|
||||
|
|
|
@ -19,9 +19,7 @@
|
|||
|
||||
<div class="flex flex-row justify-end">
|
||||
<div class="flex flex-row gap-4 py-2">
|
||||
<button primary-outline @click="closeModal" :disabled="status == 'loading' || status?.status == 'success'">
|
||||
abbrechen
|
||||
</button>
|
||||
<button primary-outline @click="closeModal" :disabled="status != null">abbrechen</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -59,7 +57,6 @@ export default defineComponent({
|
|||
let createExecutivePosition: CreateExecutivePositionViewModel = {
|
||||
position: formData.executivePosition.value,
|
||||
};
|
||||
this.status = "loading";
|
||||
this.createExecutivePosition(createExecutivePosition)
|
||||
.then(() => {
|
||||
this.status = { status: "success" };
|
||||
|
|
|
@ -16,9 +16,7 @@
|
|||
|
||||
<div class="flex flex-row justify-end">
|
||||
<div class="flex flex-row gap-4 py-2">
|
||||
<button primary-outline @click="closeModal" :disabled="status == 'loading' || status?.status == 'success'">
|
||||
abbrechen
|
||||
</button>
|
||||
<button primary-outline @click="closeModal" :disabled="status != null">abbrechen</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -59,7 +57,6 @@ export default defineComponent({
|
|||
...mapActions(useModalStore, ["closeModal"]),
|
||||
...mapActions(useExecutivePositionStore, ["deleteExecutivePosition"]),
|
||||
triggerDelete() {
|
||||
this.status = "loading";
|
||||
this.deleteExecutivePosition(this.data)
|
||||
.then(() => {
|
||||
this.status = { status: "success" };
|
||||
|
|
|
@ -19,9 +19,7 @@
|
|||
|
||||
<div class="flex flex-row justify-end">
|
||||
<div class="flex flex-row gap-4 py-2">
|
||||
<button primary-outline @click="closeModal" :disabled="status == 'loading' || status?.status == 'success'">
|
||||
abbrechen
|
||||
</button>
|
||||
<button primary-outline @click="closeModal" :disabled="status != null">abbrechen</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -59,7 +57,6 @@ export default defineComponent({
|
|||
let createMembershipStatus: CreateMembershipStatusViewModel = {
|
||||
status: formData.membershipStatus.value,
|
||||
};
|
||||
this.status = "loading";
|
||||
this.createMembershipStatus(createMembershipStatus)
|
||||
.then(() => {
|
||||
this.status = { status: "success" };
|
||||
|
|
|
@ -16,9 +16,7 @@
|
|||
|
||||
<div class="flex flex-row justify-end">
|
||||
<div class="flex flex-row gap-4 py-2">
|
||||
<button primary-outline @click="closeModal" :disabled="status == 'loading' || status?.status == 'success'">
|
||||
abbrechen
|
||||
</button>
|
||||
<button primary-outline @click="closeModal" :disabled="status != null">abbrechen</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -59,7 +57,6 @@ export default defineComponent({
|
|||
...mapActions(useModalStore, ["closeModal"]),
|
||||
...mapActions(useMembershipStatusStore, ["deleteMembershipStatus"]),
|
||||
triggerDelete() {
|
||||
this.status = "loading";
|
||||
this.deleteMembershipStatus(this.data)
|
||||
.then(() => {
|
||||
this.status = { status: "success" };
|
||||
|
|
|
@ -23,9 +23,7 @@
|
|||
|
||||
<div class="flex flex-row justify-end">
|
||||
<div class="flex flex-row gap-4 py-2">
|
||||
<button primary-outline @click="closeModal" :disabled="status == 'loading' || status?.status == 'success'">
|
||||
abbrechen
|
||||
</button>
|
||||
<button primary-outline @click="closeModal" :disabled="status != null">abbrechen</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -64,7 +62,6 @@ export default defineComponent({
|
|||
qualification: formData.qualification.value,
|
||||
description: formData.description.value,
|
||||
};
|
||||
this.status = "loading";
|
||||
this.createQualification(createQualification)
|
||||
.then(() => {
|
||||
this.status = { status: "success" };
|
||||
|
|
|
@ -16,9 +16,7 @@
|
|||
|
||||
<div class="flex flex-row justify-end">
|
||||
<div class="flex flex-row gap-4 py-2">
|
||||
<button primary-outline @click="closeModal" :disabled="status == 'loading' || status?.status == 'success'">
|
||||
abbrechen
|
||||
</button>
|
||||
<button primary-outline @click="closeModal" :disabled="status != null">abbrechen</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -59,7 +57,6 @@ export default defineComponent({
|
|||
...mapActions(useModalStore, ["closeModal"]),
|
||||
...mapActions(useQualificationStore, ["deleteQualification"]),
|
||||
triggerDelete() {
|
||||
this.status = "loading";
|
||||
this.deleteQualification(this.data)
|
||||
.then(() => {
|
||||
this.status = { status: "success" };
|
||||
|
|
|
@ -19,9 +19,7 @@
|
|||
|
||||
<div class="flex flex-row justify-end">
|
||||
<div class="flex flex-row gap-4 py-2">
|
||||
<button primary-outline @click="closeModal" :disabled="status == 'loading' || status?.status == 'success'">
|
||||
abbrechen
|
||||
</button>
|
||||
<button primary-outline @click="closeModal" :disabled="status != null">abbrechen</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -64,7 +62,6 @@ export default defineComponent({
|
|||
title: formData.title.value,
|
||||
query: this.query ?? "",
|
||||
};
|
||||
this.status = "loading";
|
||||
this.createQueryStore(createAward)
|
||||
.then(() => {
|
||||
this.status = { status: "success" };
|
||||
|
|
|
@ -16,9 +16,7 @@
|
|||
|
||||
<div class="flex flex-row justify-end">
|
||||
<div class="flex flex-row gap-4 py-2">
|
||||
<button primary-outline @click="closeModal" :disabled="status == 'loading' || status?.status == 'success'">
|
||||
abbrechen
|
||||
</button>
|
||||
<button primary-outline @click="closeModal" :disabled="status != null">abbrechen</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -58,7 +56,6 @@ export default defineComponent({
|
|||
...mapActions(useModalStore, ["closeModal"]),
|
||||
...mapActions(useQueryStoreStore, ["deleteQueryStore"]),
|
||||
triggerDelete() {
|
||||
this.status = "loading";
|
||||
this.deleteQueryStore(this.data)
|
||||
.then(() => {
|
||||
this.status = { status: "success" };
|
||||
|
|
|
@ -21,9 +21,7 @@
|
|||
|
||||
<div class="flex flex-row justify-end">
|
||||
<div class="flex flex-row gap-4 py-2">
|
||||
<button primary-outline @click="closeModal" :disabled="status == 'loading' || status?.status == 'success'">
|
||||
abbrechen
|
||||
</button>
|
||||
<button primary-outline @click="closeModal" :disabled="status != null">abbrechen</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -75,7 +73,6 @@ export default defineComponent({
|
|||
id: this.data,
|
||||
query: this.query ?? "",
|
||||
};
|
||||
this.status = "loading";
|
||||
this.updateActiveQueryStore(updateQuery)
|
||||
.then(() => {
|
||||
this.status = { status: "success" };
|
||||
|
|
|
@ -23,9 +23,7 @@
|
|||
|
||||
<div class="flex flex-row justify-end">
|
||||
<div class="flex flex-row gap-4 py-2">
|
||||
<button primary-outline @click="closeModal" :disabled="status == 'loading' || status?.status == 'success'">
|
||||
abbrechen
|
||||
</button>
|
||||
<button primary-outline @click="closeModal" :disabled="status != null">abbrechen</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -64,7 +62,6 @@ export default defineComponent({
|
|||
template: formData.template.value,
|
||||
description: formData.description.value,
|
||||
};
|
||||
this.status = "loading";
|
||||
this.createTemplate(createTemplate)
|
||||
.then((res) => {
|
||||
this.status = { status: "success" };
|
||||
|
|
|
@ -16,9 +16,7 @@
|
|||
|
||||
<div class="flex flex-row justify-end">
|
||||
<div class="flex flex-row gap-4 py-2">
|
||||
<button primary-outline @click="closeModal" :disabled="status == 'loading' || status?.status == 'success'">
|
||||
abbrechen
|
||||
</button>
|
||||
<button primary-outline @click="closeModal" :disabled="status != null">abbrechen</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -59,7 +57,6 @@ export default defineComponent({
|
|||
...mapActions(useModalStore, ["closeModal"]),
|
||||
...mapActions(useTemplateStore, ["deleteTemplate"]),
|
||||
triggerDelete() {
|
||||
this.status = "loading";
|
||||
this.deleteTemplate(this.data)
|
||||
.then(() => {
|
||||
this.status = { status: "success" };
|
||||
|
|
|
@ -19,9 +19,7 @@
|
|||
|
||||
<div class="flex flex-row justify-end">
|
||||
<div class="flex flex-row gap-4 py-2">
|
||||
<button primary-outline @click="closeModal" :disabled="status == 'loading' || status?.status == 'success'">
|
||||
abbrechen
|
||||
</button>
|
||||
<button primary-outline @click="closeModal" :disabled="status != null">abbrechen</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -55,7 +53,6 @@ export default defineComponent({
|
|||
...mapActions(useRoleStore, ["createRole"]),
|
||||
triggerCreateRole(e: any) {
|
||||
let formData = e.target.elements;
|
||||
this.status = "loading";
|
||||
this.createRole(formData.role.value)
|
||||
.then(() => {
|
||||
this.status = { status: "success" };
|
||||
|
|
|
@ -16,9 +16,7 @@
|
|||
|
||||
<div class="flex flex-row justify-end">
|
||||
<div class="flex flex-row gap-4 py-2">
|
||||
<button primary-outline @click="closeModal" :disabled="status == 'loading' || status?.status == 'success'">
|
||||
abbrechen
|
||||
</button>
|
||||
<button primary-outline @click="closeModal" :disabled="status != null">abbrechen</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -58,7 +56,6 @@ export default defineComponent({
|
|||
...mapActions(useModalStore, ["closeModal"]),
|
||||
...mapActions(useRoleStore, ["deleteRole"]),
|
||||
triggerDeleteRole() {
|
||||
this.status = "loading";
|
||||
this.deleteRole(this.data)
|
||||
.then(() => {
|
||||
this.status = { status: "success" };
|
||||
|
|
|
@ -16,9 +16,7 @@
|
|||
|
||||
<div class="flex flex-row justify-end">
|
||||
<div class="flex flex-row gap-4 py-2">
|
||||
<button primary-outline @click="closeModal" :disabled="status == 'loading' || status?.status == 'success'">
|
||||
abbrechen
|
||||
</button>
|
||||
<button primary-outline @click="closeModal" :disabled="status != null">abbrechen</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -58,7 +56,6 @@ export default defineComponent({
|
|||
...mapActions(useModalStore, ["closeModal"]),
|
||||
...mapActions(useUserStore, ["deleteUser"]),
|
||||
triggerDeleteUser() {
|
||||
this.status = "loading";
|
||||
this.deleteUser(this.data)
|
||||
.then(() => {
|
||||
this.status = { status: "success" };
|
||||
|
|
|
@ -32,9 +32,7 @@
|
|||
|
||||
<div class="flex flex-row justify-end">
|
||||
<div class="flex flex-row gap-4 py-2">
|
||||
<button primary-outline @click="closeModal" :disabled="status == 'loading' || status?.status == 'success'">
|
||||
abbrechen
|
||||
</button>
|
||||
<button primary-outline @click="closeModal" :disabled="status != null">abbrechen</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -72,13 +70,13 @@ export default defineComponent({
|
|||
...mapActions(useInviteStore, ["createInvite"]),
|
||||
invite(e: any) {
|
||||
let formData = e.target.elements;
|
||||
this.status = "loading";
|
||||
let createInvite: CreateInviteViewModel = {
|
||||
username: formData.username.value,
|
||||
mail: formData.mail.value,
|
||||
firstname: formData.firstname.value,
|
||||
lastname: formData.lastname.value,
|
||||
};
|
||||
this.status = "loading";
|
||||
this.createInvite(createInvite)
|
||||
.then((result) => {
|
||||
this.status = { status: "success" };
|
||||
|
@ -88,7 +86,7 @@ export default defineComponent({
|
|||
})
|
||||
.catch((err) => {
|
||||
this.status = { status: "failed", reason: err.response.data };
|
||||
});
|
||||
})
|
||||
},
|
||||
},
|
||||
});
|
||||
|
|
|
@ -1,81 +0,0 @@
|
|||
<template>
|
||||
<div class="w-full md:max-w-md">
|
||||
<div class="flex flex-col items-center">
|
||||
<p class="text-xl font-medium">Webapi-Token erstellen</p>
|
||||
</div>
|
||||
<br />
|
||||
<form class="flex flex-col gap-4 py-2" @submit.prevent="triggerCreateWebapi">
|
||||
<div>
|
||||
<label for="title">Bezeichnung</label>
|
||||
<input type="text" id="title" required />
|
||||
</div>
|
||||
<div class="w-full">
|
||||
<label for="expiry">Ablaufdatum (optional)</label>
|
||||
<input type="date" id="expiry" step="1" />
|
||||
</div>
|
||||
<div class="flex flex-row gap-2">
|
||||
<button primary type="submit" :disabled="status == 'loading' || status?.status == 'success'">erstellen</button>
|
||||
<Spinner v-if="status == 'loading'" class="my-auto" />
|
||||
<SuccessCheckmark v-else-if="status?.status == 'success'" />
|
||||
<FailureXMark v-else-if="status?.status == 'failed'" />
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<div class="flex flex-row justify-end">
|
||||
<div class="flex flex-row gap-4 py-2">
|
||||
<button primary-outline @click="closeModal" :disabled="status == 'loading' || status?.status == 'success'">
|
||||
abbrechen
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { defineComponent } from "vue";
|
||||
import { mapState, mapActions } from "pinia";
|
||||
import { useModalStore } from "@/stores/modal";
|
||||
import Spinner from "@/components/Spinner.vue";
|
||||
import SuccessCheckmark from "@/components/SuccessCheckmark.vue";
|
||||
import FailureXMark from "@/components/FailureXMark.vue";
|
||||
import { useWebapiStore } from "@/stores/admin/user/webapi";
|
||||
import type { CreateWebapiViewModel } from "../../../../viewmodels/admin/user/webapi.models";
|
||||
</script>
|
||||
|
||||
<script lang="ts">
|
||||
export default defineComponent({
|
||||
data() {
|
||||
return {
|
||||
status: null as null | "loading" | { status: "success" | "failed"; reason?: string },
|
||||
timeout: undefined as any,
|
||||
};
|
||||
},
|
||||
beforeUnmount() {
|
||||
try {
|
||||
clearTimeout(this.timeout);
|
||||
} catch (error) {}
|
||||
},
|
||||
methods: {
|
||||
...mapActions(useModalStore, ["closeModal"]),
|
||||
...mapActions(useWebapiStore, ["createWebapi"]),
|
||||
triggerCreateWebapi(e: any) {
|
||||
let formData = e.target.elements;
|
||||
let createWebapi: CreateWebapiViewModel = {
|
||||
title: formData.title.value,
|
||||
expiry: formData.expiry.value,
|
||||
};
|
||||
this.status = "loading";
|
||||
this.createWebapi(createWebapi)
|
||||
.then(() => {
|
||||
this.status = { status: "success" };
|
||||
this.timeout = setTimeout(() => {
|
||||
this.closeModal();
|
||||
}, 1500);
|
||||
})
|
||||
.catch(() => {
|
||||
this.status = { status: "failed" };
|
||||
});
|
||||
},
|
||||
},
|
||||
});
|
||||
</script>
|
|
@ -1,75 +0,0 @@
|
|||
<template>
|
||||
<div class="w-full md:max-w-md">
|
||||
<div class="flex flex-col items-center">
|
||||
<p class="text-xl font-medium">Webapi-Token {{ webapi?.title }} löschen?</p>
|
||||
</div>
|
||||
<br />
|
||||
|
||||
<div class="flex flex-row gap-2">
|
||||
<button primary :disabled="status == 'loading' || status?.status == 'success'" @click="triggerDeleteWebapi">
|
||||
unwiederuflich löschen
|
||||
</button>
|
||||
<Spinner v-if="status == 'loading'" class="my-auto" />
|
||||
<SuccessCheckmark v-else-if="status?.status == 'success'" />
|
||||
<FailureXMark v-else-if="status?.status == 'failed'" />
|
||||
</div>
|
||||
|
||||
<div class="flex flex-row justify-end">
|
||||
<div class="flex flex-row gap-4 py-2">
|
||||
<button primary-outline @click="closeModal" :disabled="status == 'loading' || status?.status == 'success'">
|
||||
abbrechen
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { defineComponent } from "vue";
|
||||
import { mapState, mapActions } from "pinia";
|
||||
import { useModalStore } from "@/stores/modal";
|
||||
import Spinner from "@/components/Spinner.vue";
|
||||
import SuccessCheckmark from "@/components/SuccessCheckmark.vue";
|
||||
import FailureXMark from "@/components/FailureXMark.vue";
|
||||
import { useWebapiStore } from "@/stores/admin/user/webapi";
|
||||
</script>
|
||||
|
||||
<script lang="ts">
|
||||
export default defineComponent({
|
||||
data() {
|
||||
return {
|
||||
status: null as null | "loading" | { status: "success" | "failed"; reason?: string },
|
||||
timeout: undefined as any,
|
||||
};
|
||||
},
|
||||
beforeUnmount() {
|
||||
try {
|
||||
clearTimeout(this.timeout);
|
||||
} catch (error) {}
|
||||
},
|
||||
computed: {
|
||||
...mapState(useModalStore, ["data"]),
|
||||
...mapState(useWebapiStore, ["webapis"]),
|
||||
webapi() {
|
||||
return this.webapis.find((r) => r.id == this.data);
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
...mapActions(useModalStore, ["closeModal"]),
|
||||
...mapActions(useWebapiStore, ["deleteWebapi"]),
|
||||
triggerDeleteWebapi() {
|
||||
this.status = "loading";
|
||||
this.deleteWebapi(this.data)
|
||||
.then(() => {
|
||||
this.status = { status: "success" };
|
||||
this.timeout = setTimeout(() => {
|
||||
this.closeModal();
|
||||
}, 1500);
|
||||
})
|
||||
.catch(() => {
|
||||
this.status = { status: "failed" };
|
||||
});
|
||||
},
|
||||
},
|
||||
});
|
||||
</script>
|
|
@ -1,107 +0,0 @@
|
|||
<template>
|
||||
<div class="flex flex-col h-fit w-full border border-primary rounded-md">
|
||||
<div class="bg-primary p-2 text-white flex flex-row justify-between items-center">
|
||||
<p>{{ webapi.title }} <small v-if="webapi.permissions.admin">(Admin)</small></p>
|
||||
<div class="flex flex-row">
|
||||
<div v-if="can('admin', 'user', 'webapi')" @click="openTokenViewModal">
|
||||
<FingerPrintIcon class="w-5 h-5 p-1 box-content cursor-pointer" />
|
||||
</div>
|
||||
<RouterLink
|
||||
v-if="can('admin', 'user', 'webapi')"
|
||||
:to="{ name: 'admin-user-webapi-permission', params: { id: webapi.id } }"
|
||||
>
|
||||
<WrenchScrewdriverIcon class="w-5 h-5 p-1 box-content cursor-pointer" />
|
||||
</RouterLink>
|
||||
<RouterLink
|
||||
v-if="can('update', 'user', 'webapi')"
|
||||
:to="{ name: 'admin-user-webapi-edit', params: { id: webapi.id } }"
|
||||
>
|
||||
<PencilIcon class="w-5 h-5 p-1 box-content cursor-pointer" />
|
||||
</RouterLink>
|
||||
<div v-if="can('delete', 'user', 'webapi')" @click="openDeleteModal">
|
||||
<TrashIcon class="w-5 h-5 p-1 box-content cursor-pointer" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="flex flex-col p-2">
|
||||
<div class="flex flex-row gap-2">
|
||||
<p class="">erstellt:</p>
|
||||
<p class="grow overflow-hidden">
|
||||
{{
|
||||
new Date(webapi.createdAt).toLocaleDateString("de-DE", {
|
||||
day: "2-digit",
|
||||
month: "2-digit",
|
||||
year: "numeric",
|
||||
minute: "2-digit",
|
||||
hour: "2-digit",
|
||||
})
|
||||
}}
|
||||
</p>
|
||||
</div>
|
||||
<div class="flex flex-row gap-2">
|
||||
<p class="">letzte Verwendung:</p>
|
||||
<p class="grow overflow-hidden">
|
||||
{{
|
||||
webapi.lastUsage
|
||||
? new Date(webapi.lastUsage).toLocaleDateString("de-DE", {
|
||||
day: "2-digit",
|
||||
month: "2-digit",
|
||||
year: "numeric",
|
||||
minute: "2-digit",
|
||||
hour: "2-digit",
|
||||
})
|
||||
: "---"
|
||||
}}
|
||||
</p>
|
||||
</div>
|
||||
<div v-if="webapi.expiry" class="flex flex-row gap-2">
|
||||
<p class="">verwendbar bis:</p>
|
||||
<p class="grow overflow-hidden">
|
||||
{{
|
||||
new Date(webapi.expiry).toLocaleDateString("de-DE", {
|
||||
day: "2-digit",
|
||||
month: "2-digit",
|
||||
year: "numeric",
|
||||
})
|
||||
}}
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { defineComponent, defineAsyncComponent, markRaw, type PropType } from "vue";
|
||||
import { mapState, mapActions } from "pinia";
|
||||
import { PencilIcon, WrenchScrewdriverIcon, TrashIcon, FingerPrintIcon } from "@heroicons/vue/24/outline";
|
||||
import type { WebapiViewModel } from "@/viewmodels/admin/user/webapi.models";
|
||||
import { RouterLink } from "vue-router";
|
||||
import { useAbilityStore } from "@/stores/ability";
|
||||
import { useModalStore } from "@/stores/modal";
|
||||
</script>
|
||||
|
||||
<script lang="ts">
|
||||
export default defineComponent({
|
||||
props: {
|
||||
webapi: { type: Object as PropType<WebapiViewModel>, default: {} },
|
||||
},
|
||||
computed: {
|
||||
...mapState(useAbilityStore, ["can"]),
|
||||
},
|
||||
methods: {
|
||||
...mapActions(useModalStore, ["openModal"]),
|
||||
openTokenViewModal() {
|
||||
this.openModal(
|
||||
markRaw(defineAsyncComponent(() => import("@/components/admin/user/webapi/WebapiTokenModal.vue"))),
|
||||
this.webapi.id
|
||||
);
|
||||
},
|
||||
openDeleteModal() {
|
||||
this.openModal(
|
||||
markRaw(defineAsyncComponent(() => import("@/components/admin/user/webapi/DeleteWebapiModal.vue"))),
|
||||
this.webapi.id
|
||||
);
|
||||
},
|
||||
},
|
||||
});
|
||||
</script>
|
|
@ -1,56 +0,0 @@
|
|||
<template>
|
||||
<div class="relative w-full md:max-w-md">
|
||||
<div class="flex flex-col items-center">
|
||||
<p class="text-xl font-medium">Webapi-Token</p>
|
||||
</div>
|
||||
<br />
|
||||
<div class="flex flex-col gap-2">
|
||||
<TextCopy :copyText="token" />
|
||||
</div>
|
||||
|
||||
<div class="flex flex-row justify-end">
|
||||
<div class="flex flex-row gap-4 py-2">
|
||||
<button primary-outline @click="closeModal">schließen</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { defineComponent } from "vue";
|
||||
import { mapState, mapActions } from "pinia";
|
||||
import { RouterLink } from "vue-router";
|
||||
import { useModalStore } from "@/stores/modal";
|
||||
import { useCalendarTypeStore } from "@/stores/admin/settings/calendarType";
|
||||
import type { CalendarTypeViewModel } from "@/viewmodels/admin/settings/calendarType.models";
|
||||
import { Listbox, ListboxButton, ListboxOptions, ListboxOption, ListboxLabel } from "@headlessui/vue";
|
||||
import { CheckIcon, ChevronUpDownIcon } from "@heroicons/vue/20/solid";
|
||||
import TextCopy from "@/components/TextCopy.vue";
|
||||
import { CalendarDaysIcon, InformationCircleIcon } from "@heroicons/vue/24/outline";
|
||||
import { host } from "@/serverCom";
|
||||
import { useWebapiStore } from "../../../../stores/admin/user/webapi";
|
||||
</script>
|
||||
|
||||
<script lang="ts">
|
||||
export default defineComponent({
|
||||
data() {
|
||||
return {
|
||||
token: "" as string,
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
...mapState(useModalStore, ["data"]),
|
||||
},
|
||||
mounted() {
|
||||
this.fetchWebapiTokenById(this.data)
|
||||
.then((res) => {
|
||||
this.token = res.data;
|
||||
})
|
||||
.catch(() => {});
|
||||
},
|
||||
methods: {
|
||||
...mapActions(useModalStore, ["closeModal"]),
|
||||
...mapActions(useWebapiStore, ["fetchWebapiTokenById"]),
|
||||
},
|
||||
});
|
||||
</script>
|
|
@ -1,97 +0,0 @@
|
|||
<template>
|
||||
<div class="relative w-full md:max-w-md">
|
||||
<div class="flex flex-col items-center">
|
||||
<p class="text-xl font-medium">Termin</p>
|
||||
</div>
|
||||
<br />
|
||||
<div class="flex flex-col gap-4 py-2">
|
||||
<div>
|
||||
<label for="title">Terminart</label>
|
||||
<input type="text" id="title" readonly :value="data.type?.type" />
|
||||
</div>
|
||||
<div>
|
||||
<label for="title">Titel</label>
|
||||
<input type="text" id="title" readonly :value="data.title" />
|
||||
</div>
|
||||
<div>
|
||||
<label for="content">Beschreibung</label>
|
||||
<textarea id="content" class="h-18" readonly :value="data.content"></textarea>
|
||||
</div>
|
||||
<div v-if="data.allDay" class="flex flex-row gap-2 items-center">Der Termin findet ganztägig statt.</div>
|
||||
<div v-if="data.allDay == false" class="flex flex-row gap-2">
|
||||
<div class="w-full">
|
||||
<label for="starttime">Startzeit</label>
|
||||
<input type="datetime-local" id="starttime" readonly :value="formatForDateTimeLocalInput(data.starttime)" />
|
||||
</div>
|
||||
<div class="w-full">
|
||||
<label for="endtime">Endzeit</label>
|
||||
<input
|
||||
ref="endtime"
|
||||
type="datetime-local"
|
||||
id="endtime"
|
||||
readonly
|
||||
:value="formatForDateTimeLocalInput(data.endtime)"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
<div v-else class="flex flex-row gap-2">
|
||||
<div class="w-full">
|
||||
<label for="startdate">Startdatum</label>
|
||||
<input type="date" id="startdate" readonly :value="formatForDateInput(data.starttime)" />
|
||||
</div>
|
||||
<div class="w-full">
|
||||
<label for="enddate">Enddatum</label>
|
||||
<input ref="enddate" type="date" id="enddate" readonly :value="formatForDateInput(data.endtime)" />
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<label for="location">Ort</label>
|
||||
<input type="text" id="location" readonly :value="data.location" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="flex flex-row justify-end">
|
||||
<div class="flex flex-row gap-4 py-2">
|
||||
<button primary-outline @click="closeModal">schließen</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { defineAsyncComponent, defineComponent, markRaw } from "vue";
|
||||
import { mapState, mapActions } from "pinia";
|
||||
import { useModalStore } from "@/stores/modal";
|
||||
import Spinner from "@/components/Spinner.vue";
|
||||
</script>
|
||||
|
||||
<script lang="ts">
|
||||
export default defineComponent({
|
||||
computed: {
|
||||
...mapState(useModalStore, ["data"]),
|
||||
},
|
||||
methods: {
|
||||
...mapActions(useModalStore, ["closeModal"]),
|
||||
formatForDateTimeLocalInput(utcDateString: string) {
|
||||
const localDate = new Date(utcDateString);
|
||||
|
||||
const year = localDate.getFullYear();
|
||||
const month = String(localDate.getMonth() + 1).padStart(2, "0");
|
||||
const day = String(localDate.getDate()).padStart(2, "0");
|
||||
const hours = String(localDate.getHours()).padStart(2, "0");
|
||||
const minutes = String(localDate.getMinutes()).padStart(2, "0");
|
||||
|
||||
return `${year}-${month}-${day}T${hours}:${minutes}`;
|
||||
},
|
||||
formatForDateInput(utcDateString: string) {
|
||||
const localDate = new Date(utcDateString);
|
||||
|
||||
const year = localDate.getFullYear();
|
||||
const month = String(localDate.getMonth() + 1).padStart(2, "0");
|
||||
const day = String(localDate.getDate()).padStart(2, "0");
|
||||
|
||||
return `${year}-${month}-${day}`;
|
||||
},
|
||||
},
|
||||
});
|
||||
</script>
|
|
@ -46,13 +46,18 @@
|
|||
</div>
|
||||
</div>
|
||||
<div class="grow max-lg:hidden"></div>
|
||||
<div class="p-1 border border-gray-400 bg-gray-100 rounded-md" title="Schema-Struktur" @click="showStructure">
|
||||
<SparklesIcon class="text-gray-500 h-6 w-6 cursor-pointer" />
|
||||
</div>
|
||||
<div class="flex flex-row min-w-fit overflow-hidden border border-gray-400 rounded-md">
|
||||
<div
|
||||
class="p-1"
|
||||
:class="typeof value == 'object' ? 'bg-gray-200' : ''"
|
||||
:class="queryMode == 'structure' ? 'bg-gray-200' : ''"
|
||||
title="Schema-Struktur"
|
||||
@click="queryMode = 'structure'"
|
||||
>
|
||||
<SparklesIcon class="text-gray-500 h-6 w-6 cursor-pointer" />
|
||||
</div>
|
||||
<div
|
||||
class="p-1"
|
||||
:class="typeof value == 'object' && queryMode != 'structure' ? 'bg-gray-200' : ''"
|
||||
title="Visual Builder"
|
||||
@click="queryMode = 'builder'"
|
||||
>
|
||||
|
@ -60,7 +65,7 @@
|
|||
</div>
|
||||
<div
|
||||
class="p-1"
|
||||
:class="typeof value == 'string' ? 'bg-gray-200' : ''"
|
||||
:class="typeof value == 'string' && queryMode != 'structure' ? 'bg-gray-200' : ''"
|
||||
title="SQL Editor"
|
||||
@click="queryMode = 'editor'"
|
||||
>
|
||||
|
@ -69,7 +74,10 @@
|
|||
</div>
|
||||
</div>
|
||||
<div class="p-2 h-44 md:h-60 w-full overflow-y-auto">
|
||||
<textarea v-if="typeof value == 'string'" v-model="value" placeholder="SQL Query" class="h-full w-full" />
|
||||
<div v-if="queryMode == 'structure'">
|
||||
<img src="/administration-db.png" class="h-full w-full cursor-pointer" @click="showStructure" />
|
||||
</div>
|
||||
<textarea v-else-if="typeof value == 'string'" v-model="value" placeholder="SQL Query" class="h-full w-full" />
|
||||
<Table v-else v-model="value" />
|
||||
</div>
|
||||
</div>
|
||||
|
@ -145,7 +153,7 @@ export default defineComponent({
|
|||
data() {
|
||||
return {
|
||||
autoChangeFlag: false as boolean,
|
||||
queryMode: "builder" as "builder" | "editor",
|
||||
queryMode: "builder" as "builder" | "editor" | "structure",
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
|
|
|
@ -11,10 +11,7 @@
|
|||
|
||||
<div class="flex flex-row justify-end">
|
||||
<div class="flex flex-row gap-4 py-2">
|
||||
<a href="/administration-db.png" button primary-outline download="Datenbank-Schema" class="!whitespace-nowrap"
|
||||
>Bild herunterladen</a
|
||||
>
|
||||
<button primary-outline @click="closeModal">schließen</button>
|
||||
<button primary-outline @click="closeModal">schnließen</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
export interface Config {
|
||||
server_address: string;
|
||||
app_name_overwrite: string;
|
||||
imprint_link: string;
|
||||
privacy_link: string;
|
||||
custom_login_message: string;
|
||||
|
@ -8,7 +7,6 @@ export interface Config {
|
|||
|
||||
export const config: Config = {
|
||||
server_address: import.meta.env.VITE_SERVER_ADDRESS,
|
||||
app_name_overwrite: import.meta.env.VITE_APP_NAME_OVERWRITE,
|
||||
imprint_link: import.meta.env.VITE_IMPRINT_LINK,
|
||||
privacy_link: import.meta.env.VITE_PRIVACY_LINK,
|
||||
custom_login_message: import.meta.env.VITE_CUSTOM_LOGIN_MESSAGE,
|
||||
|
|
|
@ -14,6 +14,7 @@ export function flattenQueryResult(result: Array<QueryResult>): Array<{ [key: st
|
|||
const newKey = prefix ? `${prefix}_${key}` : key;
|
||||
|
||||
if (Array.isArray(value) && value.every((item) => typeof item === "object" && item !== null)) {
|
||||
console.log(value, newKey);
|
||||
const arrayResults: Array<{ [key: string]: FieldType }> = [];
|
||||
value.forEach((item) => {
|
||||
const flattenedItems = flatten(item, newKey);
|
||||
|
@ -28,6 +29,7 @@ export function flattenQueryResult(result: Array<QueryResult>): Array<{ [key: st
|
|||
});
|
||||
results = tempResults;
|
||||
} else if (value && typeof value === "object" && !Array.isArray(value)) {
|
||||
console.log(value, newKey);
|
||||
const objResults = flatten(value as QueryResult, newKey);
|
||||
const tempResults: Array<{ [key: string]: FieldType }> = [];
|
||||
results.forEach((res) => {
|
||||
|
|
|
@ -9,7 +9,6 @@ import type { PermissionType, PermissionSection, PermissionModule } from "@/type
|
|||
import { resetMemberStores, setMemberId } from "./memberGuard";
|
||||
import { resetProtocolStores, setProtocolId } from "./protocolGuard";
|
||||
import { resetNewsletterStores, setNewsletterId } from "./newsletterGuard";
|
||||
import { config } from "../config";
|
||||
|
||||
const router = createRouter({
|
||||
history: createWebHistory(import.meta.env.BASE_URL),
|
||||
|
@ -582,36 +581,6 @@ const router = createRouter({
|
|||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
path: "webapi",
|
||||
name: "admin-user-webapi-route",
|
||||
component: () => import("@/views/RouterView.vue"),
|
||||
meta: { type: "read", section: "user", module: "webapi" },
|
||||
beforeEnter: [abilityAndNavUpdate],
|
||||
children: [
|
||||
{
|
||||
path: "",
|
||||
name: "admin-user-webapi",
|
||||
component: () => import("@/views/admin/user/webapi/Webapi.vue"),
|
||||
},
|
||||
{
|
||||
path: ":id/edit",
|
||||
name: "admin-user-webapi-edit",
|
||||
component: () => import("@/views/admin/user/webapi/WebapiEdit.vue"),
|
||||
meta: { type: "update", section: "user", module: "webapi" },
|
||||
beforeEnter: [abilityAndNavUpdate],
|
||||
props: true,
|
||||
},
|
||||
{
|
||||
path: ":id/permission",
|
||||
name: "admin-user-webapi-permission",
|
||||
component: () => import("@/views/admin/user/webapi/WebapiEditPermission.vue"),
|
||||
meta: { type: "update", section: "user", module: "webapi" },
|
||||
beforeEnter: [abilityAndNavUpdate],
|
||||
props: true,
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
|
@ -652,11 +621,6 @@ const router = createRouter({
|
|||
name: "account-administration",
|
||||
component: () => import("@/views/account/Administration.vue"),
|
||||
},
|
||||
{
|
||||
path: "version",
|
||||
name: "account-version",
|
||||
component: () => import("@/views/account/VersionDisplay.vue"),
|
||||
},
|
||||
{
|
||||
path: ":pathMatch(.*)*",
|
||||
name: "account-404",
|
||||
|
@ -719,10 +683,6 @@ const router = createRouter({
|
|||
],
|
||||
});
|
||||
|
||||
router.afterEach((to, from) => {
|
||||
document.title = config.app_name_overwrite || "FF Admin";
|
||||
});
|
||||
|
||||
export default router;
|
||||
|
||||
declare module "vue-router" {
|
||||
|
|
|
@ -9,6 +9,8 @@ export async function setNewsletterId(to: any, from: any, next: any) {
|
|||
|
||||
useNewsletterDatesStore().$reset();
|
||||
useNewsletterRecipientsStore().$reset();
|
||||
useNewsletterPrintoutStore().unsubscribePdfPrintingProgress();
|
||||
useNewsletterPrintoutStore().unsubscribeMailSendingProgress();
|
||||
useNewsletterPrintoutStore().$reset();
|
||||
|
||||
next();
|
||||
|
@ -21,6 +23,8 @@ export async function resetNewsletterStores(to: any, from: any, next: any) {
|
|||
|
||||
useNewsletterDatesStore().$reset();
|
||||
useNewsletterRecipientsStore().$reset();
|
||||
useNewsletterPrintoutStore().unsubscribePdfPrintingProgress();
|
||||
useNewsletterPrintoutStore().unsubscribeMailSendingProgress();
|
||||
useNewsletterPrintoutStore().$reset();
|
||||
|
||||
next();
|
||||
|
|
|
@ -28,15 +28,6 @@ http.interceptors.request.use(
|
|||
}
|
||||
}
|
||||
|
||||
const isPWA =
|
||||
window.matchMedia("(display-mode: standalone)").matches ||
|
||||
window.matchMedia("(display-mode: fullscreen)").matches;
|
||||
if (isPWA) {
|
||||
if (config.headers) {
|
||||
config.headers["X-PWA-Client"] = isPWA ? "true" : "false";
|
||||
}
|
||||
}
|
||||
|
||||
return config;
|
||||
},
|
||||
(error) => {
|
||||
|
@ -62,15 +53,11 @@ http.interceptors.response.use(
|
|||
.then(() => {
|
||||
return http(originalRequest);
|
||||
})
|
||||
.catch(() => {});
|
||||
.catch();
|
||||
}
|
||||
|
||||
const notificationStore = useNotificationStore();
|
||||
if (error.toString().includes("Network Error")) {
|
||||
notificationStore.push("Netzwerkfehler", "Server nicht erreichbar!", "error");
|
||||
} else {
|
||||
notificationStore.push("Fehler", error.response.data, "error");
|
||||
}
|
||||
notificationStore.push("Fehler", error.response.data, "error");
|
||||
|
||||
return Promise.reject(error);
|
||||
}
|
||||
|
@ -112,25 +99,4 @@ function newEventSource(path: string) {
|
|||
});
|
||||
}
|
||||
|
||||
async function* streamingFetch(path: string, abort?: AbortController) {
|
||||
await refreshToken()
|
||||
.then(() => {})
|
||||
.catch(() => {});
|
||||
|
||||
const token = localStorage.getItem("accessToken");
|
||||
const response = await fetch(url + "/api" + path, {
|
||||
signal: abort?.signal,
|
||||
headers: {
|
||||
Authorization: `Bearer ${token}`,
|
||||
},
|
||||
});
|
||||
|
||||
const reader = response.body?.getReader();
|
||||
while (true && reader) {
|
||||
const { done, value } = await reader.read();
|
||||
if (done) break;
|
||||
yield new TextDecoder().decode(value);
|
||||
}
|
||||
}
|
||||
|
||||
export { http, newEventSource, streamingFetch, host };
|
||||
export { http, newEventSource, host };
|
||||
|
|
|
@ -1,9 +1,5 @@
|
|||
import { defineStore } from "pinia";
|
||||
import type {
|
||||
CreateMemberViewModel,
|
||||
MemberStatisticsViewModel,
|
||||
UpdateMemberViewModel,
|
||||
} from "@/viewmodels/admin/club/member/member.models";
|
||||
import type { CreateMemberViewModel, UpdateMemberViewModel } from "@/viewmodels/admin/club/member/member.models";
|
||||
import { http } from "@/serverCom";
|
||||
import type { AxiosResponse } from "axios";
|
||||
import type { MemberViewModel } from "@/viewmodels/admin/club/member/member.models";
|
||||
|
@ -16,7 +12,6 @@ export const useMemberStore = defineStore("member", {
|
|||
loading: "loading" as "loading" | "fetched" | "failed",
|
||||
activeMember: null as number | null,
|
||||
activeMemberObj: null as MemberViewModel | null,
|
||||
activeMemberStatistics: null as MemberStatisticsViewModel | null,
|
||||
loadingActive: "loading" as "loading" | "fetched" | "failed",
|
||||
};
|
||||
},
|
||||
|
@ -45,21 +40,6 @@ export const useMemberStore = defineStore("member", {
|
|||
this.loading = "failed";
|
||||
});
|
||||
},
|
||||
async getAllMembers(): Promise<AxiosResponse<any, any>> {
|
||||
return await http.get(`/admin/member?noLimit=true`).then((res) => {
|
||||
return { ...res, data: res.data.members };
|
||||
});
|
||||
},
|
||||
async getMembersByIds(ids: Array<number>): Promise<AxiosResponse<any, any>> {
|
||||
return await http.get(`/admin/member?ids=${ids.join(",")}&noLimit=true`).then((res) => {
|
||||
return { ...res, data: res.data.members };
|
||||
});
|
||||
},
|
||||
async searchMembers(search: string): Promise<AxiosResponse<any, any>> {
|
||||
return await http.get(`/admin/member?search=${search}&noLimit=true`).then((res) => {
|
||||
return { ...res, data: res.data.members };
|
||||
});
|
||||
},
|
||||
fetchMemberByActiveId() {
|
||||
this.loadingActive = "loading";
|
||||
http
|
||||
|
@ -75,17 +55,6 @@ export const useMemberStore = defineStore("member", {
|
|||
fetchMemberById(id: number) {
|
||||
return http.get(`/admin/member/${id}`);
|
||||
},
|
||||
fetchMemberStatisticsByActiveId() {
|
||||
http
|
||||
.get(`/admin/member/${this.activeMember}/statistics`)
|
||||
.then((res) => {
|
||||
this.activeMemberStatistics = res.data;
|
||||
})
|
||||
.catch((err) => {});
|
||||
},
|
||||
fetchMemberStatisticsById(id: number) {
|
||||
return http.get(`/admin/member/${id}/statistics`);
|
||||
},
|
||||
async createMember(member: CreateMemberViewModel): Promise<AxiosResponse<any, any>> {
|
||||
const result = await http.post(`/admin/member`, {
|
||||
salutation: member.salutation,
|
||||
|
@ -115,10 +84,10 @@ export const useMemberStore = defineStore("member", {
|
|||
this.fetchMembers();
|
||||
return result;
|
||||
},
|
||||
async printMemberList() {
|
||||
async printMemberList(){
|
||||
return http.get(`/admin/member/print/namelist`, {
|
||||
responseType: "blob",
|
||||
});
|
||||
},
|
||||
}
|
||||
},
|
||||
});
|
||||
|
|
|
@ -6,7 +6,6 @@ import type { MemberViewModel } from "@/viewmodels/admin/club/member/member.mode
|
|||
import { useMemberStore } from "./member";
|
||||
import type {
|
||||
CreateMembershipViewModel,
|
||||
MembershipStatisticsViewModel,
|
||||
MembershipViewModel,
|
||||
UpdateMembershipViewModel,
|
||||
} from "@/viewmodels/admin/club/member/membership.models";
|
||||
|
@ -15,7 +14,6 @@ export const useMembershipStore = defineStore("membership", {
|
|||
state: () => {
|
||||
return {
|
||||
memberships: [] as Array<MembershipViewModel>,
|
||||
membershipStatistics: [] as Array<MembershipStatisticsViewModel>,
|
||||
loading: "loading" as "loading" | "fetched" | "failed",
|
||||
};
|
||||
},
|
||||
|
@ -33,15 +31,6 @@ export const useMembershipStore = defineStore("membership", {
|
|||
this.loading = "failed";
|
||||
});
|
||||
},
|
||||
fetchMembershipStatisticsForMember() {
|
||||
const memberId = useMemberStore().activeMember;
|
||||
http
|
||||
.get(`/admin/member/${memberId}/memberships/statistics`)
|
||||
.then((result) => {
|
||||
this.membershipStatistics = result.data;
|
||||
})
|
||||
.catch((err) => {});
|
||||
},
|
||||
fetchMembershipById(id: number) {
|
||||
const memberId = useMemberStore().activeMember;
|
||||
return http.get(`/admin/member/${memberId}/membership/${id}`);
|
||||
|
|
|
@ -1,9 +1,8 @@
|
|||
import { defineStore } from "pinia";
|
||||
import { http, newEventSource, streamingFetch } from "@/serverCom";
|
||||
import { http, newEventSource } from "@/serverCom";
|
||||
import { useNewsletterStore } from "./newsletter";
|
||||
import type { AxiosResponse } from "axios";
|
||||
import type { EventSourcePolyfill } from "event-source-polyfill";
|
||||
import { useNotificationStore, type NotificationType } from "../../../notification";
|
||||
|
||||
export const useNewsletterPrintoutStore = defineStore("newsletterPrintout", {
|
||||
state: () => {
|
||||
|
@ -13,10 +12,10 @@ export const useNewsletterPrintoutStore = defineStore("newsletterPrintout", {
|
|||
printing: undefined as undefined | "loading" | "success" | "failed",
|
||||
sending: undefined as undefined | "loading" | "success" | "failed",
|
||||
sendingPreview: undefined as undefined | "loading" | "success" | "failed",
|
||||
pdfSourceMessages: [] as Array<{ kind: string; factor: string; [key: string]: string }>,
|
||||
mailSourceMessages: [] as Array<{ kind: string; factor: string; [key: string]: string }>,
|
||||
pdfPrintingAbort: undefined as undefined | AbortController,
|
||||
mailSendingAbort: undefined as undefined | AbortController,
|
||||
pdfProgessSource: undefined as undefined | EventSourcePolyfill,
|
||||
mailProgessSource: undefined as undefined | EventSourcePolyfill,
|
||||
pdfSourceMessages: [] as Array<Object>,
|
||||
mailSourceMessages: [] as Array<Object>,
|
||||
};
|
||||
},
|
||||
actions: {
|
||||
|
@ -64,7 +63,6 @@ export const useNewsletterPrintoutStore = defineStore("newsletterPrintout", {
|
|||
});
|
||||
},
|
||||
createNewsletterPrintout() {
|
||||
this.subscribePdfPrintingProgress();
|
||||
this.printing = "loading";
|
||||
const newsletterId = useNewsletterStore().activeNewsletter;
|
||||
if (newsletterId == null) return;
|
||||
|
@ -80,12 +78,10 @@ export const useNewsletterPrintoutStore = defineStore("newsletterPrintout", {
|
|||
.finally(() => {
|
||||
setTimeout(() => {
|
||||
this.printing = undefined;
|
||||
this.pdfPrintingAbort?.abort();
|
||||
}, 1500);
|
||||
});
|
||||
},
|
||||
createNewsletterSend() {
|
||||
this.subscribeMailSendingProgress();
|
||||
this.sending = "loading";
|
||||
const newsletterId = useNewsletterStore().activeNewsletter;
|
||||
if (newsletterId == null) return;
|
||||
|
@ -100,55 +96,32 @@ export const useNewsletterPrintoutStore = defineStore("newsletterPrintout", {
|
|||
.finally(() => {
|
||||
setTimeout(() => {
|
||||
this.sending = undefined;
|
||||
this.mailSendingAbort?.abort();
|
||||
}, 1500);
|
||||
});
|
||||
},
|
||||
async subscribePdfPrintingProgress() {
|
||||
this.pdfSourceMessages = [];
|
||||
const newsletterId = useNewsletterStore().activeNewsletter;
|
||||
const notificationStore = useNotificationStore();
|
||||
this.pdfPrintingAbort = new AbortController();
|
||||
for await (let chunk of streamingFetch(
|
||||
`/admin/newsletter/${newsletterId}/printoutprogress`,
|
||||
this.pdfPrintingAbort
|
||||
)) {
|
||||
chunk.split("//").forEach((r) => {
|
||||
if (r.trim() != "") {
|
||||
let data = JSON.parse(r);
|
||||
this.pdfSourceMessages.push(data);
|
||||
let type: NotificationType = "info";
|
||||
let timeout = undefined;
|
||||
if (data.factor == "failed") {
|
||||
type = "error";
|
||||
timeout = 0;
|
||||
}
|
||||
notificationStore.push(`Druck: ${data.iteration}/${data.total}`, `${data.msg}`, type, timeout);
|
||||
}
|
||||
});
|
||||
this.fetchNewsletterPrintout();
|
||||
}
|
||||
subscribePdfPrintingProgress() {
|
||||
// const newsletterId = useNewsletterStore().activeNewsletter;
|
||||
// if (this.pdfProgessSource != undefined) return;
|
||||
// this.pdfProgessSource = newEventSource(`/admin/newsletter/${newsletterId}/printoutprogress`);
|
||||
// this.pdfProgessSource.onmessage = (event) => {
|
||||
// console.log("pdf", event);
|
||||
// };
|
||||
},
|
||||
async subscribeMailSendingProgress() {
|
||||
this.mailSourceMessages = [];
|
||||
const newsletterId = useNewsletterStore().activeNewsletter;
|
||||
const notificationStore = useNotificationStore();
|
||||
this.mailSendingAbort = new AbortController();
|
||||
for await (let chunk of streamingFetch(`/admin/newsletter/${newsletterId}/sendprogress`, this.mailSendingAbort)) {
|
||||
chunk.split("//").forEach((r) => {
|
||||
if (r.trim() != "") {
|
||||
let data = JSON.parse(r);
|
||||
this.mailSourceMessages.push(data);
|
||||
let type: NotificationType = "info";
|
||||
let timeout = undefined;
|
||||
if (data.factor == "failed") {
|
||||
type = "error";
|
||||
timeout = 0;
|
||||
}
|
||||
notificationStore.push(`Mailversand: ${data.iteration}/${data.total}`, `${data.msg}`, type, timeout);
|
||||
}
|
||||
});
|
||||
}
|
||||
subscribeMailSendingProgress() {
|
||||
// const newsletterId = useNewsletterStore().activeNewsletter;
|
||||
// if (this.mailProgessSource != undefined) return;
|
||||
// this.mailProgessSource = newEventSource(`/admin/newsletter/${newsletterId}/sendprogress`);
|
||||
// this.mailProgessSource.onmessage = (event) => {
|
||||
// console.log("mail", event);
|
||||
// };
|
||||
},
|
||||
unsubscribePdfPrintingProgress() {
|
||||
this.pdfProgessSource?.close();
|
||||
this.pdfProgessSource = undefined;
|
||||
},
|
||||
unsubscribeMailSendingProgress() {
|
||||
this.mailProgessSource?.close();
|
||||
this.mailProgessSource = undefined;
|
||||
},
|
||||
},
|
||||
});
|
||||
|
|
|
@ -38,6 +38,7 @@ export const useProtocolDecisionStore = defineStore("protocolDecision", {
|
|||
this.loading = "fetched";
|
||||
})
|
||||
.catch((err) => {
|
||||
console.log(err);
|
||||
this.loading = "failed";
|
||||
});
|
||||
},
|
||||
|
|
|
@ -63,7 +63,7 @@ export const useNavigationStore = defineStore("navigation", {
|
|||
{
|
||||
key: "settings",
|
||||
title: "Einstellungen",
|
||||
levelDefault: "award",
|
||||
levelDefault: "qualification",
|
||||
} as topLevelNavigationModel,
|
||||
]
|
||||
: []),
|
||||
|
@ -98,32 +98,30 @@ export const useNavigationStore = defineStore("navigation", {
|
|||
settings: {
|
||||
mainTitle: "Einstellungen",
|
||||
main: [
|
||||
{ key: "divider1", title: "Mitgliederdaten" },
|
||||
...(abilityStore.can("read", "settings", "qualification")
|
||||
? [{ key: "qualification", title: "Qualifikationen" }]
|
||||
: []),
|
||||
...(abilityStore.can("read", "settings", "award") ? [{ key: "award", title: "Auszeichnungen" }] : []),
|
||||
...(abilityStore.can("read", "settings", "executive_position")
|
||||
? [{ key: "executive_position", title: "Vereinsämter" }]
|
||||
: []),
|
||||
...(abilityStore.can("read", "settings", "communication_type")
|
||||
? [{ key: "communication_type", title: "Kommunikationsarten" }]
|
||||
: []),
|
||||
...(abilityStore.can("read", "settings", "membership_status")
|
||||
? [{ key: "membership_status", title: "Mitgliedsstatus" }]
|
||||
: []),
|
||||
...(abilityStore.can("read", "settings", "qualification")
|
||||
? [{ key: "qualification", title: "Qualifikationen" }]
|
||||
: []),
|
||||
...(abilityStore.can("read", "settings", "executive_position")
|
||||
? [{ key: "executive_position", title: "Vereinsämter" }]
|
||||
: []),
|
||||
{ key: "divider2", title: "Einstellungen" },
|
||||
...(abilityStore.can("read", "settings", "newsletter_config")
|
||||
? [{ key: "newsletter_config", title: "Newsletter Konfiguration" }]
|
||||
: []),
|
||||
...(abilityStore.can("read", "settings", "template") ? [{ key: "template", title: "Templates" }] : []),
|
||||
...(abilityStore.can("read", "settings", "template_usage")
|
||||
? [{ key: "template_usage", title: "Template-Verwendung" }]
|
||||
: []),
|
||||
...(abilityStore.can("read", "settings", "calendar_type")
|
||||
? [{ key: "calendar_type", title: "Terminarten" }]
|
||||
: []),
|
||||
...(abilityStore.can("read", "settings", "query") ? [{ key: "query_store", title: "Query Store" }] : []),
|
||||
...(abilityStore.can("read", "settings", "template") ? [{ key: "template", title: "Templates" }] : []),
|
||||
...(abilityStore.can("read", "settings", "template_usage")
|
||||
? [{ key: "template_usage", title: "Template-Verwendung" }]
|
||||
: []),
|
||||
...(abilityStore.can("read", "settings", "newsletter_config")
|
||||
? [{ key: "newsletter_config", title: "Newsletter Konfiguration" }]
|
||||
: []),
|
||||
],
|
||||
},
|
||||
user: {
|
||||
|
@ -131,7 +129,6 @@ export const useNavigationStore = defineStore("navigation", {
|
|||
main: [
|
||||
...(abilityStore.can("read", "user", "user") ? [{ key: "user", title: "Benutzer" }] : []),
|
||||
...(abilityStore.can("read", "user", "role") ? [{ key: "role", title: "Rollen" }] : []),
|
||||
...(abilityStore.can("read", "user", "webapi") ? [{ key: "webapi", title: "Webapi-Token" }] : []),
|
||||
],
|
||||
},
|
||||
} as navigationModel;
|
||||
|
|
|
@ -1,63 +0,0 @@
|
|||
import { defineStore } from "pinia";
|
||||
import type {
|
||||
CreateWebapiViewModel,
|
||||
UpdateWebapiViewModel,
|
||||
WebapiViewModel,
|
||||
} from "@/viewmodels/admin/user/webapi.models";
|
||||
import { http } from "@/serverCom";
|
||||
import type { PermissionObject } from "@/types/permissionTypes";
|
||||
import type { AxiosResponse } from "axios";
|
||||
|
||||
export const useWebapiStore = defineStore("webapi", {
|
||||
state: () => {
|
||||
return {
|
||||
webapis: [] as Array<WebapiViewModel>,
|
||||
loading: null as null | "loading" | "success" | "failed",
|
||||
};
|
||||
},
|
||||
actions: {
|
||||
fetchWebapis() {
|
||||
this.loading = "loading";
|
||||
http
|
||||
.get("/admin/webapi")
|
||||
.then((result) => {
|
||||
this.webapis = result.data;
|
||||
this.loading = "success";
|
||||
})
|
||||
.catch((err) => {
|
||||
this.loading = "failed";
|
||||
});
|
||||
},
|
||||
fetchWebapiById(id: number): Promise<AxiosResponse<any, any>> {
|
||||
return http.get(`/admin/webapi/${id}`);
|
||||
},
|
||||
fetchWebapiTokenById(id: number): Promise<AxiosResponse<any, any>> {
|
||||
return http.get(`/admin/webapi/${id}/token`);
|
||||
},
|
||||
async createWebapi(webapi: CreateWebapiViewModel): Promise<AxiosResponse<any, any>> {
|
||||
const result = await http.post("/admin/webapi", webapi);
|
||||
this.fetchWebapis();
|
||||
return result;
|
||||
},
|
||||
async updateActiveWebapi(id: number, webapi: UpdateWebapiViewModel): Promise<AxiosResponse<any, any>> {
|
||||
const result = await http.patch(`/admin/webapi/${id}`, webapi);
|
||||
this.fetchWebapis();
|
||||
return result;
|
||||
},
|
||||
async updateActiveWebapiPermissions(
|
||||
webapi: number,
|
||||
permission: PermissionObject
|
||||
): Promise<AxiosResponse<any, any>> {
|
||||
const result = await http.patch(`/admin/webapi/${webapi}/permissions`, {
|
||||
permissions: permission,
|
||||
});
|
||||
this.fetchWebapis();
|
||||
return result;
|
||||
},
|
||||
async deleteWebapi(webapi: number): Promise<AxiosResponse<any, any>> {
|
||||
const result = await http.delete(`/admin/webapi/${webapi}`);
|
||||
this.fetchWebapis();
|
||||
return result;
|
||||
},
|
||||
},
|
||||
});
|
|
@ -1,7 +1,7 @@
|
|||
import { defineStore } from "pinia";
|
||||
|
||||
export interface Notification {
|
||||
id: string;
|
||||
id: number;
|
||||
title: string;
|
||||
text: string;
|
||||
type: NotificationType;
|
||||
|
@ -19,7 +19,7 @@ export const useNotificationStore = defineStore("notification", {
|
|||
},
|
||||
actions: {
|
||||
push(title: string, text: string, type: NotificationType, timeout: number = 5000) {
|
||||
let id = `${Date.now()}_${Math.random()}`;
|
||||
let id = Date.now();
|
||||
this.notifications.push({
|
||||
id,
|
||||
title,
|
||||
|
@ -27,16 +27,14 @@ export const useNotificationStore = defineStore("notification", {
|
|||
type,
|
||||
indicator: false,
|
||||
});
|
||||
if (timeout != 0) {
|
||||
setTimeout(() => {
|
||||
this.notifications[this.notifications.findIndex((n) => n.id === id)].indicator = true;
|
||||
}, 100);
|
||||
this.timeouts[id] = setTimeout(() => {
|
||||
this.revoke(id);
|
||||
}, timeout);
|
||||
}
|
||||
setTimeout(() => {
|
||||
this.notifications[this.notifications.findIndex((n) => n.id === id)].indicator = true;
|
||||
}, 100);
|
||||
this.timeouts[id] = setTimeout(() => {
|
||||
this.revoke(id);
|
||||
}, timeout);
|
||||
},
|
||||
revoke(id: string) {
|
||||
revoke(id: number) {
|
||||
this.notifications.splice(
|
||||
this.notifications.findIndex((n) => n.id === id),
|
||||
1
|
||||
|
|
|
@ -14,7 +14,6 @@ export type PermissionModule =
|
|||
| "calendar_type"
|
||||
| "user"
|
||||
| "role"
|
||||
| "webapi"
|
||||
| "query"
|
||||
| "query_store"
|
||||
| "template"
|
||||
|
@ -56,7 +55,6 @@ export const permissionModules: Array<PermissionModule> = [
|
|||
"calendar_type",
|
||||
"user",
|
||||
"role",
|
||||
"webapi",
|
||||
"query",
|
||||
"query_store",
|
||||
"template",
|
||||
|
@ -77,5 +75,5 @@ export const sectionsAndModules: SectionsAndModulesObject = {
|
|||
"template_usage",
|
||||
"newsletter_config",
|
||||
],
|
||||
user: ["user", "role", "webapi"],
|
||||
user: ["user", "role"],
|
||||
};
|
||||
|
|
|
@ -17,18 +17,6 @@ export interface MemberViewModel {
|
|||
preferredCommunication?: Array<CommunicationViewModel>;
|
||||
}
|
||||
|
||||
export interface MemberStatisticsViewModel {
|
||||
id: number;
|
||||
salutation: Salutation;
|
||||
firstname: string;
|
||||
lastname: string;
|
||||
nameaffix: string;
|
||||
birthdate: Date;
|
||||
todayAge: number;
|
||||
ageThisYear: number;
|
||||
exactAge: string;
|
||||
}
|
||||
|
||||
export interface CreateMemberViewModel {
|
||||
salutation: Salutation;
|
||||
firstname: string;
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
import type { Salutation } from "../../../../enums/salutation";
|
||||
|
||||
export interface MembershipViewModel {
|
||||
id: number;
|
||||
start: Date;
|
||||
|
@ -9,19 +7,6 @@ export interface MembershipViewModel {
|
|||
statusId: number;
|
||||
}
|
||||
|
||||
export interface MembershipStatisticsViewModel {
|
||||
durationInDays: number;
|
||||
durationInYears: string;
|
||||
status: string;
|
||||
statusId: number;
|
||||
memberId: number;
|
||||
memberSalutation: Salutation;
|
||||
memberFirstname: string;
|
||||
memberLastname: string;
|
||||
memberNameaffix: string;
|
||||
memberBirthdate: Date;
|
||||
}
|
||||
|
||||
export interface CreateMembershipViewModel {
|
||||
start: Date;
|
||||
statusId: number;
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
export interface ProtocolPresenceViewModel {
|
||||
memberId: number;
|
||||
absent: boolean;
|
||||
excused: boolean;
|
||||
protocolId: number;
|
||||
}
|
||||
|
||||
|
|
|
@ -1,20 +0,0 @@
|
|||
import type { PermissionObject } from "@/types/permissionTypes";
|
||||
|
||||
export interface WebapiViewModel {
|
||||
id: number;
|
||||
permissions: PermissionObject;
|
||||
title: string;
|
||||
createdAt: Date;
|
||||
lastUsage?: Date;
|
||||
expiry?: Date;
|
||||
}
|
||||
|
||||
export interface CreateWebapiViewModel {
|
||||
title: string;
|
||||
expiry?: Date;
|
||||
}
|
||||
|
||||
export interface UpdateWebapiViewModel {
|
||||
title: string;
|
||||
expiry?: Date;
|
||||
}
|
|
@ -1,21 +0,0 @@
|
|||
export interface Release {
|
||||
creator: string;
|
||||
title: string;
|
||||
link: string;
|
||||
pubDate: string;
|
||||
author: string;
|
||||
"content:encoded": string;
|
||||
"content:encodedSnippet": string;
|
||||
content: string;
|
||||
contentSnippet: string;
|
||||
guid: string;
|
||||
isoDate: string;
|
||||
}
|
||||
|
||||
export interface Releases {
|
||||
items: Release[];
|
||||
title: string;
|
||||
description: string;
|
||||
pubDate: string;
|
||||
link: string;
|
||||
}
|
|
@ -2,10 +2,8 @@
|
|||
<div class="grow flex items-center justify-center py-12 px-4 sm:px-6 lg:px-8">
|
||||
<div class="max-w-md w-full space-y-8 pb-20">
|
||||
<div class="flex flex-col items-center gap-4">
|
||||
<img src="/Logo.png" alt="LOGO" class="h-auto w-full" />
|
||||
<h2 class="text-center text-4xl font-extrabold text-gray-900">
|
||||
{{ config.app_name_overwrite || "FF Admin" }}
|
||||
</h2>
|
||||
<img src="/Logo.png" alt="LOGO" class="h-36" />
|
||||
<h2 class="text-center text-4xl font-extrabold text-gray-900">FF Admin</h2>
|
||||
</div>
|
||||
|
||||
<form class="flex flex-col gap-2" @submit.prevent="login">
|
||||
|
@ -50,7 +48,6 @@ import SuccessCheckmark from "@/components/SuccessCheckmark.vue";
|
|||
import FailureXMark from "@/components/FailureXMark.vue";
|
||||
import { resetAllPiniaStores } from "@/helpers/piniaReset";
|
||||
import FormBottomBar from "@/components/FormBottomBar.vue";
|
||||
import { config } from "@/config";
|
||||
</script>
|
||||
|
||||
<script lang="ts">
|
||||
|
|
|
@ -15,9 +15,7 @@
|
|||
<div class="relative mt-1">
|
||||
<ComboboxInput
|
||||
class="rounded-md shadow-sm relative block w-full px-3 py-2 border border-gray-300 focus:border-primary placeholder-gray-500 text-gray-900 rounded-b-md focus:outline-none focus:ring-0 focus:z-10 sm:text-sm resize-none"
|
||||
:displayValue="
|
||||
(person) => (person as UserViewModel)?.firstname + ' ' + (person as UserViewModel)?.lastname
|
||||
"
|
||||
:displayValue="(person) => person.firstname + ' ' + person.lastname"
|
||||
@input="query = $event.target.value"
|
||||
/>
|
||||
<ComboboxButton class="absolute inset-y-0 right-0 flex items-center pr-2">
|
||||
|
|
|
@ -1,154 +0,0 @@
|
|||
<template>
|
||||
<MainTemplate :useStagedOverviewLink="false">
|
||||
<template #topBar>
|
||||
<div class="flex flex-row items-center justify-between pt-5 pb-3 px-7">
|
||||
<h1 class="font-bold text-xl h-8">Versions-Kontrolle</h1>
|
||||
</div>
|
||||
</template>
|
||||
<template #diffMain>
|
||||
<div class="h-full flex flex-col px-7 overflow-hidden">
|
||||
<div class="h-1/2 flex flex-col gap-2 p-2 border border-gray-300 rounded-t-md">
|
||||
<div class="flex flex-row justify-between border-b-2 border-gray-300">
|
||||
<h1 class="text-xl font-semibold">Client</h1>
|
||||
<p>V{{ clientVersion }}</p>
|
||||
</div>
|
||||
<div class="grow flex flex-col gap-4 overflow-y-scroll">
|
||||
<div v-for="version in newerClientVersions">
|
||||
<p>
|
||||
<span class="font-semibold text-lg">V{{ version.title }}</span> vom
|
||||
{{
|
||||
new Date(version.isoDate).toLocaleDateString("de", {
|
||||
month: "long",
|
||||
day: "2-digit",
|
||||
year: "numeric",
|
||||
})
|
||||
}}
|
||||
</p>
|
||||
<div class="flex flex-col" v-html="version['content:encoded']"></div>
|
||||
</div>
|
||||
<div v-if="newerClientVersions.length == 0" class="flex items-center justify-center">
|
||||
<p>Der Client ist auf der neuesten Version.</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="h-1/2 flex flex-col gap-2 p-2 border border-gray-300 rounded-b-md">
|
||||
<div class="flex flex-row justify-between border-b-2 border-gray-300">
|
||||
<h1 class="text-xl font-semibold">Server</h1>
|
||||
<p>V{{ serverVersion }}</p>
|
||||
</div>
|
||||
<div class="grow flex flex-col gap-2 overflow-y-scroll">
|
||||
<div v-for="version in newerServerVersions">
|
||||
<p>
|
||||
<span class="font-semibold text-lg">V{{ version.title }}</span> vom
|
||||
{{
|
||||
new Date(version.isoDate).toLocaleDateString("de", {
|
||||
month: "long",
|
||||
day: "2-digit",
|
||||
year: "numeric",
|
||||
})
|
||||
}}
|
||||
</p>
|
||||
<div class="flex flex-col" v-html="version['content:encoded']"></div>
|
||||
</div>
|
||||
<div v-if="newerServerVersions.length == 0" class="flex items-center justify-center">
|
||||
<p>Der Server ist auf der neuesten Version.</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
</MainTemplate>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { defineComponent } from "vue";
|
||||
import MainTemplate from "@/templates/Main.vue";
|
||||
import clientPackage from "../../../package.json";
|
||||
import type { Releases } from "../../viewmodels/version.models";
|
||||
</script>
|
||||
|
||||
<script lang="ts">
|
||||
export default defineComponent({
|
||||
data() {
|
||||
return {
|
||||
serverVersion: "" as string,
|
||||
serverRss: null as null | Releases,
|
||||
clientVersion: "" as string,
|
||||
clientRss: null as null | Releases,
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
newerServerVersions() {
|
||||
if (!this.serverRss) return [];
|
||||
return this.serverRss.items.filter((i) => this.compareVersionStrings(this.serverVersion, i.title) < 0);
|
||||
},
|
||||
newerClientVersions() {
|
||||
if (!this.clientRss) return [];
|
||||
return this.clientRss.items.filter((i) => this.compareVersionStrings(this.clientVersion, i.title) < 0);
|
||||
},
|
||||
},
|
||||
mounted() {
|
||||
this.clientVersion = clientPackage.version;
|
||||
this.getServerVersion();
|
||||
this.getServerFeed();
|
||||
this.getClientFeed();
|
||||
},
|
||||
methods: {
|
||||
getServerVersion() {
|
||||
this.$http
|
||||
.get("/server/version")
|
||||
.then((res) => {
|
||||
this.serverVersion = res.data.version;
|
||||
})
|
||||
.catch(() => {});
|
||||
},
|
||||
async getServerFeed() {
|
||||
this.$http
|
||||
.get("/server/serverrss")
|
||||
.then((res) => {
|
||||
this.serverRss = res.data;
|
||||
})
|
||||
.catch(() => {});
|
||||
},
|
||||
async getClientFeed() {
|
||||
this.$http
|
||||
.get("/server/clientrss")
|
||||
.then((res) => {
|
||||
this.clientRss = res.data;
|
||||
})
|
||||
.catch(() => {});
|
||||
},
|
||||
compareVersionStrings(activeVersion: string, compareVersion: string) {
|
||||
const parseVersion = (version: string) => {
|
||||
const [main, tag] = version.split("-");
|
||||
const [major, minor, patch] = main.split(".").map(Number);
|
||||
return { major, minor, patch, tag };
|
||||
};
|
||||
|
||||
if (!activeVersion || !compareVersion) return 0;
|
||||
|
||||
const versionA = parseVersion(activeVersion);
|
||||
const versionB = parseVersion(compareVersion);
|
||||
|
||||
if (versionA.major !== versionB.major) {
|
||||
return versionA.major - versionB.major;
|
||||
}
|
||||
if (versionA.minor !== versionB.minor) {
|
||||
return versionA.minor - versionB.minor;
|
||||
}
|
||||
if (versionA.patch !== versionB.patch) {
|
||||
return versionA.patch - versionB.patch;
|
||||
}
|
||||
|
||||
if (versionA.tag && !versionB.tag) return -1;
|
||||
if (!versionA.tag && versionB.tag) return 1;
|
||||
if (versionA.tag && versionB.tag) {
|
||||
const tags = ["alpha", "beta", ""];
|
||||
return tags.indexOf(versionA.tag) - tags.indexOf(versionB.tag);
|
||||
}
|
||||
|
||||
return 0;
|
||||
},
|
||||
},
|
||||
});
|
||||
</script>
|
|
@ -1,22 +1,13 @@
|
|||
<template>
|
||||
<SidebarLayout>
|
||||
<template #sidebar>
|
||||
<SidebarTemplate
|
||||
mainTitle="Mein Account"
|
||||
:topTitle="config.app_name_overwrite || 'FF Admin'"
|
||||
:showTopList="isOwner"
|
||||
>
|
||||
<SidebarTemplate mainTitle="Mein Account" topTitle="FF Admin" :showTopList="isOwner">
|
||||
<template v-if="isOwner" #topList>
|
||||
<RoutingLink
|
||||
title="Administration"
|
||||
:link="{ name: 'account-administration' }"
|
||||
:active="activeRouteName == 'account-administration'"
|
||||
/>
|
||||
<RoutingLink
|
||||
title="Versions-Verwaltung"
|
||||
:link="{ name: 'account-version' }"
|
||||
:active="activeRouteName == 'account-version'"
|
||||
/>
|
||||
</template>
|
||||
<template #list>
|
||||
<RoutingLink title="Mein Account" :link="{ name: 'account-me' }" :active="activeRouteName == 'account-me'" />
|
||||
|
@ -47,7 +38,6 @@ import SidebarTemplate from "@/templates/Sidebar.vue";
|
|||
import RoutingLink from "@/components/admin/RoutingLink.vue";
|
||||
import { RouterView } from "vue-router";
|
||||
import { useAbilityStore } from "@/stores/ability";
|
||||
import { config } from "@/config";
|
||||
</script>
|
||||
|
||||
<script lang="ts">
|
||||
|
|
|
@ -16,15 +16,13 @@
|
|||
/>
|
||||
</template>
|
||||
<template #list>
|
||||
<div v-for="item in activeNavigationObject.main" :key="item.key">
|
||||
<RoutingLink
|
||||
v-if="!item.key.includes('divider')"
|
||||
:title="item.title"
|
||||
:link="{ name: `admin-${activeNavigation}-${item.key}` }"
|
||||
:active="activeLink == item.key"
|
||||
/>
|
||||
<p v-else class="pt-4 border-b border-gray-300">{{ item.title }}</p>
|
||||
</div>
|
||||
<RoutingLink
|
||||
v-for="item in activeNavigationObject.main"
|
||||
:key="item.key"
|
||||
:title="item.title"
|
||||
:link="{ name: `admin-${activeNavigation}-${item.key}` }"
|
||||
:active="activeLink == item.key"
|
||||
/>
|
||||
</template>
|
||||
</SidebarTemplate>
|
||||
</template>
|
||||
|
|
|
@ -25,20 +25,6 @@
|
|||
<label for="birthdate">Geburtsdatum</label>
|
||||
<input type="date" id="birthdate" :value="activeMemberObj.birthdate" readonly />
|
||||
</div>
|
||||
<div v-if="membershipStatistics.length != 0">
|
||||
<p>Statistiken zur Mitgliedschaft</p>
|
||||
<div class="flex flex-col h-fit w-full border border-primary rounded-md">
|
||||
<div
|
||||
v-for="stat in membershipStatistics"
|
||||
class="bg-primary p-2 text-white flex flex-row justify-between items-center"
|
||||
>
|
||||
<p>
|
||||
{{ stat.status }} für gesamt {{ stat.durationInDays }} Tage
|
||||
<span class="whitespace-nowrap"> ~> {{ stat.durationInYears.replace("_", "") }} Jahre</span>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div v-if="activeMemberObj.firstMembershipEntry">
|
||||
<p>Erster Eintrag Mitgliedschaft</p>
|
||||
<div class="flex flex-col h-fit w-full border border-primary rounded-md">
|
||||
|
@ -139,7 +125,6 @@ import { defineComponent } from "vue";
|
|||
import { mapActions, mapState } from "pinia";
|
||||
import Spinner from "@/components/Spinner.vue";
|
||||
import { useMemberStore } from "@/stores/admin/club/member/member";
|
||||
import { useMembershipStore } from "@/stores/admin/club/member/membership";
|
||||
</script>
|
||||
|
||||
<script lang="ts">
|
||||
|
@ -148,17 +133,13 @@ export default defineComponent({
|
|||
memberId: String,
|
||||
},
|
||||
computed: {
|
||||
...mapState(useMemberStore, ["activeMemberObj", "activeMemberStatistics", "loadingActive"]),
|
||||
...mapState(useMembershipStore, ["membershipStatistics"]),
|
||||
...mapState(useMemberStore, ["activeMemberObj", "loadingActive"]),
|
||||
},
|
||||
mounted() {
|
||||
this.fetchMemberByActiveId();
|
||||
this.fetchMemberStatisticsByActiveId();
|
||||
this.fetchMembershipStatisticsForMember();
|
||||
},
|
||||
methods: {
|
||||
...mapActions(useMemberStore, ["fetchMemberByActiveId", "fetchMemberStatisticsByActiveId"]),
|
||||
...mapActions(useMembershipStore, ["fetchMembershipStatisticsForMember"]),
|
||||
...mapActions(useMemberStore, ["fetchMemberByActiveId"]),
|
||||
},
|
||||
});
|
||||
</script>
|
||||
|
|
|
@ -61,12 +61,6 @@
|
|||
<SuccessCheckmark v-else-if="sendingPreview == 'success'" />
|
||||
<FailureXMark v-else-if="sendingPreview == 'failed'" />
|
||||
</button>
|
||||
<button v-if="pdfSourceMessages.length != 0" primary-outline class="!w-fit" @click="openPdfLogs">
|
||||
Druck Logs
|
||||
</button>
|
||||
<button v-if="mailSourceMessages.length != 0" primary-outline class="!w-fit" @click="openMailLogs">
|
||||
Versand Logs
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
@ -90,19 +84,13 @@ export default defineComponent({
|
|||
newsletterId: String,
|
||||
},
|
||||
computed: {
|
||||
...mapState(useNewsletterPrintoutStore, [
|
||||
"printout",
|
||||
"loading",
|
||||
"printing",
|
||||
"sending",
|
||||
"sendingPreview",
|
||||
"mailSourceMessages",
|
||||
"pdfSourceMessages",
|
||||
]),
|
||||
...mapState(useNewsletterPrintoutStore, ["printout", "loading", "printing", "sending", "sendingPreview"]),
|
||||
...mapState(useAbilityStore, ["can"]),
|
||||
},
|
||||
mounted() {
|
||||
this.fetchNewsletterPrintout();
|
||||
this.subscribeMailSendingProgress();
|
||||
this.subscribePdfPrintingProgress();
|
||||
},
|
||||
methods: {
|
||||
...mapActions(useModalStore, ["openModal"]),
|
||||
|
@ -112,6 +100,8 @@ export default defineComponent({
|
|||
"fetchNewsletterPrintoutById",
|
||||
"createNewsletterMailPreview",
|
||||
"createNewsletterSend",
|
||||
"subscribeMailSendingProgress",
|
||||
"subscribePdfPrintingProgress",
|
||||
]),
|
||||
openPdfShow(filename?: string) {
|
||||
this.openModal(
|
||||
|
@ -132,20 +122,6 @@ export default defineComponent({
|
|||
})
|
||||
.catch(() => {});
|
||||
},
|
||||
openPdfLogs() {
|
||||
this.openModal(
|
||||
markRaw(
|
||||
defineAsyncComponent(() => import("@/components/admin/club/newsletter/NewsletterPrintingProgressModal.vue"))
|
||||
)
|
||||
);
|
||||
},
|
||||
openMailLogs() {
|
||||
this.openModal(
|
||||
markRaw(
|
||||
defineAsyncComponent(() => import("@/components/admin/club/newsletter/NewsletterMailProgressModal.vue"))
|
||||
)
|
||||
);
|
||||
},
|
||||
},
|
||||
});
|
||||
</script>
|
||||
|
|
|
@ -23,12 +23,63 @@
|
|||
</div>
|
||||
</div>
|
||||
|
||||
<MemberSearchSelect
|
||||
title="weitere Empfänger suchen"
|
||||
v-model="recipients"
|
||||
:disabled="!can('create', 'club', 'newsletter')"
|
||||
/>
|
||||
<div class="w-full">
|
||||
<Combobox v-model="recipients" :disabled="!can('create', 'club', 'newsletter')" multiple>
|
||||
<ComboboxLabel>weitere Empfänger suchen</ComboboxLabel>
|
||||
<div class="relative mt-1">
|
||||
<ComboboxInput
|
||||
class="rounded-md shadow-sm relative block w-full px-3 py-2 border border-gray-300 focus:border-primary placeholder-gray-500 text-gray-900 rounded-b-md focus:outline-none focus:ring-0 focus:z-10 sm:text-sm resize-none"
|
||||
@input="query = $event.target.value"
|
||||
/>
|
||||
<ComboboxButton class="absolute inset-y-0 right-0 flex items-center pr-2">
|
||||
<ChevronUpDownIcon class="h-5 w-5 text-gray-400" aria-hidden="true" />
|
||||
</ComboboxButton>
|
||||
<TransitionRoot
|
||||
leave="transition ease-in duration-100"
|
||||
leaveFrom="opacity-100"
|
||||
leaveTo="opacity-0"
|
||||
@after-leave="query = ''"
|
||||
>
|
||||
<ComboboxOptions
|
||||
class="absolute mt-1 max-h-60 w-full overflow-auto rounded-md bg-white py-1 text-base shadow-md ring-1 ring-black/5 focus:outline-none sm:text-sm"
|
||||
>
|
||||
<ComboboxOption v-if="filtered.length === 0" as="template" disabled>
|
||||
<li class="text-text relative cursor-default select-none py-2 pl-3 pr-4">
|
||||
<span class="font-normal block truncate"> Keine Auswahl</span>
|
||||
</li>
|
||||
</ComboboxOption>
|
||||
|
||||
<ComboboxOption
|
||||
v-for="member in filtered"
|
||||
as="template"
|
||||
:key="member.id"
|
||||
:value="member.id"
|
||||
v-slot="{ selected, active }"
|
||||
>
|
||||
<li
|
||||
class="relative cursor-default select-none py-2 pl-10 pr-4"
|
||||
:class="{
|
||||
'bg-primary text-white': active,
|
||||
'text-gray-900': !active,
|
||||
}"
|
||||
>
|
||||
<span class="block truncate" :class="{ 'font-medium': selected, 'font-normal': !selected }">
|
||||
{{ member.firstname }} {{ member.lastname }} {{ member.nameaffix }}
|
||||
</span>
|
||||
<span
|
||||
v-if="selected"
|
||||
class="absolute inset-y-0 left-0 flex items-center pl-3"
|
||||
:class="{ 'text-white': active, 'text-primary': !active }"
|
||||
>
|
||||
<CheckIcon class="h-5 w-5" aria-hidden="true" />
|
||||
</span>
|
||||
</li>
|
||||
</ComboboxOption>
|
||||
</ComboboxOptions>
|
||||
</TransitionRoot>
|
||||
</div>
|
||||
</Combobox>
|
||||
</div>
|
||||
<p>Ausgewählte Empfänger</p>
|
||||
<div class="flex flex-col gap-2 grow overflow-y-auto">
|
||||
<div
|
||||
|
@ -74,7 +125,6 @@ import { useAbilityStore } from "@/stores/ability";
|
|||
import { useQueryStoreStore } from "@/stores/admin/settings/queryStore";
|
||||
import { useQueryBuilderStore } from "@/stores/admin/club/queryBuilder";
|
||||
import cloneDeep from "lodash.clonedeep";
|
||||
import MemberSearchSelect from "@/components/admin/MemberSearchSelect.vue";
|
||||
</script>
|
||||
|
||||
<script lang="ts">
|
||||
|
@ -90,25 +140,36 @@ export default defineComponent({
|
|||
data() {
|
||||
return {
|
||||
query: "" as String,
|
||||
members: [] as Array<MemberViewModel>,
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
...mapWritableState(useNewsletterRecipientsStore, ["recipients", "loading"]),
|
||||
...mapWritableState(useNewsletterStore, ["activeNewsletterObj"]),
|
||||
...mapState(useMemberStore, ["members"]),
|
||||
...mapState(useQueryStoreStore, ["queries"]),
|
||||
...mapState(useQueryBuilderStore, ["data"]),
|
||||
...mapState(useAbilityStore, ["can"]),
|
||||
filtered(): Array<MemberViewModel> {
|
||||
return this.query === ""
|
||||
? this.members
|
||||
: this.members.filter((member) =>
|
||||
(member.firstname + " " + member.lastname)
|
||||
.toLowerCase()
|
||||
.replace(/\s+/g, "")
|
||||
.includes(this.query.toLowerCase().replace(/\s+/g, ""))
|
||||
);
|
||||
},
|
||||
sorted(): Array<MemberViewModel> {
|
||||
return this.selected.sort((a, b) => {
|
||||
if (a.lastname < b.lastname) return -1;
|
||||
if (a.lastname > b.lastname) return 1;
|
||||
if (a.firstname < b.firstname) return -1;
|
||||
if (a.firstname > b.firstname) return 1;
|
||||
return 0;
|
||||
});
|
||||
},
|
||||
selected(): Array<MemberViewModel> {
|
||||
return this.members
|
||||
.filter((m) => this.recipients.includes(m.id))
|
||||
.sort((a, b) => {
|
||||
if (a.lastname < b.lastname) return -1;
|
||||
if (a.lastname > b.lastname) return 1;
|
||||
if (a.firstname < b.firstname) return -1;
|
||||
if (a.firstname > b.firstname) return 1;
|
||||
return 0;
|
||||
});
|
||||
return this.members.filter((m) => this.recipients.includes(m.id));
|
||||
},
|
||||
queried(): Array<MemberViewModel> {
|
||||
if (this.recipientsByQueryId == "def") return [];
|
||||
|
@ -144,13 +205,13 @@ export default defineComponent({
|
|||
},
|
||||
},
|
||||
mounted() {
|
||||
this.fetchMembers(0, 1000, "", true);
|
||||
// this.fetchNewsletterRecipients();
|
||||
this.fetchQueries();
|
||||
this.loadQuery();
|
||||
this.loadMembers();
|
||||
},
|
||||
methods: {
|
||||
...mapActions(useMemberStore, ["getAllMembers"]),
|
||||
...mapActions(useMemberStore, ["fetchMembers"]),
|
||||
...mapActions(useNewsletterRecipientsStore, ["fetchNewsletterRecipients"]),
|
||||
...mapActions(useQueryStoreStore, ["fetchQueries"]),
|
||||
...mapActions(useQueryBuilderStore, ["sendQuery"]),
|
||||
|
@ -160,13 +221,6 @@ export default defineComponent({
|
|||
this.recipients.splice(index, 1);
|
||||
}
|
||||
},
|
||||
loadMembers() {
|
||||
this.getAllMembers()
|
||||
.then((res) => {
|
||||
this.members = res.data;
|
||||
})
|
||||
.catch(() => {});
|
||||
},
|
||||
loadQuery() {
|
||||
if (this.recipientsByQuery) {
|
||||
this.sendQuery(0, 1000, this.recipientsByQuery.query);
|
||||
|
|
|
@ -5,19 +5,63 @@
|
|||
↺ laden fehlgeschlagen
|
||||
</p>
|
||||
|
||||
<MemberSearchSelect
|
||||
title="Anwesende suchen"
|
||||
:model-value="presence.map((p) => p.memberId)"
|
||||
:disabled="!can('create', 'club', 'protocol')"
|
||||
@add:difference="
|
||||
(id: number) =>
|
||||
presence.push({ memberId: id, absent: false, excused: true, protocolId: parseInt(protocolId ?? '') })
|
||||
"
|
||||
@add:member="(s) => members.push(s)"
|
||||
@add:member-by-array="(s) => members.push(...s)"
|
||||
@remove:difference="removeSelected"
|
||||
/>
|
||||
<div class="w-full">
|
||||
<Combobox v-model="presence" :disabled="!can('create', 'club', 'protocol')" multiple by="memberId">
|
||||
<ComboboxLabel>Anwesende suchen</ComboboxLabel>
|
||||
<div class="relative mt-1">
|
||||
<ComboboxInput
|
||||
class="rounded-md shadow-sm relative block w-full px-3 py-2 border border-gray-300 focus:border-primary placeholder-gray-500 text-gray-900 rounded-b-md focus:outline-none focus:ring-0 focus:z-10 sm:text-sm resize-none"
|
||||
@input="query = $event.target.value"
|
||||
/>
|
||||
<ComboboxButton class="absolute inset-y-0 right-0 flex items-center pr-2">
|
||||
<ChevronUpDownIcon class="h-5 w-5 text-gray-400" aria-hidden="true" />
|
||||
</ComboboxButton>
|
||||
<TransitionRoot
|
||||
leave="transition ease-in duration-100"
|
||||
leaveFrom="opacity-100"
|
||||
leaveTo="opacity-0"
|
||||
@after-leave="query = ''"
|
||||
>
|
||||
<ComboboxOptions
|
||||
class="absolute mt-1 max-h-60 w-full overflow-auto rounded-md bg-white py-1 text-base shadow-md ring-1 ring-black/5 focus:outline-none sm:text-sm"
|
||||
>
|
||||
<ComboboxOption v-if="filtered.length === 0" as="template" disabled>
|
||||
<li class="text-text relative cursor-default select-none py-2 pl-3 pr-4">
|
||||
<span class="font-normal block truncate"> Keine Auswahl</span>
|
||||
</li>
|
||||
</ComboboxOption>
|
||||
|
||||
<ComboboxOption
|
||||
v-for="member in filtered"
|
||||
as="template"
|
||||
:key="member.memberId"
|
||||
:value="member"
|
||||
v-slot="{ selected, active }"
|
||||
>
|
||||
<li
|
||||
class="relative cursor-default select-none py-2 pl-10 pr-4"
|
||||
:class="{
|
||||
'bg-primary text-white': active,
|
||||
'text-gray-900': !active,
|
||||
}"
|
||||
>
|
||||
<span class="block truncate" :class="{ 'font-medium': selected, 'font-normal': !selected }">
|
||||
{{ getMember(member.memberId)?.firstname }} {{ getMember(member.memberId)?.lastname }} {{ getMember(member.memberId)?.nameaffix }}
|
||||
</span>
|
||||
<span
|
||||
v-if="selected"
|
||||
class="absolute inset-y-0 left-0 flex items-center pl-3"
|
||||
:class="{ 'text-white': active, 'text-primary': !active }"
|
||||
>
|
||||
<CheckIcon class="h-5 w-5" aria-hidden="true" />
|
||||
</span>
|
||||
</li>
|
||||
</ComboboxOption>
|
||||
</ComboboxOptions>
|
||||
</TransitionRoot>
|
||||
</div>
|
||||
</Combobox>
|
||||
</div>
|
||||
<br />
|
||||
<p>Anwesenheit</p>
|
||||
<div class="flex flex-col gap-2 grow overflow-y-auto">
|
||||
|
@ -27,20 +71,11 @@
|
|||
class="flex flex-row h-fit w-full border border-primary rounded-md bg-primary p-2 text-white justify-between items-center"
|
||||
>
|
||||
<div class="flex flex-col items-start">
|
||||
<p>
|
||||
{{ getMember(member.memberId)?.lastname }}, {{ getMember(member.memberId)?.firstname }}
|
||||
{{ getMember(member.memberId)?.nameaffix ? `- ${getMember(member.memberId)?.nameaffix}` : "" }}
|
||||
</p>
|
||||
<div class="flex flex-row gap-4">
|
||||
<label class="flex flex-row gap-2 items-center">
|
||||
<input type="checkbox" v-model="member.absent" />
|
||||
war abwesend
|
||||
</label>
|
||||
<label v-if="member.absent" class="flex flex-row gap-2 items-center">
|
||||
<input type="checkbox" v-model="member.excused" />
|
||||
ist entschuldigt
|
||||
</label>
|
||||
</div>
|
||||
<p>{{ getMember(member.memberId)?.lastname }}, {{ getMember(member.memberId)?.firstname }} {{ getMember(member.memberId)?.nameaffix ? `- ${getMember(member.memberId)?.nameaffix}` : "" }}</p>
|
||||
<label class="flex flex-row gap-2 items-center">
|
||||
<input type="checkbox" v-model="member.absent" />
|
||||
war abwesend
|
||||
</label>
|
||||
</div>
|
||||
<TrashIcon
|
||||
v-if="can('create', 'club', 'protocol')"
|
||||
|
@ -56,11 +91,22 @@
|
|||
import { defineComponent } from "vue";
|
||||
import { mapActions, mapState, mapWritableState } from "pinia";
|
||||
import Spinner from "@/components/Spinner.vue";
|
||||
import {
|
||||
Combobox,
|
||||
ComboboxLabel,
|
||||
ComboboxInput,
|
||||
ComboboxButton,
|
||||
ComboboxOptions,
|
||||
ComboboxOption,
|
||||
TransitionRoot,
|
||||
} from "@headlessui/vue";
|
||||
import { CheckIcon, ChevronUpDownIcon } from "@heroicons/vue/20/solid";
|
||||
import { TrashIcon } from "@heroicons/vue/24/outline";
|
||||
import { useProtocolStore } from "@/stores/admin/club/protocol/protocol";
|
||||
import { useMemberStore } from "@/stores/admin/club/member/member";
|
||||
import type { MemberViewModel } from "@/viewmodels/admin/club/member/member.models";
|
||||
import { useProtocolPresenceStore } from "@/stores/admin/club/protocol/protocolPresence";
|
||||
import { useAbilityStore } from "@/stores/ability";
|
||||
import MemberSearchSelect from "@/components/admin/MemberSearchSelect.vue";
|
||||
import type { MemberViewModel } from "@/viewmodels/admin/club/member/member.models";
|
||||
</script>
|
||||
|
||||
<script lang="ts">
|
||||
|
@ -71,20 +117,34 @@ export default defineComponent({
|
|||
data() {
|
||||
return {
|
||||
query: "" as String,
|
||||
members: [] as Array<MemberViewModel>,
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
...mapWritableState(useProtocolPresenceStore, ["presence", "loading"]),
|
||||
...mapState(useMemberStore, ["members"]),
|
||||
...mapState(useAbilityStore, ["can"]),
|
||||
getMember() {
|
||||
return (memberId: number) => {
|
||||
return this.members.find((m) => memberId == m.id);
|
||||
};
|
||||
filtered(): Array<{memberId:number, absent:boolean; protocolId:number}> {
|
||||
return (this.query === ""
|
||||
? this.members
|
||||
: this.members.filter((member) =>
|
||||
(member.firstname + " " + member.lastname)
|
||||
.toLowerCase()
|
||||
.replace(/\s+/g, "")
|
||||
.includes(this.query.toLowerCase().replace(/\s+/g, ""))
|
||||
)).map(m =>({memberId: m.id, absent:false, protocolId:parseInt(this.protocolId ?? "")}));
|
||||
},
|
||||
getMember(){
|
||||
return (memberId:number) => {
|
||||
return this.members.find(m => memberId == m.id)
|
||||
}
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.fetchMembers(0, 1000, "", true);
|
||||
// this.fetchProtocolPresence();
|
||||
},
|
||||
mounted() {},
|
||||
methods: {
|
||||
...mapActions(useMemberStore, ["fetchMembers"]),
|
||||
...mapActions(useProtocolPresenceStore, ["fetchProtocolPresence"]),
|
||||
removeSelected(id: number) {
|
||||
let index = this.presence.findIndex((s) => s.memberId == id);
|
||||
|
|
|
@ -58,10 +58,8 @@ import Spinner from "@/components/Spinner.vue";
|
|||
import SuccessCheckmark from "@/components/SuccessCheckmark.vue";
|
||||
import FailureXMark from "@/components/FailureXMark.vue";
|
||||
import { RouterLink } from "vue-router";
|
||||
import type {
|
||||
CalendarTypeViewModel,
|
||||
UpdateCalendarTypeViewModel,
|
||||
} from "@/viewmodels/admin/settings/calendarType.models";
|
||||
import type { CalendarTypeViewModel, UpdateCalendarTypeViewModel } from "@/viewmodels/admin/settings/calendarType.models";
|
||||
import { CheckIcon, ChevronUpDownIcon } from "@heroicons/vue/20/solid";
|
||||
import cloneDeep from "lodash.clonedeep";
|
||||
import isEqual from "lodash.isequal";
|
||||
</script>
|
||||
|
@ -117,7 +115,7 @@ export default defineComponent({
|
|||
type: formData.type.value,
|
||||
color: formData.color.value,
|
||||
nscdr: formData.nscdr.checked,
|
||||
passphrase: formData.passphrase?.value,
|
||||
passphrase: formData.passphrase.value,
|
||||
};
|
||||
this.status = "loading";
|
||||
this.updateActiveCalendarType(updateCalendarType)
|
||||
|
|