|
|
@ -68,8 +68,20 @@ export function useEnvironmentName( |
|
|
|
options.value = environmentList.filter((option: IEnvironmentNameOption) => |
|
|
|
options.value = environmentList.filter((option: IEnvironmentNameOption) => |
|
|
|
filterByWorkerGroup(option) |
|
|
|
filterByWorkerGroup(option) |
|
|
|
) |
|
|
|
) |
|
|
|
model.environmentCode = |
|
|
|
if (model?.environmentCode) { |
|
|
|
options.value.length === 0 ? null : options.value[0].value |
|
|
|
if (options.value) { |
|
|
|
|
|
|
|
let elementExists = |
|
|
|
|
|
|
|
options.value.find( |
|
|
|
|
|
|
|
(item) => item.value === model.environmentCode |
|
|
|
|
|
|
|
) !== undefined |
|
|
|
|
|
|
|
if (!elementExists) { |
|
|
|
|
|
|
|
model.environmentCode = null |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
|
|
model.environmentCode = |
|
|
|
|
|
|
|
options.value.length === 0 ? null : options.value[0].value |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
) |
|
|
|
) |
|
|
|
|
|
|
|
|
|
|
|