refactor: rebrand project assets and UI theme from Cargill-specific to generic naming

This commit is contained in:
Jhony Cesar
2026-07-29 10:17:14 -04:00
parent 6cdbc0af03
commit 05d93b0574
23 changed files with 192 additions and 194 deletions

View File

@@ -14,7 +14,7 @@ android {
compileSdk { version = release(36) { minorApiLevel = 1 } } compileSdk { version = release(36) { minorApiLevel = 1 } }
defaultConfig { defaultConfig {
applicationId = "com.aistudio.cargillparadaos.xvyzwt" applicationId = "com.aistudio.paradaos.xvyzwt"
minSdk = 24 minSdk = 24
targetSdk = 36 targetSdk = 36
versionCode = 1 versionCode = 1

View File

@@ -9,7 +9,7 @@
"client_info": { "client_info": {
"mobilesdk_app_id": "1:461441632355:android:8ea9121be8cf81b4ee5056", "mobilesdk_app_id": "1:461441632355:android:8ea9121be8cf81b4ee5056",
"android_client_info": { "android_client_info": {
"package_name": "com.aistudio.cargillparadaos.xvyzwt" "package_name": "com.aistudio.paradaos.xvyzwt"
} }
}, },
"oauth_client": [ "oauth_client": [
@@ -17,7 +17,7 @@
"client_id": "461441632355-rg9go0tcsr8ora2la83aat9pcekqo13p.apps.googleusercontent.com", "client_id": "461441632355-rg9go0tcsr8ora2la83aat9pcekqo13p.apps.googleusercontent.com",
"client_type": 1, "client_type": 1,
"android_info": { "android_info": {
"package_name": "com.aistudio.cargillparadaos.xvyzwt", "package_name": "com.aistudio.paradaos.xvyzwt",
"certificate_hash": "6274d8aa0709c0454af47340ae8f223b8a0fbd61" "certificate_hash": "6274d8aa0709c0454af47340ae8f223b8a0fbd61"
} }
}, },

View File

@@ -27,8 +27,8 @@ import com.example.data.repository.MaintenanceRepository
import com.example.ui.screens.AnalyticsScreen import com.example.ui.screens.AnalyticsScreen
import com.example.ui.screens.MaintenanceDashboardScreen import com.example.ui.screens.MaintenanceDashboardScreen
import com.example.ui.screens.SettingsScreen import com.example.ui.screens.SettingsScreen
import com.example.ui.theme.CargillGreen import com.example.ui.theme.BrandGreen
import com.example.ui.theme.CargillLightGreen import com.example.ui.theme.BrandLightGreen
import com.example.ui.theme.MyApplicationTheme import com.example.ui.theme.MyApplicationTheme
import com.example.ui.viewmodel.MaintenanceViewModel import com.example.ui.viewmodel.MaintenanceViewModel
import com.example.ui.viewmodel.MaintenanceViewModelFactory import com.example.ui.viewmodel.MaintenanceViewModelFactory
@@ -72,11 +72,11 @@ class MainActivity : ComponentActivity() {
icon = { Icon(Icons.Default.Dashboard, contentDescription = "Dashboard") }, icon = { Icon(Icons.Default.Dashboard, contentDescription = "Dashboard") },
label = { Text("Dashboard", fontSize = 11.sp) }, label = { Text("Dashboard", fontSize = 11.sp) },
colors = NavigationBarItemDefaults.colors( colors = NavigationBarItemDefaults.colors(
selectedIconColor = CargillGreen, selectedIconColor = BrandGreen,
selectedTextColor = CargillGreen, selectedTextColor = BrandGreen,
unselectedIconColor = Color.Gray, unselectedIconColor = Color.Gray,
unselectedTextColor = Color.Gray, unselectedTextColor = Color.Gray,
indicatorColor = CargillLightGreen indicatorColor = BrandLightGreen
) )
) )
@@ -95,11 +95,11 @@ class MainActivity : ComponentActivity() {
icon = { Icon(Icons.Default.Assignment, contentDescription = "Ordens") }, icon = { Icon(Icons.Default.Assignment, contentDescription = "Ordens") },
label = { Text("Ordens", fontSize = 11.sp) }, label = { Text("Ordens", fontSize = 11.sp) },
colors = NavigationBarItemDefaults.colors( colors = NavigationBarItemDefaults.colors(
selectedIconColor = CargillGreen, selectedIconColor = BrandGreen,
selectedTextColor = CargillGreen, selectedTextColor = BrandGreen,
unselectedIconColor = Color.Gray, unselectedIconColor = Color.Gray,
unselectedTextColor = Color.Gray, unselectedTextColor = Color.Gray,
indicatorColor = CargillLightGreen indicatorColor = BrandLightGreen
) )
) )
@@ -118,11 +118,11 @@ class MainActivity : ComponentActivity() {
icon = { Icon(Icons.Default.Settings, contentDescription = "Configurações") }, icon = { Icon(Icons.Default.Settings, contentDescription = "Configurações") },
label = { Text("Configurações", fontSize = 11.sp) }, label = { Text("Configurações", fontSize = 11.sp) },
colors = NavigationBarItemDefaults.colors( colors = NavigationBarItemDefaults.colors(
selectedIconColor = CargillGreen, selectedIconColor = BrandGreen,
selectedTextColor = CargillGreen, selectedTextColor = BrandGreen,
unselectedIconColor = Color.Gray, unselectedIconColor = Color.Gray,
unselectedTextColor = Color.Gray, unselectedTextColor = Color.Gray,
indicatorColor = CargillLightGreen indicatorColor = BrandLightGreen
) )
) )
} }

View File

