Models refactor + Basic functionnalities
Some checks failed
linter / quality (push) Failing after 3m25s
tests / ci (push) Failing after 12m2s

This commit is contained in:
2025-08-26 12:12:02 +02:00
parent 715d2a884a
commit 55a52086c1
49 changed files with 1074 additions and 269 deletions

View File

@@ -0,0 +1,28 @@
<script setup lang="ts">
import { ResumeInputData } from '@/types/resume';
import ResumeComponentEditFormInput from './ResumeComponentEditFormInput.vue';
const props = defineProps<{
data: ResumeInputData[]
}>();
const emit = defineEmits(['data-changed']);
function handleDataChanged(updatedData: ResumeInputData) {
const index = props.data.findIndex(input => input.id === updatedData.id);
const dataCopy = [...props.data];
if (index !== -1) {
dataCopy[index] = updatedData;
emit('data-changed', dataCopy);
}
}
</script>
<template>
<form
@submit.prevent="emit('data-changed', props.data)"
class="w-full space-y-4"
>
<ResumeComponentEditFormInput v-for="input in props.data" :model="input" v-bind:key="input.id" @data-changed="handleDataChanged" />
</form>
</template>