From 7ded4cb095d1be1fdbc3667da2fd2cb17efcf6d0 Mon Sep 17 00:00:00 2001 From: tgyuu-An Date: Sat, 20 Jan 2024 04:36:33 +0900 Subject: [PATCH] =?UTF-8?q?[FEATURE]=20#106=20:=20GetEventListFromDate?= =?UTF-8?q?=EC=97=90=20=EB=8B=B9=EC=9D=BC=20=EC=9D=B4=EC=A0=84=EC=9D=98=20?= =?UTF-8?q?=EC=9D=BC=EC=A0=95=EB=A7=8C=20=EA=B0=80=EC=A0=B8=EC=98=A4?= =?UTF-8?q?=EB=8F=84=EB=A1=9D=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../wap/wapp/core/network/source/event/EventDataSourceImpl.kt | 4 +++- .../wap/wapp/feature/profile/component/WappAttendanceRow.kt | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/core/network/src/main/java/com/wap/wapp/core/network/source/event/EventDataSourceImpl.kt b/core/network/src/main/java/com/wap/wapp/core/network/source/event/EventDataSourceImpl.kt index 54b51350..cd1e46b1 100644 --- a/core/network/src/main/java/com/wap/wapp/core/network/source/event/EventDataSourceImpl.kt +++ b/core/network/src/main/java/com/wap/wapp/core/network/source/event/EventDataSourceImpl.kt @@ -2,6 +2,7 @@ package com.wap.wapp.core.network.source.event import com.google.firebase.firestore.FirebaseFirestore import com.google.firebase.firestore.ktx.toObject +import com.wap.wapp.core.model.util.DateUtil.generateNowDateTime import com.wap.wapp.core.network.constant.EVENT_COLLECTION import com.wap.wapp.core.network.model.event.EventRequest import com.wap.wapp.core.network.model.event.EventResponse @@ -37,9 +38,10 @@ class EventDataSourceImpl @Inject constructor( // 선택된 날짜 1일 00시 00분 00초 val startDateTime = date.atStartOfDay().toISOLocalDateTimeString() - + val currentDateTime = generateNowDateTime().toISOLocalDateTimeString() val task = firebaseFirestore.collection(EVENT_COLLECTION) .whereGreaterThanOrEqualTo("startDateTime", startDateTime) + .whereLessThanOrEqualTo("startDateTime", currentDateTime) .get() .await() diff --git a/feature/profile/src/main/java/com/wap/wapp/feature/profile/component/WappAttendanceRow.kt b/feature/profile/src/main/java/com/wap/wapp/feature/profile/component/WappAttendanceRow.kt index c196fd45..1fb120a0 100644 --- a/feature/profile/src/main/java/com/wap/wapp/feature/profile/component/WappAttendanceRow.kt +++ b/feature/profile/src/main/java/com/wap/wapp/feature/profile/component/WappAttendanceRow.kt @@ -51,7 +51,7 @@ internal fun WappAttendacneRow( } @Composable -private fun WappAttendanceBadge(isAttendance: Boolean = true) { +private fun WappAttendanceBadge(isAttendance: Boolean) { val drawableId = if (isAttendance) R.drawable.ic_attendance else R.drawable.ic_absent Image(painter = painterResource(id = drawableId), contentDescription = "") }