@neutron.co.id/operasional-modules 1.0.0 → 1.0.1-beta.2
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/index.cjs +0 -29
- package/build/index.mjs +0 -28
- package/build/personalia/index.mjs +15 -1
- package/build/personalia/module.mjs +2 -2
- package/build/personalia/resources/index.d.ts +1 -0
- package/build/personalia/resources/index.mjs +1 -0
- package/build/personalia/resources/staff/staff.model.d.ts +1 -1
- package/build/personalia/resources/staff/staff.resource.d.ts +1 -1
- package/build/personalia/resources/staff/staff.views.d.ts +32 -2
- package/build/personalia/resources/staff/staff.views.mjs +4 -4
- package/build/personalia/resources/task/index.d.ts +2 -0
- package/build/personalia/resources/task/index.mjs +2 -0
- package/build/personalia/resources/task/task.model.d.ts +6 -0
- package/build/personalia/resources/task/task.model.mjs +54 -0
- package/build/personalia/resources/task/task.resource.d.ts +2 -0
- package/build/personalia/resources/task/task.resource.mjs +32 -0
- package/build/personalia/resources/task/task.views.d.ts +36 -0
- package/build/personalia/resources/task/task.views.mjs +9 -0
- package/build/personalia/views.mjs +1 -0
- package/package.json +31 -21
package/build/index.cjs
CHANGED
|
@@ -1,31 +1,2 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
const kit = require('@nuxt/kit');
|
|
4
|
-
|
|
5
|
-
kit.defineNuxtModule({
|
|
6
|
-
meta: {
|
|
7
|
-
/**
|
|
8
|
-
* Module identifier, will be used in Nuxt.
|
|
9
|
-
* @example '@neutron.co.id/plan-plan'
|
|
10
|
-
* @example '@neon.id/belajar-course'
|
|
11
|
-
* @example '@neutron.co.id/tempat-place'
|
|
12
|
-
*/
|
|
13
|
-
name: "@neutron.co.id/operasional-personalia",
|
|
14
|
-
/**
|
|
15
|
-
* Module config key,
|
|
16
|
-
* will be used to set options in nuxt.config.ts.
|
|
17
|
-
* @example 'neu:plan:plan'
|
|
18
|
-
* @example 'neo:belajar:course'
|
|
19
|
-
* @example 'neu:tempat;place'
|
|
20
|
-
*/
|
|
21
|
-
configKey: "neu:operasional:personalia",
|
|
22
|
-
compatibility: { nuxt: "^3.0.0" }
|
|
23
|
-
},
|
|
24
|
-
defaults: {},
|
|
25
|
-
setup() {
|
|
26
|
-
console.log("module:neu:operasional:personalia");
|
|
27
|
-
const { resolve } = kit.createResolver((typeof document === 'undefined' ? new (require('u' + 'rl').URL)('file:' + __filename).href : (document.currentScript && document.currentScript.src || new URL('index.cjs', document.baseURI).href)));
|
|
28
|
-
const plugin = resolve("./plugin");
|
|
29
|
-
kit.addPlugin(plugin);
|
|
30
|
-
}
|
|
31
|
-
});
|
package/build/index.mjs
CHANGED
|
@@ -1,29 +1 @@
|
|
|
1
|
-
import { defineNuxtModule, createResolver, addPlugin } from '@nuxt/kit';
|
|
2
1
|
|
|
3
|
-
defineNuxtModule({
|
|
4
|
-
meta: {
|
|
5
|
-
/**
|
|
6
|
-
* Module identifier, will be used in Nuxt.
|
|
7
|
-
* @example '@neutron.co.id/plan-plan'
|
|
8
|
-
* @example '@neon.id/belajar-course'
|
|
9
|
-
* @example '@neutron.co.id/tempat-place'
|
|
10
|
-
*/
|
|
11
|
-
name: "@neutron.co.id/operasional-personalia",
|
|
12
|
-
/**
|
|
13
|
-
* Module config key,
|
|
14
|
-
* will be used to set options in nuxt.config.ts.
|
|
15
|
-
* @example 'neu:plan:plan'
|
|
16
|
-
* @example 'neo:belajar:course'
|
|
17
|
-
* @example 'neu:tempat;place'
|
|
18
|
-
*/
|
|
19
|
-
configKey: "neu:operasional:personalia",
|
|
20
|
-
compatibility: { nuxt: "^3.0.0" }
|
|
21
|
-
},
|
|
22
|
-
defaults: {},
|
|
23
|
-
setup() {
|
|
24
|
-
console.log("module:neu:operasional:personalia");
|
|
25
|
-
const { resolve } = createResolver(import.meta.url);
|
|
26
|
-
const plugin = resolve("./plugin");
|
|
27
|
-
addPlugin(plugin);
|
|
28
|
-
}
|
|
29
|
-
});
|
|
@@ -1,4 +1,10 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import {
|
|
2
|
+
addComponent,
|
|
3
|
+
addPlugin,
|
|
4
|
+
createResolver,
|
|
5
|
+
defineNuxtModule
|
|
6
|
+
} from "@nuxt/kit";
|
|
7
|
+
import views from "./views.mjs";
|
|
2
8
|
export default defineNuxtModule({
|
|
3
9
|
meta: {
|
|
4
10
|
/**
|
|
@@ -24,5 +30,13 @@ export default defineNuxtModule({
|
|
|
24
30
|
const { resolve } = createResolver(import.meta.url);
|
|
25
31
|
const plugin = resolve("./plugin");
|
|
26
32
|
addPlugin(plugin);
|
|
33
|
+
for (const view of views) {
|
|
34
|
+
addComponent({
|
|
35
|
+
name: view,
|
|
36
|
+
export: view,
|
|
37
|
+
filePath: resolve("./resources"),
|
|
38
|
+
global: true
|
|
39
|
+
});
|
|
40
|
+
}
|
|
27
41
|
}
|
|
28
42
|
});
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { Module } from "@neon.id/context";
|
|
2
|
-
import { StaffResource } from "./resources/index.mjs";
|
|
2
|
+
import { StaffResource, TaskResource } from "./resources/index.mjs";
|
|
3
3
|
export const PersonaliaModule = Module.define({
|
|
4
4
|
definition: "neu:operasional:personalia",
|
|
5
5
|
label: "Personalia",
|
|
6
6
|
path: "personalia",
|
|
7
7
|
icon: "solid:user",
|
|
8
|
-
resources: [StaffResource]
|
|
8
|
+
resources: [StaffResource, TaskResource]
|
|
9
9
|
});
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export declare const StaffModel: import("@neon.id/model
|
|
1
|
+
export declare const StaffModel: import("@neon.id/model").Model<"neu:personalia:staff", "name" | "nik" | "branch" | "branches" | "user" | "image" | "birthPlace" | "birthDate" | "note">;
|
|
2
2
|
export type TStaffModel = typeof StaffModel;
|
|
3
3
|
export declare const fragments: {
|
|
4
4
|
item: Schema.Staff;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { Resource } from '@neon.id/context';
|
|
2
|
-
export declare const StaffResource: Resource<Schema.Staff, import("@neon.id/model
|
|
2
|
+
export declare const StaffResource: Resource<Schema.Staff, import("@neon.id/model").Model<"neu:personalia:staff", "name" | "nik" | "branch" | "branches" | "user" | "image" | "birthPlace" | "birthDate" | "note">>;
|
|
@@ -1,6 +1,36 @@
|
|
|
1
1
|
export declare const StaffCollectionView: import("vue").DefineComponent<{}, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
2
2
|
[key: string]: any;
|
|
3
3
|
}>, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
|
|
4
|
-
export declare const StaffSingleView: import("vue").DefineComponent<{
|
|
4
|
+
export declare const StaffSingleView: import("vue").DefineComponent<{
|
|
5
|
+
id: {
|
|
6
|
+
type: StringConstructor;
|
|
7
|
+
default: null;
|
|
8
|
+
};
|
|
9
|
+
isNew: {
|
|
10
|
+
type: BooleanConstructor;
|
|
11
|
+
default: null;
|
|
12
|
+
};
|
|
13
|
+
isMain: {
|
|
14
|
+
type: BooleanConstructor;
|
|
15
|
+
default: boolean;
|
|
16
|
+
};
|
|
17
|
+
}, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
5
18
|
[key: string]: any;
|
|
6
|
-
}>,
|
|
19
|
+
}>, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
20
|
+
id: {
|
|
21
|
+
type: StringConstructor;
|
|
22
|
+
default: null;
|
|
23
|
+
};
|
|
24
|
+
isNew: {
|
|
25
|
+
type: BooleanConstructor;
|
|
26
|
+
default: null;
|
|
27
|
+
};
|
|
28
|
+
isMain: {
|
|
29
|
+
type: BooleanConstructor;
|
|
30
|
+
default: boolean;
|
|
31
|
+
};
|
|
32
|
+
}>>, {
|
|
33
|
+
id: string;
|
|
34
|
+
isMain: boolean;
|
|
35
|
+
isNew: boolean;
|
|
36
|
+
}>;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { ResourceUtil } from "@neon.id/office";
|
|
2
2
|
export const StaffCollectionView = ResourceUtil.createCollection({
|
|
3
|
-
|
|
4
|
-
|
|
3
|
+
name: "default",
|
|
4
|
+
definition: "neu:personalia:staff"
|
|
5
5
|
});
|
|
6
6
|
export const StaffSingleView = ResourceUtil.createSingle({
|
|
7
|
-
|
|
8
|
-
|
|
7
|
+
name: "default",
|
|
8
|
+
definition: "neu:personalia:staff"
|
|
9
9
|
});
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export declare const TaskModel: import("@neon.id/model").Model<"neu:personalia:task", "branch" | "status" | "taskName" | "giveAssignment" | "supervisingAssignment" | "doingAssignment" | "helpAssignment" | "priority" | "estimatedStartDate" | "estimatedEndDate" | "estimatedHourDoingAssignment" | "estimatedHourCommunicationAssignment" | "estimatedHourCognitiveAssignment" | "estimatedHourCreativeAssignment" | "internalServiceDescription" | "externalServiceDescription" | "estimatedHourByDay" | "estimatedRealizedAssignmentStart" | "estimatedRealizedAssignmentEnd" | "resultAssignment">;
|
|
2
|
+
export type TTaskModel = typeof TaskModel;
|
|
3
|
+
export declare const fragments: {
|
|
4
|
+
item: Schema.Task;
|
|
5
|
+
detail: Schema.Task;
|
|
6
|
+
};
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { models } from "@neutron.co.id/personalia-models";
|
|
2
|
+
export const TaskModel = models.TaskModel;
|
|
3
|
+
const item = {
|
|
4
|
+
id: 1,
|
|
5
|
+
display: 1,
|
|
6
|
+
flag: 1,
|
|
7
|
+
taskName: 1,
|
|
8
|
+
internalServiceDescription: 1,
|
|
9
|
+
externalServiceDescription: 1,
|
|
10
|
+
branch: {
|
|
11
|
+
id: 1,
|
|
12
|
+
display: 1
|
|
13
|
+
},
|
|
14
|
+
giveAssignment: {
|
|
15
|
+
id: 1,
|
|
16
|
+
display: 1
|
|
17
|
+
},
|
|
18
|
+
doingAssignment: {
|
|
19
|
+
id: 1,
|
|
20
|
+
display: 1
|
|
21
|
+
},
|
|
22
|
+
supervisingAssignment: {
|
|
23
|
+
id: 1,
|
|
24
|
+
display: 1
|
|
25
|
+
},
|
|
26
|
+
helpAssignment: {
|
|
27
|
+
id: 1,
|
|
28
|
+
display: 1
|
|
29
|
+
},
|
|
30
|
+
estimatedStartDate: 1,
|
|
31
|
+
estimatedEndDate: 1,
|
|
32
|
+
estimatedHourDoingAssignment: 1,
|
|
33
|
+
estimatedHourCommunicationAssignment: 1,
|
|
34
|
+
estimatedHourCognitiveAssignment: 1,
|
|
35
|
+
estimatedHourCreativeAssignment: 1,
|
|
36
|
+
estimatedHourByDay: 1,
|
|
37
|
+
priority: 1,
|
|
38
|
+
status: 1,
|
|
39
|
+
estimatedRealizedAssignmentStart: 1,
|
|
40
|
+
estimatedRealizedAssignmentEnd: 1,
|
|
41
|
+
resultAssignment: 1
|
|
42
|
+
};
|
|
43
|
+
const detail = {
|
|
44
|
+
...item,
|
|
45
|
+
branchId: 1,
|
|
46
|
+
givingAssignmentId: 1,
|
|
47
|
+
doingAssignmentId: 1,
|
|
48
|
+
supervisingAssignmentId: 1,
|
|
49
|
+
helpAssignmentId: 1
|
|
50
|
+
};
|
|
51
|
+
export const fragments = {
|
|
52
|
+
item,
|
|
53
|
+
detail
|
|
54
|
+
};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import { Resource } from '@neon.id/context';
|
|
2
|
+
export declare const TaskResource: Resource<Schema.Task, import("@neon.id/model").Model<"neu:personalia:task", "branch" | "status" | "taskName" | "giveAssignment" | "supervisingAssignment" | "doingAssignment" | "helpAssignment" | "priority" | "estimatedStartDate" | "estimatedEndDate" | "estimatedHourDoingAssignment" | "estimatedHourCommunicationAssignment" | "estimatedHourCognitiveAssignment" | "estimatedHourCreativeAssignment" | "internalServiceDescription" | "externalServiceDescription" | "estimatedHourByDay" | "estimatedRealizedAssignmentStart" | "estimatedRealizedAssignmentEnd" | "resultAssignment">>;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { Resource } from "@neon.id/context";
|
|
2
|
+
import { TaskCollectionView, TaskSingleView } from "./task.views.mjs";
|
|
3
|
+
import { fragments, TaskModel } from "./task.model.mjs";
|
|
4
|
+
export const TaskResource = Resource.define({
|
|
5
|
+
model: TaskModel,
|
|
6
|
+
collection: {
|
|
7
|
+
title: "Tugas",
|
|
8
|
+
path: "tugas",
|
|
9
|
+
component: TaskCollectionView,
|
|
10
|
+
menu: true,
|
|
11
|
+
displays: ["table"]
|
|
12
|
+
},
|
|
13
|
+
single: {
|
|
14
|
+
path: "tugas/:slug",
|
|
15
|
+
component: TaskSingleView
|
|
16
|
+
},
|
|
17
|
+
views: {
|
|
18
|
+
// collection: {
|
|
19
|
+
// path: 'staffs',
|
|
20
|
+
// label: 'Staffs',
|
|
21
|
+
// icon: 'door-open',
|
|
22
|
+
// menu: true,
|
|
23
|
+
// component: StaffCollectionView,
|
|
24
|
+
// },
|
|
25
|
+
// single: {
|
|
26
|
+
// path: 'staffs/:slug',
|
|
27
|
+
// component: StaffSingleView,
|
|
28
|
+
// },
|
|
29
|
+
},
|
|
30
|
+
fragments,
|
|
31
|
+
renders: {}
|
|
32
|
+
});
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
export declare const TaskCollectionView: import("vue").DefineComponent<{}, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
2
|
+
[key: string]: any;
|
|
3
|
+
}>, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
|
|
4
|
+
export declare const TaskSingleView: import("vue").DefineComponent<{
|
|
5
|
+
id: {
|
|
6
|
+
type: StringConstructor;
|
|
7
|
+
default: null;
|
|
8
|
+
};
|
|
9
|
+
isNew: {
|
|
10
|
+
type: BooleanConstructor;
|
|
11
|
+
default: null;
|
|
12
|
+
};
|
|
13
|
+
isMain: {
|
|
14
|
+
type: BooleanConstructor;
|
|
15
|
+
default: boolean;
|
|
16
|
+
};
|
|
17
|
+
}, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
18
|
+
[key: string]: any;
|
|
19
|
+
}>, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
20
|
+
id: {
|
|
21
|
+
type: StringConstructor;
|
|
22
|
+
default: null;
|
|
23
|
+
};
|
|
24
|
+
isNew: {
|
|
25
|
+
type: BooleanConstructor;
|
|
26
|
+
default: null;
|
|
27
|
+
};
|
|
28
|
+
isMain: {
|
|
29
|
+
type: BooleanConstructor;
|
|
30
|
+
default: boolean;
|
|
31
|
+
};
|
|
32
|
+
}>>, {
|
|
33
|
+
id: string;
|
|
34
|
+
isMain: boolean;
|
|
35
|
+
isNew: boolean;
|
|
36
|
+
}>;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { ResourceUtil } from "@neon.id/office";
|
|
2
|
+
export const TaskCollectionView = ResourceUtil.createCollection({
|
|
3
|
+
name: "default",
|
|
4
|
+
definition: "neu:personalia:task"
|
|
5
|
+
});
|
|
6
|
+
export const TaskSingleView = ResourceUtil.createSingle({
|
|
7
|
+
name: "default",
|
|
8
|
+
definition: "neu:personalia:task"
|
|
9
|
+
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default ["StaffCollectionView","StaffSingleView","TaskCollectionView","TaskSingleView"]
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@neutron.co.id/operasional-modules",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.1-beta.2",
|
|
4
4
|
"description": "Modules of Neutron.",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE",
|
|
6
6
|
"contributors": [
|
|
@@ -21,6 +21,16 @@
|
|
|
21
21
|
"main": "build/index.cjs",
|
|
22
22
|
"module": "build/index.mjs",
|
|
23
23
|
"types": "build/index.d.ts",
|
|
24
|
+
"typesVersions": {
|
|
25
|
+
"*": {
|
|
26
|
+
"*": [
|
|
27
|
+
"build/*"
|
|
28
|
+
],
|
|
29
|
+
"personalia": [
|
|
30
|
+
"./build/personalia/exports.d.ts"
|
|
31
|
+
]
|
|
32
|
+
}
|
|
33
|
+
},
|
|
24
34
|
"files": [
|
|
25
35
|
"build/**"
|
|
26
36
|
],
|
|
@@ -30,34 +40,34 @@
|
|
|
30
40
|
"lint": "eslint src/ --ext .js,.ts"
|
|
31
41
|
},
|
|
32
42
|
"dependencies": {
|
|
33
|
-
"@neon.id/context": "0.
|
|
34
|
-
"@neon.id/office": "0.
|
|
35
|
-
"@neutron.co.id/personalia-models": "1.
|
|
36
|
-
"@nuxt/kit": "3.
|
|
43
|
+
"@neon.id/context": "0.37.0",
|
|
44
|
+
"@neon.id/office": "0.22.0",
|
|
45
|
+
"@neutron.co.id/personalia-models": "1.2.0-beta.1",
|
|
46
|
+
"@nuxt/kit": "3.2.3"
|
|
37
47
|
},
|
|
38
48
|
"devDependencies": {
|
|
39
|
-
"@graphql-codegen/cli": "
|
|
40
|
-
"@graphql-codegen/client-preset": "
|
|
41
|
-
"@neon.id/types": "1.
|
|
42
|
-
"@types/eslint": "8.
|
|
43
|
-
"@types/node": "18.
|
|
49
|
+
"@graphql-codegen/cli": "3.2.1",
|
|
50
|
+
"@graphql-codegen/client-preset": "2.1.0",
|
|
51
|
+
"@neon.id/types": "1.37.0",
|
|
52
|
+
"@types/eslint": "8.21.1",
|
|
53
|
+
"@types/node": "18.14.4",
|
|
44
54
|
"@types/prettier": "2.7.2",
|
|
45
55
|
"@vortex.so/eslint-plugin": "0.7.0",
|
|
46
|
-
"eslint": "8.
|
|
47
|
-
"prettier": "2.8.
|
|
48
|
-
"typescript": "4.9.
|
|
49
|
-
"unbuild": "1.1.
|
|
50
|
-
"vite": "4.
|
|
51
|
-
"vitest": "0.
|
|
56
|
+
"eslint": "8.35.0",
|
|
57
|
+
"prettier": "2.8.4",
|
|
58
|
+
"typescript": "4.9.5",
|
|
59
|
+
"unbuild": "1.1.2",
|
|
60
|
+
"vite": "4.1.4",
|
|
61
|
+
"vitest": "0.29.2"
|
|
52
62
|
},
|
|
53
63
|
"peerDependencies": {
|
|
54
|
-
"@neon.id/context": "^0.
|
|
55
|
-
"@neon.id/office": "^0.
|
|
56
|
-
"@neutron.co.id/personalia-models": "^1.
|
|
57
|
-
"@nuxt/kit": "^3.
|
|
64
|
+
"@neon.id/context": "^0.37.0",
|
|
65
|
+
"@neon.id/office": "^0.22.0",
|
|
66
|
+
"@neutron.co.id/personalia-models": "^1.2.0-beta.1",
|
|
67
|
+
"@nuxt/kit": "^3.2.3"
|
|
58
68
|
},
|
|
59
69
|
"publishConfig": {
|
|
60
70
|
"access": "public"
|
|
61
71
|
},
|
|
62
|
-
"build":
|
|
72
|
+
"build": 4
|
|
63
73
|
}
|