@silexpert/core 0.4.245 → 0.4.247
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/types/Interface/api/bankAccount/DeleteTransaction.d.ts.map +1 -1
- package/es/types/Interface/api/bankAccount/DeleteTransaction.js +1 -4
- package/es/types/Interface/api/bankAccount/DeleteTransaction.js.map +1 -1
- package/es/types/Interface/api/calendarEvent/getAllCalendarEvent.d.ts +0 -1
- package/es/types/Interface/api/calendarEvent/getAllCalendarEvent.d.ts.map +1 -1
- package/es/types/Interface/api/calendarEvent/getAllCalendarEvent.js +0 -4
- package/es/types/Interface/api/calendarEvent/getAllCalendarEvent.js.map +1 -1
- package/es/types/Interface/models/IAccountingTransaction.d.ts +1 -0
- package/es/types/Interface/models/IAccountingTransaction.d.ts.map +1 -1
- package/es/types/Interface/models/IAccountingTransaction.js.map +1 -1
- package/es/utils/date.d.ts +3 -3
- package/es/utils/date.d.ts.map +1 -1
- package/es/utils/date.js +7 -5
- package/es/utils/date.js.map +1 -1
- package/js/types/Interface/api/bankAccount/DeleteTransaction.js +1 -5
- package/js/types/Interface/api/bankAccount/DeleteTransaction.js.map +1 -1
- package/js/types/Interface/api/calendarEvent/getAllCalendarEvent.js +0 -4
- package/js/types/Interface/api/calendarEvent/getAllCalendarEvent.js.map +1 -1
- package/js/utils/date.js +7 -5
- package/js/utils/date.js.map +1 -1
- package/package.json +1 -1
- package/ts/types/Interface/api/bankAccount/DeleteTransaction.ts +1 -3
- package/ts/types/Interface/api/calendarEvent/getAllCalendarEvent.ts +0 -3
- package/ts/types/Interface/models/IAccountingTransaction.ts +1 -0
- package/ts/utils/date.ts +10 -8
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DeleteTransaction.d.ts","sourceRoot":"","sources":["../../../../../ts/types/Interface/api/bankAccount/DeleteTransaction.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,sBAAsB,EAAE,MAAM,sCAAsC,CAAC;AAE9E,qBAAa,kBAAkB;IAE7B,aAAa,EAAE,MAAM,CAAC;IAGtB,QAAQ,CAAC,EAAE,OAAO,CAAC;IAGnB,UAAU,CAAC,EAAE,OAAO,CAAC;IAGrB,SAAS,CAAC,EAAE,MAAM,CAAC;IAGnB,OAAO,CAAC,EAAE,MAAM,CAAC;IAGjB,iBAAiB,CAAC,EAAE,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"DeleteTransaction.d.ts","sourceRoot":"","sources":["../../../../../ts/types/Interface/api/bankAccount/DeleteTransaction.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,sBAAsB,EAAE,MAAM,sCAAsC,CAAC;AAE9E,qBAAa,kBAAkB;IAE7B,aAAa,EAAE,MAAM,CAAC;IAGtB,QAAQ,CAAC,EAAE,OAAO,CAAC;IAGnB,UAAU,CAAC,EAAE,OAAO,CAAC;IAGrB,SAAS,CAAC,EAAE,MAAM,CAAC;IAGnB,OAAO,CAAC,EAAE,MAAM,CAAC;IAGjB,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAI5B,uBAAuB,CAAC,EAAE,sBAAsB,EAAE,CAAC;CACpD;AAED,qBAAa,yBAAyB;IAEpC,EAAE,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC;CACvB"}
|
|
@@ -7,9 +7,8 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
7
7
|
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
8
8
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
9
9
|
};
|
|
10
|
-
import {
|
|
10
|
+
import { IsOptional } from 'class-validator';
|
|
11
11
|
import { ApiProperty, ApiPropertyOptional } from '../../../../utils';
|
|
12
|
-
import { PartnerTransactionType } from '../../../Enum/PartnerTransactionType';
|
|
13
12
|
export class DeleteTransactions {
|
|
14
13
|
}
|
|
15
14
|
__decorate([
|
|
@@ -38,8 +37,6 @@ __decorate([
|
|
|
38
37
|
], DeleteTransactions.prototype, "deleteBankAccount", void 0);
|
|
39
38
|
__decorate([
|
|
40
39
|
ApiPropertyOptional(),
|
|
41
|
-
IsEnum(PartnerTransactionType),
|
|
42
|
-
IsPositive({ each: true }),
|
|
43
40
|
IsOptional(),
|
|
44
41
|
__metadata("design:type", Array)
|
|
45
42
|
], DeleteTransactions.prototype, "partnerTransactionTypes", void 0);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DeleteTransaction.js","sourceRoot":"","sources":["../../../../../ts/types/Interface/api/bankAccount/DeleteTransaction.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"DeleteTransaction.js","sourceRoot":"","sources":["../../../../../ts/types/Interface/api/bankAccount/DeleteTransaction.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAC7C,OAAO,EAAE,WAAW,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AAGrE,MAAM,OAAO,kBAAkB;CAsB9B;AApBC;IADC,WAAW,EAAE;;yDACQ;AAGtB;IADC,mBAAmB,EAAE;;oDACH;AAGnB;IADC,mBAAmB,EAAE;;sDACD;AAGrB;IADC,mBAAmB,EAAE;;qDACH;AAGnB;IADC,mBAAmB,EAAE;;mDACL;AAGjB;IADC,mBAAmB,CAAC,EAAE,WAAW,EAAE,sGAAsG,EAAE,CAAC;;6DACjH;AAI5B;IAFC,mBAAmB,EAAE;IACrB,UAAU,EAAE;;mEACsC;AAGrD,MAAM,OAAO,yBAAyB;CAGrC;AADC;IADC,WAAW,EAAE;;qDACQ","sourcesContent":["import { IsOptional } from 'class-validator';\nimport { ApiProperty, ApiPropertyOptional } from '../../../../utils';\nimport { PartnerTransactionType } from '../../../Enum/PartnerTransactionType';\n\nexport class DeleteTransactions {\n @ApiProperty()\n idBankAccount: number;\n\n @ApiPropertyOptional()\n isLocked?: boolean;\n\n @ApiPropertyOptional()\n isExported?: boolean;\n\n @ApiPropertyOptional()\n startDate?: string;\n\n @ApiPropertyOptional()\n endDate?: string;\n\n @ApiPropertyOptional({ description: 'Deleting the bank account. Warning ! this delete also the transactions of the specified bank account' })\n deleteBankAccount?: boolean;\n\n @ApiPropertyOptional()\n @IsOptional()\n partnerTransactionTypes?: PartnerTransactionType[];\n}\n\nexport class DeleteSocietyTransactions {\n @ApiProperty()\n id: number | number[];\n}"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getAllCalendarEvent.d.ts","sourceRoot":"","sources":["../../../../../ts/types/Interface/api/calendarEvent/getAllCalendarEvent.ts"],"names":[],"mappings":"AAEA,qBAAa,mBAAmB;IAE9B,MAAM,EAAE,MAAM,CAAC;IAGf,
|
|
1
|
+
{"version":3,"file":"getAllCalendarEvent.d.ts","sourceRoot":"","sources":["../../../../../ts/types/Interface/api/calendarEvent/getAllCalendarEvent.ts"],"names":[],"mappings":"AAEA,qBAAa,mBAAmB;IAE9B,MAAM,EAAE,MAAM,CAAC;IAGf,SAAS,EAAE,IAAI,CAAC;IAGhB,OAAO,EAAE,IAAI,CAAC;IAGd,WAAW,CAAC,EAAE,OAAO,CAAC;CACvB"}
|
|
@@ -14,10 +14,6 @@ __decorate([
|
|
|
14
14
|
ApiProperty(),
|
|
15
15
|
__metadata("design:type", Number)
|
|
16
16
|
], GetAllCalendarEvent.prototype, "idUser", void 0);
|
|
17
|
-
__decorate([
|
|
18
|
-
ApiPropertyOptional({ default: false }),
|
|
19
|
-
__metadata("design:type", Boolean)
|
|
20
|
-
], GetAllCalendarEvent.prototype, "areEventsEditable", void 0);
|
|
21
17
|
__decorate([
|
|
22
18
|
ApiProperty(),
|
|
23
19
|
__metadata("design:type", Date)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getAllCalendarEvent.js","sourceRoot":"","sources":["../../../../../ts/types/Interface/api/calendarEvent/getAllCalendarEvent.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EAAE,WAAW,EAAE,mBAAmB,EAAE,MAAM,8BAA8B,CAAC;AAEhF,MAAM,OAAO,mBAAmB;
|
|
1
|
+
{"version":3,"file":"getAllCalendarEvent.js","sourceRoot":"","sources":["../../../../../ts/types/Interface/api/calendarEvent/getAllCalendarEvent.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EAAE,WAAW,EAAE,mBAAmB,EAAE,MAAM,8BAA8B,CAAC;AAEhF,MAAM,OAAO,mBAAmB;CAY/B;AAVC;IADC,WAAW,EAAE;;mDACC;AAGf;IADC,WAAW,EAAE;8BACH,IAAI;sDAAC;AAGhB;IADC,WAAW,EAAE;8BACL,IAAI;oDAAC;AAGd;IADC,mBAAmB,EAAE;;wDACA","sourcesContent":["import { ApiProperty, ApiPropertyOptional } from '../../../../utils/decorators';\n\nexport class GetAllCalendarEvent {\n @ApiProperty()\n idUser: number;\n\n @ApiProperty()\n startDate: Date;\n\n @ApiProperty()\n endDate: Date;\n\n @ApiPropertyOptional()\n isValidated?: boolean;\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IAccountingTransaction.d.ts","sourceRoot":"","sources":["../../../../ts/types/Interface/models/IAccountingTransaction.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC1D,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAChC,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAChC,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAChC,OAA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EAAE,sBAAsB,EAAE,CAAC;IACnC,MAAM,CAAC,EAAE,sBAAsB,EAAE,CAAC;IAClC,sBAAsB,CAAC,EAAE,sBAAsB,EAAE,CAAC;CACnD"}
|
|
1
|
+
{"version":3,"file":"IAccountingTransaction.d.ts","sourceRoot":"","sources":["../../../../ts/types/Interface/models/IAccountingTransaction.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC1D,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAChC,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAChC,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAChC,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,sBAAsB,EAAE,MAAM,OAAO,CAAC;AAG/C,MAAM,WAAW,sBAAsB;IACrC,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,aAAa,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC9B,aAAa,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7B,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,SAAS,EAAE,IAAI,CAAC;IAChB,UAAU,CAAC,EAAE,IAAI,GAAG,IAAI,CAAC;IACzB,WAAW,CAAC,EAAE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AG,IAAI,CAAC;IACvB,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,SAAS,CAAC,EAAE,IAAI,GAAG,IAAI,CAAC;IACxB,SAAS,CAAC,EAAE,IAAI,GAAG,IAAI,CAAC;IACxB,SAAS,CAAC,EAAE,IAAI,GAAG,IAAI,CAAC;IAGxB,WAAW,CAAC,EAAE,YAAY,CAAC;IAC3B,iBAAiB,CAAC,EAAE,gBAAgB,EAAE,CAAC;IACvC,eAAe,CAAC,EAAE,eAAe,EAAE,CAAC;IACpC,iBAAiB,CAAC,EAAE,kBAAkB,CAAC;IACvC,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,OAAO,CAAC,EAAE,QAAQ,CAAC;IACnB,IAAI,CAAC,EAAE,KAAK,CAAC;IACb,IAAI,CAAC,EAAE,KAAK,CAAC;IACb,gBAAgB,CAAC,EAAE,gBAAgB,CAAC;IACpC,IAAI,CAAC,EAAE,KAAK,CAAC;IACb,WAAW,CAAC,EAAE,WAAW,CAAC;IAC1B,mBAAmB,EAAE,mBAAmB,GAAG,IAAI,CAAC;IAChD,OAAO,CAAC,EAAE,sBAAsB,EAAE,CAAC;IACnC,MAAM,CAAC,EAAE,sBAAsB,EAAE,CAAC;IAClC,sBAAsB,CAAC,EAAE,sBAAsB,EAAE,CAAC;CACnD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IAccountingTransaction.js","sourceRoot":"","sources":["../../../../ts/types/Interface/models/IAccountingTransaction.ts"],"names":[],"mappings":"","sourcesContent":["import { IBankAccount } from './IBankAccount';\nimport { IAccountingEntry } from './IAccountingEntry';\nimport { IAccountingFile } from './IAccountingFile';\nimport { IAccountingJournal } from './IAccountingJournal';\nimport { ISociety } from './ISociety';\nimport { IUser } from './IUser';\nimport { IRule } from './IRule';\nimport { IEstimateInvoice } from './IEstimateInvoice';\nimport { IFile } from './IFile';\nimport { IComptaType } from './IComptaType';\nimport { IPartnerTransaction } from './IPartnerTransaction';\nimport { ICurrency } from './ICurrency';\nimport { IMachineLearningResult } from '../..';\n\n// accountingTransactions\nexport interface IAccountingTransaction {\n id?: number;\n label: string | null;\n invoiceNumber: string | null;\n reference: string | null;\n dateValue: Date;\n dateLocked?: Date | null;\n closingDate?: Date | null;\n dateVerified?: Date | null;\n originalValue?: number | null;\n idUser?: number | null;\n isBlocked?: boolean;\n isMerged?: boolean;\n isAsset?: boolean;\n isPayPerso?: boolean;\n isFecImport?: boolean;\n isManual?: boolean;\n exported: Date | null;\n kilometers?: number | null;\n purchaseTtc?: number | null;\n internComment?: string | null;\n isReadMobile?: boolean;\n invoiceRequested?: boolean;\n isLockedMobile?: boolean;\n isAlreadyProcessByOcr?: boolean | null;\n idBankAccount: number | null;\n idSociety: number;\n idCurrency?: number | null;\n idPaymentMethod?: number | null;\n idSocietyVehicle?: number | null;\n idSocietyPartner?: number | null;\n idRule?: number | null;\n idAccountingJournal: number;\n idTypeCompta?: number | null;\n idEstimateInvoice?: number | null;\n idFile?: number | null;\n idEBT?: number | null;\n idEAF?: number | null;\n createdAt?: Date | null;\n updatedAt?: Date | null;\n deletedAt?: Date | null;\n\n // Associations\n bankAccount?: IBankAccount;\n accountingEntries?: IAccountingEntry[];\n accountingFiles?: IAccountingFile[];\n accountingJournal?: IAccountingJournal;\n currency?: ICurrency;\n society?: ISociety;\n user?: IUser;\n rule?: IRule;\n estimatesInvoice?: IEstimateInvoice;\n file?: IFile;\n typeComptum?: IComptaType;\n partnersTransaction: IPartnerTransaction | null;\n parents?: IAccountingTransaction[];\n childs?: IAccountingTransaction[];\n machineLearningResults?: IMachineLearningResult[];\n}\n"]}
|
|
1
|
+
{"version":3,"file":"IAccountingTransaction.js","sourceRoot":"","sources":["../../../../ts/types/Interface/models/IAccountingTransaction.ts"],"names":[],"mappings":"","sourcesContent":["import { IBankAccount } from './IBankAccount';\nimport { IAccountingEntry } from './IAccountingEntry';\nimport { IAccountingFile } from './IAccountingFile';\nimport { IAccountingJournal } from './IAccountingJournal';\nimport { ISociety } from './ISociety';\nimport { IUser } from './IUser';\nimport { IRule } from './IRule';\nimport { IEstimateInvoice } from './IEstimateInvoice';\nimport { IFile } from './IFile';\nimport { IComptaType } from './IComptaType';\nimport { IPartnerTransaction } from './IPartnerTransaction';\nimport { ICurrency } from './ICurrency';\nimport { IMachineLearningResult } from '../..';\n\n// accountingTransactions\nexport interface IAccountingTransaction {\n id?: number;\n label: string | null;\n originalLabel?: string | null;\n invoiceNumber: string | null;\n reference: string | null;\n dateValue: Date;\n dateLocked?: Date | null;\n closingDate?: Date | null;\n dateVerified?: Date | null;\n originalValue?: number | null;\n idUser?: number | null;\n isBlocked?: boolean;\n isMerged?: boolean;\n isAsset?: boolean;\n isPayPerso?: boolean;\n isFecImport?: boolean;\n isManual?: boolean;\n exported: Date | null;\n kilometers?: number | null;\n purchaseTtc?: number | null;\n internComment?: string | null;\n isReadMobile?: boolean;\n invoiceRequested?: boolean;\n isLockedMobile?: boolean;\n isAlreadyProcessByOcr?: boolean | null;\n idBankAccount: number | null;\n idSociety: number;\n idCurrency?: number | null;\n idPaymentMethod?: number | null;\n idSocietyVehicle?: number | null;\n idSocietyPartner?: number | null;\n idRule?: number | null;\n idAccountingJournal: number;\n idTypeCompta?: number | null;\n idEstimateInvoice?: number | null;\n idFile?: number | null;\n idEBT?: number | null;\n idEAF?: number | null;\n createdAt?: Date | null;\n updatedAt?: Date | null;\n deletedAt?: Date | null;\n\n // Associations\n bankAccount?: IBankAccount;\n accountingEntries?: IAccountingEntry[];\n accountingFiles?: IAccountingFile[];\n accountingJournal?: IAccountingJournal;\n currency?: ICurrency;\n society?: ISociety;\n user?: IUser;\n rule?: IRule;\n estimatesInvoice?: IEstimateInvoice;\n file?: IFile;\n typeComptum?: IComptaType;\n partnersTransaction: IPartnerTransaction | null;\n parents?: IAccountingTransaction[];\n childs?: IAccountingTransaction[];\n machineLearningResults?: IMachineLearningResult[];\n}\n"]}
|
package/es/utils/date.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @param dateStart
|
|
3
|
-
* @param dateEnd
|
|
4
|
-
* @returns object of
|
|
2
|
+
* @param dateStart Date format YYYY-MM-DD HH:mm:ss
|
|
3
|
+
* @param dateEnd Date format YYYY-MM-DD HH:mm:ss
|
|
4
|
+
* @returns object of time (09:00-10:00, 12:00-13:00 et 14:00-17:00)
|
|
5
5
|
*/
|
|
6
6
|
import { DateInterval, TimeInterval } from '../types';
|
|
7
7
|
export declare function putIntervalBetweenOtherInterval(customPayload: DateInterval, listHours: TimeInterval[]): DateInterval;
|
package/es/utils/date.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"date.d.ts","sourceRoot":"","sources":["../../ts/utils/date.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,EACL,YAAY,EAAE,YAAY,EAC3B,MAAM,UAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"date.d.ts","sourceRoot":"","sources":["../../ts/utils/date.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,EACL,YAAY,EAAE,YAAY,EAC3B,MAAM,UAAU,CAAC;AAGlB,wBAAgB,+BAA+B,CAAC,aAAa,EAAE,YAAY,EAAE,SAAS,EAAC,YAAY,EAAE,GAAE,YAAY,CAqBlH"}
|
package/es/utils/date.js
CHANGED
|
@@ -1,14 +1,16 @@
|
|
|
1
|
+
// TODO:UT
|
|
1
2
|
export function putIntervalBetweenOtherInterval(customPayload, listHours) {
|
|
2
3
|
const res = Object.assign({}, customPayload);
|
|
3
4
|
if (listHours.length > 0 && (customPayload === null || customPayload === void 0 ? void 0 : customPayload.dateStart) && (customPayload === null || customPayload === void 0 ? void 0 : customPayload.dateEnd)) {
|
|
4
5
|
const dateToCompareStart = new Date(customPayload.dateStart).getTime();
|
|
5
6
|
const dateToCompareEnd = new Date(customPayload.dateEnd).getTime();
|
|
6
|
-
const
|
|
7
|
+
const hoursObject = listHours;
|
|
8
|
+
const textDate = `${new Date(dateToCompareStart).getFullYear()}-${new Date(dateToCompareStart).getMonth() + 1}-${new Date(dateToCompareStart).getDate()}`;
|
|
7
9
|
// on cherche la bonne specialhour pour comparer les horaires
|
|
8
|
-
const
|
|
9
|
-
if ((
|
|
10
|
-
const dateStart = new Date(
|
|
11
|
-
const dateEnd = new Date(
|
|
10
|
+
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)));
|
|
11
|
+
if ((hoursOfPeriod === null || hoursOfPeriod === void 0 ? void 0 : hoursOfPeriod.length) > 0 && hoursOfPeriod[0].startTime && hoursOfPeriod[0].endTime) {
|
|
12
|
+
const dateStart = new Date(`${textDate} ${hoursOfPeriod[0].startTime}`).getTime();
|
|
13
|
+
const dateEnd = new Date(`${textDate} ${hoursOfPeriod[0].endTime}`).getTime();
|
|
12
14
|
// 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é
|
|
13
15
|
res.dateStart = !((dateToCompareStart - dateStart) >= 0 && (dateToCompareStart - dateEnd) <= 0) ? new Date(dateStart) : new Date(dateToCompareStart);
|
|
14
16
|
res.dateEnd = !((dateToCompareEnd - dateStart) >= 0 && (dateToCompareEnd - dateEnd) <= 0) ? new Date(dateEnd) : new Date(dateToCompareEnd);
|
package/es/utils/date.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"date.js","sourceRoot":"","sources":["../../ts/utils/date.ts"],"names":[],"mappings":"AASA,MAAM,UAAU,+BAA+B,CAAC,aAA2B,EAAE,SAAwB;IACnG,MAAM,GAAG,qBAAqB,aAAa,CAAE,CAAC;IAC9C,IAAI,SAAS,CAAC,MAAM,GAAG,CAAC,KAAI,aAAa,aAAb,aAAa,uB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F;IACD,OAAO,GAAG,CAAC;AACb,CAAC","sourcesContent":["/**\n * @param dateStart Date format YYYY-MM-DD HH:mm:ss\n * @param dateEnd Date format YYYY-MM-DD HH:mm:ss\n * @returns object of time (09:00-10:00, 12:00-13:00 et 14:00-17:00)\n */\nimport {\n DateInterval, TimeInterval,\n} from '../types';\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 }\n }\n return res;\n}"]}
|
|
@@ -9,8 +9,6 @@ var _classValidator = require("class-validator");
|
|
|
9
9
|
|
|
10
10
|
var _utils = require("../../../../utils");
|
|
11
11
|
|
|
12
|
-
var _PartnerTransactionType = require("../../../Enum/PartnerTransactionType");
|
|
13
|
-
|
|
14
12
|
var __decorate = undefined && undefined.__decorate || function (decorators, target, key, desc) {
|
|
15
13
|
var c = arguments.length,
|
|
16
14
|
r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc,
|
|
@@ -41,9 +39,7 @@ __decorate([(0, _utils.ApiPropertyOptional)({
|
|
|
41
39
|
description: 'Deleting the bank account. Warning ! this delete also the transactions of the specified bank account'
|
|
42
40
|
}), __metadata("design:type", Boolean)], DeleteTransactions.prototype, "deleteBankAccount", void 0);
|
|
43
41
|
|
|
44
|
-
__decorate([(0, _utils.ApiPropertyOptional)(), (0, _classValidator.
|
|
45
|
-
each: true
|
|
46
|
-
}), (0, _classValidator.IsOptional)(), __metadata("design:type", Array)], DeleteTransactions.prototype, "partnerTransactionTypes", void 0);
|
|
42
|
+
__decorate([(0, _utils.ApiPropertyOptional)(), (0, _classValidator.IsOptional)(), __metadata("design:type", Array)], DeleteTransactions.prototype, "partnerTransactionTypes", void 0);
|
|
47
43
|
|
|
48
44
|
class DeleteSocietyTransactions {}
|
|
49
45
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DeleteTransaction.js","mappings":";;;;;;;AAAA;;AACA
|
|
1
|
+
{"version":3,"file":"DeleteTransaction.js","mappings":";;;;;;;AAAA;;AACA;;;;;;;;;;;;;;AAGM,MAAOA,kBAAP,CAAyB;;QAAlBA,kB,GAAAA,kB;;AAEXC,YADC,yBACD;;AAGAA,YADC,iCACD;;AAGAA,YADC,iCACD;;AAGAA,YADC,iCACD;;AAGAA,YADC,iCACD;;AAGAA,YADC,gCAAoB;EAAEC,WAAW,EAAE;AAAf,CAApB,CACD;;AAIAD,YAFC,iCAED,EADC,iCACD;;AAGI,MAAOE,yBAAP,CAAgC;;QAAzBA,yB,GAAAA,yB;;AAEXF,YADC,yBACD","names":["DeleteTransactions","__decorate","description","DeleteSocietyTransactions"],"sourceRoot":"","sources":["../../../../../ts/types/Interface/api/bankAccount/DeleteTransaction.ts"],"sourcesContent":["import { IsOptional } from 'class-validator';\nimport { ApiProperty, ApiPropertyOptional } from '../../../../utils';\nimport { PartnerTransactionType } from '../../../Enum/PartnerTransactionType';\n\nexport class DeleteTransactions {\n @ApiProperty()\n idBankAccount: number;\n\n @ApiPropertyOptional()\n isLocked?: boolean;\n\n @ApiPropertyOptional()\n isExported?: boolean;\n\n @ApiPropertyOptional()\n startDate?: string;\n\n @ApiPropertyOptional()\n endDate?: string;\n\n @ApiPropertyOptional({ description: 'Deleting the bank account. Warning ! this delete also the transactions of the specified bank account' })\n deleteBankAccount?: boolean;\n\n @ApiPropertyOptional()\n @IsOptional()\n partnerTransactionTypes?: PartnerTransactionType[];\n}\n\nexport class DeleteSocietyTransactions {\n @ApiProperty()\n id: number | number[];\n}"]}
|
|
@@ -25,10 +25,6 @@ exports.GetAllCalendarEvent = GetAllCalendarEvent;
|
|
|
25
25
|
|
|
26
26
|
__decorate([(0, _decorators.ApiProperty)(), __metadata("design:type", Number)], GetAllCalendarEvent.prototype, "idUser", void 0);
|
|
27
27
|
|
|
28
|
-
__decorate([(0, _decorators.ApiPropertyOptional)({
|
|
29
|
-
default: false
|
|
30
|
-
}), __metadata("design:type", Boolean)], GetAllCalendarEvent.prototype, "areEventsEditable", void 0);
|
|
31
|
-
|
|
32
28
|
__decorate([(0, _decorators.ApiProperty)(), __metadata("design:type", Date)], GetAllCalendarEvent.prototype, "startDate", void 0);
|
|
33
29
|
|
|
34
30
|
__decorate([(0, _decorators.ApiProperty)(), __metadata("design:type", Date)], GetAllCalendarEvent.prototype, "endDate", void 0);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getAllCalendarEvent.js","mappings":";;;;;;;AAAA;;;;;;;;;;;;;;AAEM,MAAOA,mBAAP,CAA0B;;QAAnBA,mB,GAAAA,mB;;AAEXC,YADC,8BACD;;AAGAA,YADC,
|
|
1
|
+
{"version":3,"file":"getAllCalendarEvent.js","mappings":";;;;;;;AAAA;;;;;;;;;;;;;;AAEM,MAAOA,mBAAP,CAA0B;;QAAnBA,mB,GAAAA,mB;;AAEXC,YADC,8BACD;;AAGAA,YADC,8BACD,4BAAWC,KAAX;;AAGAD,YADC,8BACD,4BAASC,KAAT;;AAGAD,YADC,sCACD","names":["GetAllCalendarEvent","__decorate","Date"],"sourceRoot":"","sources":["../../../../../ts/types/Interface/api/calendarEvent/getAllCalendarEvent.ts"],"sourcesContent":["import { ApiProperty, ApiPropertyOptional } from '../../../../utils/decorators';\n\nexport class GetAllCalendarEvent {\n @ApiProperty()\n idUser: number;\n\n @ApiProperty()\n startDate: Date;\n\n @ApiProperty()\n endDate: Date;\n\n @ApiPropertyOptional()\n isValidated?: boolean;\n}\n"]}
|
package/js/utils/date.js
CHANGED
|
@@ -5,19 +5,21 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.putIntervalBetweenOtherInterval = putIntervalBetweenOtherInterval;
|
|
7
7
|
|
|
8
|
+
// TODO:UT
|
|
8
9
|
function putIntervalBetweenOtherInterval(customPayload, listHours) {
|
|
9
10
|
const res = Object.assign({}, customPayload);
|
|
10
11
|
|
|
11
12
|
if (listHours.length > 0 && (customPayload === null || customPayload === void 0 ? void 0 : customPayload.dateStart) && (customPayload === null || customPayload === void 0 ? void 0 : customPayload.dateEnd)) {
|
|
12
13
|
const dateToCompareStart = new Date(customPayload.dateStart).getTime();
|
|
13
14
|
const dateToCompareEnd = new Date(customPayload.dateEnd).getTime();
|
|
14
|
-
const
|
|
15
|
+
const hoursObject = listHours;
|
|
16
|
+
const textDate = `${new Date(dateToCompareStart).getFullYear()}-${new Date(dateToCompareStart).getMonth() + 1}-${new Date(dateToCompareStart).getDate()}`; // on cherche la bonne specialhour pour comparer les horaires
|
|
15
17
|
|
|
16
|
-
const
|
|
18
|
+
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);
|
|
17
19
|
|
|
18
|
-
if ((
|
|
19
|
-
const dateStart = new Date(
|
|
20
|
-
const dateEnd = new Date(
|
|
20
|
+
if ((hoursOfPeriod === null || hoursOfPeriod === void 0 ? void 0 : hoursOfPeriod.length) > 0 && hoursOfPeriod[0].startTime && hoursOfPeriod[0].endTime) {
|
|
21
|
+
const dateStart = new Date(`${textDate} ${hoursOfPeriod[0].startTime}`).getTime();
|
|
22
|
+
const dateEnd = new Date(`${textDate} ${hoursOfPeriod[0].endTime}`).getTime(); // 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é
|
|
21
23
|
|
|
22
24
|
res.dateStart = !(dateToCompareStart - dateStart >= 0 && dateToCompareStart - dateEnd <= 0) ? new Date(dateStart) : new Date(dateToCompareStart);
|
|
23
25
|
res.dateEnd = !(dateToCompareEnd - dateStart >= 0 && dateToCompareEnd - dateEnd <= 0) ? new Date(dateEnd) : new Date(dateToCompareEnd);
|
package/js/utils/date.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"date.js","mappings":";;;;;
|
|
1
|
+
{"version":3,"file":"date.js","mappings":";;;;;QAUgBA,+B,GAAAA,+B;;AADhB;AACM,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,OA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gB,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","hoursObject","textDate","getFullYear","getMonth","getDate","hoursOfPeriod","filter","h","endTime","startTime"],"sourceRoot":"","sources":["../../ts/utils/date.ts"],"sourcesContent":["/**\n * @param dateStart Date format YYYY-MM-DD HH:mm:ss\n * @param dateEnd Date format YYYY-MM-DD HH:mm:ss\n * @returns object of time (09:00-10:00, 12:00-13:00 et 14:00-17:00)\n */\nimport {\n DateInterval, TimeInterval,\n} from '../types';\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 }\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.247",
|
|
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",
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { IsOptional } from 'class-validator';
|
|
2
2
|
import { ApiProperty, ApiPropertyOptional } from '../../../../utils';
|
|
3
3
|
import { PartnerTransactionType } from '../../../Enum/PartnerTransactionType';
|
|
4
4
|
|
|
@@ -22,8 +22,6 @@ export class DeleteTransactions {
|
|
|
22
22
|
deleteBankAccount?: boolean;
|
|
23
23
|
|
|
24
24
|
@ApiPropertyOptional()
|
|
25
|
-
@IsEnum(PartnerTransactionType)
|
|
26
|
-
@IsPositive({ each: true })
|
|
27
25
|
@IsOptional()
|
|
28
26
|
partnerTransactionTypes?: PartnerTransactionType[];
|
|
29
27
|
}
|
package/ts/utils/date.ts
CHANGED
|
@@ -1,25 +1,27 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @param dateStart
|
|
3
|
-
* @param dateEnd
|
|
4
|
-
* @returns object of
|
|
2
|
+
* @param dateStart Date format YYYY-MM-DD HH:mm:ss
|
|
3
|
+
* @param dateEnd Date format YYYY-MM-DD HH:mm:ss
|
|
4
|
+
* @returns object of time (09:00-10:00, 12:00-13:00 et 14:00-17:00)
|
|
5
5
|
*/
|
|
6
6
|
import {
|
|
7
7
|
DateInterval, TimeInterval,
|
|
8
8
|
} from '../types';
|
|
9
9
|
|
|
10
|
+
// TODO:UT
|
|
10
11
|
export function putIntervalBetweenOtherInterval(customPayload: DateInterval, listHours:TimeInterval[]):DateInterval {
|
|
11
12
|
const res:DateInterval = { ...customPayload };
|
|
12
13
|
if (listHours.length > 0 && customPayload?.dateStart && customPayload?.dateEnd) {
|
|
13
14
|
const dateToCompareStart = new Date(customPayload.dateStart).getTime();
|
|
14
15
|
const dateToCompareEnd = new Date(customPayload.dateEnd).getTime();
|
|
15
|
-
const
|
|
16
|
+
const hoursObject = listHours;
|
|
17
|
+
const textDate = `${new Date(dateToCompareStart).getFullYear()}-${new Date(dateToCompareStart).getMonth() + 1}-${new Date(dateToCompareStart).getDate()}`;
|
|
16
18
|
|
|
17
19
|
// on cherche la bonne specialhour pour comparer les horaires
|
|
18
|
-
const
|
|
20
|
+
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)));
|
|
19
21
|
|
|
20
|
-
if (
|
|
21
|
-
const dateStart = new Date(
|
|
22
|
-
const dateEnd = new Date(
|
|
22
|
+
if (hoursOfPeriod?.length > 0 && hoursOfPeriod[0].startTime && hoursOfPeriod[0].endTime) {
|
|
23
|
+
const dateStart = new Date(`${textDate} ${hoursOfPeriod[0].startTime}`).getTime();
|
|
24
|
+
const dateEnd = new Date(`${textDate} ${hoursOfPeriod[0].endTime}`).getTime();
|
|
23
25
|
|
|
24
26
|
// 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é
|
|
25
27
|
res.dateStart = !((dateToCompareStart - dateStart) >= 0 && (dateToCompareStart - dateEnd) <= 0) ? new Date(dateStart) : new Date(dateToCompareStart);
|