Compare commits
7 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 29cc215346 | |||
| 666e38558d | |||
| 8e7f212352 | |||
| 639b22948b | |||
| 03c3fcd6f0 | |||
| b832f87a7b | |||
| 0e60b62fd2 |
@@ -20,8 +20,10 @@ android {
|
|||||||
applicationId = "com.example.shiftalarm"
|
applicationId = "com.example.shiftalarm"
|
||||||
minSdk = 26
|
minSdk = 26
|
||||||
targetSdk = 35
|
targetSdk = 35
|
||||||
versionCode = 1125
|
versionCode = 1140
|
||||||
versionName = "1.2.5"
|
versionName = "1.4.0"
|
||||||
|
versionName = "1.3.0"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
|
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ package com.example.shiftalarm
|
|||||||
import android.content.Context
|
import android.content.Context
|
||||||
import androidx.room.*
|
import androidx.room.*
|
||||||
|
|
||||||
@Database(entities = [ShiftOverride::class, DailyMemo::class, CustomAlarm::class], version = 3, exportSchema = false)
|
@Database(entities = [ShiftOverride::class, DailyMemo::class, CustomAlarm::class, AnnualLeave::class], version = 4, exportSchema = false)
|
||||||
abstract class AppDatabase : RoomDatabase() {
|
abstract class AppDatabase : RoomDatabase() {
|
||||||
abstract fun shiftDao(): ShiftDao
|
abstract fun shiftDao(): ShiftDao
|
||||||
|
|
||||||
|
|||||||
@@ -39,14 +39,21 @@ object AppUpdateManager {
|
|||||||
reader.close()
|
reader.close()
|
||||||
|
|
||||||
val json = JSONObject(result)
|
val json = JSONObject(result)
|
||||||
|
val serverVersionCode = json.getInt("versionCode")
|
||||||
val serverVersionName = json.getString("versionName")
|
val serverVersionName = json.getString("versionName")
|
||||||
val apkUrl = json.getString("apkUrl")
|
val apkUrl = json.getString("apkUrl")
|
||||||
val changelog = json.optString("changelog", "버그 수정 및 성능 향상")
|
val changelog = json.optString("changelog", "버그 수정 및 성능 향상")
|
||||||
|
|
||||||
val pInfo = ctx.packageManager.getPackageInfo(ctx.packageName, 0)
|
val pInfo = ctx.packageManager.getPackageInfo(ctx.packageName, 0)
|
||||||
|
val currentVersionCode = if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.P) {
|
||||||
|
pInfo.longVersionCode.toInt()
|
||||||
|
} else {
|
||||||
|
@Suppress("DEPRECATION")
|
||||||
|
pInfo.versionCode
|
||||||
|
}
|
||||||
val currentVersionName = pInfo.versionName ?: "0.0.0"
|
val currentVersionName = pInfo.versionName ?: "0.0.0"
|
||||||
|
|
||||||
if (isNewerVersion(serverVersionName, currentVersionName)) {
|
if (serverVersionCode > currentVersionCode) {
|
||||||
activity.runOnUiThread {
|
activity.runOnUiThread {
|
||||||
showUpdateDialog(activity, serverVersionName, changelog, apkUrl)
|
showUpdateDialog(activity, serverVersionName, changelog, apkUrl)
|
||||||
}
|
}
|
||||||
@@ -71,29 +78,6 @@ object AppUpdateManager {
|
|||||||
}.start()
|
}.start()
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun isNewerVersion(server: String, current: String): Boolean {
|
|
||||||
try {
|
|
||||||
// Clean version strings (remove non-numeric suffixes if any)
|
|
||||||
val sClean = server.split("-")[0].split(" ")[0]
|
|
||||||
val cClean = current.split("-")[0].split(" ")[0]
|
|
||||||
|
|
||||||
val sParts = sClean.split(".").map { it.filter { char -> char.isDigit() }.let { p -> if (p.isEmpty()) 0 else p.toInt() } }
|
|
||||||
val cParts = cClean.split(".").map { it.filter { char -> char.isDigit() }.let { p -> if (p.isEmpty()) 0 else p.toInt() } }
|
|
||||||
|
|
||||||
val length = Math.max(sParts.size, cParts.size)
|
|
||||||
for (i in 0 until length) {
|
|
||||||
val s = if (i < sParts.size) sParts[i] else 0
|
|
||||||
val c = if (i < cParts.size) cParts[i] else 0
|
|
||||||
if (s > c) return true
|
|
||||||
if (s < c) return false
|
|
||||||
}
|
|
||||||
} catch (e: Exception) {
|
|
||||||
android.util.Log.e("AppUpdateManager", "Version comparison failed: ${e.message}")
|
|
||||||
return false
|
|
||||||
}
|
|
||||||
return false
|
|
||||||
}
|
|
||||||
|
|
||||||
private fun showUpdateDialog(activity: Activity, version: String, changelog: String, apkUrl: String) {
|
private fun showUpdateDialog(activity: Activity, version: String, changelog: String, apkUrl: String) {
|
||||||
com.google.android.material.dialog.MaterialAlertDialogBuilder(activity)
|
com.google.android.material.dialog.MaterialAlertDialogBuilder(activity)
|
||||||
.setTitle("새로운 업데이트 발견 (v$version)")
|
.setTitle("새로운 업데이트 발견 (v$version)")
|
||||||
|
|||||||
@@ -99,7 +99,7 @@ class CalendarAdapter(
|
|||||||
holder.shiftChar.background = null
|
holder.shiftChar.background = null
|
||||||
holder.shiftChar.text = ""
|
holder.shiftChar.text = ""
|
||||||
holder.holidayNameSmall.visibility = View.GONE
|
holder.holidayNameSmall.visibility = View.GONE
|
||||||
holder.shiftChar.textSize = 13f
|
holder.shiftChar.textSize = 15f
|
||||||
|
|
||||||
// "반월", "반년" (Half-Monthly, Half-Yearly) Special Logic
|
// "반월", "반년" (Half-Monthly, Half-Yearly) Special Logic
|
||||||
// These are overrides or specific shifts that user sets.
|
// These are overrides or specific shifts that user sets.
|
||||||
@@ -111,7 +111,7 @@ class CalendarAdapter(
|
|||||||
// Holiday Mode (Priority): Show full holiday name, no circle
|
// Holiday Mode (Priority): Show full holiday name, no circle
|
||||||
holder.shiftChar.text = fullHolidayName
|
holder.shiftChar.text = fullHolidayName
|
||||||
holder.shiftChar.setTextColor(Color.parseColor("#FF5252"))
|
holder.shiftChar.setTextColor(Color.parseColor("#FF5252"))
|
||||||
holder.shiftChar.textSize = 10f
|
holder.shiftChar.textSize = 11f
|
||||||
holder.shiftChar.background = null
|
holder.shiftChar.background = null
|
||||||
} else if (item.shift != null && item.shift != "비번") {
|
} else if (item.shift != null && item.shift != "비번") {
|
||||||
// Shift Mode
|
// Shift Mode
|
||||||
@@ -120,7 +120,7 @@ class CalendarAdapter(
|
|||||||
if (item.shift == "반월" || item.shift == "반년") {
|
if (item.shift == "반월" || item.shift == "반년") {
|
||||||
holder.shiftChar.text = if (item.shift == "반월") "월" else "년"
|
holder.shiftChar.text = if (item.shift == "반월") "월" else "년"
|
||||||
holder.shiftChar.setTextColor(ContextCompat.getColor(context, R.color.black)) // Black for contrast on Half Red/Transparent
|
holder.shiftChar.setTextColor(ContextCompat.getColor(context, R.color.black)) // Black for contrast on Half Red/Transparent
|
||||||
holder.shiftChar.textSize = 13f
|
holder.shiftChar.textSize = 15f
|
||||||
holder.shiftChar.background = ContextCompat.getDrawable(context, R.drawable.bg_shift_half_red)
|
holder.shiftChar.background = ContextCompat.getDrawable(context, R.drawable.bg_shift_half_red)
|
||||||
} else {
|
} else {
|
||||||
// Standard Logic
|
// Standard Logic
|
||||||
@@ -137,7 +137,7 @@ class CalendarAdapter(
|
|||||||
else -> item.shift.take(1)
|
else -> item.shift.take(1)
|
||||||
}
|
}
|
||||||
holder.shiftChar.text = shiftAbbreviation
|
holder.shiftChar.text = shiftAbbreviation
|
||||||
holder.shiftChar.textSize = 15f
|
holder.shiftChar.textSize = 17f
|
||||||
holder.shiftChar.setTypeface(null, android.graphics.Typeface.BOLD)
|
holder.shiftChar.setTypeface(null, android.graphics.Typeface.BOLD)
|
||||||
|
|
||||||
val shiftColorRes = when (item.shift) {
|
val shiftColorRes = when (item.shift) {
|
||||||
@@ -205,7 +205,7 @@ class CalendarAdapter(
|
|||||||
// holder.holidayNameSmall.text = HolidayManager.getLunarDateString(item.date)
|
// holder.holidayNameSmall.text = HolidayManager.getLunarDateString(item.date)
|
||||||
|
|
||||||
holder.shiftChar.text = HolidayManager.getLunarDateString(item.date)
|
holder.shiftChar.text = HolidayManager.getLunarDateString(item.date)
|
||||||
holder.shiftChar.textSize = 10f
|
holder.shiftChar.textSize = 11f
|
||||||
holder.shiftChar.setTextColor(ContextCompat.getColor(context, R.color.text_tertiary))
|
holder.shiftChar.setTextColor(ContextCompat.getColor(context, R.color.text_tertiary))
|
||||||
holder.shiftChar.background = null
|
holder.shiftChar.background = null
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
package com.example.shiftalarm
|
package com.example.shiftalarm
|
||||||
|
|
||||||
import androidx.room.*
|
import androidx.room.Entity
|
||||||
|
import androidx.room.PrimaryKey
|
||||||
|
|
||||||
@Entity(tableName = "shift_overrides", primaryKeys = ["factory", "team", "date"])
|
@Entity(tableName = "shift_overrides", primaryKeys = ["factory", "team", "date"])
|
||||||
data class ShiftOverride(
|
data class ShiftOverride(
|
||||||
@@ -28,3 +29,12 @@ data class CustomAlarm(
|
|||||||
val snoozeInterval: Int = 5,
|
val snoozeInterval: Int = 5,
|
||||||
val snoozeRepeat: Int = 3
|
val snoozeRepeat: Int = 3
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@Entity(tableName = "annual_leave")
|
||||||
|
data class AnnualLeave(
|
||||||
|
@PrimaryKey
|
||||||
|
val id: Int = 1, // Single row for app-wide annual leave
|
||||||
|
val totalDays: Float, // 총 연차 (1~25)
|
||||||
|
val remainingDays: Float, // 남은 연차
|
||||||
|
val updatedAt: Long = System.currentTimeMillis()
|
||||||
|
)
|
||||||
|
|||||||
@@ -4,8 +4,11 @@ import android.os.Bundle
|
|||||||
import android.view.LayoutInflater
|
import android.view.LayoutInflater
|
||||||
import android.view.View
|
import android.view.View
|
||||||
import android.view.ViewGroup
|
import android.view.ViewGroup
|
||||||
|
import android.widget.Toast
|
||||||
import androidx.fragment.app.Fragment
|
import androidx.fragment.app.Fragment
|
||||||
|
import androidx.lifecycle.lifecycleScope
|
||||||
import com.example.shiftalarm.databinding.FragmentSettingsLabBinding
|
import com.example.shiftalarm.databinding.FragmentSettingsLabBinding
|
||||||
|
import kotlinx.coroutines.launch
|
||||||
|
|
||||||
class FragmentSettingsLab : Fragment() {
|
class FragmentSettingsLab : Fragment() {
|
||||||
|
|
||||||
@@ -20,6 +23,56 @@ class FragmentSettingsLab : Fragment() {
|
|||||||
return binding.root
|
return binding.root
|
||||||
}
|
}
|
||||||
|
|
||||||
|
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
|
||||||
|
super.onViewCreated(view, savedInstanceState)
|
||||||
|
|
||||||
|
setupNumberPicker()
|
||||||
|
loadAnnualLeave()
|
||||||
|
setupSaveButton()
|
||||||
|
}
|
||||||
|
|
||||||
|
private fun setupNumberPicker() {
|
||||||
|
binding.npTotalDays.apply {
|
||||||
|
minValue = 1
|
||||||
|
maxValue = 25
|
||||||
|
wrapSelectorWheel = false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private fun loadAnnualLeave() {
|
||||||
|
lifecycleScope.launch {
|
||||||
|
val repo = ShiftRepository(requireContext())
|
||||||
|
|
||||||
|
val annualLeave = repo.getAnnualLeave()
|
||||||
|
annualLeave?.let {
|
||||||
|
binding.npTotalDays.value = it.totalDays.toInt()
|
||||||
|
binding.tvRemainingDays.text = String.format("%.1f", it.remainingDays)
|
||||||
|
} ?: run {
|
||||||
|
// Default: 15 days
|
||||||
|
binding.npTotalDays.value = 15
|
||||||
|
binding.tvRemainingDays.text = "15.0"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private fun setupSaveButton() {
|
||||||
|
binding.btnSaveAnnualLeave.setOnClickListener {
|
||||||
|
val totalDays = binding.npTotalDays.value.toFloat()
|
||||||
|
|
||||||
|
lifecycleScope.launch {
|
||||||
|
val repo = ShiftRepository(requireContext())
|
||||||
|
|
||||||
|
repo.recalculateAndSaveAnnualLeave(totalDays)
|
||||||
|
|
||||||
|
val updated = repo.getAnnualLeave()
|
||||||
|
updated?.let {
|
||||||
|
binding.tvRemainingDays.text = String.format("%.1f", it.remainingDays)
|
||||||
|
Toast.makeText(requireContext(), "연차가 저장되었습니다. (남은 연차: ${String.format("%.1f", it.remainingDays)}일)", Toast.LENGTH_SHORT).show()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
override fun onDestroyView() {
|
override fun onDestroyView() {
|
||||||
super.onDestroyView()
|
super.onDestroyView()
|
||||||
_binding = null
|
_binding = null
|
||||||
|
|||||||
@@ -1,6 +1,11 @@
|
|||||||
package com.example.shiftalarm
|
package com.example.shiftalarm
|
||||||
|
|
||||||
import androidx.room.*
|
import androidx.room.Dao
|
||||||
|
import androidx.room.Delete
|
||||||
|
import androidx.room.Insert
|
||||||
|
import androidx.room.OnConflictStrategy
|
||||||
|
import androidx.room.Query
|
||||||
|
import androidx.room.Update
|
||||||
|
|
||||||
@Dao
|
@Dao
|
||||||
interface ShiftDao {
|
interface ShiftDao {
|
||||||
@@ -57,4 +62,17 @@ interface ShiftDao {
|
|||||||
|
|
||||||
@Query("DELETE FROM custom_alarms")
|
@Query("DELETE FROM custom_alarms")
|
||||||
suspend fun clearCustomAlarms()
|
suspend fun clearCustomAlarms()
|
||||||
|
|
||||||
|
// Annual Leave Queries
|
||||||
|
@Query("SELECT * FROM annual_leave WHERE id = 1")
|
||||||
|
suspend fun getAnnualLeave(): AnnualLeave?
|
||||||
|
|
||||||
|
@Insert(onConflict = OnConflictStrategy.REPLACE)
|
||||||
|
suspend fun insertAnnualLeave(annualLeave: AnnualLeave)
|
||||||
|
|
||||||
|
@Query("UPDATE annual_leave SET remainingDays = :remainingDays, updatedAt = :timestamp WHERE id = 1")
|
||||||
|
suspend fun updateRemainingDays(remainingDays: Float, timestamp: Long = System.currentTimeMillis())
|
||||||
|
|
||||||
|
@Query("DELETE FROM annual_leave")
|
||||||
|
suspend fun clearAnnualLeave()
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -57,4 +57,47 @@ class ShiftRepository(private val context: Context) {
|
|||||||
suspend fun clearAllCustomAlarms() = withContext(Dispatchers.IO) {
|
suspend fun clearAllCustomAlarms() = withContext(Dispatchers.IO) {
|
||||||
dao.clearCustomAlarms()
|
dao.clearCustomAlarms()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Annual Leave
|
||||||
|
suspend fun calculateUsedAnnualLeave(): Float = withContext(Dispatchers.IO) {
|
||||||
|
val currentYear = java.time.Year.now().toString()
|
||||||
|
val overrides = dao.getAllOverrides()
|
||||||
|
|
||||||
|
var usedDays = 0f
|
||||||
|
|
||||||
|
for (override in overrides) {
|
||||||
|
if (override.date.startsWith(currentYear)) {
|
||||||
|
when (override.shift) {
|
||||||
|
"연차" -> usedDays += 1f
|
||||||
|
"반년" -> usedDays += 0.5f
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
usedDays
|
||||||
|
}
|
||||||
|
|
||||||
|
suspend fun getAnnualLeave(): AnnualLeave? = withContext(Dispatchers.IO) {
|
||||||
|
dao.getAnnualLeave()
|
||||||
|
}
|
||||||
|
|
||||||
|
suspend fun recalculateAndSaveAnnualLeave(totalDays: Float) {
|
||||||
|
val usedDays = calculateUsedAnnualLeave()
|
||||||
|
val remainingDays = totalDays - usedDays
|
||||||
|
|
||||||
|
dao.insertAnnualLeave(AnnualLeave(
|
||||||
|
id = 1,
|
||||||
|
totalDays = totalDays,
|
||||||
|
remainingDays = remainingDays
|
||||||
|
))
|
||||||
|
}
|
||||||
|
|
||||||
|
suspend fun updateRemainingAnnualLeave() {
|
||||||
|
val annualLeave = dao.getAnnualLeave()
|
||||||
|
annualLeave?.let {
|
||||||
|
val usedDays = calculateUsedAnnualLeave()
|
||||||
|
val remainingDays = it.totalDays - usedDays
|
||||||
|
dao.insertAnnualLeave(it.copy(remainingDays = remainingDays))
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
<shape android:shape="oval">
|
<shape android:shape="oval">
|
||||||
<stroke android:width="1.5dp" android:color="@color/shift_red"/>
|
<stroke android:width="1.5dp" android:color="@color/shift_red"/>
|
||||||
<solid android:color="@android:color/transparent"/>
|
<solid android:color="@android:color/transparent"/>
|
||||||
<size android:width="44dp" android:height="44dp"/>
|
<size android:width="52dp" android:height="52dp"/>
|
||||||
</shape>
|
</shape>
|
||||||
</item>
|
</item>
|
||||||
</layer-list>
|
</layer-list>
|
||||||
|
|||||||
@@ -2,5 +2,5 @@
|
|||||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
android:shape="oval">
|
android:shape="oval">
|
||||||
<solid android:color="@color/primary" />
|
<solid android:color="@color/primary" />
|
||||||
<size android:width="44dp" android:height="44dp" />
|
<size android:width="52dp" android:height="52dp" />
|
||||||
</shape>
|
</shape>
|
||||||
|
|||||||
@@ -2,5 +2,5 @@
|
|||||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
android:shape="oval">
|
android:shape="oval">
|
||||||
<stroke android:width="1.5dp" android:color="@color/primary" />
|
<stroke android:width="1.5dp" android:color="@color/primary" />
|
||||||
<size android:width="44dp" android:height="44dp" />
|
<size android:width="52dp" android:height="52dp" />
|
||||||
</shape>
|
</shape>
|
||||||
|
|||||||
@@ -1,12 +1,13 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
android:width="44dp"
|
android:width="52dp"
|
||||||
android:height="44dp"
|
android:height="52dp"
|
||||||
android:viewportWidth="44"
|
android:viewportWidth="52"
|
||||||
android:viewportHeight="44">
|
android:viewportHeight="52">
|
||||||
<!-- Left Half Red -->
|
<!-- Left Half Red -->
|
||||||
<path
|
<path
|
||||||
android:name="left_half"
|
android:name="left_half"
|
||||||
android:fillColor="@color/shift_red"
|
android:fillColor="@color/shift_red"
|
||||||
android:pathData="M22,0 A22,22 0 0 0 22,44 L22,0 Z" />
|
android:pathData="M26,0 A26,26 0 0 0 26,52 L26,0 Z" />
|
||||||
|
|
||||||
</vector>
|
</vector>
|
||||||
|
|||||||
@@ -58,12 +58,12 @@
|
|||||||
|
|
||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
|
|
||||||
<!-- Maximized Calendar Card -->
|
<!-- Maximized Calendar Card - Reduced margins for wider calendar -->
|
||||||
<androidx.cardview.widget.CardView
|
<androidx.cardview.widget.CardView
|
||||||
android:id="@+id/calendarCard"
|
android:id="@+id/calendarCard"
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_height="0dp"
|
android:layout_height="0dp"
|
||||||
android:layout_marginHorizontal="12dp"
|
android:layout_marginHorizontal="4dp"
|
||||||
android:layout_marginBottom="8dp"
|
android:layout_marginBottom="8dp"
|
||||||
app:cardCornerRadius="28dp"
|
app:cardCornerRadius="28dp"
|
||||||
app:cardElevation="0dp"
|
app:cardElevation="0dp"
|
||||||
@@ -160,7 +160,20 @@
|
|||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintTop_toTopOf="parent"
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
app:layout_constraintEnd_toStartOf="@id/btnTideLocation"/>
|
app:layout_constraintEnd_toStartOf="@id/tvAnnualLeave"/>
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tvAnnualLeave"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="연차: 0.0"
|
||||||
|
android:textSize="12sp"
|
||||||
|
android:textStyle="bold"
|
||||||
|
android:textColor="@color/primary"
|
||||||
|
android:layout_marginEnd="8dp"
|
||||||
|
app:layout_constraintEnd_toStartOf="@id/btnTideLocation"
|
||||||
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
|
app:layout_constraintBottom_toBottomOf="parent"/>
|
||||||
|
|
||||||
<androidx.appcompat.widget.AppCompatButton
|
<androidx.appcompat.widget.AppCompatButton
|
||||||
android:id="@+id/btnTideLocation"
|
android:id="@+id/btnTideLocation"
|
||||||
@@ -227,7 +240,7 @@
|
|||||||
android:id="@+id/otherTeamsCard"
|
android:id="@+id/otherTeamsCard"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginHorizontal="12dp"
|
android:layout_marginHorizontal="4dp"
|
||||||
android:layout_marginBottom="16dp"
|
android:layout_marginBottom="16dp"
|
||||||
app:cardCornerRadius="20dp"
|
app:cardCornerRadius="20dp"
|
||||||
app:cardElevation="0dp"
|
app:cardElevation="0dp"
|
||||||
@@ -261,5 +274,4 @@
|
|||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
</androidx.cardview.widget.CardView>
|
</androidx.cardview.widget.CardView>
|
||||||
|
|
||||||
|
|
||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
|
|||||||
@@ -5,32 +5,124 @@
|
|||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:orientation="vertical"
|
android:orientation="vertical"
|
||||||
android:padding="24dp"
|
android:padding="24dp"
|
||||||
android:gravity="center">
|
android:gravity="center_horizontal">
|
||||||
|
|
||||||
<ImageView
|
|
||||||
android:layout_width="80dp"
|
|
||||||
android:layout_height="80dp"
|
|
||||||
android:src="@drawable/ic_settings"
|
|
||||||
app:tint="@color/text_tertiary"
|
|
||||||
android:layout_marginBottom="16dp"
|
|
||||||
android:alpha="0.5"/>
|
|
||||||
|
|
||||||
|
<!-- Header Title -->
|
||||||
<TextView
|
<TextView
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:text="실험실 기능 준비 중"
|
android:text="나의 연차 설정"
|
||||||
android:textSize="18sp"
|
android:textSize="20sp"
|
||||||
android:textStyle="bold"
|
android:textStyle="bold"
|
||||||
android:textColor="@color/text_secondary"
|
android:textColor="@color/text_primary"
|
||||||
android:layout_marginBottom="8dp"/>
|
android:layout_marginBottom="32dp"/>
|
||||||
|
|
||||||
|
<!-- Total Annual Leave Setting -->
|
||||||
|
<androidx.cardview.widget.CardView
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginBottom="24dp"
|
||||||
|
app:cardCornerRadius="16dp"
|
||||||
|
app:cardElevation="4dp"
|
||||||
|
app:cardBackgroundColor="@color/surface">
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:orientation="vertical"
|
||||||
|
android:padding="24dp"
|
||||||
|
android:gravity="center">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="총 연차"
|
||||||
|
android:textSize="16sp"
|
||||||
|
android:textColor="@color/text_secondary"
|
||||||
|
android:layout_marginBottom="16dp"/>
|
||||||
|
|
||||||
|
<!-- NumberPicker for Total Days -->
|
||||||
|
<NumberPicker
|
||||||
|
android:id="@+id/npTotalDays"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginBottom="8dp"/>
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="일"
|
||||||
|
android:textSize="14sp"
|
||||||
|
android:textColor="@color/text_tertiary"/>
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
</androidx.cardview.widget.CardView>
|
||||||
|
|
||||||
|
<!-- Remaining Annual Leave Display -->
|
||||||
|
<androidx.cardview.widget.CardView
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginBottom="32dp"
|
||||||
|
app:cardCornerRadius="16dp"
|
||||||
|
app:cardElevation="4dp"
|
||||||
|
app:cardBackgroundColor="@color/surface">
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:orientation="vertical"
|
||||||
|
android:padding="24dp"
|
||||||
|
android:gravity="center">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="남은 연차"
|
||||||
|
android:textSize="16sp"
|
||||||
|
android:textColor="@color/text_secondary"
|
||||||
|
android:layout_marginBottom="8dp"/>
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tvRemainingDays"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="0.0"
|
||||||
|
android:textSize="36sp"
|
||||||
|
android:textStyle="bold"
|
||||||
|
android:textColor="@color/primary"
|
||||||
|
android:layout_marginBottom="4dp"/>
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="일"
|
||||||
|
android:textSize="14sp"
|
||||||
|
android:textColor="@color/text_tertiary"/>
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
</androidx.cardview.widget.CardView>
|
||||||
|
|
||||||
|
<!-- Calculation Info -->
|
||||||
<TextView
|
<TextView
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:text="더욱 편리한 기능을 개발하고 있습니다.\n다음 업데이트를 기대해 주세요!"
|
android:text="※ 연차: -1일 차감 / 반년: -0.5일 차감"
|
||||||
android:textSize="14sp"
|
android:textSize="13sp"
|
||||||
android:textColor="@color/text_tertiary"
|
android:textColor="@color/text_tertiary"
|
||||||
android:gravity="center"
|
android:layout_marginBottom="24dp"
|
||||||
android:lineSpacingExtra="4dp"/>
|
android:gravity="center"/>
|
||||||
|
|
||||||
|
<!-- Save Button -->
|
||||||
|
<com.google.android.material.button.MaterialButton
|
||||||
|
android:id="@+id/btnSaveAnnualLeave"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="56dp"
|
||||||
|
android:text="저장"
|
||||||
|
android:textSize="16sp"
|
||||||
|
android:textStyle="bold"
|
||||||
|
app:cornerRadius="12dp"
|
||||||
|
android:backgroundTint="@color/primary"/>
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
xmlns:tools="http://schemas.android.com/tools"
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
android:id="@+id/dayRoot"
|
android:id="@+id/dayRoot"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="92dp"
|
android:layout_height="108dp"
|
||||||
android:background="@drawable/bg_grid_cell_v4">
|
android:background="@drawable/bg_grid_cell_v4">
|
||||||
|
|
||||||
<!-- Day Number (top-left) -->
|
<!-- Day Number (top-left) -->
|
||||||
@@ -16,7 +16,7 @@
|
|||||||
android:layout_marginTop="4dp"
|
android:layout_marginTop="4dp"
|
||||||
android:text="12"
|
android:text="12"
|
||||||
android:textColor="@color/text_primary"
|
android:textColor="@color/text_primary"
|
||||||
android:textSize="14sp"
|
android:textSize="15sp"
|
||||||
android:textStyle="bold"
|
android:textStyle="bold"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintTop_toTopOf="parent" />
|
app:layout_constraintTop_toTopOf="parent" />
|
||||||
@@ -35,21 +35,21 @@
|
|||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintTop_toTopOf="parent" />
|
app:layout_constraintTop_toTopOf="parent" />
|
||||||
|
|
||||||
<!-- Shift Abbreviation Circular Indicator (Center) -->
|
<!-- Shift Abbreviation Circular Indicator (Center) - Larger size -->
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/shiftChar"
|
android:id="@+id/shiftChar"
|
||||||
android:layout_width="40dp"
|
android:layout_width="48dp"
|
||||||
android:layout_height="40dp"
|
android:layout_height="48dp"
|
||||||
android:gravity="center"
|
android:gravity="center"
|
||||||
android:text="주"
|
android:text="주"
|
||||||
android:textSize="15sp"
|
android:textSize="17sp"
|
||||||
android:textStyle="bold"
|
android:textStyle="bold"
|
||||||
android:textColor="@color/text_primary"
|
android:textColor="@color/text_primary"
|
||||||
app:layout_constraintTop_toTopOf="parent"
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintVertical_bias="0.45"/>
|
app:layout_constraintVertical_bias="0.42"/>
|
||||||
|
|
||||||
<!-- Memo Content Text (Below Shift) - Replacing icon logic for visibility -->
|
<!-- Memo Content Text (Below Shift) - Replacing icon logic for visibility -->
|
||||||
<TextView
|
<TextView
|
||||||
|
|||||||
@@ -1,3 +1,28 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<resources>
|
<resources>
|
||||||
<string name="app_name">shiftring</string>
|
<string name="app_name">Shift Alarm</string>
|
||||||
|
<string name="team_selection">Team selection</string>
|
||||||
|
<string name="current_shift">Current shift: %1$s</string>
|
||||||
|
<string name="next_shift">Next shift: %1$s</string>
|
||||||
|
<string name="alarm_status">Alarm Status</string>
|
||||||
|
<string name="company_selection">Company selection</string>
|
||||||
|
<string name="tab_basic">Basic Settings</string>
|
||||||
|
<string name="tab_alarm">Alarm Settings</string>
|
||||||
|
<string name="tab_additional">Extras</string>
|
||||||
|
<string name="tab_lab">Leave Management</string>
|
||||||
|
<string-array name="factory_array">
|
||||||
|
<item>Jeonju</item>
|
||||||
|
<item>Nonsan</item>
|
||||||
|
</string-array>
|
||||||
|
<string-array name="team_array">
|
||||||
|
<item>A Team</item>
|
||||||
|
<item>B Team</item>
|
||||||
|
<item>C Team</item>
|
||||||
|
<item>D Team</item>
|
||||||
|
</string-array>
|
||||||
|
<string-array name="theme_array">
|
||||||
|
<item>System Settings</item>
|
||||||
|
<item>Light</item>
|
||||||
|
<item>Dark</item>
|
||||||
|
</string-array>
|
||||||
</resources>
|
</resources>
|
||||||
|
|||||||
@@ -9,7 +9,7 @@
|
|||||||
<string name="tab_basic">기본 설정</string>
|
<string name="tab_basic">기본 설정</string>
|
||||||
<string name="tab_alarm">알람 설정</string>
|
<string name="tab_alarm">알람 설정</string>
|
||||||
<string name="tab_additional">부가기능</string>
|
<string name="tab_additional">부가기능</string>
|
||||||
<string name="tab_lab">실험실</string>
|
<string name="tab_lab">휴가 관리</string>
|
||||||
|
|
||||||
<string-array name="factory_array">
|
<string-array name="factory_array">
|
||||||
<item>전주</item>
|
<item>전주</item>
|
||||||
|
|||||||
14
version.json
14
version.json
@@ -1,7 +1,13 @@
|
|||||||
{
|
{
|
||||||
"versionCode": 1125,
|
"versionCode": 1140,
|
||||||
"versionName": "1.2.5",
|
"versionName": "1.4.0",
|
||||||
"apkUrl": "https://git.webpluss.net/sanjeok77/ShiftRing/releases/download/v1.2.5/app.apk",
|
"apkUrl": "https://git.webpluss.net/sanjeok77/ShiftRing/releases/download/v1.4.0/app.apk",
|
||||||
"changelog": "v1.2.5: 알람 시스템 단순화 - 삭제된 알람 버그 수정",
|
"changelog": "v1.4.0: 휴가 관리 기능 추가 (연차/반년 설정 및 자동 계산), 달력 UI 개선 (넓은 화면, 큰 근무 표시)",
|
||||||
|
"forceUpdate": false
|
||||||
|
}
|
||||||
|
"versionCode": 1130,
|
||||||
|
"versionName": "1.3.0",
|
||||||
|
"apkUrl": "https://git.webpluss.net/sanjeok77/ShiftRing/releases/download/v1.3.0/app.apk",
|
||||||
|
"changelog": "v1.3.0: versionCode 기반 업데이트 체크 개선",
|
||||||
"forceUpdate": false
|
"forceUpdate": false
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user