@neutron.co.id/pendidikan-operation 1.5.0 → 1.5.1-beta.1
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 +65 -9
- package/build/index.d.ts +5 -0
- package/build/index.mjs +65 -9
- package/package.json +2 -2
package/build/index.cjs
CHANGED
|
@@ -146,34 +146,85 @@ const getStudentId = operation.Action.define({
|
|
|
146
146
|
const dbStudent = dbs["neu-akademik"].models["neu:akademik:student"];
|
|
147
147
|
const findStudent = await dbStudent.findOne({ userId: input.userId });
|
|
148
148
|
const dbQuestion = dbs["neu-tanya"].models["neu:tanya:question"];
|
|
149
|
-
const findQuestion = await dbQuestion.find({
|
|
149
|
+
const findQuestion = await dbQuestion.find({
|
|
150
|
+
studentId: findStudent.id,
|
|
151
|
+
createdAt: {
|
|
152
|
+
$gte: input.startedAt,
|
|
153
|
+
$lte: input.endedAt
|
|
154
|
+
},
|
|
155
|
+
deletedAt: null
|
|
156
|
+
});
|
|
150
157
|
const dbClassGroup = dbs["neu-jadwal"].models["neu:jadwal:classGroup"];
|
|
151
158
|
const findClassGroup = await dbClassGroup.find({
|
|
152
|
-
studentId: findStudent.id
|
|
159
|
+
studentId: findStudent.id,
|
|
160
|
+
createdAt: {
|
|
161
|
+
$gte: input.startedAt,
|
|
162
|
+
$lte: input.endedAt
|
|
163
|
+
},
|
|
164
|
+
deletedAt: null
|
|
153
165
|
});
|
|
154
166
|
const dbClassActivity = dbs["neu-jadwal"].models["neu:jadwal:classActivity"];
|
|
155
167
|
const findClassActivity = await dbClassActivity.find({
|
|
156
|
-
studentId: findStudent.id
|
|
168
|
+
studentId: findStudent.id,
|
|
169
|
+
createdAt: {
|
|
170
|
+
$gte: input.startedAt,
|
|
171
|
+
$lte: input.endedAt
|
|
172
|
+
},
|
|
173
|
+
deletedAt: null
|
|
157
174
|
});
|
|
158
175
|
const dbClassAttendance = dbs["neu-jadwal"].models["neu:jadwal:classAttendance"];
|
|
159
176
|
const findClassAttendance = await dbClassAttendance.find({
|
|
160
|
-
studentId: findStudent.id
|
|
177
|
+
studentId: findStudent.id,
|
|
178
|
+
createdAt: {
|
|
179
|
+
$gte: input.startedAt,
|
|
180
|
+
$lte: input.endedAt
|
|
181
|
+
},
|
|
182
|
+
deletedAt: null
|
|
161
183
|
});
|
|
162
184
|
const dbClassSession = dbs["neu-jadwal"].models["neu:jadwal:classSession"];
|
|
163
185
|
const findClassSession = await dbClassSession.find({
|
|
164
|
-
studentId: findStudent.id
|
|
186
|
+
studentId: findStudent.id,
|
|
187
|
+
createdAt: {
|
|
188
|
+
$gte: input.startedAt,
|
|
189
|
+
$lte: input.endedAt
|
|
190
|
+
},
|
|
191
|
+
deletedAt: null
|
|
165
192
|
});
|
|
193
|
+
const shortInfoSesi1 = findClassSession.sort((first, second) => {
|
|
194
|
+
return second.createdAt - first.createdAt;
|
|
195
|
+
})[0]?.shortInformationSession || "-";
|
|
196
|
+
const shortInfoSesi2 = findClassSession.sort((first, second) => {
|
|
197
|
+
return second.createdAt - first.createdAt;
|
|
198
|
+
})[1]?.shortInformationSession || "-";
|
|
199
|
+
const shortInfoSesi3 = findClassSession.sort((first, second) => {
|
|
200
|
+
return second.createdAt - first.createdAt;
|
|
201
|
+
})[2]?.shortInformationSession || "-";
|
|
166
202
|
const dbClassConsultation = dbs["neu-jadwal"].models["neu:jadwal:classConsultation"];
|
|
167
203
|
const findClassConsultation = await dbClassConsultation.find({
|
|
168
|
-
studentId: findStudent.id
|
|
204
|
+
studentId: findStudent.id,
|
|
205
|
+
createdAt: {
|
|
206
|
+
$gte: input.startedAt,
|
|
207
|
+
$lte: input.endedAt
|
|
208
|
+
},
|
|
209
|
+
deletedAt: null
|
|
169
210
|
});
|
|
170
211
|
const dbGrading = dbs["neu-penilaian"].models["neu:penilaian:grading"];
|
|
171
212
|
const findGrading = await dbGrading.find({
|
|
172
|
-
studentId: findStudent.id
|
|
213
|
+
studentId: findStudent.id,
|
|
214
|
+
createdAt: {
|
|
215
|
+
$gte: input.startedAt,
|
|
216
|
+
$lte: input.endedAt
|
|
217
|
+
},
|
|
218
|
+
deletedAt: null
|
|
173
219
|
});
|
|
174
220
|
const dbGradingR = dbs["neu-penilaian"].models["neu:penilaian:gradingRasionalization"];
|
|
175
221
|
const findGradingRasionalization = await dbGradingR.find({
|
|
176
|
-
studentId: findStudent.id
|
|
222
|
+
studentId: findStudent.id,
|
|
223
|
+
createdAt: {
|
|
224
|
+
$gte: input.startedAt,
|
|
225
|
+
$lte: input.endedAt
|
|
226
|
+
},
|
|
227
|
+
deletedAt: null
|
|
177
228
|
});
|
|
178
229
|
return core.Result.ok({
|
|
179
230
|
state: "StudentIdGet",
|
|
@@ -188,7 +239,12 @@ const getStudentId = operation.Action.define({
|
|
|
188
239
|
classConsultationCount: findClassConsultation.length,
|
|
189
240
|
// checkInCount: findCheckIn.length,
|
|
190
241
|
gradingCount: findGrading.length,
|
|
191
|
-
gradingRasionalizationCount: findGradingRasionalization.length
|
|
242
|
+
gradingRasionalizationCount: findGradingRasionalization.length,
|
|
243
|
+
shortInformationSession1: shortInfoSesi1,
|
|
244
|
+
shortInformationSession2: shortInfoSesi2,
|
|
245
|
+
shortInformationSession3: shortInfoSesi3,
|
|
246
|
+
startedAt: input.startedAt,
|
|
247
|
+
endedAt: input.endedAt
|
|
192
248
|
}
|
|
193
249
|
});
|
|
194
250
|
}
|
package/build/index.d.ts
CHANGED
|
@@ -45,6 +45,8 @@ type SyncCommitmentAction = typeof syncCommitment;
|
|
|
45
45
|
|
|
46
46
|
interface GetStudentIdInput {
|
|
47
47
|
userId: string;
|
|
48
|
+
startedAt: string;
|
|
49
|
+
endedAt: string;
|
|
48
50
|
}
|
|
49
51
|
interface GetStudentIdOutput {
|
|
50
52
|
studentId: string;
|
|
@@ -56,6 +58,9 @@ interface GetStudentIdOutput {
|
|
|
56
58
|
classConsultationCount: number;
|
|
57
59
|
gradingCount: number;
|
|
58
60
|
gradingRasionalizationCount: number;
|
|
61
|
+
shortInformationSession1: string;
|
|
62
|
+
shortInformationSession2: string;
|
|
63
|
+
shortInformationSession3: string;
|
|
59
64
|
}
|
|
60
65
|
interface GetStudentIdMeta {
|
|
61
66
|
}
|
package/build/index.mjs
CHANGED
|
@@ -144,34 +144,85 @@ const getStudentId = Action.define({
|
|
|
144
144
|
const dbStudent = dbs["neu-akademik"].models["neu:akademik:student"];
|
|
145
145
|
const findStudent = await dbStudent.findOne({ userId: input.userId });
|
|
146
146
|
const dbQuestion = dbs["neu-tanya"].models["neu:tanya:question"];
|
|
147
|
-
const findQuestion = await dbQuestion.find({
|
|
147
|
+
const findQuestion = await dbQuestion.find({
|
|
148
|
+
studentId: findStudent.id,
|
|
149
|
+
createdAt: {
|
|
150
|
+
$gte: input.startedAt,
|
|
151
|
+
$lte: input.endedAt
|
|
152
|
+
},
|
|
153
|
+
deletedAt: null
|
|
154
|
+
});
|
|
148
155
|
const dbClassGroup = dbs["neu-jadwal"].models["neu:jadwal:classGroup"];
|
|
149
156
|
const findClassGroup = await dbClassGroup.find({
|
|
150
|
-
studentId: findStudent.id
|
|
157
|
+
studentId: findStudent.id,
|
|
158
|
+
createdAt: {
|
|
159
|
+
$gte: input.startedAt,
|
|
160
|
+
$lte: input.endedAt
|
|
161
|
+
},
|
|
162
|
+
deletedAt: null
|
|
151
163
|
});
|
|
152
164
|
const dbClassActivity = dbs["neu-jadwal"].models["neu:jadwal:classActivity"];
|
|
153
165
|
const findClassActivity = await dbClassActivity.find({
|
|
154
|
-
studentId: findStudent.id
|
|
166
|
+
studentId: findStudent.id,
|
|
167
|
+
createdAt: {
|
|
168
|
+
$gte: input.startedAt,
|
|
169
|
+
$lte: input.endedAt
|
|
170
|
+
},
|
|
171
|
+
deletedAt: null
|
|
155
172
|
});
|
|
156
173
|
const dbClassAttendance = dbs["neu-jadwal"].models["neu:jadwal:classAttendance"];
|
|
157
174
|
const findClassAttendance = await dbClassAttendance.find({
|
|
158
|
-
studentId: findStudent.id
|
|
175
|
+
studentId: findStudent.id,
|
|
176
|
+
createdAt: {
|
|
177
|
+
$gte: input.startedAt,
|
|
178
|
+
$lte: input.endedAt
|
|
179
|
+
},
|
|
180
|
+
deletedAt: null
|
|
159
181
|
});
|
|
160
182
|
const dbClassSession = dbs["neu-jadwal"].models["neu:jadwal:classSession"];
|
|
161
183
|
const findClassSession = await dbClassSession.find({
|
|
162
|
-
studentId: findStudent.id
|
|
184
|
+
studentId: findStudent.id,
|
|
185
|
+
createdAt: {
|
|
186
|
+
$gte: input.startedAt,
|
|
187
|
+
$lte: input.endedAt
|
|
188
|
+
},
|
|
189
|
+
deletedAt: null
|
|
163
190
|
});
|
|
191
|
+
const shortInfoSesi1 = findClassSession.sort((first, second) => {
|
|
192
|
+
return second.createdAt - first.createdAt;
|
|
193
|
+
})[0]?.shortInformationSession || "-";
|
|
194
|
+
const shortInfoSesi2 = findClassSession.sort((first, second) => {
|
|
195
|
+
return second.createdAt - first.createdAt;
|
|
196
|
+
})[1]?.shortInformationSession || "-";
|
|
197
|
+
const shortInfoSesi3 = findClassSession.sort((first, second) => {
|
|
198
|
+
return second.createdAt - first.createdAt;
|
|
199
|
+
})[2]?.shortInformationSession || "-";
|
|
164
200
|
const dbClassConsultation = dbs["neu-jadwal"].models["neu:jadwal:classConsultation"];
|
|
165
201
|
const findClassConsultation = await dbClassConsultation.find({
|
|
166
|
-
studentId: findStudent.id
|
|
202
|
+
studentId: findStudent.id,
|
|
203
|
+
createdAt: {
|
|
204
|
+
$gte: input.startedAt,
|
|
205
|
+
$lte: input.endedAt
|
|
206
|
+
},
|
|
207
|
+
deletedAt: null
|
|
167
208
|
});
|
|
168
209
|
const dbGrading = dbs["neu-penilaian"].models["neu:penilaian:grading"];
|
|
169
210
|
const findGrading = await dbGrading.find({
|
|
170
|
-
studentId: findStudent.id
|
|
211
|
+
studentId: findStudent.id,
|
|
212
|
+
createdAt: {
|
|
213
|
+
$gte: input.startedAt,
|
|
214
|
+
$lte: input.endedAt
|
|
215
|
+
},
|
|
216
|
+
deletedAt: null
|
|
171
217
|
});
|
|
172
218
|
const dbGradingR = dbs["neu-penilaian"].models["neu:penilaian:gradingRasionalization"];
|
|
173
219
|
const findGradingRasionalization = await dbGradingR.find({
|
|
174
|
-
studentId: findStudent.id
|
|
220
|
+
studentId: findStudent.id,
|
|
221
|
+
createdAt: {
|
|
222
|
+
$gte: input.startedAt,
|
|
223
|
+
$lte: input.endedAt
|
|
224
|
+
},
|
|
225
|
+
deletedAt: null
|
|
175
226
|
});
|
|
176
227
|
return Result.ok({
|
|
177
228
|
state: "StudentIdGet",
|
|
@@ -186,7 +237,12 @@ const getStudentId = Action.define({
|
|
|
186
237
|
classConsultationCount: findClassConsultation.length,
|
|
187
238
|
// checkInCount: findCheckIn.length,
|
|
188
239
|
gradingCount: findGrading.length,
|
|
189
|
-
gradingRasionalizationCount: findGradingRasionalization.length
|
|
240
|
+
gradingRasionalizationCount: findGradingRasionalization.length,
|
|
241
|
+
shortInformationSession1: shortInfoSesi1,
|
|
242
|
+
shortInformationSession2: shortInfoSesi2,
|
|
243
|
+
shortInformationSession3: shortInfoSesi3,
|
|
244
|
+
startedAt: input.startedAt,
|
|
245
|
+
endedAt: input.endedAt
|
|
190
246
|
}
|
|
191
247
|
});
|
|
192
248
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@neutron.co.id/pendidikan-operation",
|
|
3
|
-
"version": "1.5.
|
|
3
|
+
"version": "1.5.1-beta.1",
|
|
4
4
|
"description": "Operation package of Neutron Pendidikan.",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE",
|
|
6
6
|
"contributors": [
|
|
@@ -77,5 +77,5 @@
|
|
|
77
77
|
"publishConfig": {
|
|
78
78
|
"access": "public"
|
|
79
79
|
},
|
|
80
|
-
"build":
|
|
80
|
+
"build": 28
|
|
81
81
|
}
|