@neutron.co.id/pendidikan-operation 1.5.2-beta.1 → 1.5.2-beta.2

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/build/index.cjs CHANGED
@@ -341,6 +341,47 @@ async function _getSessionConflict(stream, input) {
341
341
  return result.value;
342
342
  }
343
343
 
344
+ const allConflict = operation.Action.define({
345
+ key: "allConflict",
346
+ name: "All Conflict",
347
+ type: "command",
348
+ category: "domain",
349
+ execute: async (input, stream) => {
350
+ const dbs = stream.core.dbs;
351
+ const dbSession = dbs["neu-jadwal"].models["neu:jadwal:classSession"];
352
+ const findSession = await dbSession.find({
353
+ $or: [
354
+ {
355
+ startedAt: {
356
+ $gte: input.startedAt,
357
+ $lte: input.endedAt
358
+ }
359
+ },
360
+ {
361
+ endedAt: {
362
+ $gte: input.startedAt,
363
+ $lte: input.endedAt
364
+ }
365
+ }
366
+ ],
367
+ deletedAt: null
368
+ });
369
+ const pengajarKonflik = findSession.map((field) => field.conflict.teacherConflict.length).reduce((a, b) => a + b, 0);
370
+ const ruanganKonflik = findSession.map((field) => field.conflict.roomConflict.length).reduce((a, b) => a + b, 0);
371
+ const komitmenKonflik = findSession.map((field) => field.conflict.commitmentConflict.length).reduce((a, b) => a + b, 0);
372
+ return core.Result.ok({
373
+ state: "ConflictAll",
374
+ message: "All conflict has been get.",
375
+ data: {
376
+ sessionCount: findSession.length,
377
+ teacherConflictCount: pengajarKonflik,
378
+ roomConflictCount: ruanganKonflik,
379
+ commitmentConflictCount: komitmenKonflik
380
+ }
381
+ });
382
+ }
383
+ });
384
+
344
385
  const generateGrading = operation.Action.define({
345
386
  key: "generateGrading",
346
387
  name: "Create Penilaian dan Score",
@@ -1328,6 +1369,7 @@ const index = {
1328
1369
  __proto__: null,
1329
1370
  _calculateComparison: _calculateComparison,
1330
1371
  acceptQuestion: acceptQuestion,
1372
+ allConflict: allConflict,
1331
1373
  calculateGrading: calculateGrading,
1332
1374
  calculateManyComparator: calculateManyComparator,
1333
1375
  calculateOneComparator: calculateOneComparator,
@@ -1353,6 +1395,7 @@ const index = {
1353
1395
  exports._calculateComparison = _calculateComparison;
1354
1396
  exports.acceptQuestion = acceptQuestion;
1355
1397
  exports.actions = index;
1398
+ exports.allConflict = allConflict;
1356
1399
  exports.calculateGrading = calculateGrading;
1357
1400
  exports.calculateManyComparator = calculateManyComparator;
1358
1401
  exports.calculateOneComparator = calculateOneComparator;
package/build/index.d.ts CHANGED
@@ -81,6 +81,21 @@ interface PrepareConflictMeta {
81
81
  declare const prepareConflict: Action<"prepareConflict", PrepareConflictInput, PrepareConflictOutput, PrepareConflictMeta>;
82
82
  type PrepareConflictAction = typeof prepareConflict;
83
83
 
84
+ interface AllConflictInput {
85
+ startedAt: string;
86
+ endedAt: string;
87
+ }
88
+ interface AllConflictOutput {
89
+ sessionCount: number;
90
+ teacherConflictCount: number;
91
+ roomConflictCount: number;
92
+ commitmentConflictCount: number;
93
+ }
94
+ interface AllConflictMeta {
95
+ }
96
+ declare const allConflict: Action<"allConflict", AllConflictInput, AllConflictOutput, AllConflictMeta>;
97
+ type AllConflictAction = typeof allConflict;
98
+
84
99
  interface CalculateGradingInput {
85
100
  gradingInsertId: string;
86
101
  gradingContextIds: string[];
@@ -268,6 +283,10 @@ type index_AcceptQuestionAction = AcceptQuestionAction;
268
283
  type index_AcceptQuestionInput = AcceptQuestionInput;
269
284
  type index_AcceptQuestionMeta = AcceptQuestionMeta;
270
285
  type index_AcceptQuestionOutput = AcceptQuestionOutput;
286
+ type index_AllConflictAction = AllConflictAction;
287
+ type index_AllConflictInput = AllConflictInput;
288
+ type index_AllConflictMeta = AllConflictMeta;
289
+ type index_AllConflictOutput = AllConflictOutput;
271
290
  type index_CalculateGradingAction = CalculateGradingAction;
272
291
  type index_CalculateGradingInput = CalculateGradingInput;
273
292
  type index_CalculateGradingMeta = CalculateGradingMeta;
@@ -352,6 +371,7 @@ type index_UpdateGradingAndScoresMeta = UpdateGradingAndScoresMeta;
352
371
  type index_UpdateGradingAndScoresOutput = UpdateGradingAndScoresOutput;
353
372
  declare const index__calculateComparison: typeof _calculateComparison;
354
373
  declare const index_acceptQuestion: typeof acceptQuestion;
374
+ declare const index_allConflict: typeof allConflict;
355
375
  declare const index_calculateGrading: typeof calculateGrading;
356
376
  declare const index_calculateManyComparator: typeof calculateManyComparator;
357
377
  declare const index_calculateOneComparator: typeof calculateOneComparator;
@@ -378,6 +398,10 @@ declare namespace index {
378
398
  index_AcceptQuestionInput as AcceptQuestionInput,
379
399
  index_AcceptQuestionMeta as AcceptQuestionMeta,
380
400
  index_AcceptQuestionOutput as AcceptQuestionOutput,
401
+ index_AllConflictAction as AllConflictAction,
402
+ index_AllConflictInput as AllConflictInput,
403
+ index_AllConflictMeta as AllConflictMeta,
404
+ index_AllConflictOutput as AllConflictOutput,
381
405
  index_CalculateGradingAction as CalculateGradingAction,
382
406
  index_CalculateGradingInput as CalculateGradingInput,
383
407
  index_CalculateGradingMeta as CalculateGradingMeta,
@@ -462,6 +486,7 @@ declare namespace index {
462
486
  index_UpdateGradingAndScoresOutput as UpdateGradingAndScoresOutput,
463
487
  index__calculateComparison as _calculateComparison,
464
488
  index_acceptQuestion as acceptQuestion,
489
+ index_allConflict as allConflict,
465
490
  index_calculateGrading as calculateGrading,
466
491
  index_calculateManyComparator as calculateManyComparator,
467
492
  index_calculateOneComparator as calculateOneComparator,
@@ -485,4 +510,4 @@ declare namespace index {
485
510
  };
486
511
  }
487
512
 
488
- export { AcceptQuestionAction, AcceptQuestionInput, AcceptQuestionMeta, AcceptQuestionOutput, CalculateGradingAction, CalculateGradingInput, CalculateGradingMeta, CalculateGradingOutput, CalculateManyComparatorAction, CalculateManyComparatorInput, CalculateManyComparatorMeta, CalculateManyComparatorOutput, CalculateOneComparatorAction, CalculateOneComparatorInput, CalculateOneComparatorMeta, CalculateOneComparatorOutput, ClearAllOverridesAction, ClearAllOverridesInput, ClearAllOverridesMeta, ClearAllOverridesOutput, ClearGradingAction, ClearGradingInput, ClearGradingMeta, ClearGradingOutput, CreateGradingAndScoresAction, CreateGradingAndScoresInput, CreateGradingAndScoresMeta, CreateGradingAndScoresOutput, EditAnswerAction, EditAnswerInput, EditAnswerMeta, EditAnswerOutput, GenerateGradingAction, GenerateGradingInput, GenerateGradingMeta, GenerateGradingOutput, GetStudentIdAction, GetStudentIdInput, GetStudentIdMeta, GetStudentIdOutput, GradingComparator, GradingComparatorComparison, HasUnderstandAction, HasUnderstandInput, HasUnderstandMeta, HasUnderstandOutput, NotUnderstandAction, NotUnderstandInput, NotUnderstandMeta, NotUnderstandOutput, PrepareConflictAction, PrepareConflictInput, PrepareConflictMeta, PrepareConflictOutput, PresenceSessionStudentAction, PresenceSessionStudentInput, PresenceSessionStudentMeta, PresenceSessionStudentOutput, PresenceSessionTeacherAction, PresenceSessionTeacherInput, PresenceSessionTeacherMeta, PresenceSessionTeacherOutput, RasionalizeGradingAction, RasionalizeGradingInput, RasionalizeGradingMeta, RasionalizeGradingOutput, SendAnswerAction, SendAnswerInput, SendAnswerMeta, SendAnswerOutput, SendQuestionAction, SendQuestionInput, SendQuestionMeta, SendQuestionOutput, SetSomethingAction, SetSomethingInput, SetSomethingMeta, SetSomethingOutput, SyncCommitmentAction, SyncCommitmentInput, SyncCommitmentMeta, SyncCommitmentOutput, UpdateGradingAndScoresAction, UpdateGradingAndScoresInput, UpdateGradingAndScoresMeta, UpdateGradingAndScoresOutput, _calculateComparison, acceptQuestion, index as actions, calculateGrading, calculateManyComparator, calculateOneComparator, clearAllOverrides, clearGrading, createGradingAndScores, editAnswer, generateGrading, getStudentId, hasUnderstand, notUnderstand, prepareConflict, presenceSessionStudent, presenceSessionTeacher, rasionalizeGrading, sendAnswer, sendQuestion, setSomething, syncCommitment, updateGradingAndScores };
513
+ export { AcceptQuestionAction, AcceptQuestionInput, AcceptQuestionMeta, AcceptQuestionOutput, AllConflictAction, AllConflictInput, AllConflictMeta, AllConflictOutput, CalculateGradingAction, CalculateGradingInput, CalculateGradingMeta, CalculateGradingOutput, CalculateManyComparatorAction, CalculateManyComparatorInput, CalculateManyComparatorMeta, CalculateManyComparatorOutput, CalculateOneComparatorAction, CalculateOneComparatorInput, CalculateOneComparatorMeta, CalculateOneComparatorOutput, ClearAllOverridesAction, ClearAllOverridesInput, ClearAllOverridesMeta, ClearAllOverridesOutput, ClearGradingAction, ClearGradingInput, ClearGradingMeta, ClearGradingOutput, CreateGradingAndScoresAction, CreateGradingAndScoresInput, CreateGradingAndScoresMeta, CreateGradingAndScoresOutput, EditAnswerAction, EditAnswerInput, EditAnswerMeta, EditAnswerOutput, GenerateGradingAction, GenerateGradingInput, GenerateGradingMeta, GenerateGradingOutput, GetStudentIdAction, GetStudentIdInput, GetStudentIdMeta, GetStudentIdOutput, GradingComparator, GradingComparatorComparison, HasUnderstandAction, HasUnderstandInput, HasUnderstandMeta, HasUnderstandOutput, NotUnderstandAction, NotUnderstandInput, NotUnderstandMeta, NotUnderstandOutput, PrepareConflictAction, PrepareConflictInput, PrepareConflictMeta, PrepareConflictOutput, PresenceSessionStudentAction, PresenceSessionStudentInput, PresenceSessionStudentMeta, PresenceSessionStudentOutput, PresenceSessionTeacherAction, PresenceSessionTeacherInput, PresenceSessionTeacherMeta, PresenceSessionTeacherOutput, RasionalizeGradingAction, RasionalizeGradingInput, RasionalizeGradingMeta, RasionalizeGradingOutput, SendAnswerAction, SendAnswerInput, SendAnswerMeta, SendAnswerOutput, SendQuestionAction, SendQuestionInput, SendQuestionMeta, SendQuestionOutput, SetSomethingAction, SetSomethingInput, SetSomethingMeta, SetSomethingOutput, SyncCommitmentAction, SyncCommitmentInput, SyncCommitmentMeta, SyncCommitmentOutput, UpdateGradingAndScoresAction, UpdateGradingAndScoresInput, UpdateGradingAndScoresMeta, UpdateGradingAndScoresOutput, _calculateComparison, acceptQuestion, index as actions, allConflict, calculateGrading, calculateManyComparator, calculateOneComparator, clearAllOverrides, clearGrading, createGradingAndScores, editAnswer, generateGrading, getStudentId, hasUnderstand, notUnderstand, prepareConflict, presenceSessionStudent, presenceSessionTeacher, rasionalizeGrading, sendAnswer, sendQuestion, setSomething, syncCommitment, updateGradingAndScores };
package/build/index.mjs CHANGED
@@ -339,6 +339,47 @@ async function _getSessionConflict(stream, input) {
339
339
  return result.value;
340
340
  }
341
341
 
342
+ const allConflict = Action.define({
343
+ key: "allConflict",
344
+ name: "All Conflict",
345
+ type: "command",
346
+ category: "domain",
347
+ execute: async (input, stream) => {
348
+ const dbs = stream.core.dbs;
349
+ const dbSession = dbs["neu-jadwal"].models["neu:jadwal:classSession"];
350
+ const findSession = await dbSession.find({
351
+ $or: [
352
+ {
353
+ startedAt: {
354
+ $gte: input.startedAt,
355
+ $lte: input.endedAt
356
+ }
357
+ },
358
+ {
359
+ endedAt: {
360
+ $gte: input.startedAt,
361
+ $lte: input.endedAt
362
+ }
363
+ }
364
+ ],
365
+ deletedAt: null
366
+ });
367
+ const pengajarKonflik = findSession.map((field) => field.conflict.teacherConflict.length).reduce((a, b) => a + b, 0);
368
+ const ruanganKonflik = findSession.map((field) => field.conflict.roomConflict.length).reduce((a, b) => a + b, 0);
369
+ const komitmenKonflik = findSession.map((field) => field.conflict.commitmentConflict.length).reduce((a, b) => a + b, 0);
370
+ return Result.ok({
371
+ state: "ConflictAll",
372
+ message: "All conflict has been get.",
373
+ data: {
374
+ sessionCount: findSession.length,
375
+ teacherConflictCount: pengajarKonflik,
376
+ roomConflictCount: ruanganKonflik,
377
+ commitmentConflictCount: komitmenKonflik
378
+ }
379
+ });
380
+ }
381
+ });
382
+
342
383
  const generateGrading = Action.define({
343
384
  key: "generateGrading",
344
385
  name: "Create Penilaian dan Score",
@@ -1326,6 +1367,7 @@ const index = {
1326
1367
  __proto__: null,
1327
1368
  _calculateComparison: _calculateComparison,
1328
1369
  acceptQuestion: acceptQuestion,
1370
+ allConflict: allConflict,
1329
1371
  calculateGrading: calculateGrading,
1330
1372
  calculateManyComparator: calculateManyComparator,
1331
1373
  calculateOneComparator: calculateOneComparator,
@@ -1348,4 +1390,4 @@ const index = {
1348
1390
  updateGradingAndScores: updateGradingAndScores
1349
1391
  };
1350
1392
 
1351
- export { _calculateComparison, acceptQuestion, index as actions, calculateGrading, calculateManyComparator, calculateOneComparator, clearAllOverrides, clearGrading, createGradingAndScores, editAnswer, generateGrading, getStudentId, hasUnderstand, notUnderstand, prepareConflict, presenceSessionStudent, presenceSessionTeacher, rasionalizeGrading, sendAnswer, sendQuestion, setSomething, syncCommitment, updateGradingAndScores };
1393
+ export { _calculateComparison, acceptQuestion, index as actions, allConflict, calculateGrading, calculateManyComparator, calculateOneComparator, clearAllOverrides, clearGrading, createGradingAndScores, editAnswer, generateGrading, getStudentId, hasUnderstand, notUnderstand, prepareConflict, presenceSessionStudent, presenceSessionTeacher, rasionalizeGrading, sendAnswer, sendQuestion, setSomething, syncCommitment, updateGradingAndScores };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@neutron.co.id/pendidikan-operation",
3
- "version": "1.5.2-beta.1",
3
+ "version": "1.5.2-beta.2",
4
4
  "description": "Operation package of Neutron Pendidikan.",
5
5
  "license": "SEE LICENSE IN LICENSE",
6
6
  "contributors": [
@@ -37,11 +37,11 @@
37
37
  "@neon.id/query": "0.41.0",
38
38
  "@neon.id/types": "1.38.0",
39
39
  "@neon.id/utils": "0.39.0",
40
- "@neutron.co.id/akademik-models": "1.3.2-beta.1",
41
- "@neutron.co.id/jadwal-models": "1.3.2-beta.1",
42
- "@neutron.co.id/penilaian-models": "1.5.2-beta.1",
40
+ "@neutron.co.id/akademik-models": "1.3.2-beta.2",
41
+ "@neutron.co.id/jadwal-models": "1.3.2-beta.2",
42
+ "@neutron.co.id/penilaian-models": "1.5.2-beta.2",
43
43
  "@neutron.co.id/personalia-models": "1.4.0",
44
- "@neutron.co.id/tanya-models": "1.2.2-beta.1",
44
+ "@neutron.co.id/tanya-models": "1.2.2-beta.2",
45
45
  "mongoose": "6.10.0",
46
46
  "nanoid": "4.0.1",
47
47
  "ofetch": "1.0.1"
@@ -67,15 +67,15 @@
67
67
  "@neon.id/query": "^0.41.0",
68
68
  "@neon.id/types": "^1.38.0",
69
69
  "@neon.id/utils": "^0.39.0",
70
- "@neutron.co.id/akademik-models": "^1.3.2-beta.1",
71
- "@neutron.co.id/jadwal-models": "^1.3.2-beta.1",
72
- "@neutron.co.id/penilaian-models": "^1.5.2-beta.1",
73
- "@neutron.co.id/tanya-models": "^1.2.2-beta.1",
70
+ "@neutron.co.id/akademik-models": "^1.3.2-beta.2",
71
+ "@neutron.co.id/jadwal-models": "^1.3.2-beta.2",
72
+ "@neutron.co.id/penilaian-models": "^1.5.2-beta.2",
73
+ "@neutron.co.id/tanya-models": "^1.2.2-beta.2",
74
74
  "mongoose": "^6.10.0",
75
75
  "ofetch": "^1.0.1"
76
76
  },
77
77
  "publishConfig": {
78
78
  "access": "public"
79
79
  },
80
- "build": 32
80
+ "build": 33
81
81
  }