-
Notifications
You must be signed in to change notification settings - Fork 4.1k
allow creating updating ai-document, change source base node to objec… #7877
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,13 +14,19 @@ module.exports = (AIDocumentSearchView = (function () { | |
AIDocumentSearchView = class AIDocumentSearchView extends SearchView { | ||
static initClass () { | ||
this.prototype.id = 'editor-ai-document-home-view' | ||
this.prototype.modelLabel = 'Document' | ||
this.prototype.modelLabel = 'AI Document' | ||
this.prototype.model = require('models/AIDocument') | ||
this.prototype.modelURL = '/db/ai_document' | ||
this.prototype.tableTemplate = require('app/templates/editor/ai-document/table') | ||
this.prototype.projection = ['type', 'source'] | ||
this.prototype.page = 'ai-document' | ||
this.prototype.canMakeNew = false | ||
this.prototype.canMakeNew = true | ||
this.prototype.hasNoNameProperty = true | ||
this.prototype.modelProperties = { | ||
source: { | ||
type: 'link', | ||
}, | ||
} | ||
Comment on lines
+17
to
+29
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🛠️ Refactor suggestion Replace 'this' with Class Name in Static Method to Avoid Confusion Using Apply this diff to replace - this.prototype.id = 'editor-ai-document-home-view'
- this.prototype.modelLabel = 'AI Document'
- this.prototype.canMakeNew = true
- this.prototype.hasNoNameProperty = true
- this.prototype.modelProperties = {
+ AIDocumentSearchView.prototype.id = 'editor-ai-document-home-view'
+ AIDocumentSearchView.prototype.modelLabel = 'AI Document'
+ AIDocumentSearchView.prototype.canMakeNew = true
+ AIDocumentSearchView.prototype.hasNoNameProperty = true
+ AIDocumentSearchView.prototype.modelProperties = {
source: {
type: 'link',
},
} This change will also resolve the linter errors reported by Biome regarding the use of
🧰 Tools🪛 Biome (1.9.4)[error] 17-17: Using this in a static context can be confusing. this refers to the class. (lint/complexity/noThisInStatic) [error] 18-18: Using this in a static context can be confusing. this refers to the class. (lint/complexity/noThisInStatic) [error] 19-19: Using this in a static context can be confusing. this refers to the class. (lint/complexity/noThisInStatic) [error] 20-20: Using this in a static context can be confusing. this refers to the class. (lint/complexity/noThisInStatic) [error] 21-21: Using this in a static context can be confusing. this refers to the class. (lint/complexity/noThisInStatic) [error] 22-22: Using this in a static context can be confusing. this refers to the class. (lint/complexity/noThisInStatic) [error] 23-23: Using this in a static context can be confusing. this refers to the class. (lint/complexity/noThisInStatic) [error] 24-24: Using this in a static context can be confusing. this refers to the class. (lint/complexity/noThisInStatic) [error] 25-25: Using this in a static context can be confusing. this refers to the class. (lint/complexity/noThisInStatic) |
||
|
||
this.prototype.events = | ||
{ 'click #delete-button': 'deleteAIDocument' } | ||
|
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.
Undefined 'TreemaNode': Ensure 'TreemaNode' is Imported or Defined
At line 138, 'TreemaNode' is not defined, which will result in a reference error. Please import or define 'TreemaNode' before using it.
Apply this diff to import 'TreemaNode':
+ const TreemaNode = require('path/to/treema');
Ensure the correct path is used for the import based on your project structure.
🧰 Tools
🪛 eslint
[error] 138-138: 'TreemaNode' is not defined.
(no-undef)