Skip to content

Commit

Permalink
LA-1294 Fixed log entries displayed as null
Browse files Browse the repository at this point in the history
  • Loading branch information
KhaledNjim authored and hoangdat committed Jun 4, 2024
1 parent 5a0409a commit 947721f
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion data/lib/src/network/linshare_http_client.dart
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ class LinShareHttpClient {
}

AuditLogEntryUserDto? _convertToAuditLogEntryNodeChild(Map<String, dynamic> nodeChildJson) {
if (nodeChildJson['type'] == AuditLogEntryType.WORK_GROUP.value) {
if (nodeChildJson['type'] == AuditLogEntryType.WORK_GROUP.value || nodeChildJson['type'] == AuditLogEntryType.WORKGROUP.value) {
return SharedSpaceNodeAuditLogEntryDto.fromJson(nodeChildJson);
} else if (nodeChildJson['type'] == AuditLogEntryType.WORKGROUP_MEMBER.value) {
return SharedSpaceMemberAuditLogEntryDto.fromJson(nodeChildJson);
Expand Down
3 changes: 3 additions & 0 deletions domain/lib/src/extension/audit_log_entry_type.dart
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@ extension AuditLogEntryTypeExtension on AuditLogEntryType {
switch(this) {
case AuditLogEntryType.WORK_GROUP:
return 'WORK_GROUP';
case AuditLogEntryType.WORKGROUP:
return 'WORKGROUP';
case AuditLogEntryType.WORKGROUP_MEMBER:
return 'WORKGROUP_MEMBER';
case AuditLogEntryType.WORKGROUP_FOLDER:
Expand All @@ -59,6 +61,7 @@ extension AuditLogEntryTypeExtension on AuditLogEntryType {
ClientLogAction generateClientLogAction(AuditLogEntry auditLogEntry) {
switch(this) {
case AuditLogEntryType.WORK_GROUP:
case AuditLogEntryType.WORKGROUP:
if (auditLogEntry.action == LogAction.CREATE) {
return ClientLogAction.CREATE;
} else if (auditLogEntry.action == LogAction.DELETE) {
Expand Down
1 change: 1 addition & 0 deletions domain/lib/src/model/audit/audit_log_entry_type.dart
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@

enum AuditLogEntryType {
WORK_GROUP,
WORKGROUP,
WORKGROUP_MEMBER,
WORKGROUP_FOLDER,
WORKGROUP_DOCUMENT,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ extension AuditLogEntryTypeExtension on AuditLogEntryType {
bool isCurrentUserAuthor) {
switch (this) {
case AuditLogEntryType.WORK_GROUP:
case AuditLogEntryType.WORKGROUP:
switch (clientLogAction) {
case ClientLogAction.CREATE:
return {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ extension AuditLogEntryUserExtension on AuditLogEntryUser {
String getAuditLogIconPath(AppImagePaths imagePath) {
switch (type) {
case AuditLogEntryType.WORK_GROUP:
case AuditLogEntryType.WORKGROUP:
return imagePath.icSharedSpace;
case AuditLogEntryType.WORKGROUP_MEMBER:
return imagePath.icAddMember;
Expand Down

0 comments on commit 947721f

Please sign in to comment.