diff --git a/lego/apps/companies/constants.py b/lego/apps/companies/constants.py index 73014131f..984a06d19 100644 --- a/lego/apps/companies/constants.py +++ b/lego/apps/companies/constants.py @@ -93,17 +93,17 @@ class COMPANY_TYPES(models.TextChoices): SMALL_CONSULTANT = "company_types_small_consultant" MEDIUM_CONSULTANT = "company_types_medium_consultant" LARGE_CONSULTANT = "company_types_large_consultant" - INHOUSE = "company_types_inhouse" + IN_HOUSE = "company_types_inhouse" TYPES_OTHERS = "company_types_others" START_UP = "company_types_start_up" GOVERNMENTAL = "company_types_governmental" TRANSLATED_COMPANY_TYPES = { - COMPANY_TYPES.SMALL_CONSULTANT: "Liten Konsulentbedrift", + COMPANY_TYPES.SMALL_CONSULTANT: "Liten konsulentbedrift", COMPANY_TYPES.MEDIUM_CONSULTANT: "Medium konsulentbedrift", COMPANY_TYPES.LARGE_CONSULTANT: "Stor konsulentbedrift", - COMPANY_TYPES.INHOUSE: "Inhouse", + COMPANY_TYPES.IN_HOUSE: "In-house", COMPANY_TYPES.TYPES_OTHERS: "Annet", COMPANY_TYPES.START_UP: "Start-up", COMPANY_TYPES.GOVERNMENTAL: "Statlig", diff --git a/lego/apps/companies/migrations/0030_alter_company_company_type_and_more.py b/lego/apps/companies/migrations/0030_alter_company_company_type_and_more.py new file mode 100644 index 000000000..00a37a976 --- /dev/null +++ b/lego/apps/companies/migrations/0030_alter_company_company_type_and_more.py @@ -0,0 +1,49 @@ +# Generated by Django 4.2.16 on 2024-12-15 14:46 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ("companies", "0029_remove_company_previous_contacts_and_more"), + ] + + operations = [ + migrations.AlterField( + model_name="company", + name="company_type", + field=models.CharField( + blank=True, + choices=[ + ("company_types_small_consultant", "Small Consultant"), + ("company_types_medium_consultant", "Medium Consultant"), + ("company_types_large_consultant", "Large Consultant"), + ("company_types_inhouse", "In House"), + ("company_types_others", "Types Others"), + ("company_types_start_up", "Start Up"), + ("company_types_governmental", "Governmental"), + ], + max_length=64, + null=True, + ), + ), + migrations.AlterField( + model_name="companyinterest", + name="company_type", + field=models.CharField( + blank=True, + choices=[ + ("company_types_small_consultant", "Small Consultant"), + ("company_types_medium_consultant", "Medium Consultant"), + ("company_types_large_consultant", "Large Consultant"), + ("company_types_inhouse", "In House"), + ("company_types_others", "Types Others"), + ("company_types_start_up", "Start Up"), + ("company_types_governmental", "Governmental"), + ], + max_length=64, + null=True, + ), + ), + ] diff --git a/lego/apps/companies/models.py b/lego/apps/companies/models.py index 37b799ed5..14aabae2e 100644 --- a/lego/apps/companies/models.py +++ b/lego/apps/companies/models.py @@ -45,7 +45,9 @@ class Company(BasisModel): description = models.TextField(blank=True) phone = models.CharField(max_length=100, blank=True) - company_type = models.CharField(max_length=200, blank=True) + company_type = models.CharField( + max_length=64, choices=COMPANY_TYPES.choices, blank=True, null=True + ) website = models.URLField(blank=True) address = models.CharField(max_length=200, blank=True) admin_comment = models.CharField(max_length=100, blank=True)