V 1.0.6 beoanswer
Buttons abgesagt/verschobe werden nun auch aktiviert beim Klick
This commit is contained in:
@@ -17,6 +17,20 @@ server {
|
|||||||
try_files $uri $uri/ /index.php;
|
try_files $uri $uri/ /index.php;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# Serve beoanswer frontend build output from dist
|
||||||
|
location = /beoanswer/ {
|
||||||
|
try_files /beoanswer/dist/index.html =404;
|
||||||
|
}
|
||||||
|
|
||||||
|
location /beoanswer/assets/ {
|
||||||
|
alias /var/www/html/beoanswer/dist/assets/;
|
||||||
|
try_files $uri =404;
|
||||||
|
}
|
||||||
|
|
||||||
|
location = /beoanswer/anleitung.html {
|
||||||
|
try_files /beoanswer/dist/anleitung.html =404;
|
||||||
|
}
|
||||||
|
|
||||||
# Specify the details of favicon.ico
|
# Specify the details of favicon.ico
|
||||||
location = /favicon.ico { access_log off; log_not_found off; }
|
location = /favicon.ico { access_log off; log_not_found off; }
|
||||||
|
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ $allowedOrigins = [
|
|||||||
'https://ihre-produktions-domain.de' // Ersetzen Sie durch Ihre echte Domain
|
'https://ihre-produktions-domain.de' // Ersetzen Sie durch Ihre echte Domain
|
||||||
];
|
];
|
||||||
|
|
||||||
$origin = $_SERVER['HTTP_ORIGIN'] ?? '';
|
$origin = isset($_SERVER['HTTP_ORIGIN']) ? $_SERVER['HTTP_ORIGIN'] : '';
|
||||||
if (in_array($origin, $allowedOrigins)) {
|
if (in_array($origin, $allowedOrigins)) {
|
||||||
header("Access-Control-Allow-Origin: $origin");
|
header("Access-Control-Allow-Origin: $origin");
|
||||||
} else {
|
} else {
|
||||||
@@ -41,16 +41,24 @@ $backendUrl = 'https://sternwarte-welzheim.de/intern/sofue/php/sofueDB.php';
|
|||||||
|
|
||||||
// Credentials sicher laden - verschiedene Optionen:
|
// Credentials sicher laden - verschiedene Optionen:
|
||||||
// Option 1: Aus Environment Variables (empfohlen)
|
// Option 1: Aus Environment Variables (empfohlen)
|
||||||
$username = getenv('SOFUE_USERNAME') ?: $_ENV['SOFUE_USERNAME'] ?? null;
|
$username = getenv('SOFUE_USERNAME');
|
||||||
$password = getenv('SOFUE_PASSWORD') ?: $_ENV['SOFUE_PASSWORD'] ?? null;
|
if ($username === false || $username === '') {
|
||||||
|
$username = isset($_ENV['SOFUE_USERNAME']) ? $_ENV['SOFUE_USERNAME'] : null;
|
||||||
|
}
|
||||||
|
|
||||||
|
$password = getenv('SOFUE_PASSWORD');
|
||||||
|
if ($password === false || $password === '') {
|
||||||
|
$password = isset($_ENV['SOFUE_PASSWORD']) ? $_ENV['SOFUE_PASSWORD'] : null;
|
||||||
|
}
|
||||||
|
|
||||||
// Option 2: Aus separater Config-Datei (Fallback)
|
// Option 2: Aus separater Config-Datei (Fallback)
|
||||||
if (!$username || !$password) {
|
if (!$username || !$password) {
|
||||||
$configFile = __DIR__ . '/cors-config.php';
|
$configFile = __DIR__ . '/cors-config.php';
|
||||||
if (file_exists($configFile)) {
|
if (file_exists($configFile)) {
|
||||||
include $configFile;
|
include $configFile;
|
||||||
// cors-config.php sollte enthalten:
|
// cors-config.php sollte enthalten:
|
||||||
// <?php $username = 'beogruppe'; $password = 'ArktUhr'; ?>
|
// $username = 'beogruppe';
|
||||||
|
// $password = 'ArktUhr';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "beoanswer_react",
|
"name": "beoanswer_react",
|
||||||
"private": true,
|
"private": true,
|
||||||
"version": "1.0.5",
|
"version": "1.0.6",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "vite",
|
"dev": "vite",
|
||||||
|
|||||||
@@ -12,9 +12,9 @@ export default function FandStattVer({left, right, title, onNext, radioName = "f
|
|||||||
const handleRadioChange = (e) => {
|
const handleRadioChange = (e) => {
|
||||||
const value = e.target.value
|
const value = e.target.value
|
||||||
updateFormData(fieldName, value)
|
updateFormData(fieldName, value)
|
||||||
|
setAuswahl(value)
|
||||||
setbackButton(true)
|
setbackButton(true)
|
||||||
if(radioName !== 'abgesagt') {
|
if(radioName !== 'abgesagt') {
|
||||||
setAuswahl(value)
|
|
||||||
onNext(value)
|
onNext(value)
|
||||||
} else {
|
} else {
|
||||||
onNext()
|
onNext()
|
||||||
|
|||||||
Reference in New Issue
Block a user