@@ -26,7 +26,7 @@ abstract class AppDatabase : RoomDatabase() {
val instance = Room.databaseBuilder( val instance = Room.databaseBuilder(
context.applicationContext, context.applicationContext,
AppDatabase::class.java, AppDatabase::class.java,
"cargill_maintenance_db" "maintenance_db"
) )
.fallbackToDestructiveMigration() .fallbackToDestructiveMigration()
.build() .build()

View File

@@ -389,7 +389,7 @@ class MaintenanceRepository(
suspend fun exportDatabaseBackup(context: Context, outputUri: Uri): Result<Unit> = withContext(Dispatchers.IO) { suspend fun exportDatabaseBackup(context: Context, outputUri: Uri): Result<Unit> = withContext(Dispatchers.IO) {
runCatching { runCatching {
val dbFile = context.getDatabasePath("cargill_maintenance_db") val dbFile = context.getDatabasePath("maintenance_db")
if (!dbFile.exists()) { if (!dbFile.exists()) {
throw java.io.IOException("Banco de dados não encontrado localmente.") throw java.io.IOException("Banco de dados não encontrado localmente.")
} }

View File

@@ -19,13 +19,11 @@ import androidx.compose.ui.text.font.FontStyle
import androidx.compose.ui.text.font.FontWeight import androidx.compose.ui.text.font.FontWeight
import androidx.compose.ui.unit.dp import androidx.compose.ui.unit.dp
import androidx.compose.ui.unit.sp import androidx.compose.ui.unit.sp
import com.example.ui.theme.BrandBlack
// Official Cargill Colors for Theme Integration import com.example.ui.theme.BrandGreen
val CargillGreen = Color(0xFF005F40) // Beautiful forest/leaf green
val CargillBlack = Color(0xFF1A1A1A) // High contrast premium charcoal-black
@Composable @Composable
fun CargillLogo( fun AppLogo(
modifier: Modifier = Modifier, modifier: Modifier = Modifier,
showText: Boolean = true, showText: Boolean = true,
lightMode: Boolean = true lightMode: Boolean = true
@@ -35,7 +33,7 @@ fun CargillLogo(
horizontalArrangement = Arrangement.Start, horizontalArrangement = Arrangement.Start,
verticalAlignment = Alignment.CenterVertically verticalAlignment = Alignment.CenterVertically
) { ) {
// Draw the iconic curved leaf logo using Compose Canvas // Draw the curved leaf logo using Compose Canvas
Canvas( Canvas(
modifier = Modifier modifier = Modifier
.width(52.dp) .width(52.dp)
@@ -45,7 +43,6 @@ fun CargillLogo(
val w = size.width val w = size.width
val h = size.height val h = size.height
// High precision path modeling Cargill's leaf swoosh
val path = Path().apply { val path = Path().apply {
// Outer arch // Outer arch
moveTo(w * 0.05f, h * 0.85f) moveTo(w * 0.05f, h * 0.85f)
@@ -54,10 +51,10 @@ fun CargillLogo(
w * 0.80f, h * 0.05f, // Control 2 w * 0.80f, h * 0.05f, // Control 2
w * 0.95f, h * 0.85f // End w * 0.95f, h * 0.85f // End
) )
// Bottom inner curve to create a leaf shape thickness // Bottom inner curve
cubicTo( cubicTo(
w * 0.75f, h * 0.35f, // Control 1 (tighter) w * 0.75f, h * 0.35f, // Control 1
w * 0.25f, h * 0.35f, // Control 2 (tighter) w * 0.25f, h * 0.35f, // Control 2
w * 0.05f, h * 0.85f // Back to start w * 0.05f, h * 0.85f // Back to start
) )
close() close()
@@ -65,18 +62,18 @@ fun CargillLogo(
drawPath( drawPath(
path = path, path = path,
color = CargillGreen, color = BrandGreen,
style = Fill style = Fill
) )
} }
if (showText) { if (showText) {
Text( Text(
text = "Cargill", text = "Parada OS",
color = if (lightMode) CargillBlack else Color.White, color = if (lightMode) BrandBlack else Color.White,
fontSize = 24.sp, fontSize = 22.sp,
fontFamily = FontFamily.SansSerif, fontFamily = FontFamily.SansSerif,
fontWeight = FontWeight.Black, fontWeight = FontWeight.Bold,
fontStyle = FontStyle.Italic, fontStyle = FontStyle.Italic,
modifier = Modifier.padding(start = 4.dp, bottom = 2.dp) modifier = Modifier.padding(start = 4.dp, bottom = 2.dp)
) )

View File

@@ -31,8 +31,8 @@ import com.example.data.model.MaintenanceActivity
import com.example.data.model.OSUpdateHistory import com.example.data.model.OSUpdateHistory
import com.example.data.model.parseDateOnly import com.example.data.model.parseDateOnly
import com.example.data.model.AnalyticsState import com.example.data.model.AnalyticsState
import com.example.ui.theme.CargillBlack import com.example.ui.theme.BrandBlack
import com.example.ui.theme.CargillGreen import com.example.ui.theme.BrandGreen
import com.example.ui.theme.LightGrey import com.example.ui.theme.LightGrey
import com.example.ui.viewmodel.MaintenanceViewModel import com.example.ui.viewmodel.MaintenanceViewModel
import java.text.SimpleDateFormat import java.text.SimpleDateFormat
@@ -58,7 +58,7 @@ fun AnalyticsScreen(
text = "Métricas Analíticas Avançadas", text = "Métricas Analíticas Avançadas",
fontSize = 18.sp, fontSize = 18.sp,
fontWeight = FontWeight.Bold, fontWeight = FontWeight.Bold,
color = CargillBlack color = BrandBlack
) )
}, },
navigationIcon = { navigationIcon = {
@@ -71,12 +71,12 @@ fun AnalyticsScreen(
Icon( Icon(
imageVector = Icons.AutoMirrored.Filled.ArrowBack, imageVector = Icons.AutoMirrored.Filled.ArrowBack,
contentDescription = "Voltar", contentDescription = "Voltar",
tint = CargillGreen tint = BrandGreen
) )
Spacer(modifier = Modifier.width(4.dp)) Spacer(modifier = Modifier.width(4.dp))
Text( Text(
text = "Voltar", text = "Voltar",
color = CargillGreen, color = BrandGreen,
fontSize = 16.sp, fontSize = 16.sp,
fontWeight = FontWeight.Medium fontWeight = FontWeight.Medium
) )
@@ -148,7 +148,7 @@ fun TeamProductivityCard(teamMetrics: List<Pair<String, Int>>) {
text = "Produtividade da Equipe", text = "Produtividade da Equipe",
fontSize = 16.sp, fontSize = 16.sp,
fontWeight = FontWeight.Bold, fontWeight = FontWeight.Bold,
color = CargillBlack, color = BrandBlack,
modifier = Modifier.padding(bottom = 16.dp) modifier = Modifier.padding(bottom = 16.dp)
) )
@@ -177,7 +177,7 @@ fun TeamProductivityCard(teamMetrics: List<Pair<String, Int>>) {
text = "$percentage%", text = "$percentage%",
fontSize = 12.sp, fontSize = 12.sp,
fontWeight = FontWeight.Bold, fontWeight = FontWeight.Bold,
color = CargillBlack color = BrandBlack
) )
Spacer(modifier = Modifier.height(4.dp)) Spacer(modifier = Modifier.height(4.dp))
Box( Box(
@@ -222,7 +222,7 @@ fun SCurveCard(analyticsState: AnalyticsState) {
text = "Progresso do Projeto: Planejado vs. Realizado", text = "Progresso do Projeto: Planejado vs. Realizado",
fontSize = 16.sp, fontSize = 16.sp,
fontWeight = FontWeight.Bold, fontWeight = FontWeight.Bold,
color = CargillBlack, color = BrandBlack,
textAlign = TextAlign.Center, textAlign = TextAlign.Center,
modifier = Modifier modifier = Modifier
.fillMaxWidth() .fillMaxWidth()
@@ -381,7 +381,7 @@ fun OverdueByTagCard(overdueByTag: List<Pair<String, Int>>) {
text = "Atrasados por TAG", text = "Atrasados por TAG",
fontSize = 16.sp, fontSize = 16.sp,
fontWeight = FontWeight.Bold, fontWeight = FontWeight.Bold,
color = CargillBlack, color = BrandBlack,
textAlign = TextAlign.Center, textAlign = TextAlign.Center,
modifier = Modifier modifier = Modifier
.fillMaxWidth() .fillMaxWidth()
@@ -428,7 +428,7 @@ fun OverdueByTagCard(overdueByTag: List<Pair<String, Int>>) {
text = tag, text = tag,
fontSize = 12.sp, fontSize = 12.sp,
fontWeight = FontWeight.Bold, fontWeight = FontWeight.Bold,
color = CargillBlack, color = BrandBlack,
modifier = Modifier.width(90.dp), modifier = Modifier.width(90.dp),
maxLines = 1 maxLines = 1
) )
@@ -455,7 +455,7 @@ fun OverdueByTagCard(overdueByTag: List<Pair<String, Int>>) {
text = count.toString(), text = count.toString(),
fontSize = 12.sp, fontSize = 12.sp,
fontWeight = FontWeight.Bold, fontWeight = FontWeight.Bold,
color = CargillBlack, color = BrandBlack,
modifier = Modifier.width(20.dp), modifier = Modifier.width(20.dp),
textAlign = TextAlign.End textAlign = TextAlign.End
) )

View File

@@ -17,8 +17,8 @@ import androidx.compose.ui.text.font.FontWeight
import androidx.compose.ui.text.style.TextAlign import androidx.compose.ui.text.style.TextAlign
import androidx.compose.ui.unit.dp import androidx.compose.ui.unit.dp
import androidx.compose.ui.unit.sp import androidx.compose.ui.unit.sp
import com.example.ui.theme.CargillBlack import com.example.ui.theme.BrandBlack
import com.example.ui.theme.CargillGreen import com.example.ui.theme.BrandGreen
import com.example.ui.theme.LightGrey import com.example.ui.theme.LightGrey
@Composable @Composable
@@ -49,7 +49,7 @@ fun DashboardStubScreen(
Icon( Icon(
imageVector = Icons.Default.BarChart, imageVector = Icons.Default.BarChart,
contentDescription = "Analytics Icon", contentDescription = "Analytics Icon",
tint = CargillGreen, tint = BrandGreen,
modifier = Modifier.size(72.dp) modifier = Modifier.size(72.dp)
) )
@@ -59,7 +59,7 @@ fun DashboardStubScreen(
text = "Dashboard Analítico", text = "Dashboard Analítico",
fontSize = 22.sp, fontSize = 22.sp,
fontWeight = FontWeight.Bold, fontWeight = FontWeight.Bold,
color = CargillBlack, color = BrandBlack,
textAlign = TextAlign.Center textAlign = TextAlign.Center
) )
@@ -82,7 +82,7 @@ fun DashboardStubScreen(
) { ) {
Text( Text(
text = "Recurso Planejado - Em Breve", text = "Recurso Planejado - Em Breve",
color = CargillGreen, color = BrandGreen,
fontSize = 12.sp, fontSize = 12.sp,
fontWeight = FontWeight.Bold fontWeight = FontWeight.Bold
) )

View File

@@ -54,9 +54,9 @@ import com.example.data.model.OSUpdateHistory
import com.example.data.model.extractDateOnly import com.example.data.model.extractDateOnly
import com.example.data.model.formatToShortDate import com.example.data.model.formatToShortDate
import com.example.data.model.parseDateOnly import com.example.data.model.parseDateOnly
import com.example.ui.components.CargillBlack import com.example.ui.theme.BrandBlack
import com.example.ui.components.CargillGreen import com.example.ui.theme.BrandGreen
import com.example.ui.components.CargillLogo import com.example.ui.components.AppLogo
import com.example.ui.viewmodel.MaintenanceViewModel import com.example.ui.viewmodel.MaintenanceViewModel
import java.text.SimpleDateFormat import java.text.SimpleDateFormat
import java.util.Date import java.util.Date
@@ -236,7 +236,7 @@ fun MaintenanceDashboardScreen(
text = "Gestão OS", text = "Gestão OS",
style = MaterialTheme.typography.titleLarge.copy( style = MaterialTheme.typography.titleLarge.copy(
fontWeight = FontWeight.Bold, fontWeight = FontWeight.Bold,
color = CargillBlack color = BrandBlack
) )
) )
}, },
@@ -253,7 +253,7 @@ fun MaintenanceDashboardScreen(
Icon( Icon(
imageVector = if (internetAvailable) Icons.Default.Cloud else Icons.Default.CloudOff, imageVector = if (internetAvailable) Icons.Default.Cloud else Icons.Default.CloudOff,
contentDescription = "Online Atualizado", contentDescription = "Online Atualizado",
tint = if (internetAvailable) CargillGreen else StatusGrey, tint = if (internetAvailable) BrandGreen else StatusGrey,
modifier = Modifier.size(18.dp) modifier = Modifier.size(18.dp)
) )
} }
@@ -277,7 +277,7 @@ fun MaintenanceDashboardScreen(
Icon( Icon(
imageVector = Icons.Default.Sync, imageVector = Icons.Default.Sync,
contentDescription = "Sincronizar dados", contentDescription = "Sincronizar dados",
tint = CargillGreen, tint = BrandGreen,
modifier = Modifier.rotate(if (isSyncing) angle else 0f) modifier = Modifier.rotate(if (isSyncing) angle else 0f)
) )
} }
@@ -325,7 +325,7 @@ fun MaintenanceDashboardScreen(
modifier = Modifier modifier = Modifier
.size(24.dp) .size(24.dp)
.clip(CircleShape) .clip(CircleShape)
.background(CargillGreen), .background(BrandGreen),
contentAlignment = Alignment.Center contentAlignment = Alignment.Center
) { ) {
Text( Text(
@@ -341,7 +341,7 @@ fun MaintenanceDashboardScreen(
text = currentUser!!.displayName.substringBefore(" "), text = currentUser!!.displayName.substringBefore(" "),
fontSize = 10.sp, fontSize = 10.sp,
fontWeight = FontWeight.Bold, fontWeight = FontWeight.Bold,
color = CargillBlack color = BrandBlack
) )
Text( Text(
text = currentUser!!.email, text = currentUser!!.email,
@@ -353,7 +353,7 @@ fun MaintenanceDashboardScreen(
Icon( Icon(
imageVector = Icons.Default.ArrowDropDown, imageVector = Icons.Default.ArrowDropDown,
contentDescription = "Menu de Usuário", contentDescription = "Menu de Usuário",
tint = CargillBlack, tint = BrandBlack,
modifier = Modifier.size(16.dp) modifier = Modifier.size(16.dp)
) )
} }
@@ -436,13 +436,13 @@ fun MaintenanceDashboardScreen(
modifier = Modifier modifier = Modifier
.size(52.dp) .size(52.dp)
.clip(RoundedCornerShape(12.dp)) .clip(RoundedCornerShape(12.dp))
.background(if (showAdvancedFilters) CargillGreen else Color.White) .background(if (showAdvancedFilters) BrandGreen else Color.White)
.testTag("toggle_filters_button") .testTag("toggle_filters_button")
) { ) {
Icon( Icon(
imageVector = Icons.Default.Tune, imageVector = Icons.Default.Tune,
contentDescription = "Filtros avançados", contentDescription = "Filtros avançados",
tint = if (showAdvancedFilters) Color.White else CargillBlack tint = if (showAdvancedFilters) Color.White else BrandBlack
) )
} }
} }
@@ -498,7 +498,7 @@ fun MaintenanceDashboardScreen(
text = "Ordens de Serviço (${activities.size})", text = "Ordens de Serviço (${activities.size})",
fontSize = 15.sp, fontSize = 15.sp,
fontWeight = FontWeight.Bold, fontWeight = FontWeight.Bold,
color = CargillBlack color = BrandBlack
) )
IconButton( IconButton(
onClick = { isListExpanded = !isListExpanded }, onClick = { isListExpanded = !isListExpanded },
@@ -507,7 +507,7 @@ fun MaintenanceDashboardScreen(
Icon( Icon(
imageVector = if (isListExpanded) Icons.Default.FullscreenExit else Icons.Default.Fullscreen, imageVector = if (isListExpanded) Icons.Default.FullscreenExit else Icons.Default.Fullscreen,
contentDescription = if (isListExpanded) "Recolher visualização" else "Expandir listagem", contentDescription = if (isListExpanded) "Recolher visualização" else "Expandir listagem",
tint = CargillGreen, tint = BrandGreen,
modifier = Modifier.size(20.dp) modifier = Modifier.size(20.dp)
) )
} }
@@ -557,7 +557,7 @@ fun MaintenanceDashboardScreen(
viewModel.setFilterRecurso("Todos") viewModel.setFilterRecurso("Todos")
viewModel.setSearchQuery("") viewModel.setSearchQuery("")
}, },
colors = ButtonDefaults.buttonColors(containerColor = CargillBlack) colors = ButtonDefaults.buttonColors(containerColor = BrandBlack)
) { ) {
Text("Limpar Todos os Filtros") Text("Limpar Todos os Filtros")
} }
@@ -665,7 +665,7 @@ fun DashboardMetrics(activities: List<MaintenanceActivity>) {
text = "Visão Geral de Campo", text = "Visão Geral de Campo",
fontSize = 18.sp, fontSize = 18.sp,
fontWeight = FontWeight.Black, fontWeight = FontWeight.Black,
color = CargillBlack color = BrandBlack
) )
} }
@@ -677,7 +677,7 @@ fun DashboardMetrics(activities: List<MaintenanceActivity>) {
CircularProgressIndicator( CircularProgressIndicator(
progress = { avgProgress.toFloat() / 100f }, progress = { avgProgress.toFloat() / 100f },
modifier = Modifier.fillMaxSize(), modifier = Modifier.fillMaxSize(),
color = CargillGreen, color = BrandGreen,
strokeWidth = 6.dp, strokeWidth = 6.dp,
trackColor = Color(0xFFE8F5E9) trackColor = Color(0xFFE8F5E9)
) )
@@ -685,7 +685,7 @@ fun DashboardMetrics(activities: List<MaintenanceActivity>) {
text = "$avgProgress%", text = "$avgProgress%",
fontSize = 12.sp, fontSize = 12.sp,
fontWeight = FontWeight.Black, fontWeight = FontWeight.Black,
color = CargillGreen color = BrandGreen
) )
} }
} }
@@ -701,8 +701,8 @@ fun DashboardMetrics(activities: List<MaintenanceActivity>) {
) { ) {
MetricColumn(value = "$notStartedCount", label = "Não Inic.", color = StatusGrey, icon = Icons.Default.PlayArrow) MetricColumn(value = "$notStartedCount", label = "Não Inic.", color = StatusGrey, icon = Icons.Default.PlayArrow)
MetricColumn(value = "$inProgressCount", label = "Em Andam.", color = StatusBlue, icon = Icons.Default.Speed) MetricColumn(value = "$inProgressCount", label = "Em Andam.", color = StatusBlue, icon = Icons.Default.Speed)
MetricColumn(value = "$completedCount", label = "Concluídas", color = CargillGreen, icon = Icons.Default.CheckCircle) MetricColumn(value = "$completedCount", label = "Concluídas", color = BrandGreen, icon = Icons.Default.CheckCircle)
MetricColumn(value = "$totalCount", label = "Total OSs", color = CargillBlack, icon = Icons.Default.Build) MetricColumn(value = "$totalCount", label = "Total OSs", color = BrandBlack, icon = Icons.Default.Build)
} }
} }
} }
@@ -839,7 +839,7 @@ fun FilterChipWidget(text: String, isSelected: Boolean, onClick: () -> Unit) {
Surface( Surface(
onClick = onClick, onClick = onClick,
shape = RoundedCornerShape(20.dp), shape = RoundedCornerShape(20.dp),
color = if (isSelected) CargillGreen else Color.White, color = if (isSelected) BrandGreen else Color.White,
border = BorderStroke(1.dp, if (isSelected) Color.Transparent else Color(0xFFE0E0E0)), border = BorderStroke(1.dp, if (isSelected) Color.Transparent else Color(0xFFE0E0E0)),
modifier = Modifier.height(28.dp) modifier = Modifier.height(28.dp)
) { ) {
@@ -849,7 +849,7 @@ fun FilterChipWidget(text: String, isSelected: Boolean, onClick: () -> Unit) {
) { ) {
Text( Text(
text = text, text = text,
color = if (isSelected) Color.White else CargillBlack, color = if (isSelected) Color.White else BrandBlack,
fontSize = 11.sp, fontSize = 11.sp,
fontWeight = if (isSelected) FontWeight.Bold else FontWeight.Medium fontWeight = if (isSelected) FontWeight.Bold else FontWeight.Medium
) )
@@ -892,14 +892,14 @@ fun OSListItemCard(
text = activity.numeroOs, text = activity.numeroOs,
fontWeight = FontWeight.Black, fontWeight = FontWeight.Black,
fontSize = 15.sp, fontSize = 15.sp,
color = CargillBlack color = BrandBlack
) )
// Sync Status Badge // Sync Status Badge
Icon( Icon(
imageVector = if (activity.synced) Icons.Default.CloudDone else Icons.Default.CloudQueue, imageVector = if (activity.synced) Icons.Default.CloudDone else Icons.Default.CloudQueue,
contentDescription = if (activity.synced) "Sincronizado" else "Salvo localmente offline", contentDescription = if (activity.synced) "Sincronizado" else "Salvo localmente offline",
tint = if (activity.synced) CargillGreen else Color(0xFFFF9100), tint = if (activity.synced) BrandGreen else Color(0xFFFF9100),
modifier = Modifier.size(16.dp) modifier = Modifier.size(16.dp)
) )
} }
@@ -913,7 +913,7 @@ fun OSListItemCard(
val badgeTextColor = when (activity.status) { val badgeTextColor = when (activity.status) {
ActivityStatus.NAO_INICIADO -> StatusGrey ActivityStatus.NAO_INICIADO -> StatusGrey
ActivityStatus.EM_ANDAMENTO -> StatusBlue ActivityStatus.EM_ANDAMENTO -> StatusBlue
ActivityStatus.CONCLUIDO -> CargillGreen ActivityStatus.CONCLUIDO -> BrandGreen
} }
Box( Box(
@@ -938,7 +938,7 @@ fun OSListItemCard(
text = activity.descricao, text = activity.descricao,
fontSize = 13.sp, fontSize = 13.sp,
fontWeight = FontWeight.Medium, fontWeight = FontWeight.Medium,
color = CargillBlack, color = BrandBlack,
maxLines = 2, maxLines = 2,
overflow = TextOverflow.Ellipsis overflow = TextOverflow.Ellipsis
) )
@@ -963,7 +963,7 @@ fun OSListItemCard(
text = activity.setor, text = activity.setor,
fontSize = 10.sp, fontSize = 10.sp,
fontWeight = FontWeight.Bold, fontWeight = FontWeight.Bold,
color = CargillGreen color = BrandGreen
) )
} }
@@ -1028,7 +1028,7 @@ fun OSListItemCard(
.fillMaxWidth(activity.percentualExecucao.toFloat() / 100f) .fillMaxWidth(activity.percentualExecucao.toFloat() / 100f)
.height(8.dp) .height(8.dp)
.clip(CircleShape) .clip(CircleShape)
.background(if (activity.percentualExecucao >= 100) CargillGreen else StatusBlue) .background(if (activity.percentualExecucao >= 100) BrandGreen else StatusBlue)
) )
} }
@@ -1037,7 +1037,7 @@ fun OSListItemCard(
text = "${activity.percentualExecucao}%", text = "${activity.percentualExecucao}%",
fontSize = 12.sp, fontSize = 12.sp,
fontWeight = FontWeight.Black, fontWeight = FontWeight.Black,
color = if (activity.percentualExecucao >= 100) CargillGreen else StatusBlue color = if (activity.percentualExecucao >= 100) BrandGreen else StatusBlue
) )
} }
@@ -1165,7 +1165,7 @@ fun EditActivityBottomSheet(
text = activity.numeroOs, text = activity.numeroOs,
fontSize = 20.sp, fontSize = 20.sp,
fontWeight = FontWeight.Black, fontWeight = FontWeight.Black,
color = CargillBlack color = BrandBlack
) )
} }
@@ -1184,11 +1184,11 @@ fun EditActivityBottomSheet(
text = activity.descricao, text = activity.descricao,
fontSize = 13.sp, fontSize = 13.sp,
fontWeight = FontWeight.Medium, fontWeight = FontWeight.Medium,
color = CargillBlack color = BrandBlack
) )
Spacer(modifier = Modifier.height(8.dp)) Spacer(modifier = Modifier.height(8.dp))
Row(horizontalArrangement = Arrangement.spacedBy(16.dp)) { Row(horizontalArrangement = Arrangement.spacedBy(16.dp)) {
Text("Setor: ${activity.setor}", fontSize = 11.sp, fontWeight = FontWeight.Bold, color = CargillGreen) Text("Setor: ${activity.setor}", fontSize = 11.sp, fontWeight = FontWeight.Bold, color = BrandGreen)
Text("Equipe: ${activity.equipe}", fontSize = 11.sp, fontWeight = FontWeight.Bold, color = StatusBlue) Text("Equipe: ${activity.equipe}", fontSize = 11.sp, fontWeight = FontWeight.Bold, color = StatusBlue)
Text("Recurso: ${activity.recurso}", fontSize = 11.sp, color = StatusGrey) Text("Recurso: ${activity.recurso}", fontSize = 11.sp, color = StatusGrey)
} }
@@ -1206,13 +1206,13 @@ fun EditActivityBottomSheet(
text = "Percentual de Execução", text = "Percentual de Execução",
fontWeight = FontWeight.Bold, fontWeight = FontWeight.Bold,
fontSize = 14.sp, fontSize = 14.sp,
color = CargillBlack color = BrandBlack
) )
Text( Text(
text = "${progressValue.toInt()}%", text = "${progressValue.toInt()}%",
fontWeight = FontWeight.Black, fontWeight = FontWeight.Black,
fontSize = 18.sp, fontSize = 18.sp,
color = if (progressValue >= 100) CargillGreen else StatusBlue color = if (progressValue >= 100) BrandGreen else StatusBlue
) )
} }
@@ -1222,8 +1222,8 @@ fun EditActivityBottomSheet(
valueRange = 0f..100f, valueRange = 0f..100f,
steps = 19, // Splits in 5% increments for rapid tactile field logging steps = 19, // Splits in 5% increments for rapid tactile field logging
colors = SliderDefaults.colors( colors = SliderDefaults.colors(
thumbColor = if (progressValue >= 100) CargillGreen else StatusBlue, thumbColor = if (progressValue >= 100) BrandGreen else StatusBlue,
activeTrackColor = if (progressValue >= 100) CargillGreen else StatusBlue activeTrackColor = if (progressValue >= 100) BrandGreen else StatusBlue
), ),
enabled = currentUser != null enabled = currentUser != null
) )
@@ -1258,7 +1258,7 @@ fun EditActivityBottomSheet(
contentPadding = PaddingValues(0.dp), contentPadding = PaddingValues(0.dp),
enabled = currentUser != null enabled = currentUser != null
) { ) {
Text("100% (Concluir)", color = CargillGreen, fontSize = 11.sp, fontWeight = FontWeight.Bold) Text("100% (Concluir)", color = BrandGreen, fontSize = 11.sp, fontWeight = FontWeight.Bold)
} }
} }
} }
@@ -1269,7 +1269,7 @@ fun EditActivityBottomSheet(
text = "Observações de Campo", text = "Observações de Campo",
fontWeight = FontWeight.Bold, fontWeight = FontWeight.Bold,
fontSize = 14.sp, fontSize = 14.sp,
color = CargillBlack color = BrandBlack
) )
OutlinedTextField( OutlinedTextField(
value = observationText, value = observationText,
@@ -1291,7 +1291,7 @@ fun EditActivityBottomSheet(
text = "Anexar Foto de Campo (Simulador de Câmera)", text = "Anexar Foto de Campo (Simulador de Câmera)",
fontWeight = FontWeight.Bold, fontWeight = FontWeight.Bold,
fontSize = 14.sp, fontSize = 14.sp,
color = CargillBlack color = BrandBlack
) )
Text( Text(
text = "Selecione uma categoria de inspeção para simular o anexo fotográfico da atividade:", text = "Selecione uma categoria de inspeção para simular o anexo fotográfico da atividade:",
@@ -1309,7 +1309,7 @@ fun EditActivityBottomSheet(
onClick = { if (currentUser != null) selectedMockPhotoPath = if (isSelected) null else mockName }, onClick = { if (currentUser != null) selectedMockPhotoPath = if (isSelected) null else mockName },
shape = RoundedCornerShape(8.dp), shape = RoundedCornerShape(8.dp),
color = if (isSelected) Color(0xFFE8F5E9) else Color(0xFFF5F5F5), color = if (isSelected) Color(0xFFE8F5E9) else Color(0xFFF5F5F5),
border = BorderStroke(1.dp, if (isSelected) CargillGreen else Color(0xFFE0E0E0)), border = BorderStroke(1.dp, if (isSelected) BrandGreen else Color(0xFFE0E0E0)),
modifier = Modifier.height(48.dp) modifier = Modifier.height(48.dp)
) { ) {
Row( Row(
@@ -1320,14 +1320,14 @@ fun EditActivityBottomSheet(
Icon( Icon(
imageVector = Icons.Default.CameraAlt, imageVector = Icons.Default.CameraAlt,
contentDescription = label, contentDescription = label,
tint = if (isSelected) CargillGreen else StatusGrey, tint = if (isSelected) BrandGreen else StatusGrey,
modifier = Modifier.size(16.dp) modifier = Modifier.size(16.dp)
) )
Text( Text(
text = label, text = label,
fontSize = 11.sp, fontSize = 11.sp,
fontWeight = FontWeight.Bold, fontWeight = FontWeight.Bold,
color = if (isSelected) CargillGreen else CargillBlack color = if (isSelected) BrandGreen else BrandBlack
) )
} }
} }
@@ -1348,11 +1348,11 @@ fun EditActivityBottomSheet(
verticalAlignment = Alignment.CenterVertically, verticalAlignment = Alignment.CenterVertically,
horizontalArrangement = Arrangement.spacedBy(8.dp) horizontalArrangement = Arrangement.spacedBy(8.dp)
) { ) {
Icon(Icons.Default.Check, contentDescription = "Foto vinculada", tint = CargillGreen) Icon(Icons.Default.Check, contentDescription = "Foto vinculada", tint = BrandGreen)
Text( Text(
text = "Foto do componente '$selectedMockPhotoPath' anexada com sucesso à OS localmente!", text = "Foto do componente '$selectedMockPhotoPath' anexada com sucesso à OS localmente!",
fontSize = 11.sp, fontSize = 11.sp,
color = CargillGreen, color = BrandGreen,
fontWeight = FontWeight.Bold fontWeight = FontWeight.Bold
) )
} }
@@ -1472,7 +1472,7 @@ fun EditActivityBottomSheet(
.fillMaxWidth() .fillMaxWidth()
.height(48.dp) .height(48.dp)
.testTag("save_progress_button"), .testTag("save_progress_button"),
colors = ButtonDefaults.buttonColors(containerColor = CargillGreen), colors = ButtonDefaults.buttonColors(containerColor = BrandGreen),
shape = RoundedCornerShape(10.dp) shape = RoundedCornerShape(10.dp)
) { ) {
Icon(Icons.Default.Save, contentDescription = "Salvar") Icon(Icons.Default.Save, contentDescription = "Salvar")
@@ -1489,12 +1489,12 @@ fun EditActivityBottomSheet(
verticalAlignment = Alignment.CenterVertically, verticalAlignment = Alignment.CenterVertically,
horizontalArrangement = Arrangement.spacedBy(6.dp) horizontalArrangement = Arrangement.spacedBy(6.dp)
) { ) {
Icon(Icons.Default.History, contentDescription = "Histórico", tint = CargillBlack, modifier = Modifier.size(18.dp)) Icon(Icons.Default.History, contentDescription = "Histórico", tint = BrandBlack, modifier = Modifier.size(18.dp))
Text( Text(
text = "Histórico de Atualizações da OS", text = "Histórico de Atualizações da OS",
fontWeight = FontWeight.Bold, fontWeight = FontWeight.Bold,
fontSize = 14.sp, fontSize = 14.sp,
color = CargillBlack color = BrandBlack
) )
} }
@@ -1554,7 +1554,7 @@ fun TimelineLogItem(log: OSUpdateHistory) {
text = log.recurso, text = log.recurso,
fontSize = 11.sp, fontSize = 11.sp,
fontWeight = FontWeight.Bold, fontWeight = FontWeight.Bold,
color = CargillBlack color = BrandBlack
) )
} }
Text( Text(
@@ -1580,7 +1580,7 @@ fun TimelineLogItem(log: OSUpdateHistory) {
text = "${log.percentualAnterior}% ➜ ${log.percentualNovo}%", text = "${log.percentualAnterior}% ➜ ${log.percentualNovo}%",
fontSize = 11.sp, fontSize = 11.sp,
fontWeight = FontWeight.Black, fontWeight = FontWeight.Black,
color = if (log.percentualNovo >= 100) CargillGreen else StatusBlue color = if (log.percentualNovo >= 100) BrandGreen else StatusBlue
) )
} }
@@ -1597,7 +1597,7 @@ fun TimelineLogItem(log: OSUpdateHistory) {
Text( Text(
text = "\"${log.observacao}\"", text = "\"${log.observacao}\"",
fontSize = 11.sp, fontSize = 11.sp,
color = CargillBlack color = BrandBlack
) )
} }
} }
@@ -1613,8 +1613,8 @@ fun TimelineLogItem(log: OSUpdateHistory) {
.background(Color(0xFFE8F5E9)) .background(Color(0xFFE8F5E9))
.padding(horizontal = 6.dp, vertical = 2.dp) .padding(horizontal = 6.dp, vertical = 2.dp)
) { ) {
Icon(Icons.Default.CameraAlt, contentDescription = "Foto", tint = CargillGreen, modifier = Modifier.size(10.dp)) Icon(Icons.Default.CameraAlt, contentDescription = "Foto", tint = BrandGreen, modifier = Modifier.size(10.dp))
Text("Foto Anexa: ${log.fotoPath}", fontSize = 9.sp, color = CargillGreen, fontWeight = FontWeight.Bold) Text("Foto Anexa: ${log.fotoPath}", fontSize = 9.sp, color = BrandGreen, fontWeight = FontWeight.Bold)
} }
} }
} }
@@ -1658,7 +1658,7 @@ fun ImporterConsoleSheet(
text = "Importar Planilha do PCM", text = "Importar Planilha do PCM",
fontSize = 18.sp, fontSize = 18.sp,
fontWeight = FontWeight.Black, fontWeight = FontWeight.Black,
color = CargillBlack color = BrandBlack
) )
} }
IconButton(onClick = onDismiss) { IconButton(onClick = onDismiss) {
@@ -1682,7 +1682,7 @@ fun ImporterConsoleSheet(
modifier = Modifier.padding(12.dp), modifier = Modifier.padding(12.dp),
verticalArrangement = Arrangement.spacedBy(4.dp) verticalArrangement = Arrangement.spacedBy(4.dp)
) { ) {
Text("Estrutura Esperada do Arquivo (Excel):", fontSize = 11.sp, fontWeight = FontWeight.Bold, color = CargillBlack) Text("Estrutura Esperada do Arquivo (Excel):", fontSize = 11.sp, fontWeight = FontWeight.Bold, color = BrandBlack)
Text("• Colunas Obrigatórias: Número da OS, Descrição da Atividade", fontSize = 11.sp, color = StatusGrey) Text("• Colunas Obrigatórias: Número da OS, Descrição da Atividade", fontSize = 11.sp, color = StatusGrey)
Text("• Colunas Opcionais: Setor, Equipe, Recurso, Início, Fim, %", fontSize = 11.sp, color = StatusGrey) Text("• Colunas Opcionais: Setor, Equipe, Recurso, Início, Fim, %", fontSize = 11.sp, color = StatusGrey)
Text("• Suporta separadores por Vírgula (,) ou Ponto e Vírgula (;)", fontSize = 11.sp, color = StatusGrey) Text("• Suporta separadores por Vírgula (,) ou Ponto e Vírgula (;)", fontSize = 11.sp, color = StatusGrey)
@@ -1700,7 +1700,7 @@ fun ImporterConsoleSheet(
modifier = Modifier modifier = Modifier
.fillMaxWidth() .fillMaxWidth()
.height(48.dp), .height(48.dp),
colors = ButtonDefaults.buttonColors(containerColor = CargillGreen) colors = ButtonDefaults.buttonColors(containerColor = BrandGreen)
) { ) {
Icon(Icons.Default.UploadFile, contentDescription = "Upload CSV") Icon(Icons.Default.UploadFile, contentDescription = "Upload CSV")
Spacer(modifier = Modifier.width(8.dp)) Spacer(modifier = Modifier.width(8.dp))

View File

@@ -41,9 +41,9 @@ import androidx.compose.ui.text.style.TextAlign
import androidx.compose.ui.unit.dp import androidx.compose.ui.unit.dp
import androidx.compose.ui.unit.sp import androidx.compose.ui.unit.sp
import androidx.lifecycle.compose.collectAsStateWithLifecycle import androidx.lifecycle.compose.collectAsStateWithLifecycle
import com.example.ui.theme.CargillBlack import com.example.ui.theme.BrandBlack
import com.example.ui.theme.CargillGreen import com.example.ui.theme.BrandGreen
import com.example.ui.theme.CargillLightGreen import com.example.ui.theme.BrandLightGreen
import com.example.ui.theme.LightGrey import com.example.ui.theme.LightGrey
import com.example.ui.viewmodel.MaintenanceViewModel import com.example.ui.viewmodel.MaintenanceViewModel
@@ -108,12 +108,12 @@ fun SettingsScreen(
Icon( Icon(
imageVector = Icons.Default.KeyboardArrowLeft, imageVector = Icons.Default.KeyboardArrowLeft,
contentDescription = "Voltar", contentDescription = "Voltar",
tint = CargillGreen, tint = BrandGreen,
modifier = Modifier.size(28.dp) modifier = Modifier.size(28.dp)
) )
Text( Text(
text = "Voltar", text = "Voltar",
color = CargillGreen, color = BrandGreen,
fontSize = 16.sp, fontSize = 16.sp,
fontWeight = FontWeight.Bold fontWeight = FontWeight.Bold
) )
@@ -122,7 +122,7 @@ fun SettingsScreen(
text = "Configurações do Planejador PCM", text = "Configurações do Planejador PCM",
fontSize = 18.sp, fontSize = 18.sp,
fontWeight = FontWeight.Bold, fontWeight = FontWeight.Bold,
color = CargillBlack color = BrandBlack
) )
} }
}, },
@@ -215,7 +215,7 @@ fun SettingsScreen(
modifier = Modifier modifier = Modifier
.fillMaxWidth() .fillMaxWidth()
.height(8.dp), .height(8.dp),
color = CargillGreen, color = BrandGreen,
trackColor = Color(0xFFE0E0E0), trackColor = Color(0xFFE0E0E0),
strokeCap = androidx.compose.ui.graphics.StrokeCap.Round strokeCap = androidx.compose.ui.graphics.StrokeCap.Round
) )
@@ -230,19 +230,19 @@ fun SettingsScreen(
text = apiLatency ?: "0ms", text = apiLatency ?: "0ms",
fontSize = 16.sp, fontSize = 16.sp,
fontWeight = FontWeight.Black, fontWeight = FontWeight.Black,
color = CargillBlack color = BrandBlack
) )
Icon( Icon(
imageVector = Icons.Default.DateRange, imageVector = Icons.Default.DateRange,
contentDescription = "Online", contentDescription = "Online",
tint = CargillGreen, tint = BrandGreen,
modifier = Modifier.size(14.dp) modifier = Modifier.size(14.dp)
) )
Text( Text(
text = "Online", text = "Online",
fontSize = 14.sp, fontSize = 14.sp,
fontWeight = FontWeight.Bold, fontWeight = FontWeight.Bold,
color = CargillGreen color = BrandGreen
) )
} }
} }
@@ -270,7 +270,7 @@ fun SettingsScreen(
Icon( Icon(
imageVector = Icons.Default.Info, imageVector = Icons.Default.Info,
contentDescription = "Cota", contentDescription = "Cota",
tint = CargillGreen, tint = BrandGreen,
modifier = Modifier.size(14.dp) modifier = Modifier.size(14.dp)
) )
} }
@@ -283,7 +283,7 @@ fun SettingsScreen(
modifier = Modifier modifier = Modifier
.fillMaxWidth() .fillMaxWidth()
.height(8.dp), .height(8.dp),
color = CargillGreen, color = BrandGreen,
trackColor = Color(0xFFE0E0E0), trackColor = Color(0xFFE0E0E0),
strokeCap = androidx.compose.ui.graphics.StrokeCap.Round strokeCap = androidx.compose.ui.graphics.StrokeCap.Round
) )
@@ -298,13 +298,13 @@ fun SettingsScreen(
text = apiQuota ?: "0%", text = apiQuota ?: "0%",
fontSize = 16.sp, fontSize = 16.sp,
fontWeight = FontWeight.Black, fontWeight = FontWeight.Black,
color = CargillBlack color = BrandBlack
) )
Text( Text(
text = "Bom", text = "Bom",
fontSize = 14.sp, fontSize = 14.sp,
fontWeight = FontWeight.Bold, fontWeight = FontWeight.Bold,
color = CargillGreen color = BrandGreen
) )
} }
} }
@@ -352,7 +352,7 @@ fun SettingsScreen(
text = "Exportar Backup do BD", text = "Exportar Backup do BD",
icon = Icons.Default.Download, icon = Icons.Default.Download,
onClick = { onClick = {
backupLauncher.launch("cargill_maintenance_backup.db") backupLauncher.launch("maintenance_backup.db")
} }
) )
@@ -475,13 +475,13 @@ fun ConflictsDialog(
Icon( Icon(
imageVector = Icons.Default.CheckCircle, imageVector = Icons.Default.CheckCircle,
contentDescription = "Sem conflitos", contentDescription = "Sem conflitos",
tint = CargillGreen, tint = BrandGreen,
modifier = Modifier.size(48.dp) modifier = Modifier.size(48.dp)
) )
Text( Text(
text = "Nenhum conflito registrado.", text = "Nenhum conflito registrado.",
fontWeight = FontWeight.Bold, fontWeight = FontWeight.Bold,
color = CargillBlack, color = BrandBlack,
fontSize = 14.sp fontSize = 14.sp
) )
} }
@@ -584,7 +584,7 @@ fun ConflictItemCard(log: com.example.data.model.SyncConflictLog) {
) { ) {
Text( Text(
text = winnerLabel, text = winnerLabel,
color = CargillGreen, color = BrandGreen,
fontSize = 11.sp, fontSize = 11.sp,
fontWeight = FontWeight.Bold fontWeight = FontWeight.Bold
) )
@@ -594,7 +594,7 @@ fun ConflictItemCard(log: com.example.data.model.SyncConflictLog) {
Text( Text(
text = log.descricaoOs, text = log.descricaoOs,
fontSize = 13.sp, fontSize = 13.sp,
color = CargillBlack, color = BrandBlack,
fontWeight = FontWeight.Normal fontWeight = FontWeight.Normal
) )
@@ -629,12 +629,12 @@ fun ConflictItemCard(log: com.example.data.model.SyncConflictLog) {
verticalAlignment = Alignment.CenterVertically, verticalAlignment = Alignment.CenterVertically,
horizontalArrangement = Arrangement.spacedBy(4.dp) horizontalArrangement = Arrangement.spacedBy(4.dp)
) { ) {
Text(text = "Local", fontWeight = FontWeight.Bold, fontSize = 12.sp, color = CargillBlack) Text(text = "Local", fontWeight = FontWeight.Bold, fontSize = 12.sp, color = BrandBlack)
if (log.resolvidoPorLocal) { if (log.resolvidoPorLocal) {
Icon( Icon(
imageVector = Icons.Default.Check, imageVector = Icons.Default.Check,
contentDescription = "Vencedor", contentDescription = "Vencedor",
tint = CargillGreen, tint = BrandGreen,
modifier = Modifier.size(12.dp) modifier = Modifier.size(12.dp)
) )
} }
@@ -643,7 +643,7 @@ fun ConflictItemCard(log: com.example.data.model.SyncConflictLog) {
text = "Progresso: ${log.localPercentual}%", text = "Progresso: ${log.localPercentual}%",
fontSize = 12.sp, fontSize = 12.sp,
fontWeight = if (log.resolvidoPorLocal) FontWeight.Bold else FontWeight.Normal, fontWeight = if (log.resolvidoPorLocal) FontWeight.Bold else FontWeight.Normal,
color = CargillBlack color = BrandBlack
) )
Text(text = "Editor: ${log.localEditor?.substringBefore("@") ?: "Local"}", fontSize = 10.sp, color = Color.Gray) Text(text = "Editor: ${log.localEditor?.substringBefore("@") ?: "Local"}", fontSize = 10.sp, color = Color.Gray)
Text(text = dataLocal, fontSize = 10.sp, color = Color.Gray) Text(text = dataLocal, fontSize = 10.sp, color = Color.Gray)
@@ -668,12 +668,12 @@ fun ConflictItemCard(log: com.example.data.model.SyncConflictLog) {
verticalAlignment = Alignment.CenterVertically, verticalAlignment = Alignment.CenterVertically,
horizontalArrangement = Arrangement.spacedBy(4.dp) horizontalArrangement = Arrangement.spacedBy(4.dp)
) { ) {
Text(text = "Servidor", fontWeight = FontWeight.Bold, fontSize = 12.sp, color = CargillBlack) Text(text = "Servidor", fontWeight = FontWeight.Bold, fontSize = 12.sp, color = BrandBlack)
if (!log.resolvidoPorLocal) { if (!log.resolvidoPorLocal) {
Icon( Icon(
imageVector = Icons.Default.Check, imageVector = Icons.Default.Check,
contentDescription = "Vencedor", contentDescription = "Vencedor",
tint = CargillGreen, tint = BrandGreen,
modifier = Modifier.size(12.dp) modifier = Modifier.size(12.dp)
) )
} }
@@ -682,7 +682,7 @@ fun ConflictItemCard(log: com.example.data.model.SyncConflictLog) {
text = "Progresso: ${log.remotePercentual}%", text = "Progresso: ${log.remotePercentual}%",
fontSize = 12.sp, fontSize = 12.sp,
fontWeight = if (!log.resolvidoPorLocal) FontWeight.Bold else FontWeight.Normal, fontWeight = if (!log.resolvidoPorLocal) FontWeight.Bold else FontWeight.Normal,
color = CargillBlack color = BrandBlack
) )
Text(text = "Editor: ${log.remoteEditor?.substringBefore("@") ?: "Servidor"}", fontSize = 10.sp, color = Color.Gray) Text(text = "Editor: ${log.remoteEditor?.substringBefore("@") ?: "Servidor"}", fontSize = 10.sp, color = Color.Gray)
Text(text = dataRemote, fontSize = 10.sp, color = Color.Gray) Text(text = dataRemote, fontSize = 10.sp, color = Color.Gray)
@@ -718,13 +718,13 @@ fun AdminButton(
CircularProgressIndicator( CircularProgressIndicator(
modifier = Modifier.size(20.dp), modifier = Modifier.size(20.dp),
strokeWidth = 2.dp, strokeWidth = 2.dp,
color = CargillGreen color = BrandGreen
) )
} else { } else {
Icon( Icon(
imageVector = icon, imageVector = icon,
contentDescription = text, contentDescription = text,
tint = CargillBlack, tint = BrandBlack,
modifier = Modifier.size(22.dp) modifier = Modifier.size(22.dp)
) )
} }
@@ -733,7 +733,7 @@ fun AdminButton(
text = text, text = text,
fontSize = 16.sp, fontSize = 16.sp,
fontWeight = FontWeight.Bold, fontWeight = FontWeight.Bold,
color = CargillBlack, color = BrandBlack,
textAlign = TextAlign.Center textAlign = TextAlign.Center
) )
} }

