Skip to content

Commit

Permalink
bramfixes
Browse files Browse the repository at this point in the history
  • Loading branch information
DRIESASTER committed May 21, 2024
1 parent 2ea6979 commit 4dd6ff5
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 17 deletions.
13 changes: 7 additions & 6 deletions frontend/src/components/project/RadiobuttonList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,14 @@
<script setup lang="ts">
import { ref, defineProps, defineEmits, watch } from "vue";
import DatePicker from "./DatePicker.vue";
import type { Optional } from "@tanstack/vue-query";
const props = defineProps({
title: String,
options: Array,
initialDate: Date,
initialCapacity: Number,
});
const props = defineProps<{
title: string;
options: string[];
initialDate: Optional<Date>;
initialCapacity: number;
}>();
const isToggled = ref(false);
const selectedOption = ref("");
Expand Down
3 changes: 1 addition & 2 deletions frontend/src/components/project/RequirementsInput.vue
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
</v-alert>
<v-row>
<v-col cols="12">
<!-- Form with simpler validation trigger -->
<v-form @submit.prevent="addRequirement" ref="form">
<v-text-field
v-model="newRequirement"
Expand Down Expand Up @@ -77,7 +76,7 @@ watchEffect(() => {
internalRequirements.value = [...props.modelValue];
});
const deleteRequirement = (index) => {
const deleteRequirement = (index: number) => {
internalRequirements.value.splice(index, 1);
emit("update:modelValue", internalRequirements.value);
};
Expand Down
2 changes: 0 additions & 2 deletions frontend/src/i18n/locales/en.ts
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,6 @@ export default {
publish_date: "Publish date",
no_files: "No project files found",
requirement: "Add mandatory or forbidden extension (ie: assignment.pdf)",
mandatory: "Mandatory",
forbidden: "Forbidden",
invalid_format:
"Please enter a valid file type, including the extension (e.g., 'image.png')",
files_will_be_overwritten: "By uploading another file current files will be overwritten.",
Expand Down
2 changes: 0 additions & 2 deletions frontend/src/i18n/locales/nl.ts
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,6 @@ export default {
publish_date: "Publiceringsdatum",
no_files: "Geen bestanden voor het project teruggevonden",
requirement: "Voeg verplichte of verboden extensie toe (bv: verslag.pdf)",
mandatory: "Verplicht",
forbidden: "Verboden",
invalid_format:
"Voer een geldig bestandstype in, inclusief de extensie (bv. 'afbeelding.png')",
files_will_be_overwritten:
Expand Down
7 changes: 3 additions & 4 deletions frontend/src/queries/Project.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
import { computed, type Ref, toValue } from "vue";
import { computed, toValue } from "vue";
import type { MaybeRefOrGetter } from "vue";
import { useMutation, useQuery, useQueryClient } from "@tanstack/vue-query";
import type { UseMutationReturnType, UseQueryReturnType } from "@tanstack/vue-query";
import type { Project, UserProjectList } from "@/models/Project";
import type { ProjectForm } from "@/models/Project";
import type Submission from "@/models/Submission";
import type { ProjectForm, UserProjectList } from "@/models/Project";
import type Project from "@/models/Project";
import {
getProject,
createProject,
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/views/CreateProjectView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ const successMessage = ref("");
const requirements = ref<{ mandatory: boolean; value: string }[]>([]);
const projectId = ref(Number(route.params.projectId));
const isEditMode = computed(() => projectId.value !== undefined);
const isEditMode = computed(() => !isNaN(projectId.value) && projectId.value !== 0);
//mutations
const createProjectMutation = useCreateProjectMutation();
Expand Down

0 comments on commit 4dd6ff5

Please sign in to comment.