Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
7c07bb5
use bson property for user dto
mohammed-akkad May 10, 2025
4ddefaa
refactor update user in mongo data base data source
mohammed-akkad May 10, 2025
d877813
refactor data source module
mohammed-akkad May 10, 2025
8b53a36
update user screen
mohammed-akkad May 10, 2025
2d4aad5
add BsonProperty annotation for DTOs
May 10, 2025
e0dcc25
fix ProjectMapper to return projectDTO date as String and parse to Lo…
May 10, 2025
b126b4d
fix stateIdFilter to use '_id' instead of 'id' for MongoDB compatibility
May 10, 2025
d9dff30
refactor deleteState use case to take stateId instead of TaskState
May 10, 2025
53f53bc
Merge remote-tracking branch 'origin/develop' into refactor/102-refac…
mohammed-akkad May 11, 2025
9604ecc
Merge remote-tracking branch 'origin/refactor/105-refactor-mongodb-im…
mohammed-akkad May 11, 2025
5508710
refactor get all users
mohammed-akkad May 11, 2025
51233a0
implement audit logs MongoDB data source
May 11, 2025
34909ac
update show animation
mohammed-akkad May 11, 2025
04c3a67
rename UserDTO to UserDto
mohammed-akkad May 11, 2025
e6ae26e
Merge pull request #108 from Beijing-Squad/refactor/102-refactor-user…
MohamedOmar989 May 11, 2025
b6812f5
some enhancement
May 11, 2025
e211368
moving hash password to utils
MohamedOmar989 May 11, 2025
88b9890
moving dto files to remote data source package
MohamedOmar989 May 11, 2025
9ec052e
putting enum classes into audit class's body
MohamedOmar989 May 11, 2025
9a6f601
putting enum classes into audit class's body and edit it into test cases
MohamedOmar989 May 11, 2025
28b3a71
Merge remote-tracking branch 'origin/refactor/105-refactor-mongodb-im…
May 11, 2025
9af94ef
separate mongo connection file
MohamedOmar989 May 11, 2025
e07fed8
implement audit logs MongoDB data source
May 11, 2025
68d287a
Merge pull request #107 from Beijing-Squad/feature/77-implement-audit…
MohamedOmar989 May 11, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 0 additions & 15 deletions src/main/kotlin/data/dto/AuditDTO.kt

This file was deleted.

12 changes: 0 additions & 12 deletions src/main/kotlin/data/dto/ProjectDTO.kt

This file was deleted.

14 changes: 0 additions & 14 deletions src/main/kotlin/data/dto/TaskDTO.kt

This file was deleted.

8 changes: 0 additions & 8 deletions src/main/kotlin/data/dto/UserDTO.kt

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ package data.local.csvDataSource
import data.local.csvDataSource.csv.CsvDataSourceImpl
import data.repository.localDataSource.AuditDataSource
import logic.entities.Audit
import logic.entities.EntityType

class AuditCsvDataSourceImpl(
private val csvDataSource: CsvDataSourceImpl<Audit>
Expand All @@ -25,11 +24,11 @@ class AuditCsvDataSourceImpl(
override fun getAuditLogsByTaskId(taskId: String): List<Audit> {
return getAllAuditLogs().filter { audit: Audit ->
audit.entityId == taskId
&& audit.entityType == EntityType.TASK
&& audit.entityType == Audit.EntityType.TASK
}
}

private fun isMatchingProject(audit: Audit, projectId: String): Boolean {
return audit.entityId == projectId && audit.entityType == EntityType.PROJECT
return audit.entityId == projectId && audit.entityType == Audit.EntityType.PROJECT
}
}
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
package data.local.csvDataSource

import data.common.hashPassword
import data.local.csvDataSource.csv.CsvDataSourceImpl
import data.repository.localDataSource.AuthenticationDataSource
import data.repository.localDataSource.UserDataSource
import data.utils.hashPassword
import logic.entities.User
import logic.entities.UserRole
import logic.entities.type.UserRole
import logic.exceptions.InvalidPasswordException
import logic.exceptions.UserExistsException
import logic.exceptions.UserNotFoundException
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package data.local.csvDataSource

import data.common.hashPassword
import data.local.csvDataSource.csv.CsvDataSourceImpl
import data.repository.localDataSource.UserDataSource
import data.utils.hashPassword
import logic.entities.User
import logic.exceptions.UserNotFoundException
import kotlin.uuid.ExperimentalUuidApi
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,8 @@ package data.local.csvDataSource.parser

import data.local.csvDataSource.csv.CsvParser
import kotlinx.datetime.LocalDateTime
import logic.entities.ActionType
import logic.entities.Audit
import logic.entities.EntityType
import logic.entities.UserRole
import logic.entities.type.UserRole
import kotlin.uuid.ExperimentalUuidApi
import kotlin.uuid.Uuid

Expand Down Expand Up @@ -34,8 +32,8 @@ class AuditCsvParser : CsvParser<Audit> {
userRole = UserRole.valueOf(parts[1]),
userName = parts[2],
entityId = parts[3],
entityType = EntityType.valueOf(parts[4]),
action = ActionType.valueOf(parts[5]),
entityType = Audit.EntityType.valueOf(parts[4]),
action = Audit.ActionType.valueOf(parts[5]),
actionDetails = parts[6],
timeStamp = LocalDateTime.parse(parts[8])
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package data.local.csvDataSource.parser

import data.local.csvDataSource.csv.CsvParser
import logic.entities.User
import logic.entities.UserRole
import logic.entities.type.UserRole
import kotlin.uuid.ExperimentalUuidApi
import kotlin.uuid.Uuid

Expand Down
Loading
Loading