@neutron.co.id/operasional-modules 1.13.0 → 1.14.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.
Files changed (53) hide show
  1. package/build/personalia/index.d.ts +1 -1
  2. package/build/personalia/module.mjs +11 -1
  3. package/build/personalia/resources/attendance/attendance.resource.d.ts +1 -1
  4. package/build/personalia/resources/attendance/attendance.resource.mjs +25 -1
  5. package/build/personalia/resources/attendance/attendance.views.mjs +4 -4
  6. package/build/personalia/resources/attendanceType/attendanceType.resource.d.ts +3 -0
  7. package/build/personalia/resources/attendanceType/attendanceType.resource.mjs +30 -0
  8. package/build/personalia/resources/attendanceType/attendanceType.views.d.ts +66 -0
  9. package/build/personalia/resources/attendanceType/attendanceType.views.mjs +12 -0
  10. package/build/personalia/resources/attendanceType/index.d.ts +2 -0
  11. package/build/personalia/resources/attendanceType/index.mjs +2 -0
  12. package/build/personalia/resources/checkIn/checkIn.resource.d.ts +1 -1
  13. package/build/personalia/resources/index.d.ts +5 -0
  14. package/build/personalia/resources/index.mjs +5 -0
  15. package/build/personalia/resources/leaveConflict/index.d.ts +2 -0
  16. package/build/personalia/resources/leaveConflict/index.mjs +2 -0
  17. package/build/personalia/resources/leaveConflict/leaveConflict.resource.d.ts +3 -0
  18. package/build/personalia/resources/leaveConflict/leaveConflict.resource.mjs +20 -0
  19. package/build/personalia/resources/leaveConflict/leaveConflict.views.d.ts +66 -0
  20. package/build/personalia/resources/leaveConflict/leaveConflict.views.mjs +13 -0
  21. package/build/personalia/resources/leaveQuota/index.d.ts +2 -0
  22. package/build/personalia/resources/leaveQuota/index.mjs +2 -0
  23. package/build/personalia/resources/leaveQuota/leaveQuota.resources.d.ts +3 -0
  24. package/build/personalia/resources/leaveQuota/leaveQuota.resources.mjs +57 -0
  25. package/build/personalia/resources/leaveQuota/leaveQuota.views.d.ts +66 -0
  26. package/build/personalia/resources/leaveQuota/leaveQuota.views.mjs +30 -0
  27. package/build/personalia/resources/leaveStaff/index.d.ts +2 -0
  28. package/build/personalia/resources/leaveStaff/index.mjs +2 -0
  29. package/build/personalia/resources/leaveStaff/leaveStaff.resources.d.ts +3 -0
  30. package/build/personalia/resources/leaveStaff/leaveStaff.resources.mjs +40 -0
  31. package/build/personalia/resources/leaveStaff/leaveStaff.views.d.ts +66 -0
  32. package/build/personalia/resources/leaveStaff/leaveStaff.views.mjs +13 -0
  33. package/build/personalia/resources/progress/progress.resource.d.ts +1 -1
  34. package/build/personalia/resources/responsibility/responsibility.views.mjs +1 -26
  35. package/build/personalia/resources/shift/shift.resource.d.ts +1 -1
  36. package/build/personalia/resources/shiftStaff/shiftStaff.views.mjs +5 -1
  37. package/build/personalia/resources/shiftType/shiftType.resource.d.ts +1 -1
  38. package/build/personalia/resources/staff/staff.resource.d.ts +1 -1
  39. package/build/personalia/resources/submission/submission.resource.d.ts +4 -1
  40. package/build/personalia/resources/submission/submission.resource.mjs +89 -1
  41. package/build/personalia/resources/submission/submission.views.d.ts +132 -0
  42. package/build/personalia/resources/submission/submission.views.mjs +196 -16
  43. package/build/personalia/resources/submissionLog/index.d.ts +2 -0
  44. package/build/personalia/resources/submissionLog/index.mjs +2 -0
  45. package/build/personalia/resources/submissionLog/submissionLog.resource.d.ts +3 -0
  46. package/build/personalia/resources/submissionLog/submissionLog.resource.mjs +21 -0
  47. package/build/personalia/resources/submissionLog/submissionLog.views.d.ts +66 -0
  48. package/build/personalia/resources/submissionLog/submissionLog.views.mjs +14 -0
  49. package/build/personalia/resources/submissionType/submissionType.resource.d.ts +2 -1
  50. package/build/personalia/view-names.mjs +14 -0
  51. package/build/personalia/views.mjs +2 -2
  52. package/build/views.mjs +14 -0
  53. package/package.json +5 -5
@@ -1,4 +1,4 @@
1
1
  export interface ModuleOptions {
2
2
  }
3
- declare const _default: import("@nuxt/schema").NuxtModule<ModuleOptions>;
3
+ declare const _default: import("@nuxt/schema").NuxtModule<ModuleOptions, ModuleOptions, false>;
4
4
  export default _default;
@@ -10,6 +10,7 @@ import { ResponsibilityTypeResource } from "./resources/responsibilityType/respo
10
10
  import { SituationResource } from "./resources/situation/situation.resource.mjs";
11
11
  import { SituationTypeResource } from "./resources/situationType/situationType.resource.mjs";
12
12
  import { StaffResource } from "./resources/staff/staff.resource.mjs";
13
+ import { SubmissionLogResource } from "./resources/submissionLog/submissionLog.resource.mjs";
13
14
  import { SubmissionResource } from "./resources/submission/submission.resource.mjs";
14
15
  import { SubmissionTypeResource } from "./resources/submissionType/submissionType.resource.mjs";
15
16
  import { ShiftResource } from "./resources/shift/shift.resource.mjs";
@@ -17,6 +18,10 @@ import { ShiftTypeResource } from "./resources/shiftType/shiftType.resource.mjs"
17
18
  import { ShiftStaffResource } from "./resources/shiftStaff/shiftStaff.resource.mjs";
18
19
  import { TaskResource } from "./resources/task/task.resource.mjs";
19
20
  import { TargetResource } from "./resources/target/target.resource.mjs";
