@asumano/worklip-typeorm-db 1.1.13 → 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.
@@ -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("associates.workshop_id = :workshop", {
30
- workshop,
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) {
@@ -19,6 +19,4 @@ export declare class Associates {
19
19
  city_name: string;
20
20
  city_region: number;
21
21
  city_status: number;
22
- workshop_id: number;
23
- workshop_name: string;
24
22
  }
@@ -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);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@asumano/worklip-typeorm-db",
3
- "version": "1.1.13",
3
+ "version": "1.1.14",
4
4
  "publishConfig": {
5
5
  "access": "restricted"
6
6
  },