-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2673 from CAFECA-IO/feature/certificate_upload
Feature/certificate upload
- Loading branch information
Showing
20 changed files
with
816 additions
and
89 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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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,24 @@ | ||
import Image from 'next/image'; | ||
|
||
interface AIAnalyzerProps {} | ||
|
||
const AIAnalyzer: React.FC<AIAnalyzerProps> = () => { | ||
return ( | ||
<div className="mt-4 flex items-center justify-between overflow-hidden rounded-md bg-surface-brand-primary-moderate px-4 py-2"> | ||
<div className="relative h-20 w-20"> | ||
<Image | ||
src="/elements/siri.svg" | ||
alt="AI" | ||
width={180} | ||
height={190} | ||
className="absolute left-1/2 top-14 max-w-180px -translate-x-1/2 -translate-y-1/2 object-cover" | ||
/> | ||
</div> | ||
<p className="text-lg font-medium"> | ||
Please select the certificates for AI to generate the voucher for you | ||
</p> | ||
</div> | ||
); | ||
}; | ||
|
||
export default AIAnalyzer; |
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 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 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 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,66 @@ | ||
import Image from 'next/image'; | ||
import { Button } from '@/components/button/button'; | ||
import { AiOutlineLeft, AiOutlineRight } from 'react-icons/ai'; | ||
import { FaPlus } from 'react-icons/fa6'; | ||
import { ICertificate } from '@/interfaces/certificate'; | ||
|
||
interface CertificateSelectionProps { | ||
selectedCertificates: ICertificate[]; | ||
setOpenModal: (open: boolean) => void; | ||
} | ||
|
||
const CertificateSelection: React.FC<CertificateSelectionProps> = ({ | ||
selectedCertificates, | ||
setOpenModal, | ||
}: CertificateSelectionProps) => { | ||
return ( | ||
<div className="my-8 w-full flex-col items-center"> | ||
<div className="flex h-56 w-full flex-col items-start justify-start rounded-md border border-stroke-neutral-quaternary px-8 pt-6 shadow-inset-lg"> | ||
<div className="flex space-x-4 overflow-x-auto"> | ||
{selectedCertificates.map((certificate) => ( | ||
<div key={certificate.id} className="flex flex-col items-center"> | ||
<Image src={certificate.thumbnailUrl} alt="AI" width={80} height={80} /> | ||
<p className="text-sm font-semibold">{certificate.invoiceName}</p> | ||
</div> | ||
))} | ||
<div> | ||
<button | ||
type="button" | ||
className="mx-4 my-2 flex h-140px w-80px items-center justify-center rounded-xs border border-dashed border-stroke-neutral-tertiary p-2 text-white" | ||
onClick={() => setOpenModal(true)} | ||
> | ||
<FaPlus size={24} className="text-stroke-neutral-tertiary" /> | ||
</button> | ||
</div> | ||
</div> | ||
</div> | ||
<div className="mt-2 w-full text-center"> | ||
<p className="text-text-neutral-tertiary"> | ||
Uploaded {selectedCertificates.length} certificates | ||
</p> | ||
<div className="mt-2 flex items-center justify-center space-x-2"> | ||
<Button | ||
type="button" | ||
onClick={() => {}} | ||
variant="secondaryOutline" | ||
disabled={selectedCertificates.length === 0} | ||
className="h-40px w-40px p-0" | ||
> | ||
<AiOutlineLeft size={16} /> | ||
</Button> | ||
<Button | ||
type="button" | ||
onClick={() => {}} | ||
variant="secondaryOutline" | ||
disabled={selectedCertificates.length === 0} | ||
className="h-40px w-40px p-0" | ||
> | ||
<AiOutlineRight size={16} /> | ||
</Button> | ||
</div> | ||
</div> | ||
</div> | ||
); | ||
}; | ||
|
||
export default CertificateSelection; |
Oops, something went wrong.