@neutron.co.id/operasional-modules 1.12.17 → 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.
@@ -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: "createdAt", direction: "descending" }]
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: "status",
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: "createdAt", direction: "descending" }]
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 StaffResource: Resource<Schema.Staff, import("@neon.id/model").Model<"neu:personalia:staff", "status" | "branch" | "user" | "point" | "image" | "name" | "note" | "branches" | "birthDate" | "birthPlace" | "kubikAt" | "kubikStatus" | "nik" | "virtualRoles" | "workCheckIn" | "workCheckInAt" | "workCome" | "workHome" | "workNote" | "workStatus", Schema.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" | "nameStaff" | "status" | "image" | "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>>;
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.17",
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.10",
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,12 +78,12 @@
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.10",
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
  },
85
85
  "publishConfig": {
86
86
  "access": "public"
87
87
  },
88
- "build": 115
88
+ "build": 116
89
89
  }