@silexpert/core 0.4.243 → 0.4.246
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/ThirdParty.js +1 -1
- package/es/api/resources/ThirdParty.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 +9 -9
- package/es/types/Enum/TaskResponseType.js.map +1 -1
- package/es/types/Interface/api/calendarEvent/interval.d.ts +9 -0
- package/es/types/Interface/api/calendarEvent/interval.d.ts.map +1 -0
- package/es/types/Interface/api/calendarEvent/interval.js +40 -0
- package/es/types/Interface/api/calendarEvent/interval.js.map +1 -0
- package/es/types/Interface/api/thirdParty/UpdateThirdPartyForm.d.ts.map +1 -1
- package/es/types/Interface/api/thirdParty/UpdateThirdPartyForm.js +21 -1
- package/es/types/Interface/api/thirdParty/UpdateThirdPartyForm.js.map +1 -1
- package/es/types/Interface/api/workingSchedule/QueryDailyHour.d.ts +2 -0
- package/es/types/Interface/api/workingSchedule/QueryDailyHour.d.ts.map +1 -1
- package/es/types/Interface/api/workingSchedule/QueryDailyHour.js.map +1 -1
- package/es/types/index.d.ts +1 -0
- package/es/types/index.d.ts.map +1 -1
- package/es/types/index.js +1 -0
- package/es/types/index.js.map +1 -1
- package/es/utils/date.d.ts +2 -2
- package/es/utils/date.d.ts.map +1 -1
- package/es/utils/date.js +3 -3
- package/es/utils/date.js.map +1 -1
- package/js/api/resources/ThirdParty.js +1 -1
- package/js/api/resources/ThirdParty.js.map +1 -1
- package/js/types/Enum/TaskResponseType.js +9 -9
- package/js/types/Enum/TaskResponseType.js.map +1 -1
- package/js/types/Interface/api/calendarEvent/interval.js +39 -0
- package/js/types/Interface/api/calendarEvent/interval.js.map +1 -0
- package/js/types/Interface/api/thirdParty/UpdateThirdPartyForm.js +20 -20
- package/js/types/Interface/api/thirdParty/UpdateThirdPartyForm.js.map +1 -1
- package/js/types/index.js +12 -0
- package/js/types/index.js.map +1 -1
- package/js/utils/date.js +4 -4
- package/js/utils/date.js.map +1 -1
- package/package.json +1 -1
- package/ts/api/resources/ThirdParty.ts +1 -1
- package/ts/types/Enum/TaskResponseType.ts +9 -9
- package/ts/types/Interface/api/calendarEvent/interval.ts +26 -0
- package/ts/types/Interface/api/thirdParty/UpdateThirdPartyForm.ts +21 -1
- package/ts/types/Interface/api/workingSchedule/QueryDailyHour.ts +2 -0
- package/ts/types/index.ts +1 -0
- package/ts/utils/date.ts +7 -5
package/js/utils/date.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"date.js","mappings":";;;;;
|
|
1
|
+
{"version":3,"file":"date.js","mappings":";;;;;QASgBA,+B,GAAAA,+B;;AAAV,SAAUA,+BAAV,CAA0CC,aAA1C,EAAuEC,SAAvE,EAA+F;EACnG,MAAMC,GAAG,qBAAqBF,aAArB,CAAT;;EACA,IAAIC,SAAS,CAACE,MAAV,GAAmB,CAAnB,KAAwBH,aAAa,SAAb,iBAAa,WAAb,GAAa,MAAb,gBAAa,CAAEI,SAAvC,MAAoDJ,aAAa,SAAb,iBAAa,WAAb,GAAa,MAAb,gBAAa,CAAEK,OAAnE,CAAJ,EAAgF;IAC9E,MAAMC,kBAAkB,GAAG,IAAIC,IAAJ,CAASP,aAAa,CAACI,SAAvB,EAAkCI,OAAlC,EAA3B;IACA,MAAMC,gBAAgB,GAAG,IAAIF,IAAJ,CAASP,aAAa,CAACK,OAAvB,EAAgCG,OAAhC,EAAzB;IACA,MAAME,eAAe,GAAGT,SAAxB,CAH8E,CAK9E;;IACA,MAAMU,iBAAiB,GAAGD,eAAe,CAACE,MAAhB,CAAwBC,EAAD,IAASA,EAAE,CAACC,OAAH,IAAeR,kBAAkB,GAAG,IAAIC,IAAJ,CAASM,EAAE,CAACC,OAAZ,EAAqBN,OAArB,EAArB,IAAuD,CAAvE,IAA+EK,EAAE,CAACE,SAAH,IAAiBN,gBAAgB,GAAG,IAAIF,IAAJ,CAASM,EAAE,CAACE,SAAZ,EAAuBP,OAAvB,EAAnB,IAAuD,CAAtL,CAA1B;;IAEA,IAAI,kBAAiB,SAAjB,qBAAiB,WAAjB,GAAiB,MAAjB,oBAAiB,CAAEL,MAAnB,IAA4B,CAA5B,IAAiCQ,iBAAiB,CAAC,CAAD,CAAjB,CAAqBI,SAAtD,IAAmEJ,iBAAiB,CAAC,CAAD,CAAjB,CAAqBG,OAA5F,EAAqG;MACnG,MAAMV,SAAS,GAAG,IAAIG,IAAJ,CAASI,iBAAiB,CAAC,CAAD,CAAjB,CAAqBI,SAA9B,EAAyCP,OAAzC,EAAlB;MACA,MAAMH,OAAO,GAAG,IAAIE,IAAJ,CAASI,iBAAiB,CAAC,CAAD,CAAjB,CAAqBG,OAA9B,EAAuCN,OAAvC,EAAhB,CAFmG,CAInG;;MACAN,GAAG,CAACE,SAAJ,GAAgB,EAAGE,kBAAkB,GAAGF,SAAtB,IAAoC,CAApC,IAA0CE,kBAAkB,GAAGD,OAAtB,IAAkC,CAA7E,IAAkF,IAAIE,IAAJ,CAASH,SAAT,CAAlF,GAAwG,IAAIG,IAAJ,CAASD,kBAAT,CAAxH;MACAJ,GAAG,CAACG,OAAJ,GAAc,EAAGI,gBAAgB,GAAGL,SAApB,IAAkC,CAAlC,IAAwCK,gBAAgB,GAAGJ,OAApB,IAAgC,CAAzE,IAA8E,IAAIE,IAAJ,CAASF,OAAT,CAA9E,GAAkG,IAAIE,IAAJ,CAASE,gBAAT,CAAhH;IACD;EACF;;EACD,OAAOP,GAAP;AACD","names":["putIntervalBetweenOtherInterval","customPayload","listHours","res","length","dateStart","dateEnd","dateToCompareStart","Date","getTime","dateToCompareEnd","realHoursObject","realHoursOfPeriod","filter","sh","endTime","startTime"],"sourceRoot":"","sources":["../../ts/utils/date.ts"],"sourcesContent":["/**\n * @param dateStart (format YYYY-MM-DD)\n * @param dateEnd (format YYYY-MM-DD)\n * @returns object of date (09:00-10:00, 12:00-13:00 et 14:00-17:00)\n */\nimport {\n DateInterval, TimeInterval,\n} from '../types';\n\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 realHoursObject = listHours;\n\n // on cherche la bonne specialhour pour comparer les horaires\n const realHoursOfPeriod = realHoursObject.filter((sh) => (sh.endTime && (dateToCompareStart - new Date(sh.endTime).getTime() <= 0)) && (sh.startTime && (dateToCompareEnd - new Date(sh.startTime).getTime() >= 0)));\n\n if (realHoursOfPeriod?.length > 0 && realHoursOfPeriod[0].startTime && realHoursOfPeriod[0].endTime) {\n const dateStart = new Date(realHoursOfPeriod[0].startTime).getTime();\n const dateEnd = new Date(realHoursOfPeriod[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 }\n }\n return res;\n}"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@silexpert/core",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.246",
|
|
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": "js/index.js",
|
|
@@ -9,7 +9,7 @@ export class ThirdParty extends Resource {
|
|
|
9
9
|
}
|
|
10
10
|
|
|
11
11
|
getPaginated(pagination: QueryPaginate, query?: QueryThirdParty): Promise<BasePaginate<IThirdParty>> {
|
|
12
|
-
return this.axios.$get('/third-parties', {
|
|
12
|
+
return this.axios.$get('/third-parties/paginate', {
|
|
13
13
|
params: {
|
|
14
14
|
...pagination,
|
|
15
15
|
...query,
|
|
@@ -57,15 +57,15 @@ export const TaskResponseType = {
|
|
|
57
57
|
idMailAuto: null,
|
|
58
58
|
schedule: 15,
|
|
59
59
|
},
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
60
|
+
SUPPORT_TECHNIQUE: {
|
|
61
|
+
id: 4,
|
|
62
|
+
label: 'Support technique',
|
|
63
|
+
responseType: ResponseType.CALL.id,
|
|
64
|
+
weight: 6,
|
|
65
|
+
isExterne: true,
|
|
66
|
+
idMailAuto: null,
|
|
67
|
+
schedule: 15,
|
|
68
|
+
},
|
|
69
69
|
SUIVI_BILAN: {
|
|
70
70
|
id: 5,
|
|
71
71
|
label: 'Suivi bilan',
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { IsDate, IsOptional } from 'class-validator';
|
|
2
|
+
import { ApiPropertyOptional } from '../../../../utils';
|
|
3
|
+
|
|
4
|
+
export class DateInterval {
|
|
5
|
+
@ApiPropertyOptional()
|
|
6
|
+
@IsOptional()
|
|
7
|
+
@IsDate()
|
|
8
|
+
dateStart?: Date;
|
|
9
|
+
|
|
10
|
+
@ApiPropertyOptional()
|
|
11
|
+
@IsOptional()
|
|
12
|
+
@IsDate()
|
|
13
|
+
dateEnd?: Date;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export class TimeInterval {
|
|
17
|
+
@ApiPropertyOptional()
|
|
18
|
+
@IsOptional()
|
|
19
|
+
@IsDate()
|
|
20
|
+
startTime?: Date;
|
|
21
|
+
|
|
22
|
+
@ApiPropertyOptional()
|
|
23
|
+
@IsOptional()
|
|
24
|
+
@IsDate()
|
|
25
|
+
endTime?: Date;
|
|
26
|
+
}
|
|
@@ -1,66 +1,86 @@
|
|
|
1
|
-
import { IsEnum } from 'class-validator';
|
|
1
|
+
import { IsEnum, IsOptional } from 'class-validator';
|
|
2
2
|
import { ThirdPartyType } from '../../..';
|
|
3
3
|
import { ApiPropertyOptional } from '../../../../utils';
|
|
4
4
|
|
|
5
5
|
export class UpdateThirdPartyForm {
|
|
6
6
|
@ApiPropertyOptional()
|
|
7
|
+
@IsOptional()
|
|
7
8
|
budgeaSouscriptionId?: number | null;
|
|
8
9
|
|
|
9
10
|
@ApiPropertyOptional()
|
|
11
|
+
@IsOptional()
|
|
10
12
|
fullname?: string | null;
|
|
11
13
|
|
|
12
14
|
@ApiPropertyOptional()
|
|
15
|
+
@IsOptional()
|
|
13
16
|
fullnameAccountant?: string | null;
|
|
14
17
|
|
|
15
18
|
@ApiPropertyOptional()
|
|
19
|
+
@IsOptional()
|
|
16
20
|
company?: string;
|
|
17
21
|
|
|
18
22
|
@ApiPropertyOptional()
|
|
23
|
+
@IsOptional()
|
|
19
24
|
address?: string | null;
|
|
20
25
|
|
|
21
26
|
@ApiPropertyOptional()
|
|
27
|
+
@IsOptional()
|
|
22
28
|
zipCode?: string | null;
|
|
23
29
|
|
|
24
30
|
@ApiPropertyOptional()
|
|
31
|
+
@IsOptional()
|
|
25
32
|
city?: string | null;
|
|
26
33
|
|
|
27
34
|
@ApiPropertyOptional()
|
|
35
|
+
@IsOptional()
|
|
28
36
|
phone?: string | null;
|
|
29
37
|
|
|
30
38
|
@ApiPropertyOptional()
|
|
39
|
+
@IsOptional()
|
|
31
40
|
email?: string | null;
|
|
32
41
|
|
|
33
42
|
@ApiPropertyOptional()
|
|
43
|
+
@IsOptional()
|
|
34
44
|
nSiret?: string | null;
|
|
35
45
|
|
|
36
46
|
@ApiPropertyOptional()
|
|
47
|
+
@IsOptional()
|
|
37
48
|
nTva?: string | null;
|
|
38
49
|
|
|
39
50
|
@ApiPropertyOptional()
|
|
51
|
+
@IsOptional()
|
|
40
52
|
soldeInit?: number;
|
|
41
53
|
|
|
42
54
|
@ApiPropertyOptional()
|
|
55
|
+
@IsOptional()
|
|
43
56
|
state?: boolean | null;
|
|
44
57
|
|
|
45
58
|
@ApiPropertyOptional()
|
|
59
|
+
@IsOptional()
|
|
46
60
|
dateImport?: Date | null;
|
|
47
61
|
|
|
48
62
|
@ApiPropertyOptional()
|
|
63
|
+
@IsOptional()
|
|
49
64
|
isGeneric?: boolean;
|
|
50
65
|
|
|
51
66
|
@ApiPropertyOptional()
|
|
67
|
+
@IsOptional()
|
|
52
68
|
juridicalSociety?: number | null;
|
|
53
69
|
|
|
54
70
|
@ApiPropertyOptional()
|
|
71
|
+
@IsOptional()
|
|
55
72
|
idTypePayment?: number | null;
|
|
56
73
|
|
|
57
74
|
@ApiPropertyOptional()
|
|
75
|
+
@IsOptional()
|
|
58
76
|
idAccount?: number | null;
|
|
59
77
|
|
|
60
78
|
@ApiPropertyOptional()
|
|
79
|
+
@IsOptional()
|
|
61
80
|
idCountry?: number | null;
|
|
62
81
|
|
|
63
82
|
@ApiPropertyOptional()
|
|
83
|
+
@IsOptional()
|
|
64
84
|
@IsEnum(ThirdPartyType)
|
|
65
85
|
idThirdPartyType?: ThirdPartyType;
|
|
66
86
|
}
|
package/ts/types/index.ts
CHANGED
|
@@ -725,6 +725,7 @@ export * from './Interface/api/sheetMonthSchedule/QuerySheetMonthSchedule';
|
|
|
725
725
|
export * from './Interface/api/calendarEvent/createCalendarEvent';
|
|
726
726
|
export * from './Interface/api/calendarEvent/createCalendarEventForUsers';
|
|
727
727
|
export * from './Interface/api/calendarEvent/updateCalendarEvent';
|
|
728
|
+
export * from './Interface/api/calendarEvent/interval';
|
|
728
729
|
export * from './Interface/api/calendarEvent/queryCalendarEvent';
|
|
729
730
|
export * from './Interface/api/calendarEvent/getAllCalendarEvent';
|
|
730
731
|
export * from './Interface/api/calendarEvent/readAllCalendarEvent';
|
package/ts/utils/date.ts
CHANGED
|
@@ -3,14 +3,16 @@
|
|
|
3
3
|
* @param dateEnd (format YYYY-MM-DD)
|
|
4
4
|
* @returns object of date (09:00-10:00, 12:00-13:00 et 14:00-17:00)
|
|
5
5
|
*/
|
|
6
|
-
import {
|
|
6
|
+
import {
|
|
7
|
+
DateInterval, TimeInterval,
|
|
8
|
+
} from '../types';
|
|
7
9
|
|
|
8
|
-
export function
|
|
9
|
-
const res = { ...customPayload };
|
|
10
|
-
if (
|
|
10
|
+
export function putIntervalBetweenOtherInterval(customPayload: DateInterval, listHours:TimeInterval[]):DateInterval {
|
|
11
|
+
const res:DateInterval = { ...customPayload };
|
|
12
|
+
if (listHours.length > 0 && customPayload?.dateStart && customPayload?.dateEnd) {
|
|
11
13
|
const dateToCompareStart = new Date(customPayload.dateStart).getTime();
|
|
12
14
|
const dateToCompareEnd = new Date(customPayload.dateEnd).getTime();
|
|
13
|
-
const realHoursObject =
|
|
15
|
+
const realHoursObject = listHours;
|
|
14
16
|
|
|
15
17
|
// on cherche la bonne specialhour pour comparer les horaires
|
|
16
18
|
const realHoursOfPeriod = realHoursObject.filter((sh) => (sh.endTime && (dateToCompareStart - new Date(sh.endTime).getTime() <= 0)) && (sh.startTime && (dateToCompareEnd - new Date(sh.startTime).getTime() >= 0)));
|