pcm-shared-components 2.1.411 → 2.1.413

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.
@@ -92,6 +92,7 @@ export const AnimalVehicleDetailsEditor = props => {
92
92
  canAddMore,
93
93
  maxItems,
94
94
  showHistoricalAnswers,
95
+ extraLiveKeys,
95
96
  bare,
96
97
  className,
97
98
  theme,
@@ -455,7 +456,12 @@ export const AnimalVehicleDetailsEditor = props => {
455
456
  }, requiredErrorText(field.type)));
456
457
  }));
457
458
  })())), showHistoricalAnswers && selectedItem && (() => {
458
- const liveKeys = new Set(fieldConfig.map(f => f.key));
459
+ // extraLiveKeys covers keys this component's own fieldConfig doesn't include but which
460
+ // are still genuinely live -- e.g. a once-per-reservation field, rendered by a sibling
461
+ // component (AnimalFieldsOnceBlock) but written into this same item's `values` object.
462
+ // Without this, a currently-checked notice/once field reads as a retired one the moment
463
+ // its value is set, since this component never saw it in its own fieldConfig.
464
+ const liveKeys = new Set([...fieldConfig.map(f => f.key), ...extraLiveKeys]);
459
465
  const historicalEntries = Object.keys(selectedItem.values || {}).filter(k => !liveKeys.has(k)).map(k => ({
460
466
  key: k,
461
467
  value: selectedItem.values[k]
@@ -615,6 +621,7 @@ AnimalVehicleDetailsEditor.defaultProps = {
615
621
  canAddMore: true,
616
622
  maxItems: 0,
617
623
  showHistoricalAnswers: true,
624
+ extraLiveKeys: [],
618
625
  bare: false,
619
626
  className: 'w-full',
620
627
  theme: undefined,
@@ -665,6 +672,13 @@ AnimalVehicleDetailsEditor.propTypes = {
665
672
  * since-retired answer on an EXISTING reservation is legitimate. A guest-facing booking widget
666
673
  * creating a brand-new reservation has no history to show and should pass false. */
667
674
  showHistoricalAnswers: PropTypes.bool,
675
+ /** Keys that should count as "live" for the Historical Answers check above even though they
676
+ * aren't in this instance's own `fieldConfig` -- for a caller that splits one lot's field list
677
+ * across two sibling components sharing the same item's `values` object (e.g. once-per-
678
+ * reservation fields rendered by AnimalFieldsOnceBlock instead of this component's own grid).
679
+ * Without this, a currently-answered field owned by that sibling component reads as retired the
680
+ * moment its value is set, since this component never sees it in its own fieldConfig. */
681
+ extraLiveKeys: PropTypes.arrayOf(PropTypes.string),
668
682
  /** Skip this component's own outer card (background/border/rounding) and render a plain
669
683
  * fragment instead -- for a caller placing this editor and AnimalFieldsOnceBlock's fields inside
670
684
  * one shared outer card. Defaults to false so every existing usage keeps its current look. */
@@ -2856,7 +2856,14 @@
2856
2856
  "stripe_payment_method_already_selected": "Only one Stripe Payment method can be process at a time. Please use the existing payment method or remove it.",
2857
2857
  "transaction_total": "Total: {{total}}",
2858
2858
  "void_payment_title": "Void Payment!",
2859
- "void_payment_warning": "Your are about to void this payment. This process is non reversible, are you sure you would like to continue."
2859
+ "void_payment_warning": "Your are about to void this payment. This process is non reversible, are you sure you would like to continue.",
2860
+ "erase_payment_title": "Erase Payment",
2861
+ "erase_payment_warning": "This action permanently erases the payment from all financial records with no way to undo it. Proceed only if this payment was entered in error. Are you sure?",
2862
+ "erase_payment_reason_label": "Reason for erasing this payment",
2863
+ "err-erase-no-access": "You do not have permission to erase payments.",
2864
+ "err-erase-stripe-payment": "Stripe-collected payments cannot be erased. Use Void or Refund instead.",
2865
+ "err-erase-wrong-status": "This payment cannot be erased. Only fresh, unmodified payments can be erased.",
2866
+ "err-erase-reason-required": "Please provide a reason for erasing this payment."
2860
2867
  }
2861
2868
  },
2862
2869
  "payment_card": {
@@ -2980,6 +2987,7 @@
2980
2987
  "children": {
2981
2988
  "add_meter_reading": "Add Meter Reading",
2982
2989
  "edit_meter_reading": "Edit Meter Reading",
2990
+ "erase_payment": "Erase Payment",
2983
2991
  "override_meter_reading_total": "Override Meter Reading Total",
2984
2992
  "process_refunds": "Process Refunds",
2985
2993
  "restricted_client_note": "Restricted Client Note",
@@ -4639,7 +4647,8 @@
4639
4647
  "partial_refund": "P-Refund",
4640
4648
  "payment": "Payment",
4641
4649
  "refund": "Refund",
4642
- "void": "Void"
4650
+ "void": "Void",
4651
+ "erased": "Erased"
4643
4652
  },
4644
4653
  "reservation_type": {
4645
4654
  "american_express": "Amex",
@@ -2856,7 +2856,14 @@
2856
2856
  "stripe_payment_method_already_selected": "Solo se puede procesar un método de pago de Stripe a la vez. Utilice el método de pago existente o elimínelo.",
2857
2857
  "transaction_total": "Total: {{total}}",
2858
2858
  "void_payment_title": "¡Pago nulo!",
2859
- "void_payment_warning": "Está a punto de anular este pago. Este proceso no es reversible, ¿está seguro de que desea continuar?"
2859
+ "void_payment_warning": "Está a punto de anular este pago. Este proceso no es reversible, ¿está seguro de que desea continuar?",
2860
+ "erase_payment_title": "Borrar pago",
2861
+ "erase_payment_warning": "Esta acción borra permanentemente el pago de todos los registros financieros sin forma de deshacerlo. Proceda solo si este pago se ingresó por error. ¿Está seguro?",
2862
+ "erase_payment_reason_label": "Razón para borrar este pago",
2863
+ "err-erase-no-access": "No tiene permiso para borrar pagos.",
2864
+ "err-erase-stripe-payment": "Los pagos recopilados por Stripe no se pueden borrar. Utilice Anular o Reembolsar en su lugar.",
2865
+ "err-erase-wrong-status": "Este pago no se puede borrar. Solo se pueden borrar pagos frescos y sin modificar.",
2866
+ "err-erase-reason-required": "Proporcione una razón para borrar este pago."
2860
2867
  }
2861
2868
  },
2862
2869
  "payment_card": {
@@ -2980,6 +2987,7 @@
2980
2987
  "children": {
2981
2988
  "add_meter_reading": "Agregar lectura de medidor",
2982
2989
  "edit_meter_reading": "Editar lectura de medidor",
2990
+ "erase_payment": "Borrar pago",
2983
2991
  "override_meter_reading_total": "Anular el total de lectura del medidor",
2984
2992
  "process_refunds": "Procesar reembolsos",
2985
2993
  "restricted_client_note": "Nota de cliente restringida",
@@ -4639,7 +4647,8 @@
4639
4647
  "partial_refund": "P-Reembolso",
4640
4648
  "payment": "Pago",
4641
4649
  "refund": "Reembolso",
4642
- "void": "Vacío"
4650
+ "void": "Vacío",
4651
+ "erased": "Borrado"
4643
4652
  },
4644
4653
  "reservation_type": {
4645
4654
  "american_express": "amex",
@@ -2856,7 +2856,14 @@
2856
2856
  "stripe_payment_method_already_selected": "Un seul mode de paiement Stripe peut être traité à la fois. Veuillez utiliser le mode de paiement existant ou le supprimer.",
2857
2857
  "transaction_total": "Total: {{total}}",
2858
2858
  "void_payment_title": "Annulation du paiement!",
2859
- "void_payment_warning": "Vous êtes sur le point d'annuler ce paiement. Ce processus est irréversible, êtes-vous sûr de vouloir continuer."
2859
+ "void_payment_warning": "Vous êtes sur le point d'annuler ce paiement. Ce processus est irréversible, êtes-vous sûr de vouloir continuer.",
2860
+ "erase_payment_title": "Effacer le paiement",
2861
+ "erase_payment_warning": "Cette action efface définitivement le paiement de tous les dossiers financiers et ne peut pas être annulée. Procédez uniquement si ce paiement a été saisi par erreur. Êtes-vous sûr?",
2862
+ "erase_payment_reason_label": "Raison de l'effacement de ce paiement",
2863
+ "err-erase-no-access": "Vous n'avez pas la permission d'effacer les paiements.",
2864
+ "err-erase-stripe-payment": "Les paiements collectés par Stripe ne peuvent pas être effacés. Utilisez Annuler ou Rembourser à la place.",
2865
+ "err-erase-wrong-status": "Ce paiement ne peut pas être effacé. Seuls les paiements frais et non modifiés peuvent être effacés.",
2866
+ "err-erase-reason-required": "Veuillez fournir une raison pour effacer ce paiement."
2860
2867
  }
2861
2868
  },
2862
2869
  "payment_card": {
@@ -2980,6 +2987,7 @@
2980
2987
  "children": {
2981
2988
  "add_meter_reading": "Ajouter un relevé de compteur",
2982
2989
  "edit_meter_reading": "Modifier la lecture du compteur",
2990
+ "erase_payment": "Effacer le paiement",
2983
2991
  "override_meter_reading_total": "Dérogation du total des relevés de compteur",
2984
2992
  "process_refunds": "Traiter les remboursements",
2985
2993
  "restricted_client_note": "Note client restreinte",
@@ -4639,7 +4647,8 @@
4639
4647
  "partial_refund": "R-Partiel",
4640
4648
  "payment": "Paiement",
4641
4649
  "refund": "Remboursement",
4642
- "void": "Annulé"
4650
+ "void": "Annulé",
4651
+ "erased": "Effacé"
4643
4652
  },
4644
4653
  "reservation_type": {
4645
4654
  "american_express": "Amex",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pcm-shared-components",
3
- "version": "2.1.411",
3
+ "version": "2.1.413",
4
4
  "private": false,
5
5
  "main": "dist/index.js",
6
6
  "babel": {