Commit 50f50f80 authored by fahrur huzain's avatar fahrur huzain

filter master data CAT

parent b28a8825
......@@ -602,13 +602,13 @@ export default class MasterDataCAT extends Component {
let data = response.data.data
let listData = data.sort((a, b) => a.item_report_id - b.item_report_id).map((item, index) => {
return [
index,
item.item_report_id,
item.item_report_name,
item.company_name,
index,
item.item_report_id,
item.report_name,
item.weight,
item.item_report_name,
item.years,
item.company_name,
item.weight,
item.status,
item.company_id
]
......@@ -848,11 +848,12 @@ export default class MasterDataCAT extends Component {
name: "Action",
options: {
sort: false,
filter: false,
customBodyRender: (val, tableMeta) => {
return (
<div style={{ display: 'flex' }}>
{this.state.buttonEdit &&
<span>
<span>
<a data-tip={'Edit'} data-for="edit">
<button
style={{
......@@ -870,7 +871,7 @@ export default class MasterDataCAT extends Component {
</span>
}
{this.state.buttonDelete &&
<span>
<span>
<a data-tip={'Delete'} data-for="delete">
<button
style={{
......@@ -893,96 +894,96 @@ export default class MasterDataCAT extends Component {
}
}
},
{
name: "ID",
options: {
customBodyRender: (val, tableMeta) => {
return (
<div style={{ display: 'flex' }}>
<span style={{ color: tableMeta.rowData[7] === "Active" ? "#656565" : 'rgba(0, 0, 0, 0.25)' }}>{val}</span>
</div >
);
{
name: "ID",
options: {
customBodyRender: (val, tableMeta) => {
return (
<div style={{ display: 'flex' }}>
<span style={{ color: tableMeta.rowData[7] === "Active" ? "#656565" : 'rgba(0, 0, 0, 0.25)' }}>{tableMeta.rowData[1]}</span>
</div >
);
}
}
}
},
{
name: "Report Name",
options: {
customBodyRender: (val, tableMeta) => {
return (
<div style={{ display: 'flex' }}>
<span style={{ color: tableMeta.rowData[7] === "Active" ? "#656565" : 'rgba(0, 0, 0, 0.25)' }}>{tableMeta.rowData[4]}</span>
</div >
);
},
{
name: "Report Name",
options: {
customBodyRender: (val, tableMeta) => {
return (
<div style={{ display: 'flex' }}>
<span style={{ color: tableMeta.rowData[7] === "Active" ? "#656565" : 'rgba(0, 0, 0, 0.25)' }}>{tableMeta.rowData[2]}</span>
</div >
);
}
}
}
},
{
name: "Item Report Name",
options: {
customBodyRender: (val, tableMeta) => {
return (
<div style={{ display: 'flex' }}>
<span style={{ color: tableMeta.rowData[7] === "Active" ? "#656565" : 'rgba(0, 0, 0, 0.25)' }}>{tableMeta.rowData[2]}</span>
</div >
);
},
{
name: "Item Report Name",
options: {
customBodyRender: (val, tableMeta) => {
return (
<div style={{ display: 'flex' }}>
<span style={{ color: tableMeta.rowData[7] === "Active" ? "#656565" : 'rgba(0, 0, 0, 0.25)' }}>{tableMeta.rowData[3]}</span>
</div >
);
}
}
}
},
{
name: "Year",
options: {
customBodyRender: (val, tableMeta) => {
return (
<div style={{ display: 'flex' }}>
<span style={{ color: tableMeta.rowData[7] === "Active" ? "#656565" : 'rgba(0, 0, 0, 0.25)' }}>{tableMeta.rowData[6]}</span>
</div >
);
},
{
name: "Year",
options: {
customBodyRender: (val, tableMeta) => {
return (
<div style={{ display: 'flex' }}>
<span style={{ color: tableMeta.rowData[7] === "Active" ? "#656565" : 'rgba(0, 0, 0, 0.25)' }}>{tableMeta.rowData[4]}</span>
</div >
);
}
}
}
},
{
name: "Company Name",
options: {
customBodyRender: (val, tableMeta) => {
return (
<div style={{ display: 'flex' }}>
<span style={{ color: tableMeta.rowData[7] === "Active" ? "#656565" : 'rgba(0, 0, 0, 0.25)' }}>{tableMeta.rowData[3]}</span>
</div >
);
},
{
name: "Company Name",
options: {
customBodyRender: (val, tableMeta) => {
return (
<div style={{ display: 'flex' }}>
<span style={{ color: tableMeta.rowData[7] === "Active" ? "#656565" : 'rgba(0, 0, 0, 0.25)' }}>{tableMeta.rowData[5]}</span>
</div >
);
}
}
}
},
{
name: "Weight",
options: {
customBodyRender: (val, tableMeta) => {
return (
<div style={{ display: 'flex' }}>
<span style={{ color: tableMeta.rowData[7] === "Active" ? "#656565" : 'rgba(0, 0, 0, 0.25)' }}>{tableMeta.rowData[5]}</span>
</div >
);
},
{
name: "Weight",
options: {
customBodyRender: (val, tableMeta) => {
return (
<div style={{ display: 'flex' }}>
<span style={{ color: tableMeta.rowData[7] === "Active" ? "#656565" : 'rgba(0, 0, 0, 0.25)' }}>{tableMeta.rowData[6]}</span>
</div >
);
}
}
}
},
{
name: "Status",
options: {
customBodyRender: (val, tableMeta) => {
return (
<div style={{ display: 'flex' }}>
<span style={{ color: tableMeta.rowData[7] === "Active" ? "#656565" : 'rgba(0, 0, 0, 0.25)' }}>{tableMeta.rowData[7]}</span>
</div >
);
},
{
name: "Status",
options: {
customBodyRender: (val, tableMeta) => {
return (
<div style={{ display: 'flex' }}>
<span style={{ color: tableMeta.rowData[7] === "Active" ? "#656565" : 'rgba(0, 0, 0, 0.25)' }}>{tableMeta.rowData[7]}</span>
</div >
);
}
}
},
{
name: "company id",
options: {
display: false
}
}
},
{
name: "company id",
options: {
display: false
}
}
]
const loadingComponent = (
<div style={{ position: 'absolute', zIndex: 110, top: 0, left: 0, width: '100%', height: '100%', display: 'flex', justifyContent: 'center', alignItems: 'center', background: 'rgba(255,255,255,0.8)' }}>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment