test-entity-library-asm 3.8.2 → 3.8.4
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.
- package/dist/entities/PartnerPlatformSectionPermission.d.ts +1 -2
- package/dist/entities/PartnerPlatformSectionPermission.js +1 -2
- package/package.json +1 -1
- package/src/entities/PartnerPlatformSectionPermission.ts +1 -1
- package/dist/entities/PartnerPermission.d.ts +0 -12
- package/dist/entities/PartnerPermission.js +0 -104
- package/dist/entities/PartnerPermissionSection.d.ts +0 -11
- package/dist/entities/PartnerPermissionSection.js +0 -90
- package/dist/entities/ReassignReview.d.ts +0 -9
- package/dist/entities/ReassignReview.js +0 -73
- package/dist/entities/RequestStatus.d.ts +0 -10
- package/dist/entities/RequestStatus.js +0 -68
- package/dist/entities/Terminal.d.ts +0 -12
- package/dist/entities/Terminal.js +0 -80
- package/dist/entities/TerminalSession.d.ts +0 -10
- package/dist/entities/TerminalSession.js +0 -71
- package/dist/filters/LoginTerminalPartner.d.ts +0 -3
- package/dist/filters/LoginTerminalPartner.js +0 -74
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import { PartnerPlatformSection, PartnerPlatformSectionPermissionAssociate } from "..";
|
|
2
|
-
import { PartnerRole } from "./PartnerRole";
|
|
1
|
+
import { PartnerPlatformSection, PartnerPlatformSectionPermissionAssociate, PartnerRole } from "..";
|
|
3
2
|
export declare class PartnerPlatformSectionPermission {
|
|
4
3
|
id: number;
|
|
5
4
|
code: string;
|
|
@@ -12,7 +12,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
12
12
|
exports.PartnerPlatformSectionPermission = void 0;
|
|
13
13
|
var typeorm_1 = require("typeorm");
|
|
14
14
|
var __1 = require("..");
|
|
15
|
-
var PartnerRole_1 = require("./PartnerRole");
|
|
16
15
|
var PartnerPlatformSectionPermission = /** @class */ (function () {
|
|
17
16
|
function PartnerPlatformSectionPermission() {
|
|
18
17
|
}
|
|
@@ -108,7 +107,7 @@ var PartnerPlatformSectionPermission = /** @class */ (function () {
|
|
|
108
107
|
__metadata("design:type", Array)
|
|
109
108
|
], PartnerPlatformSectionPermission.prototype, "associated_by", void 0);
|
|
110
109
|
__decorate([
|
|
111
|
-
(0, typeorm_1.ManyToMany)(function () { return
|
|
110
|
+
(0, typeorm_1.ManyToMany)(function () { return __1.PartnerRole; }, function (partnerRole) { return partnerRole.roles_permissions; }),
|
|
112
111
|
(0, typeorm_1.JoinTable)({
|
|
113
112
|
name: "partner_role_permission",
|
|
114
113
|
joinColumn: {
|
package/package.json
CHANGED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { PartnerPermissionSection } from "..";
|
|
2
|
-
import { PartnerRole } from "./PartnerRole";
|
|
3
|
-
export declare class PartnerPermission {
|
|
4
|
-
id: number;
|
|
5
|
-
code: string;
|
|
6
|
-
section: PartnerPermissionSection;
|
|
7
|
-
name: string;
|
|
8
|
-
description: string | null;
|
|
9
|
-
icon: string | null;
|
|
10
|
-
status: number;
|
|
11
|
-
roles_permissions: PartnerRole[];
|
|
12
|
-
}
|
|
@@ -1,104 +0,0 @@
|
|
|
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.PartnerPermission = void 0;
|
|
13
|
-
var typeorm_1 = require("typeorm");
|
|
14
|
-
var __1 = require("..");
|
|
15
|
-
var PartnerRole_1 = require("./PartnerRole");
|
|
16
|
-
var PartnerPermission = /** @class */ (function () {
|
|
17
|
-
function PartnerPermission() {
|
|
18
|
-
}
|
|
19
|
-
__decorate([
|
|
20
|
-
(0, typeorm_1.PrimaryGeneratedColumn)({
|
|
21
|
-
type: "int",
|
|
22
|
-
comment: "Número de identificación (ID) único de cada registro.",
|
|
23
|
-
}),
|
|
24
|
-
__metadata("design:type", Number)
|
|
25
|
-
], PartnerPermission.prototype, "id", void 0);
|
|
26
|
-
__decorate([
|
|
27
|
-
(0, typeorm_1.Column)({
|
|
28
|
-
length: 10,
|
|
29
|
-
type: "varchar",
|
|
30
|
-
unique: true,
|
|
31
|
-
comment: "Código del permiso.",
|
|
32
|
-
}),
|
|
33
|
-
__metadata("design:type", String)
|
|
34
|
-
], PartnerPermission.prototype, "code", void 0);
|
|
35
|
-
__decorate([
|
|
36
|
-
(0, typeorm_1.ManyToOne)(function () { return __1.PartnerPermissionSection; }, function (partnerPermissionSection) {
|
|
37
|
-
return partnerPermissionSection.partner_permissions_sections;
|
|
38
|
-
}, {
|
|
39
|
-
onDelete: "RESTRICT",
|
|
40
|
-
onUpdate: "NO ACTION",
|
|
41
|
-
}),
|
|
42
|
-
(0, typeorm_1.JoinColumn)({ name: "section" }),
|
|
43
|
-
__metadata("design:type", __1.PartnerPermissionSection)
|
|
44
|
-
], PartnerPermission.prototype, "section", void 0);
|
|
45
|
-
__decorate([
|
|
46
|
-
(0, typeorm_1.Column)({
|
|
47
|
-
length: 40,
|
|
48
|
-
type: "varchar",
|
|
49
|
-
comment: "Id de la variable que se encuentra en los archivos `locale` para el multilenguaje.",
|
|
50
|
-
}),
|
|
51
|
-
__metadata("design:type", String)
|
|
52
|
-
], PartnerPermission.prototype, "name", void 0);
|
|
53
|
-
__decorate([
|
|
54
|
-
(0, typeorm_1.Column)({
|
|
55
|
-
length: 40,
|
|
56
|
-
type: "varchar",
|
|
57
|
-
comment: "Id de la variable que se encuentra en los archivos `locale` para el multilenguaje.",
|
|
58
|
-
nullable: true,
|
|
59
|
-
default: null,
|
|
60
|
-
}),
|
|
61
|
-
__metadata("design:type", Object)
|
|
62
|
-
], PartnerPermission.prototype, "description", void 0);
|
|
63
|
-
__decorate([
|
|
64
|
-
(0, typeorm_1.Column)({
|
|
65
|
-
length: 20,
|
|
66
|
-
type: "varchar",
|
|
67
|
-
comment: "Icono de la sección para los permisos.",
|
|
68
|
-
nullable: true,
|
|
69
|
-
default: null,
|
|
70
|
-
}),
|
|
71
|
-
__metadata("design:type", Object)
|
|
72
|
-
], PartnerPermission.prototype, "icon", void 0);
|
|
73
|
-
__decorate([
|
|
74
|
-
(0, typeorm_1.Column)({
|
|
75
|
-
default: 1,
|
|
76
|
-
type: "int",
|
|
77
|
-
width: 1,
|
|
78
|
-
comment: "Estado del registro, es decir:\r\n1. Activo: Es visible en la plataforma.\r\n0. Inactivo: No será visible en la plataforma.",
|
|
79
|
-
}),
|
|
80
|
-
__metadata("design:type", Number)
|
|
81
|
-
], PartnerPermission.prototype, "status", void 0);
|
|
82
|
-
__decorate([
|
|
83
|
-
(0, typeorm_1.ManyToMany)(function () { return PartnerRole_1.PartnerRole; }, function (partnerRole) { return partnerRole.roles_permissions; }),
|
|
84
|
-
(0, typeorm_1.JoinTable)({
|
|
85
|
-
name: "partner_role_permission",
|
|
86
|
-
joinColumn: {
|
|
87
|
-
name: "permission",
|
|
88
|
-
referencedColumnName: "id",
|
|
89
|
-
},
|
|
90
|
-
inverseJoinColumn: {
|
|
91
|
-
name: "role",
|
|
92
|
-
referencedColumnName: "id",
|
|
93
|
-
},
|
|
94
|
-
}),
|
|
95
|
-
__metadata("design:type", Array)
|
|
96
|
-
], PartnerPermission.prototype, "roles_permissions", void 0);
|
|
97
|
-
PartnerPermission = __decorate([
|
|
98
|
-
(0, typeorm_1.Entity)("partner_permission", {
|
|
99
|
-
comment: "Permisos que estarán disponibles en la plataforma para los usuarios (partners).",
|
|
100
|
-
})
|
|
101
|
-
], PartnerPermission);
|
|
102
|
-
return PartnerPermission;
|
|
103
|
-
}());
|
|
104
|
-
exports.PartnerPermission = PartnerPermission;
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { PartnerPermission, PartnerPlatform } from "..";
|
|
2
|
-
export declare class PartnerPermissionSection {
|
|
3
|
-
id: number;
|
|
4
|
-
code: string;
|
|
5
|
-
platform: PartnerPlatform;
|
|
6
|
-
name: string;
|
|
7
|
-
description: string | null;
|
|
8
|
-
icon: string | null;
|
|
9
|
-
status: number;
|
|
10
|
-
partner_permissions_sections: PartnerPermission[];
|
|
11
|
-
}
|
|
@@ -1,90 +0,0 @@
|
|
|
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.PartnerPermissionSection = void 0;
|
|
13
|
-
var typeorm_1 = require("typeorm");
|
|
14
|
-
var __1 = require("..");
|
|
15
|
-
var PartnerPermissionSection = /** @class */ (function () {
|
|
16
|
-
function PartnerPermissionSection() {
|
|
17
|
-
}
|
|
18
|
-
__decorate([
|
|
19
|
-
(0, typeorm_1.PrimaryGeneratedColumn)({
|
|
20
|
-
type: "int",
|
|
21
|
-
comment: "Número de identificación (ID) único de cada registro.",
|
|
22
|
-
}),
|
|
23
|
-
__metadata("design:type", Number)
|
|
24
|
-
], PartnerPermissionSection.prototype, "id", void 0);
|
|
25
|
-
__decorate([
|
|
26
|
-
(0, typeorm_1.Column)({
|
|
27
|
-
length: 10,
|
|
28
|
-
type: "varchar",
|
|
29
|
-
unique: true,
|
|
30
|
-
comment: "Código del permiso.",
|
|
31
|
-
}),
|
|
32
|
-
__metadata("design:type", String)
|
|
33
|
-
], PartnerPermissionSection.prototype, "code", void 0);
|
|
34
|
-
__decorate([
|
|
35
|
-
(0, typeorm_1.ManyToOne)(function () { return __1.PartnerPlatform; }, function (partnerPlatform) { return partnerPlatform.partner_platform_sections; }, {
|
|
36
|
-
onDelete: "RESTRICT",
|
|
37
|
-
onUpdate: "NO ACTION",
|
|
38
|
-
}),
|
|
39
|
-
(0, typeorm_1.JoinColumn)({ name: "platform" }),
|
|
40
|
-
__metadata("design:type", __1.PartnerPlatform)
|
|
41
|
-
], PartnerPermissionSection.prototype, "platform", void 0);
|
|
42
|
-
__decorate([
|
|
43
|
-
(0, typeorm_1.Column)({
|
|
44
|
-
length: 40,
|
|
45
|
-
type: "varchar",
|
|
46
|
-
comment: "Id de la variable que se encuentra en los archivos `locale` para el multilenguaje.",
|
|
47
|
-
}),
|
|
48
|
-
__metadata("design:type", String)
|
|
49
|
-
], PartnerPermissionSection.prototype, "name", void 0);
|
|
50
|
-
__decorate([
|
|
51
|
-
(0, typeorm_1.Column)({
|
|
52
|
-
length: 40,
|
|
53
|
-
type: "varchar",
|
|
54
|
-
comment: "Id de la variable que se encuentra en los archivos `locale` para el multilenguaje.",
|
|
55
|
-
nullable: true,
|
|
56
|
-
default: null,
|
|
57
|
-
}),
|
|
58
|
-
__metadata("design:type", Object)
|
|
59
|
-
], PartnerPermissionSection.prototype, "description", void 0);
|
|
60
|
-
__decorate([
|
|
61
|
-
(0, typeorm_1.Column)({
|
|
62
|
-
length: 20,
|
|
63
|
-
type: "varchar",
|
|
64
|
-
comment: "Icono de la sección para los permisos.",
|
|
65
|
-
nullable: true,
|
|
66
|
-
default: null,
|
|
67
|
-
}),
|
|
68
|
-
__metadata("design:type", Object)
|
|
69
|
-
], PartnerPermissionSection.prototype, "icon", void 0);
|
|
70
|
-
__decorate([
|
|
71
|
-
(0, typeorm_1.Column)({
|
|
72
|
-
default: 1,
|
|
73
|
-
type: "int",
|
|
74
|
-
width: 1,
|
|
75
|
-
comment: "Estado del registro, es decir:\r\n1. Activo: Es visible en la plataforma.\r\n0. Inactivo: No será visible en la plataforma.",
|
|
76
|
-
}),
|
|
77
|
-
__metadata("design:type", Number)
|
|
78
|
-
], PartnerPermissionSection.prototype, "status", void 0);
|
|
79
|
-
__decorate([
|
|
80
|
-
(0, typeorm_1.OneToMany)(function () { return __1.PartnerPermission; }, function (partnerPermissionSection) { return partnerPermissionSection.section; }),
|
|
81
|
-
__metadata("design:type", Array)
|
|
82
|
-
], PartnerPermissionSection.prototype, "partner_permissions_sections", void 0);
|
|
83
|
-
PartnerPermissionSection = __decorate([
|
|
84
|
-
(0, typeorm_1.Entity)("partner_permission_section", {
|
|
85
|
-
comment: "Tabla creada para agregar las secciones para lo permisos del partner.",
|
|
86
|
-
})
|
|
87
|
-
], PartnerPermissionSection);
|
|
88
|
-
return PartnerPermissionSection;
|
|
89
|
-
}());
|
|
90
|
-
exports.PartnerPermissionSection = PartnerPermissionSection;
|
|
@@ -1,73 +0,0 @@
|
|
|
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.ReassignReview = void 0;
|
|
13
|
-
var typeorm_1 = require("typeorm");
|
|
14
|
-
var __1 = require("..");
|
|
15
|
-
var dateTransformer_1 = require("../transformers/dateTransformer");
|
|
16
|
-
var jsonTransformer_1 = require("../transformers/jsonTransformer");
|
|
17
|
-
var ReassignReview = /** @class */ (function () {
|
|
18
|
-
function ReassignReview() {
|
|
19
|
-
}
|
|
20
|
-
__decorate([
|
|
21
|
-
(0, typeorm_1.PrimaryGeneratedColumn)({
|
|
22
|
-
comment: 'Número de identificación (ID) único de cada registro.',
|
|
23
|
-
}),
|
|
24
|
-
__metadata("design:type", Number)
|
|
25
|
-
], ReassignReview.prototype, "id", void 0);
|
|
26
|
-
__decorate([
|
|
27
|
-
(0, typeorm_1.ManyToOne)(function () { return __1.Master; }, function (master) { return master.reassign_reviews; }, {
|
|
28
|
-
onDelete: 'CASCADE',
|
|
29
|
-
onUpdate: 'NO ACTION',
|
|
30
|
-
}),
|
|
31
|
-
(0, typeorm_1.JoinColumn)({ name: 'previous_master' }),
|
|
32
|
-
__metadata("design:type", __1.Master)
|
|
33
|
-
], ReassignReview.prototype, "previous_master", void 0);
|
|
34
|
-
__decorate([
|
|
35
|
-
(0, typeorm_1.ManyToOne)(function () { return __1.Master; }, function (master) { return master.reassign_review_news; }, {
|
|
36
|
-
onDelete: 'CASCADE',
|
|
37
|
-
onUpdate: 'NO ACTION',
|
|
38
|
-
}),
|
|
39
|
-
(0, typeorm_1.JoinColumn)({ name: 'new_user' }),
|
|
40
|
-
__metadata("design:type", __1.Master)
|
|
41
|
-
], ReassignReview.prototype, "new_user", void 0);
|
|
42
|
-
__decorate([
|
|
43
|
-
(0, typeorm_1.Column)({
|
|
44
|
-
type: 'text',
|
|
45
|
-
nullable: true,
|
|
46
|
-
transformer: jsonTransformer_1.jsonTransformer,
|
|
47
|
-
comment: 'Configuración de tipo JSON donde se guarda la información necesaria.',
|
|
48
|
-
}),
|
|
49
|
-
__metadata("design:type", Object)
|
|
50
|
-
], ReassignReview.prototype, "settings", void 0);
|
|
51
|
-
__decorate([
|
|
52
|
-
(0, typeorm_1.Column)({
|
|
53
|
-
type: 'datetime',
|
|
54
|
-
comment: 'Fecha creación del registro.',
|
|
55
|
-
transformer: new dateTransformer_1.DateTransformer(),
|
|
56
|
-
}),
|
|
57
|
-
__metadata("design:type", Date)
|
|
58
|
-
], ReassignReview.prototype, "created", void 0);
|
|
59
|
-
__decorate([
|
|
60
|
-
(0, typeorm_1.Column)({
|
|
61
|
-
default: 1,
|
|
62
|
-
comment: 'Estado del registro, es decir:\r\n\r\n1. Activo: El registro es visible.\r\n\r\n0. Inactivo: El registro no es visible.',
|
|
63
|
-
}),
|
|
64
|
-
__metadata("design:type", Number)
|
|
65
|
-
], ReassignReview.prototype, "status", void 0);
|
|
66
|
-
ReassignReview = __decorate([
|
|
67
|
-
(0, typeorm_1.Entity)('reassign_review', {
|
|
68
|
-
comment: 'Tabla creada para almacenar las solicitudes de reasignar tareas.',
|
|
69
|
-
})
|
|
70
|
-
], ReassignReview);
|
|
71
|
-
return ReassignReview;
|
|
72
|
-
}());
|
|
73
|
-
exports.ReassignReview = ReassignReview;
|
|
@@ -1,68 +0,0 @@
|
|
|
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.RequestStatus = void 0;
|
|
13
|
-
var typeorm_1 = require("typeorm");
|
|
14
|
-
var Request_1 = require("./Request");
|
|
15
|
-
var RequestStatus = /** @class */ (function () {
|
|
16
|
-
function RequestStatus() {
|
|
17
|
-
}
|
|
18
|
-
__decorate([
|
|
19
|
-
(0, typeorm_1.PrimaryGeneratedColumn)({
|
|
20
|
-
comment: 'Número de identificación (ID) único de cada registro.',
|
|
21
|
-
}),
|
|
22
|
-
__metadata("design:type", Number)
|
|
23
|
-
], RequestStatus.prototype, "id", void 0);
|
|
24
|
-
__decorate([
|
|
25
|
-
(0, typeorm_1.Column)({
|
|
26
|
-
comment: 'Los tipos de elemento, esto se hace para validaciones por parte del código:\r\n0, 1, 2, 3, 4, 5, 6, 7....',
|
|
27
|
-
}),
|
|
28
|
-
__metadata("design:type", Number)
|
|
29
|
-
], RequestStatus.prototype, "code", void 0);
|
|
30
|
-
__decorate([
|
|
31
|
-
(0, typeorm_1.Column)({
|
|
32
|
-
length: 50,
|
|
33
|
-
comment: 'Nombre del estado, este campo debe tener el id/key de cada lenguaje.\r\n\r\nVer la carpeta ``locales`` del proyecto frontend para ver el id de cada tipo de elemento.',
|
|
34
|
-
}),
|
|
35
|
-
__metadata("design:type", String)
|
|
36
|
-
], RequestStatus.prototype, "name", void 0);
|
|
37
|
-
__decorate([
|
|
38
|
-
(0, typeorm_1.Column)({
|
|
39
|
-
length: 50,
|
|
40
|
-
comment: 'Descripción del estado, este campo debe tener el id/key de cada lenguaje.\r\n\r\nVer la carpeta ``locales`` del proyecto frontend para ver el id de cada tipo de elemento.',
|
|
41
|
-
}),
|
|
42
|
-
__metadata("design:type", String)
|
|
43
|
-
], RequestStatus.prototype, "description", void 0);
|
|
44
|
-
__decorate([
|
|
45
|
-
(0, typeorm_1.Column)({
|
|
46
|
-
comment: 'Quién puede ver y asignar el estado en la orden:\r\n1. Usuario.\r\n2. Cliente (local).\r\n3. Todos.',
|
|
47
|
-
}),
|
|
48
|
-
__metadata("design:type", Number)
|
|
49
|
-
], RequestStatus.prototype, "visible_to", void 0);
|
|
50
|
-
__decorate([
|
|
51
|
-
(0, typeorm_1.Column)({
|
|
52
|
-
default: 1,
|
|
53
|
-
comment: 'Valida si el estado es visible para agregar al pedido:\r\n1. Activo.\r\n0. Inactivo.',
|
|
54
|
-
}),
|
|
55
|
-
__metadata("design:type", Number)
|
|
56
|
-
], RequestStatus.prototype, "status", void 0);
|
|
57
|
-
__decorate([
|
|
58
|
-
(0, typeorm_1.OneToMany)(function () { return Request_1.Request; }, function (request) { return request.status; }),
|
|
59
|
-
__metadata("design:type", Array)
|
|
60
|
-
], RequestStatus.prototype, "requests", void 0);
|
|
61
|
-
RequestStatus = __decorate([
|
|
62
|
-
(0, typeorm_1.Entity)('request_status', {
|
|
63
|
-
comment: 'Acá se podrán agregar los estados que puede tener un pedido, es decir:\r\n\r\n0. Por ordenar (0): Es cuando el usuario agrega los productos al carrito de compras pero aún no realiza la orden.\r\n\r\n1. En espera del cliente (local) cuando el pago ya fue realizado exitosamente (1): Indica que la orden ya fue recibida y está en proceso de verificación.\r\n\r\n2. En espera del usuario (2): Indica que el usuario realizó el pedido y desea cancelarlo en efectivo, en este caso, se genera un código QR/BARCODE donde se puede acercar a la caja del local y pagar el valor del pedido. Cuando el usuario paga se pasa a estado (1), acá el cliente (local/company) puede decir el tiempo de espera máxima para que el cliente se levante a realizar el pago, de lo contrario la orden se cancelará automáticamente.\r\n\r\n3. En proceso (3): Indica que la orden/pedido fue recibid@ y se está preparando.\r\n\r\n4. Listo para servir (4): Indica que la orden ya se preparó y se está a la espera del usuario para entregar.\r\n\r\n5. Entregado/servido (5): Indica que el usuario ya reclamó la orden.\r\n\r\n6. Cancelado (6): Cuando un pedido se marca como "cancelado", significa que la orden ha sido anulada o eliminada del sistema antes de ser procesada o entregada. Esto puede deberse a una solicitud del cliente para cancelar el pedido, a que el pedido no se pueda completar por algún motivo o a una decisión interna del negocio de no procesar el pedido.\r\n\r\n7. Devolución (7): El estado "devolución" se aplica a un pedido que ha sido entregado o completado, pero que por algún motivo el cliente ha devuelto total o parcialmente. Esto podría ser debido a que el producto estaba defectuoso, no era lo que esperaba o por cualquier otra razón por la que el cliente haya solicitado devolver parte o la totalidad del pedido.',
|
|
64
|
-
})
|
|
65
|
-
], RequestStatus);
|
|
66
|
-
return RequestStatus;
|
|
67
|
-
}());
|
|
68
|
-
exports.RequestStatus = RequestStatus;
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { Local } from "./Local";
|
|
2
|
-
import { Partner } from "./Partner";
|
|
3
|
-
import { TerminalSession } from "./TerminalSession";
|
|
4
|
-
export declare class Terminal {
|
|
5
|
-
id: number;
|
|
6
|
-
local: Local;
|
|
7
|
-
name: string;
|
|
8
|
-
settings: string;
|
|
9
|
-
status: number;
|
|
10
|
-
partners: Partner[];
|
|
11
|
-
terminalsUser: TerminalSession[];
|
|
12
|
-
}
|
|
@@ -1,80 +0,0 @@
|
|
|
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.Terminal = void 0;
|
|
13
|
-
var typeorm_1 = require("typeorm");
|
|
14
|
-
var Local_1 = require("./Local");
|
|
15
|
-
var Partner_1 = require("./Partner");
|
|
16
|
-
var TerminalSession_1 = require("./TerminalSession");
|
|
17
|
-
var Terminal = /** @class */ (function () {
|
|
18
|
-
function Terminal() {
|
|
19
|
-
}
|
|
20
|
-
__decorate([
|
|
21
|
-
(0, typeorm_1.PrimaryGeneratedColumn)({
|
|
22
|
-
comment: "Número de identificación (ID) único de cada registro.",
|
|
23
|
-
}),
|
|
24
|
-
__metadata("design:type", Number)
|
|
25
|
-
], Terminal.prototype, "id", void 0);
|
|
26
|
-
__decorate([
|
|
27
|
-
(0, typeorm_1.ManyToOne)(function () { return Local_1.Local; }, function (local) { return local.terminals; }, {
|
|
28
|
-
nullable: true,
|
|
29
|
-
onDelete: "CASCADE",
|
|
30
|
-
onUpdate: "NO ACTION",
|
|
31
|
-
}),
|
|
32
|
-
(0, typeorm_1.JoinColumn)({ name: "local" }),
|
|
33
|
-
__metadata("design:type", Local_1.Local)
|
|
34
|
-
], Terminal.prototype, "local", void 0);
|
|
35
|
-
__decorate([
|
|
36
|
-
(0, typeorm_1.Column)({ length: 50, comment: "Nombre de la terminal." }),
|
|
37
|
-
__metadata("design:type", String)
|
|
38
|
-
], Terminal.prototype, "name", void 0);
|
|
39
|
-
__decorate([
|
|
40
|
-
(0, typeorm_1.Column)({
|
|
41
|
-
type: "longtext",
|
|
42
|
-
nullable: true,
|
|
43
|
-
comment: "Campo de tipo JSON donde se guarda información necesaria para la terminal si es necesario",
|
|
44
|
-
}),
|
|
45
|
-
__metadata("design:type", String)
|
|
46
|
-
], Terminal.prototype, "settings", void 0);
|
|
47
|
-
__decorate([
|
|
48
|
-
(0, typeorm_1.Column)({
|
|
49
|
-
default: 1,
|
|
50
|
-
comment: "Estado del registro, es decir:\r\n1. Activo: Es visible en la plataforma.\r\n0. Inactivo: No será visible en la plataforma.",
|
|
51
|
-
}),
|
|
52
|
-
__metadata("design:type", Number)
|
|
53
|
-
], Terminal.prototype, "status", void 0);
|
|
54
|
-
__decorate([
|
|
55
|
-
(0, typeorm_1.ManyToMany)(function () { return Partner_1.Partner; }, function (partner) { return partner.terminals; }),
|
|
56
|
-
(0, typeorm_1.JoinTable)({
|
|
57
|
-
name: "partner_terminal",
|
|
58
|
-
joinColumn: {
|
|
59
|
-
name: "terminal",
|
|
60
|
-
referencedColumnName: "id",
|
|
61
|
-
},
|
|
62
|
-
inverseJoinColumn: {
|
|
63
|
-
name: "partner",
|
|
64
|
-
referencedColumnName: "id",
|
|
65
|
-
},
|
|
66
|
-
}),
|
|
67
|
-
__metadata("design:type", Array)
|
|
68
|
-
], Terminal.prototype, "partners", void 0);
|
|
69
|
-
__decorate([
|
|
70
|
-
(0, typeorm_1.OneToMany)(function () { return TerminalSession_1.TerminalSession; }, function (terminalsUser) { return terminalsUser.terminal; }),
|
|
71
|
-
__metadata("design:type", Array)
|
|
72
|
-
], Terminal.prototype, "terminalsUser", void 0);
|
|
73
|
-
Terminal = __decorate([
|
|
74
|
-
(0, typeorm_1.Entity)({
|
|
75
|
-
comment: "Tabla creada para asignar terminales a los computadores que estén en un local y así poder recibir pedidos.",
|
|
76
|
-
})
|
|
77
|
-
], Terminal);
|
|
78
|
-
return Terminal;
|
|
79
|
-
}());
|
|
80
|
-
exports.Terminal = Terminal;
|
|
@@ -1,71 +0,0 @@
|
|
|
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.TerminalSession = void 0;
|
|
13
|
-
var typeorm_1 = require("typeorm");
|
|
14
|
-
var Terminal_1 = require("./Terminal");
|
|
15
|
-
var Partner_1 = require("./Partner");
|
|
16
|
-
var TerminalSession = /** @class */ (function () {
|
|
17
|
-
function TerminalSession() {
|
|
18
|
-
}
|
|
19
|
-
__decorate([
|
|
20
|
-
(0, typeorm_1.PrimaryGeneratedColumn)({
|
|
21
|
-
comment: 'Número de identificación (ID) único de cada registro.',
|
|
22
|
-
}),
|
|
23
|
-
__metadata("design:type", Number)
|
|
24
|
-
], TerminalSession.prototype, "id", void 0);
|
|
25
|
-
__decorate([
|
|
26
|
-
(0, typeorm_1.ManyToOne)(function () { return Partner_1.Partner; }, function (partner) { return partner.sessions; }, {
|
|
27
|
-
nullable: true,
|
|
28
|
-
onDelete: 'CASCADE',
|
|
29
|
-
onUpdate: 'NO ACTION',
|
|
30
|
-
}),
|
|
31
|
-
(0, typeorm_1.JoinColumn)({ name: 'user' }),
|
|
32
|
-
__metadata("design:type", Partner_1.Partner)
|
|
33
|
-
], TerminalSession.prototype, "partner", void 0);
|
|
34
|
-
__decorate([
|
|
35
|
-
(0, typeorm_1.ManyToOne)(function () { return Terminal_1.Terminal; }, function (terminal) { return terminal.terminalsUser; }, {
|
|
36
|
-
nullable: true,
|
|
37
|
-
onDelete: 'CASCADE',
|
|
38
|
-
onUpdate: 'NO ACTION',
|
|
39
|
-
}),
|
|
40
|
-
(0, typeorm_1.JoinColumn)({ name: 'terminal' }),
|
|
41
|
-
__metadata("design:type", Terminal_1.Terminal)
|
|
42
|
-
], TerminalSession.prototype, "terminal", void 0);
|
|
43
|
-
__decorate([
|
|
44
|
-
(0, typeorm_1.Column)({
|
|
45
|
-
type: 'datetime',
|
|
46
|
-
comment: 'Fecha de inicio de sesión en la terminal.',
|
|
47
|
-
}),
|
|
48
|
-
__metadata("design:type", Date)
|
|
49
|
-
], TerminalSession.prototype, "open", void 0);
|
|
50
|
-
__decorate([
|
|
51
|
-
(0, typeorm_1.Column)({
|
|
52
|
-
type: 'datetime',
|
|
53
|
-
comment: 'Fecha de finalización de la sesión en la terminal.',
|
|
54
|
-
}),
|
|
55
|
-
__metadata("design:type", Date)
|
|
56
|
-
], TerminalSession.prototype, "close", void 0);
|
|
57
|
-
__decorate([
|
|
58
|
-
(0, typeorm_1.Column)({
|
|
59
|
-
default: 1,
|
|
60
|
-
comment: 'Se valida si la sesión está abierta o cerrada:\r\n1. Abierta.\r\n0. Cerrada.',
|
|
61
|
-
}),
|
|
62
|
-
__metadata("design:type", Number)
|
|
63
|
-
], TerminalSession.prototype, "status", void 0);
|
|
64
|
-
TerminalSession = __decorate([
|
|
65
|
-
(0, typeorm_1.Entity)('terminal_session', {
|
|
66
|
-
comment: 'Tabla creada para llevar el control de los inicios de sesión de los usuarios que tiene permiso de esa terminal.',
|
|
67
|
-
})
|
|
68
|
-
], TerminalSession);
|
|
69
|
-
return TerminalSession;
|
|
70
|
-
}());
|
|
71
|
-
exports.TerminalSession = TerminalSession;
|
|
@@ -1,74 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
-
});
|
|
10
|
-
};
|
|
11
|
-
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
12
|
-
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
13
|
-
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
14
|
-
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
15
|
-
function step(op) {
|
|
16
|
-
if (f) throw new TypeError("Generator is already executing.");
|
|
17
|
-
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
18
|
-
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
19
|
-
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
20
|
-
switch (op[0]) {
|
|
21
|
-
case 0: case 1: t = op; break;
|
|
22
|
-
case 4: _.label++; return { value: op[1], done: false };
|
|
23
|
-
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
24
|
-
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
25
|
-
default:
|
|
26
|
-
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
27
|
-
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
28
|
-
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
29
|
-
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
30
|
-
if (t[2]) _.ops.pop();
|
|
31
|
-
_.trys.pop(); continue;
|
|
32
|
-
}
|
|
33
|
-
op = body.call(thisArg, _);
|
|
34
|
-
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
35
|
-
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
36
|
-
}
|
|
37
|
-
};
|
|
38
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
-
exports.getFilteredLoginTerminalPartnerWithTerminalsQuery = void 0;
|
|
40
|
-
function getFilteredLoginTerminalPartnerWithTerminalsQuery(repository_1, _a) {
|
|
41
|
-
return __awaiter(this, arguments, void 0, function (repository, _b) {
|
|
42
|
-
var queryBuilder, result, error_1;
|
|
43
|
-
var user = _b.user;
|
|
44
|
-
return __generator(this, function (_c) {
|
|
45
|
-
switch (_c.label) {
|
|
46
|
-
case 0:
|
|
47
|
-
_c.trys.push([0, 2, , 3]);
|
|
48
|
-
queryBuilder = repository
|
|
49
|
-
.createQueryBuilder("partner")
|
|
50
|
-
.leftJoinAndSelect("partner.company", "company")
|
|
51
|
-
.leftJoinAndSelect("partner.city", "city")
|
|
52
|
-
.leftJoinAndSelect("city.region", "region")
|
|
53
|
-
.leftJoinAndSelect("region.country", "country")
|
|
54
|
-
.leftJoinAndSelect("partner.locals_partner", "local")
|
|
55
|
-
.leftJoinAndSelect("local.terminals", "terminal")
|
|
56
|
-
.leftJoinAndSelect("terminal.partners", "terminal_partner") // Asociamos las terminales con los partners
|
|
57
|
-
.where("partner.email = :email", { email: user })
|
|
58
|
-
.andWhere("partner.status = 1 AND partner.visible = 1") // Asegurar que el partner está activo
|
|
59
|
-
.andWhere("terminal_partner.id = partner.id") // Filtrar terminales donde el usuario es un partner
|
|
60
|
-
.orderBy("local.id", "ASC");
|
|
61
|
-
return [4 /*yield*/, queryBuilder.getOne()];
|
|
62
|
-
case 1:
|
|
63
|
-
result = _c.sent();
|
|
64
|
-
return [2 /*return*/, result];
|
|
65
|
-
case 2:
|
|
66
|
-
error_1 = _c.sent();
|
|
67
|
-
console.error("Error in getFilteredPartnersWithTerminalsQuery:", error_1);
|
|
68
|
-
return [2 /*return*/, null];
|
|
69
|
-
case 3: return [2 /*return*/];
|
|
70
|
-
}
|
|
71
|
-
});
|
|
72
|
-
});
|
|
73
|
-
}
|
|
74
|
-
exports.getFilteredLoginTerminalPartnerWithTerminalsQuery = getFilteredLoginTerminalPartnerWithTerminalsQuery;
|