Skip to content

Commit

Permalink
POLIO-1803: fix minor bugs
Browse files Browse the repository at this point in the history
  • Loading branch information
quang-le committed Dec 19, 2024
1 parent cab5073 commit b590271
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -135,8 +135,8 @@ export const useCampaignDropDowns = (
}));
const vaccines = selectedCampaign?.single_vaccines
? selectedCampaign.single_vaccines.split(',').map(vaccineName => ({
label: vaccineName,
value: vaccineName,
label: vaccineName.trim(),
value: vaccineName.trim(),
}))
: singleVaccinesList;
const rounds = vaccine
Expand Down
8 changes: 7 additions & 1 deletion plugins/polio/models/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,12 @@
("nOPV2 & bOPV", _("nOPV2 & bOPV")),
]

INDIVIDUAL_VACCINES = [
("mOPV2", _("mOPV2")),
("nOPV2", _("nOPV2")),
("bOPV", _("bOPV")),
]

DOSES_PER_VIAL = {
"mOPV2": 20,
"nOPV2": 50,
Expand Down Expand Up @@ -1099,7 +1105,7 @@ class Meta:
]

campaign = models.ForeignKey(Campaign, on_delete=models.CASCADE, db_index=True)
vaccine_type = models.CharField(max_length=30, choices=VACCINES)
vaccine_type = models.CharField(max_length=30, choices=INDIVIDUAL_VACCINES)
rounds = models.ManyToManyField(Round, db_index=True)
date_vrf_signature = models.DateField(null=True, blank=True)
date_vrf_reception = models.DateField(null=True, blank=True)
Expand Down

0 comments on commit b590271

Please sign in to comment.