scheduler-models 1.3.36 → 1.3.38

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "scheduler-models",
3
- "version": "1.3.36",
3
+ "version": "1.3.38",
4
4
  "main": "index.js",
5
5
  "types": "index.d.ts",
6
6
  "files": [
@@ -0,0 +1,3 @@
1
+ export * from './scheduleDay';
2
+ export * from './scheduleEmployee';
3
+ export * from './scheduleWorkcenter';
@@ -0,0 +1,20 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./scheduleDay"), exports);
18
+ __exportStar(require("./scheduleEmployee"), exports);
19
+ __exportStar(require("./scheduleWorkcenter"), exports);
20
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/scheduler/sites/schedule/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,gDAA8B;AAC9B,qDAAmC;AACnC,uDAAqC"}
@@ -0,0 +1,10 @@
1
+ export interface IScheduleDay {
2
+ id: number;
3
+ code: string;
4
+ }
5
+ export declare class ScheduleDay implements IScheduleDay {
6
+ id: number;
7
+ code: string;
8
+ constructor(day?: IScheduleDay);
9
+ compareTo(other?: ScheduleDay): number;
10
+ }
@@ -0,0 +1,19 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ScheduleDay = void 0;
4
+ class ScheduleDay {
5
+ id;
6
+ code;
7
+ constructor(day) {
8
+ this.id = (day) ? day.id : 0;
9
+ this.code = (day) ? day.code : '';
10
+ }
11
+ compareTo(other) {
12
+ if (other) {
13
+ return (this.id < other.id) ? -1 : 1;
14
+ }
15
+ return 0;
16
+ }
17
+ }
18
+ exports.ScheduleDay = ScheduleDay;
19
+ //# sourceMappingURL=scheduleDay.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"scheduleDay.js","sourceRoot":"","sources":["../../../../src/scheduler/sites/schedule/scheduleDay.ts"],"names":[],"mappings":";;;AAKA,MAAa,WAAW;IACf,EAAE,CAAS;IACX,IAAI,CAAS;IAEpB,YAAY,GAAkB;QAC5B,IAAI,CAAC,EAAE,GAAG,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC;QAC7B,IAAI,CAAC,IAAI,GAAG,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC;IACpC,CAAC;IAED,SAAS,CAAC,KAAmB;QAC3B,IAAI,KAAK,EAAE,CAAC;YACV,OAAO,CAAC,IAAI,CAAC,EAAE,GAAG,KAAK,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QACvC,CAAC;QACD,OAAO,CAAC,CAAC;IACX,CAAC;CACF;AAfD,kCAeC"}
@@ -0,0 +1,13 @@
1
+ import { IScheduleDay, ScheduleDay } from "./scheduleDay";
2
+ export interface IScheduleEmployee {
3
+ id: number;
4
+ name: string;
5
+ days: IScheduleDay[];
6
+ }
7
+ export declare class ScheduleEmployee implements IScheduleEmployee {
8
+ id: number;
9
+ name: string;
10
+ days: ScheduleDay[];
11
+ constructor(emp?: IScheduleEmployee);
12
+ compareTo(other?: ScheduleEmployee): number;
13
+ }
@@ -0,0 +1,28 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ScheduleEmployee = void 0;
4
+ const scheduleDay_1 = require("./scheduleDay");
5
+ class ScheduleEmployee {
6
+ id;
7
+ name;
8
+ days;
9
+ constructor(emp) {
10
+ this.id = (emp) ? emp.id : 0;
11
+ this.name = (emp) ? emp.name : '';
12
+ this.days = [];
13
+ if (emp && emp.days.length > 0) {
14
+ emp.days.forEach(day => {
15
+ this.days.push(new scheduleDay_1.ScheduleDay(day));
16
+ });
17
+ this.days.sort((a, b) => a.compareTo(b));
18
+ }
19
+ }
20
+ compareTo(other) {
21
+ if (other) {
22
+ return (this.id < other.id) ? -1 : 1;
23
+ }
24
+ return 0;
25
+ }
26
+ }
27
+ exports.ScheduleEmployee = ScheduleEmployee;
28
+ //# sourceMappingURL=scheduleEmployee.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"scheduleEmployee.js","sourceRoot":"","sources":["../../../../src/scheduler/sites/schedule/scheduleEmployee.ts"],"names":[],"mappings":";;;AAAA,+CAA0D;AAQ1D,MAAa,gBAAgB;IACpB,EAAE,CAAS;IACX,IAAI,CAAS;IACb,IAAI,CAAgB;IAE3B,YAAY,GAAuB;QACjC,IAAI,CAAC,EAAE,GAAG,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC;QAC7B,IAAI,CAAC,IAAI,GAAG,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC;QAClC,IAAI,CAAC,IAAI,GAAG,EAAE,CAAC;QACf,IAAI,GAAG,IAAI,GAAG,CAAC,IAAI,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;YAC/B,GAAG,CAAC,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,EAAE;gBACrB,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,yBAAW,CAAC,GAAG,CAAC,CAAC,CAAC;YACvC,CAAC,CAAC,CAAC;YACH,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,EAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC;QAC1C,CAAC;IACH,CAAC;IAED,SAAS,CAAC,KAAwB;QAChC,IAAI,KAAK,EAAE,CAAC;YACV,OAAO,CAAC,IAAI,CAAC,EAAE,GAAG,KAAK,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QACvC,CAAC;QACD,OAAO,CAAC,CAAC;IACX,CAAC;CACF;AAvBD,4CAuBC"}
@@ -0,0 +1,13 @@
1
+ import { IScheduleEmployee, ScheduleEmployee } from "./scheduleEmployee";
2
+ export interface IScheduleWorkcenter {
3
+ id: number;
4
+ name: string;
5
+ employees: IScheduleEmployee[];
6
+ }
7
+ export declare class ScheduleWorkcenter {
8
+ id: number;
9
+ name: string;
10
+ employees: ScheduleEmployee[];
11
+ constructor(wc?: IScheduleWorkcenter);
12
+ compareTo(other?: ScheduleWorkcenter): number;
13
+ }
@@ -0,0 +1,28 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ScheduleWorkcenter = void 0;
4
+ const scheduleEmployee_1 = require("./scheduleEmployee");
5
+ class ScheduleWorkcenter {
6
+ id;
7
+ name;
8
+ employees;
9
+ constructor(wc) {
10
+ this.id = (wc) ? wc.id : 0;
11
+ this.name = (wc) ? wc.name : '';
12
+ this.employees = [];
13
+ if (wc && wc.employees.length > 0) {
14
+ wc.employees.forEach(emp => {
15
+ this.employees.push(new scheduleEmployee_1.ScheduleEmployee(emp));
16
+ });
17
+ this.employees.sort((a, b) => a.compareTo(b));
18
+ }
19
+ }
20
+ compareTo(other) {
21
+ if (other) {
22
+ return (this.id < other.id) ? -1 : 1;
23
+ }
24
+ return 0;
25
+ }
26
+ }
27
+ exports.ScheduleWorkcenter = ScheduleWorkcenter;
28
+ //# sourceMappingURL=scheduleWorkcenter.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"scheduleWorkcenter.js","sourceRoot":"","sources":["../../../../src/scheduler/sites/schedule/scheduleWorkcenter.ts"],"names":[],"mappings":";;;AAAA,yDAAyE;AAQzE,MAAa,kBAAkB;IACtB,EAAE,CAAS;IACX,IAAI,CAAS;IACb,SAAS,CAAqB;IAErC,YAAY,EAAwB;QAClC,IAAI,CAAC,EAAE,GAAG,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC;QAC3B,IAAI,CAAC,IAAI,GAAG,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC;QAChC,IAAI,CAAC,SAAS,GAAG,EAAE,CAAC;QACpB,IAAI,EAAE,IAAI,EAAE,CAAC,SAAS,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;YAClC,EAAE,CAAC,SAAS,CAAC,OAAO,CAAC,GAAG,CAAC,EAAE;gBACzB,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,IAAI,mCAAgB,CAAC,GAAG,CAAC,CAAC,CAAC;YACjD,CAAC,CAAC,CAAC;YACH,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC,CAAC,EAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC;QAC/C,CAAC;IACH,CAAC;IAED,SAAS,CAAC,KAA0B;QAClC,IAAI,KAAK,EAAE,CAAC;YACV,OAAO,CAAC,IAAI,CAAC,EAAE,GAAG,KAAK,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QACvC,CAAC;QACD,OAAO,CAAC,CAAC;IACX,CAAC;CACF;AAvBD,gDAuBC"}