Skip to content

Commit

Permalink
Merge pull request #2313 from airqo-platform/staging
Browse files Browse the repository at this point in the history
move to production
  • Loading branch information
Baalmart authored Dec 10, 2024
2 parents 9e79a80 + 1f52223 commit 0da3fe8
Show file tree
Hide file tree
Showing 20 changed files with 4,507 additions and 50 deletions.
3,896 changes: 3,896 additions & 0 deletions docs/package-lock.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion k8s/docs/values-stage.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ replicaCount: 1
image:
repository: eu.gcr.io/airqo-250220/airqo-stage-docs
pullPolicy: Always
tag: stage-881acf30-1730309646
tag: stage-24c8f6ba-1733852714
imagePullSecrets: []
nameOverride: ''
fullnameOverride: ''
Expand Down
2 changes: 1 addition & 1 deletion k8s/platform/values-prod.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ replicaCount: 1
image:
repository: eu.gcr.io/airqo-250220/airqo-next-platform
pullPolicy: Always
tag: prod-55d6570d-1733323855
tag: prod-9e79a807-1733832639
imagePullSecrets: []
nameOverride: ''
fullnameOverride: ''
Expand Down
2 changes: 1 addition & 1 deletion k8s/platform/values-stage.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ replicaCount: 1
image:
repository: eu.gcr.io/airqo-250220/airqo-stage-next-platform
pullPolicy: Always
tag: stage-32e129f7-1733323505
tag: stage-79603673-1733832552
imagePullSecrets: []
nameOverride: ''
fullnameOverride: ''
Expand Down
5 changes: 0 additions & 5 deletions mobile-v3/android/local.properties

This file was deleted.

4 changes: 4 additions & 0 deletions mobile-v3/assets/icons/location.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
44 changes: 25 additions & 19 deletions mobile-v3/lib/src/app/dashboard/models/forecast_response.dart
Original file line number Diff line number Diff line change
@@ -1,35 +1,41 @@
import 'package:airqo/src/app/dashboard/models/airquality_response.dart';
class ForecastResponse {
List<Forecast> forecasts;
List<Forecast> forecasts;

ForecastResponse({
required this.forecasts,
});
ForecastResponse({
required this.forecasts,
});

factory ForecastResponse.fromJson(Map<String, dynamic> json) => ForecastResponse(
forecasts: List<Forecast>.from(json["forecasts"].map((x) => Forecast.fromJson(x))),
);
factory ForecastResponse.fromJson(Map<String, dynamic> json) =>
ForecastResponse(
forecasts: List<Forecast>.from(
json["forecasts"].map((x) => Forecast.fromJson(x))),
);

Map<String, dynamic> toJson() => {
Map<String, dynamic> toJson() => {
"forecasts": List<dynamic>.from(forecasts.map((x) => x.toJson())),
};
};
}

