ti2-tourplan 1.0.47 → 1.0.49

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.
Files changed (2) hide show
  1. package/index.js +19 -1
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -474,9 +474,13 @@ class Plugin {
474
474
  const products = R.call(R.compose(
475
475
  R.map(optionsGroupedBySupplierId => {
476
476
  const OptGeneral = R.pathOr({}, [0, 'OptGeneral'], optionsGroupedBySupplierId);
477
+ let supplierName = R.path(['SupplierName'], OptGeneral);
478
+ if (R.path(['SupplierName'], OptGeneral).toLocaleLowerCase() === 'transfers') {
479
+ supplierName = `${R.path(['VoucherName'], OptGeneral)} (${R.path(['SupplierName'], OptGeneral)})`;
480
+ }
477
481
  const supplierData = {
478
482
  supplierId: R.path(['SupplierId'], OptGeneral),
479
- supplierName: R.path(['SupplierName'], OptGeneral),
483
+ supplierName: supplierName,
480
484
  supplierAddress: `${R.pathOr('', ['Address1'], OptGeneral)}, ${R.pathOr('', ['Address2'], OptGeneral)}, ${R.pathOr('', ['Address3'], OptGeneral)}, ${R.pathOr('', ['Address4'], OptGeneral)}, ${R.pathOr('', ['Address5'], OptGeneral)}`,
481
485
  serviceTypes: R.uniq(optionsGroupedBySupplierId.map(R.path(['OptGeneral', 'ButtonName']))),
482
486
  };
@@ -809,6 +813,20 @@ class Plugin {
809
813
  console.log('error in searchBooking', err);
810
814
  reply = { ListBookingsReply: { BookingHeaders: { BookingHeader: [] } } };
811
815
  }
816
+
817
+ // {"ListBookingsReply":
818
+ // {"BookingHeaders":
819
+ // {"BookingHeader":[
820
+ // {"AgentRef":"2399181","BookingId":"314164","BookingStatus":"Quotation","BookingType":"F",
821
+ // "Consult":null,"Currency":"GBP","EnteredDate":"2024-05-23","IsInternetBooking":"Y",
822
+ // "Name":"Mr. Robert Slavonia x2 2399181","QB":"Q","Ref":"ALFI393309","TotalPrice":"583143",
823
+ // "TravelDate":"2024-07-09"},{"AgentRef":"666666/1","BookingId":"315357",
824
+ // "BookingStatus":"Quotation","BookingType":"F","Consult":null,"Currency":"GBP",
825
+ // "EnteredDate":"2024-06-04","IsInternetBooking":"Y","Name":"Robert Guerrerio x3 2413898",
826
+ // "QB":"Q","Ref":"ALFI393503","TotalPrice":"2309452","TravelDate":"2024-08-31"
827
+ // }
828
+ // ]}
829
+ // }}
812
830
  return reply;
813
831
  })
814
832
  : [this.callTourplan(listBookingPayload)];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ti2-tourplan",
3
- "version": "1.0.47",
3
+ "version": "1.0.49",
4
4
  "description": "Tourplan's TI2 Plugin",
5
5
  "main": "index.js",
6
6
  "scripts": {