@kiva/kv-components 3.46.0 → 3.46.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,17 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
## [3.46.1](https://github.com/kiva/kv-ui-elements/compare/@kiva/kv-components@3.46.0...@kiva/kv-components@3.46.1) (2023-10-04)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Bug Fixes
|
|
10
|
+
|
|
11
|
+
* bug fixed for lse loans when including eco friendly and single p… ([#304](https://github.com/kiva/kv-ui-elements/issues/304)) ([0afb6fc](https://github.com/kiva/kv-ui-elements/commit/0afb6fc7f362048f1ee76ac898a3dcb456d250d5))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
6
17
|
# [3.46.0](https://github.com/kiva/kv-ui-elements/compare/@kiva/kv-components@3.45.0...@kiva/kv-components@3.46.0) (2023-09-29)
|
|
7
18
|
|
|
8
19
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kiva/kv-components",
|
|
3
|
-
"version": "3.46.
|
|
3
|
+
"version": "3.46.1",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
@@ -75,5 +75,5 @@
|
|
|
75
75
|
"optional": true
|
|
76
76
|
}
|
|
77
77
|
},
|
|
78
|
-
"gitHead": "
|
|
78
|
+
"gitHead": "201eca0ab06b21641368158c0a8bec0cc482c275"
|
|
79
79
|
}
|
|
@@ -232,6 +232,10 @@ import KvMaterialIcon from './KvMaterialIcon.vue';
|
|
|
232
232
|
import KvLoadingPlaceholder from './KvLoadingPlaceholder.vue';
|
|
233
233
|
|
|
234
234
|
const LSE_LOAN_KEY = 'N/A';
|
|
235
|
+
const ECO_FRIENDLY_KEY = 'ECO-FRIENDLY';
|
|
236
|
+
const SUSTAINABLE_AG_KEY = 'SUSTAINABLE AG';
|
|
237
|
+
const SINGLE_PARENT_KEY = 'SINGLE PARENT';
|
|
238
|
+
const REFUGEE_KEY = 'REFUGEES/DISPLACED';
|
|
235
239
|
|
|
236
240
|
export default {
|
|
237
241
|
name: 'KvClassicLoanCard',
|
|
@@ -434,10 +438,10 @@ export default {
|
|
|
434
438
|
.map((tag) => tag.substring(1)) ?? [];
|
|
435
439
|
const themes = this.loan?.themes ?? [];
|
|
436
440
|
const categories = {
|
|
437
|
-
ecoFriendly: !!tags
|
|
438
|
-
.filter((t) => t.toUpperCase() ===
|
|
439
|
-
refugeesIdps: !!themes.filter((t) => t.toUpperCase() ===
|
|
440
|
-
singleParents: !!tags.filter((t) => t.toUpperCase() ===
|
|
441
|
+
ecoFriendly: !!tags // eslint-disable-next-line max-len
|
|
442
|
+
.filter((t) => t.toUpperCase() === ECO_FRIENDLY_KEY || t.toUpperCase() === SUSTAINABLE_AG_KEY).length,
|
|
443
|
+
refugeesIdps: !!themes.filter((t) => t.toUpperCase() === REFUGEE_KEY).length,
|
|
444
|
+
singleParents: !!tags.filter((t) => t.toUpperCase() === SINGLE_PARENT_KEY).length,
|
|
441
445
|
};
|
|
442
446
|
|
|
443
447
|
const isLseLoan = this.loan?.partnerName?.toUpperCase().includes(LSE_LOAN_KEY);
|
|
@@ -452,13 +456,13 @@ export default {
|
|
|
452
456
|
}
|
|
453
457
|
|
|
454
458
|
if (!this.categoryPageName) {
|
|
455
|
-
if (categories.ecoFriendly
|
|
456
|
-
&& !callouts.
|
|
459
|
+
if (categories.ecoFriendly // eslint-disable-next-line max-len
|
|
460
|
+
&& !callouts.find((c) => c.toUpperCase() === ECO_FRIENDLY_KEY || c.toUpperCase() === SUSTAINABLE_AG_KEY)) {
|
|
457
461
|
callouts.push('Eco-friendly');
|
|
458
462
|
} else if (categories.refugeesIdps) {
|
|
459
463
|
callouts.push('Refugees and IDPs');
|
|
460
464
|
} else if (categories.singleParents
|
|
461
|
-
&& !callouts.
|
|
465
|
+
&& !callouts.find((c) => c.toUpperCase() === SINGLE_PARENT_KEY)) {
|
|
462
466
|
callouts.push('Single Parent');
|
|
463
467
|
}
|
|
464
468
|
}
|