@asumano/worklip-typeorm-db 1.1.12 → 1.1.14
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.
|
@@ -60,33 +60,23 @@ __decorate([
|
|
|
60
60
|
__metadata("design:type", Number)
|
|
61
61
|
], AssociatePermission.prototype, "status", void 0);
|
|
62
62
|
__decorate([
|
|
63
|
-
(0, typeorm_1.ManyToMany)(() => entities_views_routes_1.AssociateRole, (role) => role.permissions)
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
})
|
|
63
|
+
(0, typeorm_1.ManyToMany)(() => entities_views_routes_1.AssociateRole, (role) => role.permissions)
|
|
64
|
+
// @JoinTable({
|
|
65
|
+
// name: "associate_role_permission",
|
|
66
|
+
// joinColumn: {
|
|
67
|
+
// name: "permission",
|
|
68
|
+
// referencedColumnName: "id",
|
|
69
|
+
// },
|
|
70
|
+
// inverseJoinColumn: {
|
|
71
|
+
// name: "role",
|
|
72
|
+
// referencedColumnName: "id",
|
|
73
|
+
// },
|
|
74
|
+
// })
|
|
75
|
+
,
|
|
75
76
|
__metadata("design:type", Array)
|
|
76
77
|
], AssociatePermission.prototype, "roles", void 0);
|
|
77
78
|
__decorate([
|
|
78
79
|
(0, typeorm_1.ManyToMany)(() => entities_views_routes_1.Associate, (associate) => associate.permissions),
|
|
79
|
-
(0, typeorm_1.JoinTable)({
|
|
80
|
-
name: "associate_assigned_permission",
|
|
81
|
-
joinColumn: {
|
|
82
|
-
name: "permission",
|
|
83
|
-
referencedColumnName: "id",
|
|
84
|
-
},
|
|
85
|
-
inverseJoinColumn: {
|
|
86
|
-
name: "associate",
|
|
87
|
-
referencedColumnName: "id",
|
|
88
|
-
},
|
|
89
|
-
}),
|
|
90
80
|
__metadata("design:type", Array)
|
|
91
81
|
], AssociatePermission.prototype, "associates", void 0);
|
|
92
82
|
exports.AssociatePermission = AssociatePermission = __decorate([
|
|
@@ -26,9 +26,12 @@ async function getAssociatesForTheTable(repository, { company, workshop, status,
|
|
|
26
26
|
}
|
|
27
27
|
// DOC: Filtro por workshop FILTRO POR DEFECTO.
|
|
28
28
|
if (workshop !== null && workshop >= 0) {
|
|
29
|
-
queryBuilder.andWhere(
|
|
30
|
-
|
|
31
|
-
|
|
29
|
+
queryBuilder.andWhere(`EXISTS (
|
|
30
|
+
SELECT 1
|
|
31
|
+
FROM workshop_associate wa
|
|
32
|
+
WHERE wa.associate = associates.id
|
|
33
|
+
AND wa.workshop = :workshop
|
|
34
|
+
)`, { workshop });
|
|
32
35
|
}
|
|
33
36
|
// DOC: Filtro por visible FILTRO POR DEFECTO.
|
|
34
37
|
if (visible !== null) {
|
package/dist/views/Associates.js
CHANGED
|
@@ -94,14 +94,6 @@ __decorate([
|
|
|
94
94
|
(0, typeorm_1.ViewColumn)(),
|
|
95
95
|
__metadata("design:type", Number)
|
|
96
96
|
], Associates.prototype, "city_status", void 0);
|
|
97
|
-
__decorate([
|
|
98
|
-
(0, typeorm_1.ViewColumn)(),
|
|
99
|
-
__metadata("design:type", Number)
|
|
100
|
-
], Associates.prototype, "workshop_id", void 0);
|
|
101
|
-
__decorate([
|
|
102
|
-
(0, typeorm_1.ViewColumn)(),
|
|
103
|
-
__metadata("design:type", String)
|
|
104
|
-
], Associates.prototype, "workshop_name", void 0);
|
|
105
97
|
exports.Associates = Associates = __decorate([
|
|
106
98
|
(0, typeorm_1.ViewEntity)()
|
|
107
99
|
], Associates);
|