View File

@@ -2,9 +2,9 @@ package com.example.ui.theme
import androidx.compose.ui.graphics.Color import androidx.compose.ui.graphics.Color
val CargillGreen = Color(0xFF005F40) val BrandGreen = Color(0xFF005F40)
val CargillBlack = Color(0xFF1A1A1A) val BrandBlack = Color(0xFF1A1A1A)
val CargillLightGreen = Color(0xFFE8F5E9) val BrandLightGreen = Color(0xFFE8F5E9)
val DarkGreen = Color(0xFF003D28) val DarkGreen = Color(0xFF003D28)
val Charcoal = Color(0xFF2C2C2C) val Charcoal = Color(0xFF2C2C2C)

View File

@@ -13,18 +13,18 @@ import androidx.compose.ui.platform.LocalContext
private val DarkColorScheme = private val DarkColorScheme =
darkColorScheme( darkColorScheme(
primary = CargillGreen, primary = BrandGreen,
secondary = Charcoal, secondary = Charcoal,
tertiary = CargillLightGreen, tertiary = BrandLightGreen,
background = CargillBlack, background = BrandBlack,
surface = Charcoal surface = Charcoal
) )
private val LightColorScheme = private val LightColorScheme =
lightColorScheme( lightColorScheme(
primary = CargillGreen, primary = BrandGreen,
secondary = CargillBlack, secondary = BrandBlack,
tertiary = CargillLightGreen, tertiary = BrandLightGreen,
background = LightGrey, background = LightGrey,
surface = Color.White surface = Color.White
) )
@@ -32,7 +32,7 @@ private val LightColorScheme =
@Composable @Composable
fun MyApplicationTheme( fun MyApplicationTheme(
darkTheme: Boolean = isSystemInDarkTheme(), darkTheme: Boolean = isSystemInDarkTheme(),
// Set dynamic color to false by default to strictly preserve our Cargill green identity // Set dynamic color to false by default to strictly preserve our brand green identity
dynamicColor: Boolean = false, dynamicColor: Boolean = false,
content: @Composable () -> Unit, content: @Composable () -> Unit,
) { ) {

View File

@@ -319,7 +319,7 @@ class MaintenanceViewModel(private val repository: MaintenanceRepository) : View
viewModelScope.launch { viewModelScope.launch {
_isSyncing.value = true _isSyncing.value = true
_syncStatusMessage.value = "Conectando ao servidor central da Cargill..." _syncStatusMessage.value = "Conectando ao servidor central..."
when (val result = repository.synchronizeWithBackend()) { when (val result = repository.synchronizeWithBackend()) {
is SyncResult.Success -> { is SyncResult.Success -> {

View File

@@ -1,3 +1,3 @@
<resources> <resources>
<string name="app_name">Cargill Parada OS</string> <string name="app_name">Gestão Parada OS</string>
</resources> </resources>

View File

@@ -24,7 +24,7 @@ class ExampleRobolectricTest {
fun `read string from context`() { fun `read string from context`() {
val context = ApplicationProvider.getApplicationContext<Context>() val context = ApplicationProvider.getApplicationContext<Context>()
val appName = context.getString(R.string.app_name) val appName = context.getString(R.string.app_name)
assertEquals("Cargill Parada OS", appName) assertEquals("Gestão Parada OS", appName)
} }
@Test @Test
@@ -274,9 +274,9 @@ class ExampleRobolectricTest {
.build() .build()
val repository = com.example.data.repository.MaintenanceRepository(db.maintenanceDao(), context) val repository = com.example.data.repository.MaintenanceRepository(db.maintenanceDao(), context)
val userAdmin = com.example.data.model.UserAccess("admin@cargill.com", "total") val userAdmin = com.example.data.model.UserAccess("admin@empresa.com", "total")
val userEditor = com.example.data.model.UserAccess("editor@cargill.com", "editor") val userEditor = com.example.data.model.UserAccess("editor@empresa.com", "editor")
val userViewer = com.example.data.model.UserAccess("viewer@cargill.com", "leitor") val userViewer = com.example.data.model.UserAccess("viewer@empresa.com", "leitor")
kotlinx.coroutines.runBlocking { kotlinx.coroutines.runBlocking {
db.maintenanceDao().insertUserAccessList(listOf(userAdmin, userEditor, userViewer)) db.maintenanceDao().insertUserAccessList(listOf(userAdmin, userEditor, userViewer))
@@ -310,28 +310,28 @@ class ExampleRobolectricTest {
// Access level should be null // Access level should be null
assertEquals(null, viewModel.userAccessLevel.value) assertEquals(null, viewModel.userAccessLevel.value)
// Test 2: Log in as viewer (viewer@cargill.com) // Test 2: Log in as viewer (viewer@empresa.com)
viewModel.loginUser("viewer@cargill.com", "Viewer User") viewModel.loginUser("viewer@empresa.com", "Viewer User")
Thread.sleep(100) Thread.sleep(100)
org.robolectric.shadows.ShadowLooper.idleMainLooper() org.robolectric.shadows.ShadowLooper.idleMainLooper()
assertEquals("leitor", viewModel.userAccessLevel.value) assertEquals("leitor", viewModel.userAccessLevel.value)
// Attempt to edit progress (should fail because access level is leitor, which is not total or editor) // Attempt to edit progress (should fail because access level is leitor, which is not total or editor)
viewModel.updateProgress("OS-ACCESS", 50, "Tentando editar", null, "Viewer User", "viewer@cargill.com") viewModel.updateProgress("OS-ACCESS", 50, "Tentando editar", null, "Viewer User", "viewer@empresa.com")
Thread.sleep(100) Thread.sleep(100)
org.robolectric.shadows.ShadowLooper.idleMainLooper() org.robolectric.shadows.ShadowLooper.idleMainLooper()
// OS percentualExecucao should remain 0 // OS percentualExecucao should remain 0
val actAfterViewer = db.maintenanceDao().getActivityByOsOneShot("OS-ACCESS") val actAfterViewer = db.maintenanceDao().getActivityByOsOneShot("OS-ACCESS")
assertEquals(0, actAfterViewer?.percentualExecucao) assertEquals(0, actAfterViewer?.percentualExecucao)
// Test 3: Log in as editor (editor@cargill.com) // Test 3: Log in as editor (editor@empresa.com)
viewModel.loginUser("editor@cargill.com", "Editor User") viewModel.loginUser("editor@empresa.com", "Editor User")
Thread.sleep(100) Thread.sleep(100)
org.robolectric.shadows.ShadowLooper.idleMainLooper() org.robolectric.shadows.ShadowLooper.idleMainLooper()
assertEquals("editor", viewModel.userAccessLevel.value) assertEquals("editor", viewModel.userAccessLevel.value)
// Attempt to edit progress (should succeed because access level is editor) // Attempt to edit progress (should succeed because access level is editor)
viewModel.updateProgress("OS-ACCESS", 80, "Editando com editor", null, "Editor User", "editor@cargill.com") viewModel.updateProgress("OS-ACCESS", 80, "Editando com editor", null, "Editor User", "editor@empresa.com")
Thread.sleep(100) Thread.sleep(100)
org.robolectric.shadows.ShadowLooper.idleMainLooper() org.robolectric.shadows.ShadowLooper.idleMainLooper()
// OS percentualExecucao should now be 80 // OS percentualExecucao should now be 80

View File

@@ -177,17 +177,17 @@ class ExampleUnitTest {
@Test @Test
fun testConflictResolutionComputation() { fun testConflictResolutionComputation() {
val localHistory = listOf( val localHistory = listOf(
com.example.data.model.OSUpdateHistory(id = 1, numeroOs = "OS1", timestamp = 1000L, percentualAnterior = 0, percentualNovo = 20, recurso = "Mecânico", emailEditor = "local@cargill.com"), com.example.data.model.OSUpdateHistory(id = 1, numeroOs = "OS1", timestamp = 1000L, percentualAnterior = 0, percentualNovo = 20, recurso = "Mecânico", emailEditor = "local@empresa.com"),
com.example.data.model.OSUpdateHistory(id = 2, numeroOs = "OS2", timestamp = 1500L, percentualAnterior = 0, percentualNovo = 50, recurso = "Elétrico", emailEditor = "local@cargill.com"), com.example.data.model.OSUpdateHistory(id = 2, numeroOs = "OS2", timestamp = 1500L, percentualAnterior = 0, percentualNovo = 50, recurso = "Elétrico", emailEditor = "local@empresa.com"),
com.example.data.model.OSUpdateHistory(id = 4, numeroOs = "OS4", timestamp = 3000L, percentualAnterior = 0, percentualNovo = 90, recurso = "Mecânico", emailEditor = "local@cargill.com"), com.example.data.model.OSUpdateHistory(id = 4, numeroOs = "OS4", timestamp = 3000L, percentualAnterior = 0, percentualNovo = 90, recurso = "Mecânico", emailEditor = "local@empresa.com"),
com.example.data.model.OSUpdateHistory(id = 5, numeroOs = "OS5", timestamp = 4000L, percentualAnterior = 0, percentualNovo = 10, recurso = "Elétrico", emailEditor = "local@cargill.com") com.example.data.model.OSUpdateHistory(id = 5, numeroOs = "OS5", timestamp = 4000L, percentualAnterior = 0, percentualNovo = 10, recurso = "Elétrico", emailEditor = "local@empresa.com")
) )
val remoteHistory = listOf( val remoteHistory = listOf(
com.example.data.model.OSUpdateHistory(id = 10, numeroOs = "OS1", timestamp = 1200L, percentualAnterior = 0, percentualNovo = 30, recurso = "Mecânico", emailEditor = "remote@cargill.com"), com.example.data.model.OSUpdateHistory(id = 10, numeroOs = "OS1", timestamp = 1200L, percentualAnterior = 0, percentualNovo = 30, recurso = "Mecânico", emailEditor = "remote@empresa.com"),
com.example.data.model.OSUpdateHistory(id = 11, numeroOs = "OS3", timestamp = 2000L, percentualAnterior = 0, percentualNovo = 70, recurso = "Elétrico", emailEditor = "remote@cargill.com"), com.example.data.model.OSUpdateHistory(id = 11, numeroOs = "OS3", timestamp = 2000L, percentualAnterior = 0, percentualNovo = 70, recurso = "Elétrico", emailEditor = "remote@empresa.com"),
com.example.data.model.OSUpdateHistory(id = 12, numeroOs = "OS4", timestamp = 2500L, percentualAnterior = 0, percentualNovo = 80, recurso = "Mecânico", emailEditor = "remote@cargill.com"), com.example.data.model.OSUpdateHistory(id = 12, numeroOs = "OS4", timestamp = 2500L, percentualAnterior = 0, percentualNovo = 80, recurso = "Mecânico", emailEditor = "remote@empresa.com"),
com.example.data.model.OSUpdateHistory(id = 13, numeroOs = "OS5", timestamp = 4500L, percentualAnterior = 0, percentualNovo = 40, recurso = "Elétrico", emailEditor = "remote@cargill.com") com.example.data.model.OSUpdateHistory(id = 13, numeroOs = "OS5", timestamp = 4500L, percentualAnterior = 0, percentualNovo = 40, recurso = "Elétrico", emailEditor = "remote@empresa.com")
) )
val localHistoryKeys = localHistory.map { "${it.numeroOs}_${it.timestamp}" }.toSet() val localHistoryKeys = localHistory.map { "${it.numeroOs}_${it.timestamp}" }.toSet()
@@ -271,10 +271,10 @@ class ExampleUnitTest {
// Simulate user access lists matching dynamic headers // Simulate user access lists matching dynamic headers
val rows = listOf( val rows = listOf(
listOf("E-mail", "Nível de Acesso"), listOf("E-mail", "Nível de Acesso"),
listOf("admin@cargill.com", "total"), listOf("admin@empresa.com", "total"),
listOf("editor@cargill.com", "editor"), listOf("editor@empresa.com", "editor"),
listOf("viewer@cargill.com", "leitor"), listOf("viewer@empresa.com", "leitor"),
listOf("random@cargill.com", "outro") listOf("random@empresa.com", "outro")
) )
val headers = rows[0].map { it.trim().lowercase() } val headers = rows[0].map { it.trim().lowercase() }
@@ -292,9 +292,9 @@ class ExampleUnitTest {
accessMap[email] = nivel accessMap[email] = nivel
} }
assertEquals("total", accessMap["admin@cargill.com"]) assertEquals("total", accessMap["admin@empresa.com"])
assertEquals("editor", accessMap["editor@cargill.com"]) assertEquals("editor", accessMap["editor@empresa.com"])
assertEquals("leitor", accessMap["viewer@cargill.com"]) assertEquals("leitor", accessMap["viewer@empresa.com"])
// Function to check write permission // Function to check write permission
val hasWriteAccess = { email: String -> val hasWriteAccess = { email: String ->
@@ -302,10 +302,10 @@ class ExampleUnitTest {
level == "total" || level == "editor" level == "total" || level == "editor"
} }
assertTrue(hasWriteAccess("admin@cargill.com")) assertTrue(hasWriteAccess("admin@empresa.com"))
assertTrue(hasWriteAccess("editor@cargill.com")) assertTrue(hasWriteAccess("editor@empresa.com"))
assertFalse(hasWriteAccess("viewer@cargill.com")) assertFalse(hasWriteAccess("viewer@empresa.com"))
assertFalse(hasWriteAccess("random@cargill.com")) assertFalse(hasWriteAccess("random@empresa.com"))
assertFalse(hasWriteAccess("nonexistent@cargill.com")) assertFalse(hasWriteAccess("nonexistent@empresa.com"))
} }
} }

View File

@@ -2,7 +2,7 @@ package com.example
import androidx.compose.ui.test.junit4.createComposeRule import androidx.compose.ui.test.junit4.createComposeRule
import androidx.compose.ui.test.onRoot import androidx.compose.ui.test.onRoot
import com.example.ui.components.CargillLogo import com.example.ui.components.AppLogo
import com.example.ui.theme.MyApplicationTheme import com.example.ui.theme.MyApplicationTheme
import com.github.takahirom.roborazzi.RobolectricDeviceQualifiers import com.github.takahirom.roborazzi.RobolectricDeviceQualifiers
import com.github.takahirom.roborazzi.captureRoboImage import com.github.takahirom.roborazzi.captureRoboImage
@@ -24,7 +24,7 @@ class GreetingScreenshotTest {
fun greeting_screenshot() { fun greeting_screenshot() {
composeTestRule.setContent { composeTestRule.setContent {
MyApplicationTheme { MyApplicationTheme {
CargillLogo() AppLogo()
} }
} }

View File

@@ -1,6 +1,6 @@
# Documentação de Arquitetura do Sistema: Gestão de Manutenção (Cargill Parada OS) # Documentação de Arquitetura do Sistema: Gestão de Manutenção (Gestão Parada OS)
Esta documentação descreve de forma abrangente a arquitetura de software, a estrutura de dados, o design da interface e os fluxos de sincronização do aplicativo Android de Gestão de Manutenção de Parada da Cargill. Esta documentação descreve de forma abrangente a arquitetura de software, a estrutura de dados, o design da interface e os fluxos de sincronização do aplicativo Android de Gestão de Manutenção de Parada.
O aplicativo foi projetado sob uma filosofia **offline-first** para atender a técnicos e inspetores que executam suas rotinas de manutenção em áreas industriais da planta com cobertura de rede instável ou inexistente. O aplicativo foi projetado sob uma filosofia **offline-first** para atender a técnicos e inspetores que executam suas rotinas de manutenção em áreas industriais da planta com cobertura de rede instável ou inexistente.
@@ -75,12 +75,12 @@ A estrutura do código fonte está localizada no pacote `com.example` e é organ
* [`MaintenanceRepository.kt`](file:///home/cesarjhony/dev/projects/gestao_de_manutencao/app/src/main/java/com/example/data/repository/MaintenanceRepository.kt): Mediador de dados, processamento de planilhas locais (CSV) e algoritmo central de reconciliação de estado. * [`MaintenanceRepository.kt`](file:///home/cesarjhony/dev/projects/gestao_de_manutencao/app/src/main/java/com/example/data/repository/MaintenanceRepository.kt): Mediador de dados, processamento de planilhas locais (CSV) e algoritmo central de reconciliação de estado.
* `ui/` (Camada de Apresentação) * `ui/` (Camada de Apresentação)
* [`components/`](file:///home/cesarjhony/dev/projects/gestao_de_manutencao/app/src/main/java/com/example/ui/components/) * [`components/`](file:///home/cesarjhony/dev/projects/gestao_de_manutencao/app/src/main/java/com/example/ui/components/)
* [`CargillLogo.kt`](file:///home/cesarjhony/dev/projects/gestao_de_manutencao/app/src/main/java/com/example/ui/components/CargillLogo.kt): Logotipo customizado desenhado via Canvas vetorial utilizando cores da marca. * [`AppLogo.kt`](file:///home/cesarjhony/dev/projects/gestao_de_manutencao/app/src/main/java/com/example/ui/components/AppLogo.kt): Logotipo customizado desenhado via Canvas vetorial utilizando cores da marca.
* [`screens/`](file:///home/cesarjhony/dev/projects/gestao_de_manutencao/app/src/main/java/com/example/ui/screens/) * [`screens/`](file:///home/cesarjhony/dev/projects/gestao_de_manutencao/app/src/main/java/com/example/ui/screens/)
* [`MaintenanceDashboardScreen.kt`](file:///home/cesarjhony/dev/projects/gestao_de_manutencao/app/src/main/java/com/example/ui/screens/MaintenanceDashboardScreen.kt): Tela única modularizada contendo o painel principal, listas, modais e logs de histórico. * [`MaintenanceDashboardScreen.kt`](file:///home/cesarjhony/dev/projects/gestao_de_manutencao/app/src/main/java/com/example/ui/screens/MaintenanceDashboardScreen.kt): Tela única modularizada contendo o painel principal, listas, modais e logs de histórico.
* [`theme/`](file:///home/cesarjhony/dev/projects/gestao_de_manutencao/app/src/main/java/com/example/ui/theme/) * [`theme/`](file:///home/cesarjhony/dev/projects/gestao_de_manutencao/app/src/main/java/com/example/ui/theme/)
* [`Color.kt`](file:///home/cesarjhony/dev/projects/gestao_de_manutencao/app/src/main/java/com/example/ui/theme/Color.kt): Definição de cores (Cargill Green, Cargill Black, etc.). * [`Color.kt`](file:///home/cesarjhony/dev/projects/gestao_de_manutencao/app/src/main/java/com/example/ui/theme/Color.kt): Definição de cores (BrandGreen, BrandBlack, etc.).
* [`Theme.kt`](file:///home/cesarjhony/dev/projects/gestao_de_manutencao/app/src/main/java/com/example/ui/theme/Theme.kt): Configuração do `MyApplicationTheme` (Material3) desabilitando dynamic colors para preservar a marca Cargill. * [`Theme.kt`](file:///home/cesarjhony/dev/projects/gestao_de_manutencao/app/src/main/java/com/example/ui/theme/Theme.kt): Configuração do `MyApplicationTheme` (Material3) desabilitando dynamic colors para preservar a marca.
* [`Type.kt`](file:///home/cesarjhony/dev/projects/gestao_de_manutencao/app/src/main/java/com/example/ui/theme/Type.kt): Configuração tipográfica padrão. * [`Type.kt`](file:///home/cesarjhony/dev/projects/gestao_de_manutencao/app/src/main/java/com/example/ui/theme/Type.kt): Configuração tipográfica padrão.
* [`viewmodel/`](file:///home/cesarjhony/dev/projects/gestao_de_manutencao/app/src/main/java/com/example/ui/viewmodel/) * [`viewmodel/`](file:///home/cesarjhony/dev/projects/gestao_de_manutencao/app/src/main/java/com/example/ui/viewmodel/)
* [`MaintenanceViewModel.kt`](file:///home/cesarjhony/dev/projects/gestao_de_manutencao/app/src/main/java/com/example/ui/viewmodel/MaintenanceViewModel.kt): Gerenciador de estados reativos e fábrica de injeção manual. * [`MaintenanceViewModel.kt`](file:///home/cesarjhony/dev/projects/gestao_de_manutencao/app/src/main/java/com/example/ui/viewmodel/MaintenanceViewModel.kt): Gerenciador de estados reativos e fábrica de injeção manual.
@@ -267,7 +267,7 @@ val filteredActivities: StateFlow<List<MaintenanceActivity>> = combine(
### 7.2. Principais Composables da Tela ### 7.2. Principais Composables da Tela
1. **`MaintenanceDashboardScreen` (Tela Central):** 1. **`MaintenanceDashboardScreen` (Tela Central):**
* Configura o Scaffold principal com uma barra superior contendo o logotipo da Cargill vetorial (`CargillLogo`), status da conexão, botão de sincronização (`SyncNow`), dados do usuário autenticado e ferramenta de busca. * Configura o Scaffold principal com uma barra superior contendo o logotipo vetorial (`AppLogo`), status da conexão, botão de sincronização (`SyncNow`), dados do usuário autenticado e ferramenta de busca.
2. **`DashboardMetrics` (Painel de Indicadores):** 2. **`DashboardMetrics` (Painel de Indicadores):**
* Exibe cartões informativos atualizados dinamicamente: Total de OS, OS Não Iniciadas, Em Andamento e Concluídas. * Exibe cartões informativos atualizados dinamicamente: Total de OS, OS Não Iniciadas, Em Andamento e Concluídas.
3. **`FilterPillsRow` (Filtros Avançados):** 3. **`FilterPillsRow` (Filtros Avançados):**
@@ -286,12 +286,12 @@ val filteredActivities: StateFlow<List<MaintenanceActivity>> = combine(
## 8. Decisões de Design de UI e Identidade Visual (Design System) ## 8. Decisões de Design de UI e Identidade Visual (Design System)
A interface de usuário foi desenhada de forma a respeitar a identidade corporativa da Cargill, garantindo legibilidade e uso ideal em campo. A interface de usuário foi desenhada de forma a respeitar a identidade corporativa da marca, garantindo legibilidade e uso ideal em campo.
* **Paleta de Cores Customizada:** * **Paleta de Cores Customizada:**
* `CargillGreen` (`#005F40`): Cor principal aplicada em botões chave, barras de título e destaques de progresso concluído. * `BrandGreen` (`#005F40`): Cor principal aplicada em botões chave, barras de título e destaques de progresso concluído.
* `CargillBlack` (`#1A1A1A`): Tom escuro predominante no fundo em modo escuro. * `BrandBlack` (`#1A1A1A`): Tom escuro predominante no fundo em modo escuro.
* `CargillLightGreen` (`#E8F5E9`): Utilizado como cor de fundo para badges e indicadores secundários. * `BrandLightGreen` (`#E8F5E9`): Utilizado como cor de fundo para badges e indicadores secundários.
* `LightGrey` (`#F5F7F6`): Fundo claro suave para o modo diurno. * `LightGrey` (`#F5F7F6`): Fundo claro suave para o modo diurno.
* **Componentes Premium M3:** * **Componentes Premium M3:**
* Uso de **Glassmorphism** sutil nos diálogos e cartões de lista. * Uso de **Glassmorphism** sutil nos diálogos e cartões de lista.

View File

@@ -1,6 +1,6 @@
# Especificação de Design e Recursos Visuais # Especificação de Design e Recursos Visuais
Esta documentação descreve os recursos visuais e a estrutura de tela do aplicativo **Gestão de Manutenção (Cargill Parada OS)** baseando-se no layout atual de produção (conforme print do app em execução). Esta documentação descreve os recursos visuais e a estrutura de tela do aplicativo **Gestão de Manutenção (Gestão Parada OS)** baseando-se no layout atual de produção (conforme print do app em execução).
O objetivo deste documento é servir de guia detalhado para expandir a complexidade do aplicativo, adicionando novas telas, fluxos de navegação e componentes visuais mais robustos. O objetivo deste documento é servir de guia detalhado para expandir a complexidade do aplicativo, adicionando novas telas, fluxos de navegação e componentes visuais mais robustos.
@@ -8,11 +8,11 @@ O objetivo deste documento é servir de guia detalhado para expandir a complexid
## 1. Análise da Identidade Visual e Estilo (Design System) ## 1. Análise da Identidade Visual e Estilo (Design System)
O aplicativo utiliza um visual moderno que busca equilibrar a seriedade industrial com a identidade visual da marca Cargill. O aplicativo utiliza um visual moderno que busca equilibrar a seriedade industrial com a identidade visual da marca.
* **Paleta de Cores:** * **Paleta de Cores:**
* **Fundo Geral:** Cinza neutro muito claro (`#F5F7F6` / `LightGrey`), reduzindo a fadiga visual sob luz solar em campo. * **Fundo Geral:** Cinza neutro muito claro (`#F5F7F6` / `LightGrey`), reduzindo a fadiga visual sob luz solar em campo.
* **Cor Primária (Destaques da Marca):** Verde Cargill escuro (`#005F40`), utilizado no cabeçalho do usuário, botões de ação prioritários e nos chips selecionados. * **Cor Primária (Destaques da Marca):** Verde escuro da marca (`#005F40`), utilizado no cabeçalho do usuário, botões de ação prioritários e nos chips selecionados.
* **Cor Secundária (Textos e Títulos):** Preto carvão (`#1A1A1A`), oferecendo alto contraste para textos e números. * **Cor Secundária (Textos e Títulos):** Preto carvão (`#1A1A1A`), oferecendo alto contraste para textos e números.
* **Cores de Status (Feedback Visual):** * **Cores de Status (Feedback Visual):**
* *Concluído/Sincronizado:* Verde folha (`#E8F5E9` para fundo, `#005F40` para ícone/texto). * *Concluído/Sincronizado:* Verde folha (`#E8F5E9` para fundo, `#005F40` para ícone/texto).

View File

@@ -37,7 +37,7 @@ O aplicativo adota uma arquitetura **offline-first** (local prioritário) basead
### Como funciona o armazenamento? ### Como funciona o armazenamento?
O armazenamento é realizado por meio do **Room Database**, que é uma camada de abstração sobre o **SQLite** nativo do Android. O armazenamento é realizado por meio do **Room Database**, que é uma camada de abstração sobre o **SQLite** nativo do Android.
* O arquivo do banco de dados local (`cargill_maintenance_db`) é salvo no diretório privado do aplicativo dentro do armazenamento interno do aparelho: `/data/data/com.example/databases/cargill_maintenance_db`. * O arquivo do banco de dados local (`maintenance_db`) é salvo no diretório privado do aplicativo dentro do armazenamento interno do aparelho: `/data/data/com.example/databases/maintenance_db`.
### Múltiplos usuários conseguem acessar a mesma base de dados diretamente? ### Múltiplos usuários conseguem acessar a mesma base de dados diretamente?
**Não.** Por ser um banco de dados **local e interno ao dispositivo**, o arquivo SQLite é isolado e privado para a instância do aplicativo instalada naquele smartphone/tablet específico. **Não.** Por ser um banco de dados **local e interno ao dispositivo**, o arquivo SQLite é isolado e privado para a instância do aplicativo instalada naquele smartphone/tablet específico.

View File

@@ -18,10 +18,11 @@ adb install -r app/build/outputs/apk/debug/app-debug.apk
export JAVA_HOME="/home/cesarjhony/dev/projects/gestao_de_manutencao/jdk" export JAVA_HOME="/home/cesarjhony/dev/projects/gestao_de_manutencao/jdk"
export PATH="$JAVA_HOME/bin:$PATH" export PATH="$JAVA_HOME/bin:$PATH"
./gradle_9_3_1/gradle-9.3.1/bin/gradle assembleDebug ./gradle_9_3_1/gradle-9.3.1/bin/gradle clean assembleDebug --no-build-cache --no-configuration-cache --rerun-tasks
### Build Rápido (Incremental/Offline)
```bash
JAVA_HOME="/home/cesarjhony/dev/projects/gestao_de_manutencao/jdk" ./gradle_9_3_1/gradle-9.3.1/bin/gradle :app:assembleDebug --offline JAVA_HOME="/home/cesarjhony/dev/projects/gestao_de_manutencao/jdk" ./gradle_9_3_1/gradle-9.3.1/bin/gradle :app:assembleDebug --offline
```

View File

@@ -1,6 +1,6 @@
# Listagem de Recursos Simulados e Truncados # Listagem de Recursos Simulados e Truncados
Durante a análise técnica do código fonte do aplicativo de Gestão de Manutenção de Parada da Cargill, foram identificados recursos que possuem comportamento simulado (mockado) ou que foram implementados de forma parcial/truncada (stubs ou no-ops). Durante a análise técnica do código fonte do aplicativo de Gestão de Manutenção de Parada, foram identificados recursos que possuem comportamento simulado (mockado) ou que foram implementados de forma parcial/truncada (stubs ou no-ops).
Abaixo está o levantamento detalhado de cada um desses elementos, com suas respectivas localizações de arquivos e descrições técnicas. Abaixo está o levantamento detalhado de cada um desses elementos, com suas respectivas localizações de arquivos e descrições técnicas.

View File

@@ -1,6 +1,6 @@
{ {
"name": "Cargill Parada OS", "name": "Gestão Parada OS",
"description": "Aplicativo offline-first para gestão de ordens de serviço durante paradas de manutenção industrial Cargill.", "description": "Aplicativo offline-first para gestão de ordens de serviço durante paradas de manutenção industrial.",
"requestFramePermissions": [], "requestFramePermissions": [],
"majorCapabilities": ["MAJOR_CAPABILITY_SERVER_SIDE_GEMINI_API"] "majorCapabilities": ["MAJOR_CAPABILITY_SERVER_SIDE_GEMINI_API"]
} }