Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions client/src/api/Timetable.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
import axios from 'axios';
import serverRoot from './server';

const API = axios.create({
baseURL: `${serverRoot}/api/examslots`,
withCredentials: true,
});

export const fetchExamSlot = async (course, branch, semester) => {
const { data } = await API.get(`/${course}/${branch}/${semester}`);
return data;
}

export const createOrUpdateExamSlot = async (examSlotData) => {
const { data } = await API.post('/update', examSlotData);
return data;
}
9 changes: 5 additions & 4 deletions client/src/screens/contributions/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ const Contributions = () => {
? "Upload files to this folder"
: "Your files will be added to this folder"}
</div>
<div className="file_pond">
<div className="file_pond large">
<FilePond
name="file"
allowMultiple={true}
Expand Down Expand Up @@ -143,10 +143,11 @@ const Contributions = () => {
Files require approval from a Branch Representative before becoming
visible to other users.
</div>
</div>
) : (
</div>
):(
<></>
)}
)}

</div>
<div className={`button ${submitEnabled && !isUploading}`} onClick={handleSubmit}>
{isUploading ? "UPLOADING..." : "SUBMIT"}
Expand Down
26 changes: 26 additions & 0 deletions client/src/screens/contributions/styles.scss
Original file line number Diff line number Diff line change
Expand Up @@ -174,4 +174,30 @@

.filepond--root {
max-height: 20vh;
}

.file_pond {
margin-top: 1rem;

.large {
width: 100%;
height: 100%;
}

&.large {
.filepond--root {
height: 00px; // make it taller
max-width: 100%; // stretch width
font-size: 1.1rem; // slightly bigger text
}

.filepond--drop-label {
height: 100%;
display: flex;
align-items: center;
justify-content: center;
font-size: 1.2rem;
padding: 2rem;
}
}
}
Loading