Skip to content

Commit

Permalink
fixed build errors
Browse files Browse the repository at this point in the history
  • Loading branch information
allomanta committed Oct 23, 2024
1 parent 381a045 commit 47321fb
Show file tree
Hide file tree
Showing 4 changed files with 71 additions and 20 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
import { getStudentsByCourse } from '@/api/courses';
import { getExternalAssignments, patchExternalAssignmentTitle, postExternalAssignment, deleteExternalAssignment } from '@/api/entries';
import {
getExternalAssignments,
patchExternalAssignmentTitle,
postExternalAssignment,
deleteExternalAssignment,
} from '@/api/entries';
import AdminTitle from '@/components/atoms/admin-titles/admin-titles';
import UploadManager from '@/components/crystals/upload-manager/upload-manager';
import QueryError from '@/components/particles/QueryError';
Expand Down Expand Up @@ -57,6 +62,7 @@ const Wizard: FC = (): ReactElement => {
id: -1,
course_id: -1,
title: 'Title',
html_url: '',
published: 2,
muted: false,
due_date: -1,
Expand Down Expand Up @@ -124,7 +130,7 @@ const ViewExternalAssignment: FC<ViewExternalAssignmentProps> = ({ assignment, s

return (
<div className='border-border0 bg-surface2 rounded-md border border-solid px-8 py-4'>
<div className='mb-5 flex items-center justify-between flex-wrap'>
<div className='mb-5 flex flex-wrap items-center justify-between'>
<button
onClick={() => {
setEditing(true);
Expand Down Expand Up @@ -160,7 +166,7 @@ const ViewExternalAssignment: FC<ViewExternalAssignmentProps> = ({ assignment, s
}
</button>
{!uploadMenuOpen && (
<div className='ml-auto flex justify-center items-center gap-2 flex-wrap'>
<div className='ml-auto flex flex-wrap items-center justify-center gap-2'>
<Button
className='custom-default-button'
onClick={() => {
Expand All @@ -171,21 +177,21 @@ const ViewExternalAssignment: FC<ViewExternalAssignmentProps> = ({ assignment, s
</Button>
<Button
className='custom-danger-button'
onClick={() => {
void Swal.fire({
title: 'Warning: This will permanently delete the tile!',
icon: 'warning',
focusCancel: true,
showCancelButton: true,
confirmButtonText: 'Delete',
cancelButtonText: 'Cancel',
customClass: {},
}).then((result) => {
if (result.isConfirmed) {
deleteExternalAss({assignmentID: assignment.id});
}
});
}}
onClick={() => {
void Swal.fire({
title: 'Warning: This will permanently delete the tile!',
icon: 'warning',
focusCancel: true,
showCancelButton: true,
confirmButtonText: 'Delete',
cancelButtonText: 'Cancel',
customClass: {},
}).then((result) => {
if (result.isConfirmed) {
deleteExternalAss({ assignmentID: assignment.id });
}
});
}}
>
Delete External Assignment
</Button>
Expand Down
22 changes: 22 additions & 0 deletions IguideME.Web/Frontend/src/mocks/entries.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ export const MOCK_ASSIGNMENTS: Assignment[] = [
id: 1,
course_id: 17320,
title: 'Quiz 1: Anatomische termen van positie',
html_url: '',
published: 0,
muted: false,
due_date: 1707688872519,
Expand All @@ -68,6 +69,7 @@ export const MOCK_ASSIGNMENTS: Assignment[] = [
id: 2,
course_id: 17320,
title: 'Quiz 2: Neurotransmitter systemen',
html_url: '',
published: 1,
muted: false,
due_date: 1707688872519,
Expand All @@ -78,6 +80,7 @@ export const MOCK_ASSIGNMENTS: Assignment[] = [
id: 3,
course_id: 17320,
title: 'Quiz 3: Macro Anatomie',
html_url: '',
published: 1,
muted: false,
due_date: 1707688872519,
Expand All @@ -88,6 +91,7 @@ export const MOCK_ASSIGNMENTS: Assignment[] = [
id: 4,
course_id: 17320,
title: 'Quiz 4: Micro anatomie',
html_url: '',
published: 1,
muted: false,
due_date: 1707688872519,
Expand All @@ -98,6 +102,7 @@ export const MOCK_ASSIGNMENTS: Assignment[] = [
id: 5,
course_id: 17320,
title: 'Cijfers deeltoets 1',
html_url: '',
published: 1,
muted: false,
due_date: 1707688872519,
Expand All @@ -108,6 +113,7 @@ export const MOCK_ASSIGNMENTS: Assignment[] = [
id: 6,
course_id: 17320,
title: 'Cijfers deeltoets 2',
html_url: '',
published: 1,
muted: false,
due_date: 1707688872519,
Expand All @@ -118,6 +124,7 @@ export const MOCK_ASSIGNMENTS: Assignment[] = [
id: 7,
course_id: 17320,
title: 'Cijfer presentatie',
html_url: '',
published: 1,
muted: false,
due_date: 1707688872519,
Expand All @@ -128,6 +135,7 @@ export const MOCK_ASSIGNMENTS: Assignment[] = [
id: 8,
course_id: 17320,
title: 'Cijfer deeltoets 3',
html_url: '',
published: 1,
muted: false,
due_date: 1707688872519,
Expand All @@ -138,6 +146,7 @@ export const MOCK_ASSIGNMENTS: Assignment[] = [
id: 9,
course_id: 17320,
title: 'Perusall assignment 1',
html_url: '',
published: 2,
muted: false,
due_date: 1707688872519,
Expand All @@ -148,6 +157,7 @@ export const MOCK_ASSIGNMENTS: Assignment[] = [
id: 10,
course_id: 17320,
title: 'Perusall assignment 2',
html_url: '',
published: 2,
muted: false,
due_date: 1707688872519,
Expand All @@ -158,6 +168,7 @@ export const MOCK_ASSIGNMENTS: Assignment[] = [
id: 11,
course_id: 17320,
title: 'Perusall assignment 3',
html_url: '',
published: 2,
muted: false,
due_date: 1707688872519,
Expand All @@ -168,6 +179,7 @@ export const MOCK_ASSIGNMENTS: Assignment[] = [
id: 12,
course_id: 17320,
title: 'Artikelen college DSM',
html_url: '',
published: 1,
muted: false,
due_date: 1707688872519,
Expand All @@ -178,6 +190,7 @@ export const MOCK_ASSIGNMENTS: Assignment[] = [
id: 13,
course_id: 17320,
title: 'Artikelen college Alzheimer',
html_url: '',
published: 1,
muted: false,
due_date: 1707688872519,
Expand All @@ -188,6 +201,7 @@ export const MOCK_ASSIGNMENTS: Assignment[] = [
id: 14,
course_id: 17320,
title: 'Artikelen college Migraine',
html_url: '',
published: 0,
muted: false,
due_date: 1707688872519,
Expand All @@ -198,6 +212,7 @@ export const MOCK_ASSIGNMENTS: Assignment[] = [
id: 15,
course_id: 17320,
title: 'Artikelen college Epilepsie',
html_url: '',
published: 0,
muted: false,
due_date: 1707688872519,
Expand All @@ -208,6 +223,7 @@ export const MOCK_ASSIGNMENTS: Assignment[] = [
id: 16,
course_id: 17320,
title: 'Artikelen college Eetstoornissen',
html_url: '',
published: 0,
muted: false,
due_date: 1707688872519,
Expand All @@ -218,6 +234,7 @@ export const MOCK_ASSIGNMENTS: Assignment[] = [
id: 17,
course_id: 17320,
title: 'Artikelen college Pijn en Angst',
html_url: '',
published: 0,
muted: false,
due_date: 1707688872519,
Expand All @@ -228,6 +245,7 @@ export const MOCK_ASSIGNMENTS: Assignment[] = [
id: 18,
course_id: 17320,
title: 'Artikel college MS',
html_url: '',
published: 0,
muted: false,
due_date: 1707688872519,
Expand All @@ -238,6 +256,7 @@ export const MOCK_ASSIGNMENTS: Assignment[] = [
id: 19,
course_id: 17320,
title: 'Artikelen college Depressie',
html_url: '',
published: 0,
muted: false,
due_date: 1707688872519,
Expand All @@ -253,6 +272,7 @@ export const MOCK_TOPICS: DiscussionTopic[] = [
course_id: 994,
title: 'Third discussion',
author: '46647543',
html_url: '',
date: 1602173738,
message: 'Discussion number 3',
},
Expand All @@ -262,6 +282,7 @@ export const MOCK_TOPICS: DiscussionTopic[] = [
course_id: 994,
title: 'Second discussion',
author: '55571292',
html_url: '',
date: 1602173834,
message: 'Discussion number 2',
},
Expand All @@ -271,6 +292,7 @@ export const MOCK_TOPICS: DiscussionTopic[] = [
course_id: 994,
title: 'First discussion',
author: '45476233',
html_url: '',
date: 1602173991,
message: 'Discussion number 1',
},
Expand Down
Loading

0 comments on commit 47321fb

Please sign in to comment.