@driveup/schema 0.2.5 → 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 +20 -11
- package/lib/profile/company/instructor/instructor.entity.js +111 -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 +11 -6
- package/lib/profile/student/program/program.entity.js +14 -9
- package/lib/profile/student/program/program.entity.js.map +1 -1
- package/lib/profile/student/program/training/appointment.entity.d.ts +23 -9
- package/lib/profile/student/program/training/appointment.entity.js +115 -13
- 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 +10 -4
- package/lib/profile/student/program/training/lesson.entity.js +32 -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 +76 -8
- package/lib/profile/student/program/training/training.entity.js +226 -9
- 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
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { Activity, Appointment, Period, RecurringAppointment } from '@driveup/common';
|
|
2
|
-
import { CompanyCourseLessonEntity } from './lesson.entity';
|
|
3
|
-
import { StudentTrainingAppointmentEntity } from '../../student/program/training/appointment.entity';
|
|
4
|
-
import { CompanyInstructorEntity } from '../instructor/instructor.entity';
|
|
5
|
-
import { TrackableEntity } from '../../../utils/trackable';
|
|
6
2
|
import { IDateAssignment, IDateDuration, IDateUpdate, WeekDay } from '@driveup/shared';
|
|
7
3
|
import { DateTime } from 'luxon';
|
|
4
|
+
import { TrackableEntity } from '../../../utils/trackable';
|
|
5
|
+
import { StudentTrainingAppointmentEntity } from '../../student/program/training/appointment.entity';
|
|
6
|
+
import { CompanyInstructorEntity } from '../instructor/instructor.entity';
|
|
7
|
+
import { CompanyCourseLessonEntity } from './lesson.entity';
|
|
8
8
|
/**
|
|
9
9
|
* Represents a series of training appointment offers managed by the company.
|
|
10
10
|
*
|
|
@@ -112,8 +112,47 @@ export declare class CompanyCourseScheduleEntity extends TrackableEntity<Recurri
|
|
|
112
112
|
getActivities(): Promise<Activity[]>;
|
|
113
113
|
getCompany(): Promise<import("../company.entity").CompanyEntity>;
|
|
114
114
|
getCourse(): Promise<import("./course.entity").CompanyCourseEntity>;
|
|
115
|
+
getLesson(): Promise<CompanyCourseLessonEntity>;
|
|
115
116
|
getInstructor(): Promise<CompanyInstructorEntity>;
|
|
116
117
|
getInstructorByDate(date: Date): Promise<CompanyInstructorEntity>;
|
|
118
|
+
/************************* Manage student appointments *************************/
|
|
119
|
+
/**
|
|
120
|
+
* Get list of related student training appointments, which's training is not terminated
|
|
121
|
+
* @param date Date - defaulted to this.startDate - Must be provided for flexible course appointments
|
|
122
|
+
* @returns StudentTrainingAppointmentEntity[]
|
|
123
|
+
*/
|
|
124
|
+
getStudentAppointments(date?: Date): Promise<StudentTrainingAppointmentEntity[]>;
|
|
125
|
+
/**
|
|
126
|
+
* Get total number of students who attended the appointment in the given date
|
|
127
|
+
* @param date Date - defaulted to this.startDate - Must be provided for flexible course appointments
|
|
128
|
+
*/
|
|
129
|
+
getTotalAttended(date?: Date): Promise<number>;
|
|
130
|
+
/**
|
|
131
|
+
* Get total number of students who where absent in the appointment in the given date
|
|
132
|
+
* @param date Date - defaulted to this.startDate - Must be provided for flexible course appointments
|
|
133
|
+
*/
|
|
134
|
+
getTotalAbsent(date?: Date): Promise<number>;
|
|
135
|
+
/**
|
|
136
|
+
* Get the count of taken seats for this appointment
|
|
137
|
+
* - Only applicable for preparation catalog type courses. Returns null for other catalog types.
|
|
138
|
+
* @param startDate Date - Optional - Only send for flexible courses to specify the desired appointment's startDate
|
|
139
|
+
* @returns number - count of registered student appointments for this appointment
|
|
140
|
+
*/
|
|
141
|
+
getTakenSeats(startDate?: Date): Promise<number>;
|
|
142
|
+
/**
|
|
143
|
+
* Get the count of present students for this appointment
|
|
144
|
+
* - Only applicable for preparation catalog type courses. Returns null for other catalog types.
|
|
145
|
+
* @param startDate Date - Optional - Only send for flexible courses to specify the desired appointment's startDate
|
|
146
|
+
* @returns number - count of attended student appointments for this appointment
|
|
147
|
+
*/
|
|
148
|
+
getTotalPresentStudents(startDate?: Date): Promise<number>;
|
|
149
|
+
/************************* Flexible courses *************************/
|
|
150
|
+
/**
|
|
151
|
+
* Finds if there is an appointment in the given date (checking all of the updates), and returning it if is found
|
|
152
|
+
* @param date Date - the date to check if belongs to an existing appointment
|
|
153
|
+
* @returns Appointment if an appointment is found in the given date, null otherwise
|
|
154
|
+
*/
|
|
155
|
+
getAppointment(date: Date): Promise<Appointment>;
|
|
117
156
|
/**
|
|
118
157
|
* Load all appointments of the definition within the given period
|
|
119
158
|
* @description currently only works for flexible course schedules, and will return an empty array if the related course is fixed. but can and must be extended in the future to return the entire appointment list of the schedule, even if the appointment is fixed, or for another product type entirely.
|
|
@@ -123,6 +162,13 @@ export declare class CompanyCourseScheduleEntity extends TrackableEntity<Recurri
|
|
|
123
162
|
* @returns All appointments of the definition within the given period, filtered by instructorId if provided
|
|
124
163
|
*/
|
|
125
164
|
getAppointments(period: Period, instructorIds?: number[], searchPhrase?: string): Promise<Appointment[]>;
|
|
165
|
+
/**
|
|
166
|
+
* Check if there is one appointment with empty seats
|
|
167
|
+
*
|
|
168
|
+
* If the definition has no appointments in the given period, returns true.
|
|
169
|
+
* Since the functions is supposed to return wether any of the definition's appointments have empty seats
|
|
170
|
+
*/
|
|
171
|
+
hasAppointmentWithEmptySeats(period: Period): Promise<boolean>;
|
|
126
172
|
/**
|
|
127
173
|
*
|
|
128
174
|
* @param period Period
|
|
@@ -143,14 +189,14 @@ export declare class CompanyCourseScheduleEntity extends TrackableEntity<Recurri
|
|
|
143
189
|
* @param date DateTime - original date of the appointment (default return value, if no date updates are found)
|
|
144
190
|
* @returns DateTime - final date of the appointment
|
|
145
191
|
*/
|
|
146
|
-
|
|
192
|
+
getUpdatedDate(date: DateTime): DateTime;
|
|
147
193
|
/**
|
|
148
194
|
* @description Only for repeted definitions (repetition = true)
|
|
149
195
|
* @description Checks wether or not the appointment related to the given date has been removed from schedule (pushed in the skippedDates array)
|
|
150
196
|
* @param date DateTime - date of the appointment
|
|
151
197
|
* @returns DateTime - true if the appointment is skipped, false otherwise
|
|
152
198
|
*/
|
|
153
|
-
|
|
199
|
+
isDateSkipped(date: DateTime): boolean;
|
|
154
200
|
/**
|
|
155
201
|
* @description Only for repeted definitions (repetition = true)
|
|
156
202
|
* @description Finds the final duration of the appointment, considering any duration updates
|
|
@@ -172,7 +218,7 @@ export declare class CompanyCourseScheduleEntity extends TrackableEntity<Recurri
|
|
|
172
218
|
* @description Doesn't check for the definition's endDate, or updates and skippedDates
|
|
173
219
|
* @returns the next appointment based on repetition logic and weekdays assigned
|
|
174
220
|
*/
|
|
175
|
-
|
|
221
|
+
getNextAppointmentDate(date: DateTime): DateTime;
|
|
176
222
|
/**
|
|
177
223
|
* Get the instructor registered for the appointment (works for repeated and single appointments)
|
|
178
224
|
* @param date Date - the date of the appointment
|
|
@@ -198,5 +244,29 @@ export declare class CompanyCourseScheduleEntity extends TrackableEntity<Recurri
|
|
|
198
244
|
* @param id instructor id
|
|
199
245
|
* @returns Object - For the MVP it returns an object mapped like CompanyInstructorMapper.toSimple with the same interface. should be replaced with Person model in the future
|
|
200
246
|
*/
|
|
201
|
-
|
|
247
|
+
getInstructorById(id: number): Promise<{
|
|
248
|
+
id: number;
|
|
249
|
+
name: string;
|
|
250
|
+
image: string;
|
|
251
|
+
phone: string;
|
|
252
|
+
role: import("@driveup/shared").Role;
|
|
253
|
+
status: import("@driveup/shared").AccountStatus;
|
|
254
|
+
canReinstate: boolean;
|
|
255
|
+
calendarLinks: import("@driveup/common").Link[];
|
|
256
|
+
}>;
|
|
257
|
+
/**
|
|
258
|
+
* Get total number of appointments that have any update (duration/instructor/date) after the given date
|
|
259
|
+
* @param from Date - if null, from definition start date
|
|
260
|
+
* @returns number - total updated appointments
|
|
261
|
+
*/
|
|
262
|
+
getTotalUpdatedAppointments(from: Date): number;
|
|
263
|
+
getRemainingSeats(date: Date): Promise<number>;
|
|
264
|
+
/**
|
|
265
|
+
* This method must be called anytime when definition's endDate is changed to a value other than null/undefined
|
|
266
|
+
*
|
|
267
|
+
* Removes all 'updates', 'skippedDates', 'instructors' and 'durations' after the definition's endDate
|
|
268
|
+
*
|
|
269
|
+
* - Does not save the definition
|
|
270
|
+
*/
|
|
271
|
+
removeUpdatesAfterEndDate(): boolean;
|
|
202
272
|
}
|
|
@@ -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.CompanyCourseScheduleEntity = void 0;
|
|
13
|
-
const typeorm_1 = require("typeorm");
|
|
14
13
|
const common_1 = require("@driveup/common");
|
|
15
|
-
const lesson_entity_1 = require("./lesson.entity");
|
|
16
|
-
const appointment_entity_1 = require("../../student/program/training/appointment.entity");
|
|
17
|
-
const instructor_entity_1 = require("../instructor/instructor.entity");
|
|
18
|
-
const trackable_1 = require("../../../utils/trackable");
|
|
19
|
-
const activity_helper_1 = require("../../../utils/activity.helper");
|
|
20
14
|
const shared_1 = require("@driveup/shared");
|
|
21
15
|
const luxon_1 = require("luxon");
|
|
16
|
+
const typeorm_1 = require("typeorm");
|
|
17
|
+
const activity_helper_1 = require("../../../utils/activity.helper");
|
|
18
|
+
const trackable_1 = require("../../../utils/trackable");
|
|
19
|
+
const appointment_entity_1 = require("../../student/program/training/appointment.entity");
|
|
20
|
+
const instructor_entity_1 = require("../instructor/instructor.entity");
|
|
21
|
+
const lesson_entity_1 = require("./lesson.entity");
|
|
22
22
|
/**
|
|
23
23
|
* Represents a series of training appointment offers managed by the company.
|
|
24
24
|
*
|
|
@@ -98,6 +98,9 @@ let CompanyCourseScheduleEntity = class CompanyCourseScheduleEntity extends trac
|
|
|
98
98
|
const lesson = await this.lesson;
|
|
99
99
|
return lesson.getCourse();
|
|
100
100
|
}
|
|
101
|
+
async getLesson() {
|
|
102
|
+
return await this.lesson;
|
|
103
|
+
}
|
|
101
104
|
async getInstructor() {
|
|
102
105
|
return await this.instructor;
|
|
103
106
|
}
|
|
@@ -105,6 +108,153 @@ let CompanyCourseScheduleEntity = class CompanyCourseScheduleEntity extends trac
|
|
|
105
108
|
const d = this.instructors?.find(i => i.date === date);
|
|
106
109
|
return d?.id ? await instructor_entity_1.CompanyInstructorEntity.findOneBy({ id: d.id }) : null;
|
|
107
110
|
}
|
|
111
|
+
/************************* Manage student appointments *************************/
|
|
112
|
+
/**
|
|
113
|
+
* Get list of related student training appointments, which's training is not terminated
|
|
114
|
+
* @param date Date - defaulted to this.startDate - Must be provided for flexible course appointments
|
|
115
|
+
* @returns StudentTrainingAppointmentEntity[]
|
|
116
|
+
*/
|
|
117
|
+
async getStudentAppointments(date = this.startDate) {
|
|
118
|
+
const course = await (await this.lesson).course;
|
|
119
|
+
if (!course.isFixed && !date) {
|
|
120
|
+
return [];
|
|
121
|
+
}
|
|
122
|
+
return await appointment_entity_1.StudentTrainingAppointmentEntity.createQueryBuilder('ta') // training appointment
|
|
123
|
+
.innerJoin('ta.training', 't') // training
|
|
124
|
+
.where('ta.scheduleId = :id', { id: this.id })
|
|
125
|
+
.andWhere('ta.startDate = :date', { date: date })
|
|
126
|
+
.andWhere('t.status != :terminatedStatus', { terminatedStatus: shared_1.StatusType.Terminated })
|
|
127
|
+
.getMany();
|
|
128
|
+
}
|
|
129
|
+
/**
|
|
130
|
+
* Get total number of students who attended the appointment in the given date
|
|
131
|
+
* @param date Date - defaulted to this.startDate - Must be provided for flexible course appointments
|
|
132
|
+
*/
|
|
133
|
+
async getTotalAttended(date = this.startDate) {
|
|
134
|
+
const course = await (await this.lesson).course;
|
|
135
|
+
if (!course.isFixed && !date) {
|
|
136
|
+
return null;
|
|
137
|
+
}
|
|
138
|
+
return await appointment_entity_1.StudentTrainingAppointmentEntity.countBy({
|
|
139
|
+
scheduleId: this.id,
|
|
140
|
+
startDate: date,
|
|
141
|
+
attended: true
|
|
142
|
+
});
|
|
143
|
+
}
|
|
144
|
+
/**
|
|
145
|
+
* Get total number of students who where absent in the appointment in the given date
|
|
146
|
+
* @param date Date - defaulted to this.startDate - Must be provided for flexible course appointments
|
|
147
|
+
*/
|
|
148
|
+
async getTotalAbsent(date = this.startDate) {
|
|
149
|
+
const course = await (await this.lesson).course;
|
|
150
|
+
if (!course.isFixed && !date) {
|
|
151
|
+
return null;
|
|
152
|
+
}
|
|
153
|
+
return await appointment_entity_1.StudentTrainingAppointmentEntity.countBy({
|
|
154
|
+
scheduleId: this.id,
|
|
155
|
+
startDate: date,
|
|
156
|
+
attended: false
|
|
157
|
+
});
|
|
158
|
+
}
|
|
159
|
+
/**
|
|
160
|
+
* Get the count of taken seats for this appointment
|
|
161
|
+
* - Only applicable for preparation catalog type courses. Returns null for other catalog types.
|
|
162
|
+
* @param startDate Date - Optional - Only send for flexible courses to specify the desired appointment's startDate
|
|
163
|
+
* @returns number - count of registered student appointments for this appointment
|
|
164
|
+
*/
|
|
165
|
+
async getTakenSeats(startDate) {
|
|
166
|
+
const course = await this.getCourse();
|
|
167
|
+
const product = await course.product;
|
|
168
|
+
if (product.catalogType !== shared_1.CatalogType.Preparation) {
|
|
169
|
+
return null;
|
|
170
|
+
}
|
|
171
|
+
const count = await appointment_entity_1.StudentTrainingAppointmentEntity.countBy({
|
|
172
|
+
scheduleId: this.id,
|
|
173
|
+
startDate: startDate ?? this.startDate
|
|
174
|
+
});
|
|
175
|
+
return count;
|
|
176
|
+
}
|
|
177
|
+
/**
|
|
178
|
+
* Get the count of present students for this appointment
|
|
179
|
+
* - Only applicable for preparation catalog type courses. Returns null for other catalog types.
|
|
180
|
+
* @param startDate Date - Optional - Only send for flexible courses to specify the desired appointment's startDate
|
|
181
|
+
* @returns number - count of attended student appointments for this appointment
|
|
182
|
+
*/
|
|
183
|
+
async getTotalPresentStudents(startDate) {
|
|
184
|
+
const course = await this.getCourse();
|
|
185
|
+
const product = await course.product;
|
|
186
|
+
if (product.catalogType !== shared_1.CatalogType.Preparation) {
|
|
187
|
+
return null;
|
|
188
|
+
}
|
|
189
|
+
const count = await appointment_entity_1.StudentTrainingAppointmentEntity.countBy({
|
|
190
|
+
scheduleId: this.id,
|
|
191
|
+
startDate: startDate ?? this.startDate,
|
|
192
|
+
attended: true
|
|
193
|
+
});
|
|
194
|
+
return count;
|
|
195
|
+
}
|
|
196
|
+
/************************* Flexible courses *************************/
|
|
197
|
+
/**
|
|
198
|
+
* Finds if there is an appointment in the given date (checking all of the updates), and returning it if is found
|
|
199
|
+
* @param date Date - the date to check if belongs to an existing appointment
|
|
200
|
+
* @returns Appointment if an appointment is found in the given date, null otherwise
|
|
201
|
+
*/
|
|
202
|
+
async getAppointment(date) {
|
|
203
|
+
// Note: other parts of the app depend on this method returning the instructor
|
|
204
|
+
// do not remove unless the dependencies are covered
|
|
205
|
+
// step 0 : prepare local variables
|
|
206
|
+
date = new Date(date);
|
|
207
|
+
let appointmentDate = luxon_1.DateTime.fromJSDate(date);
|
|
208
|
+
// step 1 : manage single appointment
|
|
209
|
+
if (!this.repetition) {
|
|
210
|
+
// if the start date matches the given date, return appointment information
|
|
211
|
+
// otherwise, appointment is not found
|
|
212
|
+
if (this.startDate.getTime() === date.getTime()) {
|
|
213
|
+
const instructor = await this.getAppointmentInstructor(appointmentDate);
|
|
214
|
+
const endDate = luxon_1.DateTime.fromJSDate(this.startDate)
|
|
215
|
+
.plus({ minutes: this.duration })
|
|
216
|
+
.toJSDate();
|
|
217
|
+
return new common_1.Appointment({
|
|
218
|
+
id: this.id,
|
|
219
|
+
startDate: this.startDate,
|
|
220
|
+
endDate,
|
|
221
|
+
instructor: instructor
|
|
222
|
+
});
|
|
223
|
+
}
|
|
224
|
+
return null;
|
|
225
|
+
}
|
|
226
|
+
// step 2 : make sure the date is inside the definition's time frame
|
|
227
|
+
if (date < this.startDate || (this.endDate && date > this.endDate)) {
|
|
228
|
+
return null;
|
|
229
|
+
}
|
|
230
|
+
// step 3 : check if the weekday of the given date, is one of the weekdays of the series
|
|
231
|
+
const weekdayMatches = this.weekdays.some(i => appointmentDate.weekday === common_1.DateHelper.getWeekdayNumber(i));
|
|
232
|
+
if (!weekdayMatches) {
|
|
233
|
+
return null;
|
|
234
|
+
}
|
|
235
|
+
// step 4 : check for updates in the time of the appointment
|
|
236
|
+
// if an update is made, then the given date doesn't point to an existing appointment
|
|
237
|
+
appointmentDate = this.getUpdatedDate(appointmentDate);
|
|
238
|
+
if (appointmentDate.toJSDate().getTime() !== date.getTime()) {
|
|
239
|
+
return null;
|
|
240
|
+
}
|
|
241
|
+
// step 5 : check if the appointment is deleted
|
|
242
|
+
const isDeleted = this.isDateSkipped(appointmentDate);
|
|
243
|
+
if (isDeleted) {
|
|
244
|
+
return null;
|
|
245
|
+
}
|
|
246
|
+
// step 6 : get the appointment instructor
|
|
247
|
+
const instructor = await this.getAppointmentInstructor(appointmentDate);
|
|
248
|
+
// step 7 : get the appointment duration and calculate the endDate
|
|
249
|
+
const appointmentDuration = this.getAppointmentDuration(appointmentDate);
|
|
250
|
+
const endDate = appointmentDate.plus({ minutes: appointmentDuration });
|
|
251
|
+
return new common_1.Appointment({
|
|
252
|
+
id: this.id,
|
|
253
|
+
startDate: appointmentDate.toJSDate(),
|
|
254
|
+
endDate: endDate.toJSDate(),
|
|
255
|
+
instructor: instructor
|
|
256
|
+
});
|
|
257
|
+
}
|
|
108
258
|
/**
|
|
109
259
|
* Load all appointments of the definition within the given period
|
|
110
260
|
* @description currently only works for flexible course schedules, and will return an empty array if the related course is fixed. but can and must be extended in the future to return the entire appointment list of the schedule, even if the appointment is fixed, or for another product type entirely.
|
|
@@ -178,6 +328,56 @@ let CompanyCourseScheduleEntity = class CompanyCourseScheduleEntity extends trac
|
|
|
178
328
|
// return the found appointments
|
|
179
329
|
return appointments;
|
|
180
330
|
}
|
|
331
|
+
/**
|
|
332
|
+
* Check if there is one appointment with empty seats
|
|
333
|
+
*
|
|
334
|
+
* If the definition has no appointments in the given period, returns true.
|
|
335
|
+
* Since the functions is supposed to return wether any of the definition's appointments have empty seats
|
|
336
|
+
*/
|
|
337
|
+
async hasAppointmentWithEmptySeats(period) {
|
|
338
|
+
// step 0 : prepare local variables
|
|
339
|
+
period.startDate = new Date(period.startDate);
|
|
340
|
+
period.endDate = new Date(period.endDate);
|
|
341
|
+
// step 1 : get first appointment date
|
|
342
|
+
// if there is no match for given period, first appointment is not found
|
|
343
|
+
// if not found, return empty array (not appointments)
|
|
344
|
+
let current = this.getFirstAppointmentDateInPeriod(period);
|
|
345
|
+
if (!current) {
|
|
346
|
+
return true;
|
|
347
|
+
}
|
|
348
|
+
if (current.toJSDate() > period.endDate ||
|
|
349
|
+
(this.endDate && current.toJSDate() > this.endDate)) {
|
|
350
|
+
return true;
|
|
351
|
+
}
|
|
352
|
+
// step 2 : from the first appointment and forward
|
|
353
|
+
// 1 -> set appointment information (and check for filtered instructor)
|
|
354
|
+
// 2 -> if appointment is found, and there are remaining seats, return true
|
|
355
|
+
// 3 -> find the next appointment date "inside the given period"
|
|
356
|
+
// repeat the process
|
|
357
|
+
let appointment = await this.getAppointmentInformation(current);
|
|
358
|
+
if (appointment) {
|
|
359
|
+
const remainingSeats = await this.getRemainingSeats(current.toJSDate());
|
|
360
|
+
if (remainingSeats > 0) {
|
|
361
|
+
return true;
|
|
362
|
+
}
|
|
363
|
+
}
|
|
364
|
+
current = this.getNextAppointmentDate(current);
|
|
365
|
+
if (!current) {
|
|
366
|
+
return false;
|
|
367
|
+
}
|
|
368
|
+
while (current.toJSDate() <= period.endDate &&
|
|
369
|
+
(!this.endDate || current.toJSDate() <= this.endDate)) {
|
|
370
|
+
appointment = await this.getAppointmentInformation(current);
|
|
371
|
+
if (appointment) {
|
|
372
|
+
const remainingSeats = await this.getRemainingSeats(current.toJSDate());
|
|
373
|
+
if (remainingSeats > 0) {
|
|
374
|
+
return true;
|
|
375
|
+
}
|
|
376
|
+
}
|
|
377
|
+
current = this.getNextAppointmentDate(current);
|
|
378
|
+
}
|
|
379
|
+
return false;
|
|
380
|
+
}
|
|
181
381
|
/**
|
|
182
382
|
*
|
|
183
383
|
* @param period Period
|
|
@@ -398,6 +598,56 @@ let CompanyCourseScheduleEntity = class CompanyCourseScheduleEntity extends trac
|
|
|
398
598
|
calendarLinks: companyInstructor.calendarLinks || []
|
|
399
599
|
};
|
|
400
600
|
}
|
|
601
|
+
/**
|
|
602
|
+
* Get total number of appointments that have any update (duration/instructor/date) after the given date
|
|
603
|
+
* @param from Date - if null, from definition start date
|
|
604
|
+
* @returns number - total updated appointments
|
|
605
|
+
*/
|
|
606
|
+
getTotalUpdatedAppointments(from) {
|
|
607
|
+
if (!from) {
|
|
608
|
+
from = this.startDate;
|
|
609
|
+
}
|
|
610
|
+
const durationExceptions = this.durations?.filter(i => new Date(i.date) > from);
|
|
611
|
+
const updateExceptions = this.updates?.filter(i => new Date(i.from) > from || new Date(i.to) > from);
|
|
612
|
+
const instructorExceptions = this.instructors?.filter(i => new Date(i.date) > from);
|
|
613
|
+
// Collect unique appointment dates that have any exception
|
|
614
|
+
// This is to avoid counting multiple exceptions for the same appointment more than once
|
|
615
|
+
// i.e if an appointment has duration and instructor and date (updates) exceptions, it should be counted once, not three times
|
|
616
|
+
const uniqueExceptionDates = new Set();
|
|
617
|
+
durationExceptions?.forEach(i => {
|
|
618
|
+
uniqueExceptionDates.add(new Date(i.date).toISOString());
|
|
619
|
+
});
|
|
620
|
+
updateExceptions?.forEach(i => {
|
|
621
|
+
uniqueExceptionDates.add(new Date(i.to).toISOString());
|
|
622
|
+
});
|
|
623
|
+
instructorExceptions?.forEach(i => {
|
|
624
|
+
uniqueExceptionDates.add(new Date(i.date).toISOString());
|
|
625
|
+
});
|
|
626
|
+
// Count unique appointments with exceptions
|
|
627
|
+
return uniqueExceptionDates.size;
|
|
628
|
+
}
|
|
629
|
+
async getRemainingSeats(date) {
|
|
630
|
+
const lesson = await lesson_entity_1.CompanyCourseLessonEntity.findOneBy({ id: this.lessonId });
|
|
631
|
+
const course = await lesson.course;
|
|
632
|
+
if (!course.maxStudents)
|
|
633
|
+
return;
|
|
634
|
+
const takenSeats = await this.getTakenSeats(date);
|
|
635
|
+
return +course.maxStudents - (takenSeats || 0);
|
|
636
|
+
}
|
|
637
|
+
/**
|
|
638
|
+
* This method must be called anytime when definition's endDate is changed to a value other than null/undefined
|
|
639
|
+
*
|
|
640
|
+
* Removes all 'updates', 'skippedDates', 'instructors' and 'durations' after the definition's endDate
|
|
641
|
+
*
|
|
642
|
+
* - Does not save the definition
|
|
643
|
+
*/
|
|
644
|
+
removeUpdatesAfterEndDate() {
|
|
645
|
+
this.updates = (this.updates ?? []).filter(i => new Date(i.from) <= this.endDate);
|
|
646
|
+
this.skippedDates = (this.skippedDates ?? []).filter(i => new Date(i) <= this.endDate);
|
|
647
|
+
this.instructors = (this.instructors ?? []).filter(i => new Date(i.date) <= this.endDate);
|
|
648
|
+
this.durations = (this.durations ?? []).filter(i => new Date(i.date) <= this.endDate);
|
|
649
|
+
return true;
|
|
650
|
+
}
|
|
401
651
|
};
|
|
402
652
|
exports.CompanyCourseScheduleEntity = CompanyCourseScheduleEntity;
|
|
403
653
|
__decorate([
|
|
@@ -486,4 +736,4 @@ exports.CompanyCourseScheduleEntity = CompanyCourseScheduleEntity = __decorate([
|
|
|
486
736
|
(0, typeorm_1.Entity)('companyCourseSchedules'),
|
|
487
737
|
__metadata("design:paramtypes", [Object])
|
|
488
738
|
], CompanyCourseScheduleEntity);
|
|
489
|
-
//# sourceMappingURL=
|
|
739
|
+
//# sourceMappingURL=schedule.entity.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"schedule.entity.js","sourceRoot":"","sources":["../../../../src/profile/company/course/schedule.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,4CAA+G;AAC/G,4CAA8H;AAC9H,iCAAiC;AACjC,qCAA+D;AAE/D,oEAA4D;AAC5D,wDAA2D;AAC3D,0FAAqG;AACrG,uEAA0E;AAC1E,mDAA4D;AAE5D;;;;;;;;;;;;;;;;;;;;;GAqBG;AAEI,IAAM,2BAA2B,GAAjC,MAAM,2BAA4B,SAAQ,2BAAqC;IAqHrF;;;OAGG;IACH,YAAY,KAA4C;QACvD,KAAK,EAAE,CAAC;QACR,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC;IAC5B,CAAC;IAED;;;OAGG;IACH,KAAK,CAAC,OAAO;QACZ,MAAM,MAAM,GAAG,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,MAAM,IAAI,CAAC,MAAM,CAAC,CAAC,SAAS,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC;QACtE,MAAM,UAAU,GAAG,IAAI,CAAC,YAAY,CAAC,CAAC,CAAC,MAAM,CAAC,MAAM,IAAI,CAAC,UAAU,CAAC,CAAC,SAAS,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC;QACxF,OAAO,IAAI,6BAAoB,CAAC;YAC/B,EAAE,EAAE,IAAI,CAAC,EAAE;YACX,MAAM,EAAE,MAAM;YACd,UAAU,EAAE,UAAU;YACtB,SAAS,EAAE,IAAI,CAAC,SAAS;YACzB,OAAO,EAA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E,MAAM,CAAC,EAAE,CAAC,MAAM,CAAC,qBAAqB,CAAC;;+DACpC;AAO7C;IADC,IAAA,mBAAS,EAAC,GAAG,EAAE,CAAC,qDAAgC,EAAE,WAAW,CAAC,EAAE,CAAC,WAAW,CAAC,QAAQ,CAAC;;oEAC1B;sCAnHjD,2BAA2B;IADvC,IAAA,gBAAM,EAAC,wBAAwB,CAAC;;GACpB,2BAA2B,CAkzBvC"}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { Activity, Skill, Topic } from '@driveup/common';
|
|
2
|
+
import { TrackableEntity } from '../../../utils/trackable';
|
|
3
|
+
import { StudentTrainingTopicEntity } from '../../student/program/training/topic.entity';
|
|
2
4
|
import { CompanyEntity } from '../company.entity';
|
|
3
5
|
import { CompanyProductEntity } from '../product/product.entity';
|
|
4
6
|
import { CompanyCourseEntity } from './course.entity';
|
|
5
7
|
import { CompanyCourseLessonEntity } from './lesson.entity';
|
|
6
|
-
import { StudentTrainingTopicEntity } from '../../student/program/training/topic.entity';
|
|
7
|
-
import { TrackableEntity } from '../../../utils/trackable';
|
|
8
8
|
/**
|
|
9
9
|
* Company Course Topic Entity
|
|
10
10
|
*
|
|
@@ -36,6 +36,10 @@ export declare class CompanyCourseTopicEntity extends TrackableEntity<Topic> {
|
|
|
36
36
|
* Sort order for displaying topics within a lesson
|
|
37
37
|
*/
|
|
38
38
|
sort: number;
|
|
39
|
+
/**
|
|
40
|
+
* The date on which the topic was marked as deleted, and because of related training topics, it is not deleted in the db, and only deactivatedOn is set
|
|
41
|
+
*/
|
|
42
|
+
deactivatedOn: Date;
|
|
39
43
|
/**
|
|
40
44
|
* List of skills covered in this topic
|
|
41
45
|
*/
|
|
@@ -11,16 +11,16 @@ var __metadata = (this && this.__metadata) || function (k, v) {
|
|
|
11
11
|
var CompanyCourseTopicEntity_1;
|
|
12
12
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
13
|
exports.CompanyCourseTopicEntity = void 0;
|
|
14
|
-
const typeorm_1 = require("typeorm");
|
|
15
|
-
const shared_1 = require("@driveup/shared");
|
|
16
14
|
const common_1 = require("@driveup/common");
|
|
15
|
+
const shared_1 = require("@driveup/shared");
|
|
16
|
+
const typeorm_1 = require("typeorm");
|
|
17
|
+
const activity_helper_1 = require("../../../utils/activity.helper");
|
|
18
|
+
const trackable_1 = require("../../../utils/trackable");
|
|
19
|
+
const topic_entity_1 = require("../../student/program/training/topic.entity");
|
|
17
20
|
const company_entity_1 = require("../company.entity");
|
|
18
21
|
const product_entity_1 = require("../product/product.entity");
|
|
19
22
|
const course_entity_1 = require("./course.entity");
|
|
20
23
|
const lesson_entity_1 = require("./lesson.entity");
|
|
21
|
-
const topic_entity_1 = require("../../student/program/training/topic.entity");
|
|
22
|
-
const trackable_1 = require("../../../utils/trackable");
|
|
23
|
-
const activity_helper_1 = require("../../../utils/activity.helper");
|
|
24
24
|
/**
|
|
25
25
|
* Company Course Topic Entity
|
|
26
26
|
*
|
|
@@ -120,6 +120,13 @@ __decorate([
|
|
|
120
120
|
}),
|
|
121
121
|
__metadata("design:type", Number)
|
|
122
122
|
], CompanyCourseTopicEntity.prototype, "sort", void 0);
|
|
123
|
+
__decorate([
|
|
124
|
+
(0, typeorm_1.Column)({
|
|
125
|
+
nullable: true,
|
|
126
|
+
default: null
|
|
127
|
+
}),
|
|
128
|
+
__metadata("design:type", Date)
|
|
129
|
+
], CompanyCourseTopicEntity.prototype, "deactivatedOn", void 0);
|
|
123
130
|
__decorate([
|
|
124
131
|
(0, typeorm_1.Column)({
|
|
125
132
|
type: 'json',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"topic.entity.js","sourceRoot":"","sources":["../../../../src/profile/company/course/topic.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,
|
|
1
|
+
{"version":3,"file":"topic.entity.js","sourceRoot":"","sources":["../../../../src/profile/company/course/topic.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,4CAAyD;AACzD,4CA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AAM,EAAE,CAAC;IACZ,CAAC;IAED,KAAK,CAAC,SAAS;QACd,OAAO,MAAM,IAAI,CAAC,MAAM,CAAC;IAC1B,CAAC;CACD,CAAA;AA3IY,4DAAwB;AAMpC;IADC,IAAA,gBAAM,GAAE;;0DACQ;AAMjB;IADC,IAAA,gBAAM,GAAE;;uDACK;AAUd;IALC,IAAA,gBAAM,EAAC;QACP,IAAI,EAAE,YAAY;QAClB,QAAQ,EAAE,IAAI;QACd,OAAO,EAAE,IAAI;KACb,CAAC;;6DACkB;AASpB;IAJC,IAAA,gBAAM,EAAC;QACP,QAAQ,EAAE,IAAI;QACd,OAAO,EAAE,IAAI;KACb,CAAC;;0DACe;AAUjB;IALC,IAAA,gBAAM,EAAC;QACP,IAAI,EAAE,SAAS;QACf,QAAQ,EAAE,IAAI;QACd,OAAO,EAAE,IAAI;KACb,CAAC;;sDACW;AASb;IAJC,IAAA,gBAAM,EAAC;QACP,QAAQ,EAAE,IAAI;QACd,OAAO,EAAE,IAAI;KACb,CAAC;8BACa,IAAI;+DAAC;AAUpB;IALC,IAAA,gBAAM,EAAC;QACP,IAAI,EAAE,MAAM;QACZ,QAAQ,EAAE,IAAI;QACd,OAAO,EAAE,IAAI;KACb,CAAC;;wDACc;AAMhB;IADC,IAAA,mBAAS,EAAC,GAAG,EAAE,CAAC,yCAAyB,EAAE,MAAM,CAAC,EAAE,CAAC,MAAM,CAAC,MAAM,CAAC;;wDACzB;AAS3C;IADC,IAAA,mBAAS,EAAC,GAAG,EAAE,CAAC,yCAA0B,EAAE,KAAK,CAAC,EAAE,CAAC,KAAK,CAAC,KAAK,CAAC;;+DACb;mCA3EzC,wBAAwB;IADpC,IAAA,gBAAM,EAAC,qBAAqB,CAAC;;GACjB,wBAAwB,CA2IpC"}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
+
import { Activity, Bill } from '@driveup/common';
|
|
1
2
|
import { BillStatus } from '@driveup/shared';
|
|
2
|
-
import {
|
|
3
|
+
import { TrackableEntity } from '../../../../utils/trackable';
|
|
3
4
|
import { CompanyEntity } from '../../company.entity';
|
|
4
|
-
import { CompanyBillTransactionEntity } from './transaction.entity';
|
|
5
5
|
import { CompanyBillItemEntity } from './item.entity';
|
|
6
|
-
import {
|
|
6
|
+
import { CompanyBillTransactionEntity } from './transaction.entity';
|
|
7
7
|
/**
|
|
8
8
|
* Entity representing a company's billing statement for a specific period.
|
|
9
9
|
*
|
|
@@ -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.CompanyBillEntity = 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
|
+
const activity_helper_1 = require("../../../../utils/activity.helper");
|
|
17
|
+
const trackable_1 = require("../../../../utils/trackable");
|
|
16
18
|
const company_entity_1 = require("../../company.entity");
|
|
17
|
-
const transaction_entity_1 = require("./transaction.entity");
|
|
18
19
|
const item_entity_1 = require("./item.entity");
|
|
19
|
-
const
|
|
20
|
-
const activity_helper_1 = require("../../../../utils/activity.helper");
|
|
20
|
+
const transaction_entity_1 = require("./transaction.entity");
|
|
21
21
|
/**
|
|
22
22
|
* Entity representing a company's billing statement for a specific period.
|
|
23
23
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bill.entity.js","sourceRoot":"","sources":["../../../../../src/profile/company/finances/billing/bill.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qCAA+D;
|
|
1
|
+
{"version":3,"file":"bill.entity.js","sourceRoot":"","sources":["../../../../../src/profile/company/finances/billing/bill.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,4CAA8D;AAC9D,4CAA2D;AAC3D,qCAA+D;AAE/D,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AE,CAAC;KACV,CAAC;;yDACqB;AAWvB;IAJC,IAAA,gBAAM,EAAC;QACP,QAAQ,EAAE,IAAI;QACd,OAAO,EAAE,IAAI;KACb,CAAC;;2DACuB;AAWzB;IAJC,IAAA,gBAAM,EAAC;QACP,QAAQ,EAAE,IAAI;QACd,OAAO,EAAE,IAAI;KACb,CAAC;;4DACwB;AAW1B;IAJC,IAAA,gBAAM,EAAC;QACP,QAAQ,EAAE,IAAI;QACd,OAAO,EAAE,IAAI;KACb,CAAC;;mEAC+B;AAgBjC;IAPC,IAAA,gBAAM,EAAC;QACP,IAAI,EAAE,SAAS;QACf,SAAS,EAAE,CAAC;QACZ,KAAK,EAAE,CAAC;QACR,QAAQ,EAAE,KAAK;QACf,OAAO,EAAE,CAAC;KACV,CAAC;;sDACkB;AAMpB;IADC,IAAA,mBAAS,EAAC,GAAG,EAAE,CAAC,8BAAa,EAAE,OAAO,CAAC,EAAE,CAAC,OAAO,CAAC,KAAK,CAAC;;kDACzB;AAMhC;IADC,IAAA,mBAAS,EAAC,GAAG,EAAE,CAAC,mCAAqB,EAAE,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,IAAI,CAAC;;gDAClB;AAMxC;IADC,IAAA,mBAAS,EAAC,GAAG,EAAE,CAAC,iDAA4B,EAAE,OAAO,CAAC,EAAE,CAAC,OAAO,CAAC,IAAI,CAAC;;uDACjB;4BA5L1C,iBAAiB;IAD7B,IAAA,gBAAM,EAAC,cAAc,CAAC;;GACV,iBAAiB,CA4R7B"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { Activity, BillItem } from '@driveup/common';
|
|
2
|
-
import {
|
|
2
|
+
import { TrackableEntity } from '../../../../utils/trackable';
|
|
3
3
|
import { CompanyCourseEntity } from '../../course/course.entity';
|
|
4
4
|
import { CompanyAddonEntity } from '../../product/addon.entity';
|
|
5
|
-
import {
|
|
5
|
+
import { CompanyBillEntity } from './bill.entity';
|
|
6
6
|
export declare class CompanyBillItemEntity extends TrackableEntity<BillItem> {
|
|
7
7
|
billId: number;
|
|
8
8
|
/**
|