-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
cf98602
commit 9871e23
Showing
17 changed files
with
358 additions
and
155 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
import { DownloadIcon } from '@heroicons/react/solid'; | ||
|
||
import DataUploadError from '@/containers/admin/data-upload-error'; | ||
import { Anchor } from '@/components/button'; | ||
import UploadTracker from '@/containers/uploader/tracker'; | ||
import { useLasTask } from '@/hooks/tasks'; | ||
import DataUploader from '@/containers/uploader'; | ||
|
||
const AdminDataUploader: React.FC = () => { | ||
const { data: lastTask } = useLasTask(); | ||
|
||
return ( | ||
<div className="flex h-full w-full items-center justify-center"> | ||
<div className="space-y-16"> | ||
<div className="space-y-4 text-center text-lg"> | ||
<p className="font-semibold"> | ||
1. Download the Excel template and fill it with your data. | ||
</p> | ||
<Anchor | ||
href="/files/data-template.xlsx" | ||
download | ||
target="_blank" | ||
rel="noopener noreferrer" | ||
icon={<DownloadIcon aria-hidden="true" />} | ||
> | ||
Download template | ||
</Anchor> | ||
</div> | ||
<div className="flex flex-col items-center space-y-4 text-center text-lg"> | ||
<p className="font-semibold">2. Upload the filled Excel file.</p> | ||
{lastTask?.status !== 'processing' && ( | ||
<div className="w-[640px]"> | ||
<DataUploader /> | ||
</div> | ||
)} | ||
{lastTask?.status === 'processing' && ( | ||
<div className="w-[880px]"> | ||
<UploadTracker /> | ||
</div> | ||
)} | ||
{lastTask?.status === 'failed' && <DataUploadError task={lastTask} />} | ||
</div> | ||
</div> | ||
</div> | ||
); | ||
}; | ||
|
||
export default AdminDataUploader; |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.