snapshot: preserve configurable onboarding conditional logic

This commit is contained in:
Md Bayazid Bostame
2026-03-27 12:54:47 +01:00
parent eb0fb811e4
commit 2e5e941d41
9 changed files with 431 additions and 41 deletions

View File

@@ -546,6 +546,26 @@ class FormSectionConfig(models.Model):
return f'{self.form_type}: {self.section_key}'
class FormConditionalRuleConfig(models.Model):
FORM_CHOICES = [
('onboarding', _('Onboarding')),
]
form_type = models.CharField(max_length=20, choices=FORM_CHOICES)
target_key = models.CharField(max_length=80)
clauses = models.JSONField(default=list, blank=True)
is_active = models.BooleanField(default=True)
class Meta:
ordering = ['form_type', 'target_key']
unique_together = ('form_type', 'target_key')
verbose_name = 'Formular-Bedingungsregel'
verbose_name_plural = 'Formular-Bedingungsregeln'
def __str__(self) -> str:
return f'{self.form_type}: {self.target_key}'
class NotificationTemplate(models.Model):
TEMPLATE_CHOICES = [
('onboarding_it', _('Onboarding: IT')),