@silexpert/core 1.2.20 → 1.2.21
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/cjs/api/resources/HumanResourceLibrary.d.ts +13 -0
- package/dist/cjs/api/resources/HumanResourceLibrary.d.ts.map +1 -0
- package/dist/cjs/api/resources/HumanResourceLibrary.js +38 -0
- package/dist/cjs/api/resources/HumanResourceLibrary.js.map +1 -0
- package/dist/cjs/api/resources.d.ts +2 -0
- package/dist/cjs/api/resources.d.ts.map +1 -1
- package/dist/cjs/api/resources.js +2 -0
- package/dist/cjs/api/resources.js.map +1 -1
- package/dist/cjs/types/Enum/DocumentForHumanResourceType.d.ts +15 -0
- package/dist/cjs/types/Enum/DocumentForHumanResourceType.d.ts.map +1 -0
- package/dist/cjs/types/Enum/DocumentForHumanResourceType.js +25 -0
- package/dist/cjs/types/Enum/DocumentForHumanResourceType.js.map +1 -0
- package/dist/cjs/types/Interface/api/humanResourceLibrary/CreateHumanResourceLibrary.d.ts +12 -0
- package/dist/cjs/types/Interface/api/humanResourceLibrary/CreateHumanResourceLibrary.d.ts.map +1 -0
- package/dist/cjs/types/Interface/api/humanResourceLibrary/CreateHumanResourceLibrary.js +66 -0
- package/dist/cjs/types/Interface/api/humanResourceLibrary/CreateHumanResourceLibrary.js.map +1 -0
- package/dist/cjs/types/Interface/api/humanResourceLibrary/CreateUserHumanResourceLibrary.d.ts +5 -0
- package/dist/cjs/types/Interface/api/humanResourceLibrary/CreateUserHumanResourceLibrary.d.ts.map +1 -0
- package/dist/cjs/types/Interface/api/humanResourceLibrary/CreateUserHumanResourceLibrary.js +28 -0
- package/dist/cjs/types/Interface/api/humanResourceLibrary/CreateUserHumanResourceLibrary.js.map +1 -0
- package/dist/cjs/types/Interface/api/humanResourceLibrary/QueryHumanResourceLibrary.d.ts +4 -0
- package/dist/cjs/types/Interface/api/humanResourceLibrary/QueryHumanResourceLibrary.d.ts.map +1 -0
- package/dist/cjs/types/Interface/api/humanResourceLibrary/QueryHumanResourceLibrary.js +23 -0
- package/dist/cjs/types/Interface/api/humanResourceLibrary/QueryHumanResourceLibrary.js.map +1 -0
- package/dist/cjs/types/Interface/api/humanResourceLibrary/QueryPaginatedHumanResourceLibrary.d.ts +13 -0
- package/dist/cjs/types/Interface/api/humanResourceLibrary/QueryPaginatedHumanResourceLibrary.d.ts.map +1 -0
- package/dist/cjs/types/Interface/api/humanResourceLibrary/QueryPaginatedHumanResourceLibrary.js +71 -0
- package/dist/cjs/types/Interface/api/humanResourceLibrary/QueryPaginatedHumanResourceLibrary.js.map +1 -0
- package/dist/cjs/types/Interface/models/IHumanResourceLibrary.d.ts +22 -0
- package/dist/cjs/types/Interface/models/IHumanResourceLibrary.d.ts.map +1 -0
- package/dist/cjs/types/Interface/models/IHumanResourceLibrary.js +3 -0
- package/dist/cjs/types/Interface/models/IHumanResourceLibrary.js.map +1 -0
- package/dist/cjs/types/Interface/models/IUserHumanResourceLibrary.d.ts +13 -0
- package/dist/cjs/types/Interface/models/IUserHumanResourceLibrary.d.ts.map +1 -0
- package/dist/cjs/types/Interface/models/IUserHumanResourceLibrary.js +3 -0
- package/dist/cjs/types/Interface/models/IUserHumanResourceLibrary.js.map +1 -0
- package/dist/cjs/types/index.d.ts +7 -0
- package/dist/cjs/types/index.d.ts.map +1 -1
- package/dist/cjs/types/index.js +7 -0
- package/dist/cjs/types/index.js.map +1 -1
- package/dist/mjs/api/resources/HumanResourceLibrary.d.ts +13 -0
- package/dist/mjs/api/resources/HumanResourceLibrary.d.ts.map +1 -0
- package/dist/mjs/api/resources/HumanResourceLibrary.js +34 -0
- package/dist/mjs/api/resources/HumanResourceLibrary.js.map +1 -0
- package/dist/mjs/api/resources.d.ts +2 -0
- package/dist/mjs/api/resources.d.ts.map +1 -1
- package/dist/mjs/api/resources.js +2 -0
- package/dist/mjs/api/resources.js.map +1 -1
- package/dist/mjs/types/Enum/DocumentForHumanResourceType.d.ts +15 -0
- package/dist/mjs/types/Enum/DocumentForHumanResourceType.d.ts.map +1 -0
- package/dist/mjs/types/Enum/DocumentForHumanResourceType.js +22 -0
- package/dist/mjs/types/Enum/DocumentForHumanResourceType.js.map +1 -0
- package/dist/mjs/types/Interface/api/humanResourceLibrary/CreateHumanResourceLibrary.d.ts +12 -0
- package/dist/mjs/types/Interface/api/humanResourceLibrary/CreateHumanResourceLibrary.d.ts.map +1 -0
- package/dist/mjs/types/Interface/api/humanResourceLibrary/CreateHumanResourceLibrary.js +70 -0
- package/dist/mjs/types/Interface/api/humanResourceLibrary/CreateHumanResourceLibrary.js.map +1 -0
- package/dist/mjs/types/Interface/api/humanResourceLibrary/CreateUserHumanResourceLibrary.d.ts +5 -0
- package/dist/mjs/types/Interface/api/humanResourceLibrary/CreateUserHumanResourceLibrary.d.ts.map +1 -0
- package/dist/mjs/types/Interface/api/humanResourceLibrary/CreateUserHumanResourceLibrary.js +26 -0
- package/dist/mjs/types/Interface/api/humanResourceLibrary/CreateUserHumanResourceLibrary.js.map +1 -0
- package/dist/mjs/types/Interface/api/humanResourceLibrary/QueryHumanResourceLibrary.d.ts +4 -0
- package/dist/mjs/types/Interface/api/humanResourceLibrary/QueryHumanResourceLibrary.d.ts.map +1 -0
- package/dist/mjs/types/Interface/api/humanResourceLibrary/QueryHumanResourceLibrary.js +20 -0
- package/dist/mjs/types/Interface/api/humanResourceLibrary/QueryHumanResourceLibrary.js.map +1 -0
- package/dist/mjs/types/Interface/api/humanResourceLibrary/QueryPaginatedHumanResourceLibrary.d.ts +13 -0
- package/dist/mjs/types/Interface/api/humanResourceLibrary/QueryPaginatedHumanResourceLibrary.d.ts.map +1 -0
- package/dist/mjs/types/Interface/api/humanResourceLibrary/QueryPaginatedHumanResourceLibrary.js +75 -0
- package/dist/mjs/types/Interface/api/humanResourceLibrary/QueryPaginatedHumanResourceLibrary.js.map +1 -0
- package/dist/mjs/types/Interface/models/IHumanResourceLibrary.d.ts +22 -0
- package/dist/mjs/types/Interface/models/IHumanResourceLibrary.d.ts.map +1 -0
- package/dist/mjs/types/Interface/models/IHumanResourceLibrary.js +2 -0
- package/dist/mjs/types/Interface/models/IHumanResourceLibrary.js.map +1 -0
- package/dist/mjs/types/Interface/models/IUserHumanResourceLibrary.d.ts +13 -0
- package/dist/mjs/types/Interface/models/IUserHumanResourceLibrary.d.ts.map +1 -0
- package/dist/mjs/types/Interface/models/IUserHumanResourceLibrary.js +2 -0
- package/dist/mjs/types/Interface/models/IUserHumanResourceLibrary.js.map +1 -0
- package/dist/mjs/types/index.d.ts +7 -0
- package/dist/mjs/types/index.d.ts.map +1 -1
- package/dist/mjs/types/index.js +7 -0
- package/dist/mjs/types/index.js.map +1 -1
- package/package.json +1 -1
- package/ts/api/resources/HumanResourceLibrary.ts +43 -0
- package/ts/api/resources.ts +2 -0
- package/ts/types/Enum/DocumentForHumanResourceType.ts +21 -0
- package/ts/types/Interface/api/humanResourceLibrary/CreateHumanResourceLibrary.ts +44 -0
- package/ts/types/Interface/api/humanResourceLibrary/CreateUserHumanResourceLibrary.ts +13 -0
- package/ts/types/Interface/api/humanResourceLibrary/QueryHumanResourceLibrary.ts +11 -0
- package/ts/types/Interface/api/humanResourceLibrary/QueryPaginatedHumanResourceLibrary.ts +54 -0
- package/ts/types/Interface/models/IHumanResourceLibrary.ts +25 -0
- package/ts/types/Interface/models/IUserHumanResourceLibrary.ts +16 -0
- package/ts/types/index.ts +8 -0
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { Resource } from '../Resource';
|
|
2
|
+
import { BasePaginate, CreateHumanResourceLibrary, CreateUserHumanResourceLibrary, IHumanResourceLibrary, IUserHumanResourceLibrary, QueryHumanResourceLibrary, QueryPaginatedHumanResourceLibrary } from '../../types';
|
|
3
|
+
|
|
4
|
+
export class HumanResourceLibrary extends Resource {
|
|
5
|
+
|
|
6
|
+
create(payload: CreateHumanResourceLibrary): Promise<IHumanResourceLibrary> {
|
|
7
|
+
return this.axios.$post('/library-rh', payload, { headers: { 'Content-Type': 'multipart/form-data' } });
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
download(params: QueryHumanResourceLibrary): Promise<Blob> {
|
|
11
|
+
return this.axios.$get('library-rh/buffer', {
|
|
12
|
+
params,
|
|
13
|
+
responseType: 'arraybuffer',
|
|
14
|
+
headers: {
|
|
15
|
+
Accept: 'application/pdf',
|
|
16
|
+
},
|
|
17
|
+
});
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
public getAllHistory(id: number): Promise<IUserHumanResourceLibrary[]> {
|
|
21
|
+
return this.axios.$get(`/library-rh/history/${id}`);
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
public validate(payload: CreateUserHumanResourceLibrary): Promise<IUserHumanResourceLibrary> {
|
|
25
|
+
return this.axios.$post('/library-rh/user/validate', payload);
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
public update(id: number, params: Partial<IHumanResourceLibrary>): Promise<boolean> {
|
|
29
|
+
return this.axios.$put(`/library-rh/${id}`, { ...params });
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
public getPaginate(params: QueryPaginatedHumanResourceLibrary): Promise<BasePaginate<IHumanResourceLibrary>> {
|
|
33
|
+
return this.axios.$get('/library-rh/paginate', { params });
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
public get(id: number): Promise<IHumanResourceLibrary> {
|
|
37
|
+
return this.axios.$get(`/library-rh/${id}`);
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
public delete(id: number): Promise<boolean> {
|
|
41
|
+
return this.axios.$delete(`/library-rh/${id}`);
|
|
42
|
+
}
|
|
43
|
+
}
|
package/ts/api/resources.ts
CHANGED
|
@@ -169,6 +169,7 @@ import { JuridicalMission } from './resources/JuridicalMission';
|
|
|
169
169
|
import { PrestationComplementary } from './resources/PrestationComplementary';
|
|
170
170
|
import { PrevisionalForm } from './resources/PrevisionalForm';
|
|
171
171
|
import { Refund } from './resources/Refund';
|
|
172
|
+
import { HumanResourceLibrary } from './resources/HumanResourceLibrary';
|
|
172
173
|
|
|
173
174
|
export const resources = {
|
|
174
175
|
simulation: Simulation,
|
|
@@ -342,4 +343,5 @@ export const resources = {
|
|
|
342
343
|
prestationComplementary: PrestationComplementary,
|
|
343
344
|
previsionalForm: PrevisionalForm,
|
|
344
345
|
refund: Refund,
|
|
346
|
+
humanResourceLibrary: HumanResourceLibrary,
|
|
345
347
|
};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
export enum DocumentForHumanResourceType {
|
|
2
|
+
NOTE_SERVICE = 1,
|
|
3
|
+
SUPPORT_FORMATION = 2,
|
|
4
|
+
PLAN_PARKING = 3,
|
|
5
|
+
LIVRET_ACCUEIL = 4,
|
|
6
|
+
FICHE_COOPTATION = 5,
|
|
7
|
+
FICHE_POSTE = 6,
|
|
8
|
+
REGLEMENT_INTERIEUR = 7,
|
|
9
|
+
AUTRES = 8,
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
export const DocumentForHumanResourcesList = [
|
|
13
|
+
{ value: DocumentForHumanResourceType.NOTE_SERVICE, text: 'Note de service' },
|
|
14
|
+
{ value: DocumentForHumanResourceType.SUPPORT_FORMATION, text: 'Suport de formation' },
|
|
15
|
+
{ value: DocumentForHumanResourceType.PLAN_PARKING, text: 'Plan du parking' },
|
|
16
|
+
{ value: DocumentForHumanResourceType.LIVRET_ACCUEIL, text: 'Livret d\'accueil' },
|
|
17
|
+
{ value: DocumentForHumanResourceType.FICHE_COOPTATION, text: 'Fiche cooptation' },
|
|
18
|
+
{ value: DocumentForHumanResourceType.FICHE_POSTE, text: 'Fiche de poste' },
|
|
19
|
+
{ value: DocumentForHumanResourceType.REGLEMENT_INTERIEUR, text: 'Réglement intérieur' },
|
|
20
|
+
{ value: DocumentForHumanResourceType.AUTRES, text: 'Autres' },
|
|
21
|
+
];
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { IsBoolean, IsInt, IsOptional, IsString } from 'class-validator';
|
|
2
|
+
import { ApiProperty, ApiPropertyOptional } from '../../../../utils';
|
|
3
|
+
import { ToBoolean } from '../../../../utils/transforms/boolean.transform';
|
|
4
|
+
import { DocumentForHumanResourceType } from '../../../Enum/DocumentForHumanResourceType';
|
|
5
|
+
|
|
6
|
+
export class CreateHumanResourceLibrary {
|
|
7
|
+
@ApiPropertyOptional()
|
|
8
|
+
@IsOptional()
|
|
9
|
+
@IsInt()
|
|
10
|
+
idFile?: number;
|
|
11
|
+
|
|
12
|
+
@ApiProperty()
|
|
13
|
+
@IsInt()
|
|
14
|
+
idUserRh: number;
|
|
15
|
+
|
|
16
|
+
@ApiProperty()
|
|
17
|
+
@IsInt()
|
|
18
|
+
idDocumentType: DocumentForHumanResourceType;
|
|
19
|
+
|
|
20
|
+
@ApiProperty()
|
|
21
|
+
@IsString()
|
|
22
|
+
name: string;
|
|
23
|
+
|
|
24
|
+
@ApiPropertyOptional()
|
|
25
|
+
@IsOptional()
|
|
26
|
+
idRole?: number;
|
|
27
|
+
|
|
28
|
+
@ApiPropertyOptional()
|
|
29
|
+
@IsOptional()
|
|
30
|
+
@IsInt()
|
|
31
|
+
idUser?: number;
|
|
32
|
+
|
|
33
|
+
@ApiPropertyOptional()
|
|
34
|
+
@IsOptional()
|
|
35
|
+
@IsBoolean()
|
|
36
|
+
@ToBoolean()
|
|
37
|
+
visible?: boolean;
|
|
38
|
+
|
|
39
|
+
@ApiPropertyOptional()
|
|
40
|
+
@IsOptional()
|
|
41
|
+
@IsBoolean()
|
|
42
|
+
@ToBoolean()
|
|
43
|
+
shouldStoreForAllRoles?: boolean;
|
|
44
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { IsInt } from 'class-validator';
|
|
2
|
+
import { ApiProperty } from '../../../../utils';
|
|
3
|
+
|
|
4
|
+
export class CreateUserHumanResourceLibrary {
|
|
5
|
+
@ApiProperty()
|
|
6
|
+
@IsInt()
|
|
7
|
+
idHumanResourceLibrary?: number;
|
|
8
|
+
|
|
9
|
+
@ApiProperty()
|
|
10
|
+
@IsInt()
|
|
11
|
+
idUser: number;
|
|
12
|
+
|
|
13
|
+
}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import {
|
|
2
|
+
IsBoolean,
|
|
3
|
+
IsDate,
|
|
4
|
+
IsIn, IsInt, IsOptional, IsString,
|
|
5
|
+
} from 'class-validator';
|
|
6
|
+
import { ApiPropertyOptional } from '../../../../utils';
|
|
7
|
+
import { DocumentForHumanResourceType } from '../../../Enum/DocumentForHumanResourceType';
|
|
8
|
+
import { OptionalQueryPaginate } from '../BasePaginate';
|
|
9
|
+
|
|
10
|
+
export class QueryPaginatedHumanResourceLibrary extends OptionalQueryPaginate {
|
|
11
|
+
@ApiPropertyOptional()
|
|
12
|
+
@IsInt()
|
|
13
|
+
@IsOptional()
|
|
14
|
+
idUser?: number;
|
|
15
|
+
|
|
16
|
+
@ApiPropertyOptional()
|
|
17
|
+
@IsString()
|
|
18
|
+
@IsOptional()
|
|
19
|
+
search?: string;
|
|
20
|
+
|
|
21
|
+
@ApiPropertyOptional()
|
|
22
|
+
@IsInt()
|
|
23
|
+
@IsOptional()
|
|
24
|
+
idRole?: number;
|
|
25
|
+
|
|
26
|
+
@ApiPropertyOptional()
|
|
27
|
+
@IsInt()
|
|
28
|
+
@IsOptional()
|
|
29
|
+
idDocumentType?: DocumentForHumanResourceType;
|
|
30
|
+
|
|
31
|
+
@ApiPropertyOptional()
|
|
32
|
+
@IsBoolean()
|
|
33
|
+
@IsOptional()
|
|
34
|
+
visible?: boolean;
|
|
35
|
+
|
|
36
|
+
@ApiPropertyOptional()
|
|
37
|
+
@IsBoolean()
|
|
38
|
+
@IsOptional()
|
|
39
|
+
withAction?: boolean;
|
|
40
|
+
|
|
41
|
+
@ApiPropertyOptional()
|
|
42
|
+
@IsDate()
|
|
43
|
+
@IsOptional()
|
|
44
|
+
createdDate?: Date;
|
|
45
|
+
|
|
46
|
+
@ApiPropertyOptional()
|
|
47
|
+
@IsOptional()
|
|
48
|
+
@IsString({
|
|
49
|
+
each: true,
|
|
50
|
+
})
|
|
51
|
+
@IsIn(['user'], { each: true })
|
|
52
|
+
include?: string[];
|
|
53
|
+
}
|
|
54
|
+
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { IUser } from './IUser';
|
|
2
|
+
import { IFile } from './IFile';
|
|
3
|
+
import { IRole } from './IRole';
|
|
4
|
+
import { DocumentForHumanResourceType } from '../../Enum/DocumentForHumanResourceType';
|
|
5
|
+
|
|
6
|
+
// HumanResourceLibrary
|
|
7
|
+
export interface IHumanResourceLibrary {
|
|
8
|
+
id?: number;
|
|
9
|
+
idFile?: number;
|
|
10
|
+
idUserRh: number;
|
|
11
|
+
idDocumentType: DocumentForHumanResourceType;
|
|
12
|
+
name: string;
|
|
13
|
+
idRole?: number | null;
|
|
14
|
+
idUser?: number | null;
|
|
15
|
+
visible?: boolean | null;
|
|
16
|
+
createdAt?: Date | null;
|
|
17
|
+
updatedAt?: Date | null;
|
|
18
|
+
deletedAt?: Date | null;
|
|
19
|
+
|
|
20
|
+
// Associations
|
|
21
|
+
user?: IUser;
|
|
22
|
+
userRh?: IUser;
|
|
23
|
+
role?: IRole;
|
|
24
|
+
file?: IFile;
|
|
25
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { IUser } from './IUser';
|
|
2
|
+
import { IHumanResourceLibrary } from './IHumanResourceLibrary';
|
|
3
|
+
|
|
4
|
+
// userHumanResourceLibrary
|
|
5
|
+
export interface IUserHumanResourceLibrary {
|
|
6
|
+
id?: number;
|
|
7
|
+
idHumanResourceLibrary: number;
|
|
8
|
+
idUser: number;
|
|
9
|
+
createdAt?: Date | null;
|
|
10
|
+
updatedAt?: Date | null;
|
|
11
|
+
deletedAt?: Date | null;
|
|
12
|
+
|
|
13
|
+
// Associations
|
|
14
|
+
user?: IUser;
|
|
15
|
+
humanResourceLibrary?: IHumanResourceLibrary;
|
|
16
|
+
}
|
package/ts/types/index.ts
CHANGED
|
@@ -336,6 +336,8 @@ export * from './Interface/models/ICompanyCreationForm';
|
|
|
336
336
|
export * from './Interface/models/IAnnotation';
|
|
337
337
|
export * from './Interface/models/ILoanEarlyRepayment';
|
|
338
338
|
export * from './Interface/models/IPrevisionalForm';
|
|
339
|
+
export * from './Interface/models/IHumanResourceLibrary';
|
|
340
|
+
export * from './Interface/models/IUserHumanResourceLibrary';
|
|
339
341
|
|
|
340
342
|
|
|
341
343
|
// Schemas
|
|
@@ -557,6 +559,7 @@ export * from './Enum/PrevisionalForm';
|
|
|
557
559
|
export * from './Enum/PaymentRecovery';
|
|
558
560
|
export * from './Enum/JuridicalSociety';
|
|
559
561
|
export * from './Enum/Pdf2PicLocalType';
|
|
562
|
+
export * from './Enum/DocumentForHumanResourceType';
|
|
560
563
|
|
|
561
564
|
// Interfaces API
|
|
562
565
|
export * from './Interface/api/exercice/ReadExercice';
|
|
@@ -869,6 +872,11 @@ export * from './Interface/api/incomeAllocation/CreateIncomeAllocation';
|
|
|
869
872
|
export * from './Interface/api/incomeAllocation/ReadIncomeAllocation';
|
|
870
873
|
export * from './Interface/api/incomeAllocation/TypeAndAmount';
|
|
871
874
|
export * from './Interface/api/revisionGuide/CreateRevisionGuide';
|
|
875
|
+
export * from './Interface/api/humanResourceLibrary/QueryPaginatedHumanResourceLibrary';
|
|
876
|
+
export * from './Interface/api/humanResourceLibrary/QueryHumanResourceLibrary';
|
|
877
|
+
export * from './Interface/api/humanResourceLibrary/CreateHumanResourceLibrary';
|
|
878
|
+
export * from './Interface/api/humanResourceLibrary/CreateUserHumanResourceLibrary';
|
|
879
|
+
|
|
872
880
|
export * from './Interface/api/library/QueryLibrary';
|
|
873
881
|
export * from './Interface/api/library/ReadLibraryFile';
|
|
874
882
|
export * from './Interface/api/taxDeadline/QueryTaxDeadline';
|