@silexpert/core 1.0.24 → 1.0.25
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/FIle.d.ts +1 -1
- package/es/api/resources/FIle.d.ts.map +1 -1
- package/es/api/resources/FIle.js +11 -2
- package/es/api/resources/FIle.js.map +1 -1
- package/es/types/Interface/api/commercialManagement/Create.d.ts +1 -0
- package/es/types/Interface/api/commercialManagement/Create.d.ts.map +1 -1
- package/es/types/Interface/api/commercialManagement/Create.js +5 -0
- package/es/types/Interface/api/commercialManagement/Create.js.map +1 -1
- package/es/types/Interface/api/commercialManagement/Query.d.ts +1 -1
- package/es/types/Interface/api/commercialManagement/Query.d.ts.map +1 -1
- package/es/types/Interface/api/commercialManagement/Query.js.map +1 -1
- package/es/types/Interface/api/commercialManagement/Update.d.ts +1 -0
- package/es/types/Interface/api/commercialManagement/Update.d.ts.map +1 -1
- package/es/types/Interface/api/commercialManagement/Update.js +6 -0
- package/es/types/Interface/api/commercialManagement/Update.js.map +1 -1
- package/es/types/Interface/api/file/Create.d.ts +1 -1
- package/es/types/Interface/api/file/Create.d.ts.map +1 -1
- package/es/types/Interface/api/file/Create.js.map +1 -1
- package/es/types/Interface/models/IInvoiceReminder.d.ts +1 -0
- package/es/types/Interface/models/IInvoiceReminder.d.ts.map +1 -1
- package/es/types/Interface/models/IInvoiceReminder.js.map +1 -1
- package/es/utils/amount.js +1 -1
- package/es/utils/amount.js.map +1 -1
- package/js/api/resources/FIle.js +16 -2
- package/js/api/resources/FIle.js.map +1 -1
- package/js/types/Interface/api/commercialManagement/Create.js +2 -0
- package/js/types/Interface/api/commercialManagement/Create.js.map +1 -1
- package/js/types/Interface/api/commercialManagement/Query.js.map +1 -1
- package/js/types/Interface/api/commercialManagement/Update.js +2 -0
- package/js/types/Interface/api/commercialManagement/Update.js.map +1 -1
- package/js/types/Interface/api/file/Create.js.map +1 -1
- package/js/utils/amount.js +1 -1
- package/js/utils/amount.js.map +1 -1
- package/package.json +1 -1
- package/ts/api/resources/FIle.ts +11 -2
- package/ts/types/Interface/api/commercialManagement/Create.ts +4 -0
- package/ts/types/Interface/api/commercialManagement/Query.ts +1 -1
- package/ts/types/Interface/api/commercialManagement/Update.ts +5 -0
- package/ts/types/Interface/api/file/Create.ts +1 -1
- package/ts/types/Interface/models/IInvoiceReminder.ts +1 -0
- package/ts/utils/amount.ts +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Resource } from '../Resource';
|
|
2
2
|
import { ReadFile, CreateFile } from '../../types';
|
|
3
3
|
export declare class File extends Resource {
|
|
4
|
-
upload(params: CreateFile): Promise<ReadFile>;
|
|
4
|
+
upload(params: Omit<CreateFile, 'file'>, file: File): Promise<ReadFile>;
|
|
5
5
|
}
|
|
6
6
|
//# sourceMappingURL=FIle.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FIle.d.ts","sourceRoot":"","sources":["../../../ts/api/resources/FIle.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"FIle.d.ts","sourceRoot":"","sources":["../../../ts/api/resources/FIle.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AACvC,OAAO,EACL,QAAQ,EACR,UAAU,EACX,MAAM,aAAa,CAAC;AAErB,qBAAa,IAAK,SAAQ,QAAQ;IAChC,MAAM,CAAC,MAAM,EAAE,IAAI,CAAC,UAAU,EAAE,MAAM,CAAC,EAAE,IAAI,EAAE,IAAI,GAAG,OAAO,CAAC,QAAQ,CAAC;CAWxE"}
|
package/es/api/resources/FIle.js
CHANGED
|
@@ -1,7 +1,16 @@
|
|
|
1
|
+
import { forEach } from 'lodash';
|
|
1
2
|
import { Resource } from '../Resource';
|
|
2
3
|
export class File extends Resource {
|
|
3
|
-
upload(params) {
|
|
4
|
-
|
|
4
|
+
upload(params, file) {
|
|
5
|
+
const formData = new FormData();
|
|
6
|
+
forEach(params, (value, key) => {
|
|
7
|
+
if (value) {
|
|
8
|
+
formData.append(key, `${value}`);
|
|
9
|
+
}
|
|
10
|
+
});
|
|
11
|
+
// @ts-ignore
|
|
12
|
+
formData.append('file', file);
|
|
13
|
+
return this.axios.$post('files', formData, { headers: { 'Content-Type': 'multipart/form-data' } });
|
|
5
14
|
}
|
|
6
15
|
}
|
|
7
16
|
//# sourceMappingURL=FIle.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FIle.js","sourceRoot":"","sources":["../../../ts/api/resources/FIle.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAMvC,MAAM,OAAO,IAAK,SAAQ,QAAQ;IAChC,MAAM,CAAC,
|
|
1
|
+
{"version":3,"file":"FIle.js","sourceRoot":"","sources":["../../../ts/api/resources/FIle.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,QAAQ,CAAC;AACjC,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAMvC,MAAM,OAAO,IAAK,SAAQ,QAAQ;IAChC,MAAM,CAAC,MAAgC,EAAE,IAAU;QACjD,MAAM,QAAQ,GAAG,IAAI,QAAQ,EAAE,CAAC;QAChC,OAAO,CAAC,MAAM,EAAE,CAAC,KAAK,EAAE,GAAG,EAAE,EAAE;YAC7B,IAAI,KAAK,EAAE;gBACT,QAAQ,CAAC,MAAM,CAAC,GAAG,EAAE,GAAG,KAAK,EAAE,CAAC,CAAC;aAClC;QACH,CAAC,CAAC,CAAC;QACH,aAAa;QACb,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC;QAC9B,OAAO,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,OAAO,EAAE,QAAQ,EAAE,EAAE,OAAO,EAAE,EAAE,cAAc,EAAE,qBAAqB,EAAE,EAAE,CAAC,CAAC;IACrG,CAAC;CACF","sourcesContent":["import { forEach } from 'lodash';\nimport { Resource } from '../Resource';\nimport {\n ReadFile,\n CreateFile,\n} from '../../types';\n\nexport class File extends Resource {\n upload(params: Omit<CreateFile, 'file'>, file: File): Promise<ReadFile> {\n const formData = new FormData();\n forEach(params, (value, key) => {\n if (value) {\n formData.append(key, `${value}`);\n }\n });\n // @ts-ignore\n formData.append('file', file);\n return this.axios.$post('files', formData, { headers: { 'Content-Type': 'multipart/form-data' } });\n }\n}"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Create.d.ts","sourceRoot":"","sources":["../../../../../ts/types/Interface/api/commercialManagement/Create.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,oBAAoB,EAAE,OAAO,EAAE,aAAa,EAAE,MAAM,oCAAoC,CAAC;AAClG,OAAO,EAAE,mBAAmB,EAAE,MAAM,+BAA+B,CAAC;AAEpE,OAAO,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAC;AAC/D,OAAO,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAC;AAC7D,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAEvD,oBAAY,uBAAuB,GAAG,eAAe,GAAG;IAAE,IAAI,CAAC,EAAE,OAAO,CAAA;CAAE,CAAC;AAE3E,qBAAa,uBAAuB;IAOlC,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAKxB,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAKxB,GAAG,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAKpB,oBAAoB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAKrC,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAKrB,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAKrB,GAAG,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAKpB,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAK5B,YAAY,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAK7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AE,SAAS,CAAC;IAC1B,iBAAiB,CAAC,EAAE,EAAE,CAAC;CACxB;AACD,qBAAa,qBAAsB,SAAQ,wBAAwB;IACjE,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,aAAa,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC9B,cAAc,EAAE,MAAM,GAAG,IAAI,CAAC;IAC9B,iBAAiB,CAAC,EAAE,MAAM,EAAE,CAAC;CAC9B;AAED,qBAAa,SAAS;IAEpB,GAAG,EAAE,MAAM,GAAG,IAAI,CAAC;CACpB;AAED,qBAAa,cAAc;IAIzB,WAAW,EAAE,OAAO,CAAC;IAKrB,OAAO,EAAE,OAAO,CAAC;IAKjB,UAAU,EAAE,OAAO,CAAC;IAKpB,UAAU,EAAE,OAAO,CAAC;IAKpB,OAAO,CAAC,EAAE,MAAM,CAAC;IAKjB,OAAO,CAAC,EAAE,MAAM,CAAC;IAIjB,KAAK,EAAE,MAAM,CAAC;CACf;AAED,qBAAa,gBAAgB;IAG3B,IAAI,EAAE,MAAM,CAAC;IAIb,SAAS,EAAE,MAAM,CAAC;IAIlB,OAAO,EAAE,MAAM,CAAC;IAKhB,QAAQ,EAAE,OAAO,CAAC;CACnB"}
|
|
@@ -481,6 +481,11 @@ __decorate([
|
|
|
481
481
|
IsOptional(),
|
|
482
482
|
__metadata("design:type", String)
|
|
483
483
|
], CreateReminder.prototype, "message", void 0);
|
|
484
|
+
__decorate([
|
|
485
|
+
ApiProperty(),
|
|
486
|
+
IsString(),
|
|
487
|
+
__metadata("design:type", String)
|
|
488
|
+
], CreateReminder.prototype, "email", void 0);
|
|
484
489
|
export class CreateRecurrence {
|
|
485
490
|
}
|
|
486
491
|
__decorate([
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Create.js","sourceRoot":"","sources":["../../../../../ts/types/Interface/api/commercialManagement/Create.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EAC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iB5B;AAdC;IAFC,WAAW,EAAE;IACb,MAAM,CAAC,cAAc,CAAC;;8CACV;AAIb;IAFC,WAAW,EAAE;IACb,YAAY,EAAE;;mDACG;AAIlB;IAFC,WAAW,EAAE;IACb,YAAY,EAAE;;iDACC;AAKhB;IAHC,WAAW,EAAE;IACb,SAAS,EAAE;IACX,SAAS,EAAE;;kDACM","sourcesContent":["import {\n IsArray, IsBoolean, IsDateString, IsEnum, IsNumber, IsOptional, IsString, Min,\n} from 'class-validator';\nimport { ApiProperty, ApiPropertyOptional } from '../../../../utils';\nimport { ToBoolean } from '../../../../utils/transforms/boolean.transform';\nimport { AccountingCategoryId, FontIds, LogoAlignment } from '../../../Enum/CommercialManagement';\nimport { EstimateInvoiceType } from '../../../Enum/EstimateInvoice';\nimport { RecurrenceType } from '../../../Enum/RecurrenceType';\nimport { IProductInvoice } from '../../models/IProductInvoice';\nimport { ISocietyGescom } from '../../models/ISocietyGescom';\nimport { IThirdParty } from '../../models/IThirdParty';\n\nexport type IProductInvoiceToCreate = IProductInvoice & { save?: boolean };\n\nexport class CreateCommercialSetting {\n @ApiPropertyOptional()\n @IsOptional()\n @IsNumber()\n @Min(0, {\n message: 'Capital should be positive',\n })\n capital?: number | null;\n\n @ApiPropertyOptional()\n @IsOptional()\n @IsString()\n tvaCode?: string | null;\n\n @ApiPropertyOptional()\n @IsOptional()\n @IsString()\n rcs?: string | null;\n\n @ApiPropertyOptional()\n @IsOptional()\n @IsString()\n numberTradeDirectory?: string | null;\n\n @ApiPropertyOptional()\n @IsOptional()\n @IsString()\n bank?: string | null;\n\n @ApiPropertyOptional()\n @IsOptional()\n @IsString()\n iban?: string | null;\n\n @ApiPropertyOptional()\n @IsOptional()\n @IsString()\n bic?: string | null;\n\n @ApiPropertyOptional()\n @IsOptional()\n @IsString()\n mailContact?: string | null;\n\n @ApiPropertyOptional()\n @IsOptional()\n @IsString()\n phoneContact?: string | null;\n\n @ApiPropertyOptional()\n @IsOptional()\n @IsString()\n website?: string | null;\n\n @ApiPropertyOptional()\n @IsOptional()\n @IsString()\n commercialName?: string | null;\n\n @ApiPropertyOptional()\n @IsOptional()\n @IsString()\n penalties?: string | null;\n\n @ApiPropertyOptional()\n @IsOptional()\n @IsString()\n discount?: string | null;\n\n @ApiPropertyOptional()\n @IsOptional()\n @IsString()\n recoveryCost?: string | null;\n\n @ApiPropertyOptional()\n @IsOptional()\n @IsString()\n vatMention?: string | null;\n\n @ApiPropertyOptional()\n @IsOptional()\n @IsBoolean()\n @ToBoolean()\n generatedBy?: boolean;\n\n @ApiPropertyOptional()\n @IsOptional()\n @IsBoolean()\n @ToBoolean()\n acceptCheque?: boolean;\n\n @ApiPropertyOptional()\n @IsOptional()\n @IsBoolean()\n @ToBoolean()\n mentionAutoent?: boolean;\n\n @ApiPropertyOptional()\n @IsOptional()\n @IsNumber()\n startInvoice?: number | null;\n\n @ApiPropertyOptional()\n @IsOptional()\n @IsNumber()\n startEstimate?: number | null;\n\n @ApiPropertyOptional()\n @IsOptional()\n @IsNumber()\n dayOfValidity?: number | null;\n\n @ApiPropertyOptional()\n @IsOptional()\n @IsBoolean()\n @ToBoolean()\n paymentsAccepted?: boolean;\n\n @ApiPropertyOptional()\n @IsOptional()\n @IsBoolean()\n @ToBoolean()\n stripePaymentByDefault?: boolean;\n\n @ApiPropertyOptional()\n @IsOptional()\n @IsBoolean()\n @ToBoolean()\n displayLogo?: boolean;\n\n @ApiPropertyOptional()\n @IsOptional()\n @IsBoolean()\n @ToBoolean()\n invoiceCgv?: boolean;\n\n @ApiPropertyOptional()\n @IsOptional()\n @IsString()\n color?: string | null;\n\n @ApiPropertyOptional()\n @IsOptional()\n @IsString()\n freeInvoiceText?: string | null;\n\n @ApiPropertyOptional()\n @IsOptional()\n @IsString()\n freeEstimateText?: string | null;\n\n @ApiPropertyOptional()\n @IsOptional()\n @IsString()\n logoAlignment?: LogoAlignment | null;\n\n @ApiPropertyOptional()\n @IsOptional()\n @IsNumber()\n idFont?: FontIds | null;\n\n @ApiPropertyOptional()\n @IsOptional()\n @IsBoolean()\n @ToBoolean()\n isEdgingDisplayed?: boolean;\n\n @ApiPropertyOptional()\n @IsOptional()\n @IsString()\n edgingColor?: string;\n\n @ApiPropertyOptional()\n @IsOptional()\n @IsBoolean()\n @ToBoolean()\n isCoordinatesFrameDisplayed?: boolean;\n\n @ApiPropertyOptional()\n @IsOptional()\n @IsBoolean()\n @ToBoolean()\n areLinesSeparationHidden?: boolean;\n\n @ApiPropertyOptional()\n @IsOptional()\n @IsBoolean()\n @ToBoolean()\n areColumnsSeparationHidden?: boolean;\n\n @ApiPropertyOptional()\n @IsOptional()\n accountingCategory: AccountingCategoryId;\n\n @ApiPropertyOptional()\n @IsOptional()\n @IsBoolean()\n @ToBoolean()\n shouldPayTaxAfterDebit: boolean;\n}\n\nexport class CreateCommercialMail {\n @ApiProperty()\n @IsString()\n to: string;\n\n @ApiPropertyOptional()\n @IsOptional()\n @IsString()\n cc?: string;\n\n @ApiPropertyOptional()\n @IsOptional()\n @IsString()\n bcc?: string;\n\n @ApiProperty()\n @IsString()\n subject: string;\n\n @ApiProperty()\n @IsString()\n content: string;\n}\n\nexport class CommercialDocumentInputs {\n @ApiProperty()\n legalForm: string | null;\n\n @ApiProperty()\n capital: number | null;\n\n @ApiProperty()\n siren: string | null;\n\n @ApiProperty()\n rcs: string | null;\n\n @ApiProperty()\n vatCode: string | null;\n\n @ApiProperty()\n nafCode: string | null;\n\n @ApiProperty()\n @IsString()\n reference: string; //\n\n @ApiProperty()\n thirdParty: IThirdParty; //\n\n @ApiProperty()\n @IsDateString()\n emissionDate: string; //\n\n @ApiProperty()\n @IsDateString()\n dueDate: string; //\n\n @ApiProperty({ description: 'Date d\\'expiration pour la facture d\\'acompte' })\n expirationDate: string | null;\n\n @ApiProperty({ description: 'Conditions de réglement' })\n termsOfPayment: string | null;\n\n @ApiProperty()\n @IsArray()\n products: Array<IProductInvoiceToCreate>;\n\n @ApiProperty({ description: 'Escompte' })\n @IsString()\n discount: string; //\n\n @ApiProperty()\n comment: string | null; //\n\n @ApiProperty({ description: 'Pénalité de retard' })\n penalties: string | null; //\n\n @ApiProperty({ description: 'Remise globale' })\n @IsNumber()\n generalDiscount2: number; //\n\n @ApiProperty({ description: 'Indemnité forfaitaire' })\n compensation: string | null; //\n\n @ApiProperty()\n vatMention: string | null; //\n\n @ApiProperty()\n @IsBoolean()\n @ToBoolean()\n disableVat: boolean;\n\n @ApiProperty()\n title: string | null; //\n\n @ApiProperty({ description: 'Commercial name of seller' })\n @IsString()\n name: string;\n\n @ApiProperty({ description: 'Commercial number address of seller' })\n number?: string | null;\n\n @ApiProperty({ description: 'Commercial street address of seller' })\n street: string | null;\n\n @ApiProperty({ description: 'Commercial zip code address of seller' })\n zipCode: string | null;\n\n @ApiProperty({ description: 'Commercial city address of seller' })\n city: string | null;\n\n @ApiProperty()\n settings?: ISocietyGescom;\n\n @ApiProperty()\n cgv: string | null;\n\n @ApiProperty()\n logoUrl: string | null;\n\n @ApiProperty()\n @IsBoolean()\n @ToBoolean()\n isStripeAllowed?: boolean;\n\n @ApiProperty()\n @IsBoolean()\n @ToBoolean()\n isDraft?: boolean;\n\n @ApiProperty()\n idEstimateInvoiceType: EstimateInvoiceType;\n\n @ApiProperty()\n accountingCategory: AccountingCategoryId;\n\n @ApiProperty()\n @IsBoolean()\n @ToBoolean()\n shouldPayTaxAfterDebit: boolean;\n}\n\nexport class CreatePreSaleDocument extends CommercialDocumentInputs {\n paymentLink?: '#';\n deposit?: undefined;\n fromEstimateId: undefined;\n assetMarginVatIds?: [];\n}\nexport class CreateInvoiceDocument extends CommercialDocumentInputs {\n paymentLink?: string;\n deposit?: number;\n fromInvoiceId?: number | null; // Nécessaire lors de la création d'un avoir à partir d'une facture\n fromEstimateId: number | null; // Nécessaire lors du passage d'un devis à facture\n assetMarginVatIds?: number[]; // Laisser vide côté front, utilisé pour l'affichage des tva sur marge sur les acomptes\n}\n\nexport class CreateCgv {\n @ApiProperty()\n cgv: string | null;\n}\n\nexport class CreateReminder {\n @ApiProperty()\n @IsBoolean()\n @ToBoolean()\n beforeThree: boolean;\n\n @ApiProperty()\n @IsBoolean()\n @ToBoolean()\n dueDate: boolean;\n\n @ApiProperty()\n @IsBoolean()\n @ToBoolean()\n afterThree: boolean;\n\n @ApiProperty()\n @IsBoolean()\n @ToBoolean()\n afterSeven: boolean;\n\n @ApiPropertyOptional()\n @IsString()\n @IsOptional()\n subject?: string;\n\n @ApiPropertyOptional()\n @IsString()\n @IsOptional()\n message?: string;\n}\n\nexport class CreateRecurrence {\n @ApiProperty()\n @IsEnum(RecurrenceType)\n type: number;\n\n @ApiProperty()\n @IsDateString()\n startDate: string;\n\n @ApiProperty()\n @IsDateString()\n endDate: string;\n\n @ApiProperty()\n @ToBoolean()\n @IsBoolean()\n isActive: boolean;\n}"]}
|
|
1
|
+
{"version":3,"file":"Create.js","sourceRoot":"","sources":["../../../../../ts/types/Interface/api/commercialManagement/Create.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EACL,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,EAAE,QAAQ,EAAE,UAAU,EAAE,QAAQ,EAAE,GAAG,GAC9E,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,WAAW,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AACrE,OAAO,EAAE,SAAS,EAAE,MAAM,gDAAgD,CAAC;AAC3E,OAAO,EAAE,oBAAoB,EAA0B,MAAM,oCAAoC,CAAC;AAClG,OAAO,EAAE,mBAAmB,EAAE,MAAM,+BAA+B,CAAC;AACpE,OAAO,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAO9D,MAAM,OAAO,uBAAuB;CAuMnC;AAhMC;IANC,mBAAmB,EAAE;IACrB,UAAU,EAAE;IACZ,QAAQ,EAAE;IACV,GAAG,CAAC,CAAC,EAAE;QACN,OAAO,EAAE,4BAA4B;KACtC,CAAC;;wDACsB;AAKxB;IAHC,mBAAmB,EAAE;IACrB,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lC,MAAM,OAAO,qBAAsB,SAAQ,wBAAwB;CAKlE;AACD,MAAM,OAAO,qBAAsB,SAAQ,wBAAwB;CAMlE;AAED,MAAM,OAAO,SAAS;CAGrB;AADC;IADC,WAAW,EAAE;;sCACK;AAGrB,MAAM,OAAO,cAAc;CAkC1B;AA9BC;IAHC,WAAW,EAAE;IACb,SAAS,EAAE;IACX,SAAS,EAAE;;mDACS;AAKrB;IAHC,WAAW,EAAE;IACb,SAAS,EAAE;IACX,SAAS,EAAE;;+CACK;AAKjB;IAHC,WAAW,EAAE;IACb,SAAS,EAAE;IACX,SAAS,EAAE;;kDACQ;AAKpB;IAHC,WAAW,EAAE;IACb,SAAS,EAAE;IACX,SAAS,EAAE;;kDACQ;AAKpB;IAHC,mBAAmB,EAAE;IACrB,QAAQ,EAAE;IACV,UAAU,EAAE;;+CACI;AAKjB;IAHC,mBAAmB,EAAE;IACrB,QAAQ,EAAE;IACV,UAAU,EAAE;;+CACI;AAIjB;IAFC,WAAW,EAAE;IACb,QAAQ,EAAE;;6CACG;AAGhB,MAAM,OAAO,gBAAgB;CAiB5B;AAdC;IAFC,WAAW,EAAE;IACb,MAAM,CAAC,cAAc,CAAC;;8CACV;AAIb;IAFC,WAAW,EAAE;IACb,YAAY,EAAE;;mDACG;AAIlB;IAFC,WAAW,EAAE;IACb,YAAY,EAAE;;iDACC;AAKhB;IAHC,WAAW,EAAE;IACb,SAAS,EAAE;IACX,SAAS,EAAE;;kDACM","sourcesContent":["import {\n IsArray, IsBoolean, IsDateString, IsEnum, IsNumber, IsOptional, IsString, Min,\n} from 'class-validator';\nimport { ApiProperty, ApiPropertyOptional } from '../../../../utils';\nimport { ToBoolean } from '../../../../utils/transforms/boolean.transform';\nimport { AccountingCategoryId, FontIds, LogoAlignment } from '../../../Enum/CommercialManagement';\nimport { EstimateInvoiceType } from '../../../Enum/EstimateInvoice';\nimport { RecurrenceType } from '../../../Enum/RecurrenceType';\nimport { IProductInvoice } from '../../models/IProductInvoice';\nimport { ISocietyGescom } from '../../models/ISocietyGescom';\nimport { IThirdParty } from '../../models/IThirdParty';\n\nexport type IProductInvoiceToCreate = IProductInvoice & { save?: boolean };\n\nexport class CreateCommercialSetting {\n @ApiPropertyOptional()\n @IsOptional()\n @IsNumber()\n @Min(0, {\n message: 'Capital should be positive',\n })\n capital?: number | null;\n\n @ApiPropertyOptional()\n @IsOptional()\n @IsString()\n tvaCode?: string | null;\n\n @ApiPropertyOptional()\n @IsOptional()\n @IsString()\n rcs?: string | null;\n\n @ApiPropertyOptional()\n @IsOptional()\n @IsString()\n numberTradeDirectory?: string | null;\n\n @ApiPropertyOptional()\n @IsOptional()\n @IsString()\n bank?: string | null;\n\n @ApiPropertyOptional()\n @IsOptional()\n @IsString()\n iban?: string | null;\n\n @ApiPropertyOptional()\n @IsOptional()\n @IsString()\n bic?: string | null;\n\n @ApiPropertyOptional()\n @IsOptional()\n @IsString()\n mailContact?: string | null;\n\n @ApiPropertyOptional()\n @IsOptional()\n @IsString()\n phoneContact?: string | null;\n\n @ApiPropertyOptional()\n @IsOptional()\n @IsString()\n website?: string | null;\n\n @ApiPropertyOptional()\n @IsOptional()\n @IsString()\n commercialName?: string | null;\n\n @ApiPropertyOptional()\n @IsOptional()\n @IsString()\n penalties?: string | null;\n\n @ApiPropertyOptional()\n @IsOptional()\n @IsString()\n discount?: string | null;\n\n @ApiPropertyOptional()\n @IsOptional()\n @IsString()\n recoveryCost?: string | null;\n\n @ApiPropertyOptional()\n @IsOptional()\n @IsString()\n vatMention?: string | null;\n\n @ApiPropertyOptional()\n @IsOptional()\n @IsBoolean()\n @ToBoolean()\n generatedBy?: boolean;\n\n @ApiPropertyOptional()\n @IsOptional()\n @IsBoolean()\n @ToBoolean()\n acceptCheque?: boolean;\n\n @ApiPropertyOptional()\n @IsOptional()\n @IsBoolean()\n @ToBoolean()\n mentionAutoent?: boolean;\n\n @ApiPropertyOptional()\n @IsOptional()\n @IsNumber()\n startInvoice?: number | null;\n\n @ApiPropertyOptional()\n @IsOptional()\n @IsNumber()\n startEstimate?: number | null;\n\n @ApiPropertyOptional()\n @IsOptional()\n @IsNumber()\n dayOfValidity?: number | null;\n\n @ApiPropertyOptional()\n @IsOptional()\n @IsBoolean()\n @ToBoolean()\n paymentsAccepted?: boolean;\n\n @ApiPropertyOptional()\n @IsOptional()\n @IsBoolean()\n @ToBoolean()\n stripePaymentByDefault?: boolean;\n\n @ApiPropertyOptional()\n @IsOptional()\n @IsBoolean()\n @ToBoolean()\n displayLogo?: boolean;\n\n @ApiPropertyOptional()\n @IsOptional()\n @IsBoolean()\n @ToBoolean()\n invoiceCgv?: boolean;\n\n @ApiPropertyOptional()\n @IsOptional()\n @IsString()\n color?: string | null;\n\n @ApiPropertyOptional()\n @IsOptional()\n @IsString()\n freeInvoiceText?: string | null;\n\n @ApiPropertyOptional()\n @IsOptional()\n @IsString()\n freeEstimateText?: string | null;\n\n @ApiPropertyOptional()\n @IsOptional()\n @IsString()\n logoAlignment?: LogoAlignment | null;\n\n @ApiPropertyOptional()\n @IsOptional()\n @IsNumber()\n idFont?: FontIds | null;\n\n @ApiPropertyOptional()\n @IsOptional()\n @IsBoolean()\n @ToBoolean()\n isEdgingDisplayed?: boolean;\n\n @ApiPropertyOptional()\n @IsOptional()\n @IsString()\n edgingColor?: string;\n\n @ApiPropertyOptional()\n @IsOptional()\n @IsBoolean()\n @ToBoolean()\n isCoordinatesFrameDisplayed?: boolean;\n\n @ApiPropertyOptional()\n @IsOptional()\n @IsBoolean()\n @ToBoolean()\n areLinesSeparationHidden?: boolean;\n\n @ApiPropertyOptional()\n @IsOptional()\n @IsBoolean()\n @ToBoolean()\n areColumnsSeparationHidden?: boolean;\n\n @ApiPropertyOptional()\n @IsOptional()\n accountingCategory: AccountingCategoryId;\n\n @ApiPropertyOptional()\n @IsOptional()\n @IsBoolean()\n @ToBoolean()\n shouldPayTaxAfterDebit: boolean;\n}\n\nexport class CreateCommercialMail {\n @ApiProperty()\n @IsString()\n to: string;\n\n @ApiPropertyOptional()\n @IsOptional()\n @IsString()\n cc?: string;\n\n @ApiPropertyOptional()\n @IsOptional()\n @IsString()\n bcc?: string;\n\n @ApiProperty()\n @IsString()\n subject: string;\n\n @ApiProperty()\n @IsString()\n content: string;\n}\n\nexport class CommercialDocumentInputs {\n @ApiProperty()\n legalForm: string | null;\n\n @ApiProperty()\n capital: number | null;\n\n @ApiProperty()\n siren: string | null;\n\n @ApiProperty()\n rcs: string | null;\n\n @ApiProperty()\n vatCode: string | null;\n\n @ApiProperty()\n nafCode: string | null;\n\n @ApiProperty()\n @IsString()\n reference: string; //\n\n @ApiProperty()\n thirdParty: IThirdParty; //\n\n @ApiProperty()\n @IsDateString()\n emissionDate: string; //\n\n @ApiProperty()\n @IsDateString()\n dueDate: string; //\n\n @ApiProperty({ description: 'Date d\\'expiration pour la facture d\\'acompte' })\n expirationDate: string | null;\n\n @ApiProperty({ description: 'Conditions de réglement' })\n termsOfPayment: string | null;\n\n @ApiProperty()\n @IsArray()\n products: Array<IProductInvoiceToCreate>;\n\n @ApiProperty({ description: 'Escompte' })\n @IsString()\n discount: string; //\n\n @ApiProperty()\n comment: string | null; //\n\n @ApiProperty({ description: 'Pénalité de retard' })\n penalties: string | null; //\n\n @ApiProperty({ description: 'Remise globale' })\n @IsNumber()\n generalDiscount2: number; //\n\n @ApiProperty({ description: 'Indemnité forfaitaire' })\n compensation: string | null; //\n\n @ApiProperty()\n vatMention: string | null; //\n\n @ApiProperty()\n @IsBoolean()\n @ToBoolean()\n disableVat: boolean;\n\n @ApiProperty()\n title: string | null; //\n\n @ApiProperty({ description: 'Commercial name of seller' })\n @IsString()\n name: string;\n\n @ApiProperty({ description: 'Commercial number address of seller' })\n number?: string | null;\n\n @ApiProperty({ description: 'Commercial street address of seller' })\n street: string | null;\n\n @ApiProperty({ description: 'Commercial zip code address of seller' })\n zipCode: string | null;\n\n @ApiProperty({ description: 'Commercial city address of seller' })\n city: string | null;\n\n @ApiProperty()\n settings?: ISocietyGescom;\n\n @ApiProperty()\n cgv: string | null;\n\n @ApiProperty()\n logoUrl: string | null;\n\n @ApiProperty()\n @IsBoolean()\n @ToBoolean()\n isStripeAllowed?: boolean;\n\n @ApiProperty()\n @IsBoolean()\n @ToBoolean()\n isDraft?: boolean;\n\n @ApiProperty()\n idEstimateInvoiceType: EstimateInvoiceType;\n\n @ApiProperty()\n accountingCategory: AccountingCategoryId;\n\n @ApiProperty()\n @IsBoolean()\n @ToBoolean()\n shouldPayTaxAfterDebit: boolean;\n}\n\nexport class CreatePreSaleDocument extends CommercialDocumentInputs {\n paymentLink?: '#';\n deposit?: undefined;\n fromEstimateId: undefined;\n assetMarginVatIds?: [];\n}\nexport class CreateInvoiceDocument extends CommercialDocumentInputs {\n paymentLink?: string;\n deposit?: number;\n fromInvoiceId?: number | null; // Nécessaire lors de la création d'un avoir à partir d'une facture\n fromEstimateId: number | null; // Nécessaire lors du passage d'un devis à facture\n assetMarginVatIds?: number[]; // Laisser vide côté front, utilisé pour l'affichage des tva sur marge sur les acomptes\n}\n\nexport class CreateCgv {\n @ApiProperty()\n cgv: string | null;\n}\n\nexport class CreateReminder {\n @ApiProperty()\n @IsBoolean()\n @ToBoolean()\n beforeThree: boolean;\n\n @ApiProperty()\n @IsBoolean()\n @ToBoolean()\n dueDate: boolean;\n\n @ApiProperty()\n @IsBoolean()\n @ToBoolean()\n afterThree: boolean;\n\n @ApiProperty()\n @IsBoolean()\n @ToBoolean()\n afterSeven: boolean;\n\n @ApiPropertyOptional()\n @IsString()\n @IsOptional()\n subject?: string;\n\n @ApiPropertyOptional()\n @IsString()\n @IsOptional()\n message?: string;\n\n @ApiProperty()\n @IsString()\n email: string;\n}\n\nexport class CreateRecurrence {\n @ApiProperty()\n @IsEnum(RecurrenceType)\n type: number;\n\n @ApiProperty()\n @IsDateString()\n startDate: string;\n\n @ApiProperty()\n @IsDateString()\n endDate: string;\n\n @ApiProperty()\n @ToBoolean()\n @IsBoolean()\n isActive: boolean;\n}"]}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Order } from '
|
|
1
|
+
import { Order } from '../../..';
|
|
2
2
|
import { DiscountType, EstimateStatus, InvoiceStatus } from '../../../Enum/CommercialManagement';
|
|
3
3
|
import { EstimateInvoiceType } from '../../../Enum/EstimateInvoice';
|
|
4
4
|
import { QueryPaginate } from '../BasePaginate';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Query.d.ts","sourceRoot":"","sources":["../../../../../ts/types/Interface/api/commercialManagement/Query.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,KAAK,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"Query.d.ts","sourceRoot":"","sources":["../../../../../ts/types/Interface/api/commercialManagement/Query.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,KAAK,EAAE,MAAM,UAAU,CAAC;AAGjC,OAAO,EAAE,YAAY,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,oCAAoC,CAAC;AACjG,OAAO,EAAE,mBAAmB,EAAE,MAAM,+BAA+B,CAAC;AACpE,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAEhD,qBAAa,YAAY;IAIvB,OAAO,CAAC,EAAE,MAAM,CAAC;IAKjB,OAAO,CAAC,EAAE,MAAM,CAAC;IAKjB,MAAM,CAAC,EAAE,MAAM,CAAC;IAKhB,MAAM,CAAC,EAAE,aAAa,CAAC;IAKvB,OAAO,CAAC,EAAE,MAAM,CAAC;IAKjB,YAAY,CAAC,EAAE,OAAO,CAAC;CACxB;AAED,MAAM,WAAW,sBAAsB;IACrC,SAAS,EAAE,MAAM,CAAC;IAClB,IAAI,CAAC,EAAE;QACL,GAAG,CAAC,EAAE,MAAM,CAAC;QACb,GAAG,CAAC,EAAE,MAAM,CAAC;KACd,CAAC;IACF,MAAM,CAAC,EAAE,aAAa,CAAC;IACvB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,UAAU,EAAE,aAAa,CAAC;IAC1B,KAAK,CAAC,EAAE,KA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AJC,mBAAmB,EAAE;IACrB,SAAS,EAAE;IACX,SAAS,EAAE;IACX,UAAU,EAAE;;4DACU;AAKvB;IAHC,mBAAmB,EAAE;IACrB,UAAU,EAAE;IACZ,QAAQ,EAAE;;sDACK;AAKhB;IAHC,mBAAmB,EAAE;IACrB,SAAS,EAAE;IACX,SAAS,EAAE;;uDACM;AAGpB,MAAM,OAAO,kBAAkB;CAqB9B;AAjBC;IAHC,mBAAmB,EAAE;IACrB,YAAY,EAAE;IACd,UAAU,EAAE;;mDACI;AAKjB;IAHC,mBAAmB,EAAE;IACrB,YAAY,EAAE;IACd,UAAU,EAAE;;mDACI;AAKjB;IAHC,mBAAmB,EAAE;IACrB,UAAU,EAAE;IACZ,QAAQ,EAAE;;kDACK;AAMhB;IAJC,mBAAmB,EAAE;IACrB,SAAS,EAAE;IACX,SAAS,EAAE;IACX,UAAU,EAAE;;mDACK","sourcesContent":["import {\n IsArray, IsBoolean, IsDateString, IsNumber, IsOptional, IsString,\n} from 'class-validator';\nimport { Order } from '
|
|
1
|
+
{"version":3,"file":"Query.js","sourceRoot":"","sources":["../../../../../ts/types/Interface/api/commercialManagement/Query.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EACL,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,QAAQ,EAAE,UAAU,EAAE,QAAQ,GACjE,MAAM,iBAAiB,CAAC;AAEzB,OAAO,EAAE,WAAW,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AACrE,OAAO,EAAE,SAAS,EAAE,MAAM,gDAAgD,CAAC;AAC3E,OAAO,EAAgB,cAAc,EAAE,aAAa,EAAE,MAAM,oCAAoC,CAAC;AACjG,OAAO,EAAE,mBAAmB,EAAE,MAAM,+BAA+B,CAAC;AAGpE,MAAM,OAAO,YAAY;CA8BxB;AA1BC;IAHC,mBAAmB,EAAE;IACrB,UAAU,EAAE;IACZ,YAAY,EAAE;;6CACE;AAKjB;IAHC,mBAAmB,EAAE;IACrB,UAAU,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ACM;AAGpB,MAAM,OAAO,kBAAkB;CAqB9B;AAjBC;IAHC,mBAAmB,EAAE;IACrB,YAAY,EAAE;IACd,UAAU,EAAE;;mDACI;AAKjB;IAHC,mBAAmB,EAAE;IACrB,YAAY,EAAE;IACd,UAAU,EAAE;;mDACI;AAKjB;IAHC,mBAAmB,EAAE;IACrB,UAAU,EAAE;IACZ,QAAQ,EAAE;;kDACK;AAMhB;IAJC,mBAAmB,EAAE;IACrB,SAAS,EAAE;IACX,SAAS,EAAE;IACX,UAAU,EAAE;;mDACK","sourcesContent":["import {\n IsArray, IsBoolean, IsDateString, IsNumber, IsOptional, IsString,\n} from 'class-validator';\nimport { Order } from '../../..';\nimport { ApiProperty, ApiPropertyOptional } from '../../../../utils';\nimport { ToBoolean } from '../../../../utils/transforms/boolean.transform';\nimport { DiscountType, EstimateStatus, InvoiceStatus } from '../../../Enum/CommercialManagement';\nimport { EstimateInvoiceType } from '../../../Enum/EstimateInvoice';\nimport { QueryPaginate } from '../BasePaginate';\n\nexport class QueryInvoice {\n @ApiPropertyOptional()\n @IsOptional()\n @IsDateString()\n minDate?: string;\n\n @ApiPropertyOptional()\n @IsOptional()\n @IsDateString()\n maxDate?: string;\n\n @ApiPropertyOptional()\n @IsOptional()\n @IsString()\n search?: string;\n\n @ApiPropertyOptional()\n @IsOptional()\n @IsString()\n status?: InvoiceStatus;\n\n @ApiPropertyOptional()\n @IsOptional()\n @IsString()\n orderBy?: string;\n\n @ApiPropertyOptional()\n @IsBoolean()\n @ToBoolean()\n isDescending?: boolean;\n}\n\nexport interface ParamPaginatedInvoices {\n idSociety: number;\n date?: {\n gte?: string;\n lte?: string;\n };\n status?: InvoiceStatus;\n search?: string;\n pagination: QueryPaginate;\n order?: Order;\n}\n\nexport class QueryGetDefaultPayload {\n @ApiProperty()\n @IsNumber()\n idEstimateInvoiceType: number;\n}\n\nexport class QueryNextReference {\n @ApiProperty()\n @IsNumber()\n idEstimateInvoiceType: number;\n\n @ApiPropertyOptional()\n @IsBoolean()\n @ToBoolean()\n @IsOptional()\n isDraft?: boolean;\n}\n\nexport interface Discount {\n type: DiscountType,\n amount: number\n}\n\nexport class QueryPreviewDocument {\n @ApiProperty()\n idEstimateInvoiceType: EstimateInvoiceType;\n}\n\nexport class QueryDocumentPaginated {\n @ApiProperty()\n @IsArray()\n types: EstimateInvoiceType[];\n\n @ApiPropertyOptional()\n @IsDateString()\n @IsOptional()\n minDate?: string;\n\n @ApiPropertyOptional()\n @IsDateString()\n @IsOptional()\n maxDate?: string;\n\n @ApiPropertyOptional()\n @IsOptional()\n @IsString()\n status?: EstimateStatus;\n\n @ApiPropertyOptional()\n @IsOptional()\n @IsString()\n orderBy?: string;\n\n @ApiPropertyOptional()\n @IsBoolean()\n @ToBoolean()\n @IsOptional()\n isDescending?: boolean;\n\n @ApiPropertyOptional()\n @IsOptional()\n @IsString()\n search?: string;\n\n @ApiPropertyOptional()\n @IsBoolean()\n @ToBoolean()\n isDraft?: boolean;\n}\n\nexport class QueryCountByStatus {\n @ApiPropertyOptional()\n @IsDateString()\n @IsOptional()\n minDate?: string;\n\n @ApiPropertyOptional()\n @IsDateString()\n @IsOptional()\n maxDate?: string;\n\n @ApiPropertyOptional()\n @IsOptional()\n @IsString()\n search?: string;\n\n @ApiPropertyOptional()\n @IsBoolean()\n @ToBoolean()\n @IsOptional()\n isDraft?: boolean;\n}"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Update.d.ts","sourceRoot":"","sources":["../../../../../ts/types/Interface/api/commercialManagement/Update.ts"],"names":[],"mappings":"AAOA,qBAAa,wBAAwB;IAKnC,UAAU,CAAC,EAAE,OAAO,CAAC;IAMrB,SAAS,CAAC,EAAE,OAAO,CAAC;IAMpB,MAAM,CAAC,EAAE,OAAO,CAAC;IAMjB,MAAM,CAAC,EAAE,OAAO,CAAC;IAKjB,QAAQ,CAAC,EAAE,IAAI,GAAG,IAAI,CAAC;CACxB;AAED,qBAAa,cAAc;IAKzB,WAAW,EAAE,OAAO,CAAC;IAMrB,OAAO,EAAE,OAAO,CAAC;IAMjB,UAAU,EAAE,OAAO,CAAC;IAMpB,UAAU,EAAE,OAAO,CAAC;IAKpB,OAAO,CAAC,EAAE,MAAM,CAAC;IAKjB,OAAO,CAAC,EAAE,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"Update.d.ts","sourceRoot":"","sources":["../../../../../ts/types/Interface/api/commercialManagement/Update.ts"],"names":[],"mappings":"AAOA,qBAAa,wBAAwB;IAKnC,UAAU,CAAC,EAAE,OAAO,CAAC;IAMrB,SAAS,CAAC,EAAE,OAAO,CAAC;IAMpB,MAAM,CAAC,EAAE,OAAO,CAAC;IAMjB,MAAM,CAAC,EAAE,OAAO,CAAC;IAKjB,QAAQ,CAAC,EAAE,IAAI,GAAG,IAAI,CAAC;CACxB;AAED,qBAAa,cAAc;IAKzB,WAAW,EAAE,OAAO,CAAC;IAMrB,OAAO,EAAE,OAAO,CAAC;IAMjB,UAAU,EAAE,OAAO,CAAC;IAMpB,UAAU,EAAE,OAAO,CAAC;IAKpB,OAAO,CAAC,EAAE,MAAM,CAAC;IAKjB,OAAO,CAAC,EAAE,MAAM,CAAC;IAKjB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,qBAAa,gBAAgB;IAI3B,IAAI,CAAC,EAAE,MAAM,CAAC;IAKd,SAAS,CAAC,EAAE,MAAM,CAAC;IAKnB,OAAO,CAAC,EAAE,MAAM,CAAC;IAMjB,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB"}
|
|
@@ -89,6 +89,12 @@ __decorate([
|
|
|
89
89
|
IsOptional(),
|
|
90
90
|
__metadata("design:type", String)
|
|
91
91
|
], UpdateReminder.prototype, "message", void 0);
|
|
92
|
+
__decorate([
|
|
93
|
+
ApiPropertyOptional(),
|
|
94
|
+
IsString(),
|
|
95
|
+
IsOptional(),
|
|
96
|
+
__metadata("design:type", String)
|
|
97
|
+
], UpdateReminder.prototype, "email", void 0);
|
|
92
98
|
export class UpdateRecurrence {
|
|
93
99
|
}
|
|
94
100
|
__decorate([
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Update.js","sourceRoot":"","sources":["../../../../../ts/types/Interface/api/commercialManagement/Update.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EACL,SAAS,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,EAAE,UAAU,EAAE,QAAQ,GAC9D,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AACxD,OAAO,EAAE,SAAS,EAAE,MAAM,gDAAgD,CAAC;AAC3E,OAAO,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAE9D,MAAM,OAAO,wBAAwB;CA6BpC;AAxBC;IAJC,mBAAmB,EAAE;IACrB,SAAS,EAAE;IACX,SAAS,EAAE;IACX,UAAU,EAAE;;4DACQ;AAMrB;IAJC,mBAAmB,EAAE;IACrB,SAAS,EAAE;IACX,SAAS,EAAE;IACX,UAAU,EAAE;;2DACO;AAMpB;IAJC,mBAAmB,EAAE;IACrB,SAAS,EAAE;IACX,SAAS,EAAE;IACX,UAAU,EAAE;;wDACI;AAMjB;IAJC,mBAAmB,EAAE;IACrB,SAAS,EAAE;IACX,SAAS,EAAE;IACX,UAAU,EAAE;;wDACI;AAKjB;IAHC,mBAAmB,EAAE;IACrB,MAAM,EAAE;IACR,UAAU,EAAE;;0DACU;AAGzB,MAAM,OAAO,cAAc;
|
|
1
|
+
{"version":3,"file":"Update.js","sourceRoot":"","sources":["../../../../../ts/types/Interface/api/commercialManagement/Update.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EACL,SAAS,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,EAAE,UAAU,EAAE,QAAQ,GAC9D,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AACxD,OAAO,EAAE,SAAS,EAAE,MAAM,gD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AKd;IAHC,mBAAmB,EAAE;IACrB,YAAY,EAAE;IACd,UAAU,EAAE;;mDACM;AAKnB;IAHC,mBAAmB,EAAE;IACrB,YAAY,EAAE;IACd,UAAU,EAAE;;iDACI;AAMjB;IAJC,mBAAmB,EAAE;IACrB,SAAS,EAAE;IACX,SAAS,EAAE;IACX,UAAU,EAAE;;kDACM","sourcesContent":["import {\n IsBoolean, IsDate, IsDateString, IsEnum, IsOptional, IsString,\n} from 'class-validator';\nimport { ApiPropertyOptional } from '../../../../utils';\nimport { ToBoolean } from '../../../../utils/transforms/boolean.transform';\nimport { RecurrenceType } from '../../../Enum/RecurrenceType';\n\nexport class UpdateCommercialDocument {\n @ApiPropertyOptional()\n @IsBoolean()\n @ToBoolean()\n @IsOptional()\n isCanceled?: boolean;\n\n @ApiPropertyOptional()\n @IsBoolean()\n @ToBoolean()\n @IsOptional()\n isRefused?: boolean;\n\n @ApiPropertyOptional()\n @IsBoolean()\n @ToBoolean()\n @IsOptional()\n isPaid?: boolean;\n\n @ApiPropertyOptional()\n @IsBoolean()\n @ToBoolean()\n @IsOptional()\n isUsed?: boolean;\n\n @ApiPropertyOptional()\n @IsDate()\n @IsOptional()\n mailSent?: Date | null;\n}\n\nexport class UpdateReminder {\n @ApiPropertyOptional()\n @IsBoolean()\n @ToBoolean()\n @IsOptional()\n beforeThree: boolean;\n\n @ApiPropertyOptional()\n @IsBoolean()\n @ToBoolean()\n @IsOptional()\n dueDate: boolean;\n\n @ApiPropertyOptional()\n @IsBoolean()\n @ToBoolean()\n @IsOptional()\n afterThree: boolean;\n\n @ApiPropertyOptional()\n @IsBoolean()\n @ToBoolean()\n @IsOptional()\n afterSeven: boolean;\n\n @ApiPropertyOptional()\n @IsString()\n @IsOptional()\n subject?: string;\n\n @ApiPropertyOptional()\n @IsString()\n @IsOptional()\n message?: string;\n\n @ApiPropertyOptional()\n @IsString()\n @IsOptional()\n email?: string;\n}\n\nexport class UpdateRecurrence {\n @ApiPropertyOptional()\n @IsEnum(RecurrenceType)\n @IsOptional()\n type?: number;\n\n @ApiPropertyOptional()\n @IsDateString()\n @IsOptional()\n startDate?: string;\n\n @ApiPropertyOptional()\n @IsDateString()\n @IsOptional()\n endDate?: string;\n\n @ApiPropertyOptional()\n @ToBoolean()\n @IsBoolean()\n @IsOptional()\n isActive?: boolean;\n}"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Create.d.ts","sourceRoot":"","sources":["../../../../../ts/types/Interface/api/file/Create.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAEhC,qBAAa,UAAU;IAErB,IAAI,
|
|
1
|
+
{"version":3,"file":"Create.d.ts","sourceRoot":"","sources":["../../../../../ts/types/Interface/api/file/Create.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAEhC,qBAAa,UAAU;IAErB,IAAI,EAAE,KAAK,CAAC;IAIZ,MAAM,EAAE,MAAM,CAAC;IAIf,IAAI,EAAE,MAAM,CAAC;CACd"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Create.js","sourceRoot":"","sources":["../../../../../ts/types/Interface/api/file/Create.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAC3C,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAGhD,MAAM,OAAO,UAAU;CAWtB;AATC;IADC,WAAW,EAAE;;
|
|
1
|
+
{"version":3,"file":"Create.js","sourceRoot":"","sources":["../../../../../ts/types/Interface/api/file/Create.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAC3C,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAGhD,MAAM,OAAO,UAAU;CAWtB;AATC;IADC,WAAW,EAAE;;wCACF;AAIZ;IAFC,WAAW,EAAE;IACb,QAAQ,EAAE;;0CACI;AAIf;IAFC,WAAW,EAAE;IACb,QAAQ,EAAE;;wCACE","sourcesContent":["import { IsString } from 'class-validator';\nimport { ApiProperty } from '../../../../utils';\nimport { TFile } from './TFile';\n\nexport class CreateFile {\n @ApiProperty()\n file: TFile;\n\n @ApiProperty()\n @IsString()\n folder: string;\n\n @ApiProperty()\n @IsString()\n name: string;\n}"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IInvoiceReminder.d.ts","sourceRoot":"","sources":["../../../../ts/types/Interface/models/IInvoiceReminder.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAGtD,MAAM,WAAW,gBAAgB;IAC/B,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,WAAW,EAAE,OAAO,GAAG,IAAI,CAAC;IAC5B,OAAO,EAAE,OAAO,GAAG,IAAI,CAAC;IACxB,UAAU,EAAE,OAAO,GAAG,IAAI,CAAC;IAC3B,UAAU,EAAE,OAAO,GAAG,IAAI,CAAC;IAC3B,YAAY,EAAE,IAAI,GAAG,IAAI,CAAC;IAC1B,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,SAAS,EAAE,MAAM,CAAC;IAClB,iBAAiB,EAAE,MAAM,GAAG,IAAI,CAAC;IACjC,SAAS,CAAC,EAAE,IAAI,GAAG,IAAI,CAAC;IACxB,SAAS,CAAC,EAAE,IAAI,GAAG,IAAI,CAAC;IAGxB,OAAO,CAAC,EAAE,QAAQ,CAAC;IACnB,eAAe,CAAC,EAAE,gBAAgB,CAAC;CACpC"}
|
|
1
|
+
{"version":3,"file":"IInvoiceReminder.d.ts","sourceRoot":"","sources":["../../../../ts/types/Interface/models/IInvoiceReminder.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAGtD,MAAM,WAAW,gBAAgB;IAC/B,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,WAAW,EAAE,OAAO,GAAG,IAAI,CAAC;IAC5B,OAAO,EAAE,OAAO,GAAG,IAAI,CAAC;IACxB,UAAU,EAAE,OAAO,GAAG,IAAI,CAAC;IAC3B,UAAU,EAAE,OAAO,GAAG,IAAI,CAAC;IAC3B,YAAY,EAAE,IAAI,GAAG,IAAI,CAAC;IAC1B,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,SAAS,EAAE,MAAM,CAAC;IAClB,iBAAiB,EAAE,MAAM,GAAG,IAAI,CAAC;IACjC,SAAS,CAAC,EAAE,IAAI,GAAG,IAAI,CAAC;IACxB,SAAS,CAAC,EAAE,IAAI,GAAG,IAAI,CAAC;IAGxB,OAAO,CAAC,EAAE,QAAQ,CAAC;IACnB,eAAe,CAAC,EAAE,gBAAgB,CAAC;CACpC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IInvoiceReminder.js","sourceRoot":"","sources":["../../../../ts/types/Interface/models/IInvoiceReminder.ts"],"names":[],"mappings":"","sourcesContent":["import { ISociety } from './ISociety';\nimport { IEstimateInvoice } from './IEstimateInvoice';\n\n// societyRelance\nexport interface IInvoiceReminder {\n id?: number;\n beforeThree: boolean | null;\n dueDate: boolean | null;\n afterThree: boolean | null;\n afterSeven: boolean | null;\n lastReminder: Date | null;\n subject?: string | null;\n message?: string | null;\n idSociety: number;\n idEstimateInvoice: number | null;\n createdAt?: Date | null;\n updatedAt?: Date | null;\n\n // Associations\n society?: ISociety;\n estimateInvoice?: IEstimateInvoice;\n}\n"]}
|
|
1
|
+
{"version":3,"file":"IInvoiceReminder.js","sourceRoot":"","sources":["../../../../ts/types/Interface/models/IInvoiceReminder.ts"],"names":[],"mappings":"","sourcesContent":["import { ISociety } from './ISociety';\nimport { IEstimateInvoice } from './IEstimateInvoice';\n\n// societyRelance\nexport interface IInvoiceReminder {\n id?: number;\n beforeThree: boolean | null;\n dueDate: boolean | null;\n afterThree: boolean | null;\n afterSeven: boolean | null;\n lastReminder: Date | null;\n subject?: string | null;\n message?: string | null;\n email: string | null;\n idSociety: number;\n idEstimateInvoice: number | null;\n createdAt?: Date | null;\n updatedAt?: Date | null;\n\n // Associations\n society?: ISociety;\n estimateInvoice?: IEstimateInvoice;\n}\n"]}
|
package/es/utils/amount.js
CHANGED
|
@@ -7,6 +7,6 @@ export function integerToFormattedAmountString(value) {
|
|
|
7
7
|
integer += 1;
|
|
8
8
|
}
|
|
9
9
|
const integerWithMask = `${integer}`.split('').reduceRight((acc, char, i, { length }) => `${char}${(length - (i + 1)) % 3 === 0 ? ' ' : ''}${acc}`, '').trim();
|
|
10
|
-
return `${
|
|
10
|
+
return `${value < 0 ? '- ' : ''}${integerWithMask},${cents < 10 ? '0' : ''}${cents}`;
|
|
11
11
|
}
|
|
12
12
|
//# sourceMappingURL=amount.js.map
|
package/es/utils/amount.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"amount.js","sourceRoot":"","sources":["../../ts/utils/amount.ts"],"names":[],"mappings":"AAAA,MAAM,UAAU,8BAA8B,CAAC,KAAa;IAC1D,MAAM,GAAG,GAAG,IAAI,CAAC,GAAG,CAAC,KAAK,GAAG,GAAG,CAAC,CAAC;IAClC,IAAI,OAAO,GAAG,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;IAC9B,IAAI,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,GAAG,GAAG,GAAG,GAAG,OAAO,GAAG,GAAG,CAAC,CAAC;IAElD,OAAO,KAAK,IAAI,GAAG,EAAE;QACnB,KAAK,GAAG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AG,CAAC,CAAC,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,GAAG,GAAG,EAAE,EAAE,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC;IAC/J,OAAO,GAAG,KAAK,GAAG,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,GAAG,eAAe,IAAI,KAAK,GAAG,EAAE,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,GAAG,KAAK,EAAE,CAAC;AACvF,CAAC","sourcesContent":["export function integerToFormattedAmountString(value: number): string {\n const abs = Math.abs(value / 100);\n let integer = Math.trunc(abs);\n let cents = Math.round(abs * 100 - integer * 100);\n\n while (cents >= 100) {\n cents = Math.max(0, cents - 100);\n integer += 1;\n }\n\n const integerWithMask = `${integer}`.split('').reduceRight((acc, char, i, { length }) => `${char}${(length - (i + 1)) % 3 === 0 ? ' ' : ''}${acc}`, '').trim();\n return `${value < 0 ? '- ' : ''}${integerWithMask},${cents < 10 ? '0' : ''}${cents}`;\n}"]}
|
package/js/api/resources/FIle.js
CHANGED
|
@@ -5,11 +5,25 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.File = undefined;
|
|
7
7
|
|
|
8
|
+
var _lodash = require("lodash");
|
|
9
|
+
|
|
8
10
|
var _Resource = require("../Resource");
|
|
9
11
|
|
|
10
12
|
class File extends _Resource.Resource {
|
|
11
|
-
upload(params) {
|
|
12
|
-
|
|
13
|
+
upload(params, file) {
|
|
14
|
+
const formData = new FormData();
|
|
15
|
+
(0, _lodash.forEach)(params, (value, key) => {
|
|
16
|
+
if (value) {
|
|
17
|
+
formData.append(key, `${value}`);
|
|
18
|
+
}
|
|
19
|
+
}); // @ts-ignore
|
|
20
|
+
|
|
21
|
+
formData.append('file', file);
|
|
22
|
+
return this.axios.$post('files', formData, {
|
|
23
|
+
headers: {
|
|
24
|
+
'Content-Type': 'multipart/form-data'
|
|
25
|
+
}
|
|
26
|
+
});
|
|
13
27
|
}
|
|
14
28
|
|
|
15
29
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FIle.js","mappings":";;;;;;;AAAA;;AAMM,MAAOA,IAAP,SAAoBC,kBAApB,CAA4B;EAChCC,MAAM,CAACC,MAAD,
|
|
1
|
+
{"version":3,"file":"FIle.js","mappings":";;;;;;;AAAA;;AACA;;AAMM,MAAOA,IAAP,SAAoBC,kBAApB,CAA4B;EAChCC,MAAM,CAACC,MAAD,EAAmCC,IAAnC,EAA6C;IACjD,MAAMC,QAAQ,GAAG,IAAIC,QAAJ,EAAjB;IACA,qBAAQH,MAAR,EAAgB,CAACI,KAAD,EAAQC,GAAR,KAAe;MAC7B,IAAID,KAAJ,EAAW;QACTF,QAAQ,CAACI,MAAT,CAAgBD,GAAhB,EAAqB,GAAGD,KAAK,EAA7B;MACD;IACF,CAJD,EAFiD,CAOjD;;IACAF,QAAQ,CAACI,MAAT,CAAgB,MAAhB,EAAwBL,IAAxB;IACA,OAAO,KAAKM,KAAL,CAAWC,KAAX,CAAiB,OAAjB,EAA0BN,QAA1B,EAAoC;MAAEO,OAAO,EAAE;QAAE,gBAAgB;MAAlB;IAAX,CAApC,CAAP;EACD;;AAX+B;;QAArBZ,I,GAAAA,I","names":["File","Resource","upload","params","file","formData","FormData","value","key","append","axios","$post","headers"],"sourceRoot":"","sources":["../../../ts/api/resources/FIle.ts"],"sourcesContent":["import { forEach } from 'lodash';\nimport { Resource } from '../Resource';\nimport {\n ReadFile,\n CreateFile,\n} from '../../types';\n\nexport class File extends Resource {\n upload(params: Omit<CreateFile, 'file'>, file: File): Promise<ReadFile> {\n const formData = new FormData();\n forEach(params, (value, key) => {\n if (value) {\n formData.append(key, `${value}`);\n }\n });\n // @ts-ignore\n formData.append('file', file);\n return this.axios.$post('files', formData, { headers: { 'Content-Type': 'multipart/form-data' } });\n }\n}"]}
|
|
@@ -247,6 +247,8 @@ __decorate([(0, _utils.ApiPropertyOptional)(), (0, _classValidator.IsString)(),
|
|
|
247
247
|
|
|
248
248
|
__decorate([(0, _utils.ApiPropertyOptional)(), (0, _classValidator.IsString)(), (0, _classValidator.IsOptional)(), __metadata("design:type", String)], CreateReminder.prototype, "message", void 0);
|
|
249
249
|
|
|
250
|
+
__decorate([(0, _utils.ApiProperty)(), (0, _classValidator.IsString)(), __metadata("design:type", String)], CreateReminder.prototype, "email", void 0);
|
|
251
|
+
|
|
250
252
|
class CreateRecurrence {}
|
|
251
253
|
|
|
252
254
|
exports.CreateRecurrence = CreateRecurrence;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Create.js","mappings":";;;;;;;AAAA;;AAGA;;AACA;;AACA;;AACA;;AACA;;;;;;;;;;;;;;AAOM,MAAOA,uBAAP,CAA8B;;QAAvBA,uB,GAAAA,uB;;AAOXC,YANC,iCAMD,EALC,iCAKD,EAJC,+BAID,EAHC,yBAAI,CAAJ,EAAO;EACNC,OAAO,EAAE;AADH,CAAP,CAGD;;AAKAD,YAHC,iCAGD,EAFC,iCAED,EADC,+BACD;;AAKAA,YAHC,iCAGD,EAFC,iCAED,EADC,+BACD;;AAKAA,YAHC,iCAGD,EAFC,iCAED,EADC,+BACD;;AAKAA,YAHC,iCAGD,EAFC,iCAED,EADC,+BACD;;AAKAA,YAHC,iCAGD,EAFC,iCAED,EADC,+BACD;;AAKAA,YAHC,iCAGD,EAFC,iCAED,EADC,+BACD;;AAKAA,YAHC,iCAGD,EAFC,iCAED,EADC,+BACD;;AAKAA,YAHC,iCAGD,EAFC,iCAED,EADC,+BACD;;AAKAA,YAHC,iCAGD,EAFC,iCAED,EADC,+BACD;;AAKAA,YAHC,iCAGD,EAFC,iCAED,EADC,+BACD;;AAKAA,YAHC,iCAGD,EAFC,iCAED,EADC,+BACD;;AAKAA,YAHC,iCAGD,EAFC,iCAED,EADC,+BACD;;AAKAA,YAHC,iCAGD,EAFC,iCAED,EADC,+BACD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Y;EAAEI,WAAW,EAAE;AAAf,CAAZ,CACD;;AAGAJ,YADC,yBACD;;AAGAA,YADC,yBACD;;AAGAA,YADC,yBACD;;AAKAA,YAHC,yBAGD,EAFC,gCAED,EADC,yBACD;;AAKAA,YAHC,yBAGD,EAFC,gCAED,EADC,yBACD;;AAGAA,YADC,yBACD;;AAGAA,YADC,yBACD;;AAKAA,YAHC,yBAGD,EAFC,gCAED,EADC,yBACD;;AAGI,MAAOM,qBAAP,SAAqCH,wBAArC,CAA6D;;QAAtDG,qB,GAAAA,qB;;AAMP,MAAOC,qBAAP,SAAqCJ,wBAArC,CAA6D;;QAAtDI,qB,GAAAA,qB;;AAQP,MAAOC,SAAP,CAAgB;;QAATA,S,GAAAA,S;;AAEXR,YADC,yBACD;;AAGI,MAAOS,cAAP,CAAqB;;QAAdA,c,GAAAA,c;;AAIXT,YAHC,yBAGD,EAFC,gCAED,EADC,yBACD;;AAKAA,YAHC,yBAGD,EAFC,gCAED,EADC,yBACD;;AAKAA,YAHC,yBAGD,EAFC,gCAED,EADC,yBACD;;AAKAA,YAHC,yBAGD,EAFC,gCAED,EADC,yBACD;;AAKAA,YAHC,iCAGD,EAFC,+BAED,EADC,iCACD;;AAKAA,YAHC,iCAGD,EAFC,+BAED,EADC,iCACD;;AAGI,MAAOU,gBAAP,CAAuB;;QAAhBA,gB,GAAAA,gB;;AAGXV,YAFC,yBAED,EADC,4BAAOW,8BAAP,CACD;;AAIAX,YAFC,yBAED,EADC,mCACD;;AAIAA,YAFC,yBAED,EADC,mCACD;;AAKAA,YAHC,yBAGD,EAFC,yBAED,EADC,gCACD","names":["CreateCommercialSetting","__decorate","message","CreateCommercialMail","CommercialDocumentInputs","description","Array","CreatePreSaleDocument","CreateInvoiceDocument","CreateCgv","CreateReminder","CreateRecurrence","RecurrenceType"],"sourceRoot":"","sources":["../../../../../ts/types/Interface/api/commercialManagement/Create.ts"],"sourcesContent":["import {\n IsArray, IsBoolean, IsDateString, IsEnum, IsNumber, IsOptional, IsString, Min,\n} from 'class-validator';\nimport { ApiProperty, ApiPropertyOptional } from '../../../../utils';\nimport { ToBoolean } from '../../../../utils/transforms/boolean.transform';\nimport { AccountingCategoryId, FontIds, LogoAlignment } from '../../../Enum/CommercialManagement';\nimport { EstimateInvoiceType } from '../../../Enum/EstimateInvoice';\nimport { RecurrenceType } from '../../../Enum/RecurrenceType';\nimport { IProductInvoice } from '../../models/IProductInvoice';\nimport { ISocietyGescom } from '../../models/ISocietyGescom';\nimport { IThirdParty } from '../../models/IThirdParty';\n\nexport type IProductInvoiceToCreate = IProductInvoice & { save?: boolean };\n\nexport class CreateCommercialSetting {\n @ApiPropertyOptional()\n @IsOptional()\n @IsNumber()\n @Min(0, {\n message: 'Capital should be positive',\n })\n capital?: number | null;\n\n @ApiPropertyOptional()\n @IsOptional()\n @IsString()\n tvaCode?: string | null;\n\n @ApiPropertyOptional()\n @IsOptional()\n @IsString()\n rcs?: string | null;\n\n @ApiPropertyOptional()\n @IsOptional()\n @IsString()\n numberTradeDirectory?: string | null;\n\n @ApiPropertyOptional()\n @IsOptional()\n @IsString()\n bank?: string | null;\n\n @ApiPropertyOptional()\n @IsOptional()\n @IsString()\n iban?: string | null;\n\n @ApiPropertyOptional()\n @IsOptional()\n @IsString()\n bic?: string | null;\n\n @ApiPropertyOptional()\n @IsOptional()\n @IsString()\n mailContact?: string | null;\n\n @ApiPropertyOptional()\n @IsOptional()\n @IsString()\n phoneContact?: string | null;\n\n @ApiPropertyOptional()\n @IsOptional()\n @IsString()\n website?: string | null;\n\n @ApiPropertyOptional()\n @IsOptional()\n @IsString()\n commercialName?: string | null;\n\n @ApiPropertyOptional()\n @IsOptional()\n @IsString()\n penalties?: string | null;\n\n @ApiPropertyOptional()\n @IsOptional()\n @IsString()\n discount?: string | null;\n\n @ApiPropertyOptional()\n @IsOptional()\n @IsString()\n recoveryCost?: string | null;\n\n @ApiPropertyOptional()\n @IsOptional()\n @IsString()\n vatMention?: string | null;\n\n @ApiPropertyOptional()\n @IsOptional()\n @IsBoolean()\n @ToBoolean()\n generatedBy?: boolean;\n\n @ApiPropertyOptional()\n @IsOptional()\n @IsBoolean()\n @ToBoolean()\n acceptCheque?: boolean;\n\n @ApiPropertyOptional()\n @IsOptional()\n @IsBoolean()\n @ToBoolean()\n mentionAutoent?: boolean;\n\n @ApiPropertyOptional()\n @IsOptional()\n @IsNumber()\n startInvoice?: number | null;\n\n @ApiPropertyOptional()\n @IsOptional()\n @IsNumber()\n startEstimate?: number | null;\n\n @ApiPropertyOptional()\n @IsOptional()\n @IsNumber()\n dayOfValidity?: number | null;\n\n @ApiPropertyOptional()\n @IsOptional()\n @IsBoolean()\n @ToBoolean()\n paymentsAccepted?: boolean;\n\n @ApiPropertyOptional()\n @IsOptional()\n @IsBoolean()\n @ToBoolean()\n stripePaymentByDefault?: boolean;\n\n @ApiPropertyOptional()\n @IsOptional()\n @IsBoolean()\n @ToBoolean()\n displayLogo?: boolean;\n\n @ApiPropertyOptional()\n @IsOptional()\n @IsBoolean()\n @ToBoolean()\n invoiceCgv?: boolean;\n\n @ApiPropertyOptional()\n @IsOptional()\n @IsString()\n color?: string | null;\n\n @ApiPropertyOptional()\n @IsOptional()\n @IsString()\n freeInvoiceText?: string | null;\n\n @ApiPropertyOptional()\n @IsOptional()\n @IsString()\n freeEstimateText?: string | null;\n\n @ApiPropertyOptional()\n @IsOptional()\n @IsString()\n logoAlignment?: LogoAlignment | null;\n\n @ApiPropertyOptional()\n @IsOptional()\n @IsNumber()\n idFont?: FontIds | null;\n\n @ApiPropertyOptional()\n @IsOptional()\n @IsBoolean()\n @ToBoolean()\n isEdgingDisplayed?: boolean;\n\n @ApiPropertyOptional()\n @IsOptional()\n @IsString()\n edgingColor?: string;\n\n @ApiPropertyOptional()\n @IsOptional()\n @IsBoolean()\n @ToBoolean()\n isCoordinatesFrameDisplayed?: boolean;\n\n @ApiPropertyOptional()\n @IsOptional()\n @IsBoolean()\n @ToBoolean()\n areLinesSeparationHidden?: boolean;\n\n @ApiPropertyOptional()\n @IsOptional()\n @IsBoolean()\n @ToBoolean()\n areColumnsSeparationHidden?: boolean;\n\n @ApiPropertyOptional()\n @IsOptional()\n accountingCategory: AccountingCategoryId;\n\n @ApiPropertyOptional()\n @IsOptional()\n @IsBoolean()\n @ToBoolean()\n shouldPayTaxAfterDebit: boolean;\n}\n\nexport class CreateCommercialMail {\n @ApiProperty()\n @IsString()\n to: string;\n\n @ApiPropertyOptional()\n @IsOptional()\n @IsString()\n cc?: string;\n\n @ApiPropertyOptional()\n @IsOptional()\n @IsString()\n bcc?: string;\n\n @ApiProperty()\n @IsString()\n subject: string;\n\n @ApiProperty()\n @IsString()\n content: string;\n}\n\nexport class CommercialDocumentInputs {\n @ApiProperty()\n legalForm: string | null;\n\n @ApiProperty()\n capital: number | null;\n\n @ApiProperty()\n siren: string | null;\n\n @ApiProperty()\n rcs: string | null;\n\n @ApiProperty()\n vatCode: string | null;\n\n @ApiProperty()\n nafCode: string | null;\n\n @ApiProperty()\n @IsString()\n reference: string; //\n\n @ApiProperty()\n thirdParty: IThirdParty; //\n\n @ApiProperty()\n @IsDateString()\n emissionDate: string; //\n\n @ApiProperty()\n @IsDateString()\n dueDate: string; //\n\n @ApiProperty({ description: 'Date d\\'expiration pour la facture d\\'acompte' })\n expirationDate: string | null;\n\n @ApiProperty({ description: 'Conditions de réglement' })\n termsOfPayment: string | null;\n\n @ApiProperty()\n @IsArray()\n products: Array<IProductInvoiceToCreate>;\n\n @ApiProperty({ description: 'Escompte' })\n @IsString()\n discount: string; //\n\n @ApiProperty()\n comment: string | null; //\n\n @ApiProperty({ description: 'Pénalité de retard' })\n penalties: string | null; //\n\n @ApiProperty({ description: 'Remise globale' })\n @IsNumber()\n generalDiscount2: number; //\n\n @ApiProperty({ description: 'Indemnité forfaitaire' })\n compensation: string | null; //\n\n @ApiProperty()\n vatMention: string | null; //\n\n @ApiProperty()\n @IsBoolean()\n @ToBoolean()\n disableVat: boolean;\n\n @ApiProperty()\n title: string | null; //\n\n @ApiProperty({ description: 'Commercial name of seller' })\n @IsString()\n name: string;\n\n @ApiProperty({ description: 'Commercial number address of seller' })\n number?: string | null;\n\n @ApiProperty({ description: 'Commercial street address of seller' })\n street: string | null;\n\n @ApiProperty({ description: 'Commercial zip code address of seller' })\n zipCode: string | null;\n\n @ApiProperty({ description: 'Commercial city address of seller' })\n city: string | null;\n\n @ApiProperty()\n settings?: ISocietyGescom;\n\n @ApiProperty()\n cgv: string | null;\n\n @ApiProperty()\n logoUrl: string | null;\n\n @ApiProperty()\n @IsBoolean()\n @ToBoolean()\n isStripeAllowed?: boolean;\n\n @ApiProperty()\n @IsBoolean()\n @ToBoolean()\n isDraft?: boolean;\n\n @ApiProperty()\n idEstimateInvoiceType: EstimateInvoiceType;\n\n @ApiProperty()\n accountingCategory: AccountingCategoryId;\n\n @ApiProperty()\n @IsBoolean()\n @ToBoolean()\n shouldPayTaxAfterDebit: boolean;\n}\n\nexport class CreatePreSaleDocument extends CommercialDocumentInputs {\n paymentLink?: '#';\n deposit?: undefined;\n fromEstimateId: undefined;\n assetMarginVatIds?: [];\n}\nexport class CreateInvoiceDocument extends CommercialDocumentInputs {\n paymentLink?: string;\n deposit?: number;\n fromInvoiceId?: number | null; // Nécessaire lors de la création d'un avoir à partir d'une facture\n fromEstimateId: number | null; // Nécessaire lors du passage d'un devis à facture\n assetMarginVatIds?: number[]; // Laisser vide côté front, utilisé pour l'affichage des tva sur marge sur les acomptes\n}\n\nexport class CreateCgv {\n @ApiProperty()\n cgv: string | null;\n}\n\nexport class CreateReminder {\n @ApiProperty()\n @IsBoolean()\n @ToBoolean()\n beforeThree: boolean;\n\n @ApiProperty()\n @IsBoolean()\n @ToBoolean()\n dueDate: boolean;\n\n @ApiProperty()\n @IsBoolean()\n @ToBoolean()\n afterThree: boolean;\n\n @ApiProperty()\n @IsBoolean()\n @ToBoolean()\n afterSeven: boolean;\n\n @ApiPropertyOptional()\n @IsString()\n @IsOptional()\n subject?: string;\n\n @ApiPropertyOptional()\n @IsString()\n @IsOptional()\n message?: string;\n}\n\nexport class CreateRecurrence {\n @ApiProperty()\n @IsEnum(RecurrenceType)\n type: number;\n\n @ApiProperty()\n @IsDateString()\n startDate: string;\n\n @ApiProperty()\n @IsDateString()\n endDate: string;\n\n @ApiProperty()\n @ToBoolean()\n @IsBoolean()\n isActive: boolean;\n}"]}
|
|
1
|
+
{"version":3,"file":"Create.js","mappings":";;;;;;;AAAA;;AAGA;;AACA;;AACA;;AACA;;AACA;;;;;;;;;;;;;;AAOM,MAAOA,uBAAP,CAA8B;;QAAvBA,uB,GAAAA,uB;;AAOXC,YANC,iCAMD,EALC,iCAKD,EAJC,+BAID,EAHC,yBAAI,CAAJ,EAAO;EACNC,OAAO,EAAE;AADH,CAAP,CAGD;;AAKAD,YAHC,iCAGD,EAFC,iCAED,EADC,+BACD;;AAKAA,YAHC,iCAGD,EAFC,iCAED,EADC,+BACD;;AAKAA,YAHC,iCAGD,EAFC,iCAED,EADC,+BACD;;AAKAA,YAHC,iCAGD,EAFC,iCAED,EADC,+BACD;;AAKAA,YAHC,iCAGD,EAFC,iCAED,EADC,+BACD;;AAKAA,YAHC,iCAGD,EAFC,iCAED,EADC,+BACD;;AAKAA,YAHC,iCAGD,EAFC,iCAED,EADC,+BACD;;AAKAA,YAHC,iCAGD,EAFC,iCAED,EADC,+BACD;;AAKAA,YAHC,iCAGD,EAFC,iCAED,EADC,+BACD;;AAKAA,YAHC,iCAGD,EAFC,iCAED,EADC,+BACD;;AAKAA,YAHC,iCAGD,EAFC,iCAED,EADC,+BACD;;AAKAA,YAHC,iCAGD,EAFC,iCAED,EADC,+BACD;;AAKAA,YAHC,iCAGD,EAFC,iCAED,EADC,+BACD;;AAKAA,YAHC,iCAGD,EAFC,iCAED,EADC,+BACD;;AAMAA,YAJC,iCAID,EAHC,iCAGD,EAFC,gCAED,EADC,yBACD;;AAMAA,YAJC,iCAID,EAHC,iCAGD,EAFC,gCAED,EADC,yBACD;;AAMAA,YAJC,iCAID,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C,yBACD;;AAGAA,YADC,yBACD;;AAGAA,YADC,yBACD;;AAKAA,YAHC,yBAGD,EAFC,gCAED,EADC,yBACD;;AAGI,MAAOM,qBAAP,SAAqCH,wBAArC,CAA6D;;QAAtDG,qB,GAAAA,qB;;AAMP,MAAOC,qBAAP,SAAqCJ,wBAArC,CAA6D;;QAAtDI,qB,GAAAA,qB;;AAQP,MAAOC,SAAP,CAAgB;;QAATA,S,GAAAA,S;;AAEXR,YADC,yBACD;;AAGI,MAAOS,cAAP,CAAqB;;QAAdA,c,GAAAA,c;;AAIXT,YAHC,yBAGD,EAFC,gCAED,EADC,yBACD;;AAKAA,YAHC,yBAGD,EAFC,gCAED,EADC,yBACD;;AAKAA,YAHC,yBAGD,EAFC,gCAED,EADC,yBACD;;AAKAA,YAHC,yBAGD,EAFC,gCAED,EADC,yBACD;;AAKAA,YAHC,iCAGD,EAFC,+BAED,EADC,iCACD;;AAKAA,YAHC,iCAGD,EAFC,+BAED,EADC,iCACD;;AAIAA,YAFC,yBAED,EADC,+BACD;;AAGI,MAAOU,gBAAP,CAAuB;;QAAhBA,gB,GAAAA,gB;;AAGXV,YAFC,yBAED,EADC,4BAAOW,8BAAP,CACD;;AAIAX,YAFC,yBAED,EADC,mCACD;;AAIAA,YAFC,yBAED,EADC,mCACD;;AAKAA,YAHC,yBAGD,EAFC,yBAED,EADC,gCACD","names":["CreateCommercialSetting","__decorate","message","CreateCommercialMail","CommercialDocumentInputs","description","Array","CreatePreSaleDocument","CreateInvoiceDocument","CreateCgv","CreateReminder","CreateRecurrence","RecurrenceType"],"sourceRoot":"","sources":["../../../../../ts/types/Interface/api/commercialManagement/Create.ts"],"sourcesContent":["import {\n IsArray, IsBoolean, IsDateString, IsEnum, IsNumber, IsOptional, IsString, Min,\n} from 'class-validator';\nimport { ApiProperty, ApiPropertyOptional } from '../../../../utils';\nimport { ToBoolean } from '../../../../utils/transforms/boolean.transform';\nimport { AccountingCategoryId, FontIds, LogoAlignment } from '../../../Enum/CommercialManagement';\nimport { EstimateInvoiceType } from '../../../Enum/EstimateInvoice';\nimport { RecurrenceType } from '../../../Enum/RecurrenceType';\nimport { IProductInvoice } from '../../models/IProductInvoice';\nimport { ISocietyGescom } from '../../models/ISocietyGescom';\nimport { IThirdParty } from '../../models/IThirdParty';\n\nexport type IProductInvoiceToCreate = IProductInvoice & { save?: boolean };\n\nexport class CreateCommercialSetting {\n @ApiPropertyOptional()\n @IsOptional()\n @IsNumber()\n @Min(0, {\n message: 'Capital should be positive',\n })\n capital?: number | null;\n\n @ApiPropertyOptional()\n @IsOptional()\n @IsString()\n tvaCode?: string | null;\n\n @ApiPropertyOptional()\n @IsOptional()\n @IsString()\n rcs?: string | null;\n\n @ApiPropertyOptional()\n @IsOptional()\n @IsString()\n numberTradeDirectory?: string | null;\n\n @ApiPropertyOptional()\n @IsOptional()\n @IsString()\n bank?: string | null;\n\n @ApiPropertyOptional()\n @IsOptional()\n @IsString()\n iban?: string | null;\n\n @ApiPropertyOptional()\n @IsOptional()\n @IsString()\n bic?: string | null;\n\n @ApiPropertyOptional()\n @IsOptional()\n @IsString()\n mailContact?: string | null;\n\n @ApiPropertyOptional()\n @IsOptional()\n @IsString()\n phoneContact?: string | null;\n\n @ApiPropertyOptional()\n @IsOptional()\n @IsString()\n website?: string | null;\n\n @ApiPropertyOptional()\n @IsOptional()\n @IsString()\n commercialName?: string | null;\n\n @ApiPropertyOptional()\n @IsOptional()\n @IsString()\n penalties?: string | null;\n\n @ApiPropertyOptional()\n @IsOptional()\n @IsString()\n discount?: string | null;\n\n @ApiPropertyOptional()\n @IsOptional()\n @IsString()\n recoveryCost?: string | null;\n\n @ApiPropertyOptional()\n @IsOptional()\n @IsString()\n vatMention?: string | null;\n\n @ApiPropertyOptional()\n @IsOptional()\n @IsBoolean()\n @ToBoolean()\n generatedBy?: boolean;\n\n @ApiPropertyOptional()\n @IsOptional()\n @IsBoolean()\n @ToBoolean()\n acceptCheque?: boolean;\n\n @ApiPropertyOptional()\n @IsOptional()\n @IsBoolean()\n @ToBoolean()\n mentionAutoent?: boolean;\n\n @ApiPropertyOptional()\n @IsOptional()\n @IsNumber()\n startInvoice?: number | null;\n\n @ApiPropertyOptional()\n @IsOptional()\n @IsNumber()\n startEstimate?: number | null;\n\n @ApiPropertyOptional()\n @IsOptional()\n @IsNumber()\n dayOfValidity?: number | null;\n\n @ApiPropertyOptional()\n @IsOptional()\n @IsBoolean()\n @ToBoolean()\n paymentsAccepted?: boolean;\n\n @ApiPropertyOptional()\n @IsOptional()\n @IsBoolean()\n @ToBoolean()\n stripePaymentByDefault?: boolean;\n\n @ApiPropertyOptional()\n @IsOptional()\n @IsBoolean()\n @ToBoolean()\n displayLogo?: boolean;\n\n @ApiPropertyOptional()\n @IsOptional()\n @IsBoolean()\n @ToBoolean()\n invoiceCgv?: boolean;\n\n @ApiPropertyOptional()\n @IsOptional()\n @IsString()\n color?: string | null;\n\n @ApiPropertyOptional()\n @IsOptional()\n @IsString()\n freeInvoiceText?: string | null;\n\n @ApiPropertyOptional()\n @IsOptional()\n @IsString()\n freeEstimateText?: string | null;\n\n @ApiPropertyOptional()\n @IsOptional()\n @IsString()\n logoAlignment?: LogoAlignment | null;\n\n @ApiPropertyOptional()\n @IsOptional()\n @IsNumber()\n idFont?: FontIds | null;\n\n @ApiPropertyOptional()\n @IsOptional()\n @IsBoolean()\n @ToBoolean()\n isEdgingDisplayed?: boolean;\n\n @ApiPropertyOptional()\n @IsOptional()\n @IsString()\n edgingColor?: string;\n\n @ApiPropertyOptional()\n @IsOptional()\n @IsBoolean()\n @ToBoolean()\n isCoordinatesFrameDisplayed?: boolean;\n\n @ApiPropertyOptional()\n @IsOptional()\n @IsBoolean()\n @ToBoolean()\n areLinesSeparationHidden?: boolean;\n\n @ApiPropertyOptional()\n @IsOptional()\n @IsBoolean()\n @ToBoolean()\n areColumnsSeparationHidden?: boolean;\n\n @ApiPropertyOptional()\n @IsOptional()\n accountingCategory: AccountingCategoryId;\n\n @ApiPropertyOptional()\n @IsOptional()\n @IsBoolean()\n @ToBoolean()\n shouldPayTaxAfterDebit: boolean;\n}\n\nexport class CreateCommercialMail {\n @ApiProperty()\n @IsString()\n to: string;\n\n @ApiPropertyOptional()\n @IsOptional()\n @IsString()\n cc?: string;\n\n @ApiPropertyOptional()\n @IsOptional()\n @IsString()\n bcc?: string;\n\n @ApiProperty()\n @IsString()\n subject: string;\n\n @ApiProperty()\n @IsString()\n content: string;\n}\n\nexport class CommercialDocumentInputs {\n @ApiProperty()\n legalForm: string | null;\n\n @ApiProperty()\n capital: number | null;\n\n @ApiProperty()\n siren: string | null;\n\n @ApiProperty()\n rcs: string | null;\n\n @ApiProperty()\n vatCode: string | null;\n\n @ApiProperty()\n nafCode: string | null;\n\n @ApiProperty()\n @IsString()\n reference: string; //\n\n @ApiProperty()\n thirdParty: IThirdParty; //\n\n @ApiProperty()\n @IsDateString()\n emissionDate: string; //\n\n @ApiProperty()\n @IsDateString()\n dueDate: string; //\n\n @ApiProperty({ description: 'Date d\\'expiration pour la facture d\\'acompte' })\n expirationDate: string | null;\n\n @ApiProperty({ description: 'Conditions de réglement' })\n termsOfPayment: string | null;\n\n @ApiProperty()\n @IsArray()\n products: Array<IProductInvoiceToCreate>;\n\n @ApiProperty({ description: 'Escompte' })\n @IsString()\n discount: string; //\n\n @ApiProperty()\n comment: string | null; //\n\n @ApiProperty({ description: 'Pénalité de retard' })\n penalties: string | null; //\n\n @ApiProperty({ description: 'Remise globale' })\n @IsNumber()\n generalDiscount2: number; //\n\n @ApiProperty({ description: 'Indemnité forfaitaire' })\n compensation: string | null; //\n\n @ApiProperty()\n vatMention: string | null; //\n\n @ApiProperty()\n @IsBoolean()\n @ToBoolean()\n disableVat: boolean;\n\n @ApiProperty()\n title: string | null; //\n\n @ApiProperty({ description: 'Commercial name of seller' })\n @IsString()\n name: string;\n\n @ApiProperty({ description: 'Commercial number address of seller' })\n number?: string | null;\n\n @ApiProperty({ description: 'Commercial street address of seller' })\n street: string | null;\n\n @ApiProperty({ description: 'Commercial zip code address of seller' })\n zipCode: string | null;\n\n @ApiProperty({ description: 'Commercial city address of seller' })\n city: string | null;\n\n @ApiProperty()\n settings?: ISocietyGescom;\n\n @ApiProperty()\n cgv: string | null;\n\n @ApiProperty()\n logoUrl: string | null;\n\n @ApiProperty()\n @IsBoolean()\n @ToBoolean()\n isStripeAllowed?: boolean;\n\n @ApiProperty()\n @IsBoolean()\n @ToBoolean()\n isDraft?: boolean;\n\n @ApiProperty()\n idEstimateInvoiceType: EstimateInvoiceType;\n\n @ApiProperty()\n accountingCategory: AccountingCategoryId;\n\n @ApiProperty()\n @IsBoolean()\n @ToBoolean()\n shouldPayTaxAfterDebit: boolean;\n}\n\nexport class CreatePreSaleDocument extends CommercialDocumentInputs {\n paymentLink?: '#';\n deposit?: undefined;\n fromEstimateId: undefined;\n assetMarginVatIds?: [];\n}\nexport class CreateInvoiceDocument extends CommercialDocumentInputs {\n paymentLink?: string;\n deposit?: number;\n fromInvoiceId?: number | null; // Nécessaire lors de la création d'un avoir à partir d'une facture\n fromEstimateId: number | null; // Nécessaire lors du passage d'un devis à facture\n assetMarginVatIds?: number[]; // Laisser vide côté front, utilisé pour l'affichage des tva sur marge sur les acomptes\n}\n\nexport class CreateCgv {\n @ApiProperty()\n cgv: string | null;\n}\n\nexport class CreateReminder {\n @ApiProperty()\n @IsBoolean()\n @ToBoolean()\n beforeThree: boolean;\n\n @ApiProperty()\n @IsBoolean()\n @ToBoolean()\n dueDate: boolean;\n\n @ApiProperty()\n @IsBoolean()\n @ToBoolean()\n afterThree: boolean;\n\n @ApiProperty()\n @IsBoolean()\n @ToBoolean()\n afterSeven: boolean;\n\n @ApiPropertyOptional()\n @IsString()\n @IsOptional()\n subject?: string;\n\n @ApiPropertyOptional()\n @IsString()\n @IsOptional()\n message?: string;\n\n @ApiProperty()\n @IsString()\n email: string;\n}\n\nexport class CreateRecurrence {\n @ApiProperty()\n @IsEnum(RecurrenceType)\n type: number;\n\n @ApiProperty()\n @IsDateString()\n startDate: string;\n\n @ApiProperty()\n @IsDateString()\n endDate: string;\n\n @ApiProperty()\n @ToBoolean()\n @IsBoolean()\n isActive: boolean;\n}"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Query.js","mappings":";;;;;;;AAAA;;AAIA;;AACA;;AACA;;AACA;;;;;;;;;;;;;;AAGM,MAAOA,YAAP,CAAmB;;QAAZA,Y,GAAAA,Y;;AAIXC,YAHC,iCAGD,EAFC,iCAED,EADC,mCACD;;AAKAA,YAHC,iCAGD,EAFC,iCAED,EADC,mCACD;;AAKAA,YAHC,iCAGD,EAFC,iCAED,EADC,+BACD;;AAKAA,YAHC,iCAGD,EAFC,iCAED,EADC,+BACD;;AAKAA,YAHC,iCAGD,EAFC,iCAED,EADC,+BACD;;AAKAA,YAHC,iCAGD,EAFC,gCAED,EADC,yBACD;;AAeI,MAAOC,sBAAP,CAA6B;;QAAtBA,sB,GAAAA,sB;;AAGXD,YAFC,yBAED,EADC,+BACD;;AAGI,MAAOE,kBAAP,CAAyB;;QAAlBA,kB,GAAAA,kB;;AAGXF,YAFC,yBAED,EADC,+BACD;;AAMAA,YAJC,iCAID,EAHC,gCAGD,EAFC,yBAED,EADC,iCACD;;AAQI,MAAOG,oBAAP,CAA2B;;QAApBA,oB,GAAAA,oB;;AAEXH,YADC,yBACD;;AAGI,MAAOI,sBAAP,CAA6B;;QAAtBA,sB,GAAAA,sB;;AAGXJ,YAFC,yBAED,EADC,8BACD;;AAKAA,YAHC,iCAGD,EAFC,mCAED,EADC,iCACD;;AAKAA,YAHC,iCAGD,EAFC,mCAED,EADC,iCACD;;AAKAA,YAHC,iCAGD,EAFC,iCAED,EADC,+BACD;;AAKAA,YAHC,iCAGD,EAFC,iCAED,EADC,+BACD;;AAMAA,YAJC,iCAID,EAHC,gCAGD,EAFC,yBAED,EADC,iCACD;;AAKAA,YAHC,iCAGD,EAFC,iCAED,EADC,+BACD;;AAKAA,YAHC,iCAGD,EAFC,gCAED,EADC,yBACD;;AAGI,MAAOK,kBAAP,CAAyB;;QAAlBA,kB,GAAAA,kB;;AAIXL,YAHC,iCAGD,EAFC,mCAED,EADC,iCACD;;AAKAA,YAHC,iCAGD,EAFC,mCAED,EADC,iCACD;;AAKAA,YAHC,iCAGD,EAFC,iCAED,EADC,+BACD;;AAMAA,YAJC,iCAID,EAHC,gCAGD,EAFC,yBAED,EADC,iCACD","names":["QueryInvoice","__decorate","QueryGetDefaultPayload","QueryNextReference","QueryPreviewDocument","QueryDocumentPaginated","QueryCountByStatus"],"sourceRoot":"","sources":["../../../../../ts/types/Interface/api/commercialManagement/Query.ts"],"sourcesContent":["import {\n IsArray, IsBoolean, IsDateString, IsNumber, IsOptional, IsString,\n} from 'class-validator';\nimport { Order } from '
|
|
1
|
+
{"version":3,"file":"Query.js","mappings":";;;;;;;AAAA;;AAIA;;AACA;;AACA;;AACA;;;;;;;;;;;;;;AAGM,MAAOA,YAAP,CAAmB;;QAAZA,Y,GAAAA,Y;;AAIXC,YAHC,iCAGD,EAFC,iCAED,EADC,mCACD;;AAKAA,YAHC,iCAGD,EAFC,iCAED,EADC,mCACD;;AAKAA,YAHC,iCAGD,EAFC,iCAED,EADC,+BACD;;AAKAA,YAHC,iCAGD,EAFC,iCAED,EADC,+BACD;;AAKAA,YAHC,iCAGD,EAFC,iCAED,EADC,+BACD;;AAKAA,YAHC,iCAGD,EAFC,gCAED,EADC,yBACD;;AAeI,MAAOC,sBAAP,CAA6B;;QAAtBA,sB,GAAAA,sB;;AAGXD,YAFC,yBAED,EADC,+BACD;;AAGI,MAAOE,kBAAP,CAAyB;;QAAlBA,kB,GAAAA,kB;;AAGXF,YAFC,yBAED,EADC,+BACD;;AAMAA,YAJC,iCAID,EAHC,gCAGD,EAFC,yBAED,EADC,iCACD;;AAQI,MAAOG,oBAAP,CAA2B;;QAApBA,oB,GAAAA,oB;;AAEXH,YADC,yBACD;;AAGI,MAAOI,sBAAP,CAA6B;;QAAtBA,sB,GAAAA,sB;;AAGXJ,YAFC,yBAED,EADC,8BACD;;AAKAA,YAHC,iCAGD,EAFC,mCAED,EADC,iCACD;;AAKAA,YAHC,iCAGD,EAFC,mCAED,EADC,iCACD;;AAKAA,YAHC,iCAGD,EAFC,iCAED,EADC,+BACD;;AAKAA,YAHC,iCAGD,EAFC,iCAED,EADC,+BACD;;AAMAA,YAJC,iCAID,EAHC,gCAGD,EAFC,yBAED,EADC,iCACD;;AAKAA,YAHC,iCAGD,EAFC,iCAED,EADC,+BACD;;AAKAA,YAHC,iCAGD,EAFC,gCAED,EADC,yBACD;;AAGI,MAAOK,kBAAP,CAAyB;;QAAlBA,kB,GAAAA,kB;;AAIXL,YAHC,iCAGD,EAFC,mCAED,EADC,iCACD;;AAKAA,YAHC,iCAGD,EAFC,mCAED,EADC,iCACD;;AAKAA,YAHC,iCAGD,EAFC,iCAED,EADC,+BACD;;AAMAA,YAJC,iCAID,EAHC,gCAGD,EAFC,yBAED,EADC,iCACD","names":["QueryInvoice","__decorate","QueryGetDefaultPayload","QueryNextReference","QueryPreviewDocument","QueryDocumentPaginated","QueryCountByStatus"],"sourceRoot":"","sources":["../../../../../ts/types/Interface/api/commercialManagement/Query.ts"],"sourcesContent":["import {\n IsArray, IsBoolean, IsDateString, IsNumber, IsOptional, IsString,\n} from 'class-validator';\nimport { Order } from '../../..';\nimport { ApiProperty, ApiPropertyOptional } from '../../../../utils';\nimport { ToBoolean } from '../../../../utils/transforms/boolean.transform';\nimport { DiscountType, EstimateStatus, InvoiceStatus } from '../../../Enum/CommercialManagement';\nimport { EstimateInvoiceType } from '../../../Enum/EstimateInvoice';\nimport { QueryPaginate } from '../BasePaginate';\n\nexport class QueryInvoice {\n @ApiPropertyOptional()\n @IsOptional()\n @IsDateString()\n minDate?: string;\n\n @ApiPropertyOptional()\n @IsOptional()\n @IsDateString()\n maxDate?: string;\n\n @ApiPropertyOptional()\n @IsOptional()\n @IsString()\n search?: string;\n\n @ApiPropertyOptional()\n @IsOptional()\n @IsString()\n status?: InvoiceStatus;\n\n @ApiPropertyOptional()\n @IsOptional()\n @IsString()\n orderBy?: string;\n\n @ApiPropertyOptional()\n @IsBoolean()\n @ToBoolean()\n isDescending?: boolean;\n}\n\nexport interface ParamPaginatedInvoices {\n idSociety: number;\n date?: {\n gte?: string;\n lte?: string;\n };\n status?: InvoiceStatus;\n search?: string;\n pagination: QueryPaginate;\n order?: Order;\n}\n\nexport class QueryGetDefaultPayload {\n @ApiProperty()\n @IsNumber()\n idEstimateInvoiceType: number;\n}\n\nexport class QueryNextReference {\n @ApiProperty()\n @IsNumber()\n idEstimateInvoiceType: number;\n\n @ApiPropertyOptional()\n @IsBoolean()\n @ToBoolean()\n @IsOptional()\n isDraft?: boolean;\n}\n\nexport interface Discount {\n type: DiscountType,\n amount: number\n}\n\nexport class QueryPreviewDocument {\n @ApiProperty()\n idEstimateInvoiceType: EstimateInvoiceType;\n}\n\nexport class QueryDocumentPaginated {\n @ApiProperty()\n @IsArray()\n types: EstimateInvoiceType[];\n\n @ApiPropertyOptional()\n @IsDateString()\n @IsOptional()\n minDate?: string;\n\n @ApiPropertyOptional()\n @IsDateString()\n @IsOptional()\n maxDate?: string;\n\n @ApiPropertyOptional()\n @IsOptional()\n @IsString()\n status?: EstimateStatus;\n\n @ApiPropertyOptional()\n @IsOptional()\n @IsString()\n orderBy?: string;\n\n @ApiPropertyOptional()\n @IsBoolean()\n @ToBoolean()\n @IsOptional()\n isDescending?: boolean;\n\n @ApiPropertyOptional()\n @IsOptional()\n @IsString()\n search?: string;\n\n @ApiPropertyOptional()\n @IsBoolean()\n @ToBoolean()\n isDraft?: boolean;\n}\n\nexport class QueryCountByStatus {\n @ApiPropertyOptional()\n @IsDateString()\n @IsOptional()\n minDate?: string;\n\n @ApiPropertyOptional()\n @IsDateString()\n @IsOptional()\n maxDate?: string;\n\n @ApiPropertyOptional()\n @IsOptional()\n @IsString()\n search?: string;\n\n @ApiPropertyOptional()\n @IsBoolean()\n @ToBoolean()\n @IsOptional()\n isDraft?: boolean;\n}"]}
|
|
@@ -55,6 +55,8 @@ __decorate([(0, _utils.ApiPropertyOptional)(), (0, _classValidator.IsString)(),
|
|
|
55
55
|
|
|
56
56
|
__decorate([(0, _utils.ApiPropertyOptional)(), (0, _classValidator.IsString)(), (0, _classValidator.IsOptional)(), __metadata("design:type", String)], UpdateReminder.prototype, "message", void 0);
|
|
57
57
|
|
|
58
|
+
__decorate([(0, _utils.ApiPropertyOptional)(), (0, _classValidator.IsString)(), (0, _classValidator.IsOptional)(), __metadata("design:type", String)], UpdateReminder.prototype, "email", void 0);
|
|
59
|
+
|
|
58
60
|
class UpdateRecurrence {}
|
|
59
61
|
|
|
60
62
|
exports.UpdateRecurrence = UpdateRecurrence;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Update.js","mappings":";;;;;;;AAAA;;AAGA;;AACA;;AACA;;;;;;;;;;;;;;AAEM,MAAOA,wBAAP,CAA+B;;QAAxBA,wB,GAAAA,wB;;AAKXC,YAJC,iCAID,EAHC,gCAGD,EAFC,yBAED,EADC,iCACD;;AAMAA,YAJC,iCAID,EAHC,gCAGD,EAFC,yBAED,EADC,iCACD;;AAMAA,YAJC,iCAID,EAHC,gCAGD,EAFC,yBAED,EADC,iCACD;;AAMAA,YAJC,iCAID,EAHC,gCAGD,EAFC,yBAED,EADC,iCACD;;AAKAA,YAHC,iCAGD,EAFC,6BAED,EADC,iCACD;;AAGI,MAAOC,cAAP,CAAqB;;QAAdA,c,GAAAA,c;;AAKXD,YAJC,iCAID,EAHC,gCAGD,EAFC,yBAED,EADC,iCACD;;AAMAA,YAJC,iCAID,EAHC,gCAGD,EAFC,yBAED,EADC,iCACD;;AAMAA,YAJC,iCAID,EAHC,gCAGD,EAFC,yBAED,EADC,iCACD;;AAMAA,YAJC,iCAID,EAHC,gCAGD,EAFC,yBAED,EADC,iCACD;;AAKAA,YAHC,iCAGD,EAFC,+BAED,EADC,iCACD;;AAKAA,YAHC,iCAGD,EAFC,+BAED,EADC,iCACD;;AAGI,MAAOE,gBAAP,CAAuB;;QAAhBA,gB,GAAAA,gB;;AAIXF,YAHC,iCAGD,EAFC,4BAAOG,8BAAP,CAED,EADC,iCACD;;AAKAH,YAHC,iCAGD,EAFC,mCAED,EADC,iCACD;;AAKAA,YAHC,iCAGD,EAFC,mCAED,EADC,iCACD;;AAMAA,YAJC,iCAID,EAHC,yBAGD,EAFC,gCAED,EADC,iCACD","names":["UpdateCommercialDocument","__decorate","UpdateReminder","UpdateRecurrence","RecurrenceType"],"sourceRoot":"","sources":["../../../../../ts/types/Interface/api/commercialManagement/Update.ts"],"sourcesContent":["import {\n IsBoolean, IsDate, IsDateString, IsEnum, IsOptional, IsString,\n} from 'class-validator';\nimport { ApiPropertyOptional } from '../../../../utils';\nimport { ToBoolean } from '../../../../utils/transforms/boolean.transform';\nimport { RecurrenceType } from '../../../Enum/RecurrenceType';\n\nexport class UpdateCommercialDocument {\n @ApiPropertyOptional()\n @IsBoolean()\n @ToBoolean()\n @IsOptional()\n isCanceled?: boolean;\n\n @ApiPropertyOptional()\n @IsBoolean()\n @ToBoolean()\n @IsOptional()\n isRefused?: boolean;\n\n @ApiPropertyOptional()\n @IsBoolean()\n @ToBoolean()\n @IsOptional()\n isPaid?: boolean;\n\n @ApiPropertyOptional()\n @IsBoolean()\n @ToBoolean()\n @IsOptional()\n isUsed?: boolean;\n\n @ApiPropertyOptional()\n @IsDate()\n @IsOptional()\n mailSent?: Date | null;\n}\n\nexport class UpdateReminder {\n @ApiPropertyOptional()\n @IsBoolean()\n @ToBoolean()\n @IsOptional()\n beforeThree: boolean;\n\n @ApiPropertyOptional()\n @IsBoolean()\n @ToBoolean()\n @IsOptional()\n dueDate: boolean;\n\n @ApiPropertyOptional()\n @IsBoolean()\n @ToBoolean()\n @IsOptional()\n afterThree: boolean;\n\n @ApiPropertyOptional()\n @IsBoolean()\n @ToBoolean()\n @IsOptional()\n afterSeven: boolean;\n\n @ApiPropertyOptional()\n @IsString()\n @IsOptional()\n subject?: string;\n\n @ApiPropertyOptional()\n @IsString()\n @IsOptional()\n message?: string;\n}\n\nexport class UpdateRecurrence {\n @ApiPropertyOptional()\n @IsEnum(RecurrenceType)\n @IsOptional()\n type?: number;\n\n @ApiPropertyOptional()\n @IsDateString()\n @IsOptional()\n startDate?: string;\n\n @ApiPropertyOptional()\n @IsDateString()\n @IsOptional()\n endDate?: string;\n\n @ApiPropertyOptional()\n @ToBoolean()\n @IsBoolean()\n @IsOptional()\n isActive?: boolean;\n}"]}
|
|
1
|
+
{"version":3,"file":"Update.js","mappings":";;;;;;;AAAA;;AAGA;;AACA;;AACA;;;;;;;;;;;;;;AAEM,MAAOA,wBAAP,CAA+B;;QAAxBA,wB,GAAAA,wB;;AAKXC,YAJC,iCAID,EAHC,gCAGD,EAFC,yBAED,EADC,iCACD;;AAMAA,YAJC,iCAID,EAHC,gCAGD,EAFC,yBAED,EADC,iCACD;;AAMAA,YAJC,iCAID,EAHC,gCAGD,EAFC,yBAED,EADC,iCACD;;AAMAA,YAJC,iCAID,EAHC,gCAGD,EAFC,yBAED,EADC,iCACD;;AAKAA,YAHC,iCAGD,EAFC,6BAED,EADC,iCACD;;AAGI,MAAOC,cAAP,CAAqB;;QAAdA,c,GAAAA,c;;AAKXD,YAJC,iCAID,EAHC,gCAGD,EAFC,yBAED,EADC,iCACD;;AAMAA,YAJC,iCAID,EAHC,gCAGD,EAFC,yBAED,EADC,iCACD;;AAMAA,YAJC,iCAID,EAHC,gCAGD,EAFC,yBAED,EADC,iCACD;;AAMAA,YAJC,iCAID,EAHC,gCAGD,EAFC,yBAED,EADC,iCACD;;AAKAA,YAHC,iCAGD,EAFC,+BAED,EADC,iCACD;;AAKAA,YAHC,iCAGD,EAFC,+BAED,EADC,iCACD;;AAKAA,YAHC,iCAGD,EAFC,+BAED,EADC,iCACD;;AAGI,MAAOE,gBAAP,CAAuB;;QAAhBA,gB,GAAAA,gB;;AAIXF,YAHC,iCAGD,EAFC,4BAAOG,8BAAP,CAED,EADC,iCACD;;AAKAH,YAHC,iCAGD,EAFC,mCAED,EADC,iCACD;;AAKAA,YAHC,iCAGD,EAFC,mCAED,EADC,iCACD;;AAMAA,YAJC,iCAID,EAHC,yBAGD,EAFC,gCAED,EADC,iCACD","names":["UpdateCommercialDocument","__decorate","UpdateReminder","UpdateRecurrence","RecurrenceType"],"sourceRoot":"","sources":["../../../../../ts/types/Interface/api/commercialManagement/Update.ts"],"sourcesContent":["import {\n IsBoolean, IsDate, IsDateString, IsEnum, IsOptional, IsString,\n} from 'class-validator';\nimport { ApiPropertyOptional } from '../../../../utils';\nimport { ToBoolean } from '../../../../utils/transforms/boolean.transform';\nimport { RecurrenceType } from '../../../Enum/RecurrenceType';\n\nexport class UpdateCommercialDocument {\n @ApiPropertyOptional()\n @IsBoolean()\n @ToBoolean()\n @IsOptional()\n isCanceled?: boolean;\n\n @ApiPropertyOptional()\n @IsBoolean()\n @ToBoolean()\n @IsOptional()\n isRefused?: boolean;\n\n @ApiPropertyOptional()\n @IsBoolean()\n @ToBoolean()\n @IsOptional()\n isPaid?: boolean;\n\n @ApiPropertyOptional()\n @IsBoolean()\n @ToBoolean()\n @IsOptional()\n isUsed?: boolean;\n\n @ApiPropertyOptional()\n @IsDate()\n @IsOptional()\n mailSent?: Date | null;\n}\n\nexport class UpdateReminder {\n @ApiPropertyOptional()\n @IsBoolean()\n @ToBoolean()\n @IsOptional()\n beforeThree: boolean;\n\n @ApiPropertyOptional()\n @IsBoolean()\n @ToBoolean()\n @IsOptional()\n dueDate: boolean;\n\n @ApiPropertyOptional()\n @IsBoolean()\n @ToBoolean()\n @IsOptional()\n afterThree: boolean;\n\n @ApiPropertyOptional()\n @IsBoolean()\n @ToBoolean()\n @IsOptional()\n afterSeven: boolean;\n\n @ApiPropertyOptional()\n @IsString()\n @IsOptional()\n subject?: string;\n\n @ApiPropertyOptional()\n @IsString()\n @IsOptional()\n message?: string;\n\n @ApiPropertyOptional()\n @IsString()\n @IsOptional()\n email?: string;\n}\n\nexport class UpdateRecurrence {\n @ApiPropertyOptional()\n @IsEnum(RecurrenceType)\n @IsOptional()\n type?: number;\n\n @ApiPropertyOptional()\n @IsDateString()\n @IsOptional()\n startDate?: string;\n\n @ApiPropertyOptional()\n @IsDateString()\n @IsOptional()\n endDate?: string;\n\n @ApiPropertyOptional()\n @ToBoolean()\n @IsBoolean()\n @IsOptional()\n isActive?: boolean;\n}"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Create.js","mappings":";;;;;;;AAAA;;AACA;;;;;;;;;;;;;;AAGM,MAAOA,UAAP,CAAiB;;QAAVA,U,GAAAA,U;;AAEXC,YADC,yBACD;;AAIAA,YAFC,yBAED,EADC,+BACD;;AAIAA,YAFC,yBAED,EADC,+BACD","names":["CreateFile","__decorate"],"sourceRoot":"","sources":["../../../../../ts/types/Interface/api/file/Create.ts"],"sourcesContent":["import { IsString } from 'class-validator';\nimport { ApiProperty } from '../../../../utils';\nimport { TFile } from './TFile';\n\nexport class CreateFile {\n @ApiProperty()\n file
|
|
1
|
+
{"version":3,"file":"Create.js","mappings":";;;;;;;AAAA;;AACA;;;;;;;;;;;;;;AAGM,MAAOA,UAAP,CAAiB;;QAAVA,U,GAAAA,U;;AAEXC,YADC,yBACD;;AAIAA,YAFC,yBAED,EADC,+BACD;;AAIAA,YAFC,yBAED,EADC,+BACD","names":["CreateFile","__decorate"],"sourceRoot":"","sources":["../../../../../ts/types/Interface/api/file/Create.ts"],"sourcesContent":["import { IsString } from 'class-validator';\nimport { ApiProperty } from '../../../../utils';\nimport { TFile } from './TFile';\n\nexport class CreateFile {\n @ApiProperty()\n file: TFile;\n\n @ApiProperty()\n @IsString()\n folder: string;\n\n @ApiProperty()\n @IsString()\n name: string;\n}"]}
|
package/js/utils/amount.js
CHANGED
|
@@ -18,6 +18,6 @@ function integerToFormattedAmountString(value) {
|
|
|
18
18
|
const integerWithMask = `${integer}`.split('').reduceRight((acc, char, i, {
|
|
19
19
|
length
|
|
20
20
|
}) => `${char}${(length - (i + 1)) % 3 === 0 ? ' ' : ''}${acc}`, '').trim();
|
|
21
|
-
return `${
|
|
21
|
+
return `${value < 0 ? '- ' : ''}${integerWithMask},${cents < 10 ? '0' : ''}${cents}`;
|
|
22
22
|
}
|
|
23
23
|
//# sourceMappingURL=amount.js.map
|
package/js/utils/amount.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"amount.js","mappings":";;;;;QAAgBA,8B,GAAAA,8B;;AAAV,SAAUA,8BAAV,CAAyCC,KAAzC,EAAsD;EAC1D,MAAMC,GAAG,GAAGC,IAAI,CAACD,GAAL,CAASD,KAAK,GAAG,GAAjB,CAAZ;EACA,IAAIG,OAAO,GAAGD,IAAI,CAACE,KAAL,CAAWH,GAAX,CAAd;EACA,IAAII,KAAK,GAAGH,IAAI,CAACI,KAAL,CAAWL,GAAG,GAAG,GAAN,GAAYE,OAAO,GAAG,GAAjC,CAAZ;;EAEA,OAAOE,KAAK,IAAI,GAAhB,EAAqB;IACnBA,KAAK,GAAGH,IAAI,CAACK,GAAL,CAAS,CAAT,EAAYF,KAAK,GAAG,GAApB,CAAR;IACAF,OAAO,IAAI,CAAX;EACD;;EAED,MAAMK,eAAe,GAAG,GAAGL,OAAO,EAAV,CAAaM,KAAb,CAAmB,EAAnB,EAAuBC,WAAvB,CAAmC,CAACC,GAAD,EAAMC,IAAN,EAAYC,CAAZ,EAAe;IAAEC;EAAF,CAAf,KAA8B,GAAGF,IAAI,GAAG,CAACE,MAAM,IAAID,CAAC,GAAG,CAAR,CAAP,IAAqB,CAArB,KAA2B,CAA3B,GAA+B,GAA/B,GAAqC,EAAE,GAAGF,GAAG,EAAxH,EAA4H,EAA5H,EAAgII,IAAhI,EAAxB;EACA,OAAO,
|
|
1
|
+
{"version":3,"file":"amount.js","mappings":";;;;;QAAgBA,8B,GAAAA,8B;;AAAV,SAAUA,8BAAV,CAAyCC,KAAzC,EAAsD;EAC1D,MAAMC,GAAG,GAAGC,IAAI,CAACD,GAAL,CAASD,KAAK,GAAG,GAAjB,CAAZ;EACA,IAAIG,OAAO,GAAGD,IAAI,CAACE,KAAL,CAAWH,GAAX,CAAd;EACA,IAAII,KAAK,GAAGH,IAAI,CAACI,KAAL,CAAWL,GAAG,GAAG,GAAN,GAAYE,OAAO,GAAG,GAAjC,CAAZ;;EAEA,OAAOE,KAAK,IAAI,GAAhB,EAAqB;IACnBA,KAAK,GAAGH,IAAI,CAACK,GAAL,CAAS,CAAT,EAAYF,KAAK,GAAG,GAApB,CAAR;IACAF,OAAO,IAAI,CAAX;EACD;;EAED,MAAMK,eAAe,GAAG,GAAGL,OAAO,EAAV,CAAaM,KAAb,CAAmB,EAAnB,EAAuBC,WAAvB,CAAmC,CAACC,GAAD,EAAMC,IAAN,EAAYC,CAAZ,EAAe;IAAEC;EAAF,CAAf,KAA8B,GAAGF,IAAI,GAAG,CAACE,MAAM,IAAID,CAAC,GAAG,CAAR,CAAP,IAAqB,CAArB,KAA2B,CAA3B,GAA+B,GAA/B,GAAqC,EAAE,GAAGF,GAAG,EAAxH,EAA4H,EAA5H,EAAgII,IAAhI,EAAxB;EACA,OAAO,GAAGf,KAAK,GAAG,CAAR,GAAY,IAAZ,GAAmB,EAAE,GAAGQ,eAAe,IAAIH,KAAK,GAAG,EAAR,GAAa,GAAb,GAAmB,EAAE,GAAGA,KAAK,EAAlF;AACD","names":["integerToFormattedAmountString","value","abs","Math","integer","trunc","cents","round","max","integerWithMask","split","reduceRight","acc","char","i","length","trim"],"sourceRoot":"","sources":["../../ts/utils/amount.ts"],"sourcesContent":["export function integerToFormattedAmountString(value: number): string {\n const abs = Math.abs(value / 100);\n let integer = Math.trunc(abs);\n let cents = Math.round(abs * 100 - integer * 100);\n\n while (cents >= 100) {\n cents = Math.max(0, cents - 100);\n integer += 1;\n }\n\n const integerWithMask = `${integer}`.split('').reduceRight((acc, char, i, { length }) => `${char}${(length - (i + 1)) % 3 === 0 ? ' ' : ''}${acc}`, '').trim();\n return `${value < 0 ? '- ' : ''}${integerWithMask},${cents < 10 ? '0' : ''}${cents}`;\n}"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@silexpert/core",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.25",
|
|
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",
|
package/ts/api/resources/FIle.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { forEach } from 'lodash';
|
|
1
2
|
import { Resource } from '../Resource';
|
|
2
3
|
import {
|
|
3
4
|
ReadFile,
|
|
@@ -5,7 +6,15 @@ import {
|
|
|
5
6
|
} from '../../types';
|
|
6
7
|
|
|
7
8
|
export class File extends Resource {
|
|
8
|
-
upload(params: CreateFile): Promise<ReadFile> {
|
|
9
|
-
|
|
9
|
+
upload(params: Omit<CreateFile, 'file'>, file: File): Promise<ReadFile> {
|
|
10
|
+
const formData = new FormData();
|
|
11
|
+
forEach(params, (value, key) => {
|
|
12
|
+
if (value) {
|
|
13
|
+
formData.append(key, `${value}`);
|
|
14
|
+
}
|
|
15
|
+
});
|
|
16
|
+
// @ts-ignore
|
|
17
|
+
formData.append('file', file);
|
|
18
|
+
return this.axios.$post('files', formData, { headers: { 'Content-Type': 'multipart/form-data' } });
|
|
10
19
|
}
|
|
11
20
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
IsArray, IsBoolean, IsDateString, IsNumber, IsOptional, IsString,
|
|
3
3
|
} from 'class-validator';
|
|
4
|
-
import { Order } from '
|
|
4
|
+
import { Order } from '../../..';
|
|
5
5
|
import { ApiProperty, ApiPropertyOptional } from '../../../../utils';
|
|
6
6
|
import { ToBoolean } from '../../../../utils/transforms/boolean.transform';
|
|
7
7
|
import { DiscountType, EstimateStatus, InvoiceStatus } from '../../../Enum/CommercialManagement';
|
package/ts/utils/amount.ts
CHANGED
|
@@ -9,5 +9,5 @@ export function integerToFormattedAmountString(value: number): string {
|
|
|
9
9
|
}
|
|
10
10
|
|
|
11
11
|
const integerWithMask = `${integer}`.split('').reduceRight((acc, char, i, { length }) => `${char}${(length - (i + 1)) % 3 === 0 ? ' ' : ''}${acc}`, '').trim();
|
|
12
|
-
return `${
|
|
12
|
+
return `${value < 0 ? '- ' : ''}${integerWithMask},${cents < 10 ? '0' : ''}${cents}`;
|
|
13
13
|
}
|