richie-education 3.2.2-dev52 → 3.2.2-dev56

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.
@@ -187,6 +187,10 @@
187
187
  "description": "Label for the field asking how the user heard about or was recommended the course",
188
188
  "message": "This course was recommended to me by"
189
189
  },
190
+ "batchOrder.reference": {
191
+ "description": "Reference label displayed with the batch order ID",
192
+ "message": "Ref. {id}"
193
+ },
190
194
  "batchOrder.role": {
191
195
  "description": "Label for the field asking the role/position of the contact person",
192
196
  "message": "Role"
@@ -263,6 +267,14 @@
263
267
  "description": "Label for the field asking the company VAT number",
264
268
  "message": "VAT number"
265
269
  },
270
+ "batchOrder.viewAll": {
271
+ "description": "Button label to navigate to the list of all batch orders",
272
+ "message": "View all batch orders"
273
+ },
274
+ "batchOrder.viewOne": {
275
+ "description": "Button label to navigate to a single batch order details",
276
+ "message": "View details"
277
+ },
266
278
  "batchOrder.withoutOrderForm": {
267
279
  "description": "Option label for selecting payment without order form",
268
280
  "message": "Without order form"
@@ -1783,6 +1795,14 @@
1783
1795
  "description": "Checkbox label to indicate using alternative billing information",
1784
1796
  "message": "Use different billing information"
1785
1797
  },
1798
+ "components.SaleTunnel.BatchOrderForm.nextButton": {
1799
+ "description": "Label for the button to proceed to the next step in the batch order form",
1800
+ "message": "Next"
1801
+ },
1802
+ "components.SaleTunnel.BatchOrderForm.previousButton": {
1803
+ "description": "Label for the button to go back to the previous step in the batch order form",
1804
+ "message": "Previous"
1805
+ },
1786
1806
  "components.SaleTunnel.BatchOrderForm.stepAdmin": {
1787
1807
  "description": "Step label for administrative follow-up in the batch order form",
1788
1808
  "message": "Follow-up"
@@ -187,6 +187,10 @@
187
187
  "description": "Label for the field asking how the user heard about or was recommended the course",
188
188
  "message": "This course was recommended to me by"
189
189
  },
190
+ "batchOrder.reference": {
191
+ "description": "Reference label displayed with the batch order ID",
192
+ "message": "Ref. {id}"
193
+ },
190
194
  "batchOrder.role": {
191
195
  "description": "Label for the field asking the role/position of the contact person",
192
196
  "message": "Role"
@@ -263,6 +267,14 @@
263
267
  "description": "Label for the field asking the company VAT number",
264
268
  "message": "VAT number"
265
269
  },
270
+ "batchOrder.viewAll": {
271
+ "description": "Button label to navigate to the list of all batch orders",
272
+ "message": "View all batch orders"
273
+ },
274
+ "batchOrder.viewOne": {
275
+ "description": "Button label to navigate to a single batch order details",
276
+ "message": "View details"
277
+ },
266
278
  "batchOrder.withoutOrderForm": {
267
279
  "description": "Option label for selecting payment without order form",
268
280
  "message": "Without order form"
@@ -1783,6 +1795,14 @@
1783
1795
  "description": "Checkbox label to indicate using alternative billing information",
1784
1796
  "message": "Use different billing information"
1785
1797
  },
1798
+ "components.SaleTunnel.BatchOrderForm.nextButton": {
1799
+ "description": "Label for the button to proceed to the next step in the batch order form",
1800
+ "message": "Next"
1801
+ },
1802
+ "components.SaleTunnel.BatchOrderForm.previousButton": {
1803
+ "description": "Label for the button to go back to the previous step in the batch order form",
1804
+ "message": "Previous"
1805
+ },
1786
1806
  "components.SaleTunnel.BatchOrderForm.stepAdmin": {
1787
1807
  "description": "Step label for administrative follow-up in the batch order form",
1788
1808
  "message": "Follow-up"
@@ -187,6 +187,10 @@
187
187
  "description": "Label for the field asking how the user heard about or was recommended the course",
188
188
  "message": "This course was recommended to me by"
189
189
  },