class Forecast {
double pm25;
DateTime time;
Measurement measurement;
double pm25;
DateTime time;

Forecast({
required this.pm25,
required this.time,
});
Forecast({
required this.measurement,
required this.pm25,
required this.time,
});

factory Forecast.fromJson(Map<String, dynamic> json) => Forecast(
factory Forecast.fromJson(Map<String, dynamic> json) => Forecast(
measurement: Measurement.fromJson(json["measurement"]),
pm25: json["pm2_5"]?.toDouble(),
time: DateTime.parse(json["time"]),
);
);

Map<String, dynamic> toJson() => {
Map<String, dynamic> toJson() => {
"pm2_5": pm25,
"time": time.toIso8601String(),
};
};
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
import 'package:flutter/material.dart';
import 'package:flutter_svg/flutter_svg.dart';

class NoAirQualityDataPage extends StatelessWidget {
const NoAirQualityDataPage({super.key});

@override
Widget build(BuildContext context) {
return LayoutBuilder(
builder: (context, constraints) {
double maxWidth = constraints.maxWidth;
double maxHeight = constraints.maxHeight;

return Column(
mainAxisAlignment: MainAxisAlignment.center,
children: [
SvgPicture.asset(
'assets/icons/error_occured.svg',
width: maxWidth * 0.5,
height: maxWidth * 0.5,
),
SizedBox(height: maxHeight * 0.05),
Text(
"No Air Quality Data",
style: Theme.of(context).textTheme.headlineLarge!.copyWith(
fontSize: maxWidth * 0.06,
fontWeight: FontWeight.bold,
),
),
SizedBox(height: maxHeight * 0.02),
Text(
"We're having issues with our network\nno worries, we'll be back up soon.",
textAlign: TextAlign.center,
style: TextStyle(
fontSize: maxWidth * 0.04,
),
),
],
);
},
);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ class AnalyticsCard extends StatelessWidget {
SizedBox(
child: Center(
child: SvgPicture.asset(
getAirQualityIcon(measurement.pm25!.value ?? 10),
getAirQualityIcon(measurement, measurement.pm25!.value ?? 10),
height: 96,
width: 96,
),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ class _AnalyticsForecastWidgetState extends State<AnalyticsForecastWidget> {
active: false,
date: DateFormat.d().format(e.time),
day: DateFormat.E().format(e.time)[0],
imagePath: getAirQualityIcon(e.pm25),
imagePath: getAirQualityIcon(e.measurement, e.pm25),
))
.toList());
} else if (state is ForecastLoading) {
Expand Down
2 changes: 1 addition & 1 deletion mobile-v3/lib/src/app/map/pages/map_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ class _MapScreenState extends State<MapScreen>
markers.add(Marker(
onTap: () => viewDetails(measurement: measurement),
icon: await bitmapDescriptorFromSvgAsset(
getAirQualityIcon(measurement.pm25!.value!)),
getAirQualityIcon(measurement, measurement.pm25!.value!)),
position: LatLng(measurement.siteDetails!.approximateLatitude!,
measurement.siteDetails!.approximateLongitude!),
markerId: MarkerId(measurement.id!),
Expand Down
43 changes: 43 additions & 0 deletions mobile-v3/lib/src/app/map/pages/map_search_error_page.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
import 'package:flutter/material.dart';
import 'package:flutter_svg/flutter_svg.dart';

class MapSearchErrorPage extends StatelessWidget {
const MapSearchErrorPage({super.key});

@override
Widget build(BuildContext context) {
return LayoutBuilder(
builder: (context, constraints) {
double maxWidth = constraints.maxWidth;
double maxHeight = constraints.maxHeight;

return Column(
mainAxisAlignment: MainAxisAlignment.center,
children: [
SvgPicture.asset(
'assets/icons/location.svg',
width: maxWidth * 0.5,
height: maxWidth * 0.5,
),
SizedBox(height: maxHeight * 0.05),
Text(
"No results found",
style: Theme.of(context).textTheme.headlineLarge!.copyWith(
fontSize: maxWidth * 0.06,
fontWeight: FontWeight.bold,
),
),
SizedBox(height: maxHeight * 0.02),
Text(
"Please try again with a different location name",
textAlign: TextAlign.center,
style: TextStyle(
fontSize: maxWidth * 0.04,
),
),
],
);
},
);
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
import 'package:flutter/material.dart';
import 'package:flutter_svg/svg.dart';

class ClearedNotificationsScreen extends StatelessWidget {
@override
Widget build(BuildContext context) {
return Scaffold(
backgroundColor: Colors.black,
body: LayoutBuilder(
builder: (context, constraints) {
double maxWidth = constraints.maxWidth;
double maxHeight = constraints.maxHeight;

return Center(
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Container(
width: maxWidth * 0.2,
height: maxWidth * 0.2,
decoration: BoxDecoration(
color: Colors.grey[900],
shape: BoxShape.circle,
),
// child: Icon(
// Icons.notifications,
// color: Colors.white,
// size: maxWidth * 0.1,
// ),
child: SvgPicture.asset(
"assets/icons/notification.svg",
)),
SizedBox(height: maxHeight * 0.05),
Text(
"You're all cleared up",
style: TextStyle(
color: Colors.white,
fontSize: maxWidth * 0.06,
fontWeight: FontWeight.bold,
),
),
SizedBox(height: maxHeight * 0.02),
Text(
"You deserve some ice cream!",
style: TextStyle(
color: Colors.grey,
fontSize: maxWidth * 0.045,
),
),
],
),
);
},
),
);
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
import 'package:flutter/material.dart';
import 'package:flutter_svg/svg.dart';

class NoNotificationsScreen extends StatelessWidget {
@override
Widget build(BuildContext context) {
return Scaffold(
backgroundColor: Colors.black,
body: LayoutBuilder(
builder: (context, constraints) {
double maxWidth = constraints.maxWidth;
double maxHeight = constraints.maxHeight;

return Center(
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Container(
width: maxWidth * 0.2,
height: maxWidth * 0.2,
decoration: BoxDecoration(
color: Colors.grey[900],
shape: BoxShape.circle,
),
// child: Icon(
// Icons.notifications,
// color: Colors.white,
// size: maxWidth * 0.1,
// ),
child: SvgPicture.asset(
"assets/icons/notification.svg",
)),
SizedBox(height: maxHeight * 0.05),
Text(
"No Notifications",
style: TextStyle(
color: Colors.white,
fontSize: maxWidth * 0.06,
fontWeight: FontWeight.bold,
),
),
SizedBox(height: maxHeight * 0.02),
Text(
"Here you'll find all updates on our Air Quality network",
style: TextStyle(
color: Colors.grey,
fontSize: maxWidth * 0.045,
),
),
],
),
);
},
),
);
}
}
Loading

0 comments on commit 0da3fe8

Please sign in to comment.