feat(notifications): day sheet notification types

Add daySheetId field to NotificationItem model (Brick-managed), extract
notificationTitle/notificationIcon to top-level testable functions, add
five day-sheet notification cases, and wire tap/banner routing for
day-sheet detail and approvals tab.
Co-Authored-By: claude-flow <ruv@ruv.net>
This commit is contained in:
2026-09-28 14:54:19 +08:00
parent 54ce528b02
commit 5af0ce62d9
8 changed files with 219 additions and 38 deletions
@@ -0,0 +1,36 @@
// GENERATED CODE EDIT WITH CAUTION
// THIS FILE **WILL NOT** BE REGENERATED
// This file should be version controlled and can be manually edited.
part of 'schema.g.dart';
// While migrations are intelligently created, the difference between some commands, such as
// DropTable vs. RenameTable, cannot be determined. For this reason, please review migrations after
// they are created to ensure the correct inference was made.
// The migration version must **always** mirror the file name
const List<MigrationCommand> _migration_20260928065256_up = [
InsertColumn('day_sheet_id', Column.varchar, onTable: 'NotificationItem')
];
const List<MigrationCommand> _migration_20260928065256_down = [
DropColumn('day_sheet_id', onTable: 'NotificationItem')
];
//
// DO NOT EDIT BELOW THIS LINE
//
@Migratable(
version: '20260928065256',
up: _migration_20260928065256_up,
down: _migration_20260928065256_down,
)
class Migration20260928065256 extends Migration {
const Migration20260928065256()
: super(
version: 20260928065256,
up: _migration_20260928065256_up,
down: _migration_20260928065256_down,
);
}
+6 -3
View File
@@ -1,22 +1,24 @@
// GENERATED CODE DO NOT EDIT
// This file should be version controlled
import 'package:brick_sqlite/db.dart';
part '20260927030348.migration.dart';
part '20260928065256.migration.dart';
part '20260411041808.migration.dart';
part '20260411042152.migration.dart';
part '20260926162926.migration.dart';
part '20260927030348.migration.dart';
/// All intelligently-generated migrations from all `@Migratable` classes on disk
final migrations = <Migration>{
const Migration20260927030348(),
const Migration20260928065256(),
const Migration20260411041808(),
const Migration20260411042152(),
const Migration20260926162926(),
const Migration20260927030348(),
};
/// A consumable database structure including the latest generated migration.
final schema = Schema(
20260926162926,
20260927030348,
generatorVersion: 1,
tables: <SchemaTable>{
SchemaTable(
@@ -271,6 +273,7 @@ final schema = Schema(
SchemaColumn('it_service_request_id', Column.varchar),
SchemaColumn('announcement_id', Column.varchar),
SchemaColumn('message_id', Column.integer),
SchemaColumn('day_sheet_id', Column.varchar),
SchemaColumn('type', Column.varchar),
SchemaColumn('created_at', Column.datetime),
SchemaColumn('read_at', Column.datetime),