@neutron.co.id/operasional-modules 1.3.5-beta.1 → 1.4.0

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.
@@ -2,7 +2,9 @@ import { ResourceUtil } from "@neon.id/office";
2
2
  export const CheckInCollectionView = ResourceUtil.createCollection({
3
3
  name: "default",
4
4
  definition: "neu:tempat:checkIn",
5
- columns: ["type", "checkInAt", "staff", "building"]
5
+ columns: ["display", "type", "checkInAt", "staff", "building"],
6
+ filters: ["type", "building"],
7
+ sorts: ["checkInAt"]
6
8
  });
7
9
  export const CheckInSingleView = ResourceUtil.createSingle({
8
10
  name: "default",
@@ -43,11 +43,28 @@ export const SituationCollectionWorkView = ResourceUtil.createCollection({
43
43
  }
44
44
  });
45
45
  }
46
- if (permit.isAny(["neu:staff", "neu:karyawan", "neu:konsumen"])) {
46
+ if (permit.is("neu:karyawan")) {
47
47
  return Query.define({
48
48
  filter: {
49
- userId: staff.value?.userId
50
- // status: 'dikerjakan',
49
+ handle: "",
50
+ operator: "mongo",
51
+ value: {
52
+ $and: [
53
+ {
54
+ $or: [
55
+ {
56
+ situationReportedByIds: staff.value?.id
57
+ },
58
+ {
59
+ situationRelatedByIds: staff.value?.id
60
+ },
61
+ {
62
+ userId: staff.value?.userId
63
+ }
64
+ ]
65
+ }
66
+ ]
67
+ }
51
68
  }
52
69
  });
53
70
  }
@@ -96,11 +113,21 @@ export const SituationCollectionSupportiveView = ResourceUtil.createCollection({
96
113
  }
97
114
  });
98
115
  }
99
- if (permit.isAny(["neu:staff", "neu:karyawan", "neu:konsumen"])) {
116
+ if (permit.is("neu:karyawan")) {
100
117
  return Query.define({
101
118
  filter: {
102
- userId: staff.value?.userId
103
- // status: 'dikerjakan',
119
+ handle: "",
120
+ operator: "mongo",
121
+ value: {
122
+ $or: [
123
+ {
124
+ situationSupportedByIds: staff.value?.id
125
+ },
126
+ {
127
+ userId: staff.value?.userId
128
+ }
129
+ ]
130
+ }
104
131
  }
105
132
  });
106
133
  }
@@ -88,23 +88,29 @@ export const TaskCollectionWorkView = ResourceUtil.createCollection({
88
88
  }
89
89
  });
90
90
  }
91
- if (permit.isAny(["neu:staff", "neu:karyawan", "neu:konsumen"])) {
91
+ if (permit.is("neu:karyawan")) {
92
92
  return Query.define({
93
93
  filter: {
94
94
  handle: "",
95
95
  operator: "mongo",
96
96
  value: {
97
97
  $and: [
98
- {
99
- userId: staff.value?.userId
100
- },
101
98
  {
102
99
  $or: [
100
+ {
101
+ doingAssignmentIds: staff.value?.id
102
+ },
103
+ {
104
+ helpAssignmentIds: staff.value?.id
105
+ },
103
106
  {
104
107
  status: "ditugaskan"
105
108
  },
106
109
  {
107
110
  status: "dikerjakan"
111
+ },
112
+ {
113
+ userId: staff.value?.userId
108
114
  }
109
115
  ]
110
116
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@neutron.co.id/operasional-modules",
3
- "version": "1.3.5-beta.1",
3
+ "version": "1.4.0",
4
4
  "description": "Modules of Neutron.",
5
5
  "license": "SEE LICENSE IN LICENSE",
6
6
  "contributors": [
@@ -42,8 +42,8 @@
42
42
  "dependencies": {
43
43
  "@neon.id/context": "0.38.0",
44
44
  "@neon.id/office": "0.23.0",
45
- "@neutron.co.id/operasional-interfaces": "1.3.5-beta.1",
46
- "@neutron.co.id/personalia-models": "1.3.6-beta.1",
45
+ "@neutron.co.id/operasional-interfaces": "1.4.0",
46
+ "@neutron.co.id/personalia-models": "1.4.0",
47
47
  "@nuxt/kit": "3.2.3"
48
48
  },
49
49
  "devDependencies": {
@@ -64,12 +64,12 @@
64
64
  "peerDependencies": {
65
65
  "@neon.id/context": "^0.38.0",
66
66
  "@neon.id/office": "^0.23.0",
67
- "@neutron.co.id/operasional-interfaces": "^1.3.5-beta.1",
68
- "@neutron.co.id/personalia-models": "^1.3.6-beta.1",
67
+ "@neutron.co.id/operasional-interfaces": "^1.4.0",
68
+ "@neutron.co.id/personalia-models": "^1.4.0",
69
69
  "@nuxt/kit": "^3.2.3"
70
70
  },
71
71
  "publishConfig": {
72
72
  "access": "public"
73
73
  },
74
- "build": 28
74
+ "build": 30
75
75
  }