oak-general-business/src/pages/system/upsert/index.ts

32 lines
649 B
TypeScript

export default OakComponent({
isList: false,
entity: 'system',
projection: {
id: 1,
name: 1,
config: 1,
description: 1,
super: 1,
},
async formData({ data }) {
return data || {};
},
lifetimes: {
ready() {
const { platformId, oakId } = this.props;
if (!oakId) {
if (platformId) {
this.setUpdateData('platformId', platformId);
}
}
},
},
methods: {
async confirm() {
await this.execute();
this.navigateBack();
}
},
});