@felloh-org/lambda-wrapper 1.1.52 → 1.1.53
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.
|
@@ -9,7 +9,11 @@ var _typeorm = require("typeorm");
|
|
|
9
9
|
|
|
10
10
|
var _user = _interopRequireDefault(require("../user"));
|
|
11
11
|
|
|
12
|
-
var
|
|
12
|
+
var _bookingComponent = _interopRequireDefault(require("../../agent-data/booking-component"));
|
|
13
|
+
|
|
14
|
+
var _organisationFeature = _interopRequireDefault(require("../organisation-feature"));
|
|
15
|
+
|
|
16
|
+
var _dec, _dec2, _dec3, _dec4, _dec5, _dec6, _dec7, _dec8, _dec9, _dec10, _dec11, _dec12, _dec13, _dec14, _class, _class2, _descriptor, _descriptor2, _descriptor3, _descriptor4, _descriptor5, _descriptor6, _descriptor7, _descriptor8, _descriptor9, _descriptor10, _descriptor11;
|
|
13
17
|
|
|
14
18
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
15
19
|
|
|
@@ -47,7 +51,7 @@ let Organisation = (_dec = (0, _typeorm.Entity)({
|
|
|
47
51
|
name: "user_id",
|
|
48
52
|
referencedColumnName: "id"
|
|
49
53
|
}
|
|
50
|
-
}), _dec12 = (0, _typeorm.TreeParent)(), _dec13 = (0, _typeorm.TreeChildren)(), _dec(_class = _dec2(_class = (_class2 = class Organisation {
|
|
54
|
+
}), _dec12 = (0, _typeorm.TreeParent)(), _dec13 = (0, _typeorm.TreeChildren)(), _dec14 = (0, _typeorm.OneToMany)(() => _organisationFeature.default, organisationFeature => organisationFeature.organisation), _dec(_class = _dec2(_class = (_class2 = class Organisation {
|
|
51
55
|
constructor() {
|
|
52
56
|
_initializerDefineProperty(this, "id", _descriptor, this);
|
|
53
57
|
|
|
@@ -68,6 +72,8 @@ let Organisation = (_dec = (0, _typeorm.Entity)({
|
|
|
68
72
|
_initializerDefineProperty(this, "parent", _descriptor9, this);
|
|
69
73
|
|
|
70
74
|
_initializerDefineProperty(this, "children", _descriptor10, this);
|
|
75
|
+
|
|
76
|
+
_initializerDefineProperty(this, "organisation_feature", _descriptor11, this);
|
|
71
77
|
}
|
|
72
78
|
|
|
73
79
|
propgate(id, name) {
|
|
@@ -75,6 +81,28 @@ let Organisation = (_dec = (0, _typeorm.Entity)({
|
|
|
75
81
|
this.name = name;
|
|
76
82
|
}
|
|
77
83
|
|
|
84
|
+
getPublicData() {
|
|
85
|
+
const response = {
|
|
86
|
+
id: this.id,
|
|
87
|
+
name: this.name,
|
|
88
|
+
image: this.image,
|
|
89
|
+
created_at: this.created_at,
|
|
90
|
+
updated_at: this.updated_at,
|
|
91
|
+
deleted_at: this.deleted_at,
|
|
92
|
+
features: []
|
|
93
|
+
};
|
|
94
|
+
|
|
95
|
+
if (this.organisation_feature !== null && this.organisation_feature.length >= 1) {
|
|
96
|
+
response.features = this.organisation_feature.map(orgFeature => ({
|
|
97
|
+
id: orgFeature.feature.id,
|
|
98
|
+
name: orgFeature.feature.name,
|
|
99
|
+
machine_name: orgFeature.feature.machine_name
|
|
100
|
+
}));
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
return response;
|
|
104
|
+
}
|
|
105
|
+
|
|
78
106
|
getPublicCompactData() {
|
|
79
107
|
return {
|
|
80
108
|
id: this.id,
|
|
@@ -133,5 +161,10 @@ let Organisation = (_dec = (0, _typeorm.Entity)({
|
|
|
133
161
|
enumerable: true,
|
|
134
162
|
writable: true,
|
|
135
163
|
initializer: null
|
|
164
|
+
}), _descriptor11 = _applyDecoratedDescriptor(_class2.prototype, "organisation_feature", [_dec14], {
|
|
165
|
+
configurable: true,
|
|
166
|
+
enumerable: true,
|
|
167
|
+
writable: true,
|
|
168
|
+
initializer: null
|
|
136
169
|
})), _class2)) || _class) || _class);
|
|
137
170
|
exports.default = Organisation;
|