feat: implement meal notification system

Add necessary permissions, services, and receivers to support scheduled meal notifications and boot completion handling. Also includes dependency updates and minor test fixes.
This commit is contained in:
bleackstorm committed 2026-11-08 16:57:11 +01:00
1 parent f13d46f778
commit fe69d7621a
31 files changed
+2972 -350

No files matched your search

@@ -31,6 +31,8 @@ import androidx.compose.material.icons.filled.Edit
import androidx.compose.material.icons.filled.FileDownload
import androidx.compose.material.icons.filled.MoreVert
import androidx.compose.material.icons.filled.Restaurant
import androidx.compose.material.icons.filled.TableChart
import androidx.compose.ui.graphics.Color
import androidx.compose.material3.AlertDialog
import androidx.compose.material3.Card
import androidx.compose.material3.CardDefaults
@@ -73,7 +75,9 @@ fun JournalScreen(
onAddMealClick: () -> Unit,
onEditMeal: (MealEntry) -> Unit,
onDeleteMeal: (String) -> Unit,
onExportCsvClick: (List<MealEntry>) -> Unit
onExportCsvClick: (List<MealEntry>) -> Unit,
onSyncSheetsClick: (() -> Unit)? = null,
spreadsheetUrl: String? = null
) {
Box(
modifier = Modifier
@@ -157,22 +161,44 @@ fun JournalScreen(
fontWeight = FontWeight.Bold
)
TextButton(
onClick = { onExportCsvClick(meals) },
modifier = Modifier.testTag("journal_export_csv_button")
) {
Icon(
imageVector = Icons.Default.FileDownload,
contentDescription = "Exporter en CSV",
modifier = Modifier.size(18.dp),
tint = MaterialTheme.colorScheme.primary
)
Spacer(modifier = Modifier.width(6.dp))
Text(
text = "Export CSV",
style = MaterialTheme.typography.labelLarge,
color = MaterialTheme.colorScheme.primary
)
Row(verticalAlignment = Alignment.CenterVertically) {
if (onSyncSheetsClick != null) {
TextButton(
onClick = onSyncSheetsClick,
modifier = Modifier.testTag("journal_sync_sheets_button")
) {
Icon(
imageVector = Icons.Default.TableChart,
contentDescription = "Synchroniser vers Google Sheets",
modifier = Modifier.size(18.dp),
tint = Color(0xFF0F9D58)
)
Spacer(modifier = Modifier.width(4.dp))
Text(
text = "Sheets",
style = MaterialTheme.typography.labelLarge,
color = Color(0xFF0F9D58)
)
}
}
TextButton(
onClick = { onExportCsvClick(meals) },
modifier = Modifier.testTag("journal_export_csv_button")
) {
Icon(
imageVector = Icons.Default.FileDownload,
contentDescription = "Exporter en CSV",
modifier = Modifier.size(18.dp),
tint = MaterialTheme.colorScheme.primary
)
Spacer(modifier = Modifier.width(4.dp))
Text(
text = "CSV",
style = MaterialTheme.typography.labelLarge,
color = MaterialTheme.colorScheme.primary
)
}
}
}
}