@neutron.co.id/pendidikan-operation 1.27.19 → 1.27.20

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.
@@ -92,6 +92,11 @@ const sendClassConsultationNotification = operation.Action.define({
92
92
  userId: student.userId,
93
93
  moduleType: "classConsultation-created",
94
94
  moduleId: input?.classConsultationId,
95
+ messageData: {
96
+ id: consultation.id,
97
+ subject: consultation.subject?.name,
98
+ message: `Hai! Kamu baru saja ditambahkan ke Interaksi pelajaran ${consultation.subject?.name} oleh Pengajar. Yuk, cek sekarang!`
99
+ },
95
100
  url: `${config?.appFluffyUrl}/jadwal/consultation/${input?.classConsultationId}`
96
101
  }
97
102
  }, stream);
@@ -90,6 +90,11 @@ const sendClassConsultationNotification = Action.define({
90
90
  userId: student.userId,
91
91
  moduleType: "classConsultation-created",
92
92
  moduleId: input?.classConsultationId,
93
+ messageData: {
94
+ id: consultation.id,
95
+ subject: consultation.subject?.name,
96
+ message: `Hai! Kamu baru saja ditambahkan ke Interaksi pelajaran ${consultation.subject?.name} oleh Pengajar. Yuk, cek sekarang!`
97
+ },
93
98
  url: `${config?.appFluffyUrl}/jadwal/consultation/${input?.classConsultationId}`
94
99
  }
95
100
  }, stream);
@@ -128,7 +128,12 @@ const sendScoreNotification = operation.Action.define({
128
128
  data: {
129
129
  userId: gradingData.student.userId,
130
130
  moduleType: "score-published",
131
- moduleId: input?.gradingId
131
+ moduleId: input?.gradingId,
132
+ messageData: {
133
+ id: input?.gradingId,
134
+ message: `Hai! Ada Penilaian baru di Rekam Belajar kamu dengan penilaian ${gradingData.gradingType?.name}. Yuk, cek hasilnya dan lihat progresmu!`
135
+ },
136
+ url: `${config?.appFluffyUrl}/rapor/grading-${input?.gradingId}`
132
137
  }
133
138
  }, stream);
134
139
  sentCount++;
@@ -167,6 +172,19 @@ const sendScoreNotification = operation.Action.define({
167
172
  }
168
173
  })
169
174
  });
175
+ await stream?.actions.data.createOne.execute({
176
+ model: "neu:data:notification",
177
+ data: {
178
+ userId: gradingData.student.userId,
179
+ moduleType: "score-published-parent",
180
+ moduleId: input?.gradingId,
181
+ messageData: {
182
+ id: input?.gradingId,
183
+ message: `Hai, ada penilaian baru untuk ${gradingData.student?.user?.name} dengan penilaian ${gradingData.gradingType?.name}! Yuk, lihat perkembangannya di Rekam Belajar.`
184
+ },
185
+ url: `${config?.appFluffyUrl}/rapor/grading-${input?.gradingId}`
186
+ }
187
+ }, stream);
170
188
  sentCount++;
171
189
  } catch (error) {
172
190
  console.error(`Failed to send score notification to parent ${parentUserId}:`, error);
@@ -126,7 +126,12 @@ const sendScoreNotification = Action.define({
126
126
  data: {
127
127
  userId: gradingData.student.userId,
128
128
  moduleType: "score-published",
129
- moduleId: input?.gradingId
129
+ moduleId: input?.gradingId,
130
+ messageData: {
131
+ id: input?.gradingId,
132
+ message: `Hai! Ada Penilaian baru di Rekam Belajar kamu dengan penilaian ${gradingData.gradingType?.name}. Yuk, cek hasilnya dan lihat progresmu!`
133
+ },
134
+ url: `${config?.appFluffyUrl}/rapor/grading-${input?.gradingId}`
130
135
  }
131
136
  }, stream);
132
137
  sentCount++;
@@ -165,6 +170,19 @@ const sendScoreNotification = Action.define({
165
170
  }
166
171
  })
167
172
  });
173
+ await stream?.actions.data.createOne.execute({
174
+ model: "neu:data:notification",
175
+ data: {
176
+ userId: gradingData.student.userId,
177
+ moduleType: "score-published-parent",
178
+ moduleId: input?.gradingId,
179
+ messageData: {
180
+ id: input?.gradingId,
181
+ message: `Hai, ada penilaian baru untuk ${gradingData.student?.user?.name} dengan penilaian ${gradingData.gradingType?.name}! Yuk, lihat perkembangannya di Rekam Belajar.`
182
+ },
183
+ url: `${config?.appFluffyUrl}/rapor/grading-${input?.gradingId}`
184
+ }
185
+ }, stream);
168
186
  sentCount++;
169
187
  } catch (error) {
170
188
  console.error(`Failed to send score notification to parent ${parentUserId}:`, error);
@@ -113,6 +113,11 @@ const sendAnswer = operation.Action.define({
113
113
  userId: student.userId,
114
114
  moduleType: "question-answered",
115
115
  moduleId: input.questionId,
116
+ messageData: {
117
+ id: input.questionId,
118
+ subject: input.subjectName,
119
+ message: `Pertanyaan ${input.code} anda dengan mata pelajaran ${input.subjectName} telah dijawab oleh Pengajar`
120
+ },
116
121
  url: `${config?.appFluffyUrl}/tanya/${input.questionId}`
117
122
  }
118
123
  }, stream);
@@ -111,6 +111,11 @@ const sendAnswer = Action.define({
111
111
  userId: student.userId,
112
112
  moduleType: "question-answered",
113
113
  moduleId: input.questionId,
114
+ messageData: {
115
+ id: input.questionId,
116
+ subject: input.subjectName,
117
+ message: `Pertanyaan ${input.code} anda dengan mata pelajaran ${input.subjectName} telah dijawab oleh Pengajar`
118
+ },
114
119
  url: `${config?.appFluffyUrl}/tanya/${input.questionId}`
115
120
  }
116
121
  }, stream);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@neutron.co.id/pendidikan-operation",
3
- "version": "1.27.19",
3
+ "version": "1.27.20",
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": 144
89
+ "build": 145
90
90
  }