input komma and point by liters and pricePerLiter, IPhone problem
This commit is contained in:
@@ -187,13 +187,14 @@ class EditController extends GetxController {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
void _calculateTotal() {
|
||||
final liters = double.tryParse(litersController.text) ?? 0.0;
|
||||
final pricePerLiter = double.tryParse(pricePerLiterController.text) ?? 0.0;
|
||||
final liters =
|
||||
double.tryParse(litersController.text.replaceAll(',', '.')) ?? 0.0;
|
||||
final pricePerLiter =
|
||||
double.tryParse(pricePerLiterController.text.replaceAll(',', '.')) ??
|
||||
0.0;
|
||||
calculatedTotal.value = (liters * pricePerLiter).toStringAsFixed(2);
|
||||
print('$liters L * $pricePerLiter €/L = ${calculatedTotal.value} €');
|
||||
}
|
||||
|
||||
Future<void> selectDate(BuildContext context) async {
|
||||
@@ -245,8 +246,8 @@ class EditController extends GetxController {
|
||||
'userId': userId,
|
||||
'date': dateController.text,
|
||||
'odometer': odometerController.text,
|
||||
'liters': litersController.text,
|
||||
'pricePerLiter': pricePerLiterController.text,
|
||||
'liters': litersController.text.replaceAll(',', '.'),
|
||||
'pricePerLiter': pricePerLiterController.text.replaceAll(',', '.'),
|
||||
'location': locationController.text,
|
||||
};
|
||||
|
||||
|
||||
@@ -124,9 +124,7 @@ class EditPage extends GetView<EditController> {
|
||||
label: 'Liter',
|
||||
icon: Icons.local_gas_station,
|
||||
controller: editCtrl.litersController,
|
||||
keyboardType: TextInputType.numberWithOptions(
|
||||
decimal: true,
|
||||
),
|
||||
keyboardType: TextInputType.emailAddress,
|
||||
suffix: 'L',
|
||||
required: true,
|
||||
),
|
||||
@@ -138,9 +136,7 @@ class EditPage extends GetView<EditController> {
|
||||
label: 'Preis pro Liter',
|
||||
icon: Icons.euro,
|
||||
controller: editCtrl.pricePerLiterController,
|
||||
keyboardType: TextInputType.numberWithOptions(
|
||||
decimal: true,
|
||||
),
|
||||
keyboardType: TextInputType.emailAddress,
|
||||
suffix: '€/L',
|
||||
required: true,
|
||||
),
|
||||
|
||||
@@ -37,6 +37,6 @@ _flutter.buildConfig = {"engineRevision":"3452d735bd38224ef2db85ca763d862d6326b1
|
||||
|
||||
_flutter.loader.load({
|
||||
serviceWorkerSettings: {
|
||||
serviceWorkerVersion: "220619559" /* Flutter's service worker is deprecated and will be removed in a future Flutter release. */
|
||||
serviceWorkerVersion: "138245282" /* Flutter's service worker is deprecated and will be removed in a future Flutter release. */
|
||||
}
|
||||
});
|
||||
|
||||
@@ -4,11 +4,12 @@ FROM nginx:alpine
|
||||
# Remove default nginx website
|
||||
RUN rm -rf /usr/share/nginx/html/*
|
||||
|
||||
# Copy the built Flutter web app
|
||||
COPY ../. /usr/share/nginx/html/
|
||||
# Copy the built Flutter web app (exclude installDocker folder)
|
||||
COPY . /usr/share/nginx/html/
|
||||
RUN rm -rf /usr/share/nginx/html/installDocker
|
||||
|
||||
# Copy nginx configuration
|
||||
COPY nginx.conf /etc/nginx/conf.d/default.conf
|
||||
COPY installDocker/nginx.conf /etc/nginx/conf.d/default.conf
|
||||
|
||||
# Expose port 80 (internally, mapped to 8888 externally)
|
||||
EXPOSE 80
|
||||
|
||||
@@ -30,9 +30,11 @@ if [ "$(docker images -q $IMAGE_NAME)" ]; then
|
||||
docker rmi $IMAGE_NAME || true
|
||||
fi
|
||||
|
||||
# Build new Docker image
|
||||
# Build new Docker image (from parent directory to include web files)
|
||||
echo "🔨 Building Docker image..."
|
||||
docker build -t $IMAGE_NAME .
|
||||
cd ..
|
||||
docker build -f installDocker/Dockerfile -t $IMAGE_NAME .
|
||||
cd installDocker
|
||||
|
||||
# Run container
|
||||
echo "🚀 Starting container on port $PORT..."
|
||||
|
||||
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user