@neutron.co.id/pendidikan-operation 1.4.3 → 1.5.0-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 CHANGED
@@ -46,8 +46,8 @@ const presenceSessionStudent = operation.Action.define({
46
46
  await dbAttendance.create({
47
47
  classSessionId: session._id,
48
48
  studentId: siswa.id,
49
- presenceAt: new Date(),
50
- updatedAt: new Date(),
49
+ presenceAt: /* @__PURE__ */ new Date(),
50
+ updatedAt: /* @__PURE__ */ new Date(),
51
51
  createdBy: stream.context.identitas.userId,
52
52
  updatedBy: stream.context.identitas.userId
53
53
  });
@@ -82,8 +82,8 @@ const presenceSessionTeacher = operation.Action.define({
82
82
  await dbAttendance.create({
83
83
  classSessionId: session._id,
84
84
  teacherId: pengajar.id,
85
- presenceAt: new Date(),
86
- updatedAt: new Date(),
85
+ presenceAt: /* @__PURE__ */ new Date(),
86
+ updatedAt: /* @__PURE__ */ new Date(),
87
87
  createdBy: user,
88
88
  updatedBy: user
89
89
  });
@@ -257,11 +257,11 @@ async function _getSessionConflict(stream, input) {
257
257
  startedAt: input.startedAt,
258
258
  endedAt: input.endedAt,
259
259
  branchIds: input.staff.branchIds,
260
- updatedAt: new Date(),
260
+ updatedAt: /* @__PURE__ */ new Date(),
261
261
  updatedBy: input.userId
262
262
  },
263
263
  $setOnInsert: {
264
- createdAt: new Date(),
264
+ createdAt: /* @__PURE__ */ new Date(),
265
265
  createdBy: input.userId
266
266
  }
267
267
  },
@@ -817,7 +817,7 @@ async function _createGrading(stream, input) {
817
817
  data: {
818
818
  gradingTypeId: input.gradingTypeId,
819
819
  studentId: input.studentId,
820
- reportedAt: new Date()
820
+ reportedAt: /* @__PURE__ */ new Date()
821
821
  },
822
822
  query: query.Query.define({ fields: { id: 1 } })
823
823
  },
@@ -1000,7 +1000,7 @@ const acceptQuestion = operation.Action.define({
1000
1000
  },
1001
1001
  {
1002
1002
  status: "answering",
1003
- acceptedAt: new Date()
1003
+ acceptedAt: /* @__PURE__ */ new Date()
1004
1004
  }
1005
1005
  );
1006
1006
  return core.Result.ok({
@@ -1037,7 +1037,7 @@ const editAnswer = operation.Action.define({
1037
1037
  $set: {
1038
1038
  answeredDetail: answer.detail,
1039
1039
  answeredImages: answer.images,
1040
- updatedAt: new Date(),
1040
+ updatedAt: /* @__PURE__ */ new Date(),
1041
1041
  updatedBy: userId
1042
1042
  }
1043
1043
  }
@@ -1079,7 +1079,7 @@ const sendAnswer = operation.Action.define({
1079
1079
  const dataAnswer = resultAnswer.payload.data;
1080
1080
  console.log(dataAnswer);
1081
1081
  const acceptedAt = new Date(dataAnswer.acceptedAt).getTime();
1082
- const answeredAt = new Date().getTime();
1082
+ const answeredAt = (/* @__PURE__ */ new Date()).getTime();
1083
1083
  const durationResult = (answeredAt - acceptedAt) / 1e3;
1084
1084
  await dbQuestion.updateOne(
1085
1085
  {
@@ -1099,7 +1099,7 @@ const sendAnswer = operation.Action.define({
1099
1099
  },
1100
1100
  {
1101
1101
  status: "answered",
1102
- answeredAt: new Date(),
1102
+ answeredAt: /* @__PURE__ */ new Date(),
1103
1103
  duration: Math.round(durationResult)
1104
1104
  }
1105
1105
  );
@@ -1135,7 +1135,7 @@ const sendQuestion = operation.Action.define({
1135
1135
  },
1136
1136
  {
1137
1137
  status: "waiting",
1138
- askedAt: new Date()
1138
+ askedAt: /* @__PURE__ */ new Date()
1139
1139
  }
1140
1140
  );
1141
1141
  const result = await stream.actions.data.getOne.execute(
package/build/index.mjs CHANGED
@@ -44,8 +44,8 @@ const presenceSessionStudent = Action.define({
44
44
  await dbAttendance.create({
45
45
  classSessionId: session._id,
46
46
  studentId: siswa.id,
47
- presenceAt: new Date(),
48
- updatedAt: new Date(),
47
+ presenceAt: /* @__PURE__ */ new Date(),
48
+ updatedAt: /* @__PURE__ */ new Date(),
49
49
  createdBy: stream.context.identitas.userId,
50
50
  updatedBy: stream.context.identitas.userId
51
51
  });
@@ -80,8 +80,8 @@ const presenceSessionTeacher = Action.define({
80
80
  await dbAttendance.create({
81
81
  classSessionId: session._id,
82
82
  teacherId: pengajar.id,
83
- presenceAt: new Date(),
84
- updatedAt: new Date(),
83
+ presenceAt: /* @__PURE__ */ new Date(),
84
+ updatedAt: /* @__PURE__ */ new Date(),
85
85
  createdBy: user,
86
86
  updatedBy: user
87
87
  });
@@ -255,11 +255,11 @@ async function _getSessionConflict(stream, input) {
255
255
  startedAt: input.startedAt,
256
256
  endedAt: input.endedAt,
257
257
  branchIds: input.staff.branchIds,
258
- updatedAt: new Date(),
258
+ updatedAt: /* @__PURE__ */ new Date(),
259
259
  updatedBy: input.userId
260
260
  },
261
261
  $setOnInsert: {
262
- createdAt: new Date(),
262
+ createdAt: /* @__PURE__ */ new Date(),
263
263
  createdBy: input.userId
264
264
  }
265
265
  },
@@ -815,7 +815,7 @@ async function _createGrading(stream, input) {
815
815
  data: {
816
816
  gradingTypeId: input.gradingTypeId,
817
817
  studentId: input.studentId,
818
- reportedAt: new Date()
818
+ reportedAt: /* @__PURE__ */ new Date()
819
819
  },
820
820
  query: Query.define({ fields: { id: 1 } })
821
821
  },
@@ -998,7 +998,7 @@ const acceptQuestion = Action.define({
998
998
  },
999
999
  {
1000
1000
  status: "answering",
1001
- acceptedAt: new Date()
1001
+ acceptedAt: /* @__PURE__ */ new Date()
1002
1002
  }
1003
1003
  );
1004
1004
  return Result.ok({
@@ -1035,7 +1035,7 @@ const editAnswer = Action.define({
1035
1035
  $set: {
1036
1036
  answeredDetail: answer.detail,
1037
1037
  answeredImages: answer.images,
1038
- updatedAt: new Date(),
1038
+ updatedAt: /* @__PURE__ */ new Date(),
1039
1039
  updatedBy: userId
1040
1040
  }
1041
1041
  }
@@ -1077,7 +1077,7 @@ const sendAnswer = Action.define({
1077
1077
  const dataAnswer = resultAnswer.payload.data;
1078
1078
  console.log(dataAnswer);
1079
1079
  const acceptedAt = new Date(dataAnswer.acceptedAt).getTime();
1080
- const answeredAt = new Date().getTime();
1080
+ const answeredAt = (/* @__PURE__ */ new Date()).getTime();
1081
1081
  const durationResult = (answeredAt - acceptedAt) / 1e3;
1082
1082
  await dbQuestion.updateOne(
1083
1083
  {
@@ -1097,7 +1097,7 @@ const sendAnswer = Action.define({
1097
1097
  },
1098
1098
  {
1099
1099
  status: "answered",
1100
- answeredAt: new Date(),
1100
+ answeredAt: /* @__PURE__ */ new Date(),
1101
1101
  duration: Math.round(durationResult)
1102
1102
  }
1103
1103
  );
@@ -1133,7 +1133,7 @@ const sendQuestion = Action.define({
1133
1133
  },
1134
1134
  {
1135
1135
  status: "waiting",
1136
- askedAt: new Date()
1136
+ askedAt: /* @__PURE__ */ new Date()
1137
1137
  }
1138
1138
  );
1139
1139
  const result = await stream.actions.data.getOne.execute(
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@neutron.co.id/pendidikan-operation",
3
- "version": "1.4.3",
3
+ "version": "1.5.0-beta.1",
4
4
  "description": "Operation package of Neutron Pendidikan.",
5
5
  "license": "SEE LICENSE IN LICENSE",
6
6
  "contributors": [
@@ -30,7 +30,7 @@
30
30
  "dependencies": {
31
31
  "@bluelibs/nova": "1.4.2",
32
32
  "@neon.id/core": "1.25.1",
33
- "@neon.id/gerbang-js": "0.6.2",
33
+ "@neon.id/gerbang-js": "1.0.0",
34
34
  "@neon.id/model": "0.58.0",
35
35
  "@neon.id/operation": "0.35.0",
36
36
  "@neon.id/permit": "0.16.1",
@@ -38,29 +38,29 @@
38
38
  "@neon.id/types": "1.37.0",
39
39
  "@neon.id/utils": "0.38.0",
40
40
  "@neutron.co.id/akademik-models": "1.2.2",
41
- "@neutron.co.id/jadwal-models": "1.2.2",
42
- "@neutron.co.id/penilaian-models": "1.4.0",
43
- "@neutron.co.id/personalia-models": "1.1.0",
44
- "@neutron.co.id/tanya-models": "1.1.2",
45
- "mongoose": "6.9.1",
41
+ "@neutron.co.id/jadwal-models": "1.3.0-beta.1",
42
+ "@neutron.co.id/penilaian-models": "1.5.0-beta.1",
43
+ "@neutron.co.id/personalia-models": "1.2.0",
44
+ "@neutron.co.id/tanya-models": "1.2.0-beta.1",
45
+ "mongoose": "6.10.0",
46
46
  "nanoid": "4.0.1",
47
- "ofetch": "1.0.0"
47
+ "ofetch": "1.0.1"
48
48
  },
49
49
  "devDependencies": {
50
- "@types/node": "18.13.0",
51
- "@vitest/coverage-c8": "0.28.5",
52
- "@vitest/ui": "0.28.5",
50
+ "@types/node": "18.14.6",
51
+ "@vitest/coverage-c8": "0.29.2",
52
+ "@vitest/ui": "0.29.2",
53
53
  "@vortex.so/eslint-plugin": "0.7.0",
54
54
  "tsx": "3.12.3",
55
55
  "typescript": "4.9.5",
56
- "unbuild": "1.1.1",
57
- "vite": "4.1.1",
58
- "vitest": "0.28.5"
56
+ "unbuild": "1.1.2",
57
+ "vite": "4.1.4",
58
+ "vitest": "0.29.2"
59
59
  },
60
60
  "peerDependencies": {
61
61
  "@bluelibs/nova": "1.4.2",
62
62
  "@neon.id/core": "^1.25.1",
63
- "@neon.id/gerbang-js": "^0.6.2",
63
+ "@neon.id/gerbang-js": "^1.0.0",
64
64
  "@neon.id/model": "^0.58.0",
65
65
  "@neon.id/operation": "^0.35.0",
66
66
  "@neon.id/permit": "^0.16.1",
@@ -68,11 +68,11 @@
68
68
  "@neon.id/types": "^1.37.0",
69
69
  "@neon.id/utils": "^0.38.0",
70
70
  "@neutron.co.id/akademik-models": "^1.2.2",
71
- "@neutron.co.id/jadwal-models": "^1.2.2",
72
- "@neutron.co.id/penilaian-models": "^1.4.0",
73
- "@neutron.co.id/tanya-models": "^1.1.2",
74
- "mongoose": "^6.9.1",
75
- "ofetch": "^1.0.0"
71
+ "@neutron.co.id/jadwal-models": "^1.3.0-beta.1",
72
+ "@neutron.co.id/penilaian-models": "^1.5.0-beta.1",
73
+ "@neutron.co.id/tanya-models": "^1.2.0-beta.1",
74
+ "mongoose": "^6.10.0",
75
+ "ofetch": "^1.0.1"
76
76
  },
77
77
  "publishConfig": {
78
78
  "access": "public"