All files / apps/developer-portal/layers/workflows/app/components/wizard Details.vue

89.47% Statements 17/19
100% Branches 14/14
81.81% Functions 9/11
100% Lines 14/14

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59  27x     10x         26x           16x   2x           27x             26x           27x                           16x   16x 16x 16x 16x 16x    
<template>
    <form class="flex flex-col gap-4" @submit.prevent="emit('submit')">
        <UFormField :label="$t('wizardDetails.title.label')" required>
            <UInput
                v-model="title"
                :placeholder="$t('wizardDetails.title.placeholder')"
                size="lg"
                class="w-full"
                autofocus
            />
        </UFormField>
        <UFormField
            :label="$t('wizardDetails.summary.label')"
            :help="$t('wizardDetails.summary.help')"
        >
            <UTextarea v-model="summary" :rows="2" class="w-full" />
        </UFormField>
        <div class="grid gap-4 sm:grid-cols-3">
            <UFormField
                :label="$t('wizardDetails.id.label')"
                :help="$t('wizardDetails.id.help')"
                :error="idError"
            >
                <UInput v-model="id" class="w-full" />
            </UFormField>
            <UFormField
                :label="$t('wizardDetails.milestone.label')"
                :help="$t('wizardDetails.milestone.help')"
                :error="milestoneError"
            >
                <UInput v-model="milestone" class="w-full" />
            </UFormField>
            <UFormField
                :label="$t('wizardDetails.area.label')"
                :help="$t('wizardDetails.area.help')"
            >
                <UInput v-model="area" class="w-full" />
            </UFormField>
        </div>
        <button type="submit" hidden />
    </form>
</template>
 
<script setup lang="ts">
interface Props {
    idError?: string;
    milestoneError?: string;
}
 
const { idError, milestoneError } = defineProps<Props>();
const emit = defineEmits<{ submit: [] }>();
 
const title = defineModel<string>("title", { required: true });
const summary = defineModel<string>("summary", { required: true });
const id = defineModel<string>("id", { required: true });
const milestone = defineModel<string>("milestone", { required: true });
const area = defineModel<string>("area", { required: true });
</script>