Skip to content

Commit

Permalink
re-add fspName
Browse files Browse the repository at this point in the history
  • Loading branch information
tijsziere committed Jan 22, 2025
1 parent 1b11a4f commit a518bf3
Show file tree
Hide file tree
Showing 2 changed files with 56 additions and 40 deletions.
4 changes: 2 additions & 2 deletions routes/routes121.py
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,7 @@ async def create_121_program_from_kobo(
"preferredLanguage",
"budget",
"maxPayments",
"programFinancialServiceProviderConfigurationName"
"fspName"
]

# First check if all setup fields are in the xlsform
Expand Down Expand Up @@ -360,7 +360,7 @@ async def create_121_program_from_kobo(
"enableScope": False,
}

koboConnectHeader = ["programFinancialServiceProviderConfigurationName", "preferredLanguage", "maxPayments"]
koboConnectHeader = ["fspName", "preferredLanguage", "maxPayments"]

for index, row in survey.iterrows():
if (
Expand Down
92 changes: 54 additions & 38 deletions tests/program121.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
{
"published": true,
"validation": true,
"phase": "registrationValidation",
"location": "Netherlands",
"ngo": "RCRC",
"titlePortal": {
Expand All @@ -20,23 +19,16 @@
"distributionDuration": 4,
"fixedTransferValue": 100,
"paymentAmountMultiplierFormula": "",
"financialServiceProviders": [
{
"fsp": "Commercial-bank-ethiopia"
}
],
"targetNrRegistrations": 10,
"tryWhatsAppFirst": false,
"phoneNumberPlaceholder": "32000000000",
"programCustomAttributes": [],
"programQuestions": [
"programRegistrationAttributes": [
{
"name": "province",
"label": {
"en": "What is the province?"
},
"answerType": "dropdown",
"questionType": "standard",
"type": "dropdown",
"options": [
{
"option": "South-Holland",
Expand Down Expand Up @@ -68,8 +60,7 @@
"label": {
"en": "What is the city?"
},
"answerType": "dropdown",
"questionType": "standard",
"type": "dropdown",
"options": [
{
"option": "Amsterdam",
Expand Down Expand Up @@ -113,8 +104,7 @@
"label": {
"en": "scope"
},
"answerType": "text",
"questionType": "standard",
"type": "text",
"options": [],
"scoring": {},
"persistence": true,
Expand All @@ -133,8 +123,7 @@
"label": {
"en": "What is your name?"
},
"answerType": "text",
"questionType": "standard",
"type": "text",
"options": [],
"scoring": {},
"persistence": true,
Expand All @@ -153,8 +142,7 @@
"label": {
"en": "What is your age?"
},
"answerType": "numeric",
"questionType": "standard",
"type": "numeric",
"options": [],
"scoring": {},
"persistence": true,
Expand All @@ -173,8 +161,7 @@
"label": {
"en": "What is your sex?"
},
"answerType": "dropdown",
"questionType": "standard",
"type": "dropdown",
"options": [
{
"option": "Female",
Expand Down Expand Up @@ -212,8 +199,7 @@
"label": {
"en": "What is your ID number?"
},
"answerType": "numeric",
"questionType": "standard",
"type": "numeric",
"options": [],
"scoring": {},
"persistence": true,
Expand All @@ -232,8 +218,7 @@
"label": {
"en": "Phone Number"
},
"answerType": "tel",
"questionType": "standard",
"type": "tel",
"options": [],
"scoring": {},
"persistence": true,
Expand All @@ -252,8 +237,7 @@
"label": {
"en": "What is the amount of members in your household?"
},
"answerType": "numeric",
"questionType": "standard",
"type": "numeric",
"options": [],
"scoring": {},
"persistence": true,
Expand All @@ -272,8 +256,7 @@
"label": {
"en": "Is this a single parent headed household?"
},
"answerType": "dropdown",
"questionType": "standard",
"type": "dropdown",
"options": [
{
"option": "Yes",
Expand Down Expand Up @@ -305,8 +288,7 @@
"label": {
"en": "Is this an elderly headed household?"
},
"answerType": "dropdown",
"questionType": "standard",
"type": "dropdown",
"options": [
{
"option": "Yes",
Expand Down Expand Up @@ -338,8 +320,7 @@
"label": {
"en": "Are there people with serious and/or chronic illness in the household?"
},
"answerType": "dropdown",
"questionType": "standard",
"type": "dropdown",
"options": [
{
"option": "Yes",
Expand Down Expand Up @@ -371,8 +352,7 @@
"label": {
"en": "Are there people with disabilities in the household?"
},
"answerType": "dropdown",
"questionType": "standard",
"type": "dropdown",
"options": [
{
"option": "Yes",
Expand Down Expand Up @@ -404,8 +384,7 @@
"label": {
"en": "Is the household displaced?"
},
"answerType": "dropdown",
"questionType": "standard",
"type": "dropdown",
"options": [
{
"option": "Yes",
Expand Down Expand Up @@ -437,8 +416,7 @@
"label": {
"en": "Is the head of household unemployed?"
},
"answerType": "dropdown",
"questionType": "standard",
"type": "dropdown",
"options": [
{
"option": "Yes",
Expand All @@ -464,6 +442,44 @@
},
"duplicateCheck": false,
"placeholder": ""
},
{
"name": "phase",
"label": {
"en": "phase"
},
"type": "text",
"options": [],
"scoring": {},
"persistence": true,
"pattern": "",
"phases": [],
"editableInPortal": true,
"export": ["all-people-affected"],
"shortLabel": {
"en": "phase"
},
"duplicateCheck": false,
"placeholder": ""
},
{
"name": "phoneNumberPlaceholder",
"label": {
"en": "phoneNumberPlaceholder"
},
"type": "text",
"options": [],
"scoring": {},
"persistence": true,
"pattern": "",
"phases": [],
"editableInPortal": true,
"export": ["all-people-affected"],
"shortLabel": {
"en": "phoneNumberPlaceholder"
},
"duplicateCheck": false,
"placeholder": ""
}
],
"aboutProgram": {
Expand Down

0 comments on commit a518bf3

Please sign in to comment.