21
+ import { AttendanceTypeResource } from "./resources/attendanceType/attendanceType.resource.mjs";
22
+ import { LeaveQuotaResource } from "./resources/leaveQuota/leaveQuota.resources.mjs";
23
+ import { LeaveStaffResource } from "./resources/leaveStaff/leaveStaff.resources.mjs";
24
+ import { LeaveConflictResource } from "./resources/leaveConflict/leaveConflict.resource.mjs";
20
25
  export const PersonaliaModule = Module.define({
21
26
  definition: "neu:operasional:personalia",
22
27
  label: "Personalia",
@@ -28,6 +33,7 @@ export const PersonaliaModule = Module.define({
28
33
  SituationTypeResource,
29
34
  SituationResource,
30
35
  CheckInResource,
36
+ SubmissionLogResource,
31
37
  SubmissionResource,
32
38
  SubmissionTypeResource,
33
39
  ResponsibilityTypeResource,
@@ -37,9 +43,13 @@ export const PersonaliaModule = Module.define({
37
43
  PlanResource,
38
44
  ProgressResource,
39
45
  AttendanceResource,
46
+ AttendanceTypeResource,
40
47
  ProgressAccessResource,
41
48
  ShiftTypeResource,
42
49
  ShiftResource,
43
- ShiftStaffResource
50
+ ShiftStaffResource,
51
+ LeaveQuotaResource,
52
+ LeaveStaffResource,
53
+ LeaveConflictResource
44
54
  ]
45
55
  });
@@ -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" | "attendanceAt" | "comeAt" | "decideStaff" | "delegateNotes" | "delegateStaffs" | "earlyAt" | "endedAt" | "homeAt" | "isDelegateStaff" | "isGenerate" | "isNotes" | "lateAt" | "monitoringStaffs" | "notes" | "startedAt" | "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
  });
@@ -47,11 +47,11 @@ export const AttendanceCollectionStaffView = ResourceUtil.createCollection({
47
47
  const { staff } = state.getAllStoreValue();
48
48
  return Query.define({
49
49
  filter: {
50
- handle: "submitStaffId",
50
+ handle: "virtualSubmitStaffId",
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"]
@@ -0,0 +1,3 @@
1
+ import { Resource } from '@neon.id/context';
2
+ import { type Schema } from '@neutron.co.id/personalia-models';
3
+ export declare const AttendanceTypeResource: Resource<Schema.AttendanceType, import("@neon.id/model").Model<"neu:personalia:attendanceType", "code" | "name" | "branches" | "description" | "leaveQuota" | "maxDurationDays" | "showAttendanceType" | "showLeaveQuota", Schema.AttendanceType>>;
@@ -0,0 +1,30 @@
1
+ import { Resource } from "@neon.id/context";
2
+ import {
3
+ AttendanceTypeModel
4
+ } from "@neutron.co.id/personalia-models";
5
+ import { NeonCheck } from "@neon.id/form";
6
+ import { h } from "vue";
7
+ export const AttendanceTypeResource = Resource.define({
8
+ model: AttendanceTypeModel,
9
+ collection: {
10
+ title: "Tipe Absensi",
11
+ path: "attendance-types",
12
+ component: "AttendanceTypeCollectionView",
13
+ menu: true,
14
+ displays: ["table"]
15
+ },
16
+ single: {
17
+ path: "attendance-types/:slug",
18
+ component: "AttendanceTypeSingleView"
19
+ },
20
+ views: {},
21
+ fragments: AttendanceTypeModel.fragments,
22
+ renders: {
23
+ showLeaveQuota: (item) => h(NeonCheck, {
24
+ modelValue: item.showLeaveQuota
25
+ }),
26
+ showAttendanceType: (item) => h(NeonCheck, {
27
+ modelValue: item.showAttendanceType
28
+ })
29
+ }
30
+ });
@@ -0,0 +1,66 @@
1
+ export declare const AttendanceTypeCollectionView: import("vue").DefineComponent<{
2
+ overrides: {
3
+ type: ObjectConstructor;
4
+ default: () => {};
5
+ };
6
+ }, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
7
+ [key: string]: any;
8
+ }>, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
9
+ overrides: {
10
+ type: ObjectConstructor;
11
+ default: () => {};
12
+ };
13
+ }>>, {
14
+ overrides: Record<string, any>;
15
+ }, {}>;
16
+ export declare const AttendanceTypeSingleView: import("vue").DefineComponent<{
17
+ state: {
18
+ type: import("vue").PropType<import("@neon.id/context").TSingleStateOrFn>;
19
+ default: undefined;
20
+ };
21
+ id: {
22
+ type: StringConstructor;
23
+ default: undefined;
24
+ };
25
+ isNew: {
26
+ type: BooleanConstructor;
27
+ default: undefined;
28
+ };
29
+ isMain: {
30
+ type: BooleanConstructor;
31
+ default: boolean;
32
+ };
33
+ overrides: {
34
+ type: ObjectConstructor;
35
+ default: () => {};
36
+ };
37
+ }, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
38
+ [key: string]: any;
39
+ }>, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
40
+ state: {
41
+ type: import("vue").PropType<import("@neon.id/context").TSingleStateOrFn>;
42
+ default: undefined;
43
+ };
44
+ id: {
45
+ type: StringConstructor;
46
+ default: undefined;
47
+ };
48
+ isNew: {
49
+ type: BooleanConstructor;
50
+ default: undefined;
51
+ };
52
+ isMain: {
53
+ type: BooleanConstructor;
54
+ default: boolean;
55
+ };
56
+ overrides: {
57
+ type: ObjectConstructor;
58
+ default: () => {};
59
+ };
60
+ }>>, {
61
+ state: import("@neon.id/context").TSingleStateOrFn;
62
+ id: string;
63
+ isNew: boolean;
64
+ isMain: boolean;
65
+ overrides: Record<string, any>;
66
+ }, {}>;
@@ -0,0 +1,12 @@
1
+ import { ResourceUtil } from "@neon.id/office";
2
+ export const AttendanceTypeCollectionView = ResourceUtil.createCollection({
3
+ name: "default",
4
+ definition: "neu:personalia:attendanceType",
5
+ single: {
6
+ peeks: ["modal"]
7
+ }
8
+ });
9
+ export const AttendanceTypeSingleView = ResourceUtil.createSingle({
10
+ name: "default",
11
+ definition: "neu:personalia:attendanceType"
12
+ });
@@ -0,0 +1,2 @@
1
+ export * from './attendanceType.views';
2
+ export * from './attendanceType.resource';
@@ -0,0 +1,2 @@
1
+ export * from "./attendanceType.views.mjs";
2
+ export * from "./attendanceType.resource.mjs";
@@ -1,3 +1,3 @@
1
1
  import { Resource } from '@neon.id/context';
2
2
  import { type Schema } from '@neutron.co.id/sentral-models';
3
- export declare const CheckInResource: Resource<Schema.CheckIn, import("@neon.id/model").Model<"neu:tempat:checkIn", "type" | "nameStaff" | "branch" | "user" | "note" | "latitude" | "longitude" | "building" | "checkInAt" | "informationCheckIn" | "staff" | "statusGPS" | "student" | "teacher" | "virtualStaff", Schema.CheckIn>>;
3
+ export declare const CheckInResource: Resource<Schema.CheckIn, import("@neon.id/model").Model<"neu:tempat:checkIn", "type" | "nameStaff" | "branch" | "user" | "note" | "building" | "latitude" | "longitude" | "checkInAt" | "informationCheckIn" | "staff" | "statusGPS" | "student" | "teacher" | "virtualStaff", Schema.CheckIn>>;
@@ -1,5 +1,7 @@
1
1
  export * from './attendance';
2
+ export * from './attendanceType';
2
3
  export * from './checkIn';
4
+ export * from './leaveQuota';
3
5
  export * from './plan';
4
6
  export * from './planType';
5
7
  export * from './progress';
@@ -9,6 +11,7 @@ export * from './responsibilityType';
9
11
  export * from './situation';
10
12
  export * from './situationType';
11
13
  export * from './staff';
14
+ export * from './submissionLog';
12
15
  export * from './submission';
13
16
  export * from './submissionType';
14
17
  export * from './target';
@@ -16,3 +19,5 @@ export * from './task';
16
19
  export * from './shift';
17
20
  export * from './shiftType';
18
21
  export * from './shiftStaff';
22
+ export * from './leaveStaff';
23
+ export * from './leaveConflict';
@@ -1,5 +1,7 @@
1
1
  export * from "./attendance/index.mjs";
2
+ export * from "./attendanceType/index.mjs";
2
3
  export * from "./checkIn/index.mjs";
4
+ export * from "./leaveQuota/index.mjs";
3
5
  export * from "./plan/index.mjs";
4
6
  export * from "./planType/index.mjs";
5
7
  export * from "./progress/index.mjs";
@@ -9,6 +11,7 @@ export * from "./responsibilityType/index.mjs";
9
11
  export * from "./situation/index.mjs";
10
12
  export * from "./situationType/index.mjs";
11
13
  export * from "./staff/index.mjs";
14
+ export * from "./submissionLog/index.mjs";
12
15
  export * from "./submission/index.mjs";
13
16
  export * from "./submissionType/index.mjs";
14
17
  export * from "./target/index.mjs";
@@ -16,3 +19,5 @@ export * from "./task/index.mjs";
16
19
  export * from "./shift/index.mjs";
17
20
  export * from "./shiftType/index.mjs";
18
21
  export * from "./shiftStaff/index.mjs";
22
+ export * from "./leaveStaff/index.mjs";
23
+ export * from "./leaveConflict/index.mjs";
@@ -0,0 +1,2 @@
1
+ export * from './leaveConflict.views';
2
+ export * from './leaveConflict.resource';
@@ -0,0 +1,2 @@
1
+ export * from "./leaveConflict.views.mjs";
2
+ export * from "./leaveConflict.resource.mjs";
@@ -0,0 +1,3 @@
1
+ import { Resource } from '@neon.id/context';
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" | "deleteType" | "leaveQuotaConflict" | "leaveStaffConflictNew" | "leaveStaffConflictOld" | "leaveQuotaNew" | "leaveQuotaNewName" | "leaveQuotaOld" | "leaveQuotaOldName", Schema.LeaveConflict>>;
@@ -0,0 +1,20 @@
1
+ import { Resource } from "@neon.id/context";
2
+ import {
3
+ LeaveConflictModel
4
+ } from "@neutron.co.id/personalia-models";
5
+ export const LeaveConflictResource = Resource.define({
6
+ model: LeaveConflictModel,
7
+ collection: {
8
+ title: "Konflik Cuti",
9
+ path: "leave-conflict",
10
+ component: "LeaveConflictCollectionView",
11
+ displays: ["table"]
12
+ },
13
+ single: {
14
+ path: "leave-conflict/:slug",
15
+ component: "LeaveConflictSingleView"
16
+ },
17
+ views: {},
18
+ fragments: LeaveConflictModel.fragments,
19
+ renders: {}
20
+ });
@@ -0,0 +1,66 @@
1
+ export declare const LeaveConflictCollectionView: import("vue").DefineComponent<{
2
+ overrides: {
3
+ type: ObjectConstructor;
4
+ default: () => {};
5
+ };
6
+ }, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
7
+ [key: string]: any;
8
+ }>, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
9
+ overrides: {
10
+ type: ObjectConstructor;
11
+ default: () => {};
12
+ };
13
+ }>>, {
14
+ overrides: Record<string, any>;
15
+ }, {}>;
16
+ export declare const LeaveConflictSingleView: import("vue").DefineComponent<{
17
+ state: {
18
+ type: import("vue").PropType<import("@neon.id/context").TSingleStateOrFn>;
19
+ default: undefined;
20
+ };
21
+ id: {
22
+ type: StringConstructor;
23
+ default: undefined;
24
+ };
25
+ isNew: {
26
+ type: BooleanConstructor;
27
+ default: undefined;
28
+ };
29
+ isMain: {
30
+ type: BooleanConstructor;
31
+ default: boolean;
32
+ };
33
+ overrides: {
34
+ type: ObjectConstructor;
35
+ default: () => {};
36
+ };
37
+ }, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
38
+ [key: string]: any;
39
+ }>, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
40
+ state: {
41
+ type: import("vue").PropType<import("@neon.id/context").TSingleStateOrFn>;
42
+ default: undefined;
43
+ };
44
+ id: {
45
+ type: StringConstructor;
46
+ default: undefined;
47
+ };
48
+ isNew: {
49
+ type: BooleanConstructor;
50
+ default: undefined;
51
+ };
52
+ isMain: {
53
+ type: BooleanConstructor;
54
+ default: boolean;
55
+ };
56
+ overrides: {
57
+ type: ObjectConstructor;
58
+ default: () => {};
59
+ };
60
+ }>>, {
61
+ state: import("@neon.id/context").TSingleStateOrFn;
62
+ id: string;
63
+ isNew: boolean;
64
+ isMain: boolean;
65
+ overrides: Record<string, any>;
66
+ }, {}>;
@@ -0,0 +1,13 @@
1
+ import { ResourceUtil } from "@neon.id/office";
2
+ export const LeaveConflictCollectionView = ResourceUtil.createCollection({
3
+ name: "default",
4
+ definition: "neu:personalia:leaveConflict",
5
+ single: {
6
+ peeks: ["modal"]
7
+ },
8
+ excludes: ["create", "click"]
9
+ });
10
+ export const LeaveConflictSingleView = ResourceUtil.createSingle({
11
+ name: "default",
12
+ definition: "neu:personalia:leaveConflict"
13
+ });
@@ -0,0 +1,2 @@
1
+ export * from './leaveQuota.views';
2
+ export * from './leaveQuota.resources';
@@ -0,0 +1,2 @@
1
+ export * from "./leaveQuota.views.mjs";
2
+ export * from "./leaveQuota.resources.mjs";
@@ -0,0 +1,3 @@
1
+ import { Resource } from '@neon.id/context';
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" | "hasGenerated" | "nameLeave" | "nameStaffs" | "typeLeave", Schema.LeaveQuota>>;
@@ -0,0 +1,57 @@
1
+ import { Resource } from "@neon.id/context";
2
+ import { NeonLabel } from "@neon.id/interfaces";
3
+ import {
4
+ LeaveQuotaModel
5
+ } from "@neutron.co.id/personalia-models";
6
+ import { h } from "vue";
7
+ export const LeaveQuotaResource = Resource.define({
8
+ model: LeaveQuotaModel,
9
+ collection: {
10
+ title: "Kuota Cuti",
11
+ path: "leave-quota",
12
+ component: "LeaveQuotaCollectionView",
13
+ menu: true,
14
+ displays: ["table"]
15
+ },
16
+ single: {
17
+ path: "leave-quota/:slug",
18
+ component: "LeaveQuotaSingleView"
19
+ },
20
+ views: {
21
+ leaveQuotaStaff: {
22
+ path: "/pengawas/staff-leaveQuotas",
23
+ component: "LeaveQuotaCollectionView"
24
+ },
25
+ leaveQuotaStaffSingle: {
26
+ path: "/pengawas/staff-leaveQuotas/:slug",
27
+ component: "LeaveQuotaSingleView"
28
+ }
29
+ },
30
+ fragments: LeaveQuotaModel.fragments,
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
+ }
57
+ });
@@ -0,0 +1,66 @@
1
+ export declare const LeaveQuotaCollectionView: import("vue").DefineComponent<{
2
+ overrides: {
3
+ type: ObjectConstructor;
4
+ default: () => {};
5
+ };
6
+ }, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
7
+ [key: string]: any;
8
+ }>, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
9
+ overrides: {
10
+ type: ObjectConstructor;
11
+ default: () => {};
12
+ };
13
+ }>>, {
14
+ overrides: Record<string, any>;
15
+ }, {}>;
16
+ export declare const LeaveQuotaSingleView: import("vue").DefineComponent<{
17
+ state: {
18
+ type: import("vue").PropType<import("@neon.id/context").TSingleStateOrFn>;
19
+ default: undefined;
20
+ };
21
+ id: {
22
+ type: StringConstructor;
23
+ default: undefined;
24
+ };
25
+ isNew: {
26
+ type: BooleanConstructor;
27
+ default: undefined;
28
+ };
29
+ isMain: {
30
+ type: BooleanConstructor;
31
+ default: boolean;
32
+ };
33
+ overrides: {
34
+ type: ObjectConstructor;
35
+ default: () => {};
36
+ };
37
+ }, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
38
+ [key: string]: any;
39
+ }>, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
40
+ state: {
41
+ type: import("vue").PropType<import("@neon.id/context").TSingleStateOrFn>;
42
+ default: undefined;
43
+ };
44
+ id: {
45
+ type: StringConstructor;
46
+ default: undefined;
47
+ };
48
+ isNew: {
49
+ type: BooleanConstructor;
50
+ default: undefined;
51
+ };
52
+ isMain: {
53
+ type: BooleanConstructor;
54
+ default: boolean;
55
+ };
56
+ overrides: {
57
+ type: ObjectConstructor;
58
+ default: () => {};
59
+ };
60
+ }>>, {
61
+ state: import("@neon.id/context").TSingleStateOrFn;
62
+ id: string;
63
+ isNew: boolean;
64
+ isMain: boolean;
65
+ overrides: Record<string, any>;
66
+ }, {}>;
@@ -0,0 +1,30 @@
1
+ import { usePermit } from "@neon.id/context";
2
+ import { ResourceUtil } from "@neon.id/office";
3
+ import { Query } from "@neon.id/query";
4
+ import { useOperasional } from "@neutron.co.id/operasional-interfaces/office";
5
+ export const LeaveQuotaCollectionView = ResourceUtil.createCollection({
6
+ name: "default",
7
+ definition: "neu:personalia:leaveQuota",
8
+ single: {
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
+ }
25
+ }
26
+ });
27
+ export const LeaveQuotaSingleView = ResourceUtil.createSingle({
28
+ name: "default",
29
+ definition: "neu:personalia:leaveQuota"
30
+ });
@@ -0,0 +1,2 @@
1
+ export * from './leaveStaff.views';
2
+ export * from './leaveStaff.resources';
@@ -0,0 +1,2 @@
1
+ export * from "./leaveStaff.views.mjs";
2
+ export * from "./leaveStaff.resources.mjs";
@@ -0,0 +1,3 @@
1
+ import { Resource } from '@neon.id/context';
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" | "leaveConflict", Schema.LeaveStaff>>;
@@ -0,0 +1,40 @@
1
+ import { Resource } from "@neon.id/context";
2
+ import {
3
+ LeaveStaffModel
4
+ } from "@neutron.co.id/personalia-models";
5
+ import { h } from "vue";
6
+ export const LeaveStaffResource = Resource.define({
7
+ model: LeaveStaffModel,
8
+ collection: {
9
+ title: "Cuti Karyawan",
10
+ path: "leave-staff",
11
+ component: "LeaveStaffCollectionView",
12
+ displays: ["table"]
13
+ },
14
+ single: {
15
+ path: "leave-staff/:slug",
16
+ component: "LeaveStaffSingleView"
17
+ },
18
+ views: {},
19
+ fragments: LeaveStaffModel.fragments,
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
+ }
40
+ });