@neutron.co.id/pendidikan-operation 1.27.3 → 1.27.6
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.
|
@@ -18,8 +18,8 @@ const syncStudentReport = operation.Action.define({
|
|
|
18
18
|
const sessionIds = [];
|
|
19
19
|
const actions = stream.actions.data;
|
|
20
20
|
if (input.groupId !== null) {
|
|
21
|
-
const dbSession = stream.core.dbs["neu-jadwal"].models["neu:jadwal:
|
|
22
|
-
const findSession = await dbSession.find({ groupIds: { $in: [input.groupId] } }).select(["_id"]);
|
|
21
|
+
const dbSession = stream.core.dbs["neu-jadwal"].models["neu:jadwal:classSession"];
|
|
22
|
+
const findSession = (await dbSession.find({ groupIds: { $in: [input.groupId] } }).select(["_id"])).map((s) => s.id);
|
|
23
23
|
sessionIds.push(findSession);
|
|
24
24
|
}
|
|
25
25
|
const dbs = stream.core.dbs;
|
|
@@ -57,6 +57,15 @@ const syncStudentReport = operation.Action.define({
|
|
|
57
57
|
}
|
|
58
58
|
);
|
|
59
59
|
}
|
|
60
|
+
const filterPresensi = {
|
|
61
|
+
studentId: input.studentId,
|
|
62
|
+
presenceAt: {
|
|
63
|
+
$gte: input.startedAt,
|
|
64
|
+
$lte: input.endedAt
|
|
65
|
+
},
|
|
66
|
+
deletedAt: { $exists: false },
|
|
67
|
+
...input.groupId && { classSessionBranchIds: { $in: input.branchIds } }
|
|
68
|
+
};
|
|
60
69
|
const dataAttendance = await actions.getMany.execute(
|
|
61
70
|
{
|
|
62
71
|
model: "neu:jadwal:classAttendance",
|
|
@@ -66,16 +75,9 @@ const syncStudentReport = operation.Action.define({
|
|
|
66
75
|
presenceAt: 1,
|
|
67
76
|
sessionType: 1
|
|
68
77
|
},
|
|
69
|
-
filter:
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
$gte: input.startedAt,
|
|
73
|
-
$lte: input.endedAt
|
|
74
|
-
},
|
|
75
|
-
deletedAt: { $exists: false },
|
|
76
|
-
...input.groupId && { classSessionBranchIds: { $in: input.branchIds } }
|
|
77
|
-
},
|
|
78
|
-
sort: { createdAt: -1 }
|
|
78
|
+
filter: filterPresensi,
|
|
79
|
+
sort: { createdAt: -1 },
|
|
80
|
+
limit: 99999
|
|
79
81
|
})
|
|
80
82
|
},
|
|
81
83
|
stream
|
|
@@ -203,7 +205,8 @@ const syncStudentReport = operation.Action.define({
|
|
|
203
205
|
startedAt: { $gte: input.startedAt, $lte: input.endedAt },
|
|
204
206
|
branchIds: { $in: input.branchIds },
|
|
205
207
|
studentIds: { $in: [input.studentId] }
|
|
206
|
-
}
|
|
208
|
+
},
|
|
209
|
+
limit: 99999
|
|
207
210
|
})
|
|
208
211
|
}, stream);
|
|
209
212
|
const sessionCount = resultSession.payload?.data?.total || 0;
|
|
@@ -237,7 +240,8 @@ const syncStudentReport = operation.Action.define({
|
|
|
237
240
|
branchIds: { $in: input.branchIds },
|
|
238
241
|
studentIds: { $in: [input.studentId] },
|
|
239
242
|
type: "offline"
|
|
240
|
-
}
|
|
243
|
+
},
|
|
244
|
+
limit: 99999
|
|
241
245
|
})
|
|
242
246
|
}, stream);
|
|
243
247
|
const totalOffline = sessionOffline.payload?.data?.total || 0;
|
|
@@ -249,7 +253,8 @@ const syncStudentReport = operation.Action.define({
|
|
|
249
253
|
branchIds: { $in: input.branchIds },
|
|
250
254
|
studentIds: { $in: [input.studentId] },
|
|
251
255
|
type: "online"
|
|
252
|
-
}
|
|
256
|
+
},
|
|
257
|
+
limit: 99999
|
|
253
258
|
})
|
|
254
259
|
}, stream);
|
|
255
260
|
const totalOnline = sessionOnline.payload?.data?.total || 0;
|
|
@@ -261,7 +266,8 @@ const syncStudentReport = operation.Action.define({
|
|
|
261
266
|
branchIds: { $in: input.branchIds },
|
|
262
267
|
studentIds: { $in: [input.studentId] },
|
|
263
268
|
type: "hybrid"
|
|
264
|
-
}
|
|
269
|
+
},
|
|
270
|
+
limit: 99999
|
|
265
271
|
})
|
|
266
272
|
}, stream);
|
|
267
273
|
const totalHybrid = sessionHybrid.payload?.data?.total || 0;
|
|
@@ -312,7 +318,8 @@ const syncStudentReport = operation.Action.define({
|
|
|
312
318
|
type: 1,
|
|
313
319
|
branchIds: 1
|
|
314
320
|
}
|
|
315
|
-
}
|
|
321
|
+
},
|
|
322
|
+
limit: 99999
|
|
316
323
|
})
|
|
317
324
|
}, stream);
|
|
318
325
|
const totalActivities = activityResult.payload.data?.filter((item) => {
|
|
@@ -16,8 +16,8 @@ const syncStudentReport = Action.define({
|
|
|
16
16
|
const sessionIds = [];
|
|
17
17
|
const actions = stream.actions.data;
|
|
18
18
|
if (input.groupId !== null) {
|
|
19
|
-
const dbSession = stream.core.dbs["neu-jadwal"].models["neu:jadwal:
|
|
20
|
-
const findSession = await dbSession.find({ groupIds: { $in: [input.groupId] } }).select(["_id"]);
|
|
19
|
+
const dbSession = stream.core.dbs["neu-jadwal"].models["neu:jadwal:classSession"];
|
|
20
|
+
const findSession = (await dbSession.find({ groupIds: { $in: [input.groupId] } }).select(["_id"])).map((s) => s.id);
|
|
21
21
|
sessionIds.push(findSession);
|
|
22
22
|
}
|
|
23
23
|
const dbs = stream.core.dbs;
|
|
@@ -55,6 +55,15 @@ const syncStudentReport = Action.define({
|
|
|
55
55
|
}
|
|
56
56
|
);
|
|
57
57
|
}
|
|
58
|
+
const filterPresensi = {
|
|
59
|
+
studentId: input.studentId,
|
|
60
|
+
presenceAt: {
|
|
61
|
+
$gte: input.startedAt,
|
|
62
|
+
$lte: input.endedAt
|
|
63
|
+
},
|
|
64
|
+
deletedAt: { $exists: false },
|
|
65
|
+
...input.groupId && { classSessionBranchIds: { $in: input.branchIds } }
|
|
66
|
+
};
|
|
58
67
|
const dataAttendance = await actions.getMany.execute(
|
|
59
68
|
{
|
|
60
69
|
model: "neu:jadwal:classAttendance",
|
|
@@ -64,16 +73,9 @@ const syncStudentReport = Action.define({
|
|
|
64
73
|
presenceAt: 1,
|
|
65
74
|
sessionType: 1
|
|
66
75
|
},
|
|
67
|
-
filter:
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
$gte: input.startedAt,
|
|
71
|
-
$lte: input.endedAt
|
|
72
|
-
},
|
|
73
|
-
deletedAt: { $exists: false },
|
|
74
|
-
...input.groupId && { classSessionBranchIds: { $in: input.branchIds } }
|
|
75
|
-
},
|
|
76
|
-
sort: { createdAt: -1 }
|
|
76
|
+
filter: filterPresensi,
|
|
77
|
+
sort: { createdAt: -1 },
|
|
78
|
+
limit: 99999
|
|
77
79
|
})
|
|
78
80
|
},
|
|
79
81
|
stream
|
|
@@ -201,7 +203,8 @@ const syncStudentReport = Action.define({
|
|
|
201
203
|
startedAt: { $gte: input.startedAt, $lte: input.endedAt },
|
|
202
204
|
branchIds: { $in: input.branchIds },
|
|
203
205
|
studentIds: { $in: [input.studentId] }
|
|
204
|
-
}
|
|
206
|
+
},
|
|
207
|
+
limit: 99999
|
|
205
208
|
})
|
|
206
209
|
}, stream);
|
|
207
210
|
const sessionCount = resultSession.payload?.data?.total || 0;
|
|
@@ -235,7 +238,8 @@ const syncStudentReport = Action.define({
|
|
|
235
238
|
branchIds: { $in: input.branchIds },
|
|
236
239
|
studentIds: { $in: [input.studentId] },
|
|
237
240
|
type: "offline"
|
|
238
|
-
}
|
|
241
|
+
},
|
|
242
|
+
limit: 99999
|
|
239
243
|
})
|
|
240
244
|
}, stream);
|
|
241
245
|
const totalOffline = sessionOffline.payload?.data?.total || 0;
|
|
@@ -247,7 +251,8 @@ const syncStudentReport = Action.define({
|
|
|
247
251
|
branchIds: { $in: input.branchIds },
|
|
248
252
|
studentIds: { $in: [input.studentId] },
|
|
249
253
|
type: "online"
|
|
250
|
-
}
|
|
254
|
+
},
|
|
255
|
+
limit: 99999
|
|
251
256
|
})
|
|
252
257
|
}, stream);
|
|
253
258
|
const totalOnline = sessionOnline.payload?.data?.total || 0;
|
|
@@ -259,7 +264,8 @@ const syncStudentReport = Action.define({
|
|
|
259
264
|
branchIds: { $in: input.branchIds },
|
|
260
265
|
studentIds: { $in: [input.studentId] },
|
|
261
266
|
type: "hybrid"
|
|
262
|
-
}
|
|
267
|
+
},
|
|
268
|
+
limit: 99999
|
|
263
269
|
})
|
|
264
270
|
}, stream);
|
|
265
271
|
const totalHybrid = sessionHybrid.payload?.data?.total || 0;
|
|
@@ -310,7 +316,8 @@ const syncStudentReport = Action.define({
|
|
|
310
316
|
type: 1,
|
|
311
317
|
branchIds: 1
|
|
312
318
|
}
|
|
313
|
-
}
|
|
319
|
+
},
|
|
320
|
+
limit: 99999
|
|
314
321
|
})
|
|
315
322
|
}, stream);
|
|
316
323
|
const totalActivities = activityResult.payload.data?.filter((item) => {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@neutron.co.id/pendidikan-operation",
|
|
3
|
-
"version": "1.27.
|
|
3
|
+
"version": "1.27.6",
|
|
4
4
|
"description": "Operation package of Neutron Pendidikan.",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE",
|
|
6
6
|
"contributors": [
|
|
@@ -39,9 +39,9 @@
|
|
|
39
39
|
"@neon.id/types": "^1.69.0",
|
|
40
40
|
"@neon.id/utils": "^1.52.0",
|
|
41
41
|
"@neon.id/z": "^1.16.0",
|
|
42
|
-
"@neutron.co.id/akademik-models": "^1.21.
|
|
43
|
-
"@neutron.co.id/jadwal-models": "^1.19.
|
|
44
|
-
"@neutron.co.id/pendidikan-types": "^1.23.
|
|
42
|
+
"@neutron.co.id/akademik-models": "^1.21.3",
|
|
43
|
+
"@neutron.co.id/jadwal-models": "^1.19.13",
|
|
44
|
+
"@neutron.co.id/pendidikan-types": "^1.23.2",
|
|
45
45
|
"@neutron.co.id/penilaian-models": "^1.17.8",
|
|
46
46
|
"@neutron.co.id/personalia-models": "^1.11.6",
|
|
47
47
|
"@neutron.co.id/tanya-models": "^1.13.4",
|
|
@@ -75,9 +75,9 @@
|
|
|
75
75
|
"@neon.id/types": "^1.69.0",
|
|
76
76
|
"@neon.id/utils": "^1.52.0",
|
|
77
77
|
"@neon.id/z": "^1.16.0",
|
|
78
|
-
"@neutron.co.id/akademik-models": "^1.21.
|
|
79
|
-
"@neutron.co.id/jadwal-models": "^1.19.
|
|
80
|
-
"@neutron.co.id/pendidikan-types": "^1.23.
|
|
78
|
+
"@neutron.co.id/akademik-models": "^1.21.3",
|
|
79
|
+
"@neutron.co.id/jadwal-models": "^1.19.13",
|
|
80
|
+
"@neutron.co.id/pendidikan-types": "^1.23.2",
|
|
81
81
|
"@neutron.co.id/penilaian-models": "^1.17.8",
|
|
82
82
|
"@neutron.co.id/personalia-models": "^1.11.6",
|
|
83
83
|
"@neutron.co.id/tanya-models": "^1.13.4",
|
|
@@ -86,5 +86,5 @@
|
|
|
86
86
|
"publishConfig": {
|
|
87
87
|
"access": "public"
|
|
88
88
|
},
|
|
89
|
-
"build":
|
|
89
|
+
"build": 131
|
|
90
90
|
}
|