Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: deprecate MyInfo fields for V3 (step 1 - frontend) #1071

Merged
merged 1 commit into from
Feb 4, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,16 @@ const newFields = new Set() // Adding a fieldTypes will add a "new" label.

angular.module('forms').directive('editFormDirective', editFormDirective)

// TODO (private #110): remove this variable
const DEPRECATED_MYINFO_ATTRS = [
'homeno',
'billadd',
'mailadd',
'edulevel',
'schoolname',
'gradyear',
]

function editFormDirective() {
return {
templateUrl:
Expand Down Expand Up @@ -453,5 +463,10 @@ function editFormController(
// Populate AddField with all available form field types
$scope.addField = {}
$scope.addField.types = FormFields.basicTypes
$scope.addField.myInfoTypes = FormFields.myInfoTypes

// TODO (private #110): remove this filtering once the deprecated fields
// are deleted from shared/resources/myinfo
$scope.addField.myInfoTypes = FormFields.myInfoTypes.filter(
(type) => !DEPRECATED_MYINFO_ATTRS.includes(type.name),
)
}