You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
35 lines
962 B
35 lines
962 B
import { shortcut } from '@core/core'; |
|
import { Connection } from 'src/modules/crud/crud.typings'; |
|
import { getPluginWidgetEdit } from '../../../../app.service'; |
|
@shortcut() |
|
export class FormPlugin extends BI.Widget { |
|
static xtype = 'dec.dcm.maintain_plugin'; |
|
props = { |
|
formData: {} as Connection, |
|
} |
|
|
|
plugin: any; |
|
|
|
render() { |
|
const { connectionType } = this.options.formData; |
|
|
|
return { |
|
type: getPluginWidgetEdit(connectionType), |
|
ref: (_ref: any) => { |
|
this.plugin = _ref; |
|
}, |
|
value: this.options.formData.connectionData, |
|
}; |
|
} |
|
|
|
public getSubmitValue(): Connection { |
|
const { connectionType, connectionId, connectionName } = this.options.formData; |
|
|
|
return { |
|
connectionId, |
|
connectionType, |
|
connectionName, |
|
connectionData: this.plugin.getValue(), |
|
}; |
|
} |
|
}
|
|
|