Skip to content

Commit 9346745

Browse files
authored
Merge pull request #10184 from msalcala11/gift-card-improvements
Gift card improvements
2 parents a989738 + e33d07e commit 9346745

File tree

3 files changed

+14
-5
lines changed

3 files changed

+14
-5
lines changed

src/pages/integrations/gift-cards/card-catalog/card-catalog.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ export class CardCatalogPage extends WideHeaderPage {
117117
}
118118

119119
export function isCardInSearchResults(c: CardConfig, search: string = '') {
120-
const cardName = c.name.toLowerCase();
120+
const cardName = (c.displayName || c.name).toLowerCase();
121121
const query = search.toLowerCase();
122122
const matchableText = [cardName, stripPunctuation(cardName)];
123123
return search && matchableText.some(text => text.indexOf(query) > -1);

src/pages/integrations/gift-cards/card-details/card-details.scss

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,14 @@ card-details-page {
2323

2424
.card-image {
2525
img {
26+
background: white;
2627
position: relative;
2728
z-index: 1;
2829
max-width: 82%;
2930
height: auto;
3031
width: 265px;
32+
min-height: 130px;
33+
min-width: 210px;
3134
}
3235

3336
+ .actions-wrapper {

src/pipes/format-currency.ts

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,16 @@ export class FormatCurrencyPipe implements PipeTransform {
2222
amount,
2323
getPrecisionString(precision)
2424
);
25-
const finalValue =
26-
currencyCode.toUpperCase() === 'USD'
27-
? `$${numericValue}`
28-
: `${numericValue} ${currencyCode}`;
25+
const symbolMap = {
26+
USD: '$',
27+
GBP: '£',
28+
EUR: '€',
29+
JPY: '¥'
30+
};
31+
const symbol = symbolMap[currencyCode.toUpperCase()];
32+
const finalValue = symbol
33+
? `${symbol}${numericValue}`
34+
: `${numericValue} ${currencyCode}`;
2935

3036
return finalValue;
3137
}

0 commit comments

Comments
 (0)