diff --git a/view/package-lock.json b/view/package-lock.json index 2a287f7..953fc73 100644 --- a/view/package-lock.json +++ b/view/package-lock.json @@ -1676,25 +1676,6 @@ "integrity": "sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==", "dev": true }, - "node_modules/color-support": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/color-support/-/color-support-1.1.3.tgz", - "integrity": "sha512-qiBjkpbMLO/HL68y+lh4q0/O1MZFj2RX6X/KmMa3+gJD3z+WwI1ZzDHysvqHGS3mP6mznPckpXmw1nI9cJjyRg==", - "bin": { - "color-support": "bin.js" - } - }, - "node_modules/combined-stream": { - "version": "1.0.8", - "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", - "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", - "dependencies": { - "delayed-stream": "~1.0.0" - }, - "engines": { - "node": ">= 0.8" - } - }, "node_modules/concat-map": { "version": "0.0.1", "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", @@ -1838,27 +1819,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/delayed-stream": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", - "integrity": "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==", - "engines": { - "node": ">=0.4.0" - } - }, - "node_modules/delegates": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/delegates/-/delegates-1.0.0.tgz", - "integrity": "sha512-bd2L678uiWATM6m5Z1VzNCErI3jiGzt6HGY8OVICs40JQq/HALfbyNJmp0UDakEY4pMMaN0Ly5om/B1VI/+xfQ==" - }, - "node_modules/detect-libc": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-2.0.3.tgz", - "integrity": "sha512-bwy0MGW55bG41VqxxypOsdSdGqLwXPI/focwgTYCFMbdUiBAxLg9CFzG08sz2aqzknwiX7Hkl0bQENjg8iLByw==", - "engines": { - "node": ">=8" - } - }, "node_modules/doctrine": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz", @@ -2503,46 +2463,6 @@ "is-callable": "^1.1.3" } }, - "node_modules/form-data": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.0.tgz", - "integrity": "sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww==", - "dependencies": { - "asynckit": "^0.4.0", - "combined-stream": "^1.0.8", - "mime-types": "^2.1.12" - }, - "engines": { - "node": ">= 6" - } - }, - "node_modules/fs-minipass": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/fs-minipass/-/fs-minipass-2.1.0.tgz", - "integrity": "sha512-V/JgOLFCS+R6Vcq0slCuaeWEdNC3ouDlJMNIsacH2VtALiu9mV4LPrHc5cDl8k5aw6J8jwgWWpiTo5RYhmIzvg==", - "dependencies": { - "minipass": "^3.0.0" - }, - "engines": { - "node": ">= 8" - } - }, - "node_modules/fs-minipass/node_modules/minipass": { - "version": "3.3.6", - "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.3.6.tgz", - "integrity": "sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw==", - "dependencies": { - "yallist": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/fs-minipass/node_modules/yallist": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", - "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==" - }, "node_modules/fs.realpath": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", @@ -3406,39 +3326,6 @@ "yallist": "^3.0.2" } }, - "node_modules/make-dir": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-3.1.0.tgz", - "integrity": "sha512-g3FeP20LNwhALb/6Cz6Dd4F2ngze0jz7tbzrD2wAV+o9FeNHe4rL+yK2md0J/fiSf1sa1ADhXqi5+oVwOM/eGw==", - "dependencies": { - "semver": "^6.0.0" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/mime-db": { - "version": "1.52.0", - "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", - "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==", - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/mime-types": { - "version": "2.1.35", - "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz", - "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", - "dependencies": { - "mime-db": "1.52.0" - }, - "engines": { - "node": ">= 0.6" - } - }, "node_modules/minimatch": { "version": "3.1.2", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", diff --git a/view/src/components/SideBar/SideBar.css b/view/src/components/SideBar/SideBar.css index a1399c0..03cbc41 100644 --- a/view/src/components/SideBar/SideBar.css +++ b/view/src/components/SideBar/SideBar.css @@ -17,7 +17,7 @@ } .embaixo{ - margin-top: 10px; + margin-top: 310px; display: flex; flex-direction: column; diff --git a/view/src/pages/Documents/Documents.css b/view/src/pages/Documents/Documents.css index ca9ffc7..7b57d8a 100644 --- a/view/src/pages/Documents/Documents.css +++ b/view/src/pages/Documents/Documents.css @@ -77,13 +77,14 @@ body{ font-size: 20px; background-color: #d2d3e4fa; border: none; - outline: none; + outline: none; + margin-top: 10px; } .botao{ font-size: 20px; width: 200px; - margin-left: 155px; + margin-right: 150px; margin-top: -20px; } \ No newline at end of file diff --git a/view/src/pages/Documents/index.jsx b/view/src/pages/Documents/index.jsx index d3aea0f..b4209bb 100644 --- a/view/src/pages/Documents/index.jsx +++ b/view/src/pages/Documents/index.jsx @@ -47,7 +47,6 @@ function Documents() {

Documentos

-
img-plus { - setShowPopup(true); + const [currentMeetingIndex, setCurrentMeetingIndex] = useState(null); + + const handleAddMeeting = () => { + const newMeeting = { + nome: `Reunião ${meetings.length + 1}`, + files: [], + members: [ + { nome: 'Membro 1', matricula: '001', presente: false }, + { nome: 'Membro 2', matricula: '002', presente: false }, + // eh necessario add uma lista c todos os membros + ] + }; + setMeetings([...meetings, newMeeting]); + }; + + const handleImageClick = (index) => { + setCurrentMeetingIndex(index); + setShowPopup(true); }; - + const handleClosePopup = () => { - setShowPopup(false); + setShowPopup(false); + setCurrentMeetingIndex(null); }; - - const handleLinkChange = (e) => { - setLink(e.target.value); + + const handleFileChange = (e) => { + const updatedMeetings = [...meetings]; + updatedMeetings[currentMeetingIndex].file = e.target.files[0]; + updatedMeetings[currentMeetingIndex].fileName = e.target.files[0].name; + setMeetings(updatedMeetings); }; - - const handleDescricaoChange = (e) => { - setDescricao(e.target.value); + + const handleFileSubmit = (e) => { + e.preventDefault(); + const updatedMeetings = [...meetings]; + const currentMeeting = updatedMeetings[currentMeetingIndex]; + if (currentMeeting.file && currentMeeting.fileName.trim() !== '') { + const dateAdded = new Date().toLocaleDateString(); + currentMeeting.files.push({ file: currentMeeting.file, fileName: currentMeeting.fileName, dateAdded }); + } + setShowPopup(false); + setMeetings(updatedMeetings); }; - - const handleSubmit = (e) => { - e.preventDefault(); - if (link.trim() !== '' && descricao.trim() !== '') { - setLinks([...links, { descricao, link }]); - } - setShowPopup(false); - setLink(''); - setDescricao(''); + + const handleRemoveFile = (meetingIndex, fileIndex) => { + const updatedMeetings = [...meetings]; + updatedMeetings[meetingIndex].files.splice(fileIndex, 1); + setMeetings(updatedMeetings); }; - - const handleRemoveLink = (index) => { - const updatedLinks = [...links]; - updatedLinks.splice(index, 1); - setLinks(updatedLinks); + + const handlePresenceChange = (meetingIndex, memberIndex) => { + const updatedMeetings = [...meetings]; + const member = updatedMeetings[meetingIndex].members[memberIndex]; + member.presente = !member.presente; + setMeetings(updatedMeetings); }; - + return ( - <> - - -
-

Reuniões

-
- -
-
- img-plus -

Adicionar reunião

-
- {showPopup && ( -
-
- - × -
- - - -
+ <> + +
+

Reuniões

+
-
- )} - -
- {links.map((item, index) => ( -
-
- img-trash handleRemoveLink(index)}> -

- {item.descricao} -

- +
+ {meetings.map((meeting, meetingIndex) => ( +
+

{meeting.nome}

+
+ img-plus handleImageClick(meetingIndex)} /> +

Adicionar Arquivo

+
+
+ {meeting.files.map((item, fileIndex) => ( +
+
+ img-trash handleRemoveFile(meetingIndex, fileIndex)} /> +

+ {item.fileName} (Adicionado em: {item.dateAdded}) +

+
+
+ ))} +
+ + + + + + + + + + {meeting.members.map((member, memberIndex) => ( + + + + + + ))} + +
NomeMatrículaPresença
{member.nome}{member.matricula} + handlePresenceChange(meetingIndex, memberIndex)} + /> +
+
+ ))} + {showPopup && ( +
+
+ × +
+ + + +
+
+
+ )}
-
- ))} -
-
- + ); - - } +} -export default Meeting ; \ No newline at end of file +export default Meeting;