-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[#2899] Create MVP configuration model for OpenKlant2
- Loading branch information
Paul Schilling
committed
Jan 6, 2025
1 parent
ce11922
commit 6e72745
Showing
7 changed files
with
244 additions
and
54 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
53 changes: 53 additions & 0 deletions
53
src/open_inwoner/openklant/migrations/0016_klanteninteractiesconfig.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
# Generated by Django 4.2.16 on 2025-01-06 16:30 | ||
|
||
import django.db.models.deletion | ||
from django.db import migrations, models | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
("openklant", "0015_openklant2config"), | ||
] | ||
|
||
operations = [ | ||
migrations.CreateModel( | ||
name="KlantenInteractiesConfig", | ||
fields=[ | ||
( | ||
"id", | ||
models.AutoField( | ||
auto_created=True, | ||
primary_key=True, | ||
serialize=False, | ||
verbose_name="ID", | ||
), | ||
), | ||
], | ||
options={ | ||
"verbose_name": "Configuratie Klanten Interacties", | ||
}, | ||
), | ||
migrations.AddField( | ||
model_name="openklantconfig", | ||
name="config", | ||
field=models.OneToOneField( | ||
null=True, | ||
on_delete=django.db.models.deletion.CASCADE, | ||
to="openklant.klanteninteractiesconfig", | ||
), | ||
), | ||
migrations.AlterModelOptions( | ||
name="openklantconfig", | ||
options={"verbose_name": "eSuite configuration"}, | ||
), | ||
migrations.AddField( | ||
model_name="openklant2config", | ||
name="config", | ||
field=models.OneToOneField( | ||
null=True, | ||
on_delete=django.db.models.deletion.CASCADE, | ||
to="openklant.klanteninteractiesconfig", | ||
), | ||
), | ||
] |
23 changes: 23 additions & 0 deletions
23
src/open_inwoner/openklant/migrations/0017_kic_esuite_openklant2.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
from django.db import migrations | ||
|
||
|
||
def embed_kic_configurations(apps, _): | ||
kic_config_model = apps.get_model("openklant", "KlantenInteractiesConfig") | ||
kic_config = kic_config_model.objects.create() | ||
|
||
esuite_model = apps.get_model("openklant", "OpenKlantConfig") | ||
for config in esuite_model.objects.all(): | ||
config.config = kic_config | ||
config.save() | ||
|
||
ok2_model = apps.get_model("openklant", "OpenKlant2Config") | ||
for config in ok2_model.objects.all(): | ||
config.config = kic_config | ||
config.save() | ||
|
||
|
||
class Migration(migrations.Migration): | ||
dependencies = [("openklant", "0016_klanteninteractiesconfig")] | ||
operations = [ | ||
migrations.RunPython(embed_kic_configurations, migrations.RunPython.noop) | ||
] |
23 changes: 23 additions & 0 deletions
23
src/open_inwoner/openklant/migrations/0018_alter_contactformsubject_config.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
# Generated by Django 4.2.16 on 2025-01-06 16:56 | ||
|
||
import django.db.models.deletion | ||
from django.db import migrations, models | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
("openklant", "0017_kic_esuite_openklant2"), | ||
] | ||
|
||
operations = [ | ||
migrations.AlterField( | ||
model_name="contactformsubject", | ||
name="config", | ||
field=models.ForeignKey( | ||
null=True, | ||
on_delete=django.db.models.deletion.CASCADE, | ||
to="openklant.klanteninteractiesconfig", | ||
), | ||
), | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
.inline-group { | ||
margin-bottom: 16px; | ||
|
||
border: 1px solid #ddd; | ||
border-radius: 5px; | ||
|
||
> fieldset > h2 { | ||
margin-bottom: 5px; | ||
background-color: #498fc9; | ||
} | ||
} | ||
|
||
.inline-related { | ||
h3 { | ||
display: none; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters