Skip to content

Commit

Permalink
#849 | Support IS_ALLOWED_TO_INVOKE_TOKEN_GENERATION_API in userCatch…
Browse files Browse the repository at this point in the history
…ment csv upload
  • Loading branch information
himeshr committed Jan 16, 2025
1 parent 0a78ce4 commit f9ffb0c
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 27 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,17 @@ public class UsersAndCatchmentsHeaders implements Headers {
public static final String MOBILE_NUMBER = "Mobile Number";
public static final String PREFERRED_LANGUAGE = "Preferred Language";
public static final String TRACK_LOCATION = "Track Location";
public static final String IS_ALLOWED_TO_INVOKE_TOKEN_GENERATION_API = "Is Allowed To Invoke Token Generation API";
public static final String DATE_PICKER_MODE = "Date picker mode";
public static final String ENABLE_BENEFICIARY_MODE = "Enable Beneficiary mode";
public static final String IDENTIFIER_PREFIX = "Identifier Prefix";
public static final String USER_GROUPS = "User Groups";

private static final List<String> OPTIONAL_HEADERS = Arrays.asList(ENABLE_BENEFICIARY_MODE, TRACK_LOCATION, PREFERRED_LANGUAGE, DATE_PICKER_MODE, IDENTIFIER_PREFIX, USER_GROUPS);
private static final List<String> OPTIONAL_HEADERS = Arrays.asList(ENABLE_BENEFICIARY_MODE, TRACK_LOCATION, IS_ALLOWED_TO_INVOKE_TOKEN_GENERATION_API, PREFERRED_LANGUAGE, DATE_PICKER_MODE, IDENTIFIER_PREFIX, USER_GROUPS);

@Override
public String[] getAllHeaders() {
List<String> headers = new ArrayList<>(Arrays.asList(LOCATION_WITH_FULL_HIERARCHY, CATCHMENT_NAME, USERNAME, FULL_NAME_OF_USER, EMAIL_ADDRESS, MOBILE_NUMBER, PREFERRED_LANGUAGE, TRACK_LOCATION, DATE_PICKER_MODE, ENABLE_BENEFICIARY_MODE, IDENTIFIER_PREFIX, USER_GROUPS));
List<String> headers = new ArrayList<>(Arrays.asList(LOCATION_WITH_FULL_HIERARCHY, CATCHMENT_NAME, USERNAME, FULL_NAME_OF_USER, EMAIL_ADDRESS, MOBILE_NUMBER, PREFERRED_LANGUAGE, TRACK_LOCATION, IS_ALLOWED_TO_INVOKE_TOKEN_GENERATION_API, DATE_PICKER_MODE, ENABLE_BENEFICIARY_MODE, IDENTIFIER_PREFIX, USER_GROUPS));
return headers.toArray(new String[0]);
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
Location with full hierarchy,Catchment Name,Username,Full Name of User,Email Address,Mobile Number,Preferred Language,Track Location,Date picker mode,Enable Beneficiary mode,Identifier Prefix,User Groups
"Mandatory field. Can be found from Admin -> Locations -> Click Export",Mandatory field,Mandatory field,Mandatory field,Mandatory field,"Mandatory field. Prefix the mobile number with country code","Allowed values: #supported_languages#. Only single value allowed. Default: English","Allowed values: yes, no. Default: no","Allowed values: calendar, spinner. Default: calendar","Allowed values: yes, no. Default: no",,"Allowed values: #all_user_groups#"
"PHC B, Sub B, Vil B",Org X Cat A,user29@orgx,user29,[email protected],+919876543210,English,yes,calendar,no,U29,"Group 1,Group 2"
"PHC B, Sub B, Vil C",Org X Cat A,user29@orgx,user29,[email protected],+919876543210,English,yes,calendar,no,U29,"Group 1,Group 2"
"PHC B, Sub C, Vil C",Org X Cat A,user29@orgx,user29,[email protected],+919876543210,English,yes,calendar,no,U29,"Group 1,Group 2"
"PHC B, Sub B, Vil C",Org X Cat B,user49@orgx,user49,[email protected],+919876543210,English,yes,,no,U49,"Group 1"
"PHC B, Sub C, Vil C",Org X Cat B,user49@orgx,user49,[email protected],+919876543210,English,yes,,no,U49,"Group 1"
"PHC C, Sub C, Vil C",Org X Cat B,user49@orgx,user49,[email protected],+919876543210,English,yes,,no,U49,"Group 1"
"PHC B, Sub C, Vil C",Org X Cat C,user69@orgx,user69,[email protected],+919876543210,English,no,spinner,no,U69,"Group 2"
"PHC C, Sub C, Vil C",Org X Cat C,user69@orgx,user69,[email protected],+919876543210,English,no,spinner,no,U69,"Group 2"
Location with full hierarchy,Catchment Name,Username,Full Name of User,Email Address,Mobile Number,Preferred Language,Track Location,Is Allowed To Invoke Token Generation API,Date picker mode,Enable Beneficiary mode,Identifier Prefix,User Groups
"Mandatory field. Can be found from Admin -> Locations -> Click Export",Mandatory field,Mandatory field,Mandatory field,Mandatory field,"Mandatory field. Prefix the mobile number with country code","Allowed values: #supported_languages#. Only single value allowed. Default: English","Allowed values: yes, no. Default: no","Allowed values: yes, no. Default: no","Allowed values: calendar, spinner. Default: calendar","Allowed values: yes, no. Default: no",,"Allowed values: #all_user_groups#"
"PHC B, Sub B, Vil B",Org X Cat A,user29@orgx,user29,[email protected],+919876543210,English,yes,no,calendar,no,U29,"Group 1,Group 2"
"PHC B, Sub B, Vil C",Org X Cat A,user29@orgx,user29,[email protected],+919876543210,English,yes,no,calendar,no,U29,"Group 1,Group 2"
"PHC B, Sub C, Vil C",Org X Cat A,user29@orgx,user29,[email protected],+919876543210,English,yes,no,calendar,no,U29,"Group 1,Group 2"
"PHC B, Sub B, Vil C",Org X Cat B,user49@orgx,user49,[email protected],+919876543210,English,yes,no,,no,U49,"Group 1"
"PHC B, Sub C, Vil C",Org X Cat B,user49@orgx,user49,[email protected],+919876543210,English,yes,no,,no,U49,"Group 1"
"PHC C, Sub C, Vil C",Org X Cat B,user49@orgx,user49,[email protected],+919876543210,English,yes,no,,no,U49,"Group 1"
"PHC B, Sub C, Vil C",Org X Cat C,user69@orgx,user69,[email protected],+919876543210,English,no,yes,spinner,no,U69,"Group 2"
"PHC C, Sub C, Vil C",Org X Cat C,user69@orgx,user69,[email protected],+919876543210,English,no,yes,spinner,no,U69,"Group 2"

This file was deleted.

This file was deleted.

0 comments on commit f9ffb0c

Please sign in to comment.