Monorepo: Gitea CI, docs, auth/sync, backend APIs, gitignore
- Add Gitea Actions workflow; point README to gitea.d-bis.org/Sankofa_Phoenix/SMOA - Expand .gitignore for Spring H2 data, secrets, Kotlin .kotlin/, tooling - Track docs/api/generated ReDoc bundle; refresh api docs README - Android: network/auth/sync, UI shell, tests; backend credentials/integrity APIs - Docs, scripts (generate-api-docs), modules and core updates Made-with: Cursor
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
plugins {
|
||||
id("com.android.library")
|
||||
id("org.jetbrains.kotlin.android")
|
||||
id("com.google.dagger.hilt.android")
|
||||
id("kotlin-kapt")
|
||||
id("dagger.hilt.android.plugin")
|
||||
}
|
||||
|
||||
android {
|
||||
@@ -29,6 +29,14 @@ android {
|
||||
composeOptions {
|
||||
kotlinCompilerExtensionVersion = "1.5.4"
|
||||
}
|
||||
|
||||
hilt {
|
||||
enableAggregatingTask = true
|
||||
}
|
||||
}
|
||||
|
||||
kapt {
|
||||
correctErrorTypes = true
|
||||
}
|
||||
|
||||
dependencies {
|
||||
@@ -59,4 +67,3 @@ dependencies {
|
||||
testImplementation(Dependencies.coroutinesTest)
|
||||
testImplementation(Dependencies.truth)
|
||||
}
|
||||
|
||||
|
||||
+1
@@ -27,6 +27,7 @@ object DirectoryDatabaseModule {
|
||||
"directory_database"
|
||||
)
|
||||
.openHelperFactory(factory)
|
||||
.addCallback(DirectoryDemoSeedCallback)
|
||||
.build()
|
||||
}
|
||||
|
||||
|
||||
+30
@@ -0,0 +1,30 @@
|
||||
package com.smoa.modules.directory.data
|
||||
|
||||
import androidx.room.RoomDatabase
|
||||
import androidx.sqlite.db.SupportSQLiteDatabase
|
||||
|
||||
/**
|
||||
* Inserts a few [DirectoryEntity] rows on first DB create so the UI has demo content
|
||||
* before a backend sync is wired. Matches default dev session unit "Unit1" in [com.smoa.MainActivity].
|
||||
*/
|
||||
internal object DirectoryDemoSeedCallback : RoomDatabase.Callback() {
|
||||
override fun onCreate(db: SupportSQLiteDatabase) {
|
||||
super.onCreate(db)
|
||||
val now = System.currentTimeMillis()
|
||||
exec(
|
||||
db,
|
||||
"""
|
||||
INSERT OR IGNORE INTO directory_entries
|
||||
(id,name,title,unit,phoneNumber,extension,email,secureRoutingId,role,clearanceLevel,lastUpdated)
|
||||
VALUES
|
||||
('seed-1','Avery, R.','Watch Officer','Unit1','555-0100',NULL,'[email protected]',NULL,'OPERATOR','SECRET',$now),
|
||||
('seed-2','Brooks, M.','Duty Supervisor','Unit1','555-0101','221','[email protected]',NULL,'SUPERVISOR','SECRET',$now),
|
||||
('seed-3','Chen, L.','Comms Tech','Unit1','555-0102',NULL,'[email protected]',NULL,'OPERATOR','CONFIDENTIAL',$now)
|
||||
""".trimIndent().replace("\n", " ")
|
||||
)
|
||||
}
|
||||
|
||||
private fun exec(db: SupportSQLiteDatabase, sql: String) {
|
||||
db.execSQL(sql)
|
||||
}
|
||||
}
|
||||
+2
-11
@@ -28,18 +28,9 @@ fun DirectoryListScreen(
|
||||
var isLoading by remember { mutableStateOf(false) }
|
||||
var errorMessage by remember { mutableStateOf<String?>(null) }
|
||||
|
||||
// Observe directory entries
|
||||
LaunchedEffect(userRole, userUnit) {
|
||||
directoryService.observeDirectoryEntries(userRole, userUnit)
|
||||
.collect { entries ->
|
||||
directoryEntries = entries
|
||||
}
|
||||
}
|
||||
|
||||
// Search functionality
|
||||
LaunchedEffect(searchQuery) {
|
||||
// Single collector: parallel LaunchedEffects both collected the same Flow and raced updates.
|
||||
LaunchedEffect(userRole, userUnit, searchQuery) {
|
||||
if (searchQuery.isBlank()) {
|
||||
// Show all entries when search is empty
|
||||
directoryService.observeDirectoryEntries(userRole, userUnit)
|
||||
.collect { entries ->
|
||||
directoryEntries = entries
|
||||
|
||||
Reference in New Issue
Block a user