-
Notifications
You must be signed in to change notification settings - Fork 3.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: show layout changes in web #2574
Conversation
async findDeleted(_id: LayoutId, _environmentId: EnvironmentId): Promise<LayoutEntity> { | ||
const res = await this.layout.findDeleted({ _id, _environmentId }); | ||
|
||
return this.mapEntity(res); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@p-fernandez I was not sure how you would like to do the mapEntity. As I don't feel this deserves a usecase.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Replied to this in the other comment regarding the use case. But the mapping as agreed in the last tech summit should live here, so that's ok. 👍🏻
}); | ||
|
||
if (!item) { | ||
const items = await this.layoutRepository.findDeleted(entityId, environmentId); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is to show the change of a deleted layout
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🌟
let item = await this.layoutRepository.findOne({ | ||
_environmentId: environmentId, | ||
_id: entityId, | ||
}); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have seen that this module has no dependencies beyond the SharedModule and AuthModule. But I consider we shouldn't call the Layout repository here and take use of the Layout module use cases.
Here, we would need the GetLayoutUseCase
. And then we would need to implement the use case to find a deleted layout.
async findDeleted(_id: LayoutId, _environmentId: EnvironmentId): Promise<LayoutEntity> { | ||
const res = await this.layout.findDeleted({ _id, _environmentId }); | ||
|
||
return this.mapEntity(res); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Replied to this in the other comment regarding the use case. But the mapping as agreed in the last tech summit should live here, so that's ok. 👍🏻
d5b7959
to
a9b47e0
Compare
77518d6
to
d8b9e5c
Compare
d8b9e5c
to
4849bd0
Compare
What change does this PR introduce?
Show layout changes in promote table
Why was this change needed?
Other information (Screenshots)