jplan-pack 0.4.47 → 0.5.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/dist/jplan-pack.cjs.js +65 -29
- package/dist/jplan-pack.css +1 -1
- package/dist/jplan-pack.es.js +52671 -41281
- package/dist/types/_auth/composables/type.d.ts +33 -0
- package/dist/types/_auth/composables/useAuth.d.ts +6 -0
- package/dist/types/_auth/composables/useSession.d.ts +24 -0
- package/dist/types/_auth/composables/useToken.d.ts +5 -0
- package/dist/types/_auth/index.d.ts +5 -0
- package/dist/types/_auth/msal/msal.d.ts +4 -0
- package/dist/types/_auth/msal/service.d.ts +0 -0
- package/dist/types/_auth/navigation-guard/authGruard.d.ts +2 -0
- package/dist/types/api/coreClient.d.ts +12 -0
- package/dist/types/api/type.d.ts +7 -0
- package/dist/types/components/index.d.ts +2 -1
- package/dist/types/index.d.ts +3 -0
- package/dist/types/modules/scope/GlobalScopeFilter.d.ts +2 -0
- package/dist/types/modules/scope/business/branch/instance.d.ts +12 -0
- package/dist/types/modules/scope/business/branch/store.d.ts +22 -0
- package/dist/types/modules/scope/business/branch/type.d.ts +32 -0
- package/dist/types/modules/scope/business/division/instance.d.ts +12 -0
- package/dist/types/modules/scope/business/division/store.d.ts +57 -0
- package/dist/types/modules/scope/business/division/type.d.ts +15 -0
- package/dist/types/modules/scope/business/organization/instance.d.ts +12 -0
- package/dist/types/modules/scope/business/organization/store.d.ts +83 -0
- package/dist/types/modules/scope/business/organization/type.d.ts +29 -0
- package/dist/types/modules/scope/business/team/instance.d.ts +18 -0
- package/dist/types/modules/scope/business/team/store.d.ts +22 -0
- package/dist/types/modules/scope/business/team/type.d.ts +29 -0
- package/dist/types/modules/scope/business/user/instance.d.ts +12 -0
- package/dist/types/modules/scope/business/user/store.d.ts +22 -0
- package/dist/types/modules/scope/business/user/type.d.ts +22 -0
- package/dist/types/modules/scope/index.d.ts +14 -0
- package/dist/types/modules/scope/scopedClient.d.ts +3 -0
- package/dist/types/modules/scope/type.d.ts +8 -0
- package/package.json +3 -2
@@ -0,0 +1,33 @@
|
|
1
|
+
import { Metadata } from '../../types';
|
2
|
+
export type User = {
|
3
|
+
"__platform": string;
|
4
|
+
"__id": string;
|
5
|
+
"__domain": string;
|
6
|
+
"_active": true;
|
7
|
+
"_deleted": null;
|
8
|
+
"name": string;
|
9
|
+
"email": string;
|
10
|
+
"picture_url": string;
|
11
|
+
"gender": string;
|
12
|
+
"bio": string;
|
13
|
+
"last_login": string;
|
14
|
+
"telephone1": string;
|
15
|
+
"telephone2": string;
|
16
|
+
"date_birth": string;
|
17
|
+
"address": string;
|
18
|
+
"city": string;
|
19
|
+
"state": string;
|
20
|
+
"country": string;
|
21
|
+
"zip_code": string;
|
22
|
+
"def_language": string;
|
23
|
+
"def_timezone": string;
|
24
|
+
"def_currency": string;
|
25
|
+
"directory_name": string;
|
26
|
+
"directory_id": string;
|
27
|
+
} & Metadata;
|
28
|
+
export type Domain = {
|
29
|
+
email: string;
|
30
|
+
domain: string;
|
31
|
+
updated_by: string;
|
32
|
+
updated_at: string;
|
33
|
+
};
|
@@ -0,0 +1,24 @@
|
|
1
|
+
import { ComputedRef, Ref } from 'vue';
|
2
|
+
import { Domain, User } from './type';
|
3
|
+
import { Scope } from '../../types/api/instance';
|
4
|
+
export type UseSession = {
|
5
|
+
domain: Readonly<string>;
|
6
|
+
environment: Readonly<string>;
|
7
|
+
} & Scope;
|
8
|
+
export default function useSession(): {
|
9
|
+
__init__: () => Promise<void>;
|
10
|
+
user: Ref<User | null, User | null>;
|
11
|
+
domain: unknown;
|
12
|
+
userDomains: Ref<Domain[] | null, Domain[] | null>;
|
13
|
+
setEnv: (newEnv: string) => void;
|
14
|
+
setScope: (newScope: Scope | null) => void;
|
15
|
+
session: ComputedRef<{
|
16
|
+
domain: Readonly<string>;
|
17
|
+
environment: Readonly<string>;
|
18
|
+
} & {
|
19
|
+
scope_type?: "org" | "team" | "shared" | "user" | "";
|
20
|
+
organization?: string;
|
21
|
+
team?: string;
|
22
|
+
}>;
|
23
|
+
scope: ComputedRef<Scope>;
|
24
|
+
};
|
File without changes
|
@@ -0,0 +1,12 @@
|
|
1
|
+
import { AxiosInstance } from 'axios';
|
2
|
+
import { HTTP_RequestConfig } from '../utils/HttpCore';
|
3
|
+
declare const coreClient: () => AxiosInstance;
|
4
|
+
export declare const client: {
|
5
|
+
request<T>({ url, method, header, body, baseURL, }: HTTP_RequestConfig<T> & {
|
6
|
+
baseURL?: string;
|
7
|
+
}): Promise<T>;
|
8
|
+
rawRequest({ url, method, header, body, baseURL, }: HTTP_RequestConfig<any> & {
|
9
|
+
baseURL?: string;
|
10
|
+
}): Promise<any>;
|
11
|
+
};
|
12
|
+
export default coreClient;
|
@@ -18,9 +18,10 @@ import { default as JTextArea } from './form/JTextArea';
|
|
18
18
|
import { default as JForm } from './form/JForm';
|
19
19
|
import { default as TabFormHeader } from './form/headless/TabFormHeader';
|
20
20
|
import { default as FormHeadless } from './form/headless/FormHeadless';
|
21
|
+
import { default as GlobalScopeFilter } from '../modules/scope/GlobalScopeFilter';
|
21
22
|
import { default as SpinnerLoader } from './spinner/SpinnerLoader';
|
22
23
|
import { TablerIcons } from './icon/tabler';
|
23
|
-
export { UiTable, ConfirmDialog, CopyButton, DotsMenu, FormMetadata, JBtn, DeleteButton, EditButton, JDialog, JIconBtn, JSelect, JTextArea, JTextField, JForm, TabFormHeader, FormHeadless, TablerIcons, ParentCard, ColumnSettingsDialog, SpinnerLoader, ContextMenu, JAvatar, AvatarPicture, };
|
24
|
+
export { UiTable, ConfirmDialog, CopyButton, DotsMenu, FormMetadata, JBtn, DeleteButton, EditButton, JDialog, JIconBtn, JSelect, JTextArea, JTextField, JForm, TabFormHeader, FormHeadless, TablerIcons, ParentCard, ColumnSettingsDialog, SpinnerLoader, ContextMenu, JAvatar, AvatarPicture, GlobalScopeFilter };
|
24
25
|
declare const _default: {
|
25
26
|
IconSet: import('vue').DefineComponent<{
|
26
27
|
item: import('..').IconType | string;
|
package/dist/types/index.d.ts
CHANGED
@@ -3,8 +3,11 @@ declare const _default: {
|
|
3
3
|
install: (app: App) => void;
|
4
4
|
};
|
5
5
|
export default _default;
|
6
|
+
export * from './_auth';
|
7
|
+
export * from './api/coreClient';
|
6
8
|
export * from './components';
|
7
9
|
export * from './composables';
|
8
10
|
export * from './constants';
|
9
11
|
export * from './utils';
|
10
12
|
export * from './types';
|
13
|
+
export * from './modules/scope';
|
@@ -0,0 +1,2 @@
|
|
1
|
+
declare const _default: import('vue').DefineComponent<{}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
2
|
+
export default _default;
|
@@ -0,0 +1,12 @@
|
|
1
|
+
import { Branch } from './type';
|
2
|
+
import { AxiosResponse } from 'axios';
|
3
|
+
export type branchInstanceType = {
|
4
|
+
getBranchList: (query?: string) => Promise<Branch[] | void>;
|
5
|
+
createBranch: (newBranch: Branch) => Promise<AxiosResponse<Branch> | void>;
|
6
|
+
updateBranch: (branchUpdate: Branch) => Promise<AxiosResponse<Branch> | void>;
|
7
|
+
getBranch: (id: Branch['__id']) => Promise<Branch | void>;
|
8
|
+
activateBranch: (id: Branch['__id']) => Promise<void>;
|
9
|
+
deactivateBranch: (id: Branch['__id']) => Promise<void>;
|
10
|
+
};
|
11
|
+
declare const branchInstance: branchInstanceType;
|
12
|
+
export default branchInstance;
|
@@ -0,0 +1,22 @@
|
|
1
|
+
import { Ref } from 'vue';
|
2
|
+
import { Branch } from './type';
|
3
|
+
import { Team } from '../team/type';
|
4
|
+
import { UiTableHeader } from '../../../../types';
|
5
|
+
export declare const useBranchStore: () => {
|
6
|
+
data: Ref<Branch[], Branch[]>;
|
7
|
+
columns: Ref<UiTableHeader[], UiTableHeader[]>;
|
8
|
+
item: Ref<Branch | null, Branch | null>;
|
9
|
+
loading: Ref<boolean, boolean>;
|
10
|
+
__init__: (query?: string) => Promise<void>;
|
11
|
+
getData: (query?: string) => Promise<Branch[]>;
|
12
|
+
filterData: (query: string) => Branch[];
|
13
|
+
setColumns: (cols: UiTableHeader[]) => void;
|
14
|
+
setItem: (newItem: Branch) => void;
|
15
|
+
getItem: (id: string) => Promise<void | Branch>;
|
16
|
+
createItem: () => Promise<Branch | undefined>;
|
17
|
+
updateItem: () => Promise<import('axios').AxiosResponse<Branch, any> | undefined>;
|
18
|
+
removeItem: () => Promise<Branch | undefined>;
|
19
|
+
branchTeams: Ref<Team[], Team[]>;
|
20
|
+
linkTeam: (team: Team) => Promise<Team | undefined>;
|
21
|
+
unlinkTeam: (team: Team) => Promise<Team[] | undefined>;
|
22
|
+
};
|
@@ -0,0 +1,32 @@
|
|
1
|
+
import { Metadata } from '../../../../types';
|
2
|
+
export type Branch = Metadata & {
|
3
|
+
__id: string;
|
4
|
+
_active: boolean;
|
5
|
+
environment: string;
|
6
|
+
division: string;
|
7
|
+
organization: string | null;
|
8
|
+
name: string;
|
9
|
+
description: string;
|
10
|
+
business_type: string;
|
11
|
+
address__full: string;
|
12
|
+
address_street: string;
|
13
|
+
address_number: string;
|
14
|
+
address_complement: string;
|
15
|
+
address_zipcode: string;
|
16
|
+
address_state: string;
|
17
|
+
address_city: string;
|
18
|
+
address_country: string;
|
19
|
+
contact_name: string;
|
20
|
+
contact_phone: string;
|
21
|
+
contact_email: string;
|
22
|
+
business_hours: string;
|
23
|
+
date_foundation: Date;
|
24
|
+
total_employees: number;
|
25
|
+
total_value: number;
|
26
|
+
website_url: string;
|
27
|
+
comments: string;
|
28
|
+
created_by: string;
|
29
|
+
created_at: Date;
|
30
|
+
updated_by: string;
|
31
|
+
updated_at: Date;
|
32
|
+
};
|
@@ -0,0 +1,12 @@
|
|
1
|
+
import { Division } from './type';
|
2
|
+
import { AxiosResponse } from 'axios';
|
3
|
+
export type divisionInstanceType = {
|
4
|
+
getDivisionList: (query?: string) => Promise<Division[] | void>;
|
5
|
+
createDivision: (newDivision: Division) => Promise<AxiosResponse<Division> | void>;
|
6
|
+
updateDivision: (divisionUpdate: Division) => Promise<AxiosResponse<Division> | void>;
|
7
|
+
getDivision: (id: Division['__id']) => Promise<Division>;
|
8
|
+
activateDivision: (id: Division['__id']) => Promise<void>;
|
9
|
+
deactivateDivision: (id: Division['__id']) => Promise<void>;
|
10
|
+
};
|
11
|
+
declare const divisionInstance: divisionInstanceType;
|
12
|
+
export default divisionInstance;
|
@@ -0,0 +1,57 @@
|
|
1
|
+
import { Ref, ShallowRef } from 'vue';
|
2
|
+
import { UiTableHeader } from '../../../../types';
|
3
|
+
import { Division } from './type';
|
4
|
+
import { Organization } from '../organization/type';
|
5
|
+
export declare const useDivisionStore: () => {
|
6
|
+
data: Ref<Division[], Division[]>;
|
7
|
+
columns: Ref<UiTableHeader[], UiTableHeader[]>;
|
8
|
+
item: Ref<Division | null, Division | null>;
|
9
|
+
loading: Ref<boolean, boolean>;
|
10
|
+
__init__: (query?: string) => Promise<void>;
|
11
|
+
filterData: (query: string) => Division[];
|
12
|
+
getData: (query?: string) => Promise<Division[]>;
|
13
|
+
setColumns: (cols: UiTableHeader[]) => void;
|
14
|
+
setItem: (newItem: Division) => void;
|
15
|
+
getItem: (id: string) => Promise<Division>;
|
16
|
+
createItem: () => Promise<Division | undefined>;
|
17
|
+
updateItem: () => Promise<import('axios').AxiosResponse<Division, any> | undefined>;
|
18
|
+
removeItem: () => Promise<Division | undefined>;
|
19
|
+
orgs: ShallowRef<Organization[]>;
|
20
|
+
linkDivision: (org: Organization) => Promise<{
|
21
|
+
division: string;
|
22
|
+
created_by: import('vue').ComputedRef<string> | string;
|
23
|
+
created_at: import('vue').ComputedRef<string> | string;
|
24
|
+
delegated_at: import('vue').ComputedRef<string> | string;
|
25
|
+
delegated_by: import('vue').ComputedRef<string> | string;
|
26
|
+
updated_at: import('vue').ComputedRef<string> | string;
|
27
|
+
updated_by: import('vue').ComputedRef<string> | string;
|
28
|
+
modified_at?: import('vue').ComputedRef<string> | string;
|
29
|
+
modified_by?: import('vue').ComputedRef<string> | string;
|
30
|
+
__id: string;
|
31
|
+
_active: boolean;
|
32
|
+
name: string;
|
33
|
+
name_trade: string;
|
34
|
+
legal_id: string;
|
35
|
+
description: string;
|
36
|
+
segment: string;
|
37
|
+
business_type: string;
|
38
|
+
address__full: string;
|
39
|
+
address_street: string;
|
40
|
+
address_number: string;
|
41
|
+
address_complement: string;
|
42
|
+
address_zipcode: string;
|
43
|
+
address_state: string;
|
44
|
+
address_city: string;
|
45
|
+
address_country: string;
|
46
|
+
contact_name: string;
|
47
|
+
contact_phone: string;
|
48
|
+
contact_email: string;
|
49
|
+
business_hours: string;
|
50
|
+
total_employees: number;
|
51
|
+
total_value: number;
|
52
|
+
date_foundation: Date;
|
53
|
+
website_url: string;
|
54
|
+
comments: string;
|
55
|
+
} | undefined>;
|
56
|
+
unlinkDivision: (org: Organization) => Promise<Organization[] | undefined>;
|
57
|
+
};
|
@@ -0,0 +1,15 @@
|
|
1
|
+
import { Metadata } from '../../../../types';
|
2
|
+
export type Division = Metadata & {
|
3
|
+
__id: string;
|
4
|
+
__environment: string;
|
5
|
+
_active: boolean;
|
6
|
+
name: string;
|
7
|
+
description: string;
|
8
|
+
bio: string;
|
9
|
+
teams_number: number;
|
10
|
+
leader_email: string;
|
11
|
+
leader_position: string;
|
12
|
+
contact_phone: string;
|
13
|
+
contact_email: string;
|
14
|
+
comments: string;
|
15
|
+
};
|
@@ -0,0 +1,12 @@
|
|
1
|
+
import { Organization } from './type';
|
2
|
+
import { AxiosResponse } from 'axios';
|
3
|
+
export type orgInstanceType = {
|
4
|
+
getOrgList: (query?: string) => Promise<Organization[] | void>;
|
5
|
+
createOrg: (newOrg: Organization) => Promise<AxiosResponse<Organization> | void>;
|
6
|
+
updateOrg: (orgUpdate: Organization) => Promise<AxiosResponse<Organization> | void>;
|
7
|
+
getOrg: (id: Organization['__id']) => Promise<Organization>;
|
8
|
+
activateOrg: (id: Organization['__id']) => Promise<void>;
|
9
|
+
deactivateOrg: (id: Organization['__id']) => Promise<void>;
|
10
|
+
};
|
11
|
+
declare const orgInstance: orgInstanceType;
|
12
|
+
export default orgInstance;
|
@@ -0,0 +1,83 @@
|
|
1
|
+
import { Ref } from 'vue';
|
2
|
+
import { UiTableHeader } from '../../../../types';
|
3
|
+
import { Organization } from './type';
|
4
|
+
import { Team } from '../team/type';
|
5
|
+
import { Branch } from '../branch/type';
|
6
|
+
export declare const useOrganizationStore: () => {
|
7
|
+
data: Ref<Organization[], Organization[]>;
|
8
|
+
loading: Ref<boolean, boolean>;
|
9
|
+
columns: Ref<UiTableHeader[], UiTableHeader[]>;
|
10
|
+
item: Ref<Organization | null, Organization | null>;
|
11
|
+
filterData: (query: string) => Organization[];
|
12
|
+
__init__: (query?: string) => Promise<void>;
|
13
|
+
getData: (query?: string) => Promise<Organization[]>;
|
14
|
+
setColumns: (cols: UiTableHeader[]) => void;
|
15
|
+
setItem: (newItem: Organization) => void;
|
16
|
+
getItem: (id: string) => Promise<Organization>;
|
17
|
+
createItem: () => Promise<Organization | undefined>;
|
18
|
+
updateItem: () => Promise<Organization | undefined>;
|
19
|
+
removeItem: () => Promise<Organization | undefined>;
|
20
|
+
orgBranches: Ref<Branch[], Branch[]>;
|
21
|
+
orgTeams: Ref<Team[], Team[]>;
|
22
|
+
linkBranch: (branch: Branch) => Promise<{
|
23
|
+
organization: string;
|
24
|
+
created_by: string | (import('vue').ComputedRef<string> & string);
|
25
|
+
created_at: (string | import('vue').ComputedRef<string>) & Date;
|
26
|
+
delegated_at: import('vue').ComputedRef<string> | string;
|
27
|
+
delegated_by: import('vue').ComputedRef<string> | string;
|
28
|
+
updated_at: (string | import('vue').ComputedRef<string>) & Date;
|
29
|
+
updated_by: string | (import('vue').ComputedRef<string> & string);
|
30
|
+
modified_at?: import('vue').ComputedRef<string> | string;
|
31
|
+
modified_by?: import('vue').ComputedRef<string> | string;
|
32
|
+
__id: string;
|
33
|
+
_active: boolean;
|
34
|
+
environment: string;
|
35
|
+
division: string;
|
36
|
+
name: string;
|
37
|
+
description: string;
|
38
|
+
business_type: string;
|
39
|
+
address__full: string;
|
40
|
+
address_street: string;
|
41
|
+
address_number: string;
|
42
|
+
address_complement: string;
|
43
|
+
address_zipcode: string;
|
44
|
+
address_state: string;
|
45
|
+
address_city: string;
|
46
|
+
address_country: string;
|
47
|
+
contact_name: string;
|
48
|
+
contact_phone: string;
|
49
|
+
contact_email: string;
|
50
|
+
business_hours: string;
|
51
|
+
date_foundation: Date;
|
52
|
+
total_employees: number;
|
53
|
+
total_value: number;
|
54
|
+
website_url: string;
|
55
|
+
comments: string;
|
56
|
+
} | undefined>;
|
57
|
+
unlinkBranch: (branch: Branch) => Promise<Branch[] | undefined>;
|
58
|
+
linkTeam: (team: Team) => Promise<{
|
59
|
+
organization: string;
|
60
|
+
created_by: string | (import('vue').ComputedRef<string> & string);
|
61
|
+
created_at: (string | import('vue').ComputedRef<string>) & Date;
|
62
|
+
delegated_at: import('vue').ComputedRef<string> | string;
|
63
|
+
delegated_by: import('vue').ComputedRef<string> | string;
|
64
|
+
updated_at: (string | import('vue').ComputedRef<string>) & Date;
|
65
|
+
updated_by: string | (import('vue').ComputedRef<string> & string);
|
66
|
+
modified_at?: import('vue').ComputedRef<string> | string;
|
67
|
+
modified_by?: import('vue').ComputedRef<string> | string;
|
68
|
+
__id: string;
|
69
|
+
__environment: string;
|
70
|
+
division: string;
|
71
|
+
branch: string | null;
|
72
|
+
_active: boolean;
|
73
|
+
name: string;
|
74
|
+
description: string;
|
75
|
+
bio: string;
|
76
|
+
owner: string;
|
77
|
+
total_member: number;
|
78
|
+
total_project: number;
|
79
|
+
total_budget: number;
|
80
|
+
comments: string;
|
81
|
+
} | undefined>;
|
82
|
+
unlinkTeam: (team: Team) => Promise<Team[] | undefined>;
|
83
|
+
};
|
@@ -0,0 +1,29 @@
|
|
1
|
+
import { Metadata } from '../../../../types';
|
2
|
+
export type Organization = Metadata & {
|
3
|
+
__id: string;
|
4
|
+
division: string | null;
|
5
|
+
_active: boolean;
|
6
|
+
name: string;
|
7
|
+
name_trade: string;
|
8
|
+
legal_id: string;
|
9
|
+
description: string;
|
10
|
+
segment: string;
|
11
|
+
business_type: string;
|
12
|
+
address__full: string;
|
13
|
+
address_street: string;
|
14
|
+
address_number: string;
|
15
|
+
address_complement: string;
|
16
|
+
address_zipcode: string;
|
17
|
+
address_state: string;
|
18
|
+
address_city: string;
|
19
|
+
address_country: string;
|
20
|
+
contact_name: string;
|
21
|
+
contact_phone: string;
|
22
|
+
contact_email: string;
|
23
|
+
business_hours: string;
|
24
|
+
total_employees: number;
|
25
|
+
total_value: number;
|
26
|
+
date_foundation: Date;
|
27
|
+
website_url: string;
|
28
|
+
comments: string;
|
29
|
+
};
|
@@ -0,0 +1,18 @@
|
|
1
|
+
import { AxiosResponse } from 'axios';
|
2
|
+
import { Team, TeamUser } from './type';
|
3
|
+
import { ManageUser } from '../user/type';
|
4
|
+
export type teamInstanceType = {
|
5
|
+
getTeamList(query?: string): Promise<Team[] | void>;
|
6
|
+
createTeam(newTeam: Team): Promise<AxiosResponse<Team> | void>;
|
7
|
+
updateTeam(teamUpdate: Team): Promise<AxiosResponse<Team> | void>;
|
8
|
+
getTeam(id: Team['__id']): Promise<Team | void>;
|
9
|
+
activateTeam(id: Team['__id']): Promise<void>;
|
10
|
+
deactivateTeam(id: Team['__id']): Promise<void>;
|
11
|
+
getTeamUserList(team_id: Team['__id'], query?: string): Promise<ManageUser[] | void>;
|
12
|
+
linkManageUser(team_id: Team['__id'], newUser: TeamUser): Promise<TeamUser | void>;
|
13
|
+
updateManageUser(team_id: Team['__id'], userUpdate: ManageUser): Promise<AxiosResponse<ManageUser> | void>;
|
14
|
+
getManageUser(team_id: Team['__id'], id: ManageUser['__id'], query?: string): Promise<ManageUser | void>;
|
15
|
+
unlinkManageUser(team_id: Team['__id'], id: ManageUser['__id'], query?: string): Promise<void>;
|
16
|
+
};
|
17
|
+
declare const teamInstance: teamInstanceType;
|
18
|
+
export default teamInstance;
|
@@ -0,0 +1,22 @@
|
|
1
|
+
import { Ref } from 'vue';
|
2
|
+
import { Team, TeamUser } from './type';
|
3
|
+
import { UiTableHeader } from '../../../../types';
|
4
|
+
import { ManageUser } from '../user/type';
|
5
|
+
export declare const useTeamStore: () => {
|
6
|
+
data: Ref<Team[], Team[]>;
|
7
|
+
loading: Ref<boolean, boolean>;
|
8
|
+
columns: Ref<UiTableHeader[], UiTableHeader[]>;
|
9
|
+
item: Ref<Team | null, Team | null>;
|
10
|
+
usersTeam: Ref<ManageUser[], ManageUser[]>;
|
11
|
+
__init__: (query?: string) => Promise<void>;
|
12
|
+
getData: (query?: string) => Promise<Team[]>;
|
13
|
+
filterData: (query: string) => Team[];
|
14
|
+
setColumns: (cols: UiTableHeader[]) => void;
|
15
|
+
setItem: (newItem: Team) => void;
|
16
|
+
getItem: (id: string) => Promise<void | Team>;
|
17
|
+
createItem: () => Promise<Team | undefined>;
|
18
|
+
updateItem: () => Promise<Team | undefined>;
|
19
|
+
removeItem: () => Promise<Team | undefined>;
|
20
|
+
linkUser: (user: ManageUser) => Promise<TeamUser | void>;
|
21
|
+
unlinkUser: (userId: string) => Promise<ManageUser[] | undefined>;
|
22
|
+
};
|
@@ -0,0 +1,29 @@
|
|
1
|
+
import { Metadata } from '../../../../types';
|
2
|
+
import { ManageUser } from '../user/type';
|
3
|
+
export type Team = Metadata & {
|
4
|
+
__id: string;
|
5
|
+
__environment: string;
|
6
|
+
division: string;
|
7
|
+
organization: string | null;
|
8
|
+
branch: string | null;
|
9
|
+
_active: boolean;
|
10
|
+
name: string;
|
11
|
+
description: string;
|
12
|
+
bio: string;
|
13
|
+
owner: string;
|
14
|
+
total_member: number;
|
15
|
+
total_project: number;
|
16
|
+
total_budget: number;
|
17
|
+
comments: string;
|
18
|
+
created_by: string;
|
19
|
+
created_at: Date;
|
20
|
+
updated_by: string;
|
21
|
+
updated_at: Date;
|
22
|
+
};
|
23
|
+
export type TeamUser = {
|
24
|
+
team: Team['__id'];
|
25
|
+
user: ManageUser['__id'];
|
26
|
+
role: string;
|
27
|
+
joined_at: string;
|
28
|
+
comments: string;
|
29
|
+
};
|
@@ -0,0 +1,12 @@
|
|
1
|
+
import { ManageUser } from './type';
|
2
|
+
import { AxiosResponse } from 'axios';
|
3
|
+
export type ManageUserType = {
|
4
|
+
getManageUserList(query?: string): Promise<ManageUser[] | void>;
|
5
|
+
createManageUser(newManageUser: ManageUser): Promise<AxiosResponse<ManageUser> | void>;
|
6
|
+
updateManageUser(branchUpdate: ManageUser): Promise<AxiosResponse<ManageUser> | void>;
|
7
|
+
getManageUser(id: ManageUser['__id']): Promise<ManageUser | void>;
|
8
|
+
activateManageUser(id: ManageUser['__id']): Promise<void>;
|
9
|
+
deactivateManageUser(id: ManageUser['__id']): Promise<void>;
|
10
|
+
};
|
11
|
+
declare const manageUserInstance: ManageUserType;
|
12
|
+
export default manageUserInstance;
|
@@ -0,0 +1,22 @@
|
|
1
|
+
import { Ref } from 'vue';
|
2
|
+
import { UiTableHeader } from '../../../../types';
|
3
|
+
import { ManageUser } from './type';
|
4
|
+
import { Organization } from '../organization/type';
|
5
|
+
import { Team } from '../team/type';
|
6
|
+
export declare const useManageUserStore: () => {
|
7
|
+
data: Ref<ManageUser[], ManageUser[]>;
|
8
|
+
loading: Ref<boolean, boolean>;
|
9
|
+
columns: Ref<UiTableHeader[], UiTableHeader[]>;
|
10
|
+
item: Ref<ManageUser | null, ManageUser | null>;
|
11
|
+
filterData: (query: string) => ManageUser[];
|
12
|
+
__init__: (query?: string) => Promise<void>;
|
13
|
+
getData: (query?: string) => Promise<ManageUser[]>;
|
14
|
+
setColumns: (cols: UiTableHeader[]) => void;
|
15
|
+
setItem: (newItem: ManageUser) => void;
|
16
|
+
getItem: (id: string) => Promise<void | ManageUser>;
|
17
|
+
createItem: () => Promise<ManageUser | undefined>;
|
18
|
+
updateItem: () => Promise<ManageUser | undefined>;
|
19
|
+
removeItem: () => Promise<ManageUser | undefined>;
|
20
|
+
userOrg: Ref<Organization | null, Organization | null>;
|
21
|
+
userTeams: Ref<Team[], Team[]>;
|
22
|
+
};
|
@@ -0,0 +1,22 @@
|
|
1
|
+
import { Metadata } from '../../../../types';
|
2
|
+
export type ManageUser = Metadata & {
|
3
|
+
__id: string;
|
4
|
+
_active: true;
|
5
|
+
name: string;
|
6
|
+
status: string;
|
7
|
+
email: string;
|
8
|
+
bio: string;
|
9
|
+
last_login: string;
|
10
|
+
telephone1: string;
|
11
|
+
telephone2: string;
|
12
|
+
date_birth: string;
|
13
|
+
date_registration: string;
|
14
|
+
job_title: string;
|
15
|
+
address: string;
|
16
|
+
zip_code: string;
|
17
|
+
state: string;
|
18
|
+
city: string;
|
19
|
+
country: string;
|
20
|
+
comments: string;
|
21
|
+
additionalProp1: {};
|
22
|
+
};
|
@@ -0,0 +1,14 @@
|
|
1
|
+
import { useBranchStore } from './business/branch/store';
|
2
|
+
import { useTeamStore } from './business/team/store';
|
3
|
+
import { useDivisionStore } from './business/division/store';
|
4
|
+
import { useOrganizationStore } from './business/organization/store';
|
5
|
+
import { useManageUserStore } from './business/user/store';
|
6
|
+
import { default as branchInstance } from './business/branch/instance';
|
7
|
+
import { default as divisionInstance } from './business/division/instance';
|
8
|
+
import { default as orgInstance } from './business/organization/instance';
|
9
|
+
import { default as teamInstance } from './business/team/instance';
|
10
|
+
import { default as manageUserInstance } from './business/user/instance';
|
11
|
+
import { default as scopedClient } from './scopedClient';
|
12
|
+
export { divisionInstance, orgInstance, branchInstance, teamInstance, manageUserInstance, };
|
13
|
+
export { useDivisionStore, useOrganizationStore, useBranchStore, useTeamStore, useManageUserStore, };
|
14
|
+
export { scopedClient };
|
@@ -0,0 +1,8 @@
|
|
1
|
+
import { AxiosInstance } from 'axios';
|
2
|
+
import { Scope } from '../../types/api/instance';
|
3
|
+
import { Ref } from 'vue';
|
4
|
+
export type InstanceScoped = AxiosInstance & {
|
5
|
+
setScope: (scope: Scope) => void;
|
6
|
+
scope: Readonly<Ref<Scope | null>>;
|
7
|
+
};
|
8
|
+
export type Instance<T> = InstanceScoped & T;
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "jplan-pack",
|
3
|
-
"version": "0.
|
3
|
+
"version": "0.5.01",
|
4
4
|
"main": "./dist/jplan-pack.cjs.js",
|
5
5
|
"module": "./dist/jplan-pack.es.js",
|
6
6
|
"types": "dist/types/index.d.ts",
|
@@ -40,9 +40,11 @@
|
|
40
40
|
"vue-toastification": "^2.0.0-rc.5"
|
41
41
|
},
|
42
42
|
"peerDependencies": {
|
43
|
+
"@types/node": "^22.13.0",
|
43
44
|
"@mdi/font": "^7.4.47",
|
44
45
|
"@vueuse/core": "^11.2.0",
|
45
46
|
"vue": "^3.5.13",
|
47
|
+
"vue-router": "^4.5.0",
|
46
48
|
"vuetify": "^3.7.4"
|
47
49
|
},
|
48
50
|
"devDependencies": {
|
@@ -55,7 +57,6 @@
|
|
55
57
|
"@storybook/vue3": "^8.6.0",
|
56
58
|
"@storybook/vue3-vite": "^8.6.0",
|
57
59
|
"@types/lodash": "^4.17.15",
|
58
|
-
"@types/node": "^20.3.3",
|
59
60
|
"rimraf": "^5.0.1",
|
60
61
|
"sass": "^1.63.6",
|
61
62
|
"storybook": "^8.6.0",
|