Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
5edbccb
feat: 온도그래프 화면으로 전환
taekoong Jul 20, 2025
90dbe65
feat: 온도그래프 화면으로 전환
taekoong Jul 21, 2025
a4b794c
feat: 온도그래프 화면으로 전환
taekoong Jul 21, 2025
97983e9
feat: 온도그래프 화면으로 전환
taekoong Jul 21, 2025
e927d5a
feat: 온도그래프 화면으로 전환
taekoong Jul 21, 2025
86e5b0f
feat: 온도그래프 화면 구현
taekoong Jul 21, 2025
371a714
feat: 온도그래프 화면 구현
taekoong Jul 21, 2025
34a644e
feat: 온도그래프 화면 구현
taekoong Jul 21, 2025
c89c48c
feat: 온도그래프 화면 구현
taekoong Jul 21, 2025
827602d
feat: 온도그래프 화면 구현
taekoong Jul 21, 2025
ee34259
feat: 온도그래프 화면 구현
taekoong Jul 21, 2025
274a967
get pull
taekoong Jul 28, 2025
2f07e57
feat: 마이페이지 및 온도지수 api연결
taekoong Aug 8, 2025
c17720e
Merge branch 'main', remote-tracking branch 'origin' into fe/connecting
taekoong Aug 8, 2025
b065e81
feat: 마이페이지 api 연결
taekoong Aug 8, 2025
b907d07
feat: 마이페이지 api 연결
taekoong Aug 8, 2025
9b3851a
feat: 가족기여도 api 연결
taekoong Aug 8, 2025
a189e26
feat: dkdkkkkkk
taekoong Aug 9, 2025
e3fefa8
Merge remote-tracking branch 'origin/fe/connecting' into fe/connecting
taekoong Aug 9, 2025
0e25bbd
feat: 서비스 업로드
taekoong Aug 9, 2025
52e130d
feat: 서비스 업로드
taekoong Aug 9, 2025
40ef7f7
feat: 서비스 업로드
taekoong Aug 9, 2025
7de0b58
feat: 서비스 업로드
taekoong Aug 9, 2025
b1fa2b5
Merge branch 'main' into fe/connecting
taekoong Aug 9, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions frontend/ongi/lib/screens/home/home_degree_graph.dart
Original file line number Diff line number Diff line change
Expand Up @@ -68,14 +68,15 @@ class _HomeDegreeGraph extends State<HomeDegreeGraph> {
try {
final userInfo = await PrefsManager.getUserInfo();
final familyCode = userInfo['familycode'];
final token = await PrefsManager.getAccessToken();
if (familyCode == null) throw Exception('가족 코드가 없습니다.');
final service = TemperatureService(baseUrl: 'https://ongi-1049536928483.asia-northeast3.run.app');
final dailyResp = await service.fetchFamilyTemperatureDaily(familyCode);
final contribResp = await service.fetchFamilyTemperatureContributions(familyCode);
final dailyResp = await service.fetchFamilyTemperatureDaily(familyCode, token: token);
final contribResp = await service.fetchFamilyTemperatureContributions(familyCode, token: token);
if (!mounted) return;
setState(() {
dailyTemperatures = dailyResp;
contributions = contribResp;
contributions = contribResp.map((e) => Contribution.fromJson(e)).toList();
isLoading = false;
});
} catch (e) {
Expand Down Expand Up @@ -312,7 +313,8 @@ class _HomeDegreeGraph extends State<HomeDegreeGraph> {
),
),
Text(
item['date'] ?? '',
item.formattedDate ?? '',

style: const TextStyle(
color: Colors.grey,
fontSize: 12,
Expand Down
4 changes: 2 additions & 2 deletions frontend/ongi/lib/screens/home/home_donutCapsule.dart
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import 'package:flutter/material.dart';
import 'package:ongi/core/app_colors.dart';
import 'package:flutter_svg/flutter_svg.dart';
import 'package:ongi/screens/home/home_degree_graph.dart';
import 'package:ongi/widgets/custom_chart_painter.dart';
import 'package:ongi/services/temperature_service.dart';
import 'package:ongi/utils/prefs_manager.dart';
Expand Down Expand Up @@ -32,8 +31,9 @@ class _HomeCapsuleSectionState extends State<HomeCapsuleSection> {
final userInfo = await PrefsManager.getUserInfo();
final familyCode = userInfo['familycode'];
if (familyCode == null) throw Exception('가족 코드가 없습니다.');
final token = await PrefsManager.getAccessToken();
final service = TemperatureService(baseUrl: 'https://ongi-1049536928483.asia-northeast3.run.app');
final dailyTemps = await service.fetchFamilyTemperatureDaily(familyCode);
final dailyTemps = await service.fetchFamilyTemperatureDaily(familyCode, token: token);
final today = DateTime.now();
final todayStr = '${today.year.toString().padLeft(4, '0')}-${today.month.toString().padLeft(2, '0')}-${today.day.toString().padLeft(2, '0')}';
final match = dailyTemps.firstWhere(
Expand Down
5 changes: 3 additions & 2 deletions frontend/ongi/lib/services/temperature_service.dart
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ class TemperatureService {
final response = await http.get(url, headers: headers);
if (response.statusCode == 200) {
final data = json.decode(response.body);
return List<Map<String, dynamic>>.from(data['dailyTemperatures'] ?? data ?? []);
return List<Map<String, dynamic>>.from(data['dailyTemperatures'] ?? []);
} else {
throw Exception('가족 온도 일별 데이터 불러오기 실패');
}
Expand All @@ -33,7 +33,8 @@ class TemperatureService {
final response = await http.get(url, headers: headers);
if (response.statusCode == 200) {
final data = json.decode(response.body);
return data['contributions'] ?? data ?? [];
return data['contributions'] ?? [];

} else {
throw Exception('가족 온도 기여도 데이터 불러오기 실패');
}
Expand Down
Loading