feat: Add admin calendar and improve availability management
- Add admin calendar component with booking overview and status management - Implement treatment-specific availability slots with automatic duration - Enhance availability management with better UI and error handling - Move admin credentials to .env configuration - Add .env.example with all required environment variables - Update README.md with comprehensive setup guide including PowerShell password hash generation - Improve slot deletion with proper error handling and user feedback - Add toast notifications for better UX
This commit is contained in:
@@ -1,20 +1,22 @@
|
||||
$ErrorActionPreference = "Stop"
|
||||
|
||||
param(
|
||||
[Parameter(Mandatory = $true)]
|
||||
[string]$ResendApiKey,
|
||||
|
||||
[Parameter(Mandatory = $false)]
|
||||
[string]$EmailFrom = "Stargirlnails <no-reply@stargirlnails.de>",
|
||||
|
||||
[Parameter(Mandatory = $false)]
|
||||
[string]$AdminEmail
|
||||
)
|
||||
|
||||
Write-Host "Setting environment variables for Resend..."
|
||||
$env:RESEND_API_KEY = $ResendApiKey
|
||||
$env:EMAIL_FROM = $EmailFrom
|
||||
if ($AdminEmail) { $env:ADMIN_EMAIL = $AdminEmail }
|
||||
# Lade .env Datei automatisch
|
||||
Write-Host "Loading .env file..."
|
||||
if (Test-Path ".env") {
|
||||
Get-Content ".env" | ForEach-Object {
|
||||
if ($_ -match '^([^#][^=]+)=(.*)$') {
|
||||
$name = $matches[1].Trim()
|
||||
$value = $matches[2].Trim()
|
||||
[Environment]::SetEnvironmentVariable($name, $value, 'Process')
|
||||
Write-Host "✓ Loaded from .env: $name" -ForegroundColor Green
|
||||
}
|
||||
}
|
||||
Write-Host "Environment variables loaded from .env file" -ForegroundColor Cyan
|
||||
} else {
|
||||
Write-Warning ".env file not found!"
|
||||
Write-Host "Please create a .env file with your environment variables." -ForegroundColor Red
|
||||
exit 1
|
||||
}
|
||||
|
||||
Write-Host "Starting app with pnpm dev..."
|
||||
pnpm dev
|
||||
|
Reference in New Issue
Block a user