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

100% Statements 11/11
100% Branches 3/3
100% Functions 2/2
100% Lines 10/10

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  13x 2x 68x         2x 2x         2x 2x                                             11x 11x 2x      
<template>
    <div class="flex flex-col gap-6">
        <dl class="divide-y divide-default rounded-xl border border-default">
            <div
                v-for="row in rows"
                :key="row.label"
                class="flex flex-col gap-1 px-4 py-3 sm:flex-row sm:gap-6"
            >
                <dt class="w-32 shrink-0 text-sm text-muted">{{ row.label }}</dt>
                <dd class="text-sm">{{ row.value }}</dd>
            </div>
        </dl>
 
        <section v-if="preview" class="rounded-2xl border border-default">
            <header class="border-b border-default px-4 py-3">
                <h2 class="text-sm font-semibold">{{ $t("wizardReview.graph") }}</h2>
            </header>
            <WorkflowGraph
                :capabilities="preview.capabilities"
                :stages="preview.stages"
                :selected="picked"
                class="rounded-t-none"
                @select="pick"
            />
        </section>
    </div>
</template>
 
<script setup lang="ts">
import type { ProjectView, ReviewRow } from "#layers/workflows/shared/workflows.ts";
 
interface Props {
    rows: ReviewRow[];
    preview: ProjectView | null;
}
 
const { rows, preview } = defineProps<Props>();
 
const picked = ref<string | null>(null);
const pick = (id: string) => {
    picked.value = picked.value === id ? null : id;
};
</script>