- Rough in front end / backend
Signed-off-by: Dave Richer <dave@imexsystems.ca>
This commit is contained in:
@@ -13,7 +13,7 @@ const mapDispatchToProps = (dispatch) => ({
|
|||||||
});
|
});
|
||||||
|
|
||||||
export function JobLifecycleComponent({bodyshop, job, ...rest}) {
|
export function JobLifecycleComponent({bodyshop, job, ...rest}) {
|
||||||
const [loading, setLoading] = useState(false);
|
const [loading, setLoading] = useState(true);
|
||||||
const [lifecycleData, setLifecycleData] = useState(null);
|
const [lifecycleData, setLifecycleData] = useState(null);
|
||||||
|
|
||||||
|
|
||||||
@@ -56,20 +56,26 @@ export function JobLifecycleComponent({bodyshop, job, ...rest}) {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<Card loading={loading} title='Job Lifecycle Component'>
|
<Card loading={loading} title='Job Lifecycle Component'>
|
||||||
<Space direction='vertical' style={{width: '100%'}}>
|
{!loading ? (
|
||||||
<Card type='inner' title='Table Format'>
|
<Space direction='vertical' style={{width: '100%'}}>
|
||||||
<Table loading={loading} columns={columns} dataSource={lifecycleData} />
|
<Card type='inner' title='Table Format'>
|
||||||
|
<Table columns={columns} dataSource={lifecycleData} />
|
||||||
|
</Card>
|
||||||
|
<Card type='inner' title='Timeline Format'>
|
||||||
|
<Timeline>
|
||||||
|
{lifecycleData.map((item, index) => (
|
||||||
|
<Timeline.Item key={index} color={item.value === 'Open' ? 'green' : item.value === 'Scheduled' ? 'yellow' : 'red'}>
|
||||||
|
{item.value} - {new Date(item.start).toLocaleString()}
|
||||||
|
</Timeline.Item>
|
||||||
|
))}
|
||||||
|
</Timeline>
|
||||||
|
</Card>
|
||||||
|
</Space>
|
||||||
|
) : (
|
||||||
|
<Card type='inner' title='Loading'>
|
||||||
|
Loading Job Timelines....
|
||||||
</Card>
|
</Card>
|
||||||
<Card type='inner' title='Timeline Format'>
|
)}
|
||||||
<Timeline loading={loading}>
|
|
||||||
{lifecycleData.map((item, index) => (
|
|
||||||
<Timeline.Item key={index} color={item.value === 'Open' ? 'green' : item.value === 'Scheduled' ? 'yellow' : 'red'}>
|
|
||||||
{item.value} - {new Date(item.start).toLocaleString()}
|
|
||||||
</Timeline.Item>
|
|
||||||
))}
|
|
||||||
</Timeline>
|
|
||||||
</Card>
|
|
||||||
</Space>
|
|
||||||
</Card>
|
</Card>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,10 +1,4 @@
|
|||||||
const path = require("path");
|
const path = require("path");
|
||||||
require("dotenv").config({
|
|
||||||
path: path.resolve(
|
|
||||||
process.cwd(),
|
|
||||||
`.env.${process.env.NODE_ENV || "development"}`
|
|
||||||
),
|
|
||||||
});
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Checks if the event secret is correct
|
* Checks if the event secret is correct
|
||||||
|
|||||||
Reference in New Issue
Block a user