fix: improve Google Sheets column mapping for the resumo field to prevent false positives

This commit is contained in:
Jhony Cesar
2026-07-15 23:29:31 -04:00
parent 7ad2c1b1b8
commit c2445065b1

View File

@@ -365,7 +365,11 @@ class GoogleSheetsSyncService(private val context: Context) {
// 8. Resumo: column mapping to filter service orders (only Resumo = Não)
val resumoIdx = headers.indexOfFirst {
it.contains("resumo")
it == "resumo"
}.let { idx ->
if (idx != -1) idx else headers.indexOfFirst {
it.contains("resumo") && !it.contains("nome") && !it.contains("tarefa")
}
}
Log.d(tag, "Mapped Column Indices: taskName=$taskNameIdx, group=$groupIdx, resource=$resourceIdx, inicio=$inicioIdx, fim=$fimIdx, outline=$outlineIdx, id=$idIdx, resumo=$resumoIdx")