ti2-tourplan 1.0.29 → 1.0.30
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 +25 -0
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -492,6 +492,7 @@ class Plugin {
|
|
|
492
492
|
},
|
|
493
493
|
payload: {
|
|
494
494
|
quoteName,
|
|
495
|
+
rateId,
|
|
495
496
|
quoteId,
|
|
496
497
|
// existingQuoteId,
|
|
497
498
|
// existingLineId,
|
|
@@ -508,6 +509,9 @@ class Plugin {
|
|
|
508
509
|
Defaults to 1.
|
|
509
510
|
*/
|
|
510
511
|
chargeUnitQuanity,
|
|
512
|
+
extras,
|
|
513
|
+
puInfo,
|
|
514
|
+
doInfo,
|
|
511
515
|
},
|
|
512
516
|
}) {
|
|
513
517
|
const model = {
|
|
@@ -519,6 +523,26 @@ class Plugin {
|
|
|
519
523
|
} : {
|
|
520
524
|
NewBookingInfo: { Name: quoteName, QB: 'Q' },
|
|
521
525
|
}),
|
|
526
|
+
...(rateId ? {
|
|
527
|
+
RateId: rateId,
|
|
528
|
+
} : {}),
|
|
529
|
+
...(puInfo ? {
|
|
530
|
+
puTime: puInfo.time,
|
|
531
|
+
puRemark: `Time: ${puInfo.time || 'NA'},
|
|
532
|
+
Location: ${puInfo.location || 'NA'},
|
|
533
|
+
Flight: ${puInfo.flightDetails || 'NA'},
|
|
534
|
+
`,
|
|
535
|
+
} : {}),
|
|
536
|
+
...(doInfo ? {
|
|
537
|
+
doTime: doInfo.time,
|
|
538
|
+
doRemark: `Time: ${doInfo.time || 'NA'},
|
|
539
|
+
Location: ${doInfo.location || 'NA'},
|
|
540
|
+
Flight: ${doInfo.flightDetails || 'NA'},
|
|
541
|
+
`,
|
|
542
|
+
} : {}),
|
|
543
|
+
...(extras && extras.length ? {
|
|
544
|
+
Remarks: extras.map((e, i) => `Extra ${i + 1}: ${e.name} x ${e.quantity}`).join(`\n`),
|
|
545
|
+
} : {}),
|
|
522
546
|
Opt: optionId,
|
|
523
547
|
DateFrom: startDate,
|
|
524
548
|
RateId: 'Default',
|
|
@@ -560,6 +584,7 @@ class Plugin {
|
|
|
560
584
|
Infant: 'I',
|
|
561
585
|
}[p.passengerType],
|
|
562
586
|
Age: p.age,
|
|
587
|
+
DateOfBirth: p.dob,
|
|
563
588
|
Title: p.salutation,
|
|
564
589
|
},
|
|
565
590
|
}));
|