From 7dd7090fa08392e663ebd909636fe7879d294f41 Mon Sep 17 00:00:00 2001 From: TI JONNY Date: Thu, 4 Apr 2024 17:03:06 -0300 Subject: [PATCH] archives card --- src/Assets/images/notFind.svg | 9 +++ src/Components/Empty/index.tsx | 21 ++++-- src/Components/Upload/index.tsx | 62 +++++++++++++++++ .../Meeting/Beneficiarios/index.tsx | 3 +- .../MeetingList/Meeting/DataMeeting/index.tsx | 68 +++++++++---------- .../MeetingList/Meeting/index.tsx | 31 +++++---- .../ClassroomOne/RegistrationList/index.tsx | 5 +- src/Pages/Classroom/ClassroomOne/index.tsx | 2 +- 8 files changed, 145 insertions(+), 56 deletions(-) create mode 100644 src/Assets/images/notFind.svg create mode 100644 src/Components/Upload/index.tsx diff --git a/src/Assets/images/notFind.svg b/src/Assets/images/notFind.svg new file mode 100644 index 0000000..7a20e16 --- /dev/null +++ b/src/Assets/images/notFind.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/src/Components/Empty/index.tsx b/src/Components/Empty/index.tsx index 6672c28..5df2a56 100644 --- a/src/Components/Empty/index.tsx +++ b/src/Components/Empty/index.tsx @@ -1,10 +1,21 @@ -import Icon from "../Icon"; +import NotFind from "../../Assets/images/notFind.svg"; +import styles from "../../Styles"; +import { Column, Padding, Row } from "../../Styles/styles"; -const Empty = ({title}: {title: string}) => { - return( +const Empty = ({ title }: { title: string }) => { + return (
- - Sem {title} + + + + + + +

+ Não encontramos {title} +

+
+
) } diff --git a/src/Components/Upload/index.tsx b/src/Components/Upload/index.tsx new file mode 100644 index 0000000..d7cb53f --- /dev/null +++ b/src/Components/Upload/index.tsx @@ -0,0 +1,62 @@ +import { Button } from 'primereact/button'; +import { FileUpload, FileUploadHeaderTemplateOptions, ItemTemplateOptions } from 'primereact/fileupload'; +import { useState } from 'react'; + +export default function Upload() { + + const [file, setFile] = useState>([]) + + const headerTemplate = (options: FileUploadHeaderTemplateOptions) => { + const { className, chooseButton, cancelButton } = options; + + return ( +
+ {chooseButton} +
+ ); + }; + + const onTemplateSelect = (e: any) => { + let files = e.files; + console.log(files) + setFile(files) + }; + + const chooseOptions = { icon: 'pi pi-fw pi-plus ', iconOnly: true, className: 'custom-choose-btn p-button-rounded p-button-outlined', }; + const uploadOptions = { icon: 'pi pi-fw pi-cloud-upload', iconOnly: true, className: 'custom-upload-btn p-button-success p-button-rounded p-button-outlined', Upload: (e: any) => { console.log(e) } }; + const cancelOptions = { icon: 'pi pi-fw pi-times', iconOnly: true, className: 'custom-cancel-btn p-button-danger p-button-rounded p-button-outlined' }; + + const onTemplateRemove = (files: File, callback: Function) => { + console.log(files) + setFile(file.filter(props => props.name !== files.name)) + callback(); + }; + + + const itemTemplate = (inFile: object, props: ItemTemplateOptions) => { + const file = inFile as any; + return ( +
+
+ {file.name} + + {file.name} + {new Date().toLocaleDateString()} + +
+
+ ); + }; + + const onTemplateClear = () => { + setFile([]) + }; + + return ( + Arraste e solte os arquivos aqui.

} /> + ) +} \ No newline at end of file diff --git a/src/Pages/Classroom/ClassroomOne/MeetingList/Meeting/Beneficiarios/index.tsx b/src/Pages/Classroom/ClassroomOne/MeetingList/Meeting/Beneficiarios/index.tsx index f5e44f9..a105633 100644 --- a/src/Pages/Classroom/ClassroomOne/MeetingList/Meeting/Beneficiarios/index.tsx +++ b/src/Pages/Classroom/ClassroomOne/MeetingList/Meeting/Beneficiarios/index.tsx @@ -82,7 +82,7 @@ const Beneficiarios = () => { }} />