From 1bed1cae98012c6aded7a7271758c2f1ee429d46 Mon Sep 17 00:00:00 2001 From: enlineawork Date: Mon, 7 Sep 2026 21:28:53 -0300 Subject: [PATCH] F4 Android: keep branch compiling while UI migrates to lock/seal --- .../com/korexlabs/dhinspeccion/data/MobileActs.kt | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/android-app/app/src/main/java/com/korexlabs/dhinspeccion/data/MobileActs.kt b/android-app/app/src/main/java/com/korexlabs/dhinspeccion/data/MobileActs.kt index a3a40ef..3691826 100644 --- a/android-app/app/src/main/java/com/korexlabs/dhinspeccion/data/MobileActs.kt +++ b/android-app/app/src/main/java/com/korexlabs/dhinspeccion/data/MobileActs.kt @@ -331,7 +331,7 @@ class MobileActsRepository(context: Context) { visitId: String, assetId: String, visitCode: String, - urgency: String, + urgency: String = "NON_URGENT", ): MobileActDetail = authorized { session -> api.createAct( "Bearer ${session.accessToken}", @@ -367,6 +367,14 @@ class MobileActsRepository(context: Context) { api.lock("Bearer ${session.accessToken}", actId) } + /** Transitional alias used only while the F4 screen migration is in this branch. */ + suspend fun prepare(actId: String): MobileActClosure = lock(actId) + + /** F4 does not allow reopening an Act once it has been locked. */ + suspend fun reopen(@Suppress("UNUSED_PARAMETER") actId: String): MobileActClosure { + throw IllegalStateException("Un Acta finalizada es inmutable y no puede volver a borrador") + } + suspend fun signInspector( actId: String, png: File, @@ -406,6 +414,9 @@ class MobileActsRepository(context: Context) { api.sealAct("Bearer ${session.accessToken}", actId, MobileSealActRequest()) } + /** Transitional alias used only while the F4 screen migration is in this branch. */ + suspend fun closeAct(actId: String): MobileActClosure = seal(actId) + suspend fun closeVisit(visitId: String): VisitDetail = authorized { session -> api.closeVisit("Bearer ${session.accessToken}", visitId, MobileCloseVisitRequest()) }