@movalib/movalib-commons 1.49.0 → 1.50.0

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.
@@ -1,11 +1,13 @@
1
- import { PrestationType } from "../helpers/Enums";
2
1
  import Absence from "./Absence";
2
+ import Prestation from "./Prestation";
3
3
  import Role from "./Role";
4
4
  import Schedule from "./Schedule";
5
5
  import User from "./User";
6
6
  export default class Employee extends User {
7
+ firstname: string;
8
+ lastname: string;
7
9
  absences: Absence[];
8
- prestationTypes: PrestationType[];
10
+ prestations: Prestation[];
9
11
  schedules: Schedule[];
10
- constructor(id: string, roles: Role[] | undefined, firstname: string | undefined, lastname: string | undefined, avatar: string | undefined, absences: Absence[], prestationTypes?: PrestationType[], schedules?: Schedule[]);
12
+ constructor(id: string, roles: Role[] | undefined, firstname: string | undefined, lastname: string | undefined, avatar: string | undefined, absences: Absence[], prestations?: Prestation[], schedules?: Schedule[]);
11
13
  }
@@ -21,16 +21,18 @@ Object.defineProperty(exports, "__esModule", { value: true });
21
21
  var User_1 = __importDefault(require("./User"));
22
22
  var Employee = /** @class */ (function (_super) {
23
23
  __extends(Employee, _super);
24
- function Employee(id, roles, firstname, lastname, avatar, absences, prestationTypes, schedules) {
24
+ function Employee(id, roles, firstname, lastname, avatar, absences, prestations, schedules) {
25
25
  if (roles === void 0) { roles = []; }
26
26
  if (firstname === void 0) { firstname = ''; }
27
27
  if (lastname === void 0) { lastname = ''; }
28
28
  if (avatar === void 0) { avatar = ''; }
29
- if (prestationTypes === void 0) { prestationTypes = []; }
29
+ if (prestations === void 0) { prestations = []; }
30
30
  if (schedules === void 0) { schedules = []; }
31
31
  var _this = _super.call(this, id, roles, firstname, lastname, avatar) || this;
32
+ _this.firstname = '';
33
+ _this.lastname = '';
32
34
  _this.absences = absences;
33
- _this.prestationTypes = prestationTypes;
35
+ _this.prestations = prestations;
34
36
  _this.schedules = schedules;
35
37
  return _this;
36
38
  }
@@ -37,5 +37,6 @@ export default class Garage {
37
37
  documents?: Document[];
38
38
  subscriptions?: Subscription[];
39
39
  supportPhoneNumber?: string;
40
+ operatorsActive?: boolean;
40
41
  constructor(id: string, adminId: string, name: string, address: Address, workforce: number, prestations: Prestation[], schedules: Schedule[], contactPhone: string, contactEmail?: string, logo?: string, suppliers?: Supplier[], documents?: Document[], subscriptions?: Subscription[]);
41
42
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@movalib/movalib-commons",
3
- "version": "1.49.0",
3
+ "version": "1.50.0",
4
4
  "description": "Bibliothèque d'objets communs à l'ensemble des projets React de Movalib",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -1,17 +1,19 @@
1
1
  import { PrestationType } from "../helpers/Enums";
2
2
  import Absence from "./Absence";
3
3
  import Address from "./Address";
4
+ import Prestation from "./Prestation";
4
5
  import Role from "./Role";
5
6
  import Schedule from "./Schedule";
6
7
  import User from "./User";
7
8
 
8
9
 
9
10
  export default class Employee extends User {
10
-
11
+ firstname: string = '';
12
+ lastname: string = '';
11
13
  // Liste des périodes de congés du collab
12
14
  absences: Absence[];
13
15
  // Listes des types de prestation qu'il peut réaliser
14
- prestationTypes: PrestationType[];
16
+ prestations: Prestation[];
15
17
  // Horaires de travail
16
18
  schedules: Schedule[];
17
19
 
@@ -22,13 +24,13 @@ export default class Employee extends User {
22
24
  lastname: string = '',
23
25
  avatar: string = '',
24
26
  absences: Absence[],
25
- prestationTypes: PrestationType[] = [],
27
+ prestations: Prestation[] = [],
26
28
  schedules: Schedule [] = []) {
27
29
 
28
30
  super(id, roles, firstname, lastname, avatar);
29
31
 
30
32
  this.absences = absences;
31
- this.prestationTypes = prestationTypes;
33
+ this.prestations = prestations;
32
34
  this.schedules = schedules;
33
35
  }
34
36
  }
@@ -39,6 +39,7 @@ export default class Garage {
39
39
  documents?: Document[];
40
40
  subscriptions?: Subscription[];
41
41
  supportPhoneNumber?: string;
42
+ operatorsActive?: boolean;
42
43
 
43
44
  constructor(
44
45
  id:string,