@neutron.co.id/pendidikan-operation 1.27.14 → 1.27.17
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/actions/jadwal/sendClassConsultationNotification/sendClassConsultationNotification.action.cjs +9 -0
- package/build/actions/jadwal/sendClassConsultationNotification/sendClassConsultationNotification.action.mjs +9 -0
- package/build/actions/penilaian/sendScoreNotification/sendScoreNotification.action.cjs +8 -0
- package/build/actions/penilaian/sendScoreNotification/sendScoreNotification.action.mjs +8 -0
- package/build/actions/tanya/action.sendAnswer.cjs +9 -0
- package/build/actions/tanya/action.sendAnswer.mjs +9 -0
- package/build/providers/data/useImportData.cjs +2 -2
- package/build/providers/data/useImportData.mjs +2 -2
- package/package.json +2 -2
|
@@ -86,6 +86,15 @@ const sendClassConsultationNotification = operation.Action.define({
|
|
|
86
86
|
});
|
|
87
87
|
if (response?.data?.transactionId)
|
|
88
88
|
transactionIds.push(response.data.transactionId);
|
|
89
|
+
await stream?.actions.data.createOne.execute({
|
|
90
|
+
model: "neu:data:notification",
|
|
91
|
+
data: {
|
|
92
|
+
userId: student.userId,
|
|
93
|
+
moduleType: "classConsultation-created",
|
|
94
|
+
moduleId: input?.classConsultationId,
|
|
95
|
+
url: `${config?.appFluffyUrl}/jadwal/consultation/${input?.classConsultationId}`
|
|
96
|
+
}
|
|
97
|
+
}, stream);
|
|
89
98
|
sentCount++;
|
|
90
99
|
} catch (error) {
|
|
91
100
|
console.error(`Failed to send consultation notification to student ${student.userId}:`, error);
|
|
@@ -84,6 +84,15 @@ const sendClassConsultationNotification = Action.define({
|
|
|
84
84
|
});
|
|
85
85
|
if (response?.data?.transactionId)
|
|
86
86
|
transactionIds.push(response.data.transactionId);
|
|
87
|
+
await stream?.actions.data.createOne.execute({
|
|
88
|
+
model: "neu:data:notification",
|
|
89
|
+
data: {
|
|
90
|
+
userId: student.userId,
|
|
91
|
+
moduleType: "classConsultation-created",
|
|
92
|
+
moduleId: input?.classConsultationId,
|
|
93
|
+
url: `${config?.appFluffyUrl}/jadwal/consultation/${input?.classConsultationId}`
|
|
94
|
+
}
|
|
95
|
+
}, stream);
|
|
87
96
|
sentCount++;
|
|
88
97
|
} catch (error) {
|
|
89
98
|
console.error(`Failed to send consultation notification to student ${student.userId}:`, error);
|
|
@@ -123,6 +123,14 @@ const sendScoreNotification = operation.Action.define({
|
|
|
123
123
|
});
|
|
124
124
|
if (response?.data?.transactionId)
|
|
125
125
|
transactionIds.push(response.data.transactionId);
|
|
126
|
+
await stream?.actions.data.createOne.execute({
|
|
127
|
+
model: "neu:data:notification",
|
|
128
|
+
data: {
|
|
129
|
+
userId: gradingData.student.userId,
|
|
130
|
+
moduleType: "score-published",
|
|
131
|
+
moduleId: input?.gradingId
|
|
132
|
+
}
|
|
133
|
+
}, stream);
|
|
126
134
|
sentCount++;
|
|
127
135
|
} catch (error) {
|
|
128
136
|
console.error(`Failed to send score notification to student ${gradingData.student.userId}:`, error);
|
|
@@ -121,6 +121,14 @@ const sendScoreNotification = Action.define({
|
|
|
121
121
|
});
|
|
122
122
|
if (response?.data?.transactionId)
|
|
123
123
|
transactionIds.push(response.data.transactionId);
|
|
124
|
+
await stream?.actions.data.createOne.execute({
|
|
125
|
+
model: "neu:data:notification",
|
|
126
|
+
data: {
|
|
127
|
+
userId: gradingData.student.userId,
|
|
128
|
+
moduleType: "score-published",
|
|
129
|
+
moduleId: input?.gradingId
|
|
130
|
+
}
|
|
131
|
+
}, stream);
|
|
124
132
|
sentCount++;
|
|
125
133
|
} catch (error) {
|
|
126
134
|
console.error(`Failed to send score notification to student ${gradingData.student.userId}:`, error);
|
|
@@ -107,6 +107,15 @@ const sendAnswer = operation.Action.define({
|
|
|
107
107
|
});
|
|
108
108
|
if (novuResp?.data?.transactionId)
|
|
109
109
|
notificationEventIds.push(novuResp.data.transactionId);
|
|
110
|
+
await stream.actions.data.createOne.execute({
|
|
111
|
+
model: "neu:data:notification",
|
|
112
|
+
data: {
|
|
113
|
+
userId: student.userId,
|
|
114
|
+
moduleType: "question-answered",
|
|
115
|
+
moduleId: input.questionId,
|
|
116
|
+
url: `${config?.appFluffyUrl}/tanya/${input.questionId}`
|
|
117
|
+
}
|
|
118
|
+
}, stream);
|
|
110
119
|
}
|
|
111
120
|
await stream.actions.data.updateOne.execute({
|
|
112
121
|
model: "neu:tanya:question",
|
|
@@ -105,6 +105,15 @@ const sendAnswer = Action.define({
|
|
|
105
105
|
});
|
|
106
106
|
if (novuResp?.data?.transactionId)
|
|
107
107
|
notificationEventIds.push(novuResp.data.transactionId);
|
|
108
|
+
await stream.actions.data.createOne.execute({
|
|
109
|
+
model: "neu:data:notification",
|
|
110
|
+
data: {
|
|
111
|
+
userId: student.userId,
|
|
112
|
+
moduleType: "question-answered",
|
|
113
|
+
moduleId: input.questionId,
|
|
114
|
+
url: `${config?.appFluffyUrl}/tanya/${input.questionId}`
|
|
115
|
+
}
|
|
116
|
+
}, stream);
|
|
108
117
|
}
|
|
109
118
|
await stream.actions.data.updateOne.execute({
|
|
110
119
|
model: "neu:tanya:question",
|
|
@@ -276,8 +276,8 @@ function useImportData(stream) {
|
|
|
276
276
|
});
|
|
277
277
|
const subjectMap = await findSubjectsByCodes(stream2, [...uniqueSubjects]);
|
|
278
278
|
const stageMap = await findStages(stream2, [...uniqueStages]);
|
|
279
|
-
const allowedStatus = ["tayang", "arsip", "draf"
|
|
280
|
-
const allowedType = ["live", "hybrid", "
|
|
279
|
+
const allowedStatus = ["tayang", "arsip", "draf"];
|
|
280
|
+
const allowedType = ["live", "hybrid", "tatap muka"];
|
|
281
281
|
for (let i = 0; i < input.datas.length; i++) {
|
|
282
282
|
const row = input.datas[i];
|
|
283
283
|
const idx = i + 1;
|
|
@@ -274,8 +274,8 @@ function useImportData(stream) {
|
|
|
274
274
|
});
|
|
275
275
|
const subjectMap = await findSubjectsByCodes(stream2, [...uniqueSubjects]);
|
|
276
276
|
const stageMap = await findStages(stream2, [...uniqueStages]);
|
|
277
|
-
const allowedStatus = ["tayang", "arsip", "draf"
|
|
278
|
-
const allowedType = ["live", "hybrid", "
|
|
277
|
+
const allowedStatus = ["tayang", "arsip", "draf"];
|
|
278
|
+
const allowedType = ["live", "hybrid", "tatap muka"];
|
|
279
279
|
for (let i = 0; i < input.datas.length; i++) {
|
|
280
280
|
const row = input.datas[i];
|
|
281
281
|
const idx = i + 1;
|
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.17",
|
|
4
4
|
"description": "Operation package of Neutron Pendidikan.",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE",
|
|
6
6
|
"contributors": [
|
|
@@ -86,5 +86,5 @@
|
|
|
86
86
|
"publishConfig": {
|
|
87
87
|
"access": "public"
|
|
88
88
|
},
|
|
89
|
-
"build":
|
|
89
|
+
"build": 142
|
|
90
90
|
}
|