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.
55 lines
1.8 KiB
55 lines
1.8 KiB
import { shortcut, store } from '@core/core'; |
|
import { TitleDatebaseModel } from './title_datebase.model'; |
|
import { PAGE_INDEX } from '@constants/constant'; |
|
import { Button } from '@fui/core'; |
|
|
|
@shortcut() |
|
@store(TitleDatebaseModel) |
|
export class TitleDatabase extends BI.Widget { |
|
static xtype = 'dec.dcm.title.datebase'; |
|
|
|
store: TitleDatebaseModel['store']; |
|
model: TitleDatebaseModel['model']; |
|
|
|
submitButton: Button; |
|
|
|
watch = { |
|
datebaseTypeSelected: (datebaseTypeSelected: string) => { |
|
this.submitButton.setEnable(!!datebaseTypeSelected); |
|
}, |
|
} |
|
|
|
render() { |
|
return { |
|
type: BI.FloatRightLayout.xtype, |
|
items: [{ |
|
type: BI.VerticalAdaptLayout.xtype, |
|
height: 40, |
|
rgap: 5, |
|
items: [ |
|
{ |
|
type: BI.Button.xtype, |
|
$value: 'title-database-cancel', |
|
text: BI.i18nText('BI-Basic_Cancel'), |
|
level: 'ignore', |
|
handler: () => { |
|
this.store.setPageIndex(PAGE_INDEX.CONNECTION); |
|
}, |
|
}, |
|
{ |
|
type: BI.Button.xtype, |
|
$value: 'title-database-save', |
|
text: BI.i18nText('BI-Basic_Save'), |
|
disabled: !this.model.datebaseTypeSelected, |
|
ref: (_ref: Button) => { |
|
this.submitButton = _ref; |
|
}, |
|
handler: () => { |
|
this.store.setPageIndex(PAGE_INDEX.MAINTAIN); |
|
}, |
|
}, |
|
], |
|
}], |
|
}; |
|
} |
|
}
|
|
|