fix(reports): resolve Windows layout overflows and refine UI
- Fix 1px bottom overflow on Overall Compliance KPI card by adjusting height and padding - Fix text truncation for Pending Docs KPI card - Fix 49px bottom overflow on Students Per Year card by adjusting container and chart heights - Fix LayoutBuilder inside IntrinsicHeight issue on desktop report charts - Refine security settings, audit trail platform tracking, and document handling - Clean up unused conversion providers and LibreOffice service
This commit is contained in:
1 parent
13abad6563
commit
71526fe61e
30 files changed
+2163
-1605
No files matched your search
@@ -82,7 +82,15 @@ class AlarmReceiver : BroadcastReceiver() {
|
||||
}
|
||||
|
||||
var newHighestId = highestOldId
|
||||
ensureChannel(context)
|
||||
val soundEnabled = prefs.getBoolean("flutter.pref_sound_enabled", false)
|
||||
val vibrationEnabled = prefs.getBoolean("flutter.pref_vibration_enabled", false)
|
||||
val channelId = when {
|
||||
soundEnabled && vibrationEnabled -> "tis_rms_activities_sound_vibrate"
|
||||
soundEnabled -> "tis_rms_activities_sound_only"
|
||||
vibrationEnabled -> "tis_rms_activities_vibrate_only"
|
||||
else -> "tis_rms_activities_silent"
|
||||
}
|
||||
ensureChannel(context, channelId, soundEnabled, vibrationEnabled)
|
||||
val notifManager = context.getSystemService(Context.NOTIFICATION_SERVICE) as NotificationManager
|
||||
|
||||
for (i in 0 until list.length()) {
|
||||
@@ -107,7 +115,7 @@ class AlarmReceiver : BroadcastReceiver() {
|
||||
PendingIntent.FLAG_UPDATE_CURRENT or PendingIntent.FLAG_IMMUTABLE
|
||||
)
|
||||
|
||||
val notification = Notification.Builder(context, CHANNEL_ID)
|
||||
val notification = Notification.Builder(context, channelId)
|
||||
.setSmallIcon(R.drawable.ic_launcher_foreground)
|
||||
.setContentTitle(title)
|
||||
.setContentText(message)
|
||||
@@ -126,16 +134,26 @@ class AlarmReceiver : BroadcastReceiver() {
|
||||
}
|
||||
}
|
||||
|
||||
private fun ensureChannel(context: Context) {
|
||||
private fun ensureChannel(context: Context, channelId: String, soundEnabled: Boolean, vibrationEnabled: Boolean) {
|
||||
val manager = context.getSystemService(Context.NOTIFICATION_SERVICE) as NotificationManager
|
||||
if (manager.getNotificationChannel(CHANNEL_ID) != null) return
|
||||
if (manager.getNotificationChannel(channelId) != null) return
|
||||
val channelName = when (channelId) {
|
||||
"tis_rms_activities_sound_vibrate" -> "Recent Activities (Sound & Vibrate)"
|
||||
"tis_rms_activities_sound_only" -> "Recent Activities (Sound Only)"
|
||||
"tis_rms_activities_vibrate_only" -> "Recent Activities (Vibrate Only)"
|
||||
else -> "Recent Activities (Silent)"
|
||||
}
|
||||
val importance = if (soundEnabled || vibrationEnabled) NotificationManager.IMPORTANCE_HIGH else NotificationManager.IMPORTANCE_DEFAULT
|
||||
val channel = NotificationChannel(
|
||||
CHANNEL_ID,
|
||||
"Recent Activities",
|
||||
NotificationManager.IMPORTANCE_HIGH
|
||||
channelId,
|
||||
channelName,
|
||||
importance
|
||||
).apply {
|
||||
description = "Notifications for recent activities and system events"
|
||||
enableVibration(true)
|
||||
enableVibration(vibrationEnabled)
|
||||
if (!soundEnabled) {
|
||||
setSound(null, null)
|
||||
}
|
||||
}
|
||||
manager.createNotificationChannel(channel)
|
||||
}
|
||||
|
||||
@@ -16,16 +16,57 @@ class MainActivity : FlutterActivity() {
|
||||
|
||||
private fun ensureNotificationChannel() {
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
|
||||
val channelId = "tis_rms_activities_channel"
|
||||
val channelName = "Recent Activities"
|
||||
val channelDescription = "Notifications for recent activities and system events"
|
||||
val importance = NotificationManager.IMPORTANCE_HIGH
|
||||
val channel = NotificationChannel(channelId, channelName, importance).apply {
|
||||
description = channelDescription
|
||||
enableVibration(true)
|
||||
}
|
||||
val notificationManager = getSystemService(Context.NOTIFICATION_SERVICE) as NotificationManager
|
||||
notificationManager.createNotificationChannel(channel)
|
||||
|
||||
val channels = listOf(
|
||||
NotificationChannel(
|
||||
"tis_rms_activities_sound_vibrate",
|
||||
"Recent Activities (Sound & Vibrate)",
|
||||
NotificationManager.IMPORTANCE_HIGH
|
||||
).apply {
|
||||
description = "Notifications with sound and vibration"
|
||||
enableVibration(true)
|
||||
},
|
||||
NotificationChannel(
|
||||
"tis_rms_activities_sound_only",
|
||||
"Recent Activities (Sound Only)",
|
||||
NotificationManager.IMPORTANCE_HIGH
|
||||
).apply {
|
||||
description = "Notifications with sound only"
|
||||
enableVibration(false)
|
||||
},
|
||||
NotificationChannel(
|
||||
"tis_rms_activities_vibrate_only",
|
||||
"Recent Activities (Vibrate Only)",
|
||||
NotificationManager.IMPORTANCE_HIGH
|
||||
).apply {
|
||||
description = "Notifications with vibration only"
|
||||
enableVibration(true)
|
||||
setSound(null, null)
|
||||
},
|
||||
NotificationChannel(
|
||||
"tis_rms_activities_silent",
|
||||
"Recent Activities (Silent)",
|
||||
NotificationManager.IMPORTANCE_DEFAULT
|
||||
).apply {
|
||||
description = "Silent notifications without sound or vibration"
|
||||
enableVibration(false)
|
||||
setSound(null, null)
|
||||
},
|
||||
NotificationChannel(
|
||||
"tis_rms_activities_channel",
|
||||
"Recent Activities",
|
||||
NotificationManager.IMPORTANCE_DEFAULT
|
||||
).apply {
|
||||
description = "Notifications for recent activities and system events"
|
||||
enableVibration(false)
|
||||
setSound(null, null)
|
||||
}
|
||||
)
|
||||
|
||||
for (ch in channels) {
|
||||
notificationManager.createNotificationChannel(ch)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user