| | |
| | | changeColumns = (columns) => { |
| | | const { verify } = this.state |
| | | |
| | | if (columns[0] && (columns[0].type === 'image' || columns[0].type === 'text')) { |
| | | columns = columns.map(col => { |
| | | let _cell = { |
| | | uuid: Utils.getuuid(), |
| | | Column: col.Column, |
| | | Text: col.Text, |
| | | type: 'Nvarchar(50)', |
| | | limit: '50', |
| | | import: 'true', |
| | | required: 'true' |
| | | } |
| | | |
| | | return _cell |
| | | }) |
| | | } |
| | | |
| | | columns = columns.map(col => { |
| | | if (/^Nvarchar/ig.test(col.type)) { |
| | | col.limit = col.type.match(/\d+/) ? col.type.match(/\d+/)[0] : '20000' |
| | |
| | | changeColumns = (columns) => { |
| | | const { verify } = this.state |
| | | |
| | | if (columns[0] && (columns[0].type !== 'image' && columns[0].type !== 'text' && columns[0].type !== 'number')) { |
| | | if (columns[0] && !['image', 'text', 'number'].includes(columns[0].type)) { |
| | | columns = columns.map(col => { |
| | | let _cell = { |
| | | uuid: Utils.getuuid(), |
| | |
| | | Text: col.Text, |
| | | Width: 20, |
| | | abs: 'false', |
| | | output: 'true', |
| | | output: col.output || 'true', |
| | | type: 'text', |
| | | } |
| | | |