From deedcb8a93cfca5e80437708e54bf669066cb686 Mon Sep 17 00:00:00 2001 From: lowrt Date: Tue, 12 Aug 2025 21:52:25 +0800 Subject: [PATCH 1/3] fix(history): workschlclos type --- lib/api/model/history/history.dart | 3 +++ lib/widgets/home/event_list_route.dart | 3 +++ 2 files changed, 6 insertions(+) diff --git a/lib/api/model/history/history.dart b/lib/api/model/history/history.dart index e10d05acb..a2a9ef8b2 100644 --- a/lib/api/model/history/history.dart +++ b/lib/api/model/history/history.dart @@ -29,6 +29,9 @@ enum HistoryType { @JsonValue('extremely-torrential-rain') extremelyTorrentialRain, + + @JsonValue('workSchlClos') + workSchlClos, } @JsonSerializable() diff --git a/lib/widgets/home/event_list_route.dart b/lib/widgets/home/event_list_route.dart index d43b78c6a..518ca8822 100644 --- a/lib/widgets/home/event_list_route.dart +++ b/lib/widgets/home/event_list_route.dart @@ -41,6 +41,9 @@ void handleEventList(BuildContext context, History history) { case HistoryType.extremelyTorrentialRain: page = ThunderstormPage(item: history); + case HistoryType.workSchlClos: + page = ThunderstormPage(item: history); + case HistoryType.earthquake: context.push( MapPage.route( From 3e95c6bba999f9d9cd2a775331ec59a3a03be793 Mon Sep 17 00:00:00 2001 From: lowrt Date: Tue, 12 Aug 2025 22:10:45 +0800 Subject: [PATCH 2/3] fix: naming definition --- lib/api/model/history/history.dart | 4 ++-- lib/widgets/home/event_list_route.dart | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/api/model/history/history.dart b/lib/api/model/history/history.dart index a2a9ef8b2..7fa6019f6 100644 --- a/lib/api/model/history/history.dart +++ b/lib/api/model/history/history.dart @@ -30,8 +30,8 @@ enum HistoryType { @JsonValue('extremely-torrential-rain') extremelyTorrentialRain, - @JsonValue('workSchlClos') - workSchlClos, + @JsonValue('work-And-Class-Suspension') + workAndClassSuspension, } @JsonSerializable() diff --git a/lib/widgets/home/event_list_route.dart b/lib/widgets/home/event_list_route.dart index 518ca8822..916ef3434 100644 --- a/lib/widgets/home/event_list_route.dart +++ b/lib/widgets/home/event_list_route.dart @@ -41,7 +41,7 @@ void handleEventList(BuildContext context, History history) { case HistoryType.extremelyTorrentialRain: page = ThunderstormPage(item: history); - case HistoryType.workSchlClos: + case HistoryType.workAndClassSuspension: page = ThunderstormPage(item: history); case HistoryType.earthquake: From bd3ba475692476b7e9497bb9ab207927cffb7b9c Mon Sep 17 00:00:00 2001 From: lowrt Date: Wed, 13 Aug 2025 06:17:02 +0800 Subject: [PATCH 3/3] revert --- lib/api/model/history/history.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/api/model/history/history.dart b/lib/api/model/history/history.dart index 7fa6019f6..aef30b2bf 100644 --- a/lib/api/model/history/history.dart +++ b/lib/api/model/history/history.dart @@ -30,7 +30,7 @@ enum HistoryType { @JsonValue('extremely-torrential-rain') extremelyTorrentialRain, - @JsonValue('work-And-Class-Suspension') + @JsonValue('workSchlClos') workAndClassSuspension, }