Skip to content

Commit 50d2c9f

Browse files
committed
style: display columns
1 parent a324520 commit 50d2c9f

File tree

1 file changed

+22
-5
lines changed

1 file changed

+22
-5
lines changed

src/shared/zarizeni-ke-slouceni/defaultColumns.jsx

Lines changed: 22 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,44 +2,61 @@
22
/* eslint-disable no-nested-ternary */
33
import { Map } from 'immutable'
44
import React from 'react'
5+
import { Link } from 'react-router'
56
import { Column, columntValueTypes } from '@hhjcz/react-lib/lib/tabulka'
67

78
const defaultColumns = Map(
89
{
910
firstId: new Column({
1011
name: 'firstId',
11-
caption: 'First ID',
12+
caption: 'ID #1',
1213
valueType: columntValueTypes.number,
1314
position: 10,
1415
width: 1,
1516
}),
1617
secondId: new Column({
1718
name: 'secondId',
18-
caption: 'Second ID',
19+
caption: 'ID #2',
1920
valueType: columntValueTypes.number,
2021
position: 20,
2122
width: 1,
2223
}),
2324
firstIpAddress: new Column({
2425
name: 'firstIpAddress',
25-
caption: 'IP address',
26+
caption: 'IP adresa',
2627
valueType: columntValueTypes.ipAddress,
2728
position: 30,
29+
width: 1,
2830
}),
2931
firstName: new Column({
3032
name: 'firstName',
31-
caption: 'First name',
33+
caption: 'Jmeno #1',
3234
valueType: columntValueTypes.string,
3335
position: 40,
3436
width: 4,
3537
}),
3638
secondName: new Column({
3739
name: 'secondName',
38-
caption: 'Second name',
40+
caption: 'Jmeno #2',
3941
valueType: columntValueTypes.string,
4042
position: 50,
4143
width: 4,
4244
}),
45+
slouceni: new Column({
46+
name: 'slouceni',
47+
caption: 'Lze sloucit',
48+
valueType: columntValueTypes.string,
49+
position: 60,
50+
width: 1,
51+
sortable: false,
52+
render: zarizeni => (
53+
<div>
54+
<Link to={`/udrzba/zarizeni_ke_slouceni/${zarizeni.firstId}/${zarizeni.secondId}`}>
55+
{zarizeni.firstName.toLowerCase() === zarizeni.secondName.toLowerCase() ? 'OK' : '?'}
56+
</Link>
57+
</div>
58+
),
59+
}),
4360
}
4461
)
4562

0 commit comments

Comments
 (0)