ti2-tourplan 1.0.55 → 1.0.56

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.
package/index.js CHANGED
@@ -495,7 +495,7 @@ class Plugin {
495
495
  }
496
496
  const supplierData = {
497
497
  supplierId: R.path(['SupplierId'], OptGeneral),
498
- supplierName: supplierName,
498
+ supplierName,
499
499
  supplierAddress: `${R.pathOr('', ['Address1'], OptGeneral)}, ${R.pathOr('', ['Address2'], OptGeneral)}, ${R.pathOr('', ['Address3'], OptGeneral)}, ${R.pathOr('', ['Address4'], OptGeneral)}, ${R.pathOr('', ['Address5'], OptGeneral)}`,
500
500
  serviceTypes: R.uniq(optionsGroupedBySupplierId.map(R.path(['OptGeneral', 'ButtonName']))),
501
501
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ti2-tourplan",
3
- "version": "1.0.55",
3
+ "version": "1.0.56",
4
4
  "description": "Tourplan's TI2 Plugin",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -48,11 +48,14 @@ const translateTPOption = ({ optionsGroupedBySupplierId, supplierData }) => {
48
48
  let OptExtras = R.pathOr([], ['OptGeneral', 'OptExtras', 'OptExtra'], option);
49
49
  // console.log({ OptExtras })
50
50
  if (!Array.isArray(OptExtras)) OptExtras = [OptExtras];
51
+ const lastUpdateISO = R.path(['OptGeneral', 'LastUpdate'], option);
52
+ const lastUpdateTimestamp = lastUpdateISO ? new Date(lastUpdateISO).getTime() / 1000 : null;
51
53
  const keyData = {
52
54
  optionId: R.path(['Opt'], option),
53
55
  optionName: `${R.path(['OptGeneral', 'Description'], option)}${
54
56
  comment ? `-${comment}` : ''
55
57
  }`,
58
+ lastUpdateTimestamp,
56
59
  // Guides, Accommodation, Transfers, Entrance Fees, Meals, Other
57
60
  serviceType: typeof st === 'string' ? st : '',
58
61
  restrictions: {