@felloh-org/lambda-wrapper 1.1.74 → 1.1.75
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.
|
@@ -19,7 +19,7 @@ var _bookingComponent = _interopRequireDefault(require("../booking-component"));
|
|
|
19
19
|
|
|
20
20
|
var _paymentLink = _interopRequireDefault(require("../../payment/payment-link"));
|
|
21
21
|
|
|
22
|
-
var _dec, _dec2, _dec3, _dec4, _dec5, _dec6, _dec7, _dec8, _dec9, _dec10, _dec11, _dec12, _dec13, _dec14, _dec15, _dec16, _dec17, _dec18, _dec19, _class, _class2, _descriptor, _descriptor2, _descriptor3, _descriptor4, _descriptor5, _descriptor6, _descriptor7, _descriptor8, _descriptor9, _descriptor10, _descriptor11, _descriptor12, _descriptor13, _descriptor14, _descriptor15;
|
|
22
|
+
var _dec, _dec2, _dec3, _dec4, _dec5, _dec6, _dec7, _dec8, _dec9, _dec10, _dec11, _dec12, _dec13, _dec14, _dec15, _dec16, _dec17, _dec18, _dec19, _dec20, _class, _class2, _descriptor, _descriptor2, _descriptor3, _descriptor4, _descriptor5, _descriptor6, _descriptor7, _descriptor8, _descriptor9, _descriptor10, _descriptor11, _descriptor12, _descriptor13, _descriptor14, _descriptor15, _descriptor16;
|
|
23
23
|
|
|
24
24
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
25
25
|
|
|
@@ -66,7 +66,10 @@ let Booking = (_dec = (0, _typeorm.Entity)({
|
|
|
66
66
|
}), _dec18 = (0, _typeorm.DeleteDateColumn)({
|
|
67
67
|
type: 'timestamp with time zone',
|
|
68
68
|
nullable: true
|
|
69
|
-
}), _dec19 = (0, _typeorm.OneToMany)(() => _paymentLink.default, paymentLink => paymentLink.booking),
|
|
69
|
+
}), _dec19 = (0, _typeorm.OneToMany)(() => _paymentLink.default, paymentLink => paymentLink.booking), _dec20 = (0, _typeorm.Column)({
|
|
70
|
+
type: "boolean",
|
|
71
|
+
default: false
|
|
72
|
+
}), _dec(_class = (_class2 = class Booking {
|
|
70
73
|
constructor() {
|
|
71
74
|
_initializerDefineProperty(this, "id", _descriptor, this);
|
|
72
75
|
|
|
@@ -97,13 +100,16 @@ let Booking = (_dec = (0, _typeorm.Entity)({
|
|
|
97
100
|
_initializerDefineProperty(this, "deleted_at", _descriptor14, this);
|
|
98
101
|
|
|
99
102
|
_initializerDefineProperty(this, "payment_links", _descriptor15, this);
|
|
103
|
+
|
|
104
|
+
_initializerDefineProperty(this, "is_temporary", _descriptor16, this);
|
|
100
105
|
}
|
|
101
106
|
|
|
102
107
|
/**
|
|
103
108
|
* Get Public Data
|
|
104
|
-
* @
|
|
109
|
+
* @param showTemporaryFlag
|
|
110
|
+
* @returns {{components: [], departure_date: string, created_at: Date, organisation: null, booking_reference: string, gross_amount: number, transactions: [], payment_links: [], id: *|string, customer_name: string, user: null, email: string, return_date: string}}
|
|
105
111
|
*/
|
|
106
|
-
getPublicData() {
|
|
112
|
+
getPublicData(showTemporaryFlag = false) {
|
|
107
113
|
const response = {
|
|
108
114
|
id: this.id,
|
|
109
115
|
booking_reference: this.booking_reference,
|
|
@@ -120,6 +126,10 @@ let Booking = (_dec = (0, _typeorm.Entity)({
|
|
|
120
126
|
organisation: null
|
|
121
127
|
};
|
|
122
128
|
|
|
129
|
+
if (showTemporaryFlag === true) {
|
|
130
|
+
response.is_temporary = this.is_temporary;
|
|
131
|
+
}
|
|
132
|
+
|
|
123
133
|
if (typeof this.transactions !== 'undefined') {
|
|
124
134
|
response.transactions = this.transactions.map(transaction => transaction.getPublicCompactData());
|
|
125
135
|
}
|
|
@@ -230,5 +240,12 @@ let Booking = (_dec = (0, _typeorm.Entity)({
|
|
|
230
240
|
enumerable: true,
|
|
231
241
|
writable: true,
|
|
232
242
|
initializer: null
|
|
243
|
+
}), _descriptor16 = _applyDecoratedDescriptor(_class2.prototype, "is_temporary", [_dec20], {
|
|
244
|
+
configurable: true,
|
|
245
|
+
enumerable: true,
|
|
246
|
+
writable: true,
|
|
247
|
+
initializer: function () {
|
|
248
|
+
return false;
|
|
249
|
+
}
|
|
233
250
|
})), _class2)) || _class);
|
|
234
251
|
exports.default = Booking;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
const { MigrationInterface, QueryRunner } = require("typeorm");
|
|
2
|
+
|
|
3
|
+
module.exports = class bookingsIsTemporary1660741384852 {
|
|
4
|
+
name = 'bookingsIsTemporary1660741384852'
|
|
5
|
+
|
|
6
|
+
async up(queryRunner) {
|
|
7
|
+
await queryRunner.query(`ALTER TABLE "agent_data"."booking" ADD "is_temporary" boolean NOT NULL DEFAULT false`);}
|
|
8
|
+
|
|
9
|
+
async down(queryRunner) {
|
|
10
|
+
await queryRunner.query(`ALTER TABLE "agent_data"."booking" DROP COLUMN "is_temporary"`);
|
|
11
|
+
}
|
|
12
|
+
}
|