diff --git a/Applications/AdminUi/apps/admin_ui/lib/home/identity_details/identity_relationships/identity_relationship_data_table_source.dart b/Applications/AdminUi/apps/admin_ui/lib/home/identity_details/identity_relationships/identity_relationship_data_table_source.dart index 97cb80c146..ebb4ea5f16 100644 --- a/Applications/AdminUi/apps/admin_ui/lib/home/identity_details/identity_relationships/identity_relationship_data_table_source.dart +++ b/Applications/AdminUi/apps/admin_ui/lib/home/identity_details/identity_relationships/identity_relationship_data_table_source.dart @@ -62,14 +62,16 @@ class IdentityRelationshipDataTableSource extends AsyncDataTableSource { ), ), DataCell( - Tooltip( - message: - '${DateFormat.yMd(locale.languageCode).format(relationship.$2.answeredAt)} ${DateFormat.Hms().format(relationship.$2.answeredAt)}', - child: Text(DateFormat.yMd(locale.languageCode).format(relationship.$2.answeredAt)), - ), + relationship.$2.answeredAt == null + ? const Text('-') + : Tooltip( + message: + '${DateFormat.yMd(locale.languageCode).format(relationship.$2.answeredAt!)} ${DateFormat.Hms().format(relationship.$2.answeredAt!)}', + child: Text(DateFormat.yMd(locale.languageCode).format(relationship.$2.answeredAt!)), + ), ), DataCell(Text(relationship.$2.createdByDevice)), - DataCell(Text(relationship.$2.answeredByDevice)), + DataCell(Text(relationship.$2.answeredByDevice ?? '-')), ], ), ) diff --git a/Applications/AdminUi/packages/admin_api_types/lib/src/relationships/relationship.dart b/Applications/AdminUi/packages/admin_api_types/lib/src/relationships/relationship.dart index fa122a8675..9302178b7f 100644 --- a/Applications/AdminUi/packages/admin_api_types/lib/src/relationships/relationship.dart +++ b/Applications/AdminUi/packages/admin_api_types/lib/src/relationships/relationship.dart @@ -9,9 +9,9 @@ class Relationship { final String templateId; final String status; final DateTime creationDate; - final DateTime answeredAt; + final DateTime? answeredAt; final String createdByDevice; - final String answeredByDevice; + final String? answeredByDevice; Relationship({ required this.peer, diff --git a/Applications/AdminUi/packages/admin_api_types/lib/src/relationships/relationship.g.dart b/Applications/AdminUi/packages/admin_api_types/lib/src/relationships/relationship.g.dart index bb618970d6..21b1e0770f 100644 --- a/Applications/AdminUi/packages/admin_api_types/lib/src/relationships/relationship.g.dart +++ b/Applications/AdminUi/packages/admin_api_types/lib/src/relationships/relationship.g.dart @@ -12,9 +12,9 @@ Relationship _$RelationshipFromJson(Map json) => Relationship( templateId: json['templateId'] as String, status: json['status'] as String, creationDate: DateTime.parse(json['creationDate'] as String), - answeredAt: DateTime.parse(json['answeredAt'] as String), + answeredAt: json['answeredAt'] == null ? null : DateTime.parse(json['answeredAt'] as String), createdByDevice: json['createdByDevice'] as String, - answeredByDevice: json['answeredByDevice'] as String, + answeredByDevice: json['answeredByDevice'] as String?, ); Map _$RelationshipToJson(Relationship instance) => { @@ -23,7 +23,7 @@ Map _$RelationshipToJson(Relationship instance) =>