@royalschedule/maps 2.2.88 → 2.2.90
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/dist/Admentum/from/courses.js +1 -1
- package/dist/Admentum/from/courses.js.map +1 -1
- package/dist/Admentum/from/schedules.js +1 -1
- package/dist/Admentum/from/schedules.js.map +1 -1
- package/dist/Admentum/to/schedules.d.ts +1 -1
- package/dist/Admentum/types/course-sections.d.ts +1 -1
- package/dist/Admentum/types/courses.d.ts +1 -1
- package/dist/Admentum/types/lessons.d.ts +2 -2
- package/dist/Admentum/types/primary-groups.d.ts +1 -1
- package/dist/Admentum/types/rooms.d.ts +1 -1
- package/dist/Admentum/types/schedule-groups.d.ts +2 -2
- package/dist/Admentum/types/schedules.d.ts +1 -1
- package/dist/Admentum/types/schools.d.ts +1 -1
- package/dist/Admentum/types/users.d.ts +1 -1
- package/dist/PlanDigital/types/index.d.ts +4 -4
- package/dist/RS/v0/from/placements.d.ts +1 -1
- package/dist/RS/v0/to/course-events/days.d.ts +1 -1
- package/dist/RS/v0/to/course-events/dependencies.d.ts +1 -1
- package/dist/RS/v0/to/course-events/groups.d.ts +2 -2
- package/dist/RS/v0/to/course-events/intervals.d.ts +1 -1
- package/dist/RS/v0/to/course-events/meta.d.ts +1 -1
- package/dist/RS/v0/types/break-lengths.d.ts +2 -2
- package/dist/RS/v0/types/configurations.d.ts +1 -1
- package/dist/RS/v0/types/groups.d.ts +1 -1
- package/dist/RS/v0/types/out-options.d.ts +1 -1
- package/dist/RS/v0/types/schedules.d.ts +1 -1
- package/dist/RS/v1/from/placements.d.ts +1 -1
- package/dist/RS/v1/to/course-events/days.d.ts +1 -1
- package/dist/RS/v1/to/course-events/dependencies.d.ts +1 -1
- package/dist/RS/v1/to/course-events/groups.d.ts +1 -1
- package/dist/RS/v1/to/course-events/intervals.d.ts +1 -1
- package/dist/RS/v1/to/course-events/meta.d.ts +1 -1
- package/dist/RS/v1/types/break-lengths.d.ts +2 -2
- package/dist/RS/v1/types/configurations.d.ts +1 -1
- package/dist/RS/v1/types/groups.d.ts +1 -1
- package/dist/RS/v1/types/out-options.d.ts +1 -1
- package/dist/RS/v1/types/schedules.d.ts +1 -1
- package/dist/RS/v2/from/collections.js.map +1 -1
- package/dist/RS/v2/from/course-events.d.ts +1 -1
- package/dist/RS/v2/from/placements.d.ts +1 -1
- package/dist/RS/v2/to/course-events/days.d.ts +1 -1
- package/dist/RS/v2/to/course-events/dependencies.d.ts +1 -1
- package/dist/RS/v2/to/course-events/groups.d.ts +1 -1
- package/dist/RS/v2/to/course-events/intervals.d.ts +1 -1
- package/dist/RS/v2/to/course-events/meta.d.ts +1 -1
- package/dist/RS/v2/types/break-lengths.d.ts +2 -2
- package/dist/RS/v2/types/configurations.d.ts +1 -1
- package/dist/RS/v2/types/groups.d.ts +1 -1
- package/dist/RS/v2/types/out-options.d.ts +1 -1
- package/dist/RS/v2/types/schedules.d.ts +1 -1
- package/dist/SS12000/to/activities.d.ts +1 -1
- package/dist/SS12000/to/calendar-events.d.ts +1 -1
- package/dist/SS12000/types/activities.d.ts +1 -1
- package/dist/SS12000/types/calendar-events.d.ts +1 -1
- package/dist/SS12000/types/codes.d.ts +7 -7
- package/dist/SS12000/types/duties.d.ts +1 -1
- package/dist/SS12000/types/duty-assignments.d.ts +1 -1
- package/dist/SS12000/types/groups.d.ts +1 -1
- package/dist/SS12000/types/organisation.d.ts +1 -1
- package/dist/SS12000/types/persons.d.ts +1 -1
- package/dist/SS12000/types/resources.d.ts +1 -1
- package/dist/SS12000/types/rooms.d.ts +1 -1
- package/dist/SchoolSoft/api/types/group.d.ts +1 -1
- package/dist/SchoolSoft/api/types/lesson.d.ts +1 -1
- package/dist/SchoolSoft/api/types/location.d.ts +1 -1
- package/dist/SchoolSoft/api/types/schedule.d.ts +1 -1
- package/dist/SchoolSoft/api/types/teacher.d.ts +1 -1
- package/dist/SchoolSoft/file/types/events.d.ts +2 -2
- package/dist/SchoolSoft/file/types/index.d.ts +1 -1
- package/dist/core/to/courses.js +11 -3
- package/dist/core/to/courses.js.map +1 -1
- package/dist/core/to/events.js +11 -3
- package/dist/core/to/events.js.map +1 -1
- package/dist/core/types/available-locations.d.ts +1 -1
- package/dist/core/types/break-lengths.d.ts +1 -1
- package/dist/core/types/common/index.d.ts +10 -10
- package/dist/core/types/course-events.d.ts +4 -0
- package/dist/core/types/courses.d.ts +4 -0
- package/dist/core/types/index.d.ts +2 -0
- package/dist/core/types/periods.d.ts +17 -0
- package/dist/core/types/{students.js → periods.js} +1 -1
- package/dist/core/types/periods.js.map +1 -0
- package/dist/identify/types/index.d.ts +3 -3
- package/dist/vKlass/types/index.d.ts +8 -8
- package/package.json +2 -2
- package/dist/core/types/students.d.ts +0 -8
- package/dist/core/types/students.js.map +0 -1
|
@@ -20,7 +20,7 @@ function _default(scheduledGroups, school, importErrors, importWarnings) {
|
|
|
20
20
|
courses.push({
|
|
21
21
|
ids: scheduledGroup.id.toString(),
|
|
22
22
|
displayName: scheduledGroup.name,
|
|
23
|
-
subject: subjects
|
|
23
|
+
subject: subjects.map(x => x.name).join(', '),
|
|
24
24
|
groups: scheduledGroup.users_primary_groups.map(x => x.toString()),
|
|
25
25
|
teachers: scheduledGroup.teachers.map(x => x.id.toString())
|
|
26
26
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"courses.js","mappings":";;;;;;AAIc,kBACZA,eAAgC,EAChCC,MAAuB,EACvBC,YAAyB,EACzBC,cAAyB;EAGzB,IAAIC,OAAO,GAAmB,EAAE;EAEhCJ,eAAe,CAACK,OAAO,CAACC,cAAc,IAAG;IAKvC,IAAIC,QAAQ,GAAGN,MAAM,CAACO,WAAW,IAAI,IAAI,GAAGF,cAAc,CAACC,QAAQ,GAAGD,cAAc,CAACF,OAAO;IAC5F,IAAIG,QAAQ,CAACE,MAAM,IAAI,CAAC,EAAE;MACxB,IAAIC,IAAI,kCAA0BJ,cAAc,CAACK,IAAI,0BAAcL,cAAc,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AAIJ,cAAc,CAACQ,QAAQ,CAACL,MAAM,IAAI,CAAC,EAAE;MACvC,IAAIC,KAAI,kCAA0BJ,cAAc,CAACK,IAAI,0BAAcL,cAAc,CAACM,EAAE,qCAAiC;MACrHT,cAAc,CAACU,IAAI,CAACH,KAAI,CAAC;;IAI3BN,OAAO,CAACS,IAAI,CAAC;MACXE,GAAG,EAAUT,cAAc,CAACM,EAAE,CAACI,QAAQ,EAAE;MACzCC,WAAW,EAAEX,cAAc,CAACK,IAAI;MAChCO,OAAO,EAAMX,QAAQ,CAACY,GAAG,CAACC,CAAC,IAAIA,CAAC,CAACT,IAAI,CAAC,CAACU,IAAI,CAAC,IAAI,CAAC;MACjDC,MAAM,EAAOhB,cAAc,CAACiB,oBAAoB,CAACJ,GAAG,CAACC,CAAC,IAAIA,CAAC,CAACJ,QAAQ,EAAE,CAAC;MACvEF,QAAQ,EAAKR,cAAc,CAACQ,QAAQ,CAACK,GAAG,CAACC,CAAC,IAAIA,CAAC,CAACR,EAAE,CAACI,QAAQ,EAAE;KAC9D,CAAC;EAEJ,CAAC,CAAC;EAEF,OAAOZ,OAAO;AAChB","names":["scheduledGroups","school","importErrors","importWarnings","courses","forEach","scheduledGroup","subjects","school_type","length","warn","name","id","push","teachers","ids","toString","displayName","subject","map","x","join","groups","users_primary_groups"],"sourceRoot":"","sources":["../../../src/Admentum/from/courses.ts"],"sourcesContent":[null]}
|
|
@@ -17,7 +17,7 @@ function _default(schedule) {
|
|
|
17
17
|
if (schedule.schools.length != 1) {
|
|
18
18
|
return {
|
|
19
19
|
meta: {
|
|
20
|
-
errors: ["
|
|
20
|
+
errors: ["Received ".concat(schedule.schools.length, " number of schools: only a single school is allowed.")]
|
|
21
21
|
}
|
|
22
22
|
};
|
|
23
23
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schedules.js","mappings":";;;;;;AAEA;AACA;AACA;AACA;AACA;AAAkC;AAAA;AAAA;AAAA;AAKpB,kBACZA,QAAgF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AM,GAA+B,oBAAO,EAAIf,QAAQ,CAACW,OAAO,EAAEG,OAAO,EAAEL,QAAQ,EAASL,MAAM,EAAEE,QAAQ,CAAC;EAEnH,OAAO;IAAEC,SAAS;IAAEE,QAAQ;IAAEG,MAAM;IAAEE,OAAO;IAAEC,MAAM;IAC5CZ,IAAI,kCACGC,MAAM,CAACF,MAAM,GAAK;MAAEE,MAAM,EAAIA;IAAM,CAAI,GAAG,EAAG,GAC9CE,QAAQ,CAACJ,MAAM,GAAG;MAAEI,QAAQ,EAAEA;IAAQ,CAAE,GAAG,EAAG;GAEtD;AACV","names":["schedule","schools","length","meta","errors","school","warnings","locations","rooms","teachers","schedule_groups","lessons","groups","primary_groups","courses","events"],"sourceRoot":"","sources":["../../../src/Admentum/from/schedules.ts"],"sourcesContent":[null]}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import XLSX from 'xlsx';
|
|
2
2
|
import { CourseEvent } from '../../core/types/course-events';
|
|
3
3
|
import { Deserialized } from '../../core/types/common';
|
|
4
|
-
|
|
4
|
+
type Options = {
|
|
5
5
|
inWeek: string;
|
|
6
6
|
};
|
|
7
7
|
declare const _default: (courseEvents: Deserialized<CourseEvent>[], options?: Options) => XLSX.WorkBook;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { User } from './users';
|
|
2
|
-
export
|
|
2
|
+
export type LessonInfo = {
|
|
3
3
|
start: string;
|
|
4
4
|
end: string;
|
|
5
5
|
duration: number;
|
|
@@ -13,7 +13,7 @@ export declare type LessonInfo = {
|
|
|
13
13
|
id: number;
|
|
14
14
|
}[];
|
|
15
15
|
};
|
|
16
|
-
export
|
|
16
|
+
export type Lesson = {
|
|
17
17
|
id: number;
|
|
18
18
|
weekday: number;
|
|
19
19
|
date: string;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { User } from "./users";
|
|
2
2
|
import { Course } from "./courses";
|
|
3
3
|
import { Schedule } from "./schedules";
|
|
4
|
-
|
|
4
|
+
type Subject = {
|
|
5
5
|
id: number;
|
|
6
6
|
name: string;
|
|
7
7
|
};
|
|
8
|
-
export
|
|
8
|
+
export type ScheduleGroup = {
|
|
9
9
|
id: number;
|
|
10
10
|
eid: number | null;
|
|
11
11
|
school_id: number;
|
|
@@ -3,7 +3,7 @@ import { Room } from './rooms';
|
|
|
3
3
|
import { PrimaryGroup } from './primary-groups';
|
|
4
4
|
import { ScheduleGroup } from './schedule-groups';
|
|
5
5
|
import { Lesson } from './lessons';
|
|
6
|
-
export
|
|
6
|
+
export type Schedule = {
|
|
7
7
|
start_date: Date;
|
|
8
8
|
end_date: Date;
|
|
9
9
|
school_year: {
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
export
|
|
1
|
+
export type Options = {
|
|
2
2
|
selectedPeriods?: string[];
|
|
3
3
|
displayName?: 'Gruppnamn' | 'Kursnamn';
|
|
4
4
|
};
|
|
5
|
-
|
|
5
|
+
type Period = {
|
|
6
6
|
Namn: string;
|
|
7
7
|
Tidsenhet: 'Timmar/Period' | 'Minuter/Vecka';
|
|
8
8
|
};
|
|
9
|
-
|
|
9
|
+
type Course = {
|
|
10
10
|
Gruppnamn: string;
|
|
11
11
|
Klass: string;
|
|
12
12
|
Kurskod: string;
|
|
@@ -18,7 +18,7 @@ declare type Course = {
|
|
|
18
18
|
Ämne: string;
|
|
19
19
|
Kursnamn: string;
|
|
20
20
|
};
|
|
21
|
-
|
|
21
|
+
type Schedule = {
|
|
22
22
|
'Perioder': Period[];
|
|
23
23
|
'Tabell Tjänstefördelning': Course[];
|
|
24
24
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Placement } from '../types/placements';
|
|
2
2
|
import { CourseEvent } from '../../../core/types/course-events';
|
|
3
|
-
|
|
3
|
+
type Options = {
|
|
4
4
|
idKey?: '_id' | 'id' | 'ids';
|
|
5
5
|
};
|
|
6
6
|
declare const _default: (events: Placement[], options?: Options) => CourseEvent[];
|
|
@@ -2,7 +2,7 @@ import { CourseEvent as SourceCourseEvent } from '../../../../core/types/course-
|
|
|
2
2
|
import { DivisionSettings } from '../../../../core/types/division-settings';
|
|
3
3
|
import { OutOptions } from '../../types/out-options';
|
|
4
4
|
import { Day } from '../../types/days';
|
|
5
|
-
|
|
5
|
+
type Output = {
|
|
6
6
|
days: Day[] | null;
|
|
7
7
|
};
|
|
8
8
|
export default function (event: SourceCourseEvent, settings: DivisionSettings, options: OutOptions): Output | undefined;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { AvailableLocation } from '../../../../core/types/available-locations';
|
|
2
2
|
import { CourseEvent as SourceCourseEvent } from '../../../../core/types/course-events';
|
|
3
3
|
import { OutOptions } from '../../types/out-options';
|
|
4
|
-
|
|
4
|
+
type Output = {
|
|
5
5
|
dependencies: AvailableLocation[] | AvailableLocation[][] | null;
|
|
6
6
|
};
|
|
7
7
|
export default function (event: SourceCourseEvent, options: OutOptions): Output | undefined;
|
|
@@ -2,10 +2,10 @@ import { Group as SourceGroup } from '../../../../core/types/groups';
|
|
|
2
2
|
import { Teacher as SourceTeacher } from '../../../../core/types/teachers';
|
|
3
3
|
import { CourseEvent as SourceCourseEvent } from '../../../../core/types/course-events';
|
|
4
4
|
import { OutOptions } from '../../types/out-options';
|
|
5
|
-
|
|
5
|
+
type MergedOutput = {
|
|
6
6
|
groups: (SourceGroup | SourceTeacher)[] | null;
|
|
7
7
|
};
|
|
8
|
-
|
|
8
|
+
type SeparatedOutput = {
|
|
9
9
|
groups?: SourceGroup[] | null;
|
|
10
10
|
teachers?: SourceTeacher[] | null;
|
|
11
11
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { CourseEvent as SourceCourseEvent } from '../../../../core/types/course-events';
|
|
2
2
|
import { OutOptions } from '../../types/out-options';
|
|
3
3
|
import { Interval } from '../../types/intervals';
|
|
4
|
-
|
|
4
|
+
type Output = {
|
|
5
5
|
intervals: Interval[] | null;
|
|
6
6
|
};
|
|
7
7
|
export default function (event: SourceCourseEvent, options: OutOptions): Output | undefined;
|
|
@@ -2,7 +2,7 @@ import moment from 'moment';
|
|
|
2
2
|
import { CourseEvent } from '../../../../core/types/course-events';
|
|
3
3
|
import { BreakLength } from '../../types/break-lengths';
|
|
4
4
|
import { OutOptions } from '../../types/out-options';
|
|
5
|
-
|
|
5
|
+
type Meta = {
|
|
6
6
|
minBreakLength?: BreakLength;
|
|
7
7
|
course?: string;
|
|
8
8
|
name?: string;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { Placement } from './placements';
|
|
2
|
-
export
|
|
2
|
+
export type Configuration = Placement[];
|
|
@@ -2,7 +2,7 @@ import { BreakLength } from './break-lengths';
|
|
|
2
2
|
import { Day } from './days';
|
|
3
3
|
import { LockedTime } from './locked-times';
|
|
4
4
|
import { Interval } from './intervals';
|
|
5
|
-
|
|
5
|
+
type GroupType = 'personal' | 'classes';
|
|
6
6
|
export interface Group {
|
|
7
7
|
id: string;
|
|
8
8
|
group_type: GroupType;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Configuration } from '../types/configurations';
|
|
2
2
|
import { CourseEvent } from '../../../core/types/course-events';
|
|
3
|
-
|
|
3
|
+
type Options = {
|
|
4
4
|
idKey?: '_id' | 'id' | 'ids';
|
|
5
5
|
};
|
|
6
6
|
declare const _default: (configuration: Configuration, options?: Options) => CourseEvent[];
|
|
@@ -2,7 +2,7 @@ import { CourseEvent as SourceCourseEvent } from '../../../../core/types/course-
|
|
|
2
2
|
import { DivisionSettings } from '../../../../core/types/division-settings';
|
|
3
3
|
import { OutOptions } from '../../types/out-options';
|
|
4
4
|
import { Day } from '../../types/days';
|
|
5
|
-
|
|
5
|
+
type Output = {
|
|
6
6
|
days: Day[] | null;
|
|
7
7
|
};
|
|
8
8
|
export default function (event: SourceCourseEvent, settings: DivisionSettings, options: OutOptions): Output | undefined;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { AvailableLocation } from '../../../../core/types/available-locations';
|
|
2
2
|
import { CourseEvent as SourceCourseEvent } from '../../../../core/types/course-events';
|
|
3
3
|
import { OutOptions } from '../../types/out-options';
|
|
4
|
-
|
|
4
|
+
type Output = {
|
|
5
5
|
dependencies: AvailableLocation[] | AvailableLocation[][] | null;
|
|
6
6
|
};
|
|
7
7
|
export default function (event: SourceCourseEvent, options: OutOptions): Output | undefined;
|
|
@@ -2,7 +2,7 @@ import { Group as SourceGroup } from '../../../../core/types/groups';
|
|
|
2
2
|
import { Teacher as SourceTeacher } from '../../../../core/types/teachers';
|
|
3
3
|
import { CourseEvent as SourceCourseEvent } from '../../../../core/types/course-events';
|
|
4
4
|
import { OutOptions } from '../../types/out-options';
|
|
5
|
-
|
|
5
|
+
type MergedOutput = {
|
|
6
6
|
groups: (SourceGroup | SourceTeacher)[][] | null;
|
|
7
7
|
};
|
|
8
8
|
export default function (event: SourceCourseEvent, options: OutOptions): MergedOutput | undefined;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { CourseEvent as SourceCourseEvent } from '../../../../core/types/course-events';
|
|
2
2
|
import { OutOptions } from '../../types/out-options';
|
|
3
3
|
import { Interval } from '../../types/intervals';
|
|
4
|
-
|
|
4
|
+
type Output = {
|
|
5
5
|
intervals: Interval[] | null;
|
|
6
6
|
};
|
|
7
7
|
export default function (event: SourceCourseEvent, options: OutOptions): Output | undefined;
|
|
@@ -2,7 +2,7 @@ import { Day } from './days';
|
|
|
2
2
|
import { LockedTime } from './locked-times';
|
|
3
3
|
import { Interval } from './intervals';
|
|
4
4
|
import { BreakLength } from './break-lengths';
|
|
5
|
-
|
|
5
|
+
type GroupType = 'personal' | 'classes';
|
|
6
6
|
export interface Group {
|
|
7
7
|
id: string;
|
|
8
8
|
group_type: GroupType;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"collections.js","mappings":";;;;;;AAEA;AACA;AACA;AACA;AACA;AACA;AAAkE;AAAA;AAAA;AAAA;AAWlE,SAASA,OAAO,CAACC,MAAwB,EACxBC,YAAsB,EACtBC,UA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AAC,CACP;;IAGD,IAAI,EAAG,QAAQ,IAAItC,MAAM,CAAC,EACxB,OAAO4B,GAAG;IAEZ,OAAOA,GAAG,CAACG,MAAM,CAAChC,OAAO,CAACC,MAAM,EAAEC,YAAY,EAAEC,UAAU,EAAEC,QAAQ,CAAC,CAAC;EACxE,CAAC,EAAE,EAAE,CAAC;AACR,CAAC;AAAA,eAEc+B,aAAa;AAAA","names":["_course","course","teachersList","groupsList","settings","overlapGroup","idKey","collectionIdKey","Error","doc","ids","toString","name","displayName","subject","color","minBreakLength","density","weight","potentialCenter","dependencies","locations","intervals","lockedTimes","days","teachers","groups","flat","reduce","acc","gId","indexOf","concat","length","events","reduceCourses","courses","Array","isArray","_overlapGroup","innerCourse"],"sourceRoot":"","sources":["../../../../src/RS/v2/from/collections.ts"],"sourcesContent":[null]}
|
|
@@ -3,6 +3,6 @@ import { CourseEvent } from '../types/course-events';
|
|
|
3
3
|
import { Collection } from '../types/collections';
|
|
4
4
|
import { Types as CoreTypes } from '../../../core/types';
|
|
5
5
|
import { Serialized, Deserialized } from '../../../core/types/common';
|
|
6
|
-
|
|
6
|
+
type RetrunType = Deserialized<CoreTypes.courseEvent> & Serialized<Pick<CoreTypes.courseEvent, 'teachers' | 'groups'>>;
|
|
7
7
|
declare const _default: (courseEvents: (CourseEvent | number)[], course: Collection, teachersList: string[], groupsList: string[], settings: Settings) => RetrunType[];
|
|
8
8
|
export default _default;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Configuration } from '../types/configurations';
|
|
2
2
|
import { CourseEvent } from '../../../core/types/course-events';
|
|
3
3
|
import { LockedTime } from '../../../core/types/locked-times';
|
|
4
|
-
|
|
4
|
+
type Options = {
|
|
5
5
|
idKey?: '_id' | 'id' | 'ids';
|
|
6
6
|
};
|
|
7
7
|
declare const _default: (configuration: Configuration, options?: Options) => [Omit<CourseEvent, 'preferredDuration'>[], LockedTime[]];
|
|
@@ -2,7 +2,7 @@ import { CourseEvent as SourceCourseEvent } from '../../../../core/types/course-
|
|
|
2
2
|
import { DivisionSettings } from '../../../../core/types/division-settings';
|
|
3
3
|
import { OutOptions } from '../../types/out-options';
|
|
4
4
|
import { Day } from '../../types/days';
|
|
5
|
-
|
|
5
|
+
type Output = {
|
|
6
6
|
days: Day[] | null;
|
|
7
7
|
};
|
|
8
8
|
export default function (event: SourceCourseEvent, settings: DivisionSettings, options: OutOptions): Output | undefined;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { AvailableLocation } from '../../../../core/types/available-locations';
|
|
2
2
|
import { CourseEvent as SourceCourseEvent } from '../../../../core/types/course-events';
|
|
3
3
|
import { OutOptions } from '../../types/out-options';
|
|
4
|
-
|
|
4
|
+
type Output = {
|
|
5
5
|
dependencies: AvailableLocation[] | AvailableLocation[][] | null;
|
|
6
6
|
};
|
|
7
7
|
export default function (event: SourceCourseEvent, options: OutOptions): Output | undefined;
|
|
@@ -2,7 +2,7 @@ import { Group as SourceGroup } from '../../../../core/types/groups';
|
|
|
2
2
|
import { Teacher as SourceTeacher } from '../../../../core/types/teachers';
|
|
3
3
|
import { CourseEvent as SourceCourseEvent } from '../../../../core/types/course-events';
|
|
4
4
|
import { OutOptions } from '../../types/out-options';
|
|
5
|
-
|
|
5
|
+
type MergedOutput = {
|
|
6
6
|
groups: (SourceGroup | SourceTeacher)[][] | null;
|
|
7
7
|
};
|
|
8
8
|
export default function (event: SourceCourseEvent, options: OutOptions): MergedOutput | undefined;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { CourseEvent as SourceCourseEvent } from '../../../../core/types/course-events';
|
|
2
2
|
import { OutOptions } from '../../types/out-options';
|
|
3
3
|
import { Interval } from '../../types/intervals';
|
|
4
|
-
|
|
4
|
+
type Output = {
|
|
5
5
|
intervals: Interval[] | null;
|
|
6
6
|
};
|
|
7
7
|
export default function (event: SourceCourseEvent, options: OutOptions): Output | undefined;
|
|
@@ -2,7 +2,7 @@ import { Day } from './days';
|
|
|
2
2
|
import { LockedTime } from './locked-times';
|
|
3
3
|
import { Interval } from './intervals';
|
|
4
4
|
import { BreakLength } from './break-lengths';
|
|
5
|
-
|
|
5
|
+
type GroupType = 'personal' | 'classes';
|
|
6
6
|
export interface Group {
|
|
7
7
|
id: string;
|
|
8
8
|
group_type: GroupType;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Types as CoreTypes } from '../../core/types';
|
|
2
2
|
import { Deserialized } from '../../core/types/common';
|
|
3
3
|
import { Activity } from '../types/activities';
|
|
4
|
-
|
|
4
|
+
type Expand = ('referenceNames' | 'teachers' | 'syllabus' | 'groups')[];
|
|
5
5
|
declare const _default: (activities: Deserialized<CoreTypes.course>[], belongsTo?: CoreTypes.division, expand?: Expand) => Activity[];
|
|
6
6
|
export default _default;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Types as CoreTypes } from '../../core/types';
|
|
2
2
|
import { Deserialized } from '../../core/types/common';
|
|
3
3
|
import { CalendarEvent } from '../types/calendar-events';
|
|
4
|
-
|
|
4
|
+
type Expand = ('referenceNames' | 'teachers' | 'activity' | 'groups')[];
|
|
5
5
|
declare const _default: (events: Deserialized<CoreTypes.courseEvent>[], belongsTo?: CoreTypes.division, expand?: Expand) => Partial<CalendarEvent>[];
|
|
6
6
|
export default _default;
|
|
@@ -2,7 +2,7 @@ import { Group } from './groups';
|
|
|
2
2
|
import { Organisation } from './organisation';
|
|
3
3
|
import { ActivityType } from './codes';
|
|
4
4
|
import { DutyAssignment } from './duty-assignments';
|
|
5
|
-
export
|
|
5
|
+
export type Activity = {
|
|
6
6
|
id: string;
|
|
7
7
|
organisation?: Organisation;
|
|
8
8
|
meta?: {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
export
|
|
2
|
-
export
|
|
3
|
-
export
|
|
4
|
-
export
|
|
5
|
-
export
|
|
6
|
-
export
|
|
7
|
-
export
|
|
1
|
+
export type OrganisationType = 'Huvudman' | 'Verksamhetsområde' | 'Förvaltning' | 'Rektorsområde' | 'Skola' | 'Skolenhet' | 'Varumärke' | 'Bolag' | 'Övrigt';
|
|
2
|
+
export type SchoolType = 'FS' | 'FKLASS' | 'FTH' | 'OPPFTH' | 'GR' | 'GRS' | 'TR' | 'SP' | 'SAM' | 'GY' | 'GYS' | 'SFI' | 'SARVUX' | 'SARVUXGR' | 'SARVUXGY' | 'VUX' | 'VUXSFI' | 'VUXGR' | 'VUXGY' | 'VUXSARTR' | 'VUXSARGR' | 'VUXSARGY' | 'KU' | 'YH' | 'FHS' | 'STF' | 'KKU' | 'HS' | 'ABU' | 'AU';
|
|
3
|
+
export type DutyRole = 'Rektor' | 'Lärare' | 'Förskollärare' | 'Barnskötare' | 'Bibliotekarie' | 'Lärarassistent' | 'Fritidspedagog' | 'Annan personal' | 'Studie- och yrkesvägledare' | 'Förstelärare' | 'Kurator' | 'Skolsköterska' | 'Skolläkare' | 'Skolpsykolog' | 'Speciallärare/specialpedagog' | 'Skoladministratör' | 'Övrig arbetsledning';
|
|
4
|
+
export type GroupType = 'Undervisning' | 'Klass' | 'Mentor' | 'Provgrupp' | 'Schema' | 'Avdelning' | 'Övrigt';
|
|
5
|
+
export type ProgrammeType = 'Yrkesprogram' | 'Högskoleförberedande program' | 'Introduktionsprogram' | 'Nationellt yrkespaket' | 'Regionalt yrkespaket' | 'Fjärde tekniskt år' | 'Programinriktning' | 'Utgång';
|
|
6
|
+
export type ProgrammeContentType = 'Gymnasiegemensamma' | 'Programgemensamma' | 'Inriktning' | 'Programfärdjupning' | 'Gymnasiearbete' | 'Individuellt val';
|
|
7
|
+
export type ActivityType = 'Undervisning' | 'Elevaktivitet' | 'Provaktivitet' | 'Läraraktivitet' | 'Övrigt';
|
|
@@ -2,7 +2,7 @@ import { Location } from "./location";
|
|
|
2
2
|
import { Teacher } from "./teacher";
|
|
3
3
|
import { Group } from "./group";
|
|
4
4
|
import { Lesson } from "./lesson";
|
|
5
|
-
export
|
|
5
|
+
export type Schedule = {
|
|
6
6
|
locations: Location[];
|
|
7
7
|
teachers: Teacher[];
|
|
8
8
|
groups: Group[];
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export
|
|
2
|
-
export
|
|
1
|
+
export type Time = `${number}${number}${number}${number}`;
|
|
2
|
+
export type Day = 'Mån' | 'Tis' | 'Ons' | 'Tor' | 'Fre' | 'Lör' | 'Sön';
|
|
3
3
|
export interface Event {
|
|
4
4
|
id?: string;
|
|
5
5
|
group?: string;
|
package/dist/core/to/courses.js
CHANGED
|
@@ -8,7 +8,7 @@ var _lodash = _interopRequireDefault(require("lodash"));
|
|
|
8
8
|
var _availableLocations2 = _interopRequireDefault(require("./available-locations"));
|
|
9
9
|
var _days2 = _interopRequireDefault(require("./days"));
|
|
10
10
|
var _intervals2 = _interopRequireDefault(require("./intervals"));
|
|
11
|
-
var _excluded = ["groups", "locations", "teachers"];
|
|
11
|
+
var _excluded = ["groups", "locations", "teachers", "participants"];
|
|
12
12
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
13
13
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
14
14
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
@@ -20,12 +20,13 @@ var _default = courses => {
|
|
|
20
20
|
var {
|
|
21
21
|
groups,
|
|
22
22
|
locations,
|
|
23
|
-
teachers
|
|
23
|
+
teachers,
|
|
24
|
+
participants
|
|
24
25
|
} = _ref,
|
|
25
26
|
course = _objectWithoutProperties(_ref, _excluded);
|
|
26
27
|
if (course.days) course.days = (0, _days2.default)(course.days);
|
|
27
28
|
if (course.intervals) course.intervals = (0, _intervals2.default)(course.intervals);
|
|
28
|
-
return _objectSpread(_objectSpread(_objectSpread(_objectSpread({}, _lodash.default.omit(course, ['_id', 'events', 'lockedTimes', 'overlapGroup', 'overlapSpecies', 'belongsTo', 'createdAt', 'lastModifiedBy'])), teachers && {
|
|
29
|
+
return _objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread({}, _lodash.default.omit(course, ['_id', 'events', 'lockedTimes', 'overlapGroup', 'overlapSpecies', 'belongsTo', 'createdAt', 'lastModifiedBy'])), teachers && {
|
|
29
30
|
teachers: teachers.map(_ref2 => {
|
|
30
31
|
var {
|
|
31
32
|
id
|
|
@@ -39,6 +40,13 @@ var _default = courses => {
|
|
|
39
40
|
} = _ref3;
|
|
40
41
|
return id;
|
|
41
42
|
})
|
|
43
|
+
}), participants && {
|
|
44
|
+
participants: participants.map(_ref4 => {
|
|
45
|
+
var {
|
|
46
|
+
id
|
|
47
|
+
} = _ref4;
|
|
48
|
+
return id;
|
|
49
|
+
})
|
|
42
50
|
}), locations && {
|
|
43
51
|
locations: (0, _availableLocations2.default)(locations)
|
|
44
52
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"courses.js","mappings":";;;;;;AAAA;AAEA;AACA;AAEA;AAA8D;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,eAO9CA,OAA+B,IAAmC;EAEhF,OAAOA,OAAO,CAACC,GAAG,CAAC,
|
|
1
|
+
{"version":3,"file":"courses.js","mappings":";;;;;;AAAA;AAEA;AACA;AAEA;AAA8D;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,eAO9CA,OAA+B,IAAmC;EAEhF,OAAOA,OAAO,CAACC,GAAG,CAAC,QAA6D;IAAA,IAA5D;QAAEC,MAAM;QAAEC,SAAS;QAAEC,QAAQ;QAAEC;MAAuB,CAAE;MAARC,MAAM;IAExE,IAAIA,MAAM,CAACC,IAAI,EACbD,MAAM,CAACC,IAAI,GAAS,kBAAK,EAACD,MAAM,CAACC,IAAI,CAAC;IAExC,IAAID,MAAM,CAACE,SAAS,EAClBF,MAAM,CAACE,SAAS,GAAI,uBAAU,EAACF,MAAM,CAACE,SAAS,CAAC;IAElD,iFACKC,eAAC,CAACC,IAAI,CAACJ,MAAM,EAAE,CAAC,KAAK,EAAE,QAAQ,EAAE,aAAa,EAAE,cAAc,EAAE,gBAAgB,EAAE,WAAW,EAAE,WAAW,EAAE,gBAAgB,CAAC,CAAC,GAC9HF,QAAQ,IAAQ;MAAEA,QAAQ,EAAEA,QAAQ,CAACH,GAAG,CAAC;QAAA,IAAC;UAAEU;QAAE,CAAE;QAAA,OAAKA,EAAG;MAAA;IAAC,CAAE,GAC3DT,MAAM,IAAU;MAAEA,MAAM,EAAIA,MAAM,CAACD,GAAG,CAAC;QAAA,IAAC;UAAEU;QAAE,CAAE;QAAA,OAAKA,EAAG;MAAA;IAAC,CAAE,GACzDN,YAAY,IAAI;MAAEA,YAAY,EAAIA,YAAY,CAACJ,GAAG,CAAC;QAAA,IAAC;UAAEU;QAAE,CAAE;QAAA,OAAKA,EAAG;MAAA;IAAC,CAAE,GACrER,SAAS,IAAO;MAAEA,SAAS,EAAE,gCAAmB,EAACA,SAA8C;IAAC,CAAE;EAEzG,CAAC,EAAE,EAAE,CAAC;AACR,CAAC;AAAA","names":["courses","map","groups","locations","teachers","participants","course","days","intervals","_","omit","id"],"sourceRoot":"","sources":["../../../src/core/to/courses.ts"],"sourcesContent":[null]}
|
package/dist/core/to/events.js
CHANGED
|
@@ -8,7 +8,7 @@ var _lodash = _interopRequireDefault(require("lodash"));
|
|
|
8
8
|
var _availableLocations2 = _interopRequireDefault(require("./available-locations"));
|
|
9
9
|
var _days2 = _interopRequireDefault(require("./days"));
|
|
10
10
|
var _intervals2 = _interopRequireDefault(require("./intervals"));
|
|
11
|
-
var _excluded = ["course", "groups", "locations", "teachers", "inLocations"];
|
|
11
|
+
var _excluded = ["course", "groups", "locations", "teachers", "inLocations", "participants"];
|
|
12
12
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
13
13
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
14
14
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
@@ -22,13 +22,14 @@ var _default = events => {
|
|
|
22
22
|
groups,
|
|
23
23
|
locations,
|
|
24
24
|
teachers,
|
|
25
|
-
inLocations
|
|
25
|
+
inLocations,
|
|
26
|
+
participants
|
|
26
27
|
} = _ref,
|
|
27
28
|
event = _objectWithoutProperties(_ref, _excluded);
|
|
28
29
|
if (event.preferredDuration == undefined) event.preferredDuration = event.duration;
|
|
29
30
|
if (event.days) event.days = (0, _days2.default)(event.days);
|
|
30
31
|
if (event.intervals) event.intervals = (0, _intervals2.default)(event.intervals);
|
|
31
|
-
return _objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread({}, _lodash.default.omit(event, ['_id', 'lockedTimes', 'overlapGroup', 'overlapSpecies', 'belongsTo', 'createdAt', 'lastModifiedBy'])), {}, {
|
|
32
|
+
return _objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread({}, _lodash.default.omit(event, ['_id', 'lockedTimes', 'overlapGroup', 'overlapSpecies', 'belongsTo', 'createdAt', 'lastModifiedBy'])), {}, {
|
|
32
33
|
course: course === null || course === void 0 ? void 0 : course.id
|
|
33
34
|
}, teachers && {
|
|
34
35
|
teachers: teachers.map(_ref2 => {
|
|
@@ -44,6 +45,13 @@ var _default = events => {
|
|
|
44
45
|
} = _ref3;
|
|
45
46
|
return id;
|
|
46
47
|
})
|
|
48
|
+
}), participants && {
|
|
49
|
+
participants: participants.map(_ref4 => {
|
|
50
|
+
var {
|
|
51
|
+
id
|
|
52
|
+
} = _ref4;
|
|
53
|
+
return id;
|
|
54
|
+
})
|
|
47
55
|
}), locations && {
|
|
48
56
|
locations: (0, _availableLocations2.default)(locations)
|
|
49
57
|
}), inLocations && {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"events.js","mappings":";;;;;;AAAA;AAEA;AACA;AAEA;AAA8D;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,eAO9CA,MAAmC,IAA+B;EAChF,OAAOA,MAAM,CAACC,GAAG,CAAC,
|
|
1
|
+
{"version":3,"file":"events.js","mappings":";;;;;;AAAA;AAEA;AACA;AAEA;AAA8D;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,eAO9CA,MAAmC,IAA+B;EAChF,OAAOA,MAAM,CAACC,GAAG,CAAC,QAAiF;IAAA,IAAhF;QAAEC,MAAM;QAAEC,MAAM;QAAEC,SAAS;QAAEC,QAAQ;QAAEC,WAAW;QAAEC;MAAsB,CAAE;MAAPC,KAAK;IAG3F,IAAIA,KAAK,CAACC,iBAAiB,IAAIC,SAAS,EACtCF,KAAK,CAACC,iBAAiB,GAAGD,KAAK,CAACG,QAAS;IAE3C,IAAIH,KAAK,CAACI,IAAI,EACZJ,KAAK,CAACI,IAAI,GAAS,kBAAK,EAACJ,KAAK,CAACI,IAAI,CAAC;IAEtC,IAAIJ,KAAK,CAACK,SAAS,EACjBL,KAAK,CAACK,SAAS,GAAI,uBAAU,EAACL,KAAK,CAACK,SAAS,CAAC;IAEhD,+FACKC,eAAC,CAACC,IAAI,CAACP,KAAK,EAAE,CAAC,KAAK,EAAE,aAAa,EAAE,cAAc,EAAE,gBAAgB,EAAE,WAAW,EAAE,WAAW,EAAE,gBAAgB,CAAC,CAAC;MACtHN,MAAM,EAAEA,MAAM,aAANA,MAAM,uBAANA,MAAM,CAAEc;IAAE,GACfX,QAAQ,IAAQ;MAAEA,QAAQ,EAAMA,QAAQ,CAACJ,GAAG,CAAC;QAAA,IAAC;UAAEe;QAAE,CAAE;QAAA,OAAKA,EAAG;MAAA;IAAC,CAAE,GAC/Db,MAAM,IAAU;MAAEA,MAAM,EAAQA,MAAM,CAACF,GAAG,CAAC;QAAA,IAAC;UAAEe;QAAE,CAAE;QAAA,OAAKA,EAAG;MAAA;IAAC,CAAE,GAC7DT,YAAY,IAAI;MAAEA,YAAY,EAAEA,YAAY,CAACN,GAAG,CAAC;QAAA,IAAC;UAAEe;QAAE,CAAE;QAAA,OAAKA,EAAG;MAAA;IAAC,CAAE,GACnEZ,SAAS,IAAO;MAAEA,SAAS,EAAK,gCAAmB,EAACA,SAA8C;IAAC,CAAE,GACrGE,WAAW,IAAK;MAAEA,WAAW,EAAGA,WAAW,CAACL,GAAG,CAACgB,CAAC,IAAIA,CAAC,KAAK,IAAI,GAAG,IAAI,GAAGA,CAAC,CAACD,EAAG;IAAa,CAAE;EAEpG,CAAC,EAAE,EAAE,CAAC;AACR,CAAC;AAAA","names":["events","map","course","groups","locations","teachers","inLocations","participants","event","preferredDuration","undefined","duration","days","intervals","_","omit","id","x"],"sourceRoot":"","sources":["../../../src/core/to/events.ts"],"sourcesContent":[null]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export
|
|
1
|
+
export type BreakLength = boolean | number | number[];
|
|
@@ -1,25 +1,25 @@
|
|
|
1
1
|
import { Types } from 'mongoose';
|
|
2
|
-
|
|
2
|
+
type Vertex = {
|
|
3
3
|
_id?: Types.ObjectId;
|
|
4
4
|
id?: string;
|
|
5
5
|
};
|
|
6
|
-
export
|
|
7
|
-
export
|
|
8
|
-
export
|
|
6
|
+
export type Edge<T> = T extends Vertex[] ? T | Types.ObjectId[] | string[] : (T extends Vertex ? T | Types.ObjectId | string : never);
|
|
7
|
+
export type ExtractEdge<T> = T extends Vertex[] ? Exclude<T, Types.ObjectId[] | string[]> : (T extends Vertex ? Exclude<T, Types.ObjectId | string> : never);
|
|
8
|
+
export type NestedKeyOf<ObjectType extends object | object[]> = {
|
|
9
9
|
[Key in keyof ObjectType & (string | number)]: ObjectType[Key] extends object | object[] ? `${Key}` | `${Key}.${NestedKeyOf<ObjectType[Key]>}` : `${Key}`;
|
|
10
10
|
}[keyof ObjectType & (string | number)];
|
|
11
|
-
export
|
|
12
|
-
export
|
|
11
|
+
export type Join<K, P> = K extends string ? P extends string ? `${K}.${P}` : never : never;
|
|
12
|
+
export type firstChild<ObjectType extends object> = {
|
|
13
13
|
[Key in keyof ObjectType & (string | number)]: ObjectType[Key] extends object ? ObjectType[Key] : (ObjectType[Key] extends any ? ObjectType[Key] : never);
|
|
14
14
|
}[keyof ObjectType & (string | number)];
|
|
15
|
-
export
|
|
15
|
+
export type DeserializedOld<ObjectType> = {
|
|
16
16
|
[Key in keyof ObjectType]: (ObjectType[Key] extends Types.ObjectId | Types.ObjectId[] ? ObjectType[Key] : (Edge<Vertex> extends ObjectType[Key] ? Extract<Exclude<ObjectType[Key], Types.ObjectId>, Vertex> : (Edge<Vertex[]> extends ObjectType[Key] ? Extract<Exclude<ObjectType[Key], Types.ObjectId[]>, Vertex[]> : (Exclude<object, Types.ObjectId | Types.ObjectId[]> extends ObjectType[Key] ? Deserialized<ObjectType[Key]> : (Exclude<any[], string[] | number[] | boolean[] | Types.ObjectId | Types.ObjectId[]>[] extends ObjectType[Key] ? Deserialized<ObjectType[Key]> : ObjectType[Key])))));
|
|
17
17
|
};
|
|
18
|
-
|
|
19
|
-
export
|
|
18
|
+
type ArrayType<T> = T extends object[] ? T[0] : never;
|
|
19
|
+
export type Deserialized<ObjectType> = {
|
|
20
20
|
[Key in keyof ObjectType]: (ExtractEdge<ObjectType[Key]> extends never ? (ArrayType<ObjectType[Key]> extends never ? ObjectType[Key] : (ArrayType<ObjectType[Key]> extends object ? Deserialized<ArrayType<ObjectType[Key]>>[] : ObjectType[Key])) : Deserialized<ExtractEdge<ObjectType[Key]>>);
|
|
21
21
|
};
|
|
22
|
-
export
|
|
22
|
+
export type Serialized<ObjectType> = {
|
|
23
23
|
[Key in keyof ObjectType]: (Edge<Vertex> extends ObjectType[Key] ? Extract<ObjectType[Key], string> : (Edge<Vertex[]> extends ObjectType[Key] ? Extract<ObjectType[Key], string[]> : (ObjectType[Key] extends Exclude<{}, Types.ObjectId | Types.ObjectId[]> ? Serialized<ObjectType[Key]> : ObjectType[Key])));
|
|
24
24
|
};
|
|
25
25
|
export {};
|
|
@@ -12,11 +12,15 @@ import { Teacher } from './teachers';
|
|
|
12
12
|
import { Location } from './locations';
|
|
13
13
|
import { AvailableLocation } from './available-locations';
|
|
14
14
|
import { OverlapGroup } from './overlap-groups';
|
|
15
|
+
import { Period } from './periods';
|
|
16
|
+
import { Person } from './persons';
|
|
15
17
|
export interface CourseEventBare {
|
|
16
18
|
belongsTo?: Edge<Division>;
|
|
17
19
|
course?: Edge<Course>;
|
|
18
20
|
groups?: Edge<Group[]> | null;
|
|
19
21
|
teachers?: Edge<Teacher[]> | null;
|
|
22
|
+
participants?: Edge<Person[]> | null;
|
|
23
|
+
period?: Edge<Period> | null;
|
|
20
24
|
locations?: AvailableLocation[] | null;
|
|
21
25
|
inLocations?: Edge<Location[]>;
|
|
22
26
|
density?: number;
|
|
@@ -10,11 +10,15 @@ import { Teacher } from './teachers';
|
|
|
10
10
|
import { AvailableLocation } from './available-locations';
|
|
11
11
|
import { CourseEvent } from './course-events';
|
|
12
12
|
import { OverlapGroup } from './overlap-groups';
|
|
13
|
+
import { Period } from './periods';
|
|
14
|
+
import { Person } from './persons';
|
|
13
15
|
export interface CourseBare {
|
|
14
16
|
belongsTo?: Edge<Division>;
|
|
15
17
|
events?: Edge<CourseEvent[]>;
|
|
16
18
|
groups?: Edge<Group[]>;
|
|
17
19
|
teachers?: Edge<Teacher[]>;
|
|
20
|
+
participants?: Edge<Person[]>;
|
|
21
|
+
period?: Edge<Period>;
|
|
18
22
|
locations?: AvailableLocation[];
|
|
19
23
|
density?: number;
|
|
20
24
|
weight?: number;
|
|
@@ -11,6 +11,7 @@ import { LockedTime } from './locked-times';
|
|
|
11
11
|
import { Division } from './divisions';
|
|
12
12
|
import { DivisionSettings } from './division-settings';
|
|
13
13
|
import { OverlapGroup } from './overlap-groups';
|
|
14
|
+
import { Period } from './periods';
|
|
14
15
|
import { Person } from './persons';
|
|
15
16
|
import { Teacher } from './teachers';
|
|
16
17
|
import { Meta } from './meta';
|
|
@@ -28,6 +29,7 @@ export declare module Types {
|
|
|
28
29
|
type division = Division;
|
|
29
30
|
type divisionSettings = DivisionSettings;
|
|
30
31
|
type overlapGroup = OverlapGroup;
|
|
32
|
+
type period = Period;
|
|
31
33
|
type person = Person;
|
|
32
34
|
type teacher = Teacher;
|
|
33
35
|
type meta = Meta;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { Types } from 'mongoose';
|
|
2
|
+
import { Edge } from './common';
|
|
3
|
+
import { Division } from './divisions';
|
|
4
|
+
export interface PeriodBare {
|
|
5
|
+
belongsTo?: Edge<Division>;
|
|
6
|
+
displayIndex?: number;
|
|
7
|
+
displayName?: string;
|
|
8
|
+
ranges: {
|
|
9
|
+
start?: moment.Moment | string | Date;
|
|
10
|
+
end?: moment.Moment | string | Date;
|
|
11
|
+
}[];
|
|
12
|
+
lastModifiedBy?: unknown;
|
|
13
|
+
}
|
|
14
|
+
export interface Period extends PeriodBare {
|
|
15
|
+
_id?: Types.ObjectId;
|
|
16
|
+
id?: string;
|
|
17
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"periods.js","mappings":"","names":[],"sourceRoot":"","sources":[],"sourcesContent":[]}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { maps } from '../constants';
|
|
2
|
-
export
|
|
3
|
-
export
|
|
4
|
-
export
|
|
2
|
+
export type MapInstance = typeof maps[number];
|
|
3
|
+
export type MapName = MapInstance['name'];
|
|
4
|
+
export type IdentifiedMaps = {
|
|
5
5
|
none: MapInstance[];
|
|
6
6
|
weak: MapInstance[];
|
|
7
7
|
strong: MapInstance[];
|
|
@@ -1,32 +1,32 @@
|
|
|
1
|
-
|
|
1
|
+
type Staff = {
|
|
2
2
|
ID: number;
|
|
3
3
|
Firstname: string;
|
|
4
4
|
Lastname: string;
|
|
5
5
|
};
|
|
6
|
-
|
|
6
|
+
type Group = {
|
|
7
7
|
ID: number;
|
|
8
8
|
Name: string;
|
|
9
9
|
FriendlyName: string;
|
|
10
10
|
StartDate: string;
|
|
11
11
|
EndDate: string;
|
|
12
12
|
};
|
|
13
|
-
|
|
13
|
+
type Class = {
|
|
14
14
|
ID: number;
|
|
15
15
|
Name: string;
|
|
16
16
|
};
|
|
17
|
-
|
|
17
|
+
type GroupStaffReference = {
|
|
18
18
|
groupId: number;
|
|
19
19
|
userId: number;
|
|
20
20
|
};
|
|
21
|
-
|
|
21
|
+
type GroupStudentReference = {
|
|
22
22
|
groupId: number;
|
|
23
23
|
userId: number;
|
|
24
24
|
};
|
|
25
|
-
|
|
25
|
+
type ClassStudentReference = {
|
|
26
26
|
classId: number;
|
|
27
27
|
userId: number;
|
|
28
28
|
};
|
|
29
|
-
|
|
29
|
+
type Schedule = {
|
|
30
30
|
staff: Staff[];
|
|
31
31
|
groups: Group[];
|
|
32
32
|
classes: Class[];
|
|
@@ -43,7 +43,7 @@ export declare module Types {
|
|
|
43
43
|
type classStudentReference = ClassStudentReference;
|
|
44
44
|
type schedule = Schedule;
|
|
45
45
|
}
|
|
46
|
-
export
|
|
46
|
+
export type Options = {
|
|
47
47
|
beg: string;
|
|
48
48
|
end: string;
|
|
49
49
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@royalschedule/maps",
|
|
3
|
-
"version": "2.2.
|
|
3
|
+
"version": "2.2.90",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -47,7 +47,7 @@
|
|
|
47
47
|
"nodemon": "^2.0.20",
|
|
48
48
|
"ts-node": "^10.9.1",
|
|
49
49
|
"tslib": "^2.4.1",
|
|
50
|
-
"typescript": "^4.
|
|
50
|
+
"typescript": "^4.9.4"
|
|
51
51
|
},
|
|
52
52
|
"dependencies": {
|
|
53
53
|
"app-module-path": "^2.2.0",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"students.js","mappings":"","names":[],"sourceRoot":"","sources":[],"sourcesContent":[]}
|