@silexpert/core 1.1.259 → 1.1.261
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/TerminationList.d.ts +5 -3
- package/dist/cjs/api/resources/TerminationList.d.ts.map +1 -1
- package/dist/cjs/api/resources/TerminationList.js +6 -0
- package/dist/cjs/api/resources/TerminationList.js.map +1 -1
- package/dist/cjs/types/Enum/FollowList.d.ts +14 -4
- package/dist/cjs/types/Enum/FollowList.d.ts.map +1 -1
- package/dist/cjs/types/Enum/FollowList.js +32 -12
- package/dist/cjs/types/Enum/FollowList.js.map +1 -1
- package/dist/cjs/types/Enum/Ged.d.ts.map +1 -1
- package/dist/cjs/types/Enum/Ged.js +2 -0
- package/dist/cjs/types/Enum/Ged.js.map +1 -1
- package/dist/cjs/types/Enum/InternalService.d.ts +4 -0
- package/dist/cjs/types/Enum/InternalService.d.ts.map +1 -1
- package/dist/cjs/types/Enum/InternalService.js +4 -0
- package/dist/cjs/types/Enum/InternalService.js.map +1 -1
- package/dist/cjs/types/Enum/RefundReason.d.ts +40 -0
- package/dist/cjs/types/Enum/RefundReason.d.ts.map +1 -0
- package/dist/cjs/types/Enum/RefundReason.js +54 -0
- package/dist/cjs/types/Enum/RefundReason.js.map +1 -0
- package/dist/cjs/types/Enum/TaskResponseType.js +2 -2
- package/dist/cjs/types/Enum/TaskResponseType.js.map +1 -1
- package/dist/cjs/types/Enum/TerminationList.d.ts +18 -0
- package/dist/cjs/types/Enum/TerminationList.d.ts.map +1 -0
- package/dist/cjs/types/Enum/TerminationList.js +39 -0
- package/dist/cjs/types/Enum/TerminationList.js.map +1 -0
- package/dist/cjs/types/Interface/api/terminationList/CreateTerminationList.d.ts +9 -4
- package/dist/cjs/types/Interface/api/terminationList/CreateTerminationList.d.ts.map +1 -1
- package/dist/cjs/types/Interface/api/terminationList/CreateTerminationList.js +33 -7
- package/dist/cjs/types/Interface/api/terminationList/CreateTerminationList.js.map +1 -1
- package/dist/cjs/types/Interface/api/terminationList/QueryPaginateTerminationList.d.ts +17 -0
- package/dist/cjs/types/Interface/api/terminationList/QueryPaginateTerminationList.d.ts.map +1 -0
- package/dist/cjs/types/Interface/api/terminationList/QueryPaginateTerminationList.js +106 -0
- package/dist/cjs/types/Interface/api/terminationList/QueryPaginateTerminationList.js.map +1 -0
- package/dist/cjs/types/Interface/models/IRefund.d.ts +4 -4
- package/dist/cjs/types/Interface/models/IRefund.d.ts.map +1 -1
- package/dist/cjs/types/Interface/models/IRefund.js.map +1 -1
- package/dist/cjs/types/Interface/models/ISms.d.ts +1 -1
- package/dist/cjs/types/Interface/models/ISms.d.ts.map +1 -1
- package/dist/cjs/types/Interface/models/ISms.js.map +1 -1
- package/dist/cjs/types/Interface/models/ITerminationList.d.ts +5 -0
- package/dist/cjs/types/Interface/models/ITerminationList.d.ts.map +1 -1
- package/dist/cjs/types/Interface/models/ITerminationList.js.map +1 -1
- package/dist/cjs/types/Interface/models/IUserBrand.d.ts +2 -0
- package/dist/cjs/types/Interface/models/IUserBrand.d.ts.map +1 -1
- package/dist/cjs/types/Interface/models/IUserBrand.js.map +1 -1
- package/dist/cjs/types/index.d.ts +3 -0
- package/dist/cjs/types/index.d.ts.map +1 -1
- package/dist/cjs/types/index.js +3 -0
- package/dist/cjs/types/index.js.map +1 -1
- package/dist/cjs/utils/date.d.ts +6 -0
- package/dist/cjs/utils/date.d.ts.map +1 -1
- package/dist/cjs/utils/date.js +35 -1
- package/dist/cjs/utils/date.js.map +1 -1
- package/dist/mjs/api/resources/TerminationList.d.ts +5 -3
- package/dist/mjs/api/resources/TerminationList.d.ts.map +1 -1
- package/dist/mjs/api/resources/TerminationList.js +6 -0
- package/dist/mjs/api/resources/TerminationList.js.map +1 -1
- package/dist/mjs/types/Enum/FollowList.d.ts +14 -4
- package/dist/mjs/types/Enum/FollowList.d.ts.map +1 -1
- package/dist/mjs/types/Enum/FollowList.js +32 -12
- package/dist/mjs/types/Enum/FollowList.js.map +1 -1
- package/dist/mjs/types/Enum/Ged.d.ts.map +1 -1
- package/dist/mjs/types/Enum/Ged.js +2 -0
- package/dist/mjs/types/Enum/Ged.js.map +1 -1
- package/dist/mjs/types/Enum/InternalService.d.ts +4 -0
- package/dist/mjs/types/Enum/InternalService.d.ts.map +1 -1
- package/dist/mjs/types/Enum/InternalService.js +4 -0
- package/dist/mjs/types/Enum/InternalService.js.map +1 -1
- package/dist/mjs/types/Enum/RefundReason.d.ts +40 -0
- package/dist/mjs/types/Enum/RefundReason.d.ts.map +1 -0
- package/dist/mjs/types/Enum/RefundReason.js +51 -0
- package/dist/mjs/types/Enum/RefundReason.js.map +1 -0
- package/dist/mjs/types/Enum/TaskResponseType.js +2 -2
- package/dist/mjs/types/Enum/TaskResponseType.js.map +1 -1
- package/dist/mjs/types/Enum/TerminationList.d.ts +18 -0
- package/dist/mjs/types/Enum/TerminationList.d.ts.map +1 -0
- package/dist/mjs/types/Enum/TerminationList.js +36 -0
- package/dist/mjs/types/Enum/TerminationList.js.map +1 -0
- package/dist/mjs/types/Interface/api/terminationList/CreateTerminationList.d.ts +9 -4
- package/dist/mjs/types/Interface/api/terminationList/CreateTerminationList.d.ts.map +1 -1
- package/dist/mjs/types/Interface/api/terminationList/CreateTerminationList.js +39 -8
- package/dist/mjs/types/Interface/api/terminationList/CreateTerminationList.js.map +1 -1
- package/dist/mjs/types/Interface/api/terminationList/QueryPaginateTerminationList.d.ts +17 -0
- package/dist/mjs/types/Interface/api/terminationList/QueryPaginateTerminationList.d.ts.map +1 -0
- package/dist/mjs/types/Interface/api/terminationList/QueryPaginateTerminationList.js +116 -0
- package/dist/mjs/types/Interface/api/terminationList/QueryPaginateTerminationList.js.map +1 -0
- package/dist/mjs/types/Interface/models/IRefund.d.ts +4 -4
- package/dist/mjs/types/Interface/models/IRefund.d.ts.map +1 -1
- package/dist/mjs/types/Interface/models/IRefund.js.map +1 -1
- package/dist/mjs/types/Interface/models/ISms.d.ts +1 -1
- package/dist/mjs/types/Interface/models/ISms.d.ts.map +1 -1
- package/dist/mjs/types/Interface/models/ISms.js.map +1 -1
- package/dist/mjs/types/Interface/models/ITerminationList.d.ts +5 -0
- package/dist/mjs/types/Interface/models/ITerminationList.d.ts.map +1 -1
- package/dist/mjs/types/Interface/models/ITerminationList.js.map +1 -1
- package/dist/mjs/types/Interface/models/IUserBrand.d.ts +2 -0
- package/dist/mjs/types/Interface/models/IUserBrand.d.ts.map +1 -1
- package/dist/mjs/types/Interface/models/IUserBrand.js.map +1 -1
- package/dist/mjs/types/index.d.ts +3 -0
- package/dist/mjs/types/index.d.ts.map +1 -1
- package/dist/mjs/types/index.js +3 -0
- package/dist/mjs/types/index.js.map +1 -1
- package/dist/mjs/utils/date.d.ts +6 -0
- package/dist/mjs/utils/date.d.ts.map +1 -1
- package/dist/mjs/utils/date.js +33 -0
- package/dist/mjs/utils/date.js.map +1 -1
- package/package.json +1 -1
- package/ts/api/resources/TerminationList.ts +11 -3
- package/ts/types/Enum/FollowList.ts +32 -12
- package/ts/types/Enum/Ged.ts +2 -0
- package/ts/types/Enum/InternalService.ts +4 -0
- package/ts/types/Enum/RefundReason.ts +50 -0
- package/ts/types/Enum/TaskResponseType.ts +2 -2
- package/ts/types/Enum/TerminationList.ts +36 -0
- package/ts/types/Interface/api/terminationList/CreateTerminationList.ts +32 -11
- package/ts/types/Interface/api/terminationList/QueryPaginateTerminationList.ts +78 -0
- package/ts/types/Interface/models/IRefund.ts +4 -4
- package/ts/types/Interface/models/ISms.ts +1 -1
- package/ts/types/Interface/models/ITerminationList.ts +5 -0
- package/ts/types/Interface/models/IUserBrand.ts +4 -3
- package/ts/types/index.ts +3 -1
- package/ts/utils/date.ts +36 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"date.js","sourceRoot":"","sources":["../../../ts/utils/date.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"date.js","sourceRoot":"","sources":["../../../ts/utils/date.ts"],"names":[],"mappings":"AAQA,OAAO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(09:00-10:00, 12:00-13:00 et 14:00-17:00)\n */\nimport {\n DateInterval, TimeInterval,\n} from '../types';\nimport * as dayjs from 'dayjs';\nimport * as timezone from 'dayjs/plugin/timezone';\ndayjs.extend(timezone);\n\n// TODO:UT\nexport function putIntervalBetweenOtherInterval(customPayload: DateInterval, listHours:TimeInterval[]):DateInterval {\n const res:DateInterval = { ...customPayload };\n if (listHours.length > 0 && customPayload?.dateStart && customPayload?.dateEnd) {\n const dateToCompareStart = new Date(customPayload.dateStart).getTime();\n const dateToCompareEnd = new Date(customPayload.dateEnd).getTime();\n const hoursObject = listHours;\n const textDate = `${new Date(dateToCompareStart).getFullYear()}-${new Date(dateToCompareStart).getMonth() + 1}-${new Date(dateToCompareStart).getDate()}`;\n\n // on cherche la bonne specialhour pour comparer les horaires\n const hoursOfPeriod = hoursObject.filter((h) => (h.endTime && (dateToCompareStart - new Date(`${textDate} ${h.endTime}`).getTime() <= 0)) && (h.startTime && (dateToCompareEnd - new Date(`${textDate} ${h.startTime}`).getTime() >= 0)));\n\n if (hoursOfPeriod?.length > 0 && hoursOfPeriod[0].startTime && hoursOfPeriod[0].endTime) {\n const dateStart = new Date(`${textDate} ${hoursOfPeriod[0].startTime}`).getTime();\n const dateEnd = new Date(`${textDate} ${hoursOfPeriod[0].endTime}`).getTime();\n\n // on check si les horaires de l'event sont dans les horaires du collab sinon on les fait commencer à l'heure à laquelle il s'est connecté\n res.dateStart = !((dateToCompareStart - dateStart) >= 0 && (dateToCompareStart - dateEnd) <= 0) ? new Date(dateStart) : new Date(dateToCompareStart);\n res.dateEnd = !((dateToCompareEnd - dateStart) >= 0 && (dateToCompareEnd - dateEnd) <= 0) ? new Date(dateEnd) : new Date(dateToCompareEnd);\n } else if (!hoursOfPeriod?.length) {\n const hoursDiff = [];\n // parcours de la liste des heures de connexions\n for (let i = 0; i < listHours.length; i += 1) {\n // ajout de la différence entre la date de début de notre événement et la date de début de notre période\n hoursDiff.push({\n id: i,\n start: true,\n end: false,\n diff: Math.abs(dateToCompareStart - new Date(`${textDate} ${listHours[i].startTime}`).getTime()),\n });\n // ajout de la différence entre la date de début de notre événement et la date de fin de notre période\n hoursDiff.push({\n id: i,\n start: false,\n end: true,\n diff: Math.abs(dateToCompareStart - new Date(`${textDate} ${listHours[i].endTime}`).getTime()),\n });\n }\n // tri de la liste par différence\n hoursDiff.sort((a, b) => a.diff - b.diff);\n // si proche de la date de début :\n // date de début event = date de début période\n // date de fin event = date de début période + 1 heure\n if (hoursDiff[0].start) {\n res.dateStart = new Date(`${textDate} ${listHours[hoursDiff[0].id].startTime}`);\n res.dateEnd = new Date(new Date(`${textDate} ${listHours[hoursDiff[0].id].startTime}`).getTime() + 3600000);\n // si proche de la date de fin :\n // date de début event = date de fin période - 1 heure\n // date de fin event = date de fin période\n } else if (hoursDiff[0].end) {\n res.dateStart = new Date(new Date(`${textDate} ${listHours[hoursDiff[0].id].endTime}`).getTime() - 3600000);\n res.dateEnd = new Date(`${textDate} ${listHours[hoursDiff[0].id].endTime}`);\n }\n }\n }\n return res;\n}\n\n/**\n * Compare UTC between now and another date (to add or subtract 1h between winter and summer time)\n * @param dateToCompare \n * @returns \n */\nexport function getUtcOffsetDiffWithNow(dateToCompare:Date):number {\n const dateToCompareUtc =\n dayjs(dateToCompare)\n .tz('Europe/Paris')\n .utcOffset() /\n (dayjs(dateToCompare)\n .tz('Europe/Paris')\n .utcOffset() > 16 ||\n dayjs(dateToCompare)\n .tz('Europe/Paris')\n .utcOffset() < 16\n ? 60\n : 1);\n const nowUtc =\n dayjs()\n .tz('Europe/Paris')\n .utcOffset() /\n (dayjs()\n .tz('Europe/Paris')\n .utcOffset() > 16 ||\n dayjs()\n .tz('Europe/Paris')\n .utcOffset() < 16\n ? 60\n : 1);\n return nowUtc - dateToCompareUtc;\n}"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@silexpert/core",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.261",
|
|
4
4
|
"description": "Silex Core perform HTTP Request and object binding. Silex core helps developers to retrieve and return formatted object",
|
|
5
5
|
"homepage": "https://gitlab.compta-clementine.fr/dev/silex-api",
|
|
6
6
|
"main": "dist/cjs/index.js",
|
|
@@ -1,16 +1,24 @@
|
|
|
1
|
-
import { CreateTerminationList, DestroyTerminationList, QueryTerminationList } from '../../types';
|
|
1
|
+
import { BasePaginate, CreateTerminationList, DestroyTerminationList, ITerminationList, QueryPaginateTerminationList, QueryTerminationList } from '../../types';
|
|
2
2
|
import { Resource } from '../Resource';
|
|
3
3
|
|
|
4
4
|
export class TerminationList extends Resource {
|
|
5
|
-
public get(params: QueryTerminationList): Promise<
|
|
5
|
+
public get(params: QueryTerminationList): Promise<ITerminationList> {
|
|
6
6
|
return this.axios.$get('/termination-lists', { params });
|
|
7
7
|
}
|
|
8
8
|
|
|
9
|
-
public
|
|
9
|
+
public getPaginate(params: QueryPaginateTerminationList): Promise<BasePaginate<ITerminationList>> {
|
|
10
|
+
return this.axios.$get('/termination-lists/paginate', { params });
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
public create(params: CreateTerminationList): Promise<ITerminationList> {
|
|
10
14
|
return this.axios.$post('/termination-lists', params);
|
|
11
15
|
}
|
|
12
16
|
|
|
13
17
|
public delete(params: DestroyTerminationList): Promise<number> {
|
|
14
18
|
return this.axios.$delete('/termination-lists', { params });
|
|
15
19
|
}
|
|
20
|
+
|
|
21
|
+
public update(id: number, params: Partial<ITerminationList>): Promise<ITerminationList> {
|
|
22
|
+
return this.axios.$patch(`/termination-lists/${id}`, params);
|
|
23
|
+
}
|
|
16
24
|
}
|
|
@@ -79,16 +79,16 @@ export const FollowList = {
|
|
|
79
79
|
name: 'Relance 5',
|
|
80
80
|
color: 'pink lighten-4',
|
|
81
81
|
},
|
|
82
|
-
NRP: {
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
},
|
|
87
|
-
CONSTITUTION_ANSWER: {
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
},
|
|
82
|
+
// NRP: {
|
|
83
|
+
// id: 17,
|
|
84
|
+
// name: 'NRP Constitution',
|
|
85
|
+
// color: 'purple lighten-3',
|
|
86
|
+
// },
|
|
87
|
+
// CONSTITUTION_ANSWER: {
|
|
88
|
+
// id: 18,
|
|
89
|
+
// name: 'Répondu Constitution',
|
|
90
|
+
// color: 'green lighten-3',
|
|
91
|
+
// },
|
|
92
92
|
RDV_PROGRAM: {
|
|
93
93
|
id: 19,
|
|
94
94
|
name: 'RDV programmé',
|
|
@@ -96,7 +96,27 @@ export const FollowList = {
|
|
|
96
96
|
},
|
|
97
97
|
ESTIMATE_RELANCE: {
|
|
98
98
|
id: 20,
|
|
99
|
-
name: 'Relance Devis',
|
|
100
|
-
color: '
|
|
99
|
+
name: 'Relance Devis 1',
|
|
100
|
+
color: 'purple lighten-1',
|
|
101
|
+
},
|
|
102
|
+
ESTIMATE_RELANCE_2: {
|
|
103
|
+
id: 21,
|
|
104
|
+
name: 'Relance Devis 2',
|
|
105
|
+
color: 'purple lighten-2',
|
|
106
|
+
},
|
|
107
|
+
ESTIMATE_RELANCE_3: {
|
|
108
|
+
id: 22,
|
|
109
|
+
name: 'Relance Devis 3',
|
|
110
|
+
color: 'purple lighten-3',
|
|
111
|
+
},
|
|
112
|
+
ESTIMATE_RELANCE_4: {
|
|
113
|
+
id: 23,
|
|
114
|
+
name: 'Relance Devis 4',
|
|
115
|
+
color: 'purple lighten-4',
|
|
116
|
+
},
|
|
117
|
+
ESTIMATE_RELANCE_5: {
|
|
118
|
+
id: 24,
|
|
119
|
+
name: 'Relance Devis 5',
|
|
120
|
+
color: 'purple lighten-5',
|
|
101
121
|
},
|
|
102
122
|
};
|
package/ts/types/Enum/Ged.ts
CHANGED
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
export enum RefundReason {
|
|
2
|
+
OVERCHARGED = 1,
|
|
3
|
+
SATISFIED_REFUNDED = 2,
|
|
4
|
+
EC_NOT_REGISTERED = 3,
|
|
5
|
+
DEBIT_AFTER_TERMINATION = 4,
|
|
6
|
+
CONFLICT = 5,
|
|
7
|
+
OTHER = 6,
|
|
8
|
+
TERMINATION = 7,
|
|
9
|
+
DEBIT_UNJUSTIFIED = 8,
|
|
10
|
+
LAB_REFUSED = 9,
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export const RefundReasonList = [
|
|
14
|
+
{
|
|
15
|
+
id: RefundReason.OVERCHARGED,
|
|
16
|
+
label: 'Trop prélevé',
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
id: RefundReason.SATISFIED_REFUNDED,
|
|
20
|
+
label: 'Satisfait / Remboursé',
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
id: RefundReason.EC_NOT_REGISTERED,
|
|
24
|
+
label: 'Ancien EC non-réglé',
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
id: RefundReason.DEBIT_AFTER_TERMINATION,
|
|
28
|
+
label: 'Prélevement après résiliation',
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
id: RefundReason.CONFLICT,
|
|
32
|
+
label: 'Conflits',
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
id: RefundReason.OTHER,
|
|
36
|
+
label: 'Autres',
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
id: RefundReason.TERMINATION,
|
|
40
|
+
label: 'Résiliation',
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
id: RefundReason.DEBIT_UNJUSTIFIED,
|
|
44
|
+
label: 'Prélèvement non justifié',
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
id: RefundReason.LAB_REFUSED,
|
|
48
|
+
label: 'Lab refusée',
|
|
49
|
+
},
|
|
50
|
+
] as const;
|
|
@@ -503,7 +503,7 @@ export const TaskResponseType = {
|
|
|
503
503
|
{
|
|
504
504
|
id: 34,
|
|
505
505
|
label: 'Mettre à jour l\'application',
|
|
506
|
-
role: Role.
|
|
506
|
+
role: Role.DATA_OFFICER,
|
|
507
507
|
deadline: Deadline,
|
|
508
508
|
isForWholeRole: false,
|
|
509
509
|
backToClient: true,
|
|
@@ -514,7 +514,7 @@ export const TaskResponseType = {
|
|
|
514
514
|
{
|
|
515
515
|
id: 35,
|
|
516
516
|
label: 'Mettre à jour l\'application',
|
|
517
|
-
role: Role.
|
|
517
|
+
role: Role.DATA_OFFICER,
|
|
518
518
|
deadline: Deadline,
|
|
519
519
|
isForWholeRole: false,
|
|
520
520
|
backToClient: false,
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
export enum TerminationListType {
|
|
2
|
+
REGULAR = 1,
|
|
3
|
+
OUT_OF_TIME = 2,
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
export const TerminationListTypeDetail = [
|
|
7
|
+
{
|
|
8
|
+
id: TerminationListType.REGULAR,
|
|
9
|
+
label: 'Régulière',
|
|
10
|
+
},
|
|
11
|
+
{
|
|
12
|
+
id: TerminationListType.OUT_OF_TIME,
|
|
13
|
+
label: 'Hors délai',
|
|
14
|
+
},
|
|
15
|
+
];
|
|
16
|
+
|
|
17
|
+
export enum TerminationListState {
|
|
18
|
+
IN_PROGRESS = 1,
|
|
19
|
+
ACCEPTED = 2,
|
|
20
|
+
REFUSED = 3,
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
export const TerminationListStateDetail = [
|
|
24
|
+
{
|
|
25
|
+
id: TerminationListState.IN_PROGRESS,
|
|
26
|
+
label: 'En cours d\'instruction',
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
id: TerminationListState.ACCEPTED,
|
|
30
|
+
label: 'Acceptée',
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
id: TerminationListState.REFUSED,
|
|
34
|
+
label: 'Refusée',
|
|
35
|
+
},
|
|
36
|
+
];
|
|
@@ -1,11 +1,21 @@
|
|
|
1
1
|
import {
|
|
2
2
|
IsBoolean,
|
|
3
3
|
IsDate,
|
|
4
|
-
IsInt, IsOptional, IsString,
|
|
4
|
+
IsInt, IsOptional, IsString, IsNumber,
|
|
5
5
|
} from 'class-validator';
|
|
6
6
|
import { ApiProperty, ApiPropertyOptional } from '../../../../utils';
|
|
7
7
|
|
|
8
8
|
export class CreateTerminationList {
|
|
9
|
+
@ApiPropertyOptional()
|
|
10
|
+
@IsOptional()
|
|
11
|
+
@IsInt()
|
|
12
|
+
idTerminationType?: number;
|
|
13
|
+
|
|
14
|
+
@ApiPropertyOptional()
|
|
15
|
+
@IsOptional()
|
|
16
|
+
@IsInt()
|
|
17
|
+
idTerminationState?: number;
|
|
18
|
+
|
|
9
19
|
@ApiPropertyOptional()
|
|
10
20
|
@IsOptional()
|
|
11
21
|
@IsString()
|
|
@@ -21,15 +31,13 @@ export class CreateTerminationList {
|
|
|
21
31
|
@IsDate()
|
|
22
32
|
recalledCustomerBySupervisor?: Date;
|
|
23
33
|
|
|
24
|
-
@
|
|
25
|
-
@IsOptional()
|
|
34
|
+
@ApiProperty()
|
|
26
35
|
@IsDate()
|
|
27
|
-
effectiveDate
|
|
36
|
+
effectiveDate: Date;
|
|
28
37
|
|
|
29
|
-
@
|
|
30
|
-
@IsOptional()
|
|
38
|
+
@ApiProperty()
|
|
31
39
|
@IsInt()
|
|
32
|
-
idExercice
|
|
40
|
+
idExercice: number;
|
|
33
41
|
|
|
34
42
|
@ApiPropertyOptional()
|
|
35
43
|
@IsOptional()
|
|
@@ -41,20 +49,33 @@ export class CreateTerminationList {
|
|
|
41
49
|
@IsBoolean()
|
|
42
50
|
refund?: boolean;
|
|
43
51
|
|
|
52
|
+
@ApiPropertyOptional()
|
|
53
|
+
@IsOptional()
|
|
54
|
+
@IsNumber()
|
|
55
|
+
monthlyPrice: number;
|
|
56
|
+
|
|
44
57
|
@ApiPropertyOptional()
|
|
45
58
|
@IsOptional()
|
|
46
59
|
@IsInt()
|
|
47
|
-
|
|
60
|
+
monthNumber: number;
|
|
48
61
|
|
|
49
|
-
@
|
|
62
|
+
@ApiPropertyOptional()
|
|
50
63
|
@IsOptional()
|
|
51
64
|
@IsInt()
|
|
52
|
-
|
|
65
|
+
monthOffer: number;
|
|
53
66
|
|
|
54
67
|
@ApiPropertyOptional()
|
|
55
68
|
@IsOptional()
|
|
56
69
|
@IsInt()
|
|
57
|
-
|
|
70
|
+
idReasonTermination?: number;
|
|
71
|
+
|
|
72
|
+
@ApiProperty()
|
|
73
|
+
@IsInt()
|
|
74
|
+
idSociety: number;
|
|
75
|
+
|
|
76
|
+
@ApiProperty()
|
|
77
|
+
@IsInt({ each: true })
|
|
78
|
+
idPrestation: number[];
|
|
58
79
|
|
|
59
80
|
@ApiPropertyOptional()
|
|
60
81
|
@IsOptional()
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import { IsBoolean, IsDateString, IsInt, IsOptional, IsString } from 'class-validator';
|
|
2
|
+
import { ApiPropertyOptional } from '../../../../utils';
|
|
3
|
+
import { ToBoolean } from '../../../../utils/transforms/boolean.transform';
|
|
4
|
+
|
|
5
|
+
export class QueryPaginateTerminationList {
|
|
6
|
+
@ApiPropertyOptional()
|
|
7
|
+
@IsInt()
|
|
8
|
+
@IsOptional()
|
|
9
|
+
page?: number;
|
|
10
|
+
|
|
11
|
+
@ApiPropertyOptional()
|
|
12
|
+
@IsInt()
|
|
13
|
+
@IsOptional()
|
|
14
|
+
limit?: number;
|
|
15
|
+
|
|
16
|
+
@ApiPropertyOptional()
|
|
17
|
+
@IsString()
|
|
18
|
+
@IsOptional()
|
|
19
|
+
search?: string;
|
|
20
|
+
|
|
21
|
+
@ApiPropertyOptional()
|
|
22
|
+
@IsInt()
|
|
23
|
+
@IsOptional()
|
|
24
|
+
year?: number;
|
|
25
|
+
|
|
26
|
+
@ApiPropertyOptional()
|
|
27
|
+
@IsDateString()
|
|
28
|
+
@IsOptional()
|
|
29
|
+
beginDate?: Date;
|
|
30
|
+
|
|
31
|
+
@ApiPropertyOptional()
|
|
32
|
+
@IsDateString()
|
|
33
|
+
@IsOptional()
|
|
34
|
+
endDate?: Date;
|
|
35
|
+
|
|
36
|
+
@ApiPropertyOptional()
|
|
37
|
+
@IsInt()
|
|
38
|
+
@IsOptional()
|
|
39
|
+
idUser?: number;
|
|
40
|
+
|
|
41
|
+
@ApiPropertyOptional()
|
|
42
|
+
@IsInt()
|
|
43
|
+
@IsOptional()
|
|
44
|
+
monthCreatedAt?: number;
|
|
45
|
+
|
|
46
|
+
@ApiPropertyOptional()
|
|
47
|
+
@IsInt()
|
|
48
|
+
@IsOptional()
|
|
49
|
+
idReasonTermination?: number;
|
|
50
|
+
|
|
51
|
+
@ApiPropertyOptional()
|
|
52
|
+
@IsInt()
|
|
53
|
+
@IsOptional()
|
|
54
|
+
idBrandType?: number;
|
|
55
|
+
|
|
56
|
+
@ApiPropertyOptional()
|
|
57
|
+
@IsBoolean()
|
|
58
|
+
@ToBoolean()
|
|
59
|
+
@IsOptional()
|
|
60
|
+
displayArchive?: boolean;
|
|
61
|
+
|
|
62
|
+
@ApiPropertyOptional()
|
|
63
|
+
@IsString()
|
|
64
|
+
@IsOptional()
|
|
65
|
+
orderBy?: string;
|
|
66
|
+
|
|
67
|
+
@ApiPropertyOptional()
|
|
68
|
+
@IsBoolean()
|
|
69
|
+
@ToBoolean()
|
|
70
|
+
@IsOptional()
|
|
71
|
+
descending?: boolean;
|
|
72
|
+
|
|
73
|
+
@ApiPropertyOptional()
|
|
74
|
+
@IsBoolean()
|
|
75
|
+
@ToBoolean()
|
|
76
|
+
@IsOptional()
|
|
77
|
+
stat?: boolean;
|
|
78
|
+
}
|
|
@@ -18,8 +18,8 @@ export interface IRefund {
|
|
|
18
18
|
updatedAt?: Date | null;
|
|
19
19
|
|
|
20
20
|
// Associations
|
|
21
|
-
refundsMotif
|
|
22
|
-
society
|
|
23
|
-
file
|
|
24
|
-
userDemand
|
|
21
|
+
refundsMotif?: IRefundMotif;
|
|
22
|
+
society?: ISociety;
|
|
23
|
+
file?: IFile;
|
|
24
|
+
userDemand?: IUser;
|
|
25
25
|
}
|
|
@@ -7,6 +7,8 @@ import { IPrestation } from './IPrestation';
|
|
|
7
7
|
// terminitionsList
|
|
8
8
|
export interface ITerminationList {
|
|
9
9
|
id?: number;
|
|
10
|
+
idTerminationType?: number | null;
|
|
11
|
+
idTerminationState?: number | null;
|
|
10
12
|
comment?: string | null;
|
|
11
13
|
recalledCustomer?: Date | null;
|
|
12
14
|
recalledCustomerBySupervisor?: Date | null;
|
|
@@ -14,6 +16,9 @@ export interface ITerminationList {
|
|
|
14
16
|
idExercice?: number | null;
|
|
15
17
|
endContractDate?: Date | null;
|
|
16
18
|
refund?: boolean;
|
|
19
|
+
monthlyPrice?: number | null;
|
|
20
|
+
monthNumber?: number | null;
|
|
21
|
+
monthOffer?: number | null;
|
|
17
22
|
idReasonTermination?: number | null;
|
|
18
23
|
idSociety?: number | null;
|
|
19
24
|
idPrestation?: number | null;
|
package/ts/types/index.ts
CHANGED
|
@@ -412,6 +412,7 @@ export * from './Enum/Ged';
|
|
|
412
412
|
export * from './Enum/TypeBankConnection';
|
|
413
413
|
export * from './Enum/GlobalRegime';
|
|
414
414
|
export * from './Enum/TaxSystem';
|
|
415
|
+
export * from './Enum/TerminationList';
|
|
415
416
|
export * from './Enum/SalesContractConfig';
|
|
416
417
|
export * from './Enum/FiscalRegime';
|
|
417
418
|
export * from './Enum/Activity';
|
|
@@ -534,6 +535,7 @@ export * from './Enum/Brevo';
|
|
|
534
535
|
export * from './Enum/ZoneCode';
|
|
535
536
|
export * from './Enum/TimeSlot';
|
|
536
537
|
export * from './Enum/StateSynchro';
|
|
538
|
+
export * from './Enum/RefundReason';
|
|
537
539
|
|
|
538
540
|
// Interfaces API
|
|
539
541
|
export * from './Interface/api/kilometricAllowance/ReadKilometricAllowance';
|
|
@@ -1025,6 +1027,7 @@ export * from './Interface/api/visualizedInformation/Update';
|
|
|
1025
1027
|
export * from './Interface/api/society/QueryArchived';
|
|
1026
1028
|
export * from './Interface/api/vatControl/CreateVatControl';
|
|
1027
1029
|
export * from './Interface/api/vatControl/QueryVatControl';
|
|
1030
|
+
export * from './Interface/api/terminationList/QueryPaginateTerminationList';
|
|
1028
1031
|
export * from './Interface/api/card/QueryUserCards';
|
|
1029
1032
|
export * from './Interface/api/card/QueryUserCardsStats';
|
|
1030
1033
|
export * from './Interface/api/card/UpdateCard';
|
|
@@ -1049,7 +1052,6 @@ export * from './Interface/api/echo/NewsPaper';
|
|
|
1049
1052
|
export * from './Interface/api/echo/Order';
|
|
1050
1053
|
export * from './Interface/api/userTimeSlot/QueryUserTimeSlot';
|
|
1051
1054
|
export * from './Interface/api/workingSchedule/QueryAvailableTimeSlot';
|
|
1052
|
-
|
|
1053
1055
|
// Enums types
|
|
1054
1056
|
export * from './Interface/enum/Util';
|
|
1055
1057
|
export * from './Interface/enum/Date';
|
package/ts/utils/date.ts
CHANGED
|
@@ -6,6 +6,9 @@
|
|
|
6
6
|
import {
|
|
7
7
|
DateInterval, TimeInterval,
|
|
8
8
|
} from '../types';
|
|
9
|
+
import * as dayjs from 'dayjs';
|
|
10
|
+
import * as timezone from 'dayjs/plugin/timezone';
|
|
11
|
+
dayjs.extend(timezone);
|
|
9
12
|
|
|
10
13
|
// TODO:UT
|
|
11
14
|
export function putIntervalBetweenOtherInterval(customPayload: DateInterval, listHours:TimeInterval[]):DateInterval {
|
|
@@ -63,4 +66,37 @@ export function putIntervalBetweenOtherInterval(customPayload: DateInterval, lis
|
|
|
63
66
|
}
|
|
64
67
|
}
|
|
65
68
|
return res;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
/**
|
|
72
|
+
* Compare UTC between now and another date (to add or subtract 1h between winter and summer time)
|
|
73
|
+
* @param dateToCompare
|
|
74
|
+
* @returns
|
|
75
|
+
*/
|
|
76
|
+
export function getUtcOffsetDiffWithNow(dateToCompare:Date):number {
|
|
77
|
+
const dateToCompareUtc =
|
|
78
|
+
dayjs(dateToCompare)
|
|
79
|
+
.tz('Europe/Paris')
|
|
80
|
+
.utcOffset() /
|
|
81
|
+
(dayjs(dateToCompare)
|
|
82
|
+
.tz('Europe/Paris')
|
|
83
|
+
.utcOffset() > 16 ||
|
|
84
|
+
dayjs(dateToCompare)
|
|
85
|
+
.tz('Europe/Paris')
|
|
86
|
+
.utcOffset() < 16
|
|
87
|
+
? 60
|
|
88
|
+
: 1);
|
|
89
|
+
const nowUtc =
|
|
90
|
+
dayjs()
|
|
91
|
+
.tz('Europe/Paris')
|
|
92
|
+
.utcOffset() /
|
|
93
|
+
(dayjs()
|
|
94
|
+
.tz('Europe/Paris')
|
|
95
|
+
.utcOffset() > 16 ||
|
|
96
|
+
dayjs()
|
|
97
|
+
.tz('Europe/Paris')
|
|
98
|
+
.utcOffset() < 16
|
|
99
|
+
? 60
|
|
100
|
+
: 1);
|
|
101
|
+
return nowUtc - dateToCompareUtc;
|
|
66
102
|
}
|