Skip to content

Commit 58ada70

Browse files
Merge pull request #1750 from IFRCGo/feature/op-regional
Add regional contact in dref and op-update
2 parents 1c806f5 + 0707355 commit 58ada70

File tree

3 files changed

+85
-0
lines changed

3 files changed

+85
-0
lines changed
Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
# Generated by Django 3.2.18 on 2023-04-18 07:03
2+
3+
from django.db import migrations, models
4+
5+
6+
class Migration(migrations.Migration):
7+
8+
dependencies = [
9+
('dref', '0055_auto_20230406_1010'),
10+
]
11+
12+
operations = [
13+
migrations.AddField(
14+
model_name='dref',
15+
name='regional_focal_point_email',
16+
field=models.CharField(blank=True, max_length=255, null=True, verbose_name='regional focal point email'),
17+
),
18+
migrations.AddField(
19+
model_name='dref',
20+
name='regional_focal_point_name',
21+
field=models.CharField(blank=True, max_length=255, null=True, verbose_name='regional focal point name'),
22+
),
23+
migrations.AddField(
24+
model_name='dref',
25+
name='regional_focal_point_phone_number',
26+
field=models.CharField(blank=True, max_length=100, null=True, verbose_name='regional focal point phone number'),
27+
),
28+
migrations.AddField(
29+
model_name='dref',
30+
name='regional_focal_point_title',
31+
field=models.CharField(blank=True, max_length=255, null=True, verbose_name='regional focal point title'),
32+
),
33+
migrations.AddField(
34+
model_name='drefoperationalupdate',
35+
name='regional_focal_point_email',
36+
field=models.CharField(blank=True, max_length=255, null=True, verbose_name='regional focal point email'),
37+
),
38+
migrations.AddField(
39+
model_name='drefoperationalupdate',
40+
name='regional_focal_point_name',
41+
field=models.CharField(blank=True, max_length=255, null=True, verbose_name='regional focal point name'),
42+
),
43+
migrations.AddField(
44+
model_name='drefoperationalupdate',
45+
name='regional_focal_point_phone_number',
46+
field=models.CharField(blank=True, max_length=100, null=True, verbose_name='regional focal point phone number'),
47+
),
48+
migrations.AddField(
49+
model_name='drefoperationalupdate',
50+
name='regional_focal_point_title',
51+
field=models.CharField(blank=True, max_length=255, null=True, verbose_name='regional focal point title'),
52+
),
53+
]

dref/models.py

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -465,6 +465,18 @@ class Status(models.IntegerChoices):
465465
originator_phone_number = models.CharField(
466466
verbose_name=_("originator phone number"), max_length=100, null=True, blank=True
467467
)
468+
regional_focal_point_name = models.CharField(
469+
verbose_name=_("regional focal point name"), max_length=255, null=True, blank=True
470+
)
471+
regional_focal_point_email = models.CharField(
472+
verbose_name=_("regional focal point email"), max_length=255, null=True, blank=True
473+
)
474+
regional_focal_point_title = models.CharField(
475+
verbose_name=_("regional focal point title"), max_length=255, null=True, blank=True
476+
)
477+
regional_focal_point_phone_number = models.CharField(
478+
verbose_name=_("regional focal point phone number"), max_length=100, null=True, blank=True
479+
)
468480
human_resource = models.TextField(
469481
blank=True,
470482
null=True,
@@ -793,6 +805,18 @@ class DrefOperationalUpdate(models.Model):
793805
ifrc_emergency_phone_number = models.CharField(
794806
verbose_name=_("ifrc emergency phone number"), max_length=100, null=True, blank=True
795807
)
808+
regional_focal_point_name = models.CharField(
809+
verbose_name=_("regional focal point name"), max_length=255, null=True, blank=True
810+
)
811+
regional_focal_point_email = models.CharField(
812+
verbose_name=_("regional focal point email"), max_length=255, null=True, blank=True
813+
)
814+
regional_focal_point_title = models.CharField(
815+
verbose_name=_("regional focal point title"), max_length=255, null=True, blank=True
816+
)
817+
regional_focal_point_phone_number = models.CharField(
818+
verbose_name=_("regional focal point phone number"), max_length=100, null=True, blank=True
819+
)
796820
changing_timeframe_operation = models.BooleanField(null=True, blank=True, verbose_name=_("Changing time operation"))
797821
changing_operation_strategy = models.BooleanField(null=True, blank=True, verbose_name=_("Changing operation strategy"))
798822
changing_target_population_of_operation = models.BooleanField(

dref/serializers.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -485,6 +485,10 @@ def create(self, validated_data):
485485
validated_data["ifrc_emergency_title"] = dref.ifrc_emergency_title
486486
validated_data["ifrc_emergency_phone_number"] = dref.ifrc_emergency_phone_number
487487
validated_data["ifrc_emergency_email"] = dref.ifrc_emergency_email
488+
validated_data["regional_focal_point_email"] = dref.regional_focal_point_email
489+
validated_data["regional_focal_point_name"] = dref.regional_focal_point_name
490+
validated_data["regional_focal_point_title"] = dref.regional_focal_point_title
491+
validated_data["regional_focal_point_phone_number"] = dref.regional_focal_point_phone_number
488492
validated_data["ifrc"] = dref.ifrc
489493
validated_data["icrc"] = dref.icrc
490494
validated_data["partner_national_society"] = dref.partner_national_society
@@ -585,6 +589,10 @@ def create(self, validated_data):
585589
validated_data["ifrc_emergency_title"] = dref_operational_update.ifrc_emergency_title
586590
validated_data["ifrc_emergency_phone_number"] = dref_operational_update.ifrc_emergency_phone_number
587591
validated_data["ifrc_emergency_email"] = dref_operational_update.ifrc_emergency_email
592+
validated_data["regional_focal_point_email"] = dref_operational_update.regional_focal_point_email
593+
validated_data["regional_focal_point_name"] = dref_operational_update.regional_focal_point_name
594+
validated_data["regional_focal_point_title"] = dref_operational_update.regional_focal_point_title
595+
validated_data["regional_focal_point_phone_number"] = dref_operational_update.regional_focal_point_phone_number
588596
validated_data["ifrc"] = dref_operational_update.ifrc
589597
validated_data["icrc"] = dref_operational_update.icrc
590598
validated_data["partner_national_society"] = dref_operational_update.partner_national_society

0 commit comments

Comments
 (0)