@silexpert/core 1.3.204 → 1.3.205-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/dist/cjs/api/resources/Transaction.d.ts +1 -0
- package/dist/cjs/api/resources/Transaction.d.ts.map +1 -1
- package/dist/cjs/api/resources/Transaction.js +3 -0
- package/dist/cjs/api/resources/Transaction.js.map +1 -1
- package/dist/cjs/api/resources/UsersHistory.d.ts +11 -0
- package/dist/cjs/api/resources/UsersHistory.d.ts.map +1 -0
- package/dist/cjs/api/resources/UsersHistory.js +26 -0
- package/dist/cjs/api/resources/UsersHistory.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/PrestationType.d.ts +11 -0
- package/dist/cjs/types/Enum/PrestationType.d.ts.map +1 -1
- package/dist/cjs/types/Enum/PrestationType.js +84 -68
- package/dist/cjs/types/Enum/PrestationType.js.map +1 -1
- package/dist/cjs/types/Enum/SocietyApproval.js +6 -6
- package/dist/cjs/types/Enum/SocietyApproval.js.map +1 -1
- package/dist/cjs/types/Enum/UsersHistory.d.ts +16 -0
- package/dist/cjs/types/Enum/UsersHistory.d.ts.map +1 -0
- package/dist/cjs/types/Enum/UsersHistory.js +38 -0
- package/dist/cjs/types/Enum/UsersHistory.js.map +1 -0
- package/dist/cjs/types/Interface/api/accountingEntry/AnnotateAccountingTransaction.d.ts +13 -0
- package/dist/cjs/types/Interface/api/accountingEntry/AnnotateAccountingTransaction.d.ts.map +1 -1
- package/dist/cjs/types/Interface/api/accountingEntry/AnnotateAccountingTransaction.js +14 -1
- package/dist/cjs/types/Interface/api/accountingEntry/AnnotateAccountingTransaction.js.map +1 -1
- package/dist/cjs/types/Interface/api/usersHistory/Create.d.ts +8 -0
- package/dist/cjs/types/Interface/api/usersHistory/Create.d.ts.map +1 -0
- package/dist/cjs/types/Interface/api/usersHistory/Create.js +35 -0
- package/dist/cjs/types/Interface/api/usersHistory/Create.js.map +1 -0
- package/dist/cjs/types/Interface/api/usersHistory/Update.d.ts +7 -0
- package/dist/cjs/types/Interface/api/usersHistory/Update.d.ts.map +1 -0
- package/dist/cjs/types/Interface/api/usersHistory/Update.js +31 -0
- package/dist/cjs/types/Interface/api/usersHistory/Update.js.map +1 -0
- package/dist/cjs/types/Interface/models/IUsersHistory.d.ts +14 -0
- package/dist/cjs/types/Interface/models/IUsersHistory.d.ts.map +1 -0
- package/dist/cjs/types/Interface/models/IUsersHistory.js +3 -0
- package/dist/cjs/types/Interface/models/IUsersHistory.js.map +1 -0
- package/dist/cjs/types/index.d.ts +4 -0
- package/dist/cjs/types/index.d.ts.map +1 -1
- package/dist/cjs/types/index.js +4 -0
- package/dist/cjs/types/index.js.map +1 -1
- package/dist/cjs/utils/societyApproval.d.ts.map +1 -1
- package/dist/cjs/utils/societyApproval.js +22 -19
- package/dist/cjs/utils/societyApproval.js.map +1 -1
- package/dist/mjs/api/resources/Transaction.d.ts +1 -0
- package/dist/mjs/api/resources/Transaction.d.ts.map +1 -1
- package/dist/mjs/api/resources/Transaction.js +3 -0
- package/dist/mjs/api/resources/Transaction.js.map +1 -1
- package/dist/mjs/api/resources/UsersHistory.d.ts +11 -0
- package/dist/mjs/api/resources/UsersHistory.d.ts.map +1 -0
- package/dist/mjs/api/resources/UsersHistory.js +28 -0
- package/dist/mjs/api/resources/UsersHistory.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/PrestationType.d.ts +11 -0
- package/dist/mjs/types/Enum/PrestationType.d.ts.map +1 -1
- package/dist/mjs/types/Enum/PrestationType.js +83 -67
- package/dist/mjs/types/Enum/PrestationType.js.map +1 -1
- package/dist/mjs/types/Enum/SocietyApproval.js +6 -6
- package/dist/mjs/types/Enum/SocietyApproval.js.map +1 -1
- package/dist/mjs/types/Enum/UsersHistory.d.ts +16 -0
- package/dist/mjs/types/Enum/UsersHistory.d.ts.map +1 -0
- package/dist/mjs/types/Enum/UsersHistory.js +35 -0
- package/dist/mjs/types/Enum/UsersHistory.js.map +1 -0
- package/dist/mjs/types/Interface/api/accountingEntry/AnnotateAccountingTransaction.d.ts +13 -0
- package/dist/mjs/types/Interface/api/accountingEntry/AnnotateAccountingTransaction.d.ts.map +1 -1
- package/dist/mjs/types/Interface/api/accountingEntry/AnnotateAccountingTransaction.js +16 -2
- package/dist/mjs/types/Interface/api/accountingEntry/AnnotateAccountingTransaction.js.map +1 -1
- package/dist/mjs/types/Interface/api/usersHistory/Create.d.ts +8 -0
- package/dist/mjs/types/Interface/api/usersHistory/Create.d.ts.map +1 -0
- package/dist/mjs/types/Interface/api/usersHistory/Create.js +34 -0
- package/dist/mjs/types/Interface/api/usersHistory/Create.js.map +1 -0
- package/dist/mjs/types/Interface/api/usersHistory/Update.d.ts +7 -0
- package/dist/mjs/types/Interface/api/usersHistory/Update.d.ts.map +1 -0
- package/dist/mjs/types/Interface/api/usersHistory/Update.js +29 -0
- package/dist/mjs/types/Interface/api/usersHistory/Update.js.map +1 -0
- package/dist/mjs/types/Interface/models/IUsersHistory.d.ts +14 -0
- package/dist/mjs/types/Interface/models/IUsersHistory.d.ts.map +1 -0
- package/dist/mjs/types/Interface/models/IUsersHistory.js +2 -0
- package/dist/mjs/types/Interface/models/IUsersHistory.js.map +1 -0
- package/dist/mjs/types/index.d.ts +4 -0
- package/dist/mjs/types/index.d.ts.map +1 -1
- package/dist/mjs/types/index.js +4 -0
- package/dist/mjs/types/index.js.map +1 -1
- package/dist/mjs/utils/societyApproval.d.ts.map +1 -1
- package/dist/mjs/utils/societyApproval.js +6 -3
- package/dist/mjs/utils/societyApproval.js.map +1 -1
- package/package.json +1 -1
- package/ts/api/resources/Transaction.ts +3 -0
- package/ts/api/resources/UsersHistory.ts +35 -0
- package/ts/api/resources.ts +2 -0
- package/ts/types/Enum/PrestationType.ts +84 -67
- package/ts/types/Enum/SocietyApproval.ts +6 -6
- package/ts/types/Enum/UsersHistory.ts +38 -0
- package/ts/types/Interface/api/accountingEntry/AnnotateAccountingTransaction.ts +18 -2
- package/ts/types/Interface/api/usersHistory/Create.ts +21 -0
- package/ts/types/Interface/api/usersHistory/Update.ts +17 -0
- package/ts/types/Interface/models/IUsersHistory.ts +17 -0
- package/ts/types/index.ts +5 -0
- package/ts/utils/societyApproval.ts +10 -3
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { IsBoolean, IsNumber, IsOptional } from 'class-validator';
|
|
1
|
+
import { IsArray, IsBoolean, IsInt, IsNumber, IsOptional } from 'class-validator';
|
|
2
2
|
import { IAccountingTransaction, IImmobilization } from '../../..';
|
|
3
3
|
import { IThirdParty } from '../../models/IThirdParty';
|
|
4
|
-
import { ApiPropertyOptional } from '../../../../utils';
|
|
4
|
+
import { ApiProperty, ApiPropertyOptional } from '../../../../utils';
|
|
5
5
|
import { ToBoolean } from '../../../../utils/transforms/boolean.transform';
|
|
6
6
|
|
|
7
7
|
export type FormImmobilization = IImmobilization;
|
|
@@ -58,6 +58,22 @@ export class UpdateAccountingTransaction {
|
|
|
58
58
|
idAccountant?: number;
|
|
59
59
|
}
|
|
60
60
|
|
|
61
|
+
export class UpdateAllAccountingTransaction {
|
|
62
|
+
@ApiProperty()
|
|
63
|
+
@IsArray()
|
|
64
|
+
@IsInt({ each: true })
|
|
65
|
+
ids: number[];
|
|
66
|
+
|
|
67
|
+
@ApiProperty()
|
|
68
|
+
data: UpdateAccountingTransaction;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
export interface UpdatedAccountingTransactions {
|
|
72
|
+
processed: number;
|
|
73
|
+
errors: Array<{ id: number; message: string; code: string }>;
|
|
74
|
+
updatedTransactions: ReadFormattedAccountingTransaction[];
|
|
75
|
+
}
|
|
76
|
+
|
|
61
77
|
export interface UploadedAccountingFileInfos {
|
|
62
78
|
location: string;
|
|
63
79
|
idFile: number;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { IsEnum, IsInt, IsOptional, IsString } from 'class-validator';
|
|
2
|
+
import { ApiProperty, ApiPropertyOptional } from '../../../../utils/decorators';
|
|
3
|
+
import { TypeUserHistory } from '../../../Enum/UsersHistory';
|
|
4
|
+
import { IUsersHistory } from '../../models/IUsersHistory';
|
|
5
|
+
|
|
6
|
+
export class CreateUsersHistory implements Omit<IUsersHistory, 'id' | 'createdAt' | 'updatedAt' | 'idAuthor'> {
|
|
7
|
+
@ApiProperty()
|
|
8
|
+
@IsInt()
|
|
9
|
+
idUser: number;
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
@ApiPropertyOptional()
|
|
14
|
+
@IsOptional()
|
|
15
|
+
@IsString()
|
|
16
|
+
comment?: string;
|
|
17
|
+
|
|
18
|
+
@ApiProperty()
|
|
19
|
+
@IsEnum(TypeUserHistory)
|
|
20
|
+
actionType: TypeUserHistory;
|
|
21
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { IsEnum, IsOptional, IsString } from 'class-validator';
|
|
2
|
+
import { ApiPropertyOptional } from '../../../../utils/decorators';
|
|
3
|
+
import { TypeUserHistory } from '../../../Enum/UsersHistory';
|
|
4
|
+
import { IUsersHistory } from '../../models/IUsersHistory';
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
export class UpdateUsersHistory implements Partial<Omit<IUsersHistory, 'id' | 'idUser' | 'idAuthor'>> {
|
|
8
|
+
@ApiPropertyOptional()
|
|
9
|
+
@IsOptional()
|
|
10
|
+
@IsString()
|
|
11
|
+
comment?: string;
|
|
12
|
+
|
|
13
|
+
@ApiPropertyOptional()
|
|
14
|
+
@IsOptional()
|
|
15
|
+
@IsEnum(TypeUserHistory)
|
|
16
|
+
actionType?: TypeUserHistory;
|
|
17
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { IUser } from './IUser';
|
|
2
|
+
import { TypeUserHistory } from '../../Enum/UsersHistory';
|
|
3
|
+
|
|
4
|
+
export interface IUsersHistory {
|
|
5
|
+
id?: number;
|
|
6
|
+
idUser: number;
|
|
7
|
+
idAuthor?: number | null;
|
|
8
|
+
comment?: string | null;
|
|
9
|
+
actionType: TypeUserHistory;
|
|
10
|
+
createdAt?: Date | null;
|
|
11
|
+
updatedAt?: Date | null;
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
// Relations
|
|
15
|
+
user?: IUser;
|
|
16
|
+
author?: IUser;
|
|
17
|
+
}
|
package/ts/types/index.ts
CHANGED
|
@@ -329,6 +329,7 @@ export * from './Interface/models/IDocumentRequest';
|
|
|
329
329
|
export * from './Interface/models/IInformationRequest';
|
|
330
330
|
export * from './Interface/models/IRevenueMovement';
|
|
331
331
|
export * from './Interface/models/IRevenueSnapshot';
|
|
332
|
+
export * from './Interface/models/IUsersHistory';
|
|
332
333
|
|
|
333
334
|
// Schemas
|
|
334
335
|
export * from './Interface/schemas/IRegistrationDetail';
|
|
@@ -568,6 +569,7 @@ export * from './Enum/InformationRequestType';
|
|
|
568
569
|
export * from './Enum/InformationRequestState';
|
|
569
570
|
export * from './Enum/Revenue';
|
|
570
571
|
export * from './Enum/EbookIntention';
|
|
572
|
+
export * from './Enum/UsersHistory';
|
|
571
573
|
|
|
572
574
|
// Interfaces API
|
|
573
575
|
export * from './Interface/api/authentification/AuthenticationResponse';
|
|
@@ -792,6 +794,9 @@ export * from './Interface/api/constitutionHistory/QueryPaginatedConstitutionHis
|
|
|
792
794
|
export * from './Interface/api/userSpecialDay/BodyUserSpecialDay';
|
|
793
795
|
export * from './Interface/api/userSpecialDay/QueryUserSpecialDay';
|
|
794
796
|
export * from './Interface/api/oldExportInfo/OldExpertInfos';
|
|
797
|
+
export * from './Interface/api/usersHistory/Create';
|
|
798
|
+
export * from './Interface/api/usersHistory/Update';
|
|
799
|
+
|
|
795
800
|
|
|
796
801
|
// export * from './Interface/api/survey/QuerySurvey';
|
|
797
802
|
export * from './Interface/api/survey/ReadSurvey';
|
|
@@ -81,8 +81,15 @@ export function getApprovalDocumentInfos(
|
|
|
81
81
|
* @returns L'objet de données formaté pour le template
|
|
82
82
|
*/
|
|
83
83
|
export function buildApprovalTemplateData(existingApproval: ISocietyApproval, style: string): Record<string, any> {
|
|
84
|
-
const yearInText = convertNumberToLetter(
|
|
85
|
-
|
|
84
|
+
const yearInText = convertNumberToLetter(
|
|
85
|
+
+dayjs(existingApproval?.generatingDatas?.approvalDate || null).format('YYYY'),
|
|
86
|
+
).toLowerCase();
|
|
87
|
+
const dayAndMonthInText = `${convertNumberToLetter(+dayjs(existingApproval?.generatingDatas?.approvalDate || null).format('D'))} ${dayjs(
|
|
88
|
+
existingApproval?.generatingDatas?.approvalDate || null,
|
|
89
|
+
)
|
|
90
|
+
.locale('fr')
|
|
91
|
+
.format('MMMM')
|
|
92
|
+
.toLowerCase()}`;
|
|
86
93
|
const brand = getBrand();
|
|
87
94
|
return {
|
|
88
95
|
// Variables globales
|
|
@@ -131,7 +138,7 @@ export function buildApprovalTemplateData(existingApproval: ISocietyApproval, st
|
|
|
131
138
|
...existingApproval?.exercice?.society,
|
|
132
139
|
cityOfGreffe: getCityOfGreffeName(existingApproval?.exercice?.society?.idCityOfGreffe).toUpperCase(),
|
|
133
140
|
siren: existingApproval?.exercice?.society?.siret
|
|
134
|
-
? siretToSiren(existingApproval.exercice.society.siret)
|
|
141
|
+
? siretToSiren(existingApproval.exercice.society.siret)?.replace(/(\d{3})(\d{3})(\d{3})/, '$1 $2 $3') ?? null
|
|
135
142
|
: null,
|
|
136
143
|
},
|
|
137
144
|
endDate: dayjs(existingApproval?.exercice?.endDate).locale('fr').format('DD MMMM YYYY').toLowerCase(),
|