29 lines
1.0 KiB
Vue
29 lines
1.0 KiB
Vue
<script setup>
|
|
const props = defineProps({ mappings: Array })
|
|
</script>
|
|
<template>
|
|
<div v-if="mappings?.length" class="pt-4">
|
|
<h3 class="font-semibold mb-2">Current Saved Mappings</h3>
|
|
<div class="overflow-x-auto">
|
|
<table class="min-w-full border bg-white text-sm">
|
|
<thead>
|
|
<tr class="bg-gray-50 text-left text-xs uppercase text-gray-600">
|
|
<th class="p-2 border">Source column</th>
|
|
<th class="p-2 border">Target field</th>
|
|
<th class="p-2 border">Transform</th>
|
|
<th class="p-2 border">Mode</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<tr v-for="m in mappings" :key="m.id || (m.source_column + m.target_field)" class="border-t">
|
|
<td class="p-2 border">{{ m.source_column }}</td>
|
|
<td class="p-2 border">{{ m.target_field }}</td>
|
|
<td class="p-2 border">{{ m.transform || '—' }}</td>
|
|
<td class="p-2 border">{{ m.apply_mode || 'both' }}</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
</template>
|