@neutron.co.id/operasional-modules 1.12.18-beta.1 → 1.12.18
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/attendance/attendance.resource.d.ts +1 -1
- package/build/personalia/resources/attendance/attendance.resource.mjs +25 -1
- package/build/personalia/resources/attendance/attendance.views.mjs +3 -3
- package/build/personalia/resources/leaveConflict/leaveConflict.resource.d.ts +1 -1
- package/build/personalia/resources/leaveConflict/leaveConflict.resource.mjs +0 -1
- package/build/personalia/resources/leaveConflict/leaveConflict.views.mjs +2 -1
- package/build/personalia/resources/leaveQuota/leaveQuota.resources.d.ts +1 -1
- package/build/personalia/resources/leaveQuota/leaveQuota.resources.mjs +36 -5
- package/build/personalia/resources/leaveQuota/leaveQuota.views.mjs +18 -0
- package/build/personalia/resources/leaveStaff/leaveStaff.resources.d.ts +1 -1
- package/build/personalia/resources/leaveStaff/leaveStaff.resources.mjs +21 -2
- package/build/personalia/resources/leaveStaff/leaveStaff.views.mjs +2 -1
- package/build/personalia/resources/staff/staff.resource.d.ts +1 -1
- package/build/personalia/resources/submission/submission.resource.d.ts +1 -1
- package/package.json +3 -3
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { Resource } from '@neon.id/context';
|
|
2
2
|
import { type Schema } from '@neutron.co.id/personalia-models';
|
|
3
|
-
export declare const AttendanceResource: Resource<Schema.Attendance, import("@neon.id/model").Model<"neu:personalia:attendance", "type" | "nameStaff" | "status" | "branch" | "endedAt" | "startedAt" | "isNotes" | "isGenerate" | "notes" | "attendanceAt" | "comeAt" | "decideStaff" | "delegateNotes" | "delegateStaffs" | "earlyAt" | "homeAt" | "isDelegateStaff" | "lateAt" | "monitoringStaffs" | "submitStaff" | "submittedAt" | "virtualSubmitStaff", Schema.Attendance>>;
|
|
3
|
+
export declare const AttendanceResource: Resource<Schema.Attendance, import("@neon.id/model").Model<"neu:personalia:attendance", "type" | "image" | "nameStaff" | "status" | "branch" | "endedAt" | "startedAt" | "isNotes" | "isGenerate" | "notes" | "attendanceAt" | "comeAt" | "decideStaff" | "delegateNotes" | "delegateStaffs" | "earlyAt" | "homeAt" | "isDelegateStaff" | "lateAt" | "monitoringStaffs" | "submitStaff" | "submittedAt" | "virtualStatus" | "virtualSubmitStaff", Schema.Attendance>>;
|
|
@@ -2,6 +2,10 @@ import { Resource } from "@neon.id/context";
|
|
|
2
2
|
import {
|
|
3
3
|
AttendanceModel
|
|
4
4
|
} from "@neutron.co.id/personalia-models";
|
|
5
|
+
import { h } from "vue";
|
|
6
|
+
function stripHtmlTags(html) {
|
|
7
|
+
return html.replace(/<[^>]*>/g, "");
|
|
8
|
+
}
|
|
5
9
|
export const AttendanceResource = Resource.define({
|
|
6
10
|
model: AttendanceModel,
|
|
7
11
|
collection: {
|
|
@@ -50,5 +54,25 @@ export const AttendanceResource = Resource.define({
|
|
|
50
54
|
}
|
|
51
55
|
},
|
|
52
56
|
fragments: AttendanceModel.fragments,
|
|
53
|
-
renders: {
|
|
57
|
+
renders: {
|
|
58
|
+
startedAt: (item) => h(
|
|
59
|
+
"span",
|
|
60
|
+
null,
|
|
61
|
+
item.startedAt ? new Date(item.startedAt).toLocaleDateString("id-ID", {
|
|
62
|
+
day: "2-digit",
|
|
63
|
+
month: "long",
|
|
64
|
+
year: "numeric"
|
|
65
|
+
}) : ""
|
|
66
|
+
),
|
|
67
|
+
notes: (item) => h(
|
|
68
|
+
"span",
|
|
69
|
+
null,
|
|
70
|
+
item.notes ? stripHtmlTags(item.notes) : ""
|
|
71
|
+
),
|
|
72
|
+
delegateNotes: (item) => h(
|
|
73
|
+
"span",
|
|
74
|
+
null,
|
|
75
|
+
item.delegateNotes ? stripHtmlTags(item.delegateNotes) : ""
|
|
76
|
+
)
|
|
77
|
+
}
|
|
54
78
|
});
|
|
@@ -51,7 +51,7 @@ export const AttendanceCollectionStaffView = ResourceUtil.createCollection({
|
|
|
51
51
|
operator: "eq",
|
|
52
52
|
value: staff?.id
|
|
53
53
|
},
|
|
54
|
-
sort: [{ handle: "
|
|
54
|
+
sort: [{ handle: "startedAt", direction: "descending" }]
|
|
55
55
|
});
|
|
56
56
|
}
|
|
57
57
|
});
|
|
@@ -188,7 +188,7 @@ export const AttendanceCollectionSupervisorView = ResourceUtil.createCollection(
|
|
|
188
188
|
return Query.define({
|
|
189
189
|
filter: [
|
|
190
190
|
{
|
|
191
|
-
handle: "
|
|
191
|
+
handle: "virtualStatus",
|
|
192
192
|
operator: "in",
|
|
193
193
|
value: ["approved", "notApproved"]
|
|
194
194
|
},
|
|
@@ -199,7 +199,7 @@ export const AttendanceCollectionSupervisorView = ResourceUtil.createCollection(
|
|
|
199
199
|
]
|
|
200
200
|
}
|
|
201
201
|
],
|
|
202
|
-
sort: [{ handle: "
|
|
202
|
+
sort: [{ handle: "startedAt", direction: "descending" }]
|
|
203
203
|
});
|
|
204
204
|
},
|
|
205
205
|
excludes: ["create"]
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { Resource } from '@neon.id/context';
|
|
2
2
|
import { type Schema } from '@neutron.co.id/personalia-models';
|
|
3
|
-
export declare const LeaveConflictResource: Resource<Schema.LeaveConflict, import("@neon.id/model").Model<"neu:personalia:leaveConflict", "staff" | "staffId" | "
|
|
3
|
+
export declare const LeaveConflictResource: Resource<Schema.LeaveConflict, import("@neon.id/model").Model<"neu:personalia:leaveConflict", "staff" | "staffId" | "deleteType" | "leaveQuotaConflict" | "leaveStaffConflictNew" | "leaveStaffConflictOld" | "leaveQuotaNew" | "leaveQuotaNewName" | "leaveQuotaOld" | "leaveQuotaOldName", Schema.LeaveConflict>>;
|
|
@@ -4,7 +4,8 @@ export const LeaveConflictCollectionView = ResourceUtil.createCollection({
|
|
|
4
4
|
definition: "neu:personalia:leaveConflict",
|
|
5
5
|
single: {
|
|
6
6
|
peeks: ["modal"]
|
|
7
|
-
}
|
|
7
|
+
},
|
|
8
|
+
excludes: ["create", "click"]
|
|
8
9
|
});
|
|
9
10
|
export const LeaveConflictSingleView = ResourceUtil.createSingle({
|
|
10
11
|
name: "default",
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { Resource } from '@neon.id/context';
|
|
2
2
|
import { type Schema } from '@neutron.co.id/personalia-models';
|
|
3
|
-
export declare const LeaveQuotaResource: Resource<Schema.LeaveQuota, import("@neon.id/model").Model<"neu:personalia:leaveQuota", "endedAt" | "startedAt" | "note" | "branches" | "leaveQuota" | "hasConflict" | "nameLeave" | "nameStaffs" | "typeLeave", Schema.LeaveQuota>>;
|
|
3
|
+
export declare const LeaveQuotaResource: Resource<Schema.LeaveQuota, import("@neon.id/model").Model<"neu:personalia:leaveQuota", "endedAt" | "startedAt" | "note" | "branches" | "leaveQuota" | "hasConflict" | "hasGenerated" | "nameLeave" | "nameStaffs" | "typeLeave", Schema.LeaveQuota>>;
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import { Resource } from "@neon.id/context";
|
|
2
|
+
import { NeonLabel } from "@neon.id/interfaces";
|
|
2
3
|
import {
|
|
3
4
|
LeaveQuotaModel
|
|
4
5
|
} from "@neutron.co.id/personalia-models";
|
|
6
|
+
import { h } from "vue";
|
|
5
7
|
export const LeaveQuotaResource = Resource.define({
|
|
6
8
|
model: LeaveQuotaModel,
|
|
7
9
|
collection: {
|
|
@@ -16,11 +18,40 @@ export const LeaveQuotaResource = Resource.define({
|
|
|
16
18
|
component: "LeaveQuotaSingleView"
|
|
17
19
|
},
|
|
18
20
|
views: {
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
21
|
+
leaveQuotaStaff: {
|
|
22
|
+
path: "/pengawas/staff-leaveQuotas",
|
|
23
|
+
component: "LeaveQuotaCollectionView"
|
|
24
|
+
},
|
|
25
|
+
leaveQuotaStaffSingle: {
|
|
26
|
+
path: "/pengawas/staff-leaveQuotas/:slug",
|
|
27
|
+
component: "LeaveQuotaSingleView"
|
|
28
|
+
}
|
|
23
29
|
},
|
|
24
30
|
fragments: LeaveQuotaModel.fragments,
|
|
25
|
-
renders: {
|
|
31
|
+
renders: {
|
|
32
|
+
hasConflict: (item) => h(NeonLabel, {
|
|
33
|
+
modelValue: item.hasConflict,
|
|
34
|
+
color: item.hasConflict ? "danger" : "success",
|
|
35
|
+
text: item.hasConflict ? "Ada Konflik" : "Tidak Ada Konflik",
|
|
36
|
+
icon: item.hasConflict ? "triangle-exclamation" : "check"
|
|
37
|
+
}),
|
|
38
|
+
startedAt: (item) => h(
|
|
39
|
+
"span",
|
|
40
|
+
null,
|
|
41
|
+
item.startedAt ? new Date(item.startedAt).toLocaleDateString("id-ID", {
|
|
42
|
+
day: "2-digit",
|
|
43
|
+
month: "long",
|
|
44
|
+
year: "numeric"
|
|
45
|
+
}) : ""
|
|
46
|
+
),
|
|
47
|
+
endedAt: (item) => h(
|
|
48
|
+
"span",
|
|
49
|
+
null,
|
|
50
|
+
item.endedAt ? new Date(item.endedAt).toLocaleDateString("id-ID", {
|
|
51
|
+
day: "2-digit",
|
|
52
|
+
month: "long",
|
|
53
|
+
year: "numeric"
|
|
54
|
+
}) : ""
|
|
55
|
+
)
|
|
56
|
+
}
|
|
26
57
|
});
|
|
@@ -1,9 +1,27 @@
|
|
|
1
|
+
import { usePermit } from "@neon.id/context";
|
|
1
2
|
import { ResourceUtil } from "@neon.id/office";
|
|
3
|
+
import { Query } from "@neon.id/query";
|
|
4
|
+
import { useOperasional } from "@neutron.co.id/operasional-interfaces/office";
|
|
2
5
|
export const LeaveQuotaCollectionView = ResourceUtil.createCollection({
|
|
3
6
|
name: "default",
|
|
4
7
|
definition: "neu:personalia:leaveQuota",
|
|
5
8
|
single: {
|
|
6
9
|
peeks: ["modal"]
|
|
10
|
+
},
|
|
11
|
+
query: () => {
|
|
12
|
+
const permit = usePermit();
|
|
13
|
+
const { staff } = useOperasional();
|
|
14
|
+
if (permit.isAny(["neu:pengawasSDM"])) {
|
|
15
|
+
return Query.define({
|
|
16
|
+
filter: {
|
|
17
|
+
handle: "branchIds",
|
|
18
|
+
operator: "in",
|
|
19
|
+
value: staff.value?.branchIds
|
|
20
|
+
}
|
|
21
|
+
});
|
|
22
|
+
} else {
|
|
23
|
+
return Query.define({});
|
|
24
|
+
}
|
|
7
25
|
}
|
|
8
26
|
});
|
|
9
27
|
export const LeaveQuotaSingleView = ResourceUtil.createSingle({
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { Resource } from '@neon.id/context';
|
|
2
2
|
import { type Schema } from '@neutron.co.id/personalia-models';
|
|
3
|
-
export declare const LeaveStaffResource: Resource<Schema.LeaveStaff, import("@neon.id/model").Model<"neu:personalia:leaveStaff", "branch" | "endedAt" | "startedAt" | "staff" | "leaveQuota" | "typeLeave" | "leaveQuotaStaff" | "staffId", Schema.LeaveStaff>>;
|
|
3
|
+
export declare const LeaveStaffResource: Resource<Schema.LeaveStaff, import("@neon.id/model").Model<"neu:personalia:leaveStaff", "branch" | "endedAt" | "startedAt" | "staff" | "leaveQuota" | "typeLeave" | "leaveQuotaStaff" | "staffId" | "leaveConflict", Schema.LeaveStaff>>;
|
|
@@ -2,13 +2,13 @@ import { Resource } from "@neon.id/context";
|
|
|
2
2
|
import {
|
|
3
3
|
LeaveStaffModel
|
|
4
4
|
} from "@neutron.co.id/personalia-models";
|
|
5
|
+
import { h } from "vue";
|
|
5
6
|
export const LeaveStaffResource = Resource.define({
|
|
6
7
|
model: LeaveStaffModel,
|
|
7
8
|
collection: {
|
|
8
9
|
title: "Cuti Karyawan",
|
|
9
10
|
path: "leave-staff",
|
|
10
11
|
component: "LeaveStaffCollectionView",
|
|
11
|
-
menu: true,
|
|
12
12
|
displays: ["table"]
|
|
13
13
|
},
|
|
14
14
|
single: {
|
|
@@ -17,5 +17,24 @@ export const LeaveStaffResource = Resource.define({
|
|
|
17
17
|
},
|
|
18
18
|
views: {},
|
|
19
19
|
fragments: LeaveStaffModel.fragments,
|
|
20
|
-
renders: {
|
|
20
|
+
renders: {
|
|
21
|
+
startedAt: (item) => h(
|
|
22
|
+
"span",
|
|
23
|
+
null,
|
|
24
|
+
item.startedAt ? new Date(item.startedAt).toLocaleDateString("id-ID", {
|
|
25
|
+
day: "2-digit",
|
|
26
|
+
month: "long",
|
|
27
|
+
year: "numeric"
|
|
28
|
+
}) : ""
|
|
29
|
+
),
|
|
30
|
+
endedAt: (item) => h(
|
|
31
|
+
"span",
|
|
32
|
+
null,
|
|
33
|
+
item.endedAt ? new Date(item.endedAt).toLocaleDateString("id-ID", {
|
|
34
|
+
day: "2-digit",
|
|
35
|
+
month: "long",
|
|
36
|
+
year: "numeric"
|
|
37
|
+
}) : ""
|
|
38
|
+
)
|
|
39
|
+
}
|
|
21
40
|
});
|
|
@@ -4,7 +4,8 @@ export const LeaveStaffCollectionView = ResourceUtil.createCollection({
|
|
|
4
4
|
definition: "neu:personalia:leaveStaff",
|
|
5
5
|
single: {
|
|
6
6
|
peeks: ["modal"]
|
|
7
|
-
}
|
|
7
|
+
},
|
|
8
|
+
excludes: ["create", "click"]
|
|
8
9
|
});
|
|
9
10
|
export const LeaveStaffSingleView = ResourceUtil.createSingle({
|
|
10
11
|
name: "default",
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { Resource } from '@neon.id/context';
|
|
2
2
|
import { type Schema } from '@neutron.co.id/personalia-models';
|
|
3
|
-
export declare const StaffResource: Resource<Schema.Staff, import("@neon.id/model").Model<"neu:personalia:staff", "
|
|
3
|
+
export declare const StaffResource: Resource<Schema.Staff, import("@neon.id/model").Model<"neu:personalia:staff", "image" | "status" | "branch" | "user" | "point" | "name" | "note" | "branches" | "birthDate" | "birthPlace" | "kubikAt" | "kubikStatus" | "nik" | "virtualRoles" | "workCheckIn" | "workCheckInAt" | "workCome" | "workHome" | "workNote" | "workStatus", Schema.Staff>>;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { Resource } from '@neon.id/context';
|
|
2
2
|
import { type Schema } from '@neutron.co.id/personalia-models';
|
|
3
|
-
export declare const SubmissionResource: Resource<Schema.Submission, import("@neon.id/model").Model<"neu:personalia:submission", "type" | "
|
|
3
|
+
export declare const SubmissionResource: Resource<Schema.Submission, import("@neon.id/model").Model<"neu:personalia:submission", "type" | "image" | "nameStaff" | "status" | "title" | "branches" | "statusStaff" | "agreedStaffs" | "approvedAt" | "decideStaffs" | "decidedAt" | "delayAt" | "delayStaffs" | "detailDecide" | "detailDecideOther" | "detailProcess" | "detailRaise" | "document" | "followUpStaffs" | "hasProcessStaffs" | "hasRaiseStaffs" | "nominal" | "preparedAt" | "processedAt" | "raiseStaffs" | "raisedAt" | "specifications" | "submissionStaffs" | "virtualFollowUpStaffs" | "workingHours" | "yetProcessStaffs" | "yetRaiseStaffs", Schema.Submission>>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@neutron.co.id/operasional-modules",
|
|
3
|
-
"version": "1.12.18
|
|
3
|
+
"version": "1.12.18",
|
|
4
4
|
"description": "Modules of Neutron Operasional.",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE",
|
|
6
6
|
"contributors": [
|
|
@@ -48,7 +48,7 @@
|
|
|
48
48
|
"@neon.id/interfaces": "^1.57.0",
|
|
49
49
|
"@neon.id/office": "1.46.0",
|
|
50
50
|
"@neon.id/query": "^1.12.0",
|
|
51
|
-
"@neutron.co.id/personalia-models": "1.13.
|
|
51
|
+
"@neutron.co.id/personalia-models": "1.13.15",
|
|
52
52
|
"pretty-bytes": "^6.1.1",
|
|
53
53
|
"vue": "^3.4.31"
|
|
54
54
|
},
|
|
@@ -78,7 +78,7 @@
|
|
|
78
78
|
"@neon.id/interfaces": "^1.57.0",
|
|
79
79
|
"@neon.id/office": "1.46.0",
|
|
80
80
|
"@neon.id/query": "^1.12.0",
|
|
81
|
-
"@neutron.co.id/personalia-models": "1.13.
|
|
81
|
+
"@neutron.co.id/personalia-models": "1.13.15",
|
|
82
82
|
"@nuxt/kit": "^3.12.3",
|
|
83
83
|
"pretty-bytes": "^6.1.1"
|
|
84
84
|
},
|