@silexpert/core 1.0.12 → 1.0.15
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/es/api/resources/{commercialDocument.d.ts → CommercialDocument.d.ts} +4 -2
- package/es/api/resources/CommercialDocument.d.ts.map +1 -0
- package/es/api/resources/{commercialDocument.js → CommercialDocument.js} +7 -1
- package/es/api/resources/CommercialDocument.js.map +1 -0
- package/es/api/resources/Dashboard.d.ts +1 -2
- package/es/api/resources/Dashboard.d.ts.map +1 -1
- package/es/api/resources/Dashboard.js +0 -3
- package/es/api/resources/Dashboard.js.map +1 -1
- package/es/api/resources/Exercice.d.ts +1 -0
- package/es/api/resources/Exercice.d.ts.map +1 -1
- package/es/api/resources/Exercice.js +3 -0
- package/es/api/resources/Exercice.js.map +1 -1
- package/es/api/resources/Invoice.d.ts +1 -0
- package/es/api/resources/Invoice.d.ts.map +1 -1
- package/es/api/resources/Invoice.js +3 -0
- package/es/api/resources/Invoice.js.map +1 -1
- package/es/api/resources/Mail.js +2 -2
- package/es/api/resources/Mail.js.map +1 -1
- package/es/api/resources/Qonto.d.ts +2 -1
- package/es/api/resources/Qonto.d.ts.map +1 -1
- package/es/api/resources/Qonto.js +3 -0
- package/es/api/resources/Qonto.js.map +1 -1
- package/es/api/resources/Recurrence.d.ts +9 -0
- package/es/api/resources/Recurrence.d.ts.map +1 -0
- package/es/api/resources/Recurrence.js +13 -0
- package/es/api/resources/Recurrence.js.map +1 -0
- package/es/api/resources/{reminder.d.ts → Reminder.d.ts} +1 -1
- package/es/api/resources/{reminder.d.ts.map → Reminder.d.ts.map} +1 -1
- package/es/api/resources/{reminder.js → Reminder.js} +2 -2
- package/es/api/resources/{reminder.js.map → Reminder.js.map} +1 -1
- package/es/api/resources/User.d.ts +2 -2
- package/es/api/resources/User.d.ts.map +1 -1
- package/es/api/resources/User.js +2 -11
- package/es/api/resources/User.js.map +1 -1
- package/es/api/resources.d.ts +4 -2
- package/es/api/resources.d.ts.map +1 -1
- package/es/api/resources.js +4 -2
- package/es/api/resources.js.map +1 -1
- package/es/types/Enum/BrandClementine.d.ts +3 -1
- package/es/types/Enum/BrandClementine.d.ts.map +1 -1
- package/es/types/Enum/BrandClementine.js +3 -0
- package/es/types/Enum/BrandClementine.js.map +1 -1
- package/es/types/Enum/CommercialManagement.d.ts +4 -2
- package/es/types/Enum/CommercialManagement.d.ts.map +1 -1
- package/es/types/Enum/CommercialManagement.js +3 -1
- package/es/types/Enum/CommercialManagement.js.map +1 -1
- package/es/types/Enum/RecurrenceType.d.ts +11 -0
- package/es/types/Enum/RecurrenceType.d.ts.map +1 -0
- package/es/types/Enum/RecurrenceType.js +26 -0
- package/es/types/Enum/RecurrenceType.js.map +1 -0
- package/es/types/Enum/Role.d.ts +6 -11
- package/es/types/Enum/Role.d.ts.map +1 -1
- package/es/types/Enum/Role.js +15 -10
- package/es/types/Enum/Role.js.map +1 -1
- package/es/types/Enum/RoleDetail.d.ts +40 -56
- package/es/types/Enum/RoleDetail.d.ts.map +1 -1
- package/es/types/Enum/RoleDetail.js +120 -64
- package/es/types/Enum/RoleDetail.js.map +1 -1
- package/es/types/Enum/TaskResponseType.d.ts +9 -0
- package/es/types/Enum/TaskResponseType.d.ts.map +1 -1
- package/es/types/Enum/TaskResponseType.js +35 -2
- package/es/types/Enum/TaskResponseType.js.map +1 -1
- package/es/types/Enum/TimeCounterType.js +7 -7
- package/es/types/Enum/TimeCounterType.js.map +1 -1
- package/es/types/Interface/api/commercialManagement/Create.d.ts +25 -18
- package/es/types/Interface/api/commercialManagement/Create.d.ts.map +1 -1
- package/es/types/Interface/api/commercialManagement/Create.js +65 -81
- package/es/types/Interface/api/commercialManagement/Create.js.map +1 -1
- package/es/types/Interface/api/commercialManagement/Query.d.ts +6 -0
- package/es/types/Interface/api/commercialManagement/Query.d.ts.map +1 -1
- package/es/types/Interface/api/commercialManagement/Query.js +29 -0
- package/es/types/Interface/api/commercialManagement/Query.js.map +1 -1
- package/es/types/Interface/api/commercialManagement/Read.d.ts +19 -0
- package/es/types/Interface/api/commercialManagement/Read.d.ts.map +1 -1
- package/es/types/Interface/api/commercialManagement/Read.js.map +1 -1
- package/es/types/Interface/api/commercialManagement/Update.d.ts +6 -0
- package/es/types/Interface/api/commercialManagement/Update.d.ts.map +1 -1
- package/es/types/Interface/api/commercialManagement/Update.js +29 -1
- package/es/types/Interface/api/commercialManagement/Update.js.map +1 -1
- package/es/types/Interface/api/mail/QueryCountUnprocessedByUserMail.d.ts +1 -1
- package/es/types/Interface/api/mail/QueryCountUnprocessedByUserMail.d.ts.map +1 -1
- package/es/types/Interface/api/mail/QueryCountUnprocessedByUserMail.js +1 -1
- package/es/types/Interface/api/mail/QueryCountUnprocessedByUserMail.js.map +1 -1
- package/es/types/Interface/api/mail/QueryPaginatedMail.d.ts +1 -1
- package/es/types/Interface/api/mail/QueryPaginatedMail.d.ts.map +1 -1
- package/es/types/Interface/api/mail/QueryPaginatedMail.js +1 -1
- package/es/types/Interface/api/mail/QueryPaginatedMail.js.map +1 -1
- package/es/types/Interface/api/qonto/CreateImportation.d.ts +5 -0
- package/es/types/Interface/api/qonto/CreateImportation.d.ts.map +1 -0
- package/es/types/Interface/api/{dashboard/QueryGescom.js → qonto/CreateImportation.js} +12 -19
- package/es/types/Interface/api/qonto/CreateImportation.js.map +1 -0
- package/es/types/Interface/api/qonto/Query.d.ts +78 -0
- package/es/types/Interface/api/qonto/Query.d.ts.map +1 -0
- package/es/types/Interface/api/qonto/Query.js +2 -0
- package/es/types/Interface/api/qonto/Query.js.map +1 -0
- package/es/types/Interface/api/revision/QueryRevision.d.ts +2 -0
- package/es/types/Interface/api/revision/QueryRevision.d.ts.map +1 -1
- package/es/types/Interface/api/revision/QueryRevision.js +16 -2
- package/es/types/Interface/api/revision/QueryRevision.js.map +1 -1
- package/es/types/Interface/api/revision/QueryRevisionAccount.d.ts +1 -1
- package/es/types/Interface/api/revision/QueryRevisionAccount.d.ts.map +1 -1
- package/es/types/Interface/api/revision/QueryRevisionAccount.js +11 -5
- package/es/types/Interface/api/revision/QueryRevisionAccount.js.map +1 -1
- package/es/types/Interface/api/revision/QueryRevisionPaginate.d.ts +2 -0
- package/es/types/Interface/api/revision/QueryRevisionPaginate.d.ts.map +1 -1
- package/es/types/Interface/api/revision/QueryRevisionPaginate.js +16 -2
- package/es/types/Interface/api/revision/QueryRevisionPaginate.js.map +1 -1
- package/es/types/Interface/api/revision/QueryRevisionSearchEntries.d.ts +1 -1
- package/es/types/Interface/api/revision/QueryRevisionSearchEntries.d.ts.map +1 -1
- package/es/types/Interface/api/revision/QueryRevisionSearchEntries.js.map +1 -1
- package/es/types/Interface/api/task/QueryCountTask.d.ts +1 -1
- package/es/types/Interface/api/task/QueryCountTask.d.ts.map +1 -1
- package/es/types/Interface/api/task/QueryCountTask.js +1 -1
- package/es/types/Interface/api/task/QueryCountTask.js.map +1 -1
- package/es/types/Interface/api/task/QueryPaginatedTask.d.ts +2 -0
- package/es/types/Interface/api/task/QueryPaginatedTask.d.ts.map +1 -1
- package/es/types/Interface/api/task/QueryPaginatedTask.js +11 -0
- package/es/types/Interface/api/task/QueryPaginatedTask.js.map +1 -1
- package/es/types/Interface/api/user/ParamsGetAllCollaborators.d.ts +1 -0
- package/es/types/Interface/api/user/ParamsGetAllCollaborators.d.ts.map +1 -1
- package/es/types/Interface/api/user/ParamsGetAllCollaborators.js +10 -1
- package/es/types/Interface/api/user/ParamsGetAllCollaborators.js.map +1 -1
- package/es/types/Interface/api/user/QueryGetAllCollaborators.d.ts +1 -0
- package/es/types/Interface/api/user/QueryGetAllCollaborators.d.ts.map +1 -1
- package/es/types/Interface/api/user/QueryGetAllCollaborators.js +11 -1
- package/es/types/Interface/api/user/QueryGetAllCollaborators.js.map +1 -1
- package/es/types/Interface/models/IApiError.d.ts +2 -1
- package/es/types/Interface/models/IApiError.d.ts.map +1 -1
- package/es/types/Interface/models/IApiError.js +1 -0
- package/es/types/Interface/models/IApiError.js.map +1 -1
- package/es/types/Interface/models/IEstimateInvoice.d.ts +4 -2
- package/es/types/Interface/models/IEstimateInvoice.d.ts.map +1 -1
- package/es/types/Interface/models/IEstimateInvoice.js.map +1 -1
- package/es/types/Interface/models/IInvoiceRecurrence.d.ts +15 -0
- package/es/types/Interface/models/IInvoiceRecurrence.d.ts.map +1 -0
- package/es/types/Interface/models/IInvoiceRecurrence.js +2 -0
- package/es/types/Interface/models/IInvoiceRecurrence.js.map +1 -0
- package/es/types/Interface/models/IInvoiceReminder.d.ts +1 -1
- package/es/types/Interface/models/IInvoiceReminder.d.ts.map +1 -1
- package/es/types/Interface/models/IInvoiceReminder.js.map +1 -1
- package/es/types/Interface/models/ITask.d.ts +2 -2
- package/es/types/Interface/models/ITask.d.ts.map +1 -1
- package/es/types/Interface/models/ITask.js.map +1 -1
- package/es/types/index.d.ts +4 -2
- package/es/types/index.d.ts.map +1 -1
- package/es/types/index.js +4 -2
- package/es/types/index.js.map +1 -1
- package/es/utils/commercialManagement/document.d.ts.map +1 -1
- package/es/utils/commercialManagement/document.js +1 -5
- package/es/utils/commercialManagement/document.js.map +1 -1
- package/es/utils/commercialManagement/recurrence.d.ts +7 -0
- package/es/utils/commercialManagement/recurrence.d.ts.map +1 -0
- package/es/utils/commercialManagement/recurrence.js +31 -0
- package/es/utils/commercialManagement/recurrence.js.map +1 -0
- package/es/utils/index.d.ts +1 -0
- package/es/utils/index.d.ts.map +1 -1
- package/es/utils/index.js +1 -0
- package/es/utils/index.js.map +1 -1
- package/es/utils/task.d.ts +3 -2
- package/es/utils/task.d.ts.map +1 -1
- package/es/utils/task.js +23 -19
- package/es/utils/task.js.map +1 -1
- package/es/utils/webmail.d.ts.map +1 -1
- package/es/utils/webmail.js +1 -4
- package/es/utils/webmail.js.map +1 -1
- package/js/api/resources/{commercialDocument.js → CommercialDocument.js} +11 -1
- package/js/api/resources/CommercialDocument.js.map +1 -0
- package/js/api/resources/Dashboard.js +0 -6
- package/js/api/resources/Dashboard.js.map +1 -1
- package/js/api/resources/Exercice.js +4 -0
- package/js/api/resources/Exercice.js.map +1 -1
- package/js/api/resources/Invoice.js +4 -0
- package/js/api/resources/Invoice.js.map +1 -1
- package/js/api/resources/Mail.js +2 -2
- package/js/api/resources/Mail.js.map +1 -1
- package/js/api/resources/Qonto.js +4 -0
- package/js/api/resources/Qonto.js.map +1 -1
- package/js/api/resources/Recurrence.js +26 -0
- package/js/api/resources/Recurrence.js.map +1 -0
- package/js/api/resources/{reminder.js → Reminder.js} +2 -2
- package/js/api/resources/{reminder.js.map → Reminder.js.map} +1 -1
- package/js/api/resources/User.js +5 -3
- package/js/api/resources/User.js.map +1 -1
- package/js/api/resources.js +7 -4
- package/js/api/resources.js.map +1 -1
- package/js/types/Enum/BrandClementine.js +3 -0
- package/js/types/Enum/BrandClementine.js.map +1 -1
- package/js/types/Enum/CommercialManagement.js +3 -1
- package/js/types/Enum/CommercialManagement.js.map +1 -1
- package/js/types/Enum/RecurrenceType.js +28 -0
- package/js/types/Enum/RecurrenceType.js.map +1 -0
- package/js/types/Enum/Role.js +18 -13
- package/js/types/Enum/Role.js.map +1 -1
- package/js/types/Enum/RoleDetail.js +142 -86
- package/js/types/Enum/RoleDetail.js.map +1 -1
- package/js/types/Enum/TaskResponseType.js +36 -3
- package/js/types/Enum/TaskResponseType.js.map +1 -1
- package/js/types/Enum/TimeCounterType.js +7 -7
- package/js/types/Enum/TimeCounterType.js.map +1 -1
- package/js/types/Interface/api/commercialManagement/Create.js +47 -33
- package/js/types/Interface/api/commercialManagement/Create.js.map +1 -1
- package/js/types/Interface/api/commercialManagement/Query.js +15 -3
- package/js/types/Interface/api/commercialManagement/Query.js.map +1 -1
- package/js/types/Interface/api/commercialManagement/Update.js +15 -1
- package/js/types/Interface/api/commercialManagement/Update.js.map +1 -1
- package/js/types/Interface/api/mail/QueryCountUnprocessedByUserMail.js +1 -1
- package/js/types/Interface/api/mail/QueryCountUnprocessedByUserMail.js.map +1 -1
- package/js/types/Interface/api/mail/QueryPaginatedMail.js +1 -1
- package/js/types/Interface/api/mail/QueryPaginatedMail.js.map +1 -1
- package/js/types/Interface/api/{dashboard/QueryGescom.js → qonto/CreateImportation.js} +8 -12
- package/js/types/Interface/api/qonto/CreateImportation.js.map +1 -0
- package/js/types/Interface/api/qonto/Query.js +6 -0
- package/js/types/Interface/api/qonto/Query.js.map +1 -0
- package/js/types/Interface/api/revision/QueryRevision.js +6 -0
- package/js/types/Interface/api/revision/QueryRevision.js.map +1 -1
- package/js/types/Interface/api/revision/QueryRevisionAccount.js +7 -5
- package/js/types/Interface/api/revision/QueryRevisionAccount.js.map +1 -1
- package/js/types/Interface/api/revision/QueryRevisionPaginate.js +6 -0
- package/js/types/Interface/api/revision/QueryRevisionPaginate.js.map +1 -1
- package/js/types/Interface/api/revision/QueryRevisionSearchEntries.js.map +1 -1
- package/js/types/Interface/api/task/QueryCountTask.js +1 -1
- package/js/types/Interface/api/task/QueryCountTask.js.map +1 -1
- package/js/types/Interface/api/task/QueryPaginatedTask.js +6 -0
- package/js/types/Interface/api/task/QueryPaginatedTask.js.map +1 -1
- package/js/types/Interface/api/user/ParamsGetAllCollaborators.js +6 -0
- package/js/types/Interface/api/user/ParamsGetAllCollaborators.js.map +1 -1
- package/js/types/Interface/api/user/QueryGetAllCollaborators.js +8 -0
- package/js/types/Interface/api/user/QueryGetAllCollaborators.js.map +1 -1
- package/js/types/Interface/models/IApiError.js +1 -0
- package/js/types/Interface/models/IApiError.js.map +1 -1
- package/js/types/Interface/models/IInvoiceRecurrence.js +6 -0
- package/js/types/Interface/models/IInvoiceRecurrence.js.map +1 -0
- package/js/types/index.js +48 -24
- package/js/types/index.js.map +1 -1
- package/js/utils/commercialManagement/document.js +1 -6
- package/js/utils/commercialManagement/document.js.map +1 -1
- package/js/utils/commercialManagement/recurrence.js +47 -0
- package/js/utils/commercialManagement/recurrence.js.map +1 -0
- package/js/utils/index.js +12 -0
- package/js/utils/index.js.map +1 -1
- package/js/utils/task.js +29 -20
- package/js/utils/task.js.map +1 -1
- package/js/utils/webmail.js +1 -3
- package/js/utils/webmail.js.map +1 -1
- package/package.json +1 -1
- package/ts/api/resources/{commercialDocument.ts → CommercialDocument.ts} +10 -0
- package/ts/api/resources/Dashboard.ts +0 -6
- package/ts/api/resources/Exercice.ts +4 -0
- package/ts/api/resources/Invoice.ts +4 -0
- package/ts/api/resources/Mail.ts +2 -2
- package/ts/api/resources/Qonto.ts +7 -1
- package/ts/api/resources/Recurrence.ts +17 -0
- package/ts/api/resources/{reminder.ts → Reminder.ts} +1 -1
- package/ts/api/resources/User.ts +3 -12
- package/ts/api/resources.ts +4 -2
- package/ts/types/Enum/BrandClementine.ts +3 -0
- package/ts/types/Enum/CommercialManagement.ts +3 -1
- package/ts/types/Enum/RecurrenceType.ts +25 -0
- package/ts/types/Enum/Role.ts +15 -10
- package/ts/types/Enum/RoleDetail.ts +120 -64
- package/ts/types/Enum/TaskResponseType.ts +35 -2
- package/ts/types/Enum/TimeCounterType.ts +7 -7
- package/ts/types/Interface/api/commercialManagement/Create.ts +62 -81
- package/ts/types/Interface/api/commercialManagement/Query.ts +25 -0
- package/ts/types/Interface/api/commercialManagement/Read.ts +19 -0
- package/ts/types/Interface/api/commercialManagement/Update.ts +25 -1
- package/ts/types/Interface/api/mail/QueryCountUnprocessedByUserMail.ts +1 -1
- package/ts/types/Interface/api/mail/QueryPaginatedMail.ts +1 -1
- package/ts/types/Interface/api/qonto/CreateImportation.ts +14 -0
- package/ts/types/Interface/api/qonto/Query.ts +80 -0
- package/ts/types/Interface/api/revision/QueryRevision.ts +15 -2
- package/ts/types/Interface/api/revision/QueryRevisionAccount.ts +11 -4
- package/ts/types/Interface/api/revision/QueryRevisionPaginate.ts +15 -2
- package/ts/types/Interface/api/revision/QueryRevisionSearchEntries.ts +1 -1
- package/ts/types/Interface/api/task/QueryCountTask.ts +1 -1
- package/ts/types/Interface/api/task/QueryPaginatedTask.ts +9 -0
- package/ts/types/Interface/api/user/ParamsGetAllCollaborators.ts +9 -0
- package/ts/types/Interface/api/user/QueryGetAllCollaborators.ts +10 -1
- package/ts/types/Interface/models/IApiError.ts +1 -0
- package/ts/types/Interface/models/IEstimateInvoice.ts +4 -2
- package/ts/types/Interface/models/IInvoiceRecurrence.ts +16 -0
- package/ts/types/Interface/models/IInvoiceReminder.ts +1 -1
- package/ts/types/Interface/models/ITask.ts +2 -2
- package/ts/types/index.ts +4 -2
- package/ts/utils/commercialManagement/document.ts +1 -6
- package/ts/utils/commercialManagement/recurrence.ts +39 -0
- package/ts/utils/index.ts +1 -0
- package/ts/utils/task.ts +24 -16
- package/ts/utils/webmail.ts +1 -3
- package/es/api/resources/commercialDocument.d.ts.map +0 -1
- package/es/api/resources/commercialDocument.js.map +0 -1
- package/es/types/Interface/api/dashboard/QueryGescom.d.ts +0 -8
- package/es/types/Interface/api/dashboard/QueryGescom.d.ts.map +0 -1
- package/es/types/Interface/api/dashboard/QueryGescom.js.map +0 -1
- package/es/types/Interface/api/dashboard/ReadGescom.d.ts +0 -22
- package/es/types/Interface/api/dashboard/ReadGescom.d.ts.map +0 -1
- package/es/types/Interface/api/dashboard/ReadGescom.js +0 -9
- package/es/types/Interface/api/dashboard/ReadGescom.js.map +0 -1
- package/js/api/resources/commercialDocument.js.map +0 -1
- package/js/types/Interface/api/dashboard/QueryGescom.js.map +0 -1
- package/js/types/Interface/api/dashboard/ReadGescom.js +0 -22
- package/js/types/Interface/api/dashboard/ReadGescom.js.map +0 -1
- package/ts/types/Interface/api/dashboard/QueryGescom.ts +0 -18
- package/ts/types/Interface/api/dashboard/ReadGescom.ts +0 -24
|
@@ -81,10 +81,12 @@ export class QueryDocumentPaginated {
|
|
|
81
81
|
|
|
82
82
|
@ApiPropertyOptional()
|
|
83
83
|
@IsDateString()
|
|
84
|
+
@IsOptional()
|
|
84
85
|
minDate?: string;
|
|
85
86
|
|
|
86
87
|
@ApiPropertyOptional()
|
|
87
88
|
@IsDateString()
|
|
89
|
+
@IsOptional()
|
|
88
90
|
maxDate?: string;
|
|
89
91
|
|
|
90
92
|
@ApiPropertyOptional()
|
|
@@ -112,4 +114,27 @@ export class QueryDocumentPaginated {
|
|
|
112
114
|
@IsBoolean()
|
|
113
115
|
@ToBoolean()
|
|
114
116
|
isDraft?: boolean;
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
export class QueryCountByStatus {
|
|
120
|
+
@ApiPropertyOptional()
|
|
121
|
+
@IsDateString()
|
|
122
|
+
@IsOptional()
|
|
123
|
+
minDate?: string;
|
|
124
|
+
|
|
125
|
+
@ApiPropertyOptional()
|
|
126
|
+
@IsDateString()
|
|
127
|
+
@IsOptional()
|
|
128
|
+
maxDate?: string;
|
|
129
|
+
|
|
130
|
+
@ApiPropertyOptional()
|
|
131
|
+
@IsOptional()
|
|
132
|
+
@IsString()
|
|
133
|
+
search?: string;
|
|
134
|
+
|
|
135
|
+
@ApiPropertyOptional()
|
|
136
|
+
@IsBoolean()
|
|
137
|
+
@ToBoolean()
|
|
138
|
+
@IsOptional()
|
|
139
|
+
isDraft?: boolean;
|
|
115
140
|
}
|
|
@@ -4,6 +4,7 @@ import { IProductInvoice } from '../../models/IProductInvoice';
|
|
|
4
4
|
import { ReadFormattedAccountingTransaction } from '../accountingEntry/AnnotateAccountingTransaction';
|
|
5
5
|
import { CommercialDocumentInputs } from './Create';
|
|
6
6
|
import { IEstimateInvoice } from '../../models/IEstimateInvoice';
|
|
7
|
+
import { EstimateStatus, InvoiceStatus } from '../../../Enum/CommercialManagement';
|
|
7
8
|
|
|
8
9
|
export type ReadCashBasedInvoice = Partial<IAccountingFile>;
|
|
9
10
|
|
|
@@ -64,4 +65,22 @@ export type ReadCommercialDocumentTemplate = {
|
|
|
64
65
|
body: string;
|
|
65
66
|
footer: string;
|
|
66
67
|
data: ReadDocumentEditing;
|
|
68
|
+
};
|
|
69
|
+
|
|
70
|
+
export type ReadEstimateInvoiceStatus =
|
|
71
|
+
InvoiceStatus.PAID |
|
|
72
|
+
InvoiceStatus.UNPAID |
|
|
73
|
+
InvoiceStatus.CANCELED |
|
|
74
|
+
InvoiceStatus.WAITING |
|
|
75
|
+
EstimateStatus.REFUSED |
|
|
76
|
+
EstimateStatus.BILLED |
|
|
77
|
+
EstimateStatus.ACCEPTED |
|
|
78
|
+
EstimateStatus.WAITING |
|
|
79
|
+
EstimateStatus.EXPIRED;
|
|
80
|
+
|
|
81
|
+
type CountAndNumber = { count: number; amount: number; };
|
|
82
|
+
|
|
83
|
+
export type ReadCountDocumentByStatus = {
|
|
84
|
+
invoices: { paid: CountAndNumber; waiting: CountAndNumber; unpaid: CountAndNumber; }
|
|
85
|
+
preSales: { accepted: CountAndNumber; waiting: CountAndNumber; refused: CountAndNumber; }
|
|
67
86
|
};
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
|
-
IsBoolean, IsDate, IsOptional, IsString,
|
|
2
|
+
IsBoolean, IsDate, IsDateString, IsEnum, IsOptional, IsString,
|
|
3
3
|
} from 'class-validator';
|
|
4
4
|
import { ApiPropertyOptional } from '../../../../utils';
|
|
5
5
|
import { ToBoolean } from '../../../../utils/transforms/boolean.transform';
|
|
6
|
+
import { RecurrenceType } from '../../../Enum/RecurrenceType';
|
|
6
7
|
|
|
7
8
|
export class UpdateCommercialDocument {
|
|
8
9
|
@ApiPropertyOptional()
|
|
@@ -69,4 +70,27 @@ export class UpdateReminder {
|
|
|
69
70
|
@IsString()
|
|
70
71
|
@IsOptional()
|
|
71
72
|
message?: string;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
export class UpdateRecurrence {
|
|
76
|
+
@ApiPropertyOptional()
|
|
77
|
+
@IsEnum(RecurrenceType)
|
|
78
|
+
@IsOptional()
|
|
79
|
+
type?: number;
|
|
80
|
+
|
|
81
|
+
@ApiPropertyOptional()
|
|
82
|
+
@IsDateString()
|
|
83
|
+
@IsOptional()
|
|
84
|
+
startDate?: string;
|
|
85
|
+
|
|
86
|
+
@ApiPropertyOptional()
|
|
87
|
+
@IsDateString()
|
|
88
|
+
@IsOptional()
|
|
89
|
+
endDate?: string;
|
|
90
|
+
|
|
91
|
+
@ApiPropertyOptional()
|
|
92
|
+
@ToBoolean()
|
|
93
|
+
@IsBoolean()
|
|
94
|
+
@IsOptional()
|
|
95
|
+
isActive?: boolean;
|
|
72
96
|
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { IsDateString, IsOptional } from 'class-validator';
|
|
2
|
+
import { ApiPropertyOptional } from '../../../../utils';
|
|
3
|
+
|
|
4
|
+
export class CreateImportation {
|
|
5
|
+
@ApiPropertyOptional()
|
|
6
|
+
@IsOptional()
|
|
7
|
+
@IsDateString()
|
|
8
|
+
minDate?: string;
|
|
9
|
+
|
|
10
|
+
@ApiPropertyOptional()
|
|
11
|
+
@IsOptional()
|
|
12
|
+
@IsDateString()
|
|
13
|
+
maxDate?: string ;
|
|
14
|
+
}
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
type QontoOrganisationBankAccount = {
|
|
2
|
+
slug: string;
|
|
3
|
+
iban: string;
|
|
4
|
+
bic: string | null;
|
|
5
|
+
currency: string;
|
|
6
|
+
balance: number;
|
|
7
|
+
balance_cents: number;
|
|
8
|
+
authorized_balance: number;
|
|
9
|
+
authorized_balance_cents: number;
|
|
10
|
+
updated_at: string;
|
|
11
|
+
status: 'active' | 'closed';
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
export type GetQontoOrganization = {
|
|
15
|
+
organization: {
|
|
16
|
+
slug: string;
|
|
17
|
+
legal_name: string | null;
|
|
18
|
+
bank_accounts: QontoOrganisationBankAccount[];
|
|
19
|
+
}
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
export type GetQontoTransactionsResponse = {
|
|
23
|
+
transactions: QontoTransaction[];
|
|
24
|
+
meta: {
|
|
25
|
+
current_page: number;
|
|
26
|
+
next_page: number | null;
|
|
27
|
+
prev_page: number | null;
|
|
28
|
+
total_pages: number;
|
|
29
|
+
total_count: number;
|
|
30
|
+
per_page: number;
|
|
31
|
+
}
|
|
32
|
+
};
|
|
33
|
+
|
|
34
|
+
export type QontoTransaction = {
|
|
35
|
+
transaction_id: string;
|
|
36
|
+
amount: number;
|
|
37
|
+
amount_cents: number;
|
|
38
|
+
settled_balance: number;
|
|
39
|
+
settled_balance_cents: number;
|
|
40
|
+
attachment_ids: string[],
|
|
41
|
+
local_amount: number;
|
|
42
|
+
local_amount_cents: number;
|
|
43
|
+
side: string;
|
|
44
|
+
operation_type: string;
|
|
45
|
+
currency: string;
|
|
46
|
+
local_currency: string;
|
|
47
|
+
label: string;
|
|
48
|
+
settled_at: string;
|
|
49
|
+
emitted_at: string;
|
|
50
|
+
updated_at: string;
|
|
51
|
+
status: string;
|
|
52
|
+
note: string;
|
|
53
|
+
reference: string | null;
|
|
54
|
+
vat_amount: number | null;
|
|
55
|
+
vat_amount_cents: number | null;
|
|
56
|
+
vat_rate: number | null;
|
|
57
|
+
initiator_id: string | null;
|
|
58
|
+
label_ids: string[];
|
|
59
|
+
attachment_lost: boolean,
|
|
60
|
+
attachment_required: boolean,
|
|
61
|
+
card_last_digits: string | null,
|
|
62
|
+
category: string | null,
|
|
63
|
+
id: string | null
|
|
64
|
+
};
|
|
65
|
+
|
|
66
|
+
export type GetQontoAttachment = {
|
|
67
|
+
id: string;
|
|
68
|
+
created_at: string;
|
|
69
|
+
file_name: string;
|
|
70
|
+
file_size: string;
|
|
71
|
+
file_content_type: string;
|
|
72
|
+
url: string;
|
|
73
|
+
probative_attachment: {
|
|
74
|
+
status: string;
|
|
75
|
+
file_name: string;
|
|
76
|
+
file_content_type: string;
|
|
77
|
+
file_size:string;
|
|
78
|
+
url: string | null;
|
|
79
|
+
}
|
|
80
|
+
};
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
|
-
|
|
2
|
+
IsBoolean,
|
|
3
|
+
IsDate, IsInt, IsNumber, IsOptional, IsString,
|
|
3
4
|
} from 'class-validator';
|
|
4
|
-
import { ApiProperty } from '../../../..';
|
|
5
|
+
import { ApiProperty, ApiPropertyOptional } from '../../../..';
|
|
6
|
+
import { ToBoolean } from '../../../../utils/transforms/boolean.transform';
|
|
5
7
|
|
|
6
8
|
export class QueryRevision {
|
|
7
9
|
@ApiProperty()
|
|
@@ -16,6 +18,17 @@ export class QueryRevision {
|
|
|
16
18
|
@IsInt()
|
|
17
19
|
idSociety: number;
|
|
18
20
|
|
|
21
|
+
@ApiPropertyOptional()
|
|
22
|
+
@IsString()
|
|
23
|
+
@IsOptional()
|
|
24
|
+
orderBy?: 'designation' | 'amount' | 'number';
|
|
25
|
+
|
|
26
|
+
@ApiPropertyOptional()
|
|
27
|
+
@IsBoolean()
|
|
28
|
+
@ToBoolean()
|
|
29
|
+
@IsOptional()
|
|
30
|
+
descending?: boolean;
|
|
31
|
+
|
|
19
32
|
// Interface paginate
|
|
20
33
|
@ApiProperty({ default: 25 })
|
|
21
34
|
@IsNumber()
|
|
@@ -1,17 +1,16 @@
|
|
|
1
1
|
import {
|
|
2
|
-
|
|
2
|
+
IsBoolean,
|
|
3
|
+
IsDate, IsInt, IsNumber, IsOptional, IsString,
|
|
3
4
|
} from 'class-validator';
|
|
4
5
|
import { ApiProperty, QueryPaginate } from '../../../..';
|
|
5
6
|
import { ApiPropertyOptional } from '../../../../utils';
|
|
7
|
+
import { ToBoolean } from '../../../../utils/transforms/boolean.transform';
|
|
6
8
|
|
|
7
9
|
export class QueryRevisionAccount implements QueryPaginate {
|
|
8
10
|
@ApiProperty({ default: 1 })
|
|
9
11
|
@IsNumber()
|
|
10
12
|
page: number;
|
|
11
13
|
|
|
12
|
-
@ApiPropertyOptional({ default: 'idAccount' })
|
|
13
|
-
orderBy?: string;
|
|
14
|
-
|
|
15
14
|
@ApiProperty()
|
|
16
15
|
@IsDate()
|
|
17
16
|
startDate: Date;
|
|
@@ -24,7 +23,15 @@ export class QueryRevisionAccount implements QueryPaginate {
|
|
|
24
23
|
@IsNumber()
|
|
25
24
|
limit: number;
|
|
26
25
|
|
|
26
|
+
@ApiPropertyOptional({ default: 'idAccount' })
|
|
27
|
+
@IsString()
|
|
28
|
+
@IsOptional()
|
|
29
|
+
orderBy?: 'date' | 'designation' | 'idAccount' | 'debit' | 'credit';
|
|
30
|
+
|
|
27
31
|
@ApiPropertyOptional({ default: true })
|
|
32
|
+
@IsBoolean()
|
|
33
|
+
@ToBoolean()
|
|
34
|
+
@IsOptional()
|
|
28
35
|
descending?: boolean;
|
|
29
36
|
|
|
30
37
|
@ApiPropertyOptional()
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
|
-
|
|
2
|
+
IsBoolean,
|
|
3
|
+
IsDate, IsInt, IsNumber, IsOptional, IsString,
|
|
3
4
|
} from 'class-validator';
|
|
4
|
-
import { ApiProperty } from '../../../..';
|
|
5
|
+
import { ApiProperty, ApiPropertyOptional } from '../../../..';
|
|
6
|
+
import { ToBoolean } from '../../../../utils/transforms/boolean.transform';
|
|
5
7
|
|
|
6
8
|
export class QueryRevisionPaginate {
|
|
7
9
|
@ApiProperty()
|
|
@@ -16,6 +18,17 @@ export class QueryRevisionPaginate {
|
|
|
16
18
|
@IsInt()
|
|
17
19
|
idSociety: number;
|
|
18
20
|
|
|
21
|
+
@ApiPropertyOptional()
|
|
22
|
+
@IsString()
|
|
23
|
+
@IsOptional()
|
|
24
|
+
orderBy?: 'designation' | 'amount' | 'number';
|
|
25
|
+
|
|
26
|
+
@ApiPropertyOptional()
|
|
27
|
+
@IsBoolean()
|
|
28
|
+
@ToBoolean()
|
|
29
|
+
@IsOptional()
|
|
30
|
+
descending?: boolean;
|
|
31
|
+
|
|
19
32
|
// Interface paginate
|
|
20
33
|
@ApiProperty({ default: 25 })
|
|
21
34
|
@IsNumber()
|
|
@@ -82,7 +82,7 @@ export class QueryRevisionSearchEntries {
|
|
|
82
82
|
@ApiPropertyOptional({ default: 'date' })
|
|
83
83
|
@IsString()
|
|
84
84
|
@IsOptional()
|
|
85
|
-
orderBy?: 'date' | 'accountNumber' | 'amount' | 'designation' | 'vatRate';
|
|
85
|
+
orderBy?: 'date' | 'accountNumber' | 'amount' | 'designation' | 'vatRate' | 'debit' | 'credit';
|
|
86
86
|
|
|
87
87
|
@ApiPropertyOptional()
|
|
88
88
|
@IsBoolean()
|
|
@@ -5,6 +5,10 @@ import { ApiPropertyOptional } from '../../../../utils';
|
|
|
5
5
|
import { ToBoolean } from '../../../../utils/transforms/boolean.transform';
|
|
6
6
|
|
|
7
7
|
export class QueryPaginatedTask {
|
|
8
|
+
@ApiPropertyOptional()
|
|
9
|
+
@IsOptional()
|
|
10
|
+
isIntern?: boolean;
|
|
11
|
+
|
|
8
12
|
@ApiPropertyOptional()
|
|
9
13
|
@IsOptional()
|
|
10
14
|
@IsInt()
|
|
@@ -36,6 +40,11 @@ export class QueryPaginatedTask {
|
|
|
36
40
|
@IsInt()
|
|
37
41
|
idUser?: number;
|
|
38
42
|
|
|
43
|
+
@ApiPropertyOptional({ description: 'roles for filter tasks' })
|
|
44
|
+
@IsOptional()
|
|
45
|
+
@IsInt()
|
|
46
|
+
idService?: number;
|
|
47
|
+
|
|
39
48
|
@ApiPropertyOptional({ description: 'user who terminate the task' })
|
|
40
49
|
@IsOptional()
|
|
41
50
|
@IsInt()
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import {
|
|
2
|
+
IsIn,
|
|
2
3
|
IsNumber,
|
|
3
4
|
IsOptional, IsString,
|
|
4
5
|
} from 'class-validator';
|
|
@@ -26,4 +27,12 @@ export class ParamsGetAllCollaborators {
|
|
|
26
27
|
@IsOptional()
|
|
27
28
|
@IsNumber()
|
|
28
29
|
idUser?: number[];
|
|
30
|
+
|
|
31
|
+
@ApiPropertyOptional()
|
|
32
|
+
@IsOptional()
|
|
33
|
+
@IsString({
|
|
34
|
+
each: true,
|
|
35
|
+
})
|
|
36
|
+
@IsIn(['avatar', 'teams', 'businessLines'], { each: true })
|
|
37
|
+
include?: string[];
|
|
29
38
|
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { IsIn, IsOptional, IsString } from 'class-validator';
|
|
2
|
+
import { ApiProperty, ApiPropertyOptional } from '../../../../utils';
|
|
2
3
|
|
|
3
4
|
export class QueryGetAllCollaborators {
|
|
4
5
|
@ApiProperty({
|
|
@@ -8,4 +9,12 @@ export class QueryGetAllCollaborators {
|
|
|
8
9
|
example: [1, 13],
|
|
9
10
|
})
|
|
10
11
|
idUser?: number[];
|
|
12
|
+
|
|
13
|
+
@ApiPropertyOptional()
|
|
14
|
+
@IsOptional()
|
|
15
|
+
@IsString({
|
|
16
|
+
each: true,
|
|
17
|
+
})
|
|
18
|
+
@IsIn(['avatar', 'teams', 'businessLines'], { each: true })
|
|
19
|
+
include?: string[];
|
|
11
20
|
}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { IProductInvoice } from './IProductInvoice';
|
|
2
|
-
import { IEstimateInvoiceRepeat } from './IEstimateInvoiceRepeat';
|
|
3
2
|
import { IPaymentExpectationCustomer } from './IPaymentExpectationCustomer';
|
|
4
3
|
import { IThirdParty } from './IThirdParty';
|
|
5
4
|
import { IFrequency } from './IFrequency';
|
|
@@ -7,6 +6,8 @@ import { IEstimateInvoiceType } from './IEstimateInvoiceType';
|
|
|
7
6
|
import { ISociety } from './ISociety';
|
|
8
7
|
import { IInvoiceReminder } from './IInvoiceReminder';
|
|
9
8
|
import { IFile } from './IFile';
|
|
9
|
+
import { IInvoiceRecurrence } from './IInvoiceRecurrence';
|
|
10
|
+
import { ReadEstimateInvoiceStatus } from '../api/commercialManagement/Read';
|
|
10
11
|
|
|
11
12
|
// estimatesInvoices
|
|
12
13
|
export interface IEstimateInvoice {
|
|
@@ -38,6 +39,7 @@ export interface IEstimateInvoice {
|
|
|
38
39
|
lastRelanceDate: Date | null;
|
|
39
40
|
isRefused: boolean;
|
|
40
41
|
isCanceled: boolean;
|
|
42
|
+
status?: ReadEstimateInvoiceStatus;
|
|
41
43
|
idFile?: number | null;
|
|
42
44
|
idRelatedInvoice: number | null;
|
|
43
45
|
idTypeEstimateInvoice: number | number[];
|
|
@@ -58,9 +60,9 @@ export interface IEstimateInvoice {
|
|
|
58
60
|
society?: ISociety;
|
|
59
61
|
assetRelatedToThisEstimateInvoice?: IEstimateInvoice;
|
|
60
62
|
estimateInvoiceForThisAsset?: IEstimateInvoice;
|
|
61
|
-
estimateInvoiceEstimateInvoiceRepeat?: IEstimateInvoiceRepeat;
|
|
62
63
|
estimateInvoiceForThisRepeat?: IEstimateInvoice;
|
|
63
64
|
invoiceReminder?: IInvoiceReminder;
|
|
64
65
|
relatedInvoice?: IEstimateInvoice;
|
|
66
|
+
recurrence?: IInvoiceRecurrence;
|
|
65
67
|
file?: IFile;
|
|
66
68
|
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { IEstimateInvoice } from '../..';
|
|
2
|
+
import { RecurrenceType } from '../../Enum/RecurrenceType';
|
|
3
|
+
|
|
4
|
+
export interface IInvoiceRecurrence {
|
|
5
|
+
id?: number;
|
|
6
|
+
type: RecurrenceType;
|
|
7
|
+
startDate: Date;
|
|
8
|
+
endDate: Date;
|
|
9
|
+
lastSend: Date | null;
|
|
10
|
+
isActive: boolean;
|
|
11
|
+
idEstimateInvoice: number;
|
|
12
|
+
createdAt?: Date;
|
|
13
|
+
updatedAt?: Date;
|
|
14
|
+
|
|
15
|
+
estimateInvoice?: IEstimateInvoice;
|
|
16
|
+
}
|
|
@@ -16,7 +16,7 @@ export interface ITask {
|
|
|
16
16
|
idSociety: number,
|
|
17
17
|
description?: string | null,
|
|
18
18
|
idRole?: number,
|
|
19
|
-
|
|
19
|
+
idService?: number,
|
|
20
20
|
idMail?: number,
|
|
21
21
|
deadlineAt: Date,
|
|
22
22
|
idUserWhoProcessed?: number,
|
|
@@ -29,7 +29,7 @@ export interface ITask {
|
|
|
29
29
|
userWhoCreated?: IUser;
|
|
30
30
|
society?: ISociety;
|
|
31
31
|
role?: IRole;
|
|
32
|
-
|
|
32
|
+
service?: IRole;
|
|
33
33
|
userWhoProcessed?: IUser;
|
|
34
34
|
userWhoRefused?: IUser;
|
|
35
35
|
calendarEvent?: ICalendarEvent;
|
package/ts/types/index.ts
CHANGED
|
@@ -311,6 +311,7 @@ export * from './Interface/models/ITask';
|
|
|
311
311
|
export * from './Interface/models/IMobileNotificationLog';
|
|
312
312
|
export * from './Interface/models/IMobileNotificationSetting';
|
|
313
313
|
export * from './Interface/models/ITimeRecorder';
|
|
314
|
+
export * from './Interface/models/IInvoiceRecurrence';
|
|
314
315
|
export * from './Interface/models/ILoanFile';
|
|
315
316
|
export * from './Interface/models/ICommercialMail';
|
|
316
317
|
|
|
@@ -434,6 +435,7 @@ export * from './Enum/InternalService';
|
|
|
434
435
|
export * from './Enum/SocietyTypeEvent';
|
|
435
436
|
export * from './Enum/Call';
|
|
436
437
|
export * from './Enum/ConnectionError';
|
|
438
|
+
export * from './Enum/RecurrenceType';
|
|
437
439
|
|
|
438
440
|
// Interfaces API
|
|
439
441
|
export * from './Interface/api/partnerTransactionType/ReadPartnerTransactionType';
|
|
@@ -520,11 +522,9 @@ export * from './Interface/api/dashboard/QueryBalanceBankAccount';
|
|
|
520
522
|
export * from './Interface/api/dashboard/QueryTopBuys';
|
|
521
523
|
export * from './Interface/api/dashboard/QueryTopProviders';
|
|
522
524
|
export * from './Interface/api/dashboard/ReadBalanceBankAccount';
|
|
523
|
-
export * from './Interface/api/dashboard/QueryGescom';
|
|
524
525
|
export * from './Interface/api/dashboard/QueryDeadline';
|
|
525
526
|
export * from './Interface/api/dashboard/ReadTopBuys';
|
|
526
527
|
export * from './Interface/api/dashboard/ReadTopProviders';
|
|
527
|
-
export * from './Interface/api/dashboard/ReadGescom';
|
|
528
528
|
export * from './Interface/api/dashboard/ReadDeadline';
|
|
529
529
|
export * from './Interface/api/accountant/ReadAccountantBalance';
|
|
530
530
|
export * from './Interface/api/quotes/QueryQuotesAccount';
|
|
@@ -772,6 +772,8 @@ export * from './Interface/api/connector/CreateConnector';
|
|
|
772
772
|
export * from './Interface/api/connector/QueryConnector';
|
|
773
773
|
export * from './Interface/api/connection/QueryConnectionState';
|
|
774
774
|
export * from './Interface/api/connection/ReadConnectionState';
|
|
775
|
+
export * from './Interface/api/qonto/Query';
|
|
776
|
+
export * from './Interface/api/qonto/CreateImportation';
|
|
775
777
|
|
|
776
778
|
// Enums types
|
|
777
779
|
export * from './Interface/enum/Util';
|
|
@@ -13,12 +13,7 @@ import { productToReadProductEditing } from './product';
|
|
|
13
13
|
import { vatToReadVatEditing } from './vat';
|
|
14
14
|
import { CreateInvoiceDocument, CreatePreSaleDocument } from '../../types';
|
|
15
15
|
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
if (process.version) {
|
|
19
|
-
// eslint-disable-next-line global-require
|
|
20
|
-
ejs = require('ejs');
|
|
21
|
-
}
|
|
16
|
+
const ejs = require('ejs');
|
|
22
17
|
|
|
23
18
|
export function generateCommercialDocument(idEstimateInvoiceType: EstimateInvoiceType, payload: CreateInvoiceDocument | CreatePreSaleDocument): ReadCommercialDocumentTemplate {
|
|
24
19
|
const products = _orderBy(payload.products.map((product) => productToReadProductEditing(product), 'reorder'));
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import * as dayjs from 'dayjs';
|
|
2
|
+
import { OpUnitType } from 'dayjs';
|
|
3
|
+
import { RecurrenceType } from '../../types/Enum/RecurrenceType';
|
|
4
|
+
|
|
5
|
+
const isSameOrBefore = require('dayjs/plugin/isSameOrBefore');
|
|
6
|
+
const quarterOfYear = require('dayjs/plugin/quarterOfYear');
|
|
7
|
+
|
|
8
|
+
dayjs.extend(quarterOfYear);
|
|
9
|
+
dayjs.extend(isSameOrBefore);
|
|
10
|
+
|
|
11
|
+
export function getAllRecurrences(params: {
|
|
12
|
+
startDate: string;
|
|
13
|
+
endDate: string | null;
|
|
14
|
+
type: RecurrenceType;
|
|
15
|
+
}): string[] {
|
|
16
|
+
const { startDate, type } = params;
|
|
17
|
+
const endDate = params.endDate ?? '2100-01-01';
|
|
18
|
+
|
|
19
|
+
let loop = 0;
|
|
20
|
+
|
|
21
|
+
let recurrency: OpUnitType = 'month';
|
|
22
|
+
|
|
23
|
+
if (type === RecurrenceType.MONHLY) recurrency = 'month';
|
|
24
|
+
// @ts-ignore
|
|
25
|
+
else if (type === RecurrenceType.QUATERLY) recurrency = 'quarter';
|
|
26
|
+
else if (type === RecurrenceType.WEEKLY) recurrency = 'week';
|
|
27
|
+
else if (type === RecurrenceType.YEARLY) recurrency = 'year';
|
|
28
|
+
|
|
29
|
+
const nextInvoices: string[] = [];
|
|
30
|
+
|
|
31
|
+
// @ts-ignore
|
|
32
|
+
while (dayjs(startDate).add(loop, recurrency).isSameOrBefore(endDate)) {
|
|
33
|
+
const currentDate = dayjs(startDate).add(loop, recurrency);
|
|
34
|
+
nextInvoices.push(currentDate.format('YYYY-MM-DD'));
|
|
35
|
+
loop += 1;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
return nextInvoices;
|
|
39
|
+
}
|
package/ts/utils/index.ts
CHANGED
package/ts/utils/task.ts
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { Role } from '../types/Enum/Role';
|
|
2
|
+
import { TaskResponseType, RoleAvailableForTask } from '../types/Enum/TaskResponseType';
|
|
2
3
|
|
|
3
4
|
const getIdRoleUsedForTask = (listRoles: number[]): number => {
|
|
4
5
|
let idRole = 0;
|
|
5
|
-
if (listRoles.includes(Role.COMMERCIAL)
|
|
6
|
+
if (listRoles.includes(Role.COMMERCIAL)) {
|
|
6
7
|
idRole = Role.COMMERCIAL;
|
|
7
8
|
} else if (listRoles.includes(Role.JURIDIC)) {
|
|
8
9
|
idRole = Role.JURIDIC;
|
|
@@ -10,28 +11,35 @@ const getIdRoleUsedForTask = (listRoles: number[]): number => {
|
|
|
10
11
|
idRole = Role.SOCIAL;
|
|
11
12
|
} else if (listRoles.includes(Role.FACTURATION)) {
|
|
12
13
|
idRole = Role.FACTURATION;
|
|
13
|
-
} else if (listRoles.includes(Role.CUSTOMER_SUCCESS)
|
|
14
|
+
} else if (listRoles.includes(Role.CUSTOMER_SUCCESS)) {
|
|
14
15
|
idRole = Role.CUSTOMER_SUCCESS;
|
|
15
|
-
} else if (listRoles.includes(Role.FRONT_OFFICE)
|
|
16
|
+
} else if (listRoles.includes(Role.FRONT_OFFICE)) {
|
|
16
17
|
idRole = Role.FRONT_OFFICE;
|
|
17
18
|
}
|
|
18
19
|
return idRole;
|
|
19
20
|
};
|
|
20
21
|
|
|
21
|
-
const getIdRoleUsedForManagerTask = (listRoles: number[]): number => {
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
22
|
+
// const getIdRoleUsedForManagerTask = (listRoles: number[]): number => {
|
|
23
|
+
// let idRole = 0;
|
|
24
|
+
// if (listRoles.includes(Role.COMMERCIAL)) {
|
|
25
|
+
// idRole = Role.MANAGER;
|
|
26
|
+
// } else if (listRoles.includes(Role.JURIDIC) || listRoles.includes(Role.SOCIAL) || listRoles.includes(Role.FACTURATION)) {
|
|
27
|
+
// idRole = Role.MANAGER;
|
|
28
|
+
// } else if (listRoles.includes(Role.CUSTOMER_SUCCESS)) {
|
|
29
|
+
// idRole = Role.MANAGER;
|
|
30
|
+
// } else if (listRoles.includes(Role.FRONT_OFFICE)) {
|
|
31
|
+
// idRole = Role.MANAGER;
|
|
32
|
+
// }
|
|
33
|
+
// return idRole;
|
|
34
|
+
// };
|
|
35
|
+
|
|
36
|
+
const getIdRoleUsedForAttribution = (isIntern: boolean, idTaskType: number): number | undefined => {
|
|
37
|
+
const taskTypeList = isIntern ? TaskResponseType.INTERN.types : TaskResponseType.EXTERN.types;
|
|
38
|
+
return taskTypeList.find((taskType) => taskType.id === idTaskType)?.role;
|
|
33
39
|
};
|
|
34
40
|
|
|
41
|
+
const getIdRoleUsedForGetTaskOfUser = (idRole: number): boolean => !!Object.values(RoleAvailableForTask).find((role) => role === idRole);
|
|
42
|
+
|
|
35
43
|
export {
|
|
36
|
-
getIdRoleUsedForTask,
|
|
44
|
+
getIdRoleUsedForTask, getIdRoleUsedForAttribution, getIdRoleUsedForGetTaskOfUser,
|
|
37
45
|
};
|
package/ts/utils/webmail.ts
CHANGED
|
@@ -4,13 +4,11 @@ const getIdRoleUsedForEmail = (listRoles: number[]): number => {
|
|
|
4
4
|
let idRole = Role.CUSTOMER_SUCCESS;
|
|
5
5
|
if (listRoles.includes(Role.FACTURATION)) {
|
|
6
6
|
idRole = Role.FACTURATION;
|
|
7
|
-
} else if (listRoles.includes(Role.BACK_MANAGER)) {
|
|
8
|
-
idRole = Role.BACK_MANAGER;
|
|
9
7
|
} else if (listRoles.includes(Role.FRONT_OFFICE)) {
|
|
10
8
|
idRole = Role.FRONT_OFFICE;
|
|
11
9
|
} else if (listRoles.includes(Role.FRONT_OFFICE_EXPRESS)) {
|
|
12
10
|
idRole = Role.FRONT_OFFICE_EXPRESS;
|
|
13
|
-
} else if (listRoles.includes(Role.COMMERCIAL)
|
|
11
|
+
} else if (listRoles.includes(Role.COMMERCIAL)) {
|
|
14
12
|
idRole = Role.COMMERCIAL;
|
|
15
13
|
} else if (listRoles.includes(Role.EXPERT_ACCOUNTANT)) {
|
|
16
14
|
idRole = Role.EXPERT_ACCOUNTANT;
|