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

Feature/versioning #225

Merged
merged 23 commits into from
Nov 11, 2020
Merged

Feature/versioning #225

merged 23 commits into from
Nov 11, 2020

Conversation

StyleT
Copy link
Contributor

@StyleT StyleT commented Nov 10, 2020

No description provided.

@StyleT StyleT marked this pull request as ready for review November 10, 2020 16:30
}

export function transformSet(entity, operation) {
if (operation === 'update') {
Copy link
Contributor

Choose a reason for hiding this comment

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

In my opinion, it would be nice to have one object with operations and use it everywhere
because as I see operations are copy/pasted in each of the files

Copy link
Contributor Author

Choose a reason for hiding this comment

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

fixed

<TextField sortable={false} source="id" />
<TextField sortable={false} source="entity_type" />
<TextField sortable={false} source="entity_id" />
<FunctionField label="Operation" render={record => record.data && record.data_after ? 'UPDATE' : record.data ? 'DELETE' : 'CREATE'} />
Copy link
Contributor

Choose a reason for hiding this comment

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

So if you create an object that I mentioned here you could use it here with toUpperCase()

Copy link
Contributor

Choose a reason for hiding this comment

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

I think that using here the same variable is a little bit incorrect since it's View with simple textual information which can be changed. So it's better to not mix presentation and logic inside a single variable.

Copy link
Contributor

Choose a reason for hiding this comment

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

Yeah, I agree with that

}

export interface VersionRowParsed extends VersionRow {
data: any|null;
Copy link
Contributor

Choose a reason for hiding this comment

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

Are you positive that null is needed here?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

not really, just a silly attempt to express that here we may have random object or null.. Do you know a better typing for this?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

fixed

@StyleT StyleT merged commit cc002eb into master Nov 11, 2020
@StyleT StyleT deleted the feature/versioning branch November 11, 2020 15:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants