Index: components/Import/Import.component.tsx =================================================================== diff -u -r02034861c5b797d7c6f46da206243f74aca3fefe -r83efc071bbdb1d3b2460439744d4809e13efd0b5 --- components/Import/Import.component.tsx (.../Import.component.tsx) (revision 02034861c5b797d7c6f46da206243f74aca3fefe) +++ components/Import/Import.component.tsx (.../Import.component.tsx) (revision 83efc071bbdb1d3b2460439744d4809e13efd0b5) @@ -1,10 +1,11 @@ import { DeleteOutlined, DownloadOutlined, ImportOutlined } from '@ant-design/icons'; -import { Button, Col, Popconfirm, Row, Select, Spin, Table, Typography } from 'antd'; +import { Button, Col, Popconfirm, Row, Select, Space, Spin, Table, Typography } from 'antd'; import { IImportJob } from 'lemans-api/services/Import/import.types'; import { ITempFile } from 'lemans-api/services/Media/media.types'; import { flash } from 'lemans-common'; import { useLoader } from 'lemans-common/libs/useToggle'; import { service } from 'lemans-dashboard-common'; +import moment from 'moment'; import React from 'react'; import { FileUploadButton } from '../FileUploadButton'; import './Import.styles.less'; @@ -22,15 +23,15 @@ const refresh = () => { loader.start(); - service.import.search({}) + service.import.search({sorting: 'localeImportProcessId+DESC'}) .then(setJobs) .finally(loader.done); }; React.useEffect(refresh, []); const downloadOriginal = (id:number) => () => service.import.download.original(id); - const downloadReport = (id:number) => () => service.import.download.original(id); + const downloadReport = (id:number) => () => service.import.download.report(id); const deleteJob = (id:number) => () => {service.import.delete(id).then(() => { flash.success("Job deleted"); refresh(); @@ -47,52 +48,54 @@ const fileColumn = (file:string, job:any) => ; + const startDateCol = (value: any) => {return <>{moment(value).format('M/D/YYYY')};} + const actionsColumn = (job:IImportJob) => <> - +    {job.status === "Partial Success" && - + } ; return

Import Jobs

- - - Import Type - - - value={importType} onChange={setImportType}> - Select an import type - Product - Part - Category Attributes - - - - - - - - + + + + Import Type + + + value={importType} onChange={setImportType}> + Select an import type + Product + Part + Category Attributes + + + + + + + + + -
- {JSON.stringify(tempFile)} -
+

- + - +
;