190
+ "batchOrder.reference": {
191
+ "description": "Reference label displayed with the batch order ID",
192
+ "message": "Ref. {id}"
193
+ },
190
194
  "batchOrder.role": {
191
195
  "description": "Label for the field asking the role/position of the contact person",
192
196
  "message": "Role"
@@ -263,6 +267,14 @@
263
267
  "description": "Label for the field asking the company VAT number",
264
268
  "message": "VAT number"
265
269
  },
270
+ "batchOrder.viewAll": {
271
+ "description": "Button label to navigate to the list of all batch orders",
272
+ "message": "View all batch orders"
273
+ },
274
+ "batchOrder.viewOne": {
275
+ "description": "Button label to navigate to a single batch order details",
276
+ "message": "View details"
277
+ },
266
278
  "batchOrder.withoutOrderForm": {
267
279
  "description": "Option label for selecting payment without order form",
268
280
  "message": "Without order form"
@@ -1783,6 +1795,14 @@
1783
1795
  "description": "Checkbox label to indicate using alternative billing information",
1784
1796
  "message": "Use different billing information"
1785
1797
  },
1798
+ "components.SaleTunnel.BatchOrderForm.nextButton": {
1799
+ "description": "Label for the button to proceed to the next step in the batch order form",
1800
+ "message": "Next"
1801
+ },
1802
+ "components.SaleTunnel.BatchOrderForm.previousButton": {
1803
+ "description": "Label for the button to go back to the previous step in the batch order form",
1804
+ "message": "Previous"
1805
+ },
1786
1806
  "components.SaleTunnel.BatchOrderForm.stepAdmin": {
1787
1807
  "description": "Step label for administrative follow-up in the batch order form",
1788
1808
  "message": "Follow-up"
@@ -187,6 +187,10 @@
187
187
  "description": "Label for the field asking how the user heard about or was recommended the course",
188
188
  "message": "This course was recommended to me by"
189
189
  },
190
+ "batchOrder.reference": {
191
+ "description": "Reference label displayed with the batch order ID",
192
+ "message": "Ref. {id}"
193
+ },
190
194
  "batchOrder.role": {
191
195
  "description": "Label for the field asking the role/position of the contact person",
192
196
  "message": "Role"
@@ -263,6 +267,14 @@
263
267
  "description": "Label for the field asking the company VAT number",
264
268
  "message": "VAT number"
265
269
  },
270
+ "batchOrder.viewAll": {
271
+ "description": "Button label to navigate to the list of all batch orders",
272
+ "message": "View all batch orders"
273
+ },
274
+ "batchOrder.viewOne": {
275
+ "description": "Button label to navigate to a single batch order details",
276
+ "message": "View details"
277
+ },
266
278
  "batchOrder.withoutOrderForm": {
267
279
  "description": "Option label for selecting payment without order form",
268
280
  "message": "Without order form"
@@ -1783,6 +1795,14 @@
1783
1795
  "description": "Checkbox label to indicate using alternative billing information",
1784
1796
  "message": "Use different billing information"
1785
1797
  },
1798
+ "components.SaleTunnel.BatchOrderForm.nextButton": {
1799
+ "description": "Label for the button to proceed to the next step in the batch order form",
1800
+ "message": "Next"
1801
+ },
1802
+ "components.SaleTunnel.BatchOrderForm.previousButton": {
1803
+ "description": "Label for the button to go back to the previous step in the batch order form",
1804
+ "message": "Previous"
1805
+ },
1786
1806
  "components.SaleTunnel.BatchOrderForm.stepAdmin": {
1787
1807
  "description": "Step label for administrative follow-up in the batch order form",
1788
1808
  "message": "Follow-up"
@@ -29,7 +29,7 @@
29
29
  },
