-
Notifications
You must be signed in to change notification settings - Fork 31
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
20989 - Add USA states to jurisdiction list #253
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,7 +13,7 @@ | |
import { Component, Emit, Prop, Vue } from 'vue-property-decorator' | ||
import NestedSelect from './NestedSelect.vue' | ||
import { JurisdictionLocation } from '@bcrs-shared-components/enums' | ||
import { CanJurisdictions, IntlJurisdictions } from './list-data' | ||
import { CanJurisdictions, IntlJurisdictions, UsaJurisdiction } from './list-data' | ||
|
||
@Component({ | ||
components: { NestedSelect } | ||
|
@@ -22,6 +22,7 @@ export default class Jurisdiction extends Vue { | |
// props | ||
@Prop({ default: 'Select the home jurisdiction' }) readonly label!: string | ||
@Prop() readonly errorMessages!: string | ||
@Prop({ default: false }) readonly showUsJurisdictions!: boolean | ||
|
||
// variables | ||
jurisdiction = null | ||
|
@@ -41,15 +42,26 @@ export default class Jurisdiction extends Vue { | |
separator: (jur.value === JurisdictionLocation.FD) | ||
})) | ||
|
||
if (this.showUsJurisdictions) { | ||
array.push({ isHeader: true, group: 1, text: 'United States' }) | ||
UsaJurisdiction | ||
.forEach(jur => array.push({ | ||
group: 1, | ||
text: jur.text, | ||
value: jur.value, | ||
separator: false | ||
})) | ||
} | ||
|
||
// add in International jurisdictions (not including CA) | ||
array.push({ isHeader: true, group: 1, text: 'International' }) | ||
array.push({ isHeader: true, group: 2, text: 'International' }) | ||
IntlJurisdictions | ||
.filter(jur => jur.value !== JurisdictionLocation.CA) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Did you find out why you don't need to filter out USA when There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. No not yet. Just wondering if somehow it is removed in There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Those filter and forEach calls are separate, and working on separate lists. I dunno. Might look at it this afternoon for fun. |
||
.forEach(jur => array.push({ | ||
group: 1, | ||
group: 2, | ||
text: jur.text, | ||
value: jur.value, | ||
separator: false | ||
separator: (jur.value === JurisdictionLocation.IN) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Added this to show a separator between for International |
||
})) | ||
|
||
return array | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
export * from './canada-jurisdictions' | ||
export * from './intl-jurisdictions' | ||
export * from './usa-jurisdictions' |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,254 @@ | ||
import { JurisdictionI } from '../interfaces' | ||
|
||
export const UsaJurisdiction: JurisdictionI[] = [ | ||
{ | ||
value: 'AL', | ||
SHORT_DESC: 'AL', | ||
text: 'Alabama' | ||
}, | ||
{ | ||
value: 'AK', | ||
SHORT_DESC: 'AK', | ||
text: 'Alaska' | ||
}, | ||
{ | ||
value: 'AZ', | ||
SHORT_DESC: 'AZ', | ||
text: 'Arizona' | ||
}, | ||
{ | ||
value: 'AR', | ||
SHORT_DESC: 'AR', | ||
text: 'Arkansas' | ||
}, | ||
{ | ||
value: 'CA', | ||
SHORT_DESC: 'CA', | ||
text: 'California' | ||
}, | ||
{ | ||
value: 'CO', | ||
SHORT_DESC: 'CO', | ||
text: 'Colorado' | ||
}, | ||
{ | ||
value: 'CT', | ||
SHORT_DESC: 'CT', | ||
text: 'Connecticut' | ||
}, | ||
{ | ||
value: 'DE', | ||
SHORT_DESC: 'DE', | ||
text: 'Delaware' | ||
}, | ||
{ | ||
value: 'FL', | ||
SHORT_DESC: 'FL', | ||
text: 'Florida' | ||
}, | ||
{ | ||
value: 'GA', | ||
SHORT_DESC: 'GA', | ||
text: 'Georgia' | ||
}, | ||
{ | ||
value: 'HI', | ||
SHORT_DESC: 'HI', | ||
text: 'Hawaii' | ||
}, | ||
{ | ||
value: 'ID', | ||
SHORT_DESC: 'ID', | ||
text: 'Idaho' | ||
}, | ||
{ | ||
value: 'IL', | ||
SHORT_DESC: 'IL', | ||
text: 'Illinois' | ||
}, | ||
{ | ||
value: 'IN', | ||
SHORT_DESC: 'IN', | ||
text: 'Indiana' | ||
}, | ||
{ | ||
value: 'IA', | ||
SHORT_DESC: 'IA', | ||
text: 'Iowa' | ||
}, | ||
{ | ||
value: 'KS', | ||
SHORT_DESC: 'KS', | ||
text: 'Kansas' | ||
}, | ||
{ | ||
value: 'KY', | ||
SHORT_DESC: 'KY', | ||
text: 'Kentucky' | ||
}, | ||
{ | ||
value: 'LA', | ||
SHORT_DESC: 'LA', | ||
text: 'Louisiana' | ||
}, | ||
{ | ||
value: 'ME', | ||
SHORT_DESC: 'ME', | ||
text: 'Maine' | ||
}, | ||
{ | ||
value: 'MD', | ||
SHORT_DESC: 'MD', | ||
text: 'Maryland' | ||
}, | ||
{ | ||
value: 'MA', | ||
SHORT_DESC: 'MA', | ||
text: 'Massachusetts' | ||
}, | ||
{ | ||
value: 'MI', | ||
SHORT_DESC: 'MI', | ||
text: 'Michigan' | ||
}, | ||
{ | ||
value: 'MN', | ||
SHORT_DESC: 'MN', | ||
text: 'Minnesota' | ||
}, | ||
{ | ||
value: 'MS', | ||
SHORT_DESC: 'MS', | ||
text: 'Mississippi' | ||
}, | ||
{ | ||
value: 'MO', | ||
SHORT_DESC: 'MO', | ||
text: 'Missouri' | ||
}, | ||
{ | ||
value: 'MT', | ||
SHORT_DESC: 'MT', | ||
text: 'Montana' | ||
}, | ||
{ | ||
value: 'NE', | ||
SHORT_DESC: 'NE', | ||
text: 'Nebraska' | ||
}, | ||
{ | ||
value: 'NV', | ||
SHORT_DESC: 'NV', | ||
text: 'Nevada' | ||
}, | ||
{ | ||
value: 'NH', | ||
SHORT_DESC: 'NH', | ||
text: 'New Hampshire' | ||
}, | ||
{ | ||
value: 'NJ', | ||
SHORT_DESC: 'NJ', | ||
text: 'New Jersey' | ||
}, | ||
{ | ||
value: 'NM', | ||
SHORT_DESC: 'NM', | ||
text: 'New Mexico' | ||
}, | ||
{ | ||
value: 'NY', | ||
SHORT_DESC: 'NY', | ||
text: 'New York' | ||
}, | ||
{ | ||
value: 'NC', | ||
SHORT_DESC: 'NC', | ||
text: 'North Carolina' | ||
}, | ||
{ | ||
value: 'ND', | ||
SHORT_DESC: 'ND', | ||
text: 'North Dakota' | ||
}, | ||
{ | ||
value: 'OH', | ||
SHORT_DESC: 'OH', | ||
text: 'Ohio' | ||
}, | ||
{ | ||
value: 'OK', | ||
SHORT_DESC: 'OK', | ||
text: 'Oklahoma' | ||
}, | ||
{ | ||
value: 'OR', | ||
SHORT_DESC: 'OR', | ||
text: 'Oregon' | ||
}, | ||
{ | ||
value: 'PA', | ||
SHORT_DESC: 'PA', | ||
text: 'Pennsylvania' | ||
}, | ||
{ | ||
value: 'RI', | ||
SHORT_DESC: 'RI', | ||
text: 'Rhode Island' | ||
}, | ||
{ | ||
value: 'SC', | ||
SHORT_DESC: 'SC', | ||
text: 'South Carolina' | ||
}, | ||
{ | ||
value: 'SD', | ||
SHORT_DESC: 'SD', | ||
text: 'South Dakota' | ||
}, | ||
{ | ||
value: 'TN', | ||
SHORT_DESC: 'TN', | ||
text: 'Tennessee' | ||
}, | ||
{ | ||
value: 'TX', | ||
SHORT_DESC: 'TX', | ||
text: 'Texas' | ||
}, | ||
{ | ||
value: 'UT', | ||
SHORT_DESC: 'UT', | ||
text: 'Utah' | ||
}, | ||
{ | ||
value: 'VT', | ||
SHORT_DESC: 'VT', | ||
text: 'Vermont' | ||
}, | ||
{ | ||
value: 'VA', | ||
SHORT_DESC: 'VA', | ||
text: 'Virginia' | ||
}, | ||
{ | ||
value: 'WA', | ||
SHORT_DESC: 'WA', | ||
text: 'Washington' | ||
}, | ||
{ | ||
value: 'WV', | ||
SHORT_DESC: 'WV', | ||
text: 'West Virginia' | ||
}, | ||
{ | ||
value: 'WI', | ||
SHORT_DESC: 'WI', | ||
text: 'Wisconsin' | ||
}, | ||
{ | ||
value: 'WY', | ||
SHORT_DESC: 'WY', | ||
text: 'Wyoming' | ||
} | ||
] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yui confirmed to about Puerto Rico and VI: "Please use the same as live Name Request. I.e. Puerto Rico and VI are considered International."