Changes
This commit is contained in:
@@ -8,6 +8,7 @@ const props = defineProps({
|
||||
import: Object,
|
||||
templates: Array,
|
||||
clients: Array,
|
||||
client: Object
|
||||
});
|
||||
|
||||
const importId = ref(props.import?.id || null);
|
||||
@@ -227,13 +228,13 @@ const fieldOptionsByEntity = {
|
||||
|
||||
// Local state for selects
|
||||
const form = ref({
|
||||
client_uuid: null,
|
||||
client_uuid: props.client.uuid,
|
||||
import_template_id: props.import?.import_template_id || null,
|
||||
});
|
||||
|
||||
// Initialize client_uuid from numeric client_id using provided clients list
|
||||
if (props.import?.client_id) {
|
||||
const found = (props.clients || []).find(c => c.id === props.import.client_id);
|
||||
// Initialize client_uuid from import.client_uuid (preferred) using provided clients list
|
||||
if (props.import?.client_uuid) {
|
||||
const found = (props.clients || []).find(c => c.uuid === props.import.client_uuid);
|
||||
form.value.client_uuid = found ? found.uuid : null;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user