Skip to content

Commit 98797f3

Browse files
authored
Merge pull request #1 from CovenantSQL/dev
Dev
2 parents 197f22b + 652fe6c commit 98797f3

2 files changed

Lines changed: 28 additions & 22 deletions

File tree

src/pages/project/$db/request.js

Lines changed: 23 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,8 @@ const requests = Object.values(CLIENT_API).map(item => {
5656
}
5757
})
5858

59+
const FormItem = Form.Item
60+
5961
let uuid = 2
6062
@Form.create()
6163
@connect(({ projectDetail }) => ({ config: projectDetail.config }))
@@ -140,11 +142,6 @@ class RequestPage extends React.Component {
140142
duration: 10,
141143
})
142144
})
143-
} else {
144-
notification.error({
145-
message: 'Please input required fields',
146-
description: '',
147-
})
148145
}
149146
})
150147
}
@@ -324,28 +321,34 @@ class RequestPage extends React.Component {
324321
<div>
325322
<Row gutter={8} type="flex" justify="start" align="middle">
326323
<Col style={{ marginTop: 8 }}>
327-
{getFieldDecorator(`check[table]`, {
328-
initialValue: true,
329-
})(<Checkbox defaultChecked disabled />)}
324+
<FormItem>
325+
{getFieldDecorator(`check[table]`, {
326+
initialValue: true,
327+
})(<Checkbox defaultChecked disabled />)}
328+
</FormItem>
330329
</Col>
331330
<Col style={{ marginTop: 8 }}>
332-
{getFieldDecorator(`key[table]`)(
333-
<Input placeholder="table" disabled />
334-
)}
331+
<FormItem>
332+
{getFieldDecorator(`key[table]`)(
333+
<Input placeholder="table" disabled />
334+
)}
335+
</FormItem>
335336
</Col>
336337
<Col style={{ marginTop: 8 }}>
337-
{getFieldDecorator(`table_value`, {
338-
rules: [
339-
{
340-
required: true,
341-
message: 'Please select a table',
342-
},
343-
],
344-
})(this.constructTableSelection())}
338+
<FormItem hasFeedback>
339+
{getFieldDecorator(`table_value`, {
340+
rules: [
341+
{
342+
required: true,
343+
message: 'Please select a table',
344+
},
345+
],
346+
})(this.constructTableSelection())}
347+
</FormItem>
345348
</Col>
346349
</Row>
347350
<Row gutter={8}>
348-
<div style={{ padding: '15px 10px 5px', fontWeight: '600' }}>
351+
<div style={{ padding: '0 10px 5px', fontWeight: '600' }}>
349352
Data:
350353
</div>
351354
{getFieldDecorator('data_value')(

src/utils/constant.js

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,11 @@ export const USER_PERMISSION = {
1919

2020
export const CANCEL_REQUEST_MESSAGE = 'cancel request'
2121

22-
// Table column data type (sqlite)
23-
export const DATA_TYPES = ['INTEGER', 'TEXT', 'REAL', 'BLOB']
22+
// Table column data type
23+
// NUMBER => INTEGER & REAL in sqlite
24+
// TEXT => TEXT in sqlite
25+
// BINARY => BLOB in sqlite
26+
export const DATA_TYPES = ['NUMBER', 'TEXT', 'BINARY']
2427

2528
// Project user states
2629
export const USER_STATES = ['Enabled', 'Disabled']

0 commit comments

Comments
 (0)