Skip to content
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

Merged
merged 1 commit into from
Jan 23, 2023

Conversation

ainouzgali
Copy link
Contributor

What change does this PR introduce?

Show layout changes in promote table

Why was this change needed?

Other information (Screenshots)

Screen Shot 2023-01-23 at 11 25 36

@linear
Copy link

linear bot commented Jan 23, 2023

Comment on lines 153 to 170
async findDeleted(_id: LayoutId, _environmentId: EnvironmentId): Promise<LayoutEntity> {
const res = await this.layout.findDeleted({ _id, _environmentId });

return this.mapEntity(res);
}
Copy link
Contributor Author

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.

Copy link
Contributor

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);
Copy link
Contributor Author

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

Copy link
Contributor

@p-fernandez p-fernandez left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🌟

Comment on lines +181 to +184
let item = await this.layoutRepository.findOne({
_environmentId: environmentId,
_id: entityId,
});
Copy link
Contributor

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.

Comment on lines 153 to 170
async findDeleted(_id: LayoutId, _environmentId: EnvironmentId): Promise<LayoutEntity> {
const res = await this.layout.findDeleted({ _id, _environmentId });

return this.mapEntity(res);
}
Copy link
Contributor

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. 👍🏻

@p-fernandez p-fernandez force-pushed the nv-1502-changes-create-a-layout-change branch 2 times, most recently from d5b7959 to a9b47e0 Compare January 23, 2023 11:41
Base automatically changed from nv-1502-changes-create-a-layout-change to feat-layouts January 23, 2023 11:52
@p-fernandez p-fernandez force-pushed the nv-1564-web-show-layouts-changes branch 2 times, most recently from 77518d6 to d8b9e5c Compare January 23, 2023 11:58
@p-fernandez p-fernandez force-pushed the nv-1564-web-show-layouts-changes branch from d8b9e5c to 4849bd0 Compare January 23, 2023 12:09
@ainouzgali ainouzgali merged commit 7acd041 into feat-layouts Jan 23, 2023
@ainouzgali ainouzgali deleted the nv-1564-web-show-layouts-changes branch January 23, 2023 12:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants