feat: complete leave approval MVP

This commit is contained in:
selfrelease
2026-07-18 19:20:07 +08:00
parent 2105fe3bac
commit 090a7e33ce
133 changed files with 7845 additions and 100 deletions
@@ -0,0 +1,25 @@
import 'package:flutter/foundation.dart';
class RuntimeConfig {
static const _configuredApiBaseUrl = String.fromEnvironment(
'AIOA_API_BASE_URL',
);
static const _configuredOidcIssuer = String.fromEnvironment(
'AIOA_OIDC_ISSUER',
);
static String get apiBaseUrl => _configuredApiBaseUrl.isNotEmpty
? _configuredApiBaseUrl
: '${_localOrigin(8080)}/api/v1';
static String get oidcIssuer => _configuredOidcIssuer.isNotEmpty
? _configuredOidcIssuer
: 'http://localhost:8081/realms/aioa';
static String _localOrigin(int port) {
final host = defaultTargetPlatform == TargetPlatform.android
? '10.0.2.2'
: '127.0.0.1';
return 'http://$host:$port';
}
}