webio-node/src/components/AdminPage/ActionLink/ListItem.js

22 lines
824 B
JavaScript

import React from 'react';
import {Table, Button} from 'semantic-ui-react';
const ListItem = ({i18n, data, swActive, delItem, showInfo}) => {
return (
<Table.Row>
<Table.Cell>
<Button type="button" size="tiny" basic content="Delete" onClick={()=>{delItem(data.jcioclntuid || '')}}/>
<Button type="button" size="tiny" basic content={data.lnactive == 1 ? 'Disable' : 'Enable'} onClick={()=>{swActive(data.jcioclntuid || '')}} />
</Table.Cell>
<Table.Cell>{data.jcioclntuid || ''}</Table.Cell>
<Table.Cell>{data.lnname || ''}</Table.Cell>
<Table.Cell>{data.lnactive == 1 ? '啟用' : '停用'}</Table.Cell>
<Table.Cell>
<Button type="button" size="tiny" basic content="顯示資訊" onClick={()=>{showInfo(data.jcioclntuid)}} />
</Table.Cell>
</Table.Row>
)
}
export default ListItem ;