@everymatrix/cashier-method-details 1.24.7 → 1.26.0

Sign up to get free protection for your applications and to get access to all the features.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@everymatrix/cashier-method-details",
3
- "version": "1.24.7",
3
+ "version": "1.26.0",
4
4
  "main": "index.js",
5
5
  "svelte": "src/index.ts",
6
6
  "scripts": {
@@ -35,5 +35,5 @@
35
35
  "publishConfig": {
36
36
  "access": "public"
37
37
  },
38
- "gitHead": "7d07b195e7119200519062f519ff0712a2227c39"
38
+ "gitHead": "5abe76b491406787c17e946ad3c79676a0554d8b"
39
39
  }
@@ -374,7 +374,14 @@
374
374
  }
375
375
 
376
376
  const showField = (field) => {
377
- return !field.correlationFieldName || (field.correlationFieldName && prepareFields[field.correlationFieldName] === field.correlationFieldValue)
377
+ if (!field.correlationFieldName) {
378
+ return true;
379
+ }
380
+ const isCorrelatedFieldVisible = field.correlationFieldValue.includes(prepareFields[field.correlationFieldName])
381
+ if (!isCorrelatedFieldVisible && prepareFields[field.name]) {
382
+ delete prepareFields[field.name]
383
+ }
384
+ return isCorrelatedFieldVisible
378
385
  }
379
386
 
380
387
  </script>
@@ -383,7 +390,7 @@
383
390
  <script src={qrCodeScriptSrc}></script>
384
391
  </svelte:head>
385
392
  <div class="CashierMethodDetails" bind:this={customStylingContainer}>
386
- {#if isTranslationLoaded && selectedPaymentMethod.Name}
393
+ {#if selectedPaymentMethod.Name}
387
394
  <div class="MethodsDetails">
388
395
  <form on:submit|preventDefault={prepareTxn}>
389
396
  <div class="FieldWrapper">
@@ -448,8 +455,8 @@
448
455
  <div class="Selected" id="{index}" on:click="{(e) => showLookup(e,index)}">{prepareFields[field.name] || ''}</div>
449
456
  <div class="OptionList" class:Opened={openedLookup === index}>
450
457
  {#each field.values as value}
451
- <div on:click="{() => {prepareFields[field.name] = value.name; fields = fields}}">
452
- <span>{value.value}</span>
458
+ <div on:click="{() => {prepareFields[field.name] = value.Name; fields = fields}}">
459
+ <span>{value.Value}</span>
453
460
  </div>
454
461
  {/each}
455
462
  </div>
@@ -1,6 +1,6 @@
1
1
  export const TRANSLATIONS = {
2
2
  "en": {
3
- "loading": 'Loading...',
3
+ "loading": "Loading...",
4
4
  "amountLabel": "Amount",
5
5
  "makeDepositButton": "Deposit",
6
6
  "confirmDepositText": "Are you sure you want to deposit",
@@ -15,5 +15,5 @@ export const TRANSLATIONS = {
15
15
  "generalMax": "Max",
16
16
  "amountPlaceholder": "0.00",
17
17
  "change": "Change"
18
- },
18
+ }
19
19
  };