fix(KAN-14): preserve template inheritance and project data
This commit is contained in:
@@ -19,6 +19,7 @@ import {
|
||||
import { Label } from '@/components/ui/label';
|
||||
import { useFormProtection } from '@/composables/useFormProtection';
|
||||
import { useLocalization } from '@/composables/useLocalization';
|
||||
import type { TemplateResetForm } from '@/types/project-template-configuration';
|
||||
import type { ProjectTemplateState, ProjectTemplateStateArea } from '@/types';
|
||||
|
||||
const props = defineProps<{
|
||||
@@ -27,10 +28,7 @@ const props = defineProps<{
|
||||
templateState?: ProjectTemplateState | null;
|
||||
}>();
|
||||
const { t } = useLocalization();
|
||||
const form = useForm<{
|
||||
areas: string[];
|
||||
status_replacements: Record<string, number | undefined>;
|
||||
}>({
|
||||
const form = useForm<TemplateResetForm>({
|
||||
areas: [],
|
||||
status_replacements: {},
|
||||
});
|
||||
@@ -245,6 +243,15 @@ function resetArea(): void {
|
||||
v-if="statusRequirement"
|
||||
class="gap-column grid min-w-0"
|
||||
>
|
||||
<p
|
||||
v-if="
|
||||
statusRequirement.replacementOptions
|
||||
.length === 0
|
||||
"
|
||||
class="text-destructive text-sm"
|
||||
>
|
||||
{{ t('inheritance.noReplacementTargets') }}
|
||||
</p>
|
||||
<p class="text-caption text-muted-foreground">
|
||||
{{ t('inheritance.statusHelp') }}
|
||||
</p>
|
||||
|
||||
Reference in New Issue
Block a user