Open kohsah opened 6 years ago
@surajpt - SubIssue1
getting this error, "Add Document" -> Click on "Metadata" tab in form :
TypeError: Cannot read property 'keyword' of undefined
ClassificationMetadataForm._this.renderClassificationForm
D:/develop/github/gawati/gawati-client/src/views/forms/ClassificationMetadataForm.js:105
102 | renderClassificationForm = () => {
103 | const docClassifications = this.props.pkg.pkgIdentity.docClassifications;
104 | let result;
> 105 | if(docClassifications.keyword!==undefined && docClassifications.keyword.length>0){
106 | result = this.renderClassifications(docClassifications.keyword);
107 | }else{
108 | result = this.renderNoClassifications();
View compiled
ClassificationMetadataForm._this.render
D:/develop/github/gawati/gawati-client/src/views/forms/ClassificationMetadataForm.js:132
129 | }
130 |
131 | render = () => {
> 132 | return this.renderClassificationForm();
133 | }
134 |
135 | };
View compiled
▶ 16 stack frames were collapsed.
This screen is visible only in development. It will not appear if the app crashes in production.
Open your browser’s developer console to further inspect this error.
@surajpt - SubIssue2
@surajpt - SubIssue3
Editing an existing document... attempted to type in add more metadata field, got this error immediately:
×
TypeError: Cannot read property 'length' of undefined
ClassificationMetadataForm._this.renderClassificationForm
D:/develop/github/gawati/gawati-client/src/views/forms/ClassificationMetadataForm.js:112
109 | }
110 |
111 | let metadataArray = [];
> 112 | for(let i=0; i<this.state.metadata.length;i++){
113 | metadataArray.push({value:this.state.metadata[i].value, label:this.state.metadata[i].showAs});
114 | }
115 |
View compiled
ClassificationMetadataForm._this.render
D:/develop/github/gawati/gawati-client/src/views/forms/ClassificationMetadataForm.js:132
129 | }
130 |
131 | render = () => {
> 132 | return this.renderClassificationForm();
133 | }
134 |
135 | };
View compiled
▶ 18 stack frames were collapsed.
(anonymous function)
D:/develop/github/gawati/gawati-client/src/views/forms/ClassificationMetadataForm.js:64
61 | axios.get(apiMetadata, {
62 | })
63 | .then(response => {
> 64 | this.setState({ metadata: response.data.metadata});
65 | console.log(response);
66 | })
67 | .catch(function(error) {
View compiled
@surajpt Subissue3 i have fixed, there was an unclosed comment in your commit for gawati-client-data
@surajpt Subissue4 - When i select an item in the list nothing happens...
1) Add a Tab Panel to DocumentForm that has a ReactSelect control .
2) The React Select should query the set of keyword metadata from current documents, and show them for selection. An additional options should allow looking up the portal data set (on the portal-ui system):
3) This is how the keywords are stored in the XML ...
The metadata panel allows such a block (or adding this ) in a document loaded into the editor.