@driveup/schema 0.2.6 → 0.2.7
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/lib/catalog/addon/addon.entity.d.ts +3 -3
- package/lib/catalog/addon/addon.entity.js +5 -5
- package/lib/catalog/addon/addon.entity.js.map +1 -1
- package/lib/catalog/addon/country.entity.d.ts +3 -3
- package/lib/catalog/addon/country.entity.js +5 -5
- package/lib/catalog/addon/country.entity.js.map +1 -1
- package/lib/catalog/priceplan/priceplan.entity.d.ts +2 -2
- package/lib/catalog/priceplan/priceplan.entity.js +4 -4
- package/lib/catalog/priceplan/priceplan.entity.js.map +1 -1
- package/lib/catalog/product/country.entity.d.ts +4 -4
- package/lib/catalog/product/country.entity.js +9 -9
- package/lib/catalog/product/country.entity.js.map +1 -1
- package/lib/catalog/product/priceplan.entity.d.ts +3 -3
- package/lib/catalog/product/priceplan.entity.js +8 -8
- package/lib/catalog/product/priceplan.entity.js.map +1 -1
- package/lib/catalog/product/product.entity.d.ts +3 -3
- package/lib/catalog/product/product.entity.js +6 -6
- package/lib/catalog/product/product.entity.js.map +1 -1
- package/lib/catalog/program/program.entity.d.ts +1 -1
- package/lib/catalog/program/program.entity.js +5 -5
- package/lib/catalog/program/program.entity.js.map +1 -1
- package/lib/catalog/seed/assets/asset.entity.d.ts +2 -2
- package/lib/catalog/seed/assets/asset.entity.js +4 -4
- package/lib/catalog/seed/assets/asset.entity.js.map +1 -1
- package/lib/catalog/seed/courses/course.entity.d.ts +3 -3
- package/lib/catalog/seed/courses/course.entity.js +7 -7
- package/lib/catalog/seed/courses/course.entity.js.map +1 -1
- package/lib/catalog/seed/courses/lesson.entity.d.ts +2 -2
- package/lib/catalog/seed/courses/lesson.entity.js +5 -5
- package/lib/catalog/seed/courses/lesson.entity.js.map +1 -1
- package/lib/catalog/seed/courses/topic.entity.d.ts +2 -2
- package/lib/catalog/seed/courses/topic.entity.js +5 -5
- package/lib/catalog/seed/courses/topic.entity.js.map +1 -1
- package/lib/catalog/seed/expense/category.entity.d.ts +1 -1
- package/lib/catalog/seed/expense/category.entity.js +4 -4
- package/lib/catalog/seed/expense/category.entity.js.map +1 -1
- package/lib/index.d.ts +1 -1
- package/lib/index.js +1 -1
- package/lib/index.js.map +1 -1
- package/lib/profile/agent/agent.entity.d.ts +12 -4
- package/lib/profile/agent/agent.entity.js +30 -6
- package/lib/profile/agent/agent.entity.js.map +1 -1
- package/lib/profile/agent/asset.entity.d.ts +1 -1
- package/lib/profile/agent/asset.entity.js +2 -2
- package/lib/profile/agent/asset.entity.js.map +1 -1
- package/lib/profile/agent/payout.entity.d.ts +2 -2
- package/lib/profile/agent/payout.entity.js +4 -4
- package/lib/profile/agent/payout.entity.js.map +1 -1
- package/lib/profile/agent/promotion.entity.d.ts +3 -3
- package/lib/profile/agent/promotion.entity.js +6 -6
- package/lib/profile/agent/promotion.entity.js.map +1 -1
- package/lib/profile/company/company.entity.d.ts +39 -8
- package/lib/profile/company/company.entity.js +147 -10
- package/lib/profile/company/company.entity.js.map +1 -1
- package/lib/profile/company/course/course.entity.d.ts +35 -8
- package/lib/profile/company/course/course.entity.js +48 -9
- package/lib/profile/company/course/course.entity.js.map +1 -1
- package/lib/profile/company/course/lesson.entity.d.ts +20 -6
- package/lib/profile/company/course/lesson.entity.js +77 -10
- package/lib/profile/company/course/lesson.entity.js.map +1 -1
- package/lib/profile/company/course/{appointment.entity.d.ts → schedule.entity.d.ts} +78 -8
- package/lib/profile/company/course/{appointment.entity.js → schedule.entity.js} +257 -7
- package/lib/profile/company/course/schedule.entity.js.map +1 -0
- package/lib/profile/company/course/topic.entity.d.ts +6 -2
- package/lib/profile/company/course/topic.entity.js +12 -5
- package/lib/profile/company/course/topic.entity.js.map +1 -1
- package/lib/profile/company/finances/billing/bill.entity.d.ts +3 -3
- package/lib/profile/company/finances/billing/bill.entity.js +5 -5
- package/lib/profile/company/finances/billing/bill.entity.js.map +1 -1
- package/lib/profile/company/finances/billing/item.entity.d.ts +2 -2
- package/lib/profile/company/finances/billing/item.entity.js +5 -5
- package/lib/profile/company/finances/billing/item.entity.js.map +1 -1
- package/lib/profile/company/finances/billing/transaction.entity.d.ts +3 -3
- package/lib/profile/company/finances/billing/transaction.entity.js +6 -6
- package/lib/profile/company/finances/billing/transaction.entity.js.map +1 -1
- package/lib/profile/company/finances/expense/category.entity.d.ts +1 -1
- package/lib/profile/company/finances/expense/category.entity.js +4 -4
- package/lib/profile/company/finances/expense/category.entity.js.map +1 -1
- package/lib/profile/company/finances/expense/expense.entity.d.ts +6 -2
- package/lib/profile/company/finances/expense/expense.entity.js +32 -4
- package/lib/profile/company/finances/expense/expense.entity.js.map +1 -1
- package/lib/profile/company/finances/handover/handover.entity.d.ts +3 -3
- package/lib/profile/company/finances/handover/handover.entity.js +6 -6
- package/lib/profile/company/finances/handover/handover.entity.js.map +1 -1
- package/lib/profile/company/finances/invoice/invoice.entity.d.ts +7 -6
- package/lib/profile/company/finances/invoice/invoice.entity.js +9 -8
- package/lib/profile/company/finances/invoice/invoice.entity.js.map +1 -1
- package/lib/profile/company/finances/invoice/item.entity.d.ts +2 -2
- package/lib/profile/company/finances/invoice/item.entity.js +4 -4
- package/lib/profile/company/finances/invoice/item.entity.js.map +1 -1
- package/lib/profile/company/finances/payment/method.entity.d.ts +10 -4
- package/lib/profile/company/finances/payment/method.entity.js +24 -5
- package/lib/profile/company/finances/payment/method.entity.js.map +1 -1
- package/lib/profile/company/instructor/activity.entity.js.map +1 -1
- package/lib/profile/company/instructor/calendar-state.entity.js.map +1 -1
- package/lib/profile/company/instructor/instructor.entity.d.ts +19 -11
- package/lib/profile/company/instructor/instructor.entity.js +100 -16
- package/lib/profile/company/instructor/instructor.entity.js.map +1 -1
- package/lib/profile/company/instructor/task.entity.d.ts +2 -1
- package/lib/profile/company/instructor/task.entity.js +9 -4
- package/lib/profile/company/instructor/task.entity.js.map +1 -1
- package/lib/profile/company/medical/examination.entity.d.ts +3 -3
- package/lib/profile/company/medical/examination.entity.js +5 -5
- package/lib/profile/company/medical/examination.entity.js.map +1 -1
- package/lib/profile/company/medical/product.entity.d.ts +4 -4
- package/lib/profile/company/medical/product.entity.js +5 -5
- package/lib/profile/company/medical/product.entity.js.map +1 -1
- package/lib/profile/company/product/addon.entity.d.ts +2 -2
- package/lib/profile/company/product/addon.entity.js +5 -5
- package/lib/profile/company/product/addon.entity.js.map +1 -1
- package/lib/profile/company/product/priceplan.entity.d.ts +4 -3
- package/lib/profile/company/product/priceplan.entity.js +9 -4
- package/lib/profile/company/product/priceplan.entity.js.map +1 -1
- package/lib/profile/company/product/product.entity.d.ts +8 -7
- package/lib/profile/company/product/product.entity.js +19 -9
- package/lib/profile/company/product/product.entity.js.map +1 -1
- package/lib/profile/company/product/vehicle.entity.d.ts +2 -2
- package/lib/profile/company/product/vehicle.entity.js +4 -4
- package/lib/profile/company/product/vehicle.entity.js.map +1 -1
- package/lib/profile/instructor/instructor.entity.d.ts +6 -3
- package/lib/profile/instructor/instructor.entity.js +28 -7
- package/lib/profile/instructor/instructor.entity.js.map +1 -1
- package/lib/profile/student/program/licence/licence.entity.d.ts +3 -3
- package/lib/profile/student/program/licence/licence.entity.js +5 -5
- package/lib/profile/student/program/licence/licence.entity.js.map +1 -1
- package/lib/profile/student/program/medical/certificate.entity.d.ts +2 -2
- package/lib/profile/student/program/medical/certificate.entity.js +4 -4
- package/lib/profile/student/program/medical/certificate.entity.js.map +1 -1
- package/lib/profile/student/program/medical/examination.entity.d.ts +3 -3
- package/lib/profile/student/program/medical/examination.entity.js +10 -10
- package/lib/profile/student/program/medical/examination.entity.js.map +1 -1
- package/lib/profile/student/program/program.entity.d.ts +6 -6
- package/lib/profile/student/program/program.entity.js +9 -9
- package/lib/profile/student/program/program.entity.js.map +1 -1
- package/lib/profile/student/program/training/appointment.entity.d.ts +21 -9
- package/lib/profile/student/program/training/appointment.entity.js +109 -12
- package/lib/profile/student/program/training/appointment.entity.js.map +1 -1
- package/lib/profile/student/program/training/exam.entity.d.ts +4 -2
- package/lib/profile/student/program/training/exam.entity.js +12 -4
- package/lib/profile/student/program/training/exam.entity.js.map +1 -1
- package/lib/profile/student/program/training/lesson.entity.d.ts +9 -4
- package/lib/profile/student/program/training/lesson.entity.js +29 -7
- package/lib/profile/student/program/training/lesson.entity.js.map +1 -1
- package/lib/profile/student/program/training/request.entity.d.ts +6 -3
- package/lib/profile/student/program/training/request.entity.js +26 -5
- package/lib/profile/student/program/training/request.entity.js.map +1 -1
- package/lib/profile/student/program/training/topic.entity.d.ts +14 -3
- package/lib/profile/student/program/training/topic.entity.js +29 -5
- package/lib/profile/student/program/training/topic.entity.js.map +1 -1
- package/lib/profile/student/program/training/training.entity.d.ts +49 -6
- package/lib/profile/student/program/training/training.entity.js +190 -7
- package/lib/profile/student/program/training/training.entity.js.map +1 -1
- package/lib/profile/student/program/training/transaction.entity.d.ts +8 -3
- package/lib/profile/student/program/training/transaction.entity.js +41 -4
- package/lib/profile/student/program/training/transaction.entity.js.map +1 -1
- package/lib/profile/student/student.entity.d.ts +11 -6
- package/lib/profile/student/student.entity.js +57 -10
- package/lib/profile/student/student.entity.js.map +1 -1
- package/lib/system/campaign/campaign.entity.d.ts +2 -2
- package/lib/system/campaign/campaign.entity.js +6 -6
- package/lib/system/campaign/campaign.entity.js.map +1 -1
- package/lib/system/campaign/gifcode.entity.d.ts +2 -2
- package/lib/system/campaign/gifcode.entity.js +6 -6
- package/lib/system/campaign/gifcode.entity.js.map +1 -1
- package/lib/system/country/country.entity.d.ts +7 -5
- package/lib/system/country/country.entity.js +15 -9
- package/lib/system/country/country.entity.js.map +1 -1
- package/lib/system/currency/currency.entity.d.ts +1 -1
- package/lib/system/currency/currency.entity.js +4 -4
- package/lib/system/currency/currency.entity.js.map +1 -1
- package/lib/system/driving/category.entity.d.ts +7 -7
- package/lib/system/driving/category.entity.js +12 -12
- package/lib/system/driving/category.entity.js.map +1 -1
- package/lib/system/driving/vehicle.entity.d.ts +2 -2
- package/lib/system/driving/vehicle.entity.js +4 -4
- package/lib/system/driving/vehicle.entity.js.map +1 -1
- package/lib/system/event/event.entity.d.ts +2 -2
- package/lib/system/event/event.entity.js +4 -4
- package/lib/system/event/event.entity.js.map +1 -1
- package/lib/system/event/log.entity.d.ts +2 -2
- package/lib/system/event/log.entity.js +3 -3
- package/lib/system/event/log.entity.js.map +1 -1
- package/lib/system/policy/policy.entity.d.ts +1 -1
- package/lib/system/policy/policy.entity.js +5 -5
- package/lib/system/policy/policy.entity.js.map +1 -1
- package/lib/system/staff/staff.entity.d.ts +1 -1
- package/lib/system/staff/staff.entity.js +3 -3
- package/lib/system/staff/staff.entity.js.map +1 -1
- package/lib/tsconfig.tsbuildinfo +1 -1
- package/lib/user/alert.entity.d.ts +3 -2
- package/lib/user/alert.entity.js +11 -4
- package/lib/user/alert.entity.js.map +1 -1
- package/lib/user/blocked.entity.js +2 -2
- package/lib/user/blocked.entity.js.map +1 -1
- package/lib/user/device.entity.d.ts +15 -0
- package/lib/user/device.entity.js +26 -0
- package/lib/user/device.entity.js.map +1 -1
- package/lib/user/notification.entity.d.ts +2 -2
- package/lib/user/notification.entity.js +4 -4
- package/lib/user/notification.entity.js.map +1 -1
- package/lib/user/ticket.entity.d.ts +8 -3
- package/lib/user/ticket.entity.js +11 -4
- package/lib/user/ticket.entity.js.map +1 -1
- package/lib/user/user.entity.d.ts +91 -82
- package/lib/user/user.entity.js +257 -259
- package/lib/user/user.entity.js.map +1 -1
- package/lib/user/verification.entity.js +2 -2
- package/lib/user/verification.entity.js.map +1 -1
- package/lib/utils/activity.helper.d.ts +2 -2
- package/lib/utils/activity.helper.js.map +1 -1
- package/lib/utils/trackable.d.ts +2 -2
- package/lib/utils/trackable.js.map +1 -1
- package/package.json +2 -2
- package/lib/profile/company/course/appointment.entity.js.map +0 -1
|
@@ -10,24 +10,25 @@ var __metadata = (this && this.__metadata) || function (k, v) {
|
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
12
|
exports.CompanyProductEntity = void 0;
|
|
13
|
-
const typeorm_1 = require("typeorm");
|
|
14
13
|
const shared_1 = require("@driveup/shared");
|
|
14
|
+
const luxon_1 = require("luxon");
|
|
15
|
+
const typeorm_1 = require("typeorm");
|
|
16
|
+
const country_entity_1 = require("../../../catalog/product/country.entity");
|
|
15
17
|
const staff_entity_1 = require("../../../system/staff/staff.entity");
|
|
18
|
+
const activity_helper_1 = require("../../../utils/activity.helper");
|
|
19
|
+
const trackable_1 = require("../../../utils/trackable");
|
|
16
20
|
const company_entity_1 = require("../company.entity");
|
|
17
|
-
const country_entity_1 = require("../../../catalog/product/country.entity");
|
|
18
|
-
const priceplan_entity_1 = require("./priceplan.entity");
|
|
19
21
|
const course_entity_1 = require("../course/course.entity");
|
|
20
|
-
const vehicle_entity_1 = require("./vehicle.entity");
|
|
21
22
|
const product_entity_1 = require("../medical/product.entity");
|
|
22
23
|
const addon_entity_1 = require("./addon.entity");
|
|
23
|
-
const
|
|
24
|
-
const
|
|
24
|
+
const priceplan_entity_1 = require("./priceplan.entity");
|
|
25
|
+
const vehicle_entity_1 = require("./vehicle.entity");
|
|
25
26
|
let CompanyProductEntity = class CompanyProductEntity extends trackable_1.TrackableEntity {
|
|
26
27
|
constructor(props) {
|
|
27
28
|
super();
|
|
28
29
|
this.isMedical = () => this.catalogType === shared_1.CatalogType.Medical;
|
|
29
|
-
this.
|
|
30
|
-
this.isDriving = () => this.catalogType === shared_1.CatalogType.
|
|
30
|
+
this.isPreparation = () => this.catalogType === shared_1.CatalogType.Preparation;
|
|
31
|
+
this.isDriving = () => this.catalogType === shared_1.CatalogType.Preparation;
|
|
31
32
|
this.isCompletion = () => this.catalogType === shared_1.CatalogType.Completion;
|
|
32
33
|
Object.assign(this, props);
|
|
33
34
|
}
|
|
@@ -54,6 +55,15 @@ let CompanyProductEntity = class CompanyProductEntity extends trackable_1.Tracka
|
|
|
54
55
|
canPurchase() {
|
|
55
56
|
return this.status === shared_1.ProductStatus.Active;
|
|
56
57
|
}
|
|
58
|
+
async getUpcomingPricePlan() {
|
|
59
|
+
// TODO: check this function carefuly
|
|
60
|
+
return priceplan_entity_1.CompanyProductPricePlanEntity.createQueryBuilder('pp') // company product plan
|
|
61
|
+
.innerJoin('pp.product', 'p') // company product
|
|
62
|
+
.where('p.id = :id', { id: this.id })
|
|
63
|
+
.andWhere('pp.active = :false', { false: false })
|
|
64
|
+
.andWhere('pp.switchDate >= :now', { now: luxon_1.DateTime.now().toJSDate() })
|
|
65
|
+
.getOne();
|
|
66
|
+
}
|
|
57
67
|
async getActivities() {
|
|
58
68
|
const activities = [];
|
|
59
69
|
activities.push(await (0, activity_helper_1.toActivity)(this.createdBy, this.createdOn, shared_1.ActivityType.created));
|
|
@@ -222,7 +232,7 @@ __decorate([
|
|
|
222
232
|
__metadata("design:type", Promise)
|
|
223
233
|
], CompanyProductEntity.prototype, "product", void 0);
|
|
224
234
|
__decorate([
|
|
225
|
-
(0, typeorm_1.
|
|
235
|
+
(0, typeorm_1.OneToMany)(() => priceplan_entity_1.CompanyProductPricePlanEntity, plan => plan.product),
|
|
226
236
|
__metadata("design:type", Promise)
|
|
227
237
|
], CompanyProductEntity.prototype, "pricePlans", void 0);
|
|
228
238
|
__decorate([
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"product.entity.js","sourceRoot":"","sources":["../../../../src/profile/company/product/product.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"product.entity.js","sourceRoot":"","sources":["../../../../src/profile/company/product/product.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AACA,4CAAwF;AACxF,iCAAiC;AACjC,qCAAqF;AAErF,4EAA+E;AAC/E,qEAAiE;AACjE,oEAA4D;AAC5D,wDAA2D;AAC3D,sDAAkD;AAClD,2DAA8D;AAC9D,8DAAwE;AACxE,iDAAoD;AACpD,yDAAmE;AACnE,qDAA+D;AAGxD,IAAM,oBAAoB,GAA1B,MAAM,oBAAqB,SAAQ,2BAAw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C,EAAE,CAAC,IAAI,CAAC,OAAO,CAAC;;wDAChB;AAQrD;IAFC,IAAA,kBAAQ,EAAC,GAAG,EAAE,CAAC,gDAA6B,EAAE,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,gBAAgB,CAAC;IAC5E,IAAA,oBAAU,GAAE;;uDACqC;AAOlD;IADC,IAAA,mBAAS,EAAC,GAAG,EAAE,CAAC,iCAAkB,EAAE,KAAK,CAAC,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC;;oDACtB;AAYtC;IADC,IAAA,mBAAS,EAAC,GAAG,EAAE,CAAC,4CAA2B,EAAE,MAAM,CAAC,EAAE,CAAC,MAAM,CAAC,OAAO,CAAC;;qDACvB;AAUhD;IADC,IAAA,mBAAS,EAAC,GAAG,EAAE,CAAC,mCAAmB,EAAE,MAAM,CAAC,EAAE,CAAC,MAAM,CAAC,OAAO,CAAC;;qDACvB;AAUxC;IADC,IAAA,mBAAS,EAAC,GAAG,EAAE,CAAC,4CAA2B,EAAE,MAAM,CAAC,EAAE,CAAC,MAAM,CAAC,OAAO,CAAC;;sDACtB;+BAlRrC,oBAAoB;IADhC,IAAA,gBAAM,EAAC,iBAAiB,CAAC;;GACb,oBAAoB,CA6UhC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { CarTransmission } from '@driveup/shared';
|
|
2
1
|
import { Activity, Vehicle } from '@driveup/common';
|
|
3
|
-
import {
|
|
2
|
+
import { CarTransmission } from '@driveup/shared';
|
|
4
3
|
import { TrackableEntity } from '../../../utils/trackable';
|
|
4
|
+
import { CompanyProductEntity } from './product.entity';
|
|
5
5
|
export declare class CompanyProductVehicleEntity extends TrackableEntity<Vehicle> {
|
|
6
6
|
/**
|
|
7
7
|
* Reference to the company product this vehicle belongs to
|
|
@@ -10,12 +10,12 @@ var __metadata = (this && this.__metadata) || function (k, v) {
|
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
12
|
exports.CompanyProductVehicleEntity = void 0;
|
|
13
|
-
const typeorm_1 = require("typeorm");
|
|
14
|
-
const shared_1 = require("@driveup/shared");
|
|
15
13
|
const common_1 = require("@driveup/common");
|
|
16
|
-
const
|
|
17
|
-
const
|
|
14
|
+
const shared_1 = require("@driveup/shared");
|
|
15
|
+
const typeorm_1 = require("typeorm");
|
|
18
16
|
const activity_helper_1 = require("../../../utils/activity.helper");
|
|
17
|
+
const trackable_1 = require("../../../utils/trackable");
|
|
18
|
+
const product_entity_1 = require("./product.entity");
|
|
19
19
|
let CompanyProductVehicleEntity = class CompanyProductVehicleEntity extends trackable_1.TrackableEntity {
|
|
20
20
|
constructor(props) {
|
|
21
21
|
super();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"vehicle.entity.js","sourceRoot":"","sources":["../../../../src/profile/company/product/vehicle.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,
|
|
1
|
+
{"version":3,"file":"vehicle.entity.js","sourceRoot":"","sources":["../../../../src/profile/company/product/vehicle.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,4CAAoD;AACpD,4CAAgE;AAChE,qCAAoD;AAEpD,oEAA4D;AAC5D,wDAA2D;AAC3D,qDAAwD;AAGjD,IAAM,2BAA2B,GAAjC,MAAM,2BAA4B,SAAQ,2BAAwB;IA6ExE,YAAY,KAA4C;QACvD,KAAK,EAAE,CAAC;QACR,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC;IAC5B,CAAC;IAED,OAAO;QACN,OAAO,IAAI,gBAAO,CAAC;YAClB,EAAE,EAAE,IAAI,CAAC,EAAE;YACX,YAAY,EAAE,IAAI,CAAC,YAAY;YAC/B,MAAM,EAAE,IAAI,CAAC,MAAM;YACnB,IAAI,EAAE,IAAI,CAAC,IAAI;YACf,KAAK,EAAE,IAAI,CAAC,KAAK;YACjB,IAAI,EAAE,IAAI,CAAC,IAAI;YACf,QAAQ,EAAE,IAAI,CAAC,QAAQ;YAC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AAE,wBAAe,CAAC,SAAS;QAClC,QAAQ,EAAE,KAAK;KACf,CAAC;;iEACsC;AAMxC;IADC,IAAA,mBAAS,EAAC,GAAG,EAAE,CAAC,qCAAoB,EAAE,OAAO,CAAC,EAAE,CAAC,OAAO,CAAC,QAAQ,CAAC;;4DAC5B;sCA3E3B,2BAA2B;IADvC,IAAA,gBAAM,EAAC,wBAAwB,CAAC;;GACpB,2BAA2B,CAyGvC"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { Activity, Instructor, Person, Preference } from '@driveup/common';
|
|
2
|
+
import { AccountStatus, Language, PreferenceScope } from '@driveup/shared';
|
|
3
3
|
import { UserEntity } from '../../user/user.entity';
|
|
4
|
-
import { CompanyInstructorEntity } from '../company/instructor/instructor.entity';
|
|
5
4
|
import { TrackableEntity } from '../../utils/trackable';
|
|
5
|
+
import { CompanyInstructorEntity } from '../company/instructor/instructor.entity';
|
|
6
6
|
/**
|
|
7
7
|
* Represents an instructor profile in the system.
|
|
8
8
|
* Instructors can be associated with multiple companies and provide
|
|
@@ -67,6 +67,7 @@ export declare class InstructorEntity extends TrackableEntity<Instructor> {
|
|
|
67
67
|
* @returns Promise resolving to Person model with basic contact information
|
|
68
68
|
*/
|
|
69
69
|
toPerson(): Promise<Person>;
|
|
70
|
+
getUser(): Promise<UserEntity>;
|
|
70
71
|
/**
|
|
71
72
|
* Retrieves all activity records for this instructor
|
|
72
73
|
* Includes creation and update actions
|
|
@@ -91,4 +92,6 @@ export declare class InstructorEntity extends TrackableEntity<Instructor> {
|
|
|
91
92
|
* @returns Array of Preference objects or undefined if not set
|
|
92
93
|
*/
|
|
93
94
|
getPreferences(): Preference<boolean>[];
|
|
95
|
+
setPreference(name: string, value: any, scope: PreferenceScope): Promise<Preference<boolean>[]>;
|
|
96
|
+
removePreference(name: string): Promise<Preference<boolean>[]>;
|
|
94
97
|
}
|
|
@@ -8,16 +8,17 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
8
8
|
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
9
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
10
|
};
|
|
11
|
+
var InstructorEntity_1;
|
|
11
12
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
13
|
exports.InstructorEntity = void 0;
|
|
13
|
-
const typeorm_1 = require("typeorm");
|
|
14
|
-
const shared_1 = require("@driveup/shared");
|
|
15
14
|
const common_1 = require("@driveup/common");
|
|
16
|
-
const
|
|
15
|
+
const shared_1 = require("@driveup/shared");
|
|
16
|
+
const typeorm_1 = require("typeorm");
|
|
17
17
|
const log_entity_1 = require("../../system/event/log.entity");
|
|
18
|
-
const
|
|
19
|
-
const trackable_1 = require("../../utils/trackable");
|
|
18
|
+
const user_entity_1 = require("../../user/user.entity");
|
|
20
19
|
const activity_helper_1 = require("../../utils/activity.helper");
|
|
20
|
+
const trackable_1 = require("../../utils/trackable");
|
|
21
|
+
const instructor_entity_1 = require("../company/instructor/instructor.entity");
|
|
21
22
|
/**
|
|
22
23
|
* Represents an instructor profile in the system.
|
|
23
24
|
* Instructors can be associated with multiple companies and provide
|
|
@@ -25,7 +26,7 @@ const activity_helper_1 = require("../../utils/activity.helper");
|
|
|
25
26
|
*
|
|
26
27
|
* @extends TrackableEntity<Instructor>
|
|
27
28
|
*/
|
|
28
|
-
let InstructorEntity = class InstructorEntity extends trackable_1.TrackableEntity {
|
|
29
|
+
let InstructorEntity = InstructorEntity_1 = class InstructorEntity extends trackable_1.TrackableEntity {
|
|
29
30
|
/**
|
|
30
31
|
* Creates an instance of InstructorEntity
|
|
31
32
|
* @param props - Partial properties to initialize the entity
|
|
@@ -71,6 +72,9 @@ let InstructorEntity = class InstructorEntity extends trackable_1.TrackableEntit
|
|
|
71
72
|
email: user.email
|
|
72
73
|
});
|
|
73
74
|
}
|
|
75
|
+
async getUser() {
|
|
76
|
+
return await this.user;
|
|
77
|
+
}
|
|
74
78
|
/**
|
|
75
79
|
* Retrieves all activity records for this instructor
|
|
76
80
|
* Includes creation and update actions
|
|
@@ -124,6 +128,23 @@ let InstructorEntity = class InstructorEntity extends trackable_1.TrackableEntit
|
|
|
124
128
|
return;
|
|
125
129
|
return this.preferences.map(common_1.Preference.toInstance);
|
|
126
130
|
}
|
|
131
|
+
async setPreference(name, value, scope) {
|
|
132
|
+
this.preferences = this.preferences || [];
|
|
133
|
+
this.preferences = this.preferences.filter(p => p.name !== name);
|
|
134
|
+
this.preferences.push(new common_1.Preference({
|
|
135
|
+
scope: scope,
|
|
136
|
+
name: name,
|
|
137
|
+
value: value
|
|
138
|
+
}));
|
|
139
|
+
await instructor_entity_1.CompanyInstructorEntity.save(this);
|
|
140
|
+
return this.preferences;
|
|
141
|
+
}
|
|
142
|
+
async removePreference(name) {
|
|
143
|
+
this.preferences = this.preferences || [];
|
|
144
|
+
this.preferences = this.preferences.filter(p => p.name !== name);
|
|
145
|
+
await InstructorEntity_1.save(this);
|
|
146
|
+
return this.preferences;
|
|
147
|
+
}
|
|
127
148
|
};
|
|
128
149
|
exports.InstructorEntity = InstructorEntity;
|
|
129
150
|
__decorate([
|
|
@@ -178,7 +199,7 @@ __decorate([
|
|
|
178
199
|
(0, typeorm_1.OneToMany)(() => instructor_entity_1.CompanyInstructorEntity, company => company.instructor),
|
|
179
200
|
__metadata("design:type", Promise)
|
|
180
201
|
], InstructorEntity.prototype, "companies", void 0);
|
|
181
|
-
exports.InstructorEntity = InstructorEntity = __decorate([
|
|
202
|
+
exports.InstructorEntity = InstructorEntity = InstructorEntity_1 = __decorate([
|
|
182
203
|
(0, typeorm_1.Entity)('instructors'),
|
|
183
204
|
__metadata("design:paramtypes", [Object])
|
|
184
205
|
], InstructorEntity);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"instructor.entity.js","sourceRoot":"","sources":["../../../src/profile/instructor/instructor.entity.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version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,CAAC;CACD,CAAA;AAzMY,4CAAgB;AAM5B;IADC,IAAA,gBAAM,GAAE;;gDACM;AAYf;IANC,IAAA,gBAAM,EAAC;QACP,IAAI,EAAE,MAAM;QACZ,IAAI,EAAE,sBAAa;QACnB,OAAO,EAAE,sBAAa,CAAC,OAAO;QAC9B,QAAQ,EAAE,KAAK;KACf,CAAC;;gDACoB;AAatB;IANC,IAAA,gBAAM,EAAC;QACP,IAAI,EAAE,MAAM;QACZ,IAAI,EAAE,iBAAQ;QACd,OAAO,EAAE,iBAAQ,CAAC,EAAE;QACpB,QAAQ,EAAE,IAAI;KACd,CAAC;;kDACiB;AASnB;IAJC,IAAA,gBAAM,EAAC;QACP,QAAQ,EAAE,IAAI;QACd,OAAO,EAAE,IAAI;KACb,CAAC;;8CACW;AASb;IAJC,IAAA,gBAAM,EAAC;QACP,QAAQ,EAAE,IAAI;QACd,OAAO,EAAE,IAAI;KACb,CAAC;;kDACe;AAUjB;IALC,IAAA,gBAAM,EAAC;QACP,IAAI,EAAE,aAAa;QACnB,QAAQ,EAAE,IAAI;QACd,OAAO,EAAE,IAAI;KACb,CAAC;;qDACwB;AAM1B;IADC,IAAA,mBAAS,EAAC,GAAG,EAAE,CAAC,wBAAU,EAAE,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,kBAAkB,CAAC;;8CACnC;AAM1B;IADC,IAAA,mBAAS,EAAC,GAAG,EAAE,CAAC,2CAAuB,EAAE,OAAO,CAAC,EAAE,CAAC,OAAO,CAAC,UAAU,CAAC;;mDAC1B;2BAvElC,gBAAgB;IAD5B,IAAA,gBAAM,EAAC,aAAa,CAAC;;GACT,gBAAgB,CAyM5B"}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
+
import { Activity, Authority, Licence } from '@driveup/common';
|
|
1
2
|
import { ProductType } from '@driveup/shared';
|
|
2
|
-
import { Activity, Licence, Authority } from '@driveup/common';
|
|
3
|
-
import { StudentEntity } from '../../student.entity';
|
|
4
3
|
import { DrivingCategoryEntity } from '../../../../system/driving/category.entity';
|
|
5
|
-
import { StudentProgramEntity } from '../program.entity';
|
|
6
4
|
import { TrackableEntity } from '../../../../utils/trackable';
|
|
5
|
+
import { StudentEntity } from '../../student.entity';
|
|
6
|
+
import { StudentProgramEntity } from '../program.entity';
|
|
7
7
|
export declare class StudentLicenceEntity extends TrackableEntity<Licence> {
|
|
8
8
|
/**
|
|
9
9
|
* Reference to the student who owns this license
|
|
@@ -10,14 +10,14 @@ var __metadata = (this && this.__metadata) || function (k, v) {
|
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
12
|
exports.StudentLicenceEntity = void 0;
|
|
13
|
-
const typeorm_1 = require("typeorm");
|
|
14
|
-
const shared_1 = require("@driveup/shared");
|
|
15
13
|
const common_1 = require("@driveup/common");
|
|
16
|
-
const
|
|
14
|
+
const shared_1 = require("@driveup/shared");
|
|
15
|
+
const typeorm_1 = require("typeorm");
|
|
17
16
|
const category_entity_1 = require("../../../../system/driving/category.entity");
|
|
18
|
-
const program_entity_1 = require("../program.entity");
|
|
19
|
-
const trackable_1 = require("../../../../utils/trackable");
|
|
20
17
|
const activity_helper_1 = require("../../../../utils/activity.helper");
|
|
18
|
+
const trackable_1 = require("../../../../utils/trackable");
|
|
19
|
+
const student_entity_1 = require("../../student.entity");
|
|
20
|
+
const program_entity_1 = require("../program.entity");
|
|
21
21
|
;
|
|
22
22
|
let StudentLicenceEntity = class StudentLicenceEntity extends trackable_1.TrackableEntity {
|
|
23
23
|
constructor(props) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"licence.entity.js","sourceRoot":"","sources":["../../../../../src/profile/student/program/licence/licence.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,
|
|
1
|
+
{"version":3,"file":"licence.entity.js","sourceRoot":"","sources":["../../../../../src/profile/student/program/licence/licence.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,4CAA+D;AAC/D,4CAA4D;AA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EAAE,CAAC,QAAQ,CAAC,eAAe,CAAC;;sDACpC;AAOzC;IADC,IAAA,oBAAU,EAAC,GAAG,EAAE,CAAC,qCAAoB,EAAE,OAAO,CAAC,EAAE,CAAC,OAAO,CAAC,QAAQ,CAAC;;sDAC1B;+BA3G9B,oBAAoB;IADhC,IAAA,gBAAM,EAAC,iBAAiB,CAAC;;GACb,oBAAoB,CA0IhC"}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { ProductType } from '@driveup/shared';
|
|
2
1
|
import { Activity, Customer, MedicalCertificate, Note } from '@driveup/common';
|
|
2
|
+
import { ProductType } from '@driveup/shared';
|
|
3
3
|
import { DrivingCategoryEntity } from '../../../../system/driving/category.entity';
|
|
4
|
+
import { TrackableEntity } from '../../../../utils/trackable';
|
|
4
5
|
import { StudentEntity } from '../../student.entity';
|
|
5
6
|
import { StudentProgramEntity } from '../program.entity';
|
|
6
7
|
import { StudentMedicalExaminationEntity } from './examination.entity';
|
|
7
|
-
import { TrackableEntity } from '../../../../utils/trackable';
|
|
8
8
|
export declare class StudentMedicalCertificateEntity extends TrackableEntity<MedicalCertificate> {
|
|
9
9
|
/**
|
|
10
10
|
* Reference to the student who owns this medical certificate
|
|
@@ -10,15 +10,15 @@ var __metadata = (this && this.__metadata) || function (k, v) {
|
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
12
|
exports.StudentMedicalCertificateEntity = void 0;
|
|
13
|
-
const typeorm_1 = require("typeorm");
|
|
14
|
-
const shared_1 = require("@driveup/shared");
|
|
15
13
|
const common_1 = require("@driveup/common");
|
|
14
|
+
const shared_1 = require("@driveup/shared");
|
|
15
|
+
const typeorm_1 = require("typeorm");
|
|
16
16
|
const category_entity_1 = require("../../../../system/driving/category.entity");
|
|
17
|
+
const activity_helper_1 = require("../../../../utils/activity.helper");
|
|
18
|
+
const trackable_1 = require("../../../../utils/trackable");
|
|
17
19
|
const student_entity_1 = require("../../student.entity");
|
|
18
20
|
const program_entity_1 = require("../program.entity");
|
|
19
21
|
const examination_entity_1 = require("./examination.entity");
|
|
20
|
-
const trackable_1 = require("../../../../utils/trackable");
|
|
21
|
-
const activity_helper_1 = require("../../../../utils/activity.helper");
|
|
22
22
|
let StudentMedicalCertificateEntity = class StudentMedicalCertificateEntity extends trackable_1.TrackableEntity {
|
|
23
23
|
constructor(props) {
|
|
24
24
|
super();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"certificate.entity.js","sourceRoot":"","sources":["../../../../../src/profile/student/program/medical/certificate.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,
|
|
1
|
+
{"version":3,"file":"certificate.entity.js","sourceRoot":"","sources":["../../../../../src/profile/student/program/medical/certificate.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,4CAA4F;AAC5F,4CAA4D;AAC5D,qCAAsF;AAEtF,gFAAmF;AACnF,uEAA+D;AAC/D,2DAA8D;AAC9D,yDAAqD;AACrD,sDAAyD;AACzD,6DAAuE;AAIhE,IAAM,+BAA+B,GAArC,MAAM,+BAAgC,SAAQ,2BAAmC;IAsJvF,YAAY,KAAgD;QAC3D,KAAK,EAAE,CAAC;QACR,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC;IAC5B,CAAC;IAED,KAAK,CAAC,OAAO;QAEZ,IAAI,WAAwB,CAAC;QAE7B,IAAI,IAAI,CAAC,aAAa,EAAE,CAAC;YACxB,MAAM,iBAAiB,GAAG,MAAM,oDAA+B,CAAC,SAAS,CAAC;gBACzE,EAAE,EAAE,IAAI,CAAC,aAAa;aACtB,CAAC,CAAC;YACH,WAAW,GAAG,iBAAiB,CAAC,CAAC,CAAC,CAAC,MAAM,iBAAiB,CAAC,SAAS,EAAE,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC;QAChF,CAAC;QAED,MAAM,QAAQ,GAAG,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,MAAM,IAAI,CA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d,OAAO,EAAE,IAAI;KACb,CAAC;8BACU,IAAI;mEAAC;AASjB;IAJC,IAAA,gBAAM,EAAC;QACP,QAAQ,EAAE,IAAI;QACd,OAAO,EAAE,IAAI;KACb,CAAC;;oEACkB;AAWpB;IALC,IAAA,gBAAM,EAAC;QACP,IAAI,EAAE,aAAa;QACnB,QAAQ,EAAE,IAAI;QACd,OAAO,EAAE,IAAI;KACb,CAAC;8BACM,iBAAQ;+DAAC;AAUjB;IALC,IAAA,gBAAM,EAAC;QACP,IAAI,EAAE,aAAa;QACnB,QAAQ,EAAE,IAAI;QACd,OAAO,EAAE,IAAI;KACb,CAAC;8BACI,aAAI;6DAAC;AAMX;IADC,IAAA,mBAAS,EAAC,GAAG,EAAE,CAAC,8BAAa,EAAE,OAAO,CAAC,EAAE,CAAC,OAAO,CAAC,mBAAmB,CAAC;;gEACvC;AAOhC;IAFC,IAAA,kBAAQ,EAAC,GAAG,EAAE,CAAC,oDAA+B,EAAE,WAAW,CAAC,EAAE,CAAC,WAAW,CAAC,WAAW,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;IAC3G,IAAA,oBAAU,GAAE;;oEACgD;AAO7D;IADC,IAAA,mBAAS,EAAC,GAAG,EAAE,CAAC,uCAAqB,EAAE,QAAQ,CAAC,EAAE,CAAC,QAAQ,CAAC,mBAAmB,CAAC;;iEACxC;AAOzC;IADC,IAAA,oBAAU,EAAC,GAAG,EAAE,CAAC,qCAAoB,EAAE,OAAO,CAAC,EAAE,CAAC,OAAO,CAAC,YAAY,CAAC;;iEAC9B;0CApJ9B,+BAA+B;IAD3C,IAAA,gBAAM,EAAC,4BAA4B,CAAC;;GACxB,+BAA+B,CAsM3C"}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
+
import { Activity, Address, Appointment, Note } from '@driveup/common';
|
|
1
2
|
import { StatusType } from '@driveup/shared';
|
|
2
|
-
import {
|
|
3
|
+
import { TrackableEntity } from '../../../../utils/trackable';
|
|
4
|
+
import { CompanyMedicalExaminationEntity } from '../../../company/medical/examination.entity';
|
|
3
5
|
import { StudentEntity } from '../../student.entity';
|
|
4
6
|
import { StudentMedicalCertificateEntity } from './certificate.entity';
|
|
5
|
-
import { CompanyMedicalExaminationEntity } from '../../../company/medical/examination.entity';
|
|
6
|
-
import { TrackableEntity } from '../../../../utils/trackable';
|
|
7
7
|
export declare class StudentMedicalExaminationEntity extends TrackableEntity<Appointment> {
|
|
8
8
|
/**
|
|
9
9
|
* Reference to the student taking this medical examination
|
|
@@ -11,17 +11,17 @@ var __metadata = (this && this.__metadata) || function (k, v) {
|
|
|
11
11
|
var StudentMedicalExaminationEntity_1;
|
|
12
12
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
13
|
exports.StudentMedicalExaminationEntity = void 0;
|
|
14
|
-
const typeorm_1 = require("typeorm");
|
|
15
|
-
const shared_1 = require("@driveup/shared");
|
|
16
14
|
const common_1 = require("@driveup/common");
|
|
17
|
-
const
|
|
18
|
-
const
|
|
15
|
+
const shared_1 = require("@driveup/shared");
|
|
16
|
+
const typeorm_1 = require("typeorm");
|
|
17
|
+
const product_entity_1 = require("../../../../catalog/product/product.entity");
|
|
18
|
+
const activity_helper_1 = require("../../../../utils/activity.helper");
|
|
19
|
+
const trackable_1 = require("../../../../utils/trackable");
|
|
19
20
|
const examination_entity_1 = require("../../../company/medical/examination.entity");
|
|
20
|
-
const product_entity_1 = require("../../../company/product/product.entity");
|
|
21
21
|
const product_entity_2 = require("../../../company/medical/product.entity");
|
|
22
|
-
const product_entity_3 = require("
|
|
23
|
-
const
|
|
24
|
-
const
|
|
22
|
+
const product_entity_3 = require("../../../company/product/product.entity");
|
|
23
|
+
const student_entity_1 = require("../../student.entity");
|
|
24
|
+
const certificate_entity_1 = require("./certificate.entity");
|
|
25
25
|
let StudentMedicalExaminationEntity = StudentMedicalExaminationEntity_1 = class StudentMedicalExaminationEntity extends trackable_1.TrackableEntity {
|
|
26
26
|
constructor(props) {
|
|
27
27
|
super();
|
|
@@ -35,8 +35,8 @@ let StudentMedicalExaminationEntity = StudentMedicalExaminationEntity_1 = class
|
|
|
35
35
|
.where('sme.id = :id', { id: this.id })
|
|
36
36
|
.getOne();
|
|
37
37
|
// get driveup product
|
|
38
|
-
const product = await
|
|
39
|
-
.innerJoin(
|
|
38
|
+
const product = await product_entity_1.ProductEntity.createQueryBuilder('p')
|
|
39
|
+
.innerJoin(product_entity_3.CompanyProductEntity, 'cp', 'cp.productId = p.id')
|
|
40
40
|
.innerJoin(product_entity_2.CompanyMedicalProductEntity, 'cmp', 'cmp.productId = cp.id')
|
|
41
41
|
.where('cmp.id = :id', { id: companyMedicalProduct.id })
|
|
42
42
|
.getOne();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"examination.entity.js","sourceRoot":"","sources":["../../../../../src/profile/student/program/medical/examination.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,
|
|
1
|
+
{"version":3,"file":"examination.entity.js","sourceRoot":"","sources":["../../../../../src/profile/student/program/medical/examination.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,4CAAuE;AACvE,4CAA4E;AAC5E,qCAA8D;AAE9D,+EAA2E;AAC3E,uEAA+D;AAC/D,2DAA8D;AAC9D,oFAA8F;AAC9F,4EAAsF;AACtF,4EAA+E;AAC/E,yDAAqD;AACrD,6DAAuE;AAGhE,IAAM,+BAA+B,uCAArC,MAAM,+BAAgC,SAAQ,2BAA4B;IAwGhF,YAAY,KAAgD;QAC3D,KAAK,EAAE,CAAC;QACR,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC;IAC5B,CAAC;IAED,KAAK,CAAC,OAAO;QAEZ,8BAA8B;QAC9B,MAAM,qBAAqB,GAAG,MAAM,4CAA2B,CAAC,kBAAkB,CAAC,KAAK,CAAC;aACvF,SAAS,CAAC,kBAAkB,EAAE,KAAK,CAAC;aACpC,SAAS,CAAC,iCAA+B,EAAE,KAAK,EAAE,4BAA4B,C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;QACd,OAAO,EAAE,IAAI;KACb,CAAC;;mEACiB;AAUnB;IALC,IAAA,gBAAM,EAAC;QACP,IAAI,EAAE,aAAa;QACnB,QAAQ,EAAE,IAAI;QACd,OAAO,EAAE,IAAI;KACb,CAAC;8BACQ,gBAAO;iEAAC;AAUlB;IALC,IAAA,gBAAM,EAAC;QACP,IAAI,EAAE,aAAa;QACnB,QAAQ,EAAE,IAAI;QACd,OAAO,EAAE,IAAI;KACb,CAAC;8BACI,aAAI;6DAAC;AAMX;IADC,IAAA,mBAAS,EAAC,GAAG,EAAE,CAAC,8BAAa,EAAE,OAAO,CAAC,EAAE,CAAC,OAAO,CAAC,mBAAmB,CAAC;;gEACvC;AAMhC;IADC,IAAA,mBAAS,EAAC,GAAG,EAAE,CAAC,oDAA+B,EAAE,WAAW,CAAC,EAAE,CAAC,WAAW,CAAC,QAAQ,CAAC;;oEAChC;AAMtD;IADC,IAAA,kBAAQ,EAAC,GAAG,EAAE,CAAC,oDAA+B,EAAE,WAAW,CAAC,EAAE,CAAC,WAAW,CAAC,WAAW,CAAC;;oEAClC;0CAtG1C,+BAA+B;IAD3C,IAAA,gBAAM,EAAC,4BAA4B,CAAC;;GACxB,+BAA+B,CA8J3C"}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { StatusType } from '@driveup/shared';
|
|
2
1
|
import { Activity, StudentProgram } from '@driveup/common';
|
|
3
|
-
import {
|
|
2
|
+
import { StatusType } from '@driveup/shared';
|
|
4
3
|
import { ProgramEntity } from '../../../catalog/program/program.entity';
|
|
5
|
-
import {
|
|
4
|
+
import { TrackableEntity } from '../../../utils/trackable';
|
|
5
|
+
import { StudentEntity } from '../student.entity';
|
|
6
6
|
import { StudentLicenceEntity } from './licence/licence.entity';
|
|
7
|
-
import {
|
|
7
|
+
import { StudentMedicalCertificateEntity } from './medical/certificate.entity';
|
|
8
8
|
import { StudentTrainingRequestEntity } from './training/request.entity';
|
|
9
|
-
import {
|
|
9
|
+
import { StudentTrainingEntity } from './training/training.entity';
|
|
10
10
|
export declare class StudentProgramEntity extends TrackableEntity<StudentProgram> {
|
|
11
11
|
/**
|
|
12
12
|
* Reference to the student enrolled in this program
|
|
@@ -72,7 +72,7 @@ export declare class StudentProgramEntity extends TrackableEntity<StudentProgram
|
|
|
72
72
|
requestes: Promise<StudentTrainingRequestEntity[]>;
|
|
73
73
|
toModel(): Promise<StudentProgram>;
|
|
74
74
|
toSummary(): Promise<StudentProgram>;
|
|
75
|
-
constructor(props?: Partial<
|
|
75
|
+
constructor(props?: Partial<StudentProgramEntity>);
|
|
76
76
|
/**
|
|
77
77
|
* Get the student associated with this program
|
|
78
78
|
* @description Retrieves the student entity linked to this program, including those that may have been soft-deleted.
|
|
@@ -10,17 +10,17 @@ var __metadata = (this && this.__metadata) || function (k, v) {
|
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
12
|
exports.StudentProgramEntity = void 0;
|
|
13
|
-
const typeorm_1 = require("typeorm");
|
|
14
|
-
const shared_1 = require("@driveup/shared");
|
|
15
13
|
const common_1 = require("@driveup/common");
|
|
16
|
-
const
|
|
14
|
+
const shared_1 = require("@driveup/shared");
|
|
15
|
+
const typeorm_1 = require("typeorm");
|
|
17
16
|
const program_entity_1 = require("../../../catalog/program/program.entity");
|
|
18
|
-
const
|
|
17
|
+
const activity_helper_1 = require("../../../utils/activity.helper");
|
|
18
|
+
const trackable_1 = require("../../../utils/trackable");
|
|
19
|
+
const student_entity_1 = require("../student.entity");
|
|
19
20
|
const licence_entity_1 = require("./licence/licence.entity");
|
|
20
|
-
const
|
|
21
|
+
const certificate_entity_1 = require("./medical/certificate.entity");
|
|
21
22
|
const request_entity_1 = require("./training/request.entity");
|
|
22
|
-
const
|
|
23
|
-
const activity_helper_1 = require("../../../utils/activity.helper");
|
|
23
|
+
const training_entity_1 = require("./training/training.entity");
|
|
24
24
|
let StudentProgramEntity = class StudentProgramEntity extends trackable_1.TrackableEntity {
|
|
25
25
|
async toModel() {
|
|
26
26
|
const program = await (await this.program)?.toSummary();
|
|
@@ -157,11 +157,11 @@ __decorate([
|
|
|
157
157
|
__metadata("design:type", Promise)
|
|
158
158
|
], StudentProgramEntity.prototype, "licences", void 0);
|
|
159
159
|
__decorate([
|
|
160
|
-
(0, typeorm_1.OneToMany)(() => training_entity_1.StudentTrainingEntity,
|
|
160
|
+
(0, typeorm_1.OneToMany)(() => training_entity_1.StudentTrainingEntity, preparation => preparation.program),
|
|
161
161
|
__metadata("design:type", Promise)
|
|
162
162
|
], StudentProgramEntity.prototype, "trainings", void 0);
|
|
163
163
|
__decorate([
|
|
164
|
-
(0, typeorm_1.OneToMany)(() => request_entity_1.StudentTrainingRequestEntity,
|
|
164
|
+
(0, typeorm_1.OneToMany)(() => request_entity_1.StudentTrainingRequestEntity, preparation => preparation.program),
|
|
165
165
|
__metadata("design:type", Promise)
|
|
166
166
|
], StudentProgramEntity.prototype, "requestes", void 0);
|
|
167
167
|
exports.StudentProgramEntity = StudentProgramEntity = __decorate([
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"program.entity.js","sourceRoot":"","sources":["../../../../src/profile/student/program/program.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,
|
|
1
|
+
{"version":3,"file":"program.entity.js","sourceRoot":"","sources":["../../../../src/profile/student/program/program.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,4CAA2D;AAC3D,4CAA2D;AAC3D,qCAAsF;AAEtF,4EAAwE;AACxE,oEAA4D;AAC5D,wDAA2D;AAC3D,sDAAkD;AAClD,6DAAgE;AAChE,qEAA+E;AAC/E,8DAAyE;AACzE,gEAAmE;AAG5D,IAAM,oBAAoB,GAA1B,MAAM,oBAAqB,SAAQ,2BAA+B;IAgIxE,KAAK,CAAC,OAAO;QACZ,MAAM,OAAO,GAAG,MAAM,CAAC,MAAM,IAAI,CAAC,OAAO,CAAC,EAAE,SAAS,EAAE,CAAC;QACxD,MAAM,OAAO,GAAG,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E,EAAE,IAAI,EAAE,eAAe,EAAE,oBAAoB,EAAE,IAAI,EAAE;KACxE,CAAC;;0DACuD;AAgBzD;IAVC,IAAA,oBAAU,EACV,GAAG,EAAE,CAAC,qCAAoB,EAC1B,OAAO,CAAC,EAAE,CAAC,OAAO,CAAC,QAAQ,EAC3B,EAAE,OAAO,EAAE,IAAI,EAAE,CACjB;IACA,IAAA,mBAAS,EAAC;QACV,IAAI,EAAE,wBAAwB,EAAE,iBAAiB;QACjD,UAAU,EAAE,EAAE,IAAI,EAAE,WAAW,EAAE,oBAAoB,EAAE,IAAI,EAAE;QAC7D,iBAAiB,EAAE,EAAE,IAAI,EAAE,WAAW,EAAE,oBAAoB,EAAE,IAAI,EAAE;KACpE,CAAC;;sDACwC;AAO1C;IADC,IAAA,mBAAS,EAAC,GAAG,EAAE,CAAC,uCAAqB,EAAE,WAAW,CAAC,EAAE,CAAC,WAAW,CAAC,OAAO,CAAC;;uDAC/B;AAM5C;IADC,IAAA,mBAAS,EAAC,GAAG,EAAE,CAAC,6CAA4B,EAAE,WAAW,CAAC,EAAE,CAAC,WAAW,CAAC,OAAO,CAAC;;uDAC/B;+BA9HvC,oBAAoB;IADhC,IAAA,gBAAM,EAAC,iBAAiB,CAAC;;GACb,oBAAoB,CA6LhC"}
|
|
@@ -1,12 +1,14 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import { CompanyCourseScheduleEntity } from '../../../company/course/
|
|
1
|
+
import { Appointment, Note, SkillScore, TopicProgress } from '@driveup/common';
|
|
2
|
+
import { Activity, Address, TrainingSession } from '@driveup/common';
|
|
3
|
+
import { AppointmentType, StatusType } from '@driveup/shared';
|
|
4
|
+
import { TrackableEntity } from '../../../../utils/trackable';
|
|
5
|
+
import { CompanyCourseEntity } from '../../../company/course/course.entity';
|
|
6
|
+
import { CompanyCourseScheduleEntity } from '../../../company/course/schedule.entity';
|
|
7
7
|
import { CompanyInstructorEntity } from '../../../company/instructor/instructor.entity';
|
|
8
|
+
import { StudentEntity } from '../../student.entity';
|
|
8
9
|
import { StudentTrainingExamEntity } from './exam.entity';
|
|
9
|
-
import {
|
|
10
|
+
import { StudentTrainingLessonEntity } from './lesson.entity';
|
|
11
|
+
import { StudentTrainingEntity } from './training.entity';
|
|
10
12
|
export declare class StudentTrainingAppointmentEntity extends TrackableEntity<Appointment> {
|
|
11
13
|
/**
|
|
12
14
|
* Reference to the training this appointment belongs to
|
|
@@ -19,7 +21,7 @@ export declare class StudentTrainingAppointmentEntity extends TrackableEntity<Ap
|
|
|
19
21
|
*/
|
|
20
22
|
lessonId: number;
|
|
21
23
|
/**
|
|
22
|
-
* Only for company course trainings with flexible appointments
|
|
24
|
+
* Only for company course trainings with fixed/flexible appointments
|
|
23
25
|
*/
|
|
24
26
|
scheduleId: number;
|
|
25
27
|
/**
|
|
@@ -46,6 +48,7 @@ export declare class StudentTrainingAppointmentEntity extends TrackableEntity<Ap
|
|
|
46
48
|
* Appointment end date
|
|
47
49
|
* @description In Flexible courses, this field is set to null, and will be calculated each time based on the appointment duration
|
|
48
50
|
* @description In Fixed courses, this field must have a value, which is equal to the part.endDate
|
|
51
|
+
* @description In Driving appointments, this field is set to null, and will be calculated each tie based on the appointment duration
|
|
49
52
|
*/
|
|
50
53
|
endDate: Date;
|
|
51
54
|
/**
|
|
@@ -84,11 +87,14 @@ export declare class StudentTrainingAppointmentEntity extends TrackableEntity<Ap
|
|
|
84
87
|
/**
|
|
85
88
|
* Lesson topics invloved in the appointment with scores
|
|
86
89
|
* Currently implemented oonly by driving trainings
|
|
90
|
+
* - field "topicId" points to "StudentTrainingTopicEntity->id"
|
|
87
91
|
*/
|
|
88
92
|
topics: TopicProgress[];
|
|
89
93
|
/**
|
|
90
94
|
* Lesson skills involved in the appointment with scores
|
|
91
95
|
* Currently implemented oonly by driving trainings
|
|
96
|
+
* - field "topicId" points to "this/StudentTrainingAppointmentEntity->topics->id"
|
|
97
|
+
* - field "skillId" points to "StudentTrainingTopicEntity->skills->id"
|
|
92
98
|
*/
|
|
93
99
|
skills: SkillScore[];
|
|
94
100
|
/**
|
|
@@ -144,7 +150,8 @@ export declare class StudentTrainingAppointmentEntity extends TrackableEntity<Ap
|
|
|
144
150
|
* If the field "endDate" is not set, it calculates it based on the start date and duration
|
|
145
151
|
* @returns Date - The end date of the training appointment
|
|
146
152
|
*/
|
|
147
|
-
getEndDate(): Date
|
|
153
|
+
getEndDate(): Promise<Date>;
|
|
154
|
+
getSessionPrice(): Promise<number>;
|
|
148
155
|
/**
|
|
149
156
|
* Student traning session
|
|
150
157
|
* Extended version of appointment with training session details
|
|
@@ -154,5 +161,10 @@ export declare class StudentTrainingAppointmentEntity extends TrackableEntity<Ap
|
|
|
154
161
|
isFixed(): Promise<boolean>;
|
|
155
162
|
getTrainingLesson(): Promise<StudentTrainingLessonEntity>;
|
|
156
163
|
getCourseLesson(): Promise<import("../../../..").CompanyCourseLessonEntity>;
|
|
164
|
+
getCourse(): Promise<CompanyCourseEntity>;
|
|
165
|
+
getStudent(): Promise<StudentEntity>;
|
|
166
|
+
getSessionNumber(): Promise<number>;
|
|
167
|
+
isInObligationPeriod(): Promise<boolean>;
|
|
168
|
+
getAppointmentInstructor(): Promise<CompanyInstructorEntity>;
|
|
157
169
|
getActivities(): Promise<Activity[]>;
|
|
158
170
|
}
|