Skip to content

Commit

Permalink
style: lint fix #458
Browse files Browse the repository at this point in the history
  • Loading branch information
bsilkyn committed May 23, 2024
1 parent 4bcebde commit af7df1a
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 27 deletions.
27 changes: 9 additions & 18 deletions frontend/src/components/projects/ProjectStructure.vue
Original file line number Diff line number Diff line change
@@ -1,15 +1,14 @@
<script setup lang="ts">
import Tree from 'primevue/tree';
import Chip from 'primevue/chip';
import Divider from 'primevue/divider';
import { useI18n } from 'vue-i18n';
import { StructureCheck } from '@/types/StructureCheck.ts';
import { Project } from "@/types/Project.ts";
import { type StructureCheck } from '@/types/StructureCheck.ts';
import { Project } from '@/types/Project.ts';
const { t } = useI18n();
const props = defineProps<{
structureChecks: StructureCheck[]
structureChecks: StructureCheck[];
}>();
console.log(props.structureChecks);
Expand All @@ -20,32 +19,24 @@ console.log(props.structureChecks);
<label class="pb-2">
{{ t('views.projects.structureChecks.title') }}
</label>
<Tree
class="w-100"
selection-mode="single"
:value="Project.getNodes(structureChecks)"
>
<Tree class="w-100" selection-mode="single" :value="Project.getNodes(structureChecks)">
<template #default="{ node }">
<template v-if="node.obligated">
<div
class="w-full"
v-tooltip="t('views.projects.structureChecks.obligatedExtensions')"
>
<div class="w-full" v-tooltip="t('views.projects.structureChecks.obligatedExtensions')">
<Chip
class="m-1"
:label="extension"
:key="extension"
v-for="extension in node.data.getObligatedExtensionList()"
/>
</div>
</template>
<template v-else-if="node.blocked">
<div
class="w-full"
v-tooltip="t('views.projects.structureChecks.blockedExtensions')"
>
<div class="w-full" v-tooltip="t('views.projects.structureChecks.blockedExtensions')">
<Chip
class="m-1"
:label="extension"
:key="extension"
v-for="extension in node.data.getBlockedExtensionList()"
/>
</div>
Expand All @@ -72,4 +63,4 @@ console.log(props.structureChecks);
width: 100%;
}
}
</style>
</style>
3 changes: 1 addition & 2 deletions frontend/src/components/projects/ProjectStructureEditor.vue
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { ref } from 'vue';
import { type TreeNode } from 'primevue/treenode';
import { PrimeIcons } from 'primevue/api';
import { useI18n } from 'vue-i18n';
import { Project } from "@/types/Project.ts";
import { Project } from '@/types/Project.ts';
import { StructureCheck } from '@/types/StructureCheck.ts';
/* Models */
Expand All @@ -22,7 +22,6 @@ const editingStructureCheck = ref<StructureCheck | null>(null);
const selectedKeys = ref<string[]>([]);
const expandedKeys = ref<string[]>([]);
/**
* Delete a structure check from the list.
*
Expand Down
4 changes: 2 additions & 2 deletions frontend/src/types/Project.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import moment from 'moment';
import { TreeNode } from "primevue/treenode";
import { PrimeIcons } from "primevue/api";
import { type TreeNode } from 'primevue/treenode';
import { PrimeIcons } from 'primevue/api';
import { Course, type CourseJSON } from './Course.ts';
import { type ExtraCheck } from './ExtraCheck.ts';
import { type Group } from './Group.ts';
Expand Down
6 changes: 3 additions & 3 deletions frontend/src/views/projects/roles/StudentProjectView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ import { useSubmission } from '@/composables/services/submission.service.ts';
import { useProject } from '@/composables/services/project.service.ts';
import { useRoute } from 'vue-router';
import { type Project } from '@/types/Project.ts';
import {useStructureCheck} from "@/composables/services/structure_check.service.ts";
import Divider from "primevue/divider";
import { useStructureCheck } from '@/composables/services/structure_check.service.ts';
import Divider from 'primevue/divider';
/* Props */
defineProps<{
Expand Down Expand Up @@ -130,7 +130,7 @@ watchImmediate(
<ProjectInfo class="mb-3" :project="project" />
<div v-if="project" v-html="project.description" />
<Divider />
<ProjectStructure v-if="structureChecks" :structure-checks="structureChecks"/>
<ProjectStructure v-if="structureChecks" :structure-checks="structureChecks" />
</div>
<div class="col-12 md:col-4">
<template v-if="!loadingGroup">
Expand Down
4 changes: 2 additions & 2 deletions frontend/src/views/submissions/SubmissionsView.vue
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<script setup lang="ts">
import Button from 'primevue/button';
import Divider from "primevue/divider";
import Divider from 'primevue/divider';
import FileUpload from 'primevue/fileupload';
import { PrimeIcons } from 'primevue/api';
import { useI18n } from 'vue-i18n';
Expand Down Expand Up @@ -86,7 +86,7 @@ function formatDate(deadline: Date): string {
<!-- submission structure -->
<div v-if="structureChecks">
<Divider />
<ProjectStructure :structure-checks="structureChecks"/>
<ProjectStructure :structure-checks="structureChecks" />
</div>
</div>
<!-- Submission upload -->
Expand Down

0 comments on commit af7df1a

Please sign in to comment.