30
30
  "batchOrder.bankTransfer": {
31
31
  "description": "Option label for selecting bank transfer payment",
32
- "message": "Virement bancaire"
32
+ "message": "Virement bancaire direct"
33
33
  },
34
34
  "batchOrder.cardPayment": {
35
35
  "description": "Option label for selecting credit card payment",
@@ -157,7 +157,7 @@
157
157
  },
158
158
  "batchOrder.payment.bank": {
159
159
  "description": "Label for bank transfer payment method",
160
- "message": "Virement bancaire"
160
+ "message": "Virement bancaire direct"
161
161
  },
162
162
  "batchOrder.payment.card": {
163
163
  "description": "Label for card payment method",
@@ -187,6 +187,10 @@
187
187
  "description": "Label for the field asking how the user heard about or was recommended the course",
188
188
  "message": "Cette formation m’a été recommandée par"
189
189
  },
190
+ "batchOrder.reference": {
191
+ "description": "Reference label displayed with the batch order ID",
192
+ "message": "Réf. {id}"
193
+ },
190
194
  "batchOrder.role": {
191
195
  "description": "Label for the field asking the role/position of the contact person",
192
196
  "message": "Fonction"
@@ -263,6 +267,14 @@
263
267
  "description": "Label for the field asking the company VAT number",
264
268
  "message": "Numéro de TVA"
265
269
  },
270
+ "batchOrder.viewAll": {
271
+ "description": "Button label to navigate to the list of all batch orders",
272
+ "message": "Mes commandes groupées"
273
+ },
274
+ "batchOrder.viewOne": {
275
+ "description": "Button label to navigate to a single batch order details",
276
+ "message": "Voir le détail"
277
+ },
266
278
  "batchOrder.withoutOrderForm": {
267
279
  "description": "Option label for selecting payment without order form",
268
280
  "message": "Sans formulaire de commande"
@@ -1561,7 +1573,7 @@
1561
1573
  },
1562
1574
  "components.OrganizationQuotesTable.payment.bankTransfer": {
1563
1575
  "description": "Payment method: bank transfer",
1564
- "message": "Virement bancaire"
1576
+ "message": "Virement bancaire direct"
1565
1577
  },
1566
1578
  "components.OrganizationQuotesTable.payment.card": {
1567
1579
  "description": "Payment method: card payment",
@@ -1573,7 +1585,7 @@
1573
1585
  },
1574
1586
  "components.OrganizationQuotesTable.paymentBankTransfer": {
1575
1587
  "description": "Payment method: bank transfer",
1576
- "message": "Virement bancaire"
1588
+ "message": "Virement bancaire direct"
1577
1589
  },
1578
1590
  "components.OrganizationQuotesTable.paymentCard": {
1579
1591
  "description": "Payment method: credit card",
@@ -1783,6 +1795,14 @@
1783
1795
  "description": "Checkbox label to indicate using alternative billing information",
1784
1796
  "message": "Utiliser des informations de facturation différentes"
1785
1797
  },
1798
+ "components.SaleTunnel.BatchOrderForm.nextButton": {
1799
+ "description": "Label for the button to proceed to the next step in the batch order form",
1800
+ "message": "Suivant"
1801
+ },
1802
+ "components.SaleTunnel.BatchOrderForm.previousButton": {
1803
+ "description": "Label for the button to go back to the previous step in the batch order form",
1804
+ "message": "Précédent"
1805
+ },
1786
1806
  "components.SaleTunnel.BatchOrderForm.stepAdmin": {
1787
1807
  "description": "Step label for administrative follow-up in the batch order form",
1788
1808
  "message": "Suivi"
@@ -1809,7 +1829,7 @@
1809
1829
  },
1810
1830
  "components.SaleTunnel.BatchOrderForm.stepFinancingTitle": {
1811
1831
  "description": "Title of the section to select the payment plan of the course",
1812
- "message": "Mode de commande"
1832
+ "message": "Mode de paiement"
1813
1833
  },
