@asumano/worklip-typeorm-db 1.1.42 → 1.1.44

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.
@@ -75,7 +75,7 @@ __decorate([
75
75
  __decorate([
76
76
  (0, typeorm_1.Column)({
77
77
  type: "varchar",
78
- length: 100,
78
+ length: 255,
79
79
  comment: "Dirección del taller/concesionario.",
80
80
  }),
81
81
  __metadata("design:type", String)
@@ -48,3 +48,4 @@ export { Templates } from "./views/Templates";
48
48
  export { TemplateSections } from "./views/TemplateSections";
49
49
  export { TemplateSectionItems } from "./views/TemplateSectionItems";
50
50
  export { Workshops } from "./views/Workshops";
51
+ export { WorkshopsByAssociate } from "./views/WorkshopsByAssociate";
@@ -1,6 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.Workshops = exports.TemplateSectionItems = exports.TemplateSections = exports.Templates = exports.Reminders = exports.Vehicles = exports.Clients = exports.ServicesOrder = exports.Associates = exports.UsageAlert = exports.SubscriptionAddonTemplate = exports.PaymentTransaction = exports.BillingInvoice = exports.EmailLog = exports.WhatsappLog = exports.MediaFile = exports.BillingUsageSnapshot = exports.PaymentMethod = exports.SubscriptionAddon = exports.CompanySubscription = exports.SubscriptionPlan = exports.CountryHoliday = exports.CompanyBrand = exports.VehicleType = exports.AssociatePasswordReset = exports.AssociateSection = exports.AssociatePermission = exports.AssociateRole = exports.AssociatePlatform = exports.Reminder = exports.ServiceOrderHistory = exports.ServiceOrder = exports.TemplateSectionItem = exports.TemplateSection = exports.Template = exports.Workshop = exports.GlobalTemplateSectionItem = exports.GlobalTemplateSection = exports.GlobalTemplate = exports.AssociateSession = exports.MasterSession = exports.Associate = exports.Client = exports.Master = exports.Vehicle = exports.Brand = exports.Company = exports.City = exports.Region = exports.Country = void 0;
4
+ exports.WorkshopsByAssociate = void 0;
4
5
  var Country_1 = require("./entities/Country");
5
6
  Object.defineProperty(exports, "Country", { enumerable: true, get: function () { return Country_1.Country; } });
6
7
  var Region_1 = require("./entities/Region");
@@ -101,3 +102,5 @@ var TemplateSectionItems_1 = require("./views/TemplateSectionItems");
101
102
  Object.defineProperty(exports, "TemplateSectionItems", { enumerable: true, get: function () { return TemplateSectionItems_1.TemplateSectionItems; } });
102
103
  var Workshops_1 = require("./views/Workshops");
103
104
  Object.defineProperty(exports, "Workshops", { enumerable: true, get: function () { return Workshops_1.Workshops; } });
105
+ var WorkshopsByAssociate_1 = require("./views/WorkshopsByAssociate");
106
+ Object.defineProperty(exports, "WorkshopsByAssociate", { enumerable: true, get: function () { return WorkshopsByAssociate_1.WorkshopsByAssociate; } });
@@ -19,13 +19,13 @@ async function getAssociatesForTheTable(repository, { company, workshop, status,
19
19
  });
20
20
  }
21
21
  // DOC: Filtro por company FILTRO POR DEFECTO.
22
- if (company !== null && company >= 0) {
22
+ if (company !== null && company > 0) {
23
23
  queryBuilder.andWhere("associates.company = :company", {
24
24
  company,
25
25
  });
26
26
  }
27
27
  // DOC: Filtro por workshop FILTRO POR DEFECTO.
28
- if (workshop !== null && workshop >= 0) {
28
+ if (workshop !== null && workshop > 0) {
29
29
  queryBuilder.andWhere(`EXISTS (
30
30
  SELECT 1
31
31
  FROM workshop_associate wa
@@ -19,7 +19,7 @@ async function getClientsForTheTable(repository, { company, status, lazyEvent })
19
19
  });
20
20
  }
21
21
  // DOC: Filtro por company FILTRO POR DEFECTO.
22
- if (company !== null && company >= 0) {
22
+ if (company !== null && company > 0) {
23
23
  queryBuilder.andWhere("company = :company", {
24
24
  company,
25
25
  });
@@ -19,13 +19,13 @@ async function getServicesOrderForTheTable(repository, { company, workshop, stat
19
19
  });
20
20
  }
21
21
  // DOC: Filtro por company FILTRO POR DEFECTO.
22
- if (company !== null && company >= 0) {
22
+ if (company !== null && company > 0) {
23
23
  queryBuilder.andWhere("workshop_company = :company", {
24
24
  company,
25
25
  });
26
26
  }
27
27
  // DOC: Filtro por workshop.
28
- if (workshop !== null && workshop >= 0) {
28
+ if (workshop !== null && workshop > 0) {
29
29
  queryBuilder.andWhere("workshop = :workshop", {
30
30
  workshop,
31
31
  });
@@ -19,7 +19,7 @@ async function getVehiclesForTheTable(repository, { company, status, lazyEvent }
19
19
  });
20
20
  }
21
21
  // DOC: Filtro por company FILTRO POR DEFECTO.
22
- if (company !== null && company >= 0) {
22
+ if (company !== null && company > 0) {
23
23
  queryBuilder.andWhere("company = :company", {
24
24
  company,
25
25
  });
@@ -0,0 +1,32 @@
1
+ export declare class WorkshopsByAssociate {
2
+ id: number;
3
+ code: string;
4
+ company: number;
5
+ name: string;
6
+ region: number;
7
+ city: number;
8
+ address: string;
9
+ latitude: number;
10
+ longitude: number;
11
+ details: any | null;
12
+ created: Date;
13
+ updated: Date | null;
14
+ status: number;
15
+ company_id: number;
16
+ company_code: string;
17
+ company_name: string;
18
+ company_country: number;
19
+ company_details: any | null;
20
+ company_status: number;
21
+ city_id: number;
22
+ city_name: string;
23
+ city_region: number;
24
+ city_status: number;
25
+ region_id: number;
26
+ region_name: string;
27
+ region_country: number;
28
+ region_details: any | null;
29
+ region_status: number;
30
+ associate_id: number | null;
31
+ associates_count: number | null;
32
+ }
@@ -0,0 +1,141 @@
1
+ "use strict";
2
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
7
+ };
8
+ var __metadata = (this && this.__metadata) || function (k, v) {
9
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
10
+ };
11
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ exports.WorkshopsByAssociate = void 0;
13
+ const typeorm_1 = require("typeorm");
14
+ let WorkshopsByAssociate = class WorkshopsByAssociate {
15
+ };
16
+ exports.WorkshopsByAssociate = WorkshopsByAssociate;
17
+ __decorate([
18
+ (0, typeorm_1.ViewColumn)(),
19
+ __metadata("design:type", Number)
20
+ ], WorkshopsByAssociate.prototype, "id", void 0);
21
+ __decorate([
22
+ (0, typeorm_1.ViewColumn)(),
23
+ __metadata("design:type", String)
24
+ ], WorkshopsByAssociate.prototype, "code", void 0);
25
+ __decorate([
26
+ (0, typeorm_1.ViewColumn)(),
27
+ __metadata("design:type", Number)
28
+ ], WorkshopsByAssociate.prototype, "company", void 0);
29
+ __decorate([
30
+ (0, typeorm_1.ViewColumn)(),
31
+ __metadata("design:type", String)
32
+ ], WorkshopsByAssociate.prototype, "name", void 0);
33
+ __decorate([
34
+ (0, typeorm_1.ViewColumn)(),
35
+ __metadata("design:type", Number)
36
+ ], WorkshopsByAssociate.prototype, "region", void 0);
37
+ __decorate([
38
+ (0, typeorm_1.ViewColumn)(),
39
+ __metadata("design:type", Number)
40
+ ], WorkshopsByAssociate.prototype, "city", void 0);
41
+ __decorate([
42
+ (0, typeorm_1.ViewColumn)(),
43
+ __metadata("design:type", String)
44
+ ], WorkshopsByAssociate.prototype, "address", void 0);
45
+ __decorate([
46
+ (0, typeorm_1.ViewColumn)(),
47
+ __metadata("design:type", Number)
48
+ ], WorkshopsByAssociate.prototype, "latitude", void 0);
49
+ __decorate([
50
+ (0, typeorm_1.ViewColumn)(),
51
+ __metadata("design:type", Number)
52
+ ], WorkshopsByAssociate.prototype, "longitude", void 0);
53
+ __decorate([
54
+ (0, typeorm_1.ViewColumn)(),
55
+ __metadata("design:type", Object)
56
+ ], WorkshopsByAssociate.prototype, "details", void 0);
57
+ __decorate([
58
+ (0, typeorm_1.ViewColumn)(),
59
+ __metadata("design:type", Date)
60
+ ], WorkshopsByAssociate.prototype, "created", void 0);
61
+ __decorate([
62
+ (0, typeorm_1.ViewColumn)(),
63
+ __metadata("design:type", Object)
64
+ ], WorkshopsByAssociate.prototype, "updated", void 0);
65
+ __decorate([
66
+ (0, typeorm_1.ViewColumn)(),
67
+ __metadata("design:type", Number)
68
+ ], WorkshopsByAssociate.prototype, "status", void 0);
69
+ __decorate([
70
+ (0, typeorm_1.ViewColumn)(),
71
+ __metadata("design:type", Number)
72
+ ], WorkshopsByAssociate.prototype, "company_id", void 0);
73
+ __decorate([
74
+ (0, typeorm_1.ViewColumn)(),
75
+ __metadata("design:type", String)
76
+ ], WorkshopsByAssociate.prototype, "company_code", void 0);
77
+ __decorate([
78
+ (0, typeorm_1.ViewColumn)(),
79
+ __metadata("design:type", String)
80
+ ], WorkshopsByAssociate.prototype, "company_name", void 0);
81
+ __decorate([
82
+ (0, typeorm_1.ViewColumn)(),
83
+ __metadata("design:type", Number)
84
+ ], WorkshopsByAssociate.prototype, "company_country", void 0);
85
+ __decorate([
86
+ (0, typeorm_1.ViewColumn)(),
87
+ __metadata("design:type", Object)
88
+ ], WorkshopsByAssociate.prototype, "company_details", void 0);
89
+ __decorate([
90
+ (0, typeorm_1.ViewColumn)(),
91
+ __metadata("design:type", Number)
92
+ ], WorkshopsByAssociate.prototype, "company_status", void 0);
93
+ __decorate([
94
+ (0, typeorm_1.ViewColumn)(),
95
+ __metadata("design:type", Number)
96
+ ], WorkshopsByAssociate.prototype, "city_id", void 0);
97
+ __decorate([
98
+ (0, typeorm_1.ViewColumn)(),
99
+ __metadata("design:type", String)
100
+ ], WorkshopsByAssociate.prototype, "city_name", void 0);
101
+ __decorate([
102
+ (0, typeorm_1.ViewColumn)(),
103
+ __metadata("design:type", Number)
104
+ ], WorkshopsByAssociate.prototype, "city_region", void 0);
105
+ __decorate([
106
+ (0, typeorm_1.ViewColumn)(),
107
+ __metadata("design:type", Number)
108
+ ], WorkshopsByAssociate.prototype, "city_status", void 0);
109
+ __decorate([
110
+ (0, typeorm_1.ViewColumn)(),
111
+ __metadata("design:type", Number)
112
+ ], WorkshopsByAssociate.prototype, "region_id", void 0);
113
+ __decorate([
114
+ (0, typeorm_1.ViewColumn)(),
115
+ __metadata("design:type", String)
116
+ ], WorkshopsByAssociate.prototype, "region_name", void 0);
117
+ __decorate([
118
+ (0, typeorm_1.ViewColumn)(),
119
+ __metadata("design:type", Number)
120
+ ], WorkshopsByAssociate.prototype, "region_country", void 0);
121
+ __decorate([
122
+ (0, typeorm_1.ViewColumn)(),
123
+ __metadata("design:type", Object)
124
+ ], WorkshopsByAssociate.prototype, "region_details", void 0);
125
+ __decorate([
126
+ (0, typeorm_1.ViewColumn)(),
127
+ __metadata("design:type", Number)
128
+ ], WorkshopsByAssociate.prototype, "region_status", void 0);
129
+ __decorate([
130
+ (0, typeorm_1.ViewColumn)(),
131
+ __metadata("design:type", Object)
132
+ ], WorkshopsByAssociate.prototype, "associate_id", void 0);
133
+ __decorate([
134
+ (0, typeorm_1.ViewColumn)(),
135
+ __metadata("design:type", Object)
136
+ ], WorkshopsByAssociate.prototype, "associates_count", void 0);
137
+ exports.WorkshopsByAssociate = WorkshopsByAssociate = __decorate([
138
+ (0, typeorm_1.ViewEntity)({
139
+ name: "workshops_by_associate"
140
+ })
141
+ ], WorkshopsByAssociate);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@asumano/worklip-typeorm-db",
3
- "version": "1.1.42",
3
+ "version": "1.1.44",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -10,9 +10,6 @@
10
10
  "files": [
11
11
  "dist"
12
12
  ],
13
- "scripts": {
14
- "build": "npx rimraf dist && tsc --build"
15
- },
16
13
  "keywords": [],
17
14
  "author": "",
18
15
  "license": "ISC",
@@ -34,5 +31,8 @@
34
31
  "type": "git",
35
32
  "url": "https://github.com/worklip/worklip-typeorm-db.git"
36
33
  },
37
- "homepage": "https://github.com/worklip/worklip-typeorm-db.git"
38
- }
34
+ "homepage": "https://github.com/worklip/worklip-typeorm-db.git",
35
+ "scripts": {
36
+ "build": "npx rimraf dist && tsc --build"
37
+ }
38
+ }