@neutron.co.id/operasional-modules 1.3.2-beta.1 → 1.3.4-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/personalia/resources/situation/situation.model.d.ts +1 -1
- package/build/personalia/resources/situation/situation.resource.d.ts +1 -1
- package/build/personalia/resources/situation/situation.views.mjs +37 -14
- package/build/personalia/resources/staff/staff.model.mjs +5 -0
- package/build/personalia/resources/task/task.model.d.ts +1 -1
- package/build/personalia/resources/task/task.model.mjs +5 -0
- package/build/personalia/resources/task/task.resource.d.ts +1 -1
- package/build/personalia/resources/task/task.views.mjs +36 -7
- package/package.json +6 -6
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export declare const SituationModel: import("@neon.id/model").Model<"neu:personalia:situation", "branches" | "situationStatus" | "situationType" | "situationReportedBy" | "situationResponse" | "urgentSituationDate" | "situationRelatedBy" | "situationSupportedBy" | "employeeNameTrimmed" | "searchBySituationTypeTrimmed" | "situationDescription" | "supportiveStatus">;
|
|
1
|
+
export declare const SituationModel: import("@neon.id/model").Model<"neu:personalia:situation", "user" | "branches" | "situationStatus" | "situationType" | "situationReportedBy" | "situationResponse" | "urgentSituationDate" | "situationRelatedBy" | "situationSupportedBy" | "employeeNameTrimmed" | "searchBySituationTypeTrimmed" | "situationDescription" | "supportiveStatus">;
|
|
2
2
|
export type TSituationModel = typeof SituationModel;
|
|
3
3
|
export declare const fragments: {
|
|
4
4
|
item: Schema.Situation;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { Resource } from '@neon.id/context';
|
|
2
|
-
export declare const SituationResource: Resource<Schema.SituationType, import("@neon.id/model").Model<"neu:personalia:situation", "branches" | "situationStatus" | "situationType" | "situationReportedBy" | "situationResponse" | "urgentSituationDate" | "situationRelatedBy" | "situationSupportedBy" | "employeeNameTrimmed" | "searchBySituationTypeTrimmed" | "situationDescription" | "supportiveStatus">>;
|
|
2
|
+
export declare const SituationResource: Resource<Schema.SituationType, import("@neon.id/model").Model<"neu:personalia:situation", "user" | "branches" | "situationStatus" | "situationType" | "situationReportedBy" | "situationResponse" | "urgentSituationDate" | "situationRelatedBy" | "situationSupportedBy" | "employeeNameTrimmed" | "searchBySituationTypeTrimmed" | "situationDescription" | "supportiveStatus">>;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { Query } from "@neon.id/query";
|
|
2
2
|
import { ResourceUtil } from "@neon.id/office";
|
|
3
3
|
import { useOperasional } from "@neutron.co.id/operasional-interfaces";
|
|
4
|
+
import { usePermit } from "@neon.id/context";
|
|
4
5
|
export const SituationCollectionView = ResourceUtil.createCollection({
|
|
5
6
|
name: "default",
|
|
6
7
|
definition: "neu:personalia:situation"
|
|
@@ -31,14 +32,25 @@ export const SituationCollectionWorkView = ResourceUtil.createCollection({
|
|
|
31
32
|
"situationSupportedBy"
|
|
32
33
|
],
|
|
33
34
|
query: () => {
|
|
35
|
+
const permit = usePermit();
|
|
34
36
|
const { staff } = useOperasional();
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
37
|
+
if (permit.is("neu:cabangOperasional")) {
|
|
38
|
+
return Query.define({
|
|
39
|
+
filter: {
|
|
40
|
+
handle: "branchIds",
|
|
41
|
+
operator: "in",
|
|
42
|
+
value: staff.value?.branchIds
|
|
43
|
+
}
|
|
44
|
+
});
|
|
45
|
+
}
|
|
46
|
+
if (permit.isAny(["neu:staff", "neu:karyawan", "neu:konsumen"])) {
|
|
47
|
+
return Query.define({
|
|
48
|
+
filter: {
|
|
49
|
+
userId: staff.value?.userId
|
|
50
|
+
// status: 'dikerjakan',
|
|
51
|
+
}
|
|
52
|
+
});
|
|
53
|
+
}
|
|
42
54
|
}
|
|
43
55
|
});
|
|
44
56
|
export const SituationSingleWorkView = ResourceUtil.createSingle({
|
|
@@ -73,14 +85,25 @@ export const SituationCollectionSupportiveView = ResourceUtil.createCollection({
|
|
|
73
85
|
excludes: ["create"],
|
|
74
86
|
filters: ["situationSupportedBy"],
|
|
75
87
|
query: () => {
|
|
88
|
+
const permit = usePermit();
|
|
76
89
|
const { staff } = useOperasional();
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
90
|
+
if (permit.is("neu:cabangOperasional")) {
|
|
91
|
+
return Query.define({
|
|
92
|
+
filter: {
|
|
93
|
+
handle: "branchIds",
|
|
94
|
+
operator: "in",
|
|
95
|
+
value: staff.value?.branchIds
|
|
96
|
+
}
|
|
97
|
+
});
|
|
98
|
+
}
|
|
99
|
+
if (permit.isAny(["neu:staff", "neu:karyawan", "neu:konsumen"])) {
|
|
100
|
+
return Query.define({
|
|
101
|
+
filter: {
|
|
102
|
+
userId: staff.value?.userId
|
|
103
|
+
// status: 'dikerjakan',
|
|
104
|
+
}
|
|
105
|
+
});
|
|
106
|
+
}
|
|
84
107
|
}
|
|
85
108
|
});
|
|
86
109
|
export const SituationSingleSupportiveView = ResourceUtil.createSingle({
|
|
@@ -10,14 +10,19 @@ const item = {
|
|
|
10
10
|
birthPlace: 1,
|
|
11
11
|
image: 1,
|
|
12
12
|
branch: {
|
|
13
|
+
id: 1,
|
|
14
|
+
display: 1,
|
|
13
15
|
name: 1
|
|
14
16
|
},
|
|
15
17
|
branches: {
|
|
18
|
+
id: 1,
|
|
19
|
+
display: 1,
|
|
16
20
|
name: 1
|
|
17
21
|
},
|
|
18
22
|
note: 1,
|
|
19
23
|
user: {
|
|
20
24
|
id: 1,
|
|
25
|
+
display: 1,
|
|
21
26
|
username: 1,
|
|
22
27
|
email: 1,
|
|
23
28
|
phone: 1,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export declare const TaskModel: import("@neon.id/model").Model<"neu:personalia:task", "status" | "branches" | "employeeNameTrimmed" | "giveAssignments" | "doingAssignments" | "supervisingAssignments" | "helpAssignments" | "priority" | "estimatedStartDate" | "estimatedEndDate" | "estimatedHourDoingAssignment" | "estimatedHourCommunicationAssignment" | "estimatedHourCognitiveAssignment" | "estimatedHourCreativeAssignment" | "taskName" | "estimatedHourByDay" | "internalServiceDescription" | "externalServiceDescription" | "resultAssignment" | "estimatedRealizedAssignmentStart" | "estimatedRealizedAssignmentEnd">;
|
|
1
|
+
export declare const TaskModel: import("@neon.id/model").Model<"neu:personalia:task", "user" | "status" | "branches" | "employeeNameTrimmed" | "giveAssignments" | "doingAssignments" | "supervisingAssignments" | "helpAssignments" | "priority" | "estimatedStartDate" | "estimatedEndDate" | "estimatedHourDoingAssignment" | "estimatedHourCommunicationAssignment" | "estimatedHourCognitiveAssignment" | "estimatedHourCreativeAssignment" | "taskName" | "estimatedHourByDay" | "internalServiceDescription" | "externalServiceDescription" | "resultAssignment" | "estimatedRealizedAssignmentStart" | "estimatedRealizedAssignmentEnd">;
|
|
2
2
|
export type TTaskModel = typeof TaskModel;
|
|
3
3
|
export declare const fragments: {
|
|
4
4
|
item: Schema.Task;
|
|
@@ -7,6 +7,10 @@ const item = {
|
|
|
7
7
|
taskName: 1,
|
|
8
8
|
internalServiceDescription: 1,
|
|
9
9
|
externalServiceDescription: 1,
|
|
10
|
+
user: {
|
|
11
|
+
id: 1,
|
|
12
|
+
display: 1
|
|
13
|
+
},
|
|
10
14
|
branches: {
|
|
11
15
|
id: 1,
|
|
12
16
|
display: 1
|
|
@@ -43,6 +47,7 @@ const item = {
|
|
|
43
47
|
};
|
|
44
48
|
const detail = {
|
|
45
49
|
...item,
|
|
50
|
+
userId: 1,
|
|
46
51
|
branchIds: 1,
|
|
47
52
|
givingAssignmentIds: 1,
|
|
48
53
|
doingAssignmentIds: 1,
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { Resource } from '@neon.id/context';
|
|
2
|
-
export declare const TaskResource: Resource<Schema.Task, import("@neon.id/model").Model<"neu:personalia:task", "status" | "branches" | "employeeNameTrimmed" | "giveAssignments" | "doingAssignments" | "supervisingAssignments" | "helpAssignments" | "priority" | "estimatedStartDate" | "estimatedEndDate" | "estimatedHourDoingAssignment" | "estimatedHourCommunicationAssignment" | "estimatedHourCognitiveAssignment" | "estimatedHourCreativeAssignment" | "taskName" | "estimatedHourByDay" | "internalServiceDescription" | "externalServiceDescription" | "resultAssignment" | "estimatedRealizedAssignmentStart" | "estimatedRealizedAssignmentEnd">>;
|
|
2
|
+
export declare const TaskResource: Resource<Schema.Task, import("@neon.id/model").Model<"neu:personalia:task", "user" | "status" | "branches" | "employeeNameTrimmed" | "giveAssignments" | "doingAssignments" | "supervisingAssignments" | "helpAssignments" | "priority" | "estimatedStartDate" | "estimatedEndDate" | "estimatedHourDoingAssignment" | "estimatedHourCommunicationAssignment" | "estimatedHourCognitiveAssignment" | "estimatedHourCreativeAssignment" | "taskName" | "estimatedHourByDay" | "internalServiceDescription" | "externalServiceDescription" | "resultAssignment" | "estimatedRealizedAssignmentStart" | "estimatedRealizedAssignmentEnd">>;
|
|
@@ -5,6 +5,7 @@ import {
|
|
|
5
5
|
import { Query } from "@neon.id/query";
|
|
6
6
|
import { ResourceUtil } from "@neon.id/office";
|
|
7
7
|
import { h } from "vue";
|
|
8
|
+
import { usePermit } from "@neon.id/context";
|
|
8
9
|
export const TaskCollectionView = ResourceUtil.createCollection({
|
|
9
10
|
name: "default",
|
|
10
11
|
definition: "neu:personalia:task"
|
|
@@ -76,14 +77,42 @@ export const TaskCollectionWorkView = ResourceUtil.createCollection({
|
|
|
76
77
|
sorts: ["estimatedHourByDay"],
|
|
77
78
|
excludes: ["create"],
|
|
78
79
|
query: () => {
|
|
80
|
+
const permit = usePermit();
|
|
79
81
|
const { staff } = useOperasional();
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
82
|
+
if (permit.is("neu:cabangOperasional")) {
|
|
83
|
+
return Query.define({
|
|
84
|
+
filter: {
|
|
85
|
+
handle: "branchIds",
|
|
86
|
+
operator: "in",
|
|
87
|
+
value: staff.value?.branchIds
|
|
88
|
+
}
|
|
89
|
+
});
|
|
90
|
+
}
|
|
91
|
+
if (permit.isAny(["neu:staff", "neu:karyawan", "neu:konsumen"])) {
|
|
92
|
+
return Query.define({
|
|
93
|
+
filter: {
|
|
94
|
+
handle: "",
|
|
95
|
+
operator: "mongo",
|
|
96
|
+
value: {
|
|
97
|
+
$and: [
|
|
98
|
+
{
|
|
99
|
+
userId: staff.value?.userId
|
|
100
|
+
},
|
|
101
|
+
{
|
|
102
|
+
$or: [
|
|
103
|
+
{
|
|
104
|
+
status: "ditugaskan"
|
|
105
|
+
},
|
|
106
|
+
{
|
|
107
|
+
status: "dikerjakan"
|
|
108
|
+
}
|
|
109
|
+
]
|
|
110
|
+
}
|
|
111
|
+
]
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
});
|
|
115
|
+
}
|
|
87
116
|
}
|
|
88
117
|
});
|
|
89
118
|
export const TaskSingleWorkView = ResourceUtil.createSingle({
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@neutron.co.id/operasional-modules",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.4-beta.1",
|
|
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.
|
|
46
|
-
"@neutron.co.id/personalia-models": "1.3.
|
|
45
|
+
"@neutron.co.id/operasional-interfaces": "1.3.4-beta.1",
|
|
46
|
+
"@neutron.co.id/personalia-models": "1.3.5-beta.1",
|
|
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.
|
|
68
|
-
"@neutron.co.id/personalia-models": "^1.3.
|
|
67
|
+
"@neutron.co.id/operasional-interfaces": "^1.3.4-beta.1",
|
|
68
|
+
"@neutron.co.id/personalia-models": "^1.3.5-beta.1",
|
|
69
69
|
"@nuxt/kit": "^3.2.3"
|
|
70
70
|
},
|
|
71
71
|
"publishConfig": {
|
|
72
72
|
"access": "public"
|
|
73
73
|
},
|
|
74
|
-
"build":
|
|
74
|
+
"build": 26
|
|
75
75
|
}
|