1814
1834
  "components.SaleTunnel.BatchOrderForm.stepParticipants": {
1815
1835
  "description": "Step label for participants information in the batch order form",
@@ -187,6 +187,10 @@
187
187
  "description": "Label for the field asking how the user heard about or was recommended the course",
188
188
  "message": "This course was recommended to me by"
189
189
  },
190
+ "batchOrder.reference": {
191
+ "description": "Reference label displayed with the batch order ID",
192
+ "message": "Ref. {id}"
193
+ },
190
194
  "batchOrder.role": {
191
195
  "description": "Label for the field asking the role/position of the contact person",
192
196
  "message": "Role"
@@ -263,6 +267,14 @@
263
267
  "description": "Label for the field asking the company VAT number",
264
268
  "message": "VAT number"
265
269
  },
270
+ "batchOrder.viewAll": {
271
+ "description": "Button label to navigate to the list of all batch orders",
272
+ "message": "View all batch orders"
273
+ },
274
+ "batchOrder.viewOne": {
275
+ "description": "Button label to navigate to a single batch order details",
276
+ "message": "View details"
277
+ },
266
278
  "batchOrder.withoutOrderForm": {
267
279
  "description": "Option label for selecting payment without order form",
268
280
  "message": "Without order form"
@@ -1783,6 +1795,14 @@
1783
1795
  "description": "Checkbox label to indicate using alternative billing information",
1784
1796
  "message": "Use different billing information"
1785
1797
  },
1798
+ "components.SaleTunnel.BatchOrderForm.nextButton": {
1799
+ "description": "Label for the button to proceed to the next step in the batch order form",
1800
+ "message": "Next"
1801
+ },
1802
+ "components.SaleTunnel.BatchOrderForm.previousButton": {
1803
+ "description": "Label for the button to go back to the previous step in the batch order form",
1804
+ "message": "Previous"
1805
+ },
1786
1806
  "components.SaleTunnel.BatchOrderForm.stepAdmin": {
1787
1807
  "description": "Step label for administrative follow-up in the batch order form",
1788
1808
  "message": "Follow-up"
@@ -187,6 +187,10 @@
187
187
  "description": "Label for the field asking how the user heard about or was recommended the course",
188
188
  "message": "This course was recommended to me by"
189
189
  },
190
+ "batchOrder.reference": {
191
+ "description": "Reference label displayed with the batch order ID",
192
+ "message": "Ref. {id}"
193
+ },
190
194
  "batchOrder.role": {
191
195
  "description": "Label for the field asking the role/position of the contact person",
192
196
  "message": "Role"
@@ -263,6 +267,14 @@
263
267
  "description": "Label for the field asking the company VAT number",
264
268
  "message": "VAT number"
265
269
  },
270
+ "batchOrder.viewAll": {
271
+ "description": "Button label to navigate to the list of all batch orders",
272
+ "message": "View all batch orders"
273
+ },
274
+ "batchOrder.viewOne": {
275
+ "description": "Button label to navigate to a single batch order details",
276
+ "message": "View details"
277
+ },
266
278
  "batchOrder.withoutOrderForm": {
267
279
  "description": "Option label for selecting payment without order form",
268
280
  "message": "Without order form"
@@ -1783,6 +1795,14 @@
1783
1795
  "description": "Checkbox label to indicate using alternative billing information",
1784
1796
  "message": "Use different billing information"
1785
1797
  },
1798
+ "components.SaleTunnel.BatchOrderForm.nextButton": {
1799
+ "description": "Label for the button to proceed to the next step in the batch order form",
1800
+ "message": "Next"
1801
+ },
1802
+ "components.SaleTunnel.BatchOrderForm.previousButton": {
1803
+ "description": "Label for the button to go back to the previous step in the batch order form",
1804
+ "message": "Previous"
1805
+ },
1786
1806
  "components.SaleTunnel.BatchOrderForm.stepAdmin": {
1787
1807
  "description": "Step label for administrative follow-up in the batch order form",
1788
1808
  "message": "Follow-up"
@@ -187,6 +187,10 @@
187
187
  "description": "Label for the field asking how the user heard about or was recommended the course",
188
188
  "message": "This course was recommended to me by"
189
189
  },
