easywork-common-lib 1.0.761 → 1.0.763
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/.gitattributes +2 -2
- package/.github/workflows/npm-publish.yml +33 -33
- package/.vscode/settings.json +12 -12
- package/dist/entities/capacitation/capacitation-lesson.entity copy.d.ts +7 -0
- package/dist/entities/capacitation/capacitation-lesson.entity copy.js +45 -0
- package/dist/entities/capacitation/capacitation-lesson.entity copy.js.map +1 -0
- package/dist/entities/capacitation/capacitation-module.entity.d.ts +12 -0
- package/dist/entities/capacitation/capacitation-module.entity.js +85 -0
- package/dist/entities/capacitation/capacitation-module.entity.js.map +1 -0
- package/dist/entities/capacitation/course-evaluation-progress.d.ts +20 -0
- package/dist/entities/capacitation/course-evaluation-progress.entity.d.ts +19 -0
- package/dist/entities/capacitation/course-evaluation-progress.entity.js +81 -0
- package/dist/entities/capacitation/course-evaluation-progress.entity.js.map +1 -0
- package/dist/entities/capacitation/course-evaluation-progress.js +81 -0
- package/dist/entities/capacitation/course-evaluation-progress.js.map +1 -0
- package/dist/entities/capacitation/course-evaluation-question.d.ts +11 -0
- package/dist/entities/capacitation/course-evaluation-question.js +46 -0
- package/dist/entities/capacitation/course-evaluation-question.js.map +1 -0
- package/dist/entities/capacitation/course-progress.entity.d.ts +14 -0
- package/dist/entities/capacitation/course-progress.entity.js +53 -0
- package/dist/entities/capacitation/course-progress.entity.js.map +1 -0
- package/dist/entities/capacitation/folder-page.entity.d.ts +11 -0
- package/dist/entities/capacitation/folder-page.entity.js +57 -0
- package/dist/entities/capacitation/folder-page.entity.js.map +1 -0
- package/dist/entities/capacitation/lesson-page.entity.d.ts +13 -0
- package/dist/entities/capacitation/lesson-page.entity.js +69 -0
- package/dist/entities/capacitation/lesson-page.entity.js.map +1 -0
- package/dist/entities/capacitation/lesson-section.entity.d.ts +10 -0
- package/dist/entities/capacitation/lesson-section.entity.js +57 -0
- package/dist/entities/capacitation/lesson-section.entity.js.map +1 -0
- package/dist/entities/capacitation/lesson.entity.d.ts +15 -0
- package/dist/entities/capacitation/lesson.entity.js +77 -0
- package/dist/entities/capacitation/lesson.entity.js.map +1 -0
- package/dist/entities/sales/poliza_pdf.entity.js +1 -1
- package/dist/entities/sales/poliza_pdf.entity.js.map +1 -1
- package/dist/entities/sales/poliza_siniestro.entity.d.ts +12 -0
- package/dist/entities/sales/poliza_siniestro.entity.js +72 -0
- package/dist/entities/sales/poliza_siniestro.entity.js.map +1 -0
- package/dist/entities/user-invitations.entity.d.ts +3 -0
- package/dist/entities/user-invitations.entity.js +30 -0
- package/dist/entities/user-invitations.entity.js.map +1 -1
- package/dist/grpc/drive/drive.proto +260 -260
- package/dist/grpc/drive/leads.proto +114 -114
- package/justfile +8 -8
- package/package.json +46 -46
- package/scripts/bump.sh +8 -8
- package/test.bat +15 -15
- package/tsconfig.build.json +4 -4
- package/tsconfig.json +25 -25
- package/tsconfig.tsbuildinfo +1 -1
package/.gitattributes
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
# Auto detect text files and perform LF normalization
|
|
2
|
-
* text=auto
|
|
1
|
+
# Auto detect text files and perform LF normalization
|
|
2
|
+
* text=auto
|
|
@@ -1,33 +1,33 @@
|
|
|
1
|
-
# This workflow will run tests using node and then publish a package to GitHub Packages when a release is created
|
|
2
|
-
# For more information see: https://docs.github.com/en/actions/publishing-packages/publishing-nodejs-packages
|
|
3
|
-
|
|
4
|
-
name: Node.js Package
|
|
5
|
-
|
|
6
|
-
on:
|
|
7
|
-
release:
|
|
8
|
-
types: [created]
|
|
9
|
-
|
|
10
|
-
jobs:
|
|
11
|
-
build:
|
|
12
|
-
runs-on: ubuntu-latest
|
|
13
|
-
steps:
|
|
14
|
-
- uses: actions/checkout@v4
|
|
15
|
-
- uses: actions/setup-node@v4
|
|
16
|
-
with:
|
|
17
|
-
node-version: 20
|
|
18
|
-
- run: npm ci
|
|
19
|
-
- run: npm test
|
|
20
|
-
|
|
21
|
-
publish-npm:
|
|
22
|
-
needs: build
|
|
23
|
-
runs-on: ubuntu-latest
|
|
24
|
-
steps:
|
|
25
|
-
- uses: actions/checkout@v4
|
|
26
|
-
- uses: actions/setup-node@v4
|
|
27
|
-
with:
|
|
28
|
-
node-version: 20
|
|
29
|
-
registry-url: https://registry.npmjs.org/
|
|
30
|
-
- run: npm ci
|
|
31
|
-
- run: npm publish
|
|
32
|
-
env:
|
|
33
|
-
NODE_AUTH_TOKEN: ${{secrets.npm_token}}
|
|
1
|
+
# This workflow will run tests using node and then publish a package to GitHub Packages when a release is created
|
|
2
|
+
# For more information see: https://docs.github.com/en/actions/publishing-packages/publishing-nodejs-packages
|
|
3
|
+
|
|
4
|
+
name: Node.js Package
|
|
5
|
+
|
|
6
|
+
on:
|
|
7
|
+
release:
|
|
8
|
+
types: [created]
|
|
9
|
+
|
|
10
|
+
jobs:
|
|
11
|
+
build:
|
|
12
|
+
runs-on: ubuntu-latest
|
|
13
|
+
steps:
|
|
14
|
+
- uses: actions/checkout@v4
|
|
15
|
+
- uses: actions/setup-node@v4
|
|
16
|
+
with:
|
|
17
|
+
node-version: 20
|
|
18
|
+
- run: npm ci
|
|
19
|
+
- run: npm test
|
|
20
|
+
|
|
21
|
+
publish-npm:
|
|
22
|
+
needs: build
|
|
23
|
+
runs-on: ubuntu-latest
|
|
24
|
+
steps:
|
|
25
|
+
- uses: actions/checkout@v4
|
|
26
|
+
- uses: actions/setup-node@v4
|
|
27
|
+
with:
|
|
28
|
+
node-version: 20
|
|
29
|
+
registry-url: https://registry.npmjs.org/
|
|
30
|
+
- run: npm ci
|
|
31
|
+
- run: npm publish
|
|
32
|
+
env:
|
|
33
|
+
NODE_AUTH_TOKEN: ${{secrets.npm_token}}
|
package/.vscode/settings.json
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
{
|
|
2
|
-
"autoBarrel.language.defaultLanguage": "TypeScript",
|
|
3
|
-
"autoBarrel.files.disableRecursiveBarrelling": false,
|
|
4
|
-
"autoBarrel.files.includeExtensionOnExport": ["ts", "tsx", "vue"],
|
|
5
|
-
"autoBarrel.files.ignoreFilePathPatternOnExport": ["**/*.spec.*", "**/*.test.*"],
|
|
6
|
-
"autoBarrel.files.keepExtensionOnExport": false,
|
|
7
|
-
"autoBarrel.files.detectExportsInFiles": false,
|
|
8
|
-
"autoBarrel.files.exportDefaultFilename": "filename",
|
|
9
|
-
"autoBarrel.formatting.excludeSemiColonAtEndOfLine": false,
|
|
10
|
-
"autoBarrel.formatting.useSingleQuotes": true,
|
|
11
|
-
"autoBarrel.formatting.endOfLine": "lf",
|
|
12
|
-
"autoBarrel.formatting.insertFinalNewline": true,
|
|
1
|
+
{
|
|
2
|
+
"autoBarrel.language.defaultLanguage": "TypeScript",
|
|
3
|
+
"autoBarrel.files.disableRecursiveBarrelling": false,
|
|
4
|
+
"autoBarrel.files.includeExtensionOnExport": ["ts", "tsx", "vue"],
|
|
5
|
+
"autoBarrel.files.ignoreFilePathPatternOnExport": ["**/*.spec.*", "**/*.test.*"],
|
|
6
|
+
"autoBarrel.files.keepExtensionOnExport": false,
|
|
7
|
+
"autoBarrel.files.detectExportsInFiles": false,
|
|
8
|
+
"autoBarrel.files.exportDefaultFilename": "filename",
|
|
9
|
+
"autoBarrel.formatting.excludeSemiColonAtEndOfLine": false,
|
|
10
|
+
"autoBarrel.formatting.useSingleQuotes": true,
|
|
11
|
+
"autoBarrel.formatting.endOfLine": "lf",
|
|
12
|
+
"autoBarrel.formatting.insertFinalNewline": true,
|
|
13
13
|
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { EntityBase } from '../../common/database/base.entity';
|
|
2
|
+
import { CapacitationModule } from './capacitation-module.entity';
|
|
3
|
+
export declare class CapacitationLesson extends EntityBase {
|
|
4
|
+
title: string;
|
|
5
|
+
iCompleted: boolean;
|
|
6
|
+
module?: CapacitationModule;
|
|
7
|
+
}
|
|
@@ -0,0 +1,45 @@
|
|
|
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.CapacitationLesson = void 0;
|
|
13
|
+
const typeorm_1 = require("typeorm");
|
|
14
|
+
const swagger_1 = require("@nestjs/swagger");
|
|
15
|
+
const base_entity_1 = require("../../common/database/base.entity");
|
|
16
|
+
const capacitation_module_entity_1 = require("./capacitation-module.entity");
|
|
17
|
+
let CapacitationLesson = class CapacitationLesson extends base_entity_1.EntityBase {
|
|
18
|
+
title;
|
|
19
|
+
iCompleted;
|
|
20
|
+
module;
|
|
21
|
+
};
|
|
22
|
+
exports.CapacitationLesson = CapacitationLesson;
|
|
23
|
+
__decorate([
|
|
24
|
+
(0, swagger_1.ApiProperty)({ type: String, description: 'Lesson name' }),
|
|
25
|
+
(0, typeorm_1.Column)({ type: 'string' }),
|
|
26
|
+
__metadata("design:type", String)
|
|
27
|
+
], CapacitationLesson.prototype, "title", void 0);
|
|
28
|
+
__decorate([
|
|
29
|
+
(0, typeorm_1.Column)({ default: false }),
|
|
30
|
+
__metadata("design:type", Boolean)
|
|
31
|
+
], CapacitationLesson.prototype, "iCompleted", void 0);
|
|
32
|
+
__decorate([
|
|
33
|
+
(0, swagger_1.ApiProperty)({ type: () => capacitation_module_entity_1.CapacitationModule, description: 'Module owner of the lesson', required: false }),
|
|
34
|
+
(0, typeorm_1.ManyToOne)(() => capacitation_module_entity_1.CapacitationModule, {
|
|
35
|
+
onDelete: 'SET NULL',
|
|
36
|
+
onUpdate: 'CASCADE',
|
|
37
|
+
nullable: false,
|
|
38
|
+
}),
|
|
39
|
+
(0, typeorm_1.JoinColumn)(),
|
|
40
|
+
__metadata("design:type", capacitation_module_entity_1.CapacitationModule)
|
|
41
|
+
], CapacitationLesson.prototype, "module", void 0);
|
|
42
|
+
exports.CapacitationLesson = CapacitationLesson = __decorate([
|
|
43
|
+
(0, typeorm_1.Entity)()
|
|
44
|
+
], CapacitationLesson);
|
|
45
|
+
//# sourceMappingURL=capacitation-lesson.entity%20copy.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"capacitation-lesson.entity copy.js","sourceRoot":"","sources":["../../../src/entities/capacitation/capacitation-lesson.entity copy.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qCAAgE;AAChE,6CAA8C;AAE9C,mEAA+D;AAC/D,6EAAkE;AAG3D,IAAM,kBAAkB,GAAxB,MAAM,kBAAmB,SAAQ,wBAAU;IAGhD,KAAK,CAAS;IAGd,UAAU,CAAU;IASpB,MAAM,CAAsB;CAC7B,CAAA;AAhBY,gDAAkB;AAG7B;IAFC,IAAA,qBAAW,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,WAAW,EAAE,aAAa,EAAE,CAAC;IACzD,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,CAAC;;iDACb;AAGd;IADC,IAAA,gBAAM,EAAC,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC;;sDACP;AASpB;IAPC,IAAA,qBAAW,EAAC,EAAE,IAAI,EAAE,GAAG,EAAE,CAAC,+CAAkB,EAAE,WAAW,EAAE,4BAA4B,EAAE,QAAQ,EAAE,KAAK,EAAE,CAAC;IAC3G,IAAA,mBAAS,EAAC,GAAG,EAAE,CAAC,+CAAkB,EAAE;QACnC,QAAQ,EAAE,UAAU;QACpB,QAAQ,EAAE,SAAS;QACnB,QAAQ,EAAE,KAAK;KAChB,CAAC;IACD,IAAA,oBAAU,GAAE;8BACJ,+CAAkB;kDAAC;6BAfjB,kBAAkB;IAD9B,IAAA,gBAAM,GAAE;GACI,kBAAkB,CAgB9B"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { EntityBase } from '../../common/database/base.entity';
|
|
2
|
+
import { User } from '../user.entity';
|
|
3
|
+
import { Group } from '../group.entity';
|
|
4
|
+
export declare class CapacitationModule extends EntityBase {
|
|
5
|
+
name: string;
|
|
6
|
+
description?: string;
|
|
7
|
+
progress: string;
|
|
8
|
+
endDate?: Date;
|
|
9
|
+
isProcessClosed: boolean;
|
|
10
|
+
assignedTo?: Group[];
|
|
11
|
+
responsible?: User;
|
|
12
|
+
}
|
|
@@ -0,0 +1,85 @@
|
|
|
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.CapacitationModule = void 0;
|
|
13
|
+
const typeorm_1 = require("typeorm");
|
|
14
|
+
const swagger_1 = require("@nestjs/swagger");
|
|
15
|
+
const base_entity_1 = require("../../common/database/base.entity");
|
|
16
|
+
const user_entity_1 = require("../user.entity");
|
|
17
|
+
const group_entity_1 = require("../group.entity");
|
|
18
|
+
let CapacitationModule = class CapacitationModule extends base_entity_1.EntityBase {
|
|
19
|
+
name;
|
|
20
|
+
description;
|
|
21
|
+
progress;
|
|
22
|
+
endDate;
|
|
23
|
+
isProcessClosed;
|
|
24
|
+
assignedTo;
|
|
25
|
+
responsible;
|
|
26
|
+
};
|
|
27
|
+
exports.CapacitationModule = CapacitationModule;
|
|
28
|
+
__decorate([
|
|
29
|
+
(0, swagger_1.ApiProperty)({
|
|
30
|
+
type: String,
|
|
31
|
+
description: 'Module name',
|
|
32
|
+
required: true,
|
|
33
|
+
}),
|
|
34
|
+
(0, typeorm_1.Column)({ length: 150, nullable: false }),
|
|
35
|
+
__metadata("design:type", String)
|
|
36
|
+
], CapacitationModule.prototype, "name", void 0);
|
|
37
|
+
__decorate([
|
|
38
|
+
(0, swagger_1.ApiProperty)({
|
|
39
|
+
type: String,
|
|
40
|
+
description: 'Module description',
|
|
41
|
+
required: false,
|
|
42
|
+
}),
|
|
43
|
+
(0, typeorm_1.Column)({ type: 'text', nullable: true }),
|
|
44
|
+
__metadata("design:type", String)
|
|
45
|
+
], CapacitationModule.prototype, "description", void 0);
|
|
46
|
+
__decorate([
|
|
47
|
+
(0, swagger_1.ApiProperty)({ type: String, description: 'Capacitation module progress' }),
|
|
48
|
+
(0, typeorm_1.Column)({ type: 'float', default: 0 }),
|
|
49
|
+
__metadata("design:type", String)
|
|
50
|
+
], CapacitationModule.prototype, "progress", void 0);
|
|
51
|
+
__decorate([
|
|
52
|
+
(0, swagger_1.ApiProperty)({ type: Date, description: 'Capacitation process ends at this date' }),
|
|
53
|
+
(0, typeorm_1.Column)({ type: 'date' }),
|
|
54
|
+
__metadata("design:type", Date)
|
|
55
|
+
], CapacitationModule.prototype, "endDate", void 0);
|
|
56
|
+
__decorate([
|
|
57
|
+
(0, typeorm_1.Column)({ default: false }),
|
|
58
|
+
__metadata("design:type", Boolean)
|
|
59
|
+
], CapacitationModule.prototype, "isProcessClosed", void 0);
|
|
60
|
+
__decorate([
|
|
61
|
+
(0, swagger_1.ApiProperty)({
|
|
62
|
+
type: () => group_entity_1.Group,
|
|
63
|
+
description: 'Groups assigned to the module',
|
|
64
|
+
}),
|
|
65
|
+
(0, typeorm_1.ManyToOne)(() => group_entity_1.Group, {
|
|
66
|
+
onDelete: 'CASCADE',
|
|
67
|
+
onUpdate: 'CASCADE',
|
|
68
|
+
}),
|
|
69
|
+
(0, typeorm_1.JoinColumn)(),
|
|
70
|
+
__metadata("design:type", Array)
|
|
71
|
+
], CapacitationModule.prototype, "assignedTo", void 0);
|
|
72
|
+
__decorate([
|
|
73
|
+
(0, swagger_1.ApiProperty)({ type: () => user_entity_1.User, description: 'User responsible for capacitation tracking and management', required: false }),
|
|
74
|
+
(0, typeorm_1.ManyToOne)(() => user_entity_1.User, {
|
|
75
|
+
onDelete: 'SET NULL',
|
|
76
|
+
onUpdate: 'CASCADE',
|
|
77
|
+
nullable: true,
|
|
78
|
+
}),
|
|
79
|
+
(0, typeorm_1.JoinColumn)(),
|
|
80
|
+
__metadata("design:type", user_entity_1.User)
|
|
81
|
+
], CapacitationModule.prototype, "responsible", void 0);
|
|
82
|
+
exports.CapacitationModule = CapacitationModule = __decorate([
|
|
83
|
+
(0, typeorm_1.Entity)()
|
|
84
|
+
], CapacitationModule);
|
|
85
|
+
//# sourceMappingURL=capacitation-module.entity.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"capacitation-module.entity.js","sourceRoot":"","sources":["../../../src/entities/capacitation/capacitation-module.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qCAAgE;AAChE,6CAA8C;AAE9C,mEAA+D;AAC/D,gDAAsC;AACtC,kDAAwC;AAGjC,IAAM,kBAAkB,GAAxB,MAAM,kBAAmB,SAAQ,wBAAU;IAOhD,IAAI,CAA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,CAAC;IACD,IAAA,oBAAU,GAAE;;sDACQ;AASrB;IAPC,IAAA,qBAAW,EAAC,EAAE,IAAI,EAAE,GAAG,EAAE,CAAC,kBAAI,EAAE,WAAW,EAAE,2DAA2D,EAAE,QAAQ,EAAE,KAAK,EAAE,CAAC;IAC5H,IAAA,mBAAS,EAAC,GAAG,EAAE,CAAC,kBAAI,EAAE;QACrB,QAAQ,EAAE,UAAU;QACpB,QAAQ,EAAE,SAAS;QACnB,QAAQ,EAAE,IAAI;KACf,CAAC;IACD,IAAA,oBAAU,GAAE;8BACC,kBAAI;uDAAC;6BAvDR,kBAAkB;IAD9B,IAAA,gBAAM,GAAE;GACI,kBAAkB,CAwD9B"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { EntityBase } from '../../common/database/base.entity';
|
|
2
|
+
import { CourseEvaluation } from './course-evaluation.entity';
|
|
3
|
+
import { User } from 'entities/user.entity';
|
|
4
|
+
declare enum ProgressStatus {
|
|
5
|
+
inProgress = "in-progress",
|
|
6
|
+
approved = "approved",
|
|
7
|
+
notPassed = "not-passed",
|
|
8
|
+
notStarted = "not-started"
|
|
9
|
+
}
|
|
10
|
+
export declare class CourseEvaluationProgress extends EntityBase {
|
|
11
|
+
status: ProgressStatus;
|
|
12
|
+
attempt: number;
|
|
13
|
+
finishedAt?: Date;
|
|
14
|
+
startedAt?: Date;
|
|
15
|
+
qualification: number;
|
|
16
|
+
timeTaken: number;
|
|
17
|
+
evaluation: CourseEvaluation;
|
|
18
|
+
tookBy: User;
|
|
19
|
+
}
|
|
20
|
+
export {};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { EntityBase } from '../../common/database/base.entity';
|
|
2
|
+
import { CourseEvaluation } from './course-evaluation.entity';
|
|
3
|
+
import { User } from '../user.entity';
|
|
4
|
+
export declare enum CourseEvaluationProgressStatus {
|
|
5
|
+
inProgress = "in-progress",
|
|
6
|
+
approved = "approved",
|
|
7
|
+
notPassed = "not-passed",
|
|
8
|
+
notStarted = "not-started"
|
|
9
|
+
}
|
|
10
|
+
export declare class CourseEvaluationProgress extends EntityBase {
|
|
11
|
+
status: CourseEvaluationProgressStatus;
|
|
12
|
+
attempt: number;
|
|
13
|
+
finishedAt?: Date;
|
|
14
|
+
startedAt?: Date;
|
|
15
|
+
qualification: number;
|
|
16
|
+
timeTaken: number;
|
|
17
|
+
evaluation: CourseEvaluation;
|
|
18
|
+
tookBy: User;
|
|
19
|
+
}
|
|
@@ -0,0 +1,81 @@
|
|
|
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.CourseEvaluationProgress = exports.CourseEvaluationProgressStatus = void 0;
|
|
13
|
+
const typeorm_1 = require("typeorm");
|
|
14
|
+
const swagger_1 = require("@nestjs/swagger");
|
|
15
|
+
const base_entity_1 = require("../../common/database/base.entity");
|
|
16
|
+
const course_evaluation_entity_1 = require("./course-evaluation.entity");
|
|
17
|
+
const user_entity_1 = require("../user.entity");
|
|
18
|
+
var CourseEvaluationProgressStatus;
|
|
19
|
+
(function (CourseEvaluationProgressStatus) {
|
|
20
|
+
CourseEvaluationProgressStatus["inProgress"] = "in-progress";
|
|
21
|
+
CourseEvaluationProgressStatus["approved"] = "approved";
|
|
22
|
+
CourseEvaluationProgressStatus["notPassed"] = "not-passed";
|
|
23
|
+
CourseEvaluationProgressStatus["notStarted"] = "not-started";
|
|
24
|
+
})(CourseEvaluationProgressStatus || (exports.CourseEvaluationProgressStatus = CourseEvaluationProgressStatus = {}));
|
|
25
|
+
let CourseEvaluationProgress = class CourseEvaluationProgress extends base_entity_1.EntityBase {
|
|
26
|
+
status;
|
|
27
|
+
attempt;
|
|
28
|
+
finishedAt;
|
|
29
|
+
startedAt;
|
|
30
|
+
qualification;
|
|
31
|
+
timeTaken;
|
|
32
|
+
evaluation;
|
|
33
|
+
tookBy;
|
|
34
|
+
};
|
|
35
|
+
exports.CourseEvaluationProgress = CourseEvaluationProgress;
|
|
36
|
+
__decorate([
|
|
37
|
+
(0, typeorm_1.Column)({ type: 'enum', nullable: false, default: CourseEvaluationProgressStatus.notStarted, enum: CourseEvaluationProgressStatus }),
|
|
38
|
+
__metadata("design:type", String)
|
|
39
|
+
], CourseEvaluationProgress.prototype, "status", void 0);
|
|
40
|
+
__decorate([
|
|
41
|
+
(0, typeorm_1.Column)({ type: 'int', nullable: false }),
|
|
42
|
+
__metadata("design:type", Number)
|
|
43
|
+
], CourseEvaluationProgress.prototype, "attempt", void 0);
|
|
44
|
+
__decorate([
|
|
45
|
+
(0, typeorm_1.Column)({ type: 'date', nullable: true }),
|
|
46
|
+
__metadata("design:type", Date)
|
|
47
|
+
], CourseEvaluationProgress.prototype, "finishedAt", void 0);
|
|
48
|
+
__decorate([
|
|
49
|
+
(0, typeorm_1.Column)({ type: 'date', nullable: true }),
|
|
50
|
+
__metadata("design:type", Date)
|
|
51
|
+
], CourseEvaluationProgress.prototype, "startedAt", void 0);
|
|
52
|
+
__decorate([
|
|
53
|
+
(0, typeorm_1.Column)({ type: 'numeric', nullable: false, scale: 2, default: 0 }),
|
|
54
|
+
__metadata("design:type", Number)
|
|
55
|
+
], CourseEvaluationProgress.prototype, "qualification", void 0);
|
|
56
|
+
__decorate([
|
|
57
|
+
(0, typeorm_1.Column)({ type: 'numeric', nullable: false, default: 60, scale: 2 }),
|
|
58
|
+
__metadata("design:type", Number)
|
|
59
|
+
], CourseEvaluationProgress.prototype, "timeTaken", void 0);
|
|
60
|
+
__decorate([
|
|
61
|
+
(0, swagger_1.ApiProperty)({
|
|
62
|
+
type: () => course_evaluation_entity_1.CourseEvaluation,
|
|
63
|
+
description: 'Evaluation progress parent entity',
|
|
64
|
+
required: false,
|
|
65
|
+
}),
|
|
66
|
+
(0, typeorm_1.ManyToOne)(() => course_evaluation_entity_1.CourseEvaluation),
|
|
67
|
+
__metadata("design:type", course_evaluation_entity_1.CourseEvaluation)
|
|
68
|
+
], CourseEvaluationProgress.prototype, "evaluation", void 0);
|
|
69
|
+
__decorate([
|
|
70
|
+
(0, swagger_1.ApiProperty)({
|
|
71
|
+
type: () => user_entity_1.User,
|
|
72
|
+
description: 'User who takes the evaluation',
|
|
73
|
+
required: false,
|
|
74
|
+
}),
|
|
75
|
+
(0, typeorm_1.ManyToOne)(() => user_entity_1.User),
|
|
76
|
+
__metadata("design:type", user_entity_1.User)
|
|
77
|
+
], CourseEvaluationProgress.prototype, "tookBy", void 0);
|
|
78
|
+
exports.CourseEvaluationProgress = CourseEvaluationProgress = __decorate([
|
|
79
|
+
(0, typeorm_1.Entity)()
|
|
80
|
+
], CourseEvaluationProgress);
|
|
81
|
+
//# sourceMappingURL=course-evaluation-progress.entity.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"course-evaluation-progress.entity.js","sourceRoot":"","sources":["../../../src/entities/capacitation/course-evaluation-progress.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qCAAoD;AACpD,6CAA8C;AAE9C,mEAA+D;AAC/D,yEAA8D;AAC9D,gDAAsC;AAEtC,IAAY,8BAKX;AALD,WAAY,8BAA8B;IACxC,4DAA0B,CAAA;IAC1B,uDAAqB,CAAA;IACrB,0DAAwB,CAAA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,KAAK;KAChB,CAAC;IACD,IAAA,mBAAS,EAAC,GAAG,EAAE,CAAC,2CAAgB,CAAC;8BACtB,2CAAgB;4DAAC;AAQ7B;IANC,IAAA,qBAAW,EAAC;QACX,IAAI,EAAE,GAAG,EAAE,CAAC,kBAAI;QAChB,WAAW,EAAE,+BAA+B;QAC5C,QAAQ,EAAE,KAAK;KAChB,CAAC;IACD,IAAA,mBAAS,EAAC,GAAG,EAAE,CAAC,kBAAI,CAAC;8BACd,kBAAI;wDAAC;mCAjCF,wBAAwB;IADpC,IAAA,gBAAM,GAAE;GACI,wBAAwB,CAkCpC"}
|
|
@@ -0,0 +1,81 @@
|
|
|
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.CourseEvaluationProgress = void 0;
|
|
13
|
+
const typeorm_1 = require("typeorm");
|
|
14
|
+
const swagger_1 = require("@nestjs/swagger");
|
|
15
|
+
const base_entity_1 = require("../../common/database/base.entity");
|
|
16
|
+
const course_evaluation_entity_1 = require("./course-evaluation.entity");
|
|
17
|
+
const user_entity_1 = require("entities/user.entity");
|
|
18
|
+
var ProgressStatus;
|
|
19
|
+
(function (ProgressStatus) {
|
|
20
|
+
ProgressStatus["inProgress"] = "in-progress";
|
|
21
|
+
ProgressStatus["approved"] = "approved";
|
|
22
|
+
ProgressStatus["notPassed"] = "not-passed";
|
|
23
|
+
ProgressStatus["notStarted"] = "not-started";
|
|
24
|
+
})(ProgressStatus || (ProgressStatus = {}));
|
|
25
|
+
let CourseEvaluationProgress = class CourseEvaluationProgress extends base_entity_1.EntityBase {
|
|
26
|
+
status;
|
|
27
|
+
attempt;
|
|
28
|
+
finishedAt;
|
|
29
|
+
startedAt;
|
|
30
|
+
qualification;
|
|
31
|
+
timeTaken;
|
|
32
|
+
evaluation;
|
|
33
|
+
tookBy;
|
|
34
|
+
};
|
|
35
|
+
exports.CourseEvaluationProgress = CourseEvaluationProgress;
|
|
36
|
+
__decorate([
|
|
37
|
+
(0, typeorm_1.Column)({ type: 'enum', nullable: false, default: ProgressStatus.notStarted }),
|
|
38
|
+
__metadata("design:type", String)
|
|
39
|
+
], CourseEvaluationProgress.prototype, "status", void 0);
|
|
40
|
+
__decorate([
|
|
41
|
+
(0, typeorm_1.Column)({ type: 'int', nullable: false }),
|
|
42
|
+
__metadata("design:type", Number)
|
|
43
|
+
], CourseEvaluationProgress.prototype, "attempt", void 0);
|
|
44
|
+
__decorate([
|
|
45
|
+
(0, typeorm_1.Column)({ type: 'datetime', nullable: true }),
|
|
46
|
+
__metadata("design:type", Date)
|
|
47
|
+
], CourseEvaluationProgress.prototype, "finishedAt", void 0);
|
|
48
|
+
__decorate([
|
|
49
|
+
(0, typeorm_1.Column)({ type: 'datetime', nullable: true }),
|
|
50
|
+
__metadata("design:type", Date)
|
|
51
|
+
], CourseEvaluationProgress.prototype, "startedAt", void 0);
|
|
52
|
+
__decorate([
|
|
53
|
+
(0, typeorm_1.Column)({ type: 'numeric', nullable: false, scale: 2, default: 0 }),
|
|
54
|
+
__metadata("design:type", Number)
|
|
55
|
+
], CourseEvaluationProgress.prototype, "qualification", void 0);
|
|
56
|
+
__decorate([
|
|
57
|
+
(0, typeorm_1.Column)({ type: 'numeric', nullable: false, default: 60, scale: 2 }),
|
|
58
|
+
__metadata("design:type", Number)
|
|
59
|
+
], CourseEvaluationProgress.prototype, "timeTaken", void 0);
|
|
60
|
+
__decorate([
|
|
61
|
+
(0, swagger_1.ApiProperty)({
|
|
62
|
+
type: () => course_evaluation_entity_1.CourseEvaluation,
|
|
63
|
+
description: 'Evaluation progress parent entity',
|
|
64
|
+
required: false,
|
|
65
|
+
}),
|
|
66
|
+
(0, typeorm_1.ManyToOne)(() => course_evaluation_entity_1.CourseEvaluation),
|
|
67
|
+
__metadata("design:type", course_evaluation_entity_1.CourseEvaluation)
|
|
68
|
+
], CourseEvaluationProgress.prototype, "evaluation", void 0);
|
|
69
|
+
__decorate([
|
|
70
|
+
(0, swagger_1.ApiProperty)({
|
|
71
|
+
type: () => user_entity_1.User,
|
|
72
|
+
description: 'User who takes the evaluation',
|
|
73
|
+
required: false,
|
|
74
|
+
}),
|
|
75
|
+
(0, typeorm_1.ManyToOne)(() => user_entity_1.User),
|
|
76
|
+
__metadata("design:type", user_entity_1.User)
|
|
77
|
+
], CourseEvaluationProgress.prototype, "tookBy", void 0);
|
|
78
|
+
exports.CourseEvaluationProgress = CourseEvaluationProgress = __decorate([
|
|
79
|
+
(0, typeorm_1.Entity)()
|
|
80
|
+
], CourseEvaluationProgress);
|
|
81
|
+
//# sourceMappingURL=course-evaluation-progress.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"course-evaluation-progress.js","sourceRoot":"","sources":["../../../src/entities/capacitation/course-evaluation-progress.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qCAAoD;AACpD,6CAA8C;AAE9C,mEAA+D;AAC/D,yEAA8D;AAC9D,sDAA4C;AAE5C,IAAK,cAKJ;AALD,WAAK,cAAc;IACjB,4CAA0B,CAAA;IAC1B,uCAAqB,CAAA;IACrB,0CAAwB,CAAA;IACxB,4CAA0B,CAAA;AAC5B,CAAC,EALI,cAAc,KAA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B;4DAAC;AAQ7B;IANC,IAAA,qBAAW,EAAC;QACX,IAAI,EAAE,GAAG,EAAE,CAAC,kBAAI;QAChB,WAAW,EAAE,+BAA+B;QAC5C,QAAQ,EAAE,KAAK;KAChB,CAAC;IACD,IAAA,mBAAS,EAAC,GAAG,EAAE,CAAC,kBAAI,CAAC;8BACd,kBAAI;wDAAC;mCAjCF,wBAAwB;IADpC,IAAA,gBAAM,GAAE;GACI,wBAAwB,CAkCpC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { EntityBase } from '../../common/database/base.entity';
|
|
2
|
+
export declare enum QuestionType {
|
|
3
|
+
TEXT = "TEXT",
|
|
4
|
+
MULTIPLE_CHOICE = "MULTIPLE_CHOICE",
|
|
5
|
+
TRUE_FALSE = "TRUE_FALSE"
|
|
6
|
+
}
|
|
7
|
+
export declare class CourseEvaluationQuestion extends EntityBase {
|
|
8
|
+
text: string;
|
|
9
|
+
type: QuestionType;
|
|
10
|
+
options: string;
|
|
11
|
+
}
|
|
@@ -0,0 +1,46 @@
|
|
|
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.CourseEvaluationQuestion = exports.QuestionType = void 0;
|
|
13
|
+
const typeorm_1 = require("typeorm");
|
|
14
|
+
const base_entity_1 = require("../../common/database/base.entity");
|
|
15
|
+
var QuestionType;
|
|
16
|
+
(function (QuestionType) {
|
|
17
|
+
QuestionType["TEXT"] = "TEXT";
|
|
18
|
+
QuestionType["MULTIPLE_CHOICE"] = "MULTIPLE_CHOICE";
|
|
19
|
+
QuestionType["TRUE_FALSE"] = "TRUE_FALSE";
|
|
20
|
+
})(QuestionType || (exports.QuestionType = QuestionType = {}));
|
|
21
|
+
let CourseEvaluationQuestion = class CourseEvaluationQuestion extends base_entity_1.EntityBase {
|
|
22
|
+
text;
|
|
23
|
+
type;
|
|
24
|
+
options;
|
|
25
|
+
};
|
|
26
|
+
exports.CourseEvaluationQuestion = CourseEvaluationQuestion;
|
|
27
|
+
__decorate([
|
|
28
|
+
(0, typeorm_1.Column)(),
|
|
29
|
+
__metadata("design:type", String)
|
|
30
|
+
], CourseEvaluationQuestion.prototype, "text", void 0);
|
|
31
|
+
__decorate([
|
|
32
|
+
(0, typeorm_1.Column)({
|
|
33
|
+
type: 'enum',
|
|
34
|
+
enum: QuestionType,
|
|
35
|
+
default: QuestionType.TEXT,
|
|
36
|
+
}),
|
|
37
|
+
__metadata("design:type", String)
|
|
38
|
+
], CourseEvaluationQuestion.prototype, "type", void 0);
|
|
39
|
+
__decorate([
|
|
40
|
+
(0, typeorm_1.Column)({ type: 'jsonb', nullable: true }),
|
|
41
|
+
__metadata("design:type", String)
|
|
42
|
+
], CourseEvaluationQuestion.prototype, "options", void 0);
|
|
43
|
+
exports.CourseEvaluationQuestion = CourseEvaluationQuestion = __decorate([
|
|
44
|
+
(0, typeorm_1.Entity)()
|
|
45
|
+
], CourseEvaluationQuestion);
|
|
46
|
+
//# sourceMappingURL=course-evaluation-question.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"course-evaluation-question.js","sourceRoot":"","sources":["../../../src/entities/capacitation/course-evaluation-question.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qCAAyC;AACzC,mEAA+D;AAG/D,IAAY,YAKX;AALD,WAAY,YAAY;IACtB,6BAAa,CAAA;IACb,mDAAmC,CAAA;IACnC,yCAAyB,CAAA;AAE3B,CAAC,EALW,YAAY,4BAAZ,YAAY,QAKvB;AAGM,IAAM,wBAAwB,GAA9B,MAAM,wBAAyB,SAAQ,wBAAU;IAEtD,IAAI,CAAS;IAOb,IAAI,CAAe;IAGnB,OAAO,CAAS;CAIjB,CAAA;AAhBY,4DAAwB;AAEnC;IADC,IAAA,gBAAM,GAAE;;sDACI;AAOb;IALC,IAAA,gBAAM,EAAC;QACN,IAAI,EAAE,MAAM;QACZ,IAAI,EAAE,YAAY;QAClB,OAAO,EAAE,YAAY,CAAC,IAAI;KAC3B,CAAC;;sDACiB;AAGnB;IADC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;yDAC1B;mCAZL,wBAAwB;IADpC,IAAA,gBAAM,GAAE;GACI,wBAAwB,CAgBpC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { Course } from './course.entity';
|
|
2
|
+
import { CourseFolderPage } from './course-folder-page.entity';
|
|
3
|
+
import { User } from '../user.entity';
|
|
4
|
+
export declare class CourseProgress {
|
|
5
|
+
id: number;
|
|
6
|
+
user: User;
|
|
7
|
+
course: Course;
|
|
8
|
+
lastCompletedPage: CourseFolderPage | null;
|
|
9
|
+
progress: number;
|
|
10
|
+
completedPages: {
|
|
11
|
+
pageId: number;
|
|
12
|
+
completedAt: Date;
|
|
13
|
+
}[] | null;
|
|
14
|
+
}
|
|
@@ -0,0 +1,53 @@
|
|
|
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.CourseProgress = void 0;
|
|
13
|
+
const typeorm_1 = require("typeorm");
|
|
14
|
+
const course_entity_1 = require("./course.entity");
|
|
15
|
+
const course_folder_page_entity_1 = require("./course-folder-page.entity");
|
|
16
|
+
const user_entity_1 = require("../user.entity");
|
|
17
|
+
let CourseProgress = class CourseProgress {
|
|
18
|
+
id;
|
|
19
|
+
user;
|
|
20
|
+
course;
|
|
21
|
+
lastCompletedPage;
|
|
22
|
+
progress;
|
|
23
|
+
completedPages;
|
|
24
|
+
};
|
|
25
|
+
exports.CourseProgress = CourseProgress;
|
|
26
|
+
__decorate([
|
|
27
|
+
(0, typeorm_1.PrimaryGeneratedColumn)(),
|
|
28
|
+
__metadata("design:type", Number)
|
|
29
|
+
], CourseProgress.prototype, "id", void 0);
|
|
30
|
+
__decorate([
|
|
31
|
+
(0, typeorm_1.ManyToOne)(() => user_entity_1.User, user => user.courseProgress),
|
|
32
|
+
__metadata("design:type", user_entity_1.User)
|
|
33
|
+
], CourseProgress.prototype, "user", void 0);
|
|
34
|
+
__decorate([
|
|
35
|
+
(0, typeorm_1.ManyToOne)(() => course_entity_1.Course, course => course.courseProgress),
|
|
36
|
+
__metadata("design:type", course_entity_1.Course)
|
|
37
|
+
], CourseProgress.prototype, "course", void 0);
|
|
38
|
+
__decorate([
|
|
39
|
+
(0, typeorm_1.ManyToOne)(() => course_folder_page_entity_1.CourseFolderPage, page => page.courseProgress, { nullable: true }),
|
|
40
|
+
__metadata("design:type", course_folder_page_entity_1.CourseFolderPage)
|
|
41
|
+
], CourseProgress.prototype, "lastCompletedPage", void 0);
|
|
42
|
+
__decorate([
|
|
43
|
+
(0, typeorm_1.Column)({ default: 0 }),
|
|
44
|
+
__metadata("design:type", Number)
|
|
45
|
+
], CourseProgress.prototype, "progress", void 0);
|
|
46
|
+
__decorate([
|
|
47
|
+
(0, typeorm_1.Column)({ type: 'jsonb', nullable: true }),
|
|
48
|
+
__metadata("design:type", Array)
|
|
49
|
+
], CourseProgress.prototype, "completedPages", void 0);
|
|
50
|
+
exports.CourseProgress = CourseProgress = __decorate([
|
|
51
|
+
(0, typeorm_1.Entity)()
|
|
52
|
+
], CourseProgress);
|
|
53
|
+
//# sourceMappingURL=course-progress.entity.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"course-progress.entity.js","sourceRoot":"","sources":["../../../src/entities/capacitation/course-progress.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qCAA4E;AAC5E,mDAAyC;AACzC,2EAA+D;AAC/D,gDAAsC;AAG/B,IAAM,cAAc,GAApB,MAAM,cAAc;IAEzB,EAAE,CAAS;IAGX,IAAI,CAAO;IAGX,MAAM,CAAS;IAGf,iBAAiB,CAA0B;IAG3C,QAAQ,CAAS;IAGjB,cAAc,CAAiD;CAChE,CAAA;AAlBY,wCAAc;AAEzB;IADC,IAAA,gCAAsB,GAAE;;0CACd;AAGX;IADC,IAAA,mBAAS,EAAC,GAAG,EAAE,CAAC,kBAAI,EAAE,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,cAAc,CAAC;8BAC7C,kBAAI;4CAAC;AAGX;IADC,IAAA,mBAAS,EAAC,GAAG,EAAE,CAAC,sBAAM,EAAE,MAAM,CAAC,EAAE,CAAC,MAAM,CAAC,cAAc,CAAC;8BACjD,sBAAM;8CAAC;AAGf;IADC,IAAA,mBAAS,EAAC,GAAG,EAAE,CAAC,4CAAgB,EAAE,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,cAAc,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;8BAChE,4CAAgB;yDAAQ;AAG3C;IADC,IAAA,gBAAM,EAAC,EAAE,OAAO,EAAE,CAAC,EAAE,CAAC;;gDACN;AAGjB;IADC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;sDACqB;yBAjBpD,cAAc;IAD1B,IAAA,gBAAM,GAAE;GACI,cAAc,CAkB1B"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { EntityBase } from '../../common/database/base.entity';
|
|
2
|
+
import { CourseFolder } from './course-folder.entity';
|
|
3
|
+
import { LMSFileUploaded } from 'common';
|
|
4
|
+
export declare class FolderPage extends EntityBase {
|
|
5
|
+
name: string;
|
|
6
|
+
description?: string;
|
|
7
|
+
isCompleted: boolean;
|
|
8
|
+
isPublished: boolean;
|
|
9
|
+
files?: LMSFileUploaded[];
|
|
10
|
+
folder: CourseFolder;
|
|
11
|
+
}
|