-
Notifications
You must be signed in to change notification settings - Fork 36
[TEMPORARY] Feature/#513 create dialog import collection #546
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
[TEMPORARY] Feature/#513 create dialog import collection #546
Conversation
JSON.parse(newValue); | ||
setJsonError(null); | ||
} catch (error) { | ||
setJsonError('El JSON no es válido'); |
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.
OOops, in english the message?
<div className={classes.jsonTextarea}> | ||
<label> | ||
JSON Schema: | ||
<textarea |
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's make the text area to fill the dialog available space
}; | ||
onSave(mapEditTableVmToTableVm(newTable)); | ||
} catch (error) { | ||
setJsonError('El JSON no es válido'); |
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.
English text
|
||
try { | ||
JSON.parse(newValue); | ||
setJsonError(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.
One additional case, the JSON maybe valid, but if the user passes an array (e.g. an array with two documents), we should as well treat this as an Error and display a message "Current version only accepts a single document object"
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's move this code to business so we can add unit tests
</div> | ||
<div className={classes.jsonTextarea}> | ||
<label> | ||
JSON Schema: |
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's name it: JSON Document
And add on top: Copy here a a document (you can copy it from a collection using a tool like Mongo Compass)
isCollapsed?: boolean; | ||
isArray?: boolean; | ||
isNN?: boolean; | ||
} |
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's move FieldType and FieldVm to the file
edit-table.model.ts
By using this we simplify this file and segregate
No description provided.