+
+
Enforcement Strategy
-
-
+
-
-
-
-
{{ option.text }}
-
{{ option.description }}
-
+
+
+
{{ option.text }}
+
{{ option.description }}
-
+
-
+
Target Countries ({{ selectedJurisdictionCountries.length }})
@@ -525,28 +644,54 @@ ul {
-
-
- mdi-magnify
-
-
-
- {{ item.flag }}
- {{ item.text }} ({{ item.value }})
-
-
+
+
+ Select or search country...
+
+
+
+ mdi-magnify
+
+
+
+
+
+ {{ item.flag }}
+ {{ item.text }} ({{ item.value }})
+
+
+ mdi-check
+
+
+
+
+
+
+
+
+
Action on Match
+
+
+ {{ selectedJurisdictionActionDescription }}
+
@@ -678,21 +823,6 @@ export default {
immediate: true
},
- 'widgetConfigTemp.jurisdictionRules.enabled': {
- handler(enabled) {
- if (!enabled && this.widgetConfigTemp.jurisdictionRules) {
- this.widgetConfigTemp.jurisdictionRules.countries = []
- this.widgetConfigTemp.jurisdictionRules.actionOnRestriction = 'HARD_REJECT'
- }
- }
- },
- 'widgetConfigTemp.jurisdictionRules.strategy': {
- handler(newStrategy, oldStrategy) {
- if (oldStrategy && newStrategy !== oldStrategy && this.widgetConfigTemp.jurisdictionRules) {
- this.widgetConfigTemp.jurisdictionRules.countries = []
- }
- }
- }
},
computed: {
...mapState({
@@ -748,6 +878,11 @@ export default {
}
})
},
+ selectedJurisdictionActionDescription() {
+ const action = this.widgetConfigTemp.jurisdictionRules?.actionOnRestriction
+ const option = this.jurisdictionActionOptions.find(option => option.value === action)
+ return option?.description || ''
+ },
},
async mounted() {
@@ -975,6 +1110,18 @@ export default {
description: 'Only permit selected countries',
},
],
+ jurisdictionActionOptions: [
+ {
+ value: 'HARD_REJECT',
+ text: 'Hard Reject (Stop Onboarding)',
+ description: 'Rejects the session immediately if the user matches the configured jurisdiction rule.',
+ },
+ {
+ value: 'MANUAL_REVIEW',
+ text: 'Manual Review',
+ description: 'Allows the user to complete verification, then sends the session to the manual review queue.',
+ },
+ ],
}
},
@@ -1021,7 +1168,9 @@ export default {
existingRules.countries = Array.isArray(existingRules.countries)
? existingRules.countries.map(country => String(country).toUpperCase()).filter(country => !!country)
: []
- existingRules.actionOnRestriction = 'HARD_REJECT'
+ existingRules.actionOnRestriction = ['HARD_REJECT', 'MANUAL_REVIEW'].includes(existingRules.actionOnRestriction)
+ ? existingRules.actionOnRestriction
+ : defaults.actionOnRestriction
},
countryFlagFromAlpha2(alpha2) {
if (!alpha2 || alpha2.length !== 2) return ''
@@ -1037,13 +1186,16 @@ export default {
const selectedCountries = this.widgetConfigTemp.jurisdictionRules.countries || []
this.widgetConfigTemp.jurisdictionRules.countries = selectedCountries.filter(country => country !== countryCode)
},
+ isJurisdictionCountrySelected(countryCode) {
+ return (this.widgetConfigTemp.jurisdictionRules.countries || []).includes(countryCode)
+ },
validateJurisdictionRules() {
this.ensureJurisdictionRules()
const rules = this.widgetConfigTemp.jurisdictionRules
if (!rules.enabled) {
rules.countries = []
- rules.actionOnRestriction = 'HARD_REJECT'
+ rules.actionOnRestriction = rules.actionOnRestriction || 'HARD_REJECT'
return
}
@@ -1060,7 +1212,9 @@ export default {
throw new Error(`Invalid country code(s): ${invalidCountries.join(', ')}`)
}
- rules.actionOnRestriction = 'HARD_REJECT'
+ if (!['HARD_REJECT', 'MANUAL_REVIEW'].includes(rules.actionOnRestriction)) {
+ throw new Error('Kindly select a jurisdiction action on match')
+ }
},
selectedServiceEventHandler(event) {