@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.
Files changed (25) hide show
  1. package/es/types/Interface/api/bankAccount/DeleteTransaction.d.ts.map +1 -1
  2. package/es/types/Interface/api/bankAccount/DeleteTransaction.js +1 -4
  3. package/es/types/Interface/api/bankAccount/DeleteTransaction.js.map +1 -1
  4. package/es/types/Interface/api/calendarEvent/getAllCalendarEvent.d.ts +0 -1
  5. package/es/types/Interface/api/calendarEvent/getAllCalendarEvent.d.ts.map +1 -1
  6. package/es/types/Interface/api/calendarEvent/getAllCalendarEvent.js +0 -4
  7. package/es/types/Interface/api/calendarEvent/getAllCalendarEvent.js.map +1 -1
  8. package/es/types/Interface/models/IAccountingTransaction.d.ts +1 -0
  9. package/es/types/Interface/models/IAccountingTransaction.d.ts.map +1 -1
  10. package/es/types/Interface/models/IAccountingTransaction.js.map +1 -1
  11. package/es/utils/date.d.ts +3 -3
  12. package/es/utils/date.d.ts.map +1 -1
  13. package/es/utils/date.js +7 -5
  14. package/es/utils/date.js.map +1 -1
  15. package/js/types/Interface/api/bankAccount/DeleteTransaction.js +1 -5
  16. package/js/types/Interface/api/bankAccount/DeleteTransaction.js.map +1 -1
  17. package/js/types/Interface/api/calendarEvent/getAllCalendarEvent.js +0 -4
  18. package/js/types/Interface/api/calendarEvent/getAllCalendarEvent.js.map +1 -1
  19. package/js/utils/date.js +7 -5
  20. package/js/utils/date.js.map +1 -1
  21. package/package.json +1 -1
  22. package/ts/types/Interface/api/bankAccount/DeleteTransaction.ts +1 -3
  23. package/ts/types/Interface/api/calendarEvent/getAllCalendarEvent.ts +0 -3
  24. package/ts/types/Interface/models/IAccountingTransaction.ts +1 -0
  25. 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;IAM5B,uBAAuB,CAAC,EAAE,sBAAsB,EAAE,CAAC;CACpD;AAED,qBAAa,yBAAyB;IAEpC,EAAE,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC;CACvB"}
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 { IsEnum, IsOptional, IsPositive } from 'class-validator';
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,MAAM,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AACjE,OAAO,EAAE,WAAW,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AACrE,OAAO,EAAE,sBAAsB,EAAE,MAAM,sCAAsC,CAAC;AAE9E,MAAM,OAAO,kBAAkB;CAwB9B;AAtBC;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;AAM5B;IAJC,mBAAmB,EAAE;IACrB,MAAM,CAAC,sBAAsB,CAAC;IAC9B,UAAU,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC;IAC1B,UAAU,EAAE;;mEACsC;AAGrD,MAAM,OAAO,yBAAyB;CAGrC;AADC;IADC,WAAW,EAAE;;qDACQ","sourcesContent":["import { IsEnum, IsOptional, IsPositive } 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 @IsEnum(PartnerTransactionType)\n @IsPositive({ each: true })\n @IsOptional()\n partnerTransactionTypes?: PartnerTransactionType[];\n}\n\nexport class DeleteSocietyTransactions {\n @ApiProperty()\n id: number | number[];\n}"]}
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,6 +1,5 @@
1
1
  export declare class GetAllCalendarEvent {
2
2
  idUser: number;
3
- areEventsEditable?: boolean;
4
3
  startDate: Date;
5
4
  endDate: Date;
6
5
  isValidated?: boolean;
@@ -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,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAG5B,SAAS,EAAE,IAAI,CAAC;IAGhB,OAAO,EAAE,IAAI,CAAC;IAGd,WAAW,CAAC,EAAE,OAAO,CAAC;CACvB"}
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;CAe/B;AAbC;IADC,WAAW,EAAE;;mDACC;AAGf;IADC,mBAAmB,CAAC,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC;;8DACZ;AAG5B;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 @ApiPropertyOptional({ default: false })\n areEventsEditable?: boolean;\n\n @ApiProperty()\n startDate: Date;\n\n @ApiProperty()\n endDate: Date;\n\n @ApiPropertyOptional()\n isValidated?: boolean;\n}\n"]}
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"]}
@@ -14,6 +14,7 @@ import { IMachineLearningResult } from '../..';
14
14
  export interface IAccountingTransaction {
15
15
  id?: number;
16
16
  label: string | null;
17
+ originalLabel?: string | null;
17
18
  invoiceNumber: string | null;
18
19
  reference: string | null;
19
20
  dateValue: Date;
@@ -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,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,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7B,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,SAAS,EAAE,IAAI,CAAC;IAChB,UAAU,CAAC,EAAE,IAAI,GAAG,IAAI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ClC,MAAM,CAAC,EAAE,MAAM,GAAG,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
+ {"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,QA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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"]}
@@ -1,7 +1,7 @@
1
1
  /**
2
- * @param dateStart (format YYYY-MM-DD)
3
- * @param dateEnd (format YYYY-MM-DD)
4
- * @returns object of date (09:00-10:00, 12:00-13:00 et 14:00-17:00)
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;
@@ -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;AAElB,wBAAgB,+BAA+B,CAAC,aAAa,EAAE,YAAY,EAAE,SAAS,EAAC,YAAY,EAAE,GAAE,YAAY,CAoBlH"}
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 realHoursObject = listHours;
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 realHoursOfPeriod = realHoursObject.filter((sh) => (sh.endTime && (dateToCompareStart - new Date(sh.endTime).getTime() <= 0)) && (sh.startTime && (dateToCompareEnd - new Date(sh.startTime).getTime() >= 0)));
9
- if ((realHoursOfPeriod === null || realHoursOfPeriod === void 0 ? void 0 : realHoursOfPeriod.length) > 0 && realHoursOfPeriod[0].startTime && realHoursOfPeriod[0].endTime) {
10
- const dateStart = new Date(realHoursOfPeriod[0].startTime).getTime();
11
- const dateEnd = new Date(realHoursOfPeriod[0].endTime).getTime();
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);
@@ -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,uBAAb,aAAa,CAAE,SAAS,CAAA,KAAI,aAAa,aAAb,aAAa,uBAAb,aAAa,CAAE,OAAO,CAAA,EAAE;QAC9E,MAAM,kBAAkB,GAAG,IAAI,IAAI,CAAC,aAAa,CAAC,SAAS,CAAC,CAAC,OAAO,EAAE,CAAC;QACvE,MAAM,gBAAgB,GAAG,IAAI,IAAI,CAAC,aAAa,CAAC,OAAO,CAAC,CAAC,OAAO,EAAE,CAAC;QACnE,MAAM,eAAe,GAAG,SAAS,CAAC;QAElC,6DAA6D;QAC7D,MAAM,iBAAiB,GAAG,eAAe,CAAC,MAA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,CAAC;SAC5I;KACF;IACD,OAAO,GAAG,CAAC;AACb,CAAC","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}"]}
1
+ {"version":3,"file":"date.js","sourceRoot":"","sources":["../../ts/utils/date.ts"],"names":[],"mappings":"AASA,UAAU;AACV,MAAM,UAAU,+BAA+B,CAAC,aAA2B,EAAE,SAAwB;IACnG,MAAM,GAAG,qBAAqB,aAAa,CAAE,CAAC;IAC9C,IAAI,SAAS,CAAC,MAAM,GAAG,CAAC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,CAAC,CAAC,CAAC,SAAS,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC;YAClF,MAAM,OAAO,GAAG,IAAI,IAAI,CAAC,GAAG,QAAQ,IAAI,aAAa,CAAC,CAAC,CAAC,CAAC,OAAO,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC;YAE9E,0IAA0I;YAC1I,GAAG,CAAC,SAAS,GAAG,CAAC,CAAC,CAAC,kBAAkB,GAAG,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,kBAAkB,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,IAAI,IAAI,CAAC,kBAAkB,CAAC,CAAC;YACrJ,GAAG,CAAC,OAAO,GAAG,CAAC,CAAC,CAAC,gBAAgB,GAAG,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,gBAAgB,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,IAAI,IAAI,CAAC,gBAAgB,CAAC,CAAC;SAC5I;KACF;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.IsEnum)(_PartnerTransactionType.PartnerTransactionType), (0, _classValidator.IsPositive)({
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;;AACA;;;;;;;;;;;;;;AAEM,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;;AAMAD,YAJC,iCAID,EAHC,4BAAOE,8CAAP,CAGD,EAFC,gCAAW;EAAEC,IAAI,EAAE;AAAR,CAAX,CAED,EADC,iCACD;;AAGI,MAAOC,yBAAP,CAAgC;;QAAzBA,yB,GAAAA,yB;;AAEXJ,YADC,yBACD","names":["DeleteTransactions","__decorate","description","PartnerTransactionType","each","DeleteSocietyTransactions"],"sourceRoot":"","sources":["../../../../../ts/types/Interface/api/bankAccount/DeleteTransaction.ts"],"sourcesContent":["import { IsEnum, IsOptional, IsPositive } 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 @IsEnum(PartnerTransactionType)\n @IsPositive({ each: true })\n @IsOptional()\n partnerTransactionTypes?: PartnerTransactionType[];\n}\n\nexport class DeleteSocietyTransactions {\n @ApiProperty()\n id: number | number[];\n}"]}
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,qCAAoB;EAAEC,OAAO,EAAE;AAAX,CAApB,CACD;;AAGAD,YADC,8BACD,4BAAWE,KAAX;;AAGAF,YADC,8BACD,4BAASE,KAAT;;AAGAF,YADC,sCACD","names":["GetAllCalendarEvent","__decorate","default","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 @ApiPropertyOptional({ default: false })\n areEventsEditable?: boolean;\n\n @ApiProperty()\n startDate: Date;\n\n @ApiProperty()\n endDate: Date;\n\n @ApiPropertyOptional()\n isValidated?: boolean;\n}\n"]}
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 realHoursObject = listHours; // on cherche la bonne specialhour pour comparer les horaires
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 realHoursOfPeriod = realHoursObject.filter(sh => sh.endTime && dateToCompareStart - new Date(sh.endTime).getTime() <= 0 && sh.startTime && dateToCompareEnd - new Date(sh.startTime).getTime() >= 0);
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 ((realHoursOfPeriod === null || realHoursOfPeriod === void 0 ? void 0 : realHoursOfPeriod.length) > 0 && realHoursOfPeriod[0].startTime && realHoursOfPeriod[0].endTime) {
19
- const dateStart = new Date(realHoursOfPeriod[0].startTime).getTime();
20
- const dateEnd = new Date(realHoursOfPeriod[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é
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);
@@ -1 +1 @@
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}"]}
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,WAA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AGI,QAAQ,IAAII,aAAa,CAAC,CAAD,CAAb,CAAiBG,OAAO,EAAhD,EAAoDV,OAApD,EAAhB,CAFuF,CAIvF;;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","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.245",
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 { IsEnum, IsOptional, IsPositive } from 'class-validator';
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
  }
@@ -4,9 +4,6 @@ export class GetAllCalendarEvent {
4
4
  @ApiProperty()
5
5
  idUser: number;
6
6
 
7
- @ApiPropertyOptional({ default: false })
8
- areEventsEditable?: boolean;
9
-
10
7
  @ApiProperty()
11
8
  startDate: Date;
12
9
 
@@ -16,6 +16,7 @@ import { IMachineLearningResult } from '../..';
16
16
  export interface IAccountingTransaction {
17
17
  id?: number;
18
18
  label: string | null;
19
+ originalLabel?: string | null;
19
20
  invoiceNumber: string | null;
20
21
  reference: string | null;
21
22
  dateValue: Date;
package/ts/utils/date.ts CHANGED
@@ -1,25 +1,27 @@
1
1
  /**
2
- * @param dateStart (format YYYY-MM-DD)
3
- * @param dateEnd (format YYYY-MM-DD)
4
- * @returns object of date (09:00-10:00, 12:00-13:00 et 14:00-17:00)
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 realHoursObject = listHours;
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 realHoursOfPeriod = realHoursObject.filter((sh) => (sh.endTime && (dateToCompareStart - new Date(sh.endTime).getTime() <= 0)) && (sh.startTime && (dateToCompareEnd - new Date(sh.startTime).getTime() >= 0)));
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 (realHoursOfPeriod?.length > 0 && realHoursOfPeriod[0].startTime && realHoursOfPeriod[0].endTime) {
21
- const dateStart = new Date(realHoursOfPeriod[0].startTime).getTime();
22
- const dateEnd = new Date(realHoursOfPeriod[0].endTime).getTime();
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);