File tree Expand file tree Collapse file tree 1 file changed +22
-5
lines changed
src/shared/zarizeni-ke-slouceni Expand file tree Collapse file tree 1 file changed +22
-5
lines changed Original file line number Diff line number Diff line change 22/* eslint-disable no-nested-ternary */
33import { Map } from 'immutable'
44import React from 'react'
5+ import { Link } from 'react-router'
56import { Column , columntValueTypes } from '@hhjcz/react-lib/lib/tabulka'
67
78const 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
You can’t perform that action at this time.
0 commit comments