-
Notifications
You must be signed in to change notification settings - Fork 44
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Feature/versioning #225
Feature/versioning #225
Conversation
} | ||
|
||
export function transformSet(entity, operation) { | ||
if (operation === 'update') { |
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.
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
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.
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'} /> |
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.
So if you create an object that I mentioned here you could use it here with toUpperCase()
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 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.
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.
Yeah, I agree with that
} | ||
|
||
export interface VersionRowParsed extends VersionRow { | ||
data: any|null; |
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.
Are you positive that null
is needed here?
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.
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?
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.
fixed
No description provided.