Compare commits
10 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| f2fd0a6a6e | |||
| dcbc14b8a1 | |||
| 46400ae58a | |||
| e190ac76b5 | |||
| e62f21c86a | |||
| 9819af3111 | |||
| 73e954c8f4 | |||
| 734aca3ec7 | |||
| 5e828d344c | |||
| 0e3f3641b7 |
@@ -20,8 +20,8 @@ android {
|
|||||||
applicationId = "com.example.shiftalarm"
|
applicationId = "com.example.shiftalarm"
|
||||||
minSdk = 26
|
minSdk = 26
|
||||||
targetSdk = 35
|
targetSdk = 35
|
||||||
versionCode = 1152
|
versionCode = 1154
|
||||||
versionName = "1.5.2"
|
versionName = "1.5.4"
|
||||||
|
|
||||||
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
|
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -30,7 +30,7 @@
|
|||||||
- **부드러운 스위치**: 알람 항목의 온/오프 스위치는 가볍고 부드러운 애니메이션을 제공합니다.
|
- **부드러운 스위치**: 알람 항목의 온/오프 스위치는 가볍고 부드러운 애니메이션을 제공합니다.
|
||||||
|
|
||||||
## 4. 근무 관리 (연차 및 연장근무)
|
## 4. 근무 관리 (연차 및 연장근무)
|
||||||
**근무 관리** 탭에서 연차와 토요일 연장근무를 한눈에 관리할 수 있습니다.
|
**근무 관리** 탭에서 연차와 연장근무를 한눈에 관리할 수 있습니다.
|
||||||
|
|
||||||
### 연차 설정
|
### 연차 설정
|
||||||
- **총 연차 설정**: 1~25일 중 본인의 총 연차 일수를 선택하세요. 선택 즉시 저장됩니다.
|
- **총 연차 설정**: 1~25일 중 본인의 총 연차 일수를 선택하세요. 선택 즉시 저장됩니다.
|
||||||
@@ -38,10 +38,10 @@
|
|||||||
- 연차: -1일 차감
|
- 연차: -1일 차감
|
||||||
- 반년(반차): -0.5일 차감
|
- 반년(반차): -0.5일 차감
|
||||||
|
|
||||||
### 토요일 연장근무 계산
|
### 연장근무 계산
|
||||||
- **자동 집계**: 달력에서 토요일에 근무(주간/석간/야간 등)로 설정한 날짜를 자동으로 카운트합니다.
|
- **자동 집계**: 달력에서 근무(주간/석간/야간 등)로 설정한 날짜를 자동으로 카운트합니다.
|
||||||
- **시간 계산**: 토요일 근무 1일당 2시간으로 계산하여 총 연장근무 시간을 표시합니다.
|
- **시간 계산**: 근무 1일당 2시간으로 계산하여 총 연장근무 시간을 표시합니다.
|
||||||
- **예시**: 토요일에 3일 근무 → 6시간 연장근무
|
- **예시**: 3일 근무 → 6시간 연장근무
|
||||||
|
|
||||||
## 5. 물때표 및 특수 설정
|
## 5. 물때표 및 특수 설정
|
||||||
- **물때표 표시**: 설정 → 부가 기능에서 **'물때 정보 표시'**를 활성화하면 달력 각 날짜에 물때 정보가 나타납니다.
|
- **물때표 표시**: 설정 → 부가 기능에서 **'물때 정보 표시'**를 활성화하면 달력 각 날짜에 물때 정보가 나타납니다.
|
||||||
|
|||||||
@@ -175,7 +175,8 @@ class MainActivity : AppCompatActivity() {
|
|||||||
|
|
||||||
binding.calendarGrid.addOnItemTouchListener(object : androidx.recyclerview.widget.RecyclerView.OnItemTouchListener {
|
binding.calendarGrid.addOnItemTouchListener(object : androidx.recyclerview.widget.RecyclerView.OnItemTouchListener {
|
||||||
override fun onInterceptTouchEvent(rv: androidx.recyclerview.widget.RecyclerView, e: MotionEvent): Boolean {
|
override fun onInterceptTouchEvent(rv: androidx.recyclerview.widget.RecyclerView, e: MotionEvent): Boolean {
|
||||||
return gestureDetector.onTouchEvent(e)
|
gestureDetector.onTouchEvent(e)
|
||||||
|
return false
|
||||||
}
|
}
|
||||||
override fun onTouchEvent(rv: androidx.recyclerview.widget.RecyclerView, e: MotionEvent) {}
|
override fun onTouchEvent(rv: androidx.recyclerview.widget.RecyclerView, e: MotionEvent) {}
|
||||||
override fun onRequestDisallowInterceptTouchEvent(disallowIntercept: Boolean) {}
|
override fun onRequestDisallowInterceptTouchEvent(disallowIntercept: Boolean) {}
|
||||||
@@ -745,7 +746,7 @@ class MainActivity : AppCompatActivity() {
|
|||||||
.alpha(1f)
|
.alpha(1f)
|
||||||
.scaleX(1f)
|
.scaleX(1f)
|
||||||
.scaleY(1f)
|
.scaleY(1f)
|
||||||
.setDuration(280)
|
.setDuration(150)
|
||||||
.setInterpolator(AccelerateDecelerateInterpolator())
|
.setInterpolator(AccelerateDecelerateInterpolator())
|
||||||
.start()
|
.start()
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -110,17 +110,21 @@ class ShiftRepository(private val context: Context) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
suspend fun getSaturdayOvertimeHours(): Int = withContext(Dispatchers.IO) {
|
suspend fun getSaturdayOvertimeHours(): Int = withContext(Dispatchers.IO) {
|
||||||
val currentYear = LocalDate.now().year
|
val today = LocalDate.now()
|
||||||
val allOverrides = dao.getAllOverrides()
|
val yearMonth = java.time.YearMonth.of(today.year, today.monthValue)
|
||||||
|
|
||||||
val saturdayWorkDays = allOverrides.filter { override ->
|
// 해당 월의 토요일 개수 계산
|
||||||
val date = LocalDate.parse(override.date)
|
var saturdayCount = 0
|
||||||
date.year == currentYear &&
|
var date = yearMonth.atDay(1)
|
||||||
date.dayOfWeek == java.time.DayOfWeek.SATURDAY &&
|
val lastDay = yearMonth.atEndOfMonth()
|
||||||
override.shift != "휴무" &&
|
|
||||||
override.shift != "휴가"
|
while (!date.isAfter(lastDay)) {
|
||||||
|
if (date.dayOfWeek == java.time.DayOfWeek.SATURDAY) {
|
||||||
|
saturdayCount++
|
||||||
|
}
|
||||||
|
date = date.plusDays(1)
|
||||||
}
|
}
|
||||||
|
|
||||||
saturdayWorkDays.size * 2
|
saturdayCount * 2
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
android:shape="rectangle">
|
android:shape="rectangle">
|
||||||
<!-- 배경색: 다크모드에서도 잘 보이도록 surface 색상 사용 -->
|
<!-- 배경색: 다크모드에서도 잘 보이도록 surface 색상 사용 -->
|
||||||
<solid android:color="#CC333333" />
|
<solid android:color="@color/surface_variant" />
|
||||||
<corners android:radius="16dp" />
|
<corners android:radius="16dp" />
|
||||||
<stroke
|
<stroke
|
||||||
android:width="1dp"
|
android:width="1dp"
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<shape xmlns:android="http://schemas.android.com/apk/res/android">
|
<shape xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
<solid android:color="#FFFFFFFF"/> <!-- Fully Opaque to hide everything behind -->
|
<solid android:color="@color/surface"/> <!-- Theme-aware surface color -->
|
||||||
<corners android:radius="32dp"/>
|
<corners android:radius="32dp"/>
|
||||||
<stroke android:width="1.2dp" android:color="#1A000000"/>
|
<stroke android:width="1.2dp" android:color="#1A000000"/>
|
||||||
</shape>
|
</shape>
|
||||||
|
|||||||
@@ -13,7 +13,7 @@
|
|||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:textSize="14sp"
|
android:textSize="14sp"
|
||||||
android:textColor="@android:color/white"
|
android:textColor="@color/text_primary"
|
||||||
android:maxLines="2"
|
android:maxLines="2"
|
||||||
android:ellipsize="end" />
|
android:ellipsize="end" />
|
||||||
|
|
||||||
|
|||||||
@@ -143,7 +143,7 @@
|
|||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_weight="1"
|
android:layout_weight="1"
|
||||||
android:text="토요일 연장근무"
|
android:text="연장근무"
|
||||||
android:textSize="14sp"
|
android:textSize="14sp"
|
||||||
android:textColor="@color/text_secondary"/>
|
android:textColor="@color/text_secondary"/>
|
||||||
|
|
||||||
@@ -177,7 +177,7 @@
|
|||||||
<TextView
|
<TextView
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:text="※ 토요일 근무: 1일당 2시간 연장근무 계산"
|
android:text="※ 연장근무: 1일당 2시간 계산"
|
||||||
android:textSize="12sp"
|
android:textSize="12sp"
|
||||||
android:textColor="@color/text_tertiary"
|
android:textColor="@color/text_tertiary"
|
||||||
android:layout_marginBottom="8dp"
|
android:layout_marginBottom="8dp"
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"versionCode": 1152,
|
"versionCode": 1154,
|
||||||
"versionName": "1.5.2",
|
"versionName": "1.5.4",
|
||||||
"apkUrl": "https://git.webpluss.net/attachments/b5ab69a5-7e19-490d-80e2-bdbd54d1afc5",
|
"apkUrl": "https://git.webpluss.net/attachments/d38e521a-6019-43bf-8f40-bd9928907252",
|
||||||
"changelog": "v1.5.2: 달력 스와이프 애니메이션 버그 수정, 토요일 연장근무 계산 표시, 사용 설명서 개선",
|
"changelog": "v1.5.4: 토요일 연장근무 기본값 표시, 애니메이션 속도 개선, 다크모드 개선",
|
||||||
"forceUpdate": false
|
"forceUpdate": false
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user