190
+ "batchOrder.reference": {
191
+ "description": "Reference label displayed with the batch order ID",
192
+ "message": "Ref. {id}"
193
+ },
190
194
  "batchOrder.role": {
191
195
  "description": "Label for the field asking the role/position of the contact person",
192
196
  "message": "Role"
@@ -263,6 +267,14 @@
263
267
  "description": "Label for the field asking the company VAT number",
264
268
  "message": "VAT number"
265
269
  },
270
+ "batchOrder.viewAll": {
271
+ "description": "Button label to navigate to the list of all batch orders",
272
+ "message": "View all batch orders"
273
+ },
274
+ "batchOrder.viewOne": {
275
+ "description": "Button label to navigate to a single batch order details",
276
+ "message": "View details"
277
+ },
266
278
  "batchOrder.withoutOrderForm": {
267
279
  "description": "Option label for selecting payment without order form",
268
280
  "message": "Without order form"
@@ -1783,6 +1795,14 @@
1783
1795
  "description": "Checkbox label to indicate using alternative billing information",
1784
1796
  "message": "Use different billing information"
1785
1797
  },
1798
+ "components.SaleTunnel.BatchOrderForm.nextButton": {
1799
+ "description": "Label for the button to proceed to the next step in the batch order form",
1800
+ "message": "Next"
1801
+ },
1802
+ "components.SaleTunnel.BatchOrderForm.previousButton": {
1803
+ "description": "Label for the button to go back to the previous step in the batch order form",
1804
+ "message": "Previous"
1805
+ },
1786
1806
  "components.SaleTunnel.BatchOrderForm.stepAdmin": {
1787
1807
  "description": "Step label for administrative follow-up in the batch order form",
1788
1808
  "message": "Follow-up"
@@ -187,6 +187,10 @@
187
187
  "description": "Label for the field asking how the user heard about or was recommended the course",
188
188
  "message": "This course was recommended to me by"
189
189
  },
190
+ "batchOrder.reference": {
191
+ "description": "Reference label displayed with the batch order ID",
192
+ "message": "Ref. {id}"
193
+ },
190
194
  "batchOrder.role": {
191
195
  "description": "Label for the field asking the role/position of the contact person",
192
196
  "message": "Role"
@@ -263,6 +267,14 @@
263
267
  "description": "Label for the field asking the company VAT number",
264
268
  "message": "VAT number"
265
269
  },
270
+ "batchOrder.viewAll": {
271
+ "description": "Button label to navigate to the list of all batch orders",
272
+ "message": "View all batch orders"
273
+ },
274
+ "batchOrder.viewOne": {
275
+ "description": "Button label to navigate to a single batch order details",
276
+ "message": "View details"
277
+ },
266
278
  "batchOrder.withoutOrderForm": {
267
279
  "description": "Option label for selecting payment without order form",
268
280
  "message": "Without order form"
@@ -1783,6 +1795,14 @@
1783
1795
  "description": "Checkbox label to indicate using alternative billing information",
1784
1796
  "message": "Use different billing information"
1785
1797
  },
1798
+ "components.SaleTunnel.BatchOrderForm.nextButton": {
1799
+ "description": "Label for the button to proceed to the next step in the batch order form",
1800
+ "message": "Next"
1801
+ },
1802
+ "components.SaleTunnel.BatchOrderForm.previousButton": {
1803
+ "description": "Label for the button to go back to the previous step in the batch order form",
1804
+ "message": "Previous"
1805
+ },
1786
1806
  "components.SaleTunnel.BatchOrderForm.stepAdmin": {
1787
1807
  "description": "Step label for administrative follow-up in the batch order form",
1788
1808
  "message": "Follow-up"
@@ -132,7 +132,9 @@ export const validationSchema = Yup.object().shape({
132
132
  nb_seats: Yup.number().required().min(1),
133
133
  payment_method: Yup.mixed<PaymentMethod>().oneOf(Object.values(PaymentMethod)).required(),
134
134
  funding_entity: Yup.string().optional(),
135
- funding_amount: Yup.number().optional(),
135
+ funding_amount: Yup.number()
136
+ .transform((value, originalValue) => (originalValue === '' ? undefined : value))
137
+ .optional(),
136
138
  organization_id: Yup.string().optional(),
137
139
  });
138
140
 
@@ -4,6 +4,7 @@ import { Select } from '@openfun/cunningham-react';
4
4
  import { useSaleTunnelContext } from 'components/SaleTunnel/GenericSaleTunnel';
5
5
  import { SaleTunnelInformationSingular } from 'components/SaleTunnel/SaleTunnelInformation/SaleTunnelInformationSingular';
6
6
  import { SaleTunnelInformationGroup } from 'components/SaleTunnel/SaleTunnelInformation/SaleTunnelInformationGroup';
7
+ import { ProductType } from 'types/Joanie';
7
8
 
8
9
  const messages = defineMessages({
9
10
  purchaseTypeTitle: {
@@ -35,7 +36,8 @@ export enum FormType {
35
36
 
36
37
  export const SaleTunnelInformation = () => {
37
38
  const intl = useIntl();
38
- const { setBatchOrder, setSchedule } = useSaleTunnelContext();
39
+ const { setBatchOrder, setSchedule, product } = useSaleTunnelContext();
40
+ const productType = product.type;
39
41
  const options = [
40
42
  { label: intl.formatMessage(messages.purchaseTypeOptionSingle), value: FormType.SINGULAR },
41
43
  { label: intl.formatMessage(messages.purchaseTypeOptionGroup), value: FormType.GROUP },
@@ -44,25 +46,29 @@ export const SaleTunnelInformation = () => {
44
46
 
45
47
  return (
46
48
  <div className="sale-tunnel__main__column sale-tunnel__information">
47
- <div>
48
- <h3 className="block-title mb-t">
49
- <FormattedMessage {...messages.purchaseTypeTitle} />
50
- </h3>
51
- <Select
52
- label={intl.formatMessage(messages.purchaseTypeSelect)}
53
- options={options}
54
- fullWidth
55
- value={purchaseType}
56
- clearable={false}
57
- onChange={(e) => {
58
- setPurchaseType(e.target.value as FormType);
59
- setBatchOrder(undefined);
60
- setSchedule(undefined);
61
- }}
62
- />
63
- </div>
64
- {purchaseType === FormType.SINGULAR && <SaleTunnelInformationSingular />}
65
- {purchaseType === FormType.GROUP && <SaleTunnelInformationGroup />}
49
+ {productType === ProductType.CERTIFICATE ? (
50
+ <SaleTunnelInformationSingular />
51
+ ) : (
52
+ <div>
53
+ <h3 className="block-title mb-t">
54
+ <FormattedMessage {...messages.purchaseTypeTitle} />
55
+ </h3>
56
+ <Select
57
+ label={intl.formatMessage(messages.purchaseTypeSelect)}
58
+ options={options}
59
+ fullWidth
60
+ value={purchaseType}
61
+ clearable={false}
62
+ onChange={(e) => {
63
+ setPurchaseType(e.target.value as FormType);
64
+ setBatchOrder(undefined);
65
+ setSchedule(undefined);
66
+ }}
67
+ />
68
+ {purchaseType === FormType.SINGULAR && <SaleTunnelInformationSingular />}
69
+ {purchaseType === FormType.GROUP && <SaleTunnelInformationGroup />}
70
+ </div>
71
+ )}
66
72
  </div>
67
73
  );
68
74
  };