@silexpert/core 1.0.53 → 1.0.55
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/CalendarEvent.d.ts +2 -1
- package/es/api/resources/CalendarEvent.d.ts.map +1 -1
- package/es/api/resources/CalendarEvent.js +2 -2
- package/es/api/resources/CalendarEvent.js.map +1 -1
- package/es/api/resources/Invoice.d.ts +2 -1
- package/es/api/resources/Invoice.d.ts.map +1 -1
- package/es/api/resources/Invoice.js +3 -0
- package/es/api/resources/Invoice.js.map +1 -1
- package/es/types/Enum/TimeCounterType.d.ts +40 -12
- package/es/types/Enum/TimeCounterType.d.ts.map +1 -1
- package/es/types/Enum/TimeCounterType.js +40 -12
- package/es/types/Enum/TimeCounterType.js.map +1 -1
- package/es/types/Interface/api/calendarEvent/readAllCalendarEvent.d.ts +1 -0
- package/es/types/Interface/api/calendarEvent/readAllCalendarEvent.d.ts.map +1 -1
- package/es/types/Interface/api/calendarEvent/readAllCalendarEvent.js.map +1 -1
- package/es/types/Interface/api/commercialManagement/Create.d.ts +3 -0
- package/es/types/Interface/api/commercialManagement/Create.d.ts.map +1 -1
- package/es/types/Interface/api/commercialManagement/Create.js +2 -0
- package/es/types/Interface/api/commercialManagement/Create.js.map +1 -1
- package/es/utils/commercialManagement/document.js +1 -1
- package/es/utils/commercialManagement/document.js.map +1 -1
- package/js/api/resources/CalendarEvent.js +5 -3
- package/js/api/resources/CalendarEvent.js.map +1 -1
- package/js/api/resources/Invoice.js +4 -0
- package/js/api/resources/Invoice.js.map +1 -1
- package/js/types/Enum/TimeCounterType.js +68 -40
- package/js/types/Enum/TimeCounterType.js.map +1 -1
- package/js/types/Interface/api/commercialManagement/Create.js +5 -1
- package/js/types/Interface/api/commercialManagement/Create.js.map +1 -1
- package/js/utils/commercialManagement/document.js +6 -6
- package/js/utils/commercialManagement/document.js.map +1 -1
- package/package.json +1 -1
- package/ts/api/resources/CalendarEvent.ts +3 -2
- package/ts/api/resources/Invoice.ts +5 -0
- package/ts/types/Enum/TimeCounterType.ts +40 -12
- package/ts/types/Interface/api/calendarEvent/readAllCalendarEvent.ts +1 -0
- package/ts/types/Interface/api/commercialManagement/Create.ts +4 -0
- package/ts/utils/commercialManagement/document.ts +6 -6
|
@@ -1 +1 @@
|
|
|
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,UAAU,EAAE;IACZ,QAAQ,EAAE;;wDACa;AAKxB;IAHC,mBAAmB,EAAE;IACrB,UAAU,EAAE;IACZ,QAAQ,EAAE;;oDACS;AAKpB;IAHC,mBAAmB,EAAE;IACrB,UAAU,EAAE;IACZ,QAAQ,EAAE;;qEAC0B;AAKrC;IAHC,mBAAmB,EAAE;IACrB,UAAU,EAAE;IACZ,QAAQ,EAAE;;qDACU;AAKrB;IAHC,mBAAmB,EAAE;IACrB,UAAU,EAAE;IACZ,QAA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,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 discount: string | null;\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
|
+
{"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,OAA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;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 CreateCommercialMailWithMultipleFiles extends CreateCommercialMail {\n idsFile: number[];\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 discount: string | null;\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}"]}
|
|
@@ -14,7 +14,7 @@ export function generateCommercialDocument(idEstimateInvoiceType, payload) {
|
|
|
14
14
|
const products = _orderBy(payload.products.map((product) => productToReadProductEditing(product), 'reorder'));
|
|
15
15
|
const vats = _orderBy(Object.values(_groupBy(products, 'vatFormatted')).map((v) => (vatToReadVatEditing(v)), 'value')).filter((v) => v.id !== Vat.MARGE.id);
|
|
16
16
|
const data = Object.assign(Object.assign({}, payload), { paymentLink: (_a = payload.paymentLink) !== null && _a !== void 0 ? _a : '#', idEstimateInvoiceType, title: (_b = payload.title) !== null && _b !== void 0 ? _b : null, penalties: (_c = payload.penalties) !== null && _c !== void 0 ? _c : null, compensation: (_d = payload.compensation) !== null && _d !== void 0 ? _d : null, discount: (_e = payload.discount) !== null && _e !== void 0 ? _e : null, vatMention: (_f = payload.vatMention) !== null && _f !== void 0 ? _f : null, phoneContact: (_h = (_g = payload.settings) === null || _g === void 0 ? void 0 : _g.phoneContact) !== null && _h !== void 0 ? _h : null, products,
|
|
17
|
-
vats, totalTaxExcluded: _sumBy(products, 'totalTaxExcluded') - ((_j = payload.deposit) !== null && _j !== void 0 ? _j : 0), totalTaxIncluded: _sumBy(products, 'totalTaxExcluded') + _sumBy(vats, 'amount') - ((_k = payload.deposit) !== null && _k !== void 0 ? _k : 0), totalTaxAndDiscountIncluded: _sumBy(products, 'totalTaxExcluded') + _sumBy(vats, 'amount') - ((_l = payload.generalDiscount2) !== null && _l !== void 0 ? _l : 0) - ((_m = payload.deposit) !== null && _m !== void 0 ? _m : 0), generalDiscountFormatted: payload.generalDiscount2 ? integerToFormattedAmountString(payload.generalDiscount2) : null, depositFormatted: payload.deposit ? integerToFormattedAmountString(payload.deposit) : null, totalTaxExcludedFormatted: integerToFormattedAmountString(_sumBy(products, 'totalTaxExcluded') - ((_o = payload.deposit) !== null && _o !== void 0 ? _o : 0)), totalTaxIncludedFormatted: integerToFormattedAmountString(_sumBy(products, 'totalTaxExcluded') + _sumBy(vats, 'amount') - ((_p = payload.deposit) !== null && _p !== void 0 ? _p : 0)), totalTaxAndDiscountIncludedFormatted: integerToFormattedAmountString(_sumBy(products, 'totalTaxExcluded') + _sumBy(vats, 'amount') - ((_q = payload.generalDiscount2) !== null && _q !== void 0 ? _q : 0) - ((_r = payload.deposit) !== null && _r !== void 0 ? _r : 0)), totalVatAmountFormatted: integerToFormattedAmountString(_sumBy(vats, 'amount')), font: {
|
|
17
|
+
vats, totalTaxExcluded: _sumBy(products, 'totalTaxExcluded') - (idEstimateInvoiceType === EstimateInvoiceType.RESTE ? ((_j = payload.deposit) !== null && _j !== void 0 ? _j : 0) : 0), totalTaxIncluded: _sumBy(products, 'totalTaxExcluded') + _sumBy(vats, 'amount') - (idEstimateInvoiceType === EstimateInvoiceType.RESTE ? ((_k = payload.deposit) !== null && _k !== void 0 ? _k : 0) : 0), totalTaxAndDiscountIncluded: _sumBy(products, 'totalTaxExcluded') + _sumBy(vats, 'amount') - ((_l = payload.generalDiscount2) !== null && _l !== void 0 ? _l : 0) - (idEstimateInvoiceType === EstimateInvoiceType.RESTE ? ((_m = payload.deposit) !== null && _m !== void 0 ? _m : 0) : 0), generalDiscountFormatted: payload.generalDiscount2 ? integerToFormattedAmountString(payload.generalDiscount2) : null, depositFormatted: payload.deposit ? integerToFormattedAmountString(payload.deposit) : null, totalTaxExcludedFormatted: integerToFormattedAmountString(_sumBy(products, 'totalTaxExcluded') - (idEstimateInvoiceType === EstimateInvoiceType.RESTE ? ((_o = payload.deposit) !== null && _o !== void 0 ? _o : 0) : 0)), totalTaxIncludedFormatted: integerToFormattedAmountString(_sumBy(products, 'totalTaxExcluded') + _sumBy(vats, 'amount') - (idEstimateInvoiceType === EstimateInvoiceType.RESTE ? ((_p = payload.deposit) !== null && _p !== void 0 ? _p : 0) : 0)), totalTaxAndDiscountIncludedFormatted: integerToFormattedAmountString(_sumBy(products, 'totalTaxExcluded') + _sumBy(vats, 'amount') - ((_q = payload.generalDiscount2) !== null && _q !== void 0 ? _q : 0) - (idEstimateInvoiceType === EstimateInvoiceType.RESTE ? ((_r = payload.deposit) !== null && _r !== void 0 ? _r : 0) : 0)), totalVatAmountFormatted: integerToFormattedAmountString(_sumBy(vats, 'amount')), font: {
|
|
18
18
|
name: (_t = (_s = fontList.find((f) => { var _a; return f.id === ((_a = payload.settings) === null || _a === void 0 ? void 0 : _a.idFont); })) === null || _s === void 0 ? void 0 : _s.name) !== null && _t !== void 0 ? _t : fontList[0].name,
|
|
19
19
|
url: (_v = (_u = fontList.find((f) => { var _a; return f.id === ((_a = payload.settings) === null || _a === void 0 ? void 0 : _a.idFont); })) === null || _u === void 0 ? void 0 : _u.link) !== null && _v !== void 0 ? _v : fontList[0].link,
|
|
20
20
|
}, capitalFormatted: payload.capital ? `${payload.capital}`.split('').reduceRight((acc, char, i, { length }) => `${char}${(length - (i + 1)) % 3 === 0 ? ' ' : ''}${acc}`, '').trim() : null, dueDateFormatted: payload.dueDate ? dayjs(payload.dueDate).format('DD/MM/YYYY') : null, expirationDateFormatted: payload.expirationDate ? dayjs(payload.expirationDate).format('DD/MM/YYYY') : null, emissionDateFormatted: payload.emissionDate ? dayjs(payload.emissionDate).format('DD/MM/YYYY') : null, shouldDisplayDiscountColumn: !!products.find((p) => p.discount2 && p.discount2 > 0),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"document.js","s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M,CAAC,cAAc,CAAC,MAAM,EAAE,IAAI,CAAC;QAChD,IAAI,EAAE,GAAG,aAAH,GAAG,uBAAH,GAAG,CAAE,MAAM,CAAC,YAAY,EAAE,IAAI,CAAC;QACrC,MAAM,EAAE,GAAG,aAAH,GAAG,uBAAH,GAAG,CAAE,MAAM,CAAC,cAAc,CAAC,MAAM,kCAAO,IAAI,KAAE,QAAQ,EAAE,MAAA,MAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,QAAQ,0CAAE,eAAe,mCAAI,IAAI,IAAG;QAC7G,IAAI;KACL,CAAC;AACJ,CAAC","sourcesContent":["import {\n orderBy as _orderBy, groupBy as _groupBy, sumBy as _sumBy, uniq as _uniq,\n} from 'lodash';\nimport * as dayjs from 'dayjs';\nimport { ReadCommercialDocumentTemplate, ReadDocumentEditing } from '../../types/Interface/api/commercialManagement/Read';\nimport { AccountingCategoryList, fontList, VatMarginCategyList } from '../../types/Enum/CommercialManagement';\nimport { EstimateInvoiceType } from '../../types/Enum/EstimateInvoice';\nimport { Vat } from '../../types/Enum/Vat';\nimport { integerToFormattedAmountString } from '../amount';\nimport { CommercialDocumentCommonHTML } from './templates/common';\nimport { bodyTemplate } from './templates/body';\nimport { productToReadProductEditing } from './product';\nimport { vatToReadVatEditing } from './vat';\nimport { CreateInvoiceDocument, CreatePreSaleDocument } from '../../types';\n\nconst ejs = require('ejs');\n\nexport function generateCommercialDocument(idEstimateInvoiceType: EstimateInvoiceType, payload: CreateInvoiceDocument | CreatePreSaleDocument): ReadCommercialDocumentTemplate {\n const products = _orderBy(payload.products.map((product) => productToReadProductEditing(product), 'reorder'));\n const vats = _orderBy(Object.values(_groupBy(products, 'vatFormatted')).map((v) => (vatToReadVatEditing(v)), 'value')).filter((v) => v.id !== Vat.MARGE.id);\n const data: ReadDocumentEditing = {\n ...payload,\n paymentLink: payload.paymentLink ?? '#',\n idEstimateInvoiceType,\n title: payload.title ?? null,\n penalties: payload.penalties ?? null,\n compensation: payload.compensation ?? null,\n discount: payload.discount ?? null,\n vatMention: payload.vatMention ?? null,\n phoneContact: payload.settings?.phoneContact ?? null,\n products,\n vats,\n totalTaxExcluded: _sumBy(products, 'totalTaxExcluded') - (payload.deposit ?? 0),\n totalTaxIncluded: _sumBy(products, 'totalTaxExcluded') + _sumBy(vats, 'amount') - (payload.deposit ?? 0),\n totalTaxAndDiscountIncluded: _sumBy(products, 'totalTaxExcluded') + _sumBy(vats, 'amount') - (payload.generalDiscount2 ?? 0) - (payload.deposit ?? 0),\n generalDiscountFormatted: payload.generalDiscount2 ? integerToFormattedAmountString(payload.generalDiscount2) : null,\n depositFormatted: payload.deposit ? integerToFormattedAmountString(payload.deposit) : null,\n totalTaxExcludedFormatted: integerToFormattedAmountString(_sumBy(products, 'totalTaxExcluded') - (payload.deposit ?? 0)),\n totalTaxIncludedFormatted: integerToFormattedAmountString(_sumBy(products, 'totalTaxExcluded') + _sumBy(vats, 'amount') - (payload.deposit ?? 0)),\n totalTaxAndDiscountIncludedFormatted: integerToFormattedAmountString(_sumBy(products, 'totalTaxExcluded') + _sumBy(vats, 'amount') - (payload.generalDiscount2 ?? 0) - (payload.deposit ?? 0)),\n totalVatAmountFormatted: integerToFormattedAmountString(_sumBy(vats, 'amount')),\n font: {\n name: fontList.find((f) => f.id === payload.settings?.idFont)?.name ?? fontList[0].name,\n url: fontList.find((f) => f.id === payload.settings?.idFont)?.link ?? fontList[0].link,\n },\n capitalFormatted: payload.capital ? `${payload.capital}`.split('').reduceRight((acc, char, i, { length }) => `${char}${(length - (i + 1)) % 3 === 0 ? ' ' : ''}${acc}`, '').trim() : null,\n dueDateFormatted: payload.dueDate ? dayjs(payload.dueDate).format('DD/MM/YYYY') : null,\n expirationDateFormatted: payload.expirationDate ? dayjs(payload.expirationDate).format('DD/MM/YYYY') : null,\n emissionDateFormatted: payload.emissionDate ? dayjs(payload.emissionDate).format('DD/MM/YYYY') : null,\n shouldDisplayDiscountColumn: !!products.find((p) => p.discount2 && p.discount2 > 0),\n // @ts-ignore\n marginVats: _uniq(products.filter((p) => p.marginVatFormatted !== null).map((p) => p.marginVatFormatted)),\n accountingCategoryFormatted: AccountingCategoryList.find((a) => a.id === payload.accountingCategory)?.label ?? null,\n };\n\n const commonTemplate = new CommercialDocumentCommonHTML();\n const documentFreeText = [EstimateInvoiceType.DEVIS, EstimateInvoiceType.BON].includes(idEstimateInvoiceType) ? payload?.settings?.freeEstimateText : payload?.settings?.freeInvoiceText;\n\n return {\n header: ejs.render(commonTemplate.header, data),\n body: ejs.render(bodyTemplate, data),\n footer: ejs.render(commonTemplate.footer, { ...data, freeText: documentFreeText ?? null }),\n data,\n };\n}\n\nexport function generateAdvanceDocument(payload: CreateInvoiceDocument): ReadCommercialDocumentTemplate {\n if (!payload.deposit) throw new Error('Aucun acompte défini');\n\n const data: ReadDocumentEditing = {\n ...payload,\n title: payload.title ?? null,\n paymentLink: payload.paymentLink ?? '#',\n idEstimateInvoiceType: EstimateInvoiceType.ACOMPTE,\n phoneContact: payload.settings?.phoneContact ?? null,\n products: [],\n vats: [],\n totalTaxExcluded: payload.deposit,\n totalTaxIncluded: payload.deposit,\n totalTaxAndDiscountIncluded: payload.deposit,\n generalDiscountFormatted: null,\n depositFormatted: integerToFormattedAmountString(payload.deposit),\n totalTaxExcludedFormatted: integerToFormattedAmountString(payload.deposit),\n totalTaxIncludedFormatted: integerToFormattedAmountString(payload.deposit),\n totalTaxAndDiscountIncludedFormatted: integerToFormattedAmountString(payload.deposit),\n totalVatAmountFormatted: integerToFormattedAmountString(0),\n font: {\n name: fontList.find((f) => f.id === payload.settings?.idFont)?.name ?? fontList[0].name,\n url: fontList.find((f) => f.id === payload.settings?.idFont)?.link ?? fontList[0].link,\n },\n capitalFormatted: payload.capital ? `${payload.capital}`.split('').reduceRight((acc, char, i, { length }) => `${char}${(length - (i + 1)) % 3 === 0 ? ' ' : ''}${acc}`, '').trim() : null,\n dueDateFormatted: payload.dueDate ? dayjs(payload.dueDate).format('DD/MM/YYYY') : null,\n expirationDateFormatted: payload.expirationDate ? dayjs(payload.expirationDate).format('DD/MM/YYYY') : null,\n emissionDateFormatted: payload.emissionDate ? dayjs(payload.emissionDate).format('DD/MM/YYYY') : null,\n shouldDisplayDiscountColumn: false,\n disableVat: true,\n // @ts-ignore\n marginVats: _uniq((payload.assetMarginVatIds ?? []).map((m) => VatMarginCategyList.find((c) => c.id === m)?.label ?? null)),\n accountingCategoryFormatted: AccountingCategoryList.find((a) => a.id === payload.accountingCategory)?.label ?? null,\n };\n\n const commonTemplate = new CommercialDocumentCommonHTML();\n\n return {\n header: ejs?.render(commonTemplate.header, data),\n body: ejs?.render(bodyTemplate, data),\n footer: ejs?.render(commonTemplate.footer, { ...data, freeText: payload?.settings?.freeInvoiceText ?? null }),\n data,\n };\n}"]}
|
|
1
|
+
{"version":3,"file":"document.js","sourceRoot":"","sources":["../../../ts/utils/commercialManagement/document.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,OAAO,IAAI,QAAQ,EAAE,OAAO,IAAI,QAAQ,EAAE,KAAK,IAAI,MAAM,EAAE,IAAI,IAAI,KAAK,GACzE,MAAM,QAAQ,CAAC;AAChB,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAE,sBAAsB,EAAE,QAAQ,EAAE,mBAAmB,EAAE,MAAM,uCAAuC,CAAC;AAC9G,OAAO,EAAE,mBAAmB,EAAE,MAAM,kCAAkC,CAAC;AACvE,OAAO,EAAE,GAAG,EAAE,MAAM,sBAAsB,CAAC;AAC3C,OAAO,EAAE,8BAA8B,EAAE,MAAM,WAAW,CAAC;AAC3D,OAAO,EAAE,4BAA4B,EAAE,MAAM,oBAAoB,CAAC;AAClE,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAChD,OAAO,EAAE,2BAA2B,EAAE,MAAM,WAAW,CAAC;AACxD,OAAO,EAAE,mBAAmB,EAAE,MAAM,OAAO,CAAC;AAG5C,MAAM,GAAG,GAAG,OAAO,CAAC,KA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AG,CAAE,MAAM,CAAC,cAAc,CAAC,MAAM,kCAAO,IAAI,KAAE,QAAQ,EAAE,MAAA,MAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,QAAQ,0CAAE,eAAe,mCAAI,IAAI,IAAG;QAC7G,IAAI;KACL,CAAC;AACJ,CAAC","sourcesContent":["import {\n orderBy as _orderBy, groupBy as _groupBy, sumBy as _sumBy, uniq as _uniq,\n} from 'lodash';\nimport * as dayjs from 'dayjs';\nimport { ReadCommercialDocumentTemplate, ReadDocumentEditing } from '../../types/Interface/api/commercialManagement/Read';\nimport { AccountingCategoryList, fontList, VatMarginCategyList } from '../../types/Enum/CommercialManagement';\nimport { EstimateInvoiceType } from '../../types/Enum/EstimateInvoice';\nimport { Vat } from '../../types/Enum/Vat';\nimport { integerToFormattedAmountString } from '../amount';\nimport { CommercialDocumentCommonHTML } from './templates/common';\nimport { bodyTemplate } from './templates/body';\nimport { productToReadProductEditing } from './product';\nimport { vatToReadVatEditing } from './vat';\nimport { CreateInvoiceDocument, CreatePreSaleDocument } from '../../types';\n\nconst ejs = require('ejs');\n\nexport function generateCommercialDocument(idEstimateInvoiceType: EstimateInvoiceType, payload: CreateInvoiceDocument | CreatePreSaleDocument): ReadCommercialDocumentTemplate {\n const products = _orderBy(payload.products.map((product) => productToReadProductEditing(product), 'reorder'));\n const vats = _orderBy(Object.values(_groupBy(products, 'vatFormatted')).map((v) => (vatToReadVatEditing(v)), 'value')).filter((v) => v.id !== Vat.MARGE.id);\n const data: ReadDocumentEditing = {\n ...payload,\n paymentLink: payload.paymentLink ?? '#',\n idEstimateInvoiceType,\n title: payload.title ?? null,\n penalties: payload.penalties ?? null,\n compensation: payload.compensation ?? null,\n discount: payload.discount ?? null,\n vatMention: payload.vatMention ?? null,\n phoneContact: payload.settings?.phoneContact ?? null,\n products,\n vats,\n totalTaxExcluded: _sumBy(products, 'totalTaxExcluded') - (idEstimateInvoiceType === EstimateInvoiceType.RESTE ? (payload.deposit ?? 0) : 0),\n totalTaxIncluded: _sumBy(products, 'totalTaxExcluded') + _sumBy(vats, 'amount') - (idEstimateInvoiceType === EstimateInvoiceType.RESTE ? (payload.deposit ?? 0) : 0),\n totalTaxAndDiscountIncluded: _sumBy(products, 'totalTaxExcluded') + _sumBy(vats, 'amount') - (payload.generalDiscount2 ?? 0) - (idEstimateInvoiceType === EstimateInvoiceType.RESTE ? (payload.deposit ?? 0) : 0),\n generalDiscountFormatted: payload.generalDiscount2 ? integerToFormattedAmountString(payload.generalDiscount2) : null,\n depositFormatted: payload.deposit ? integerToFormattedAmountString(payload.deposit) : null,\n totalTaxExcludedFormatted: integerToFormattedAmountString(_sumBy(products, 'totalTaxExcluded') - (idEstimateInvoiceType === EstimateInvoiceType.RESTE ? (payload.deposit ?? 0) : 0)),\n totalTaxIncludedFormatted: integerToFormattedAmountString(_sumBy(products, 'totalTaxExcluded') + _sumBy(vats, 'amount') - (idEstimateInvoiceType === EstimateInvoiceType.RESTE ? (payload.deposit ?? 0) : 0)),\n totalTaxAndDiscountIncludedFormatted: integerToFormattedAmountString(_sumBy(products, 'totalTaxExcluded') + _sumBy(vats, 'amount') - (payload.generalDiscount2 ?? 0) - (idEstimateInvoiceType === EstimateInvoiceType.RESTE ? (payload.deposit ?? 0) : 0)),\n totalVatAmountFormatted: integerToFormattedAmountString(_sumBy(vats, 'amount')),\n font: {\n name: fontList.find((f) => f.id === payload.settings?.idFont)?.name ?? fontList[0].name,\n url: fontList.find((f) => f.id === payload.settings?.idFont)?.link ?? fontList[0].link,\n },\n capitalFormatted: payload.capital ? `${payload.capital}`.split('').reduceRight((acc, char, i, { length }) => `${char}${(length - (i + 1)) % 3 === 0 ? ' ' : ''}${acc}`, '').trim() : null,\n dueDateFormatted: payload.dueDate ? dayjs(payload.dueDate).format('DD/MM/YYYY') : null,\n expirationDateFormatted: payload.expirationDate ? dayjs(payload.expirationDate).format('DD/MM/YYYY') : null,\n emissionDateFormatted: payload.emissionDate ? dayjs(payload.emissionDate).format('DD/MM/YYYY') : null,\n shouldDisplayDiscountColumn: !!products.find((p) => p.discount2 && p.discount2 > 0),\n // @ts-ignore\n marginVats: _uniq(products.filter((p) => p.marginVatFormatted !== null).map((p) => p.marginVatFormatted)),\n accountingCategoryFormatted: AccountingCategoryList.find((a) => a.id === payload.accountingCategory)?.label ?? null,\n };\n\n const commonTemplate = new CommercialDocumentCommonHTML();\n const documentFreeText = [EstimateInvoiceType.DEVIS, EstimateInvoiceType.BON].includes(idEstimateInvoiceType) ? payload?.settings?.freeEstimateText : payload?.settings?.freeInvoiceText;\n\n return {\n header: ejs.render(commonTemplate.header, data),\n body: ejs.render(bodyTemplate, data),\n footer: ejs.render(commonTemplate.footer, { ...data, freeText: documentFreeText ?? null }),\n data,\n };\n}\n\nexport function generateAdvanceDocument(payload: CreateInvoiceDocument): ReadCommercialDocumentTemplate {\n if (!payload.deposit) throw new Error('Aucun acompte défini');\n\n const data: ReadDocumentEditing = {\n ...payload,\n title: payload.title ?? null,\n paymentLink: payload.paymentLink ?? '#',\n idEstimateInvoiceType: EstimateInvoiceType.ACOMPTE,\n phoneContact: payload.settings?.phoneContact ?? null,\n products: [],\n vats: [],\n totalTaxExcluded: payload.deposit,\n totalTaxIncluded: payload.deposit,\n totalTaxAndDiscountIncluded: payload.deposit,\n generalDiscountFormatted: null,\n depositFormatted: integerToFormattedAmountString(payload.deposit),\n totalTaxExcludedFormatted: integerToFormattedAmountString(payload.deposit),\n totalTaxIncludedFormatted: integerToFormattedAmountString(payload.deposit),\n totalTaxAndDiscountIncludedFormatted: integerToFormattedAmountString(payload.deposit),\n totalVatAmountFormatted: integerToFormattedAmountString(0),\n font: {\n name: fontList.find((f) => f.id === payload.settings?.idFont)?.name ?? fontList[0].name,\n url: fontList.find((f) => f.id === payload.settings?.idFont)?.link ?? fontList[0].link,\n },\n capitalFormatted: payload.capital ? `${payload.capital}`.split('').reduceRight((acc, char, i, { length }) => `${char}${(length - (i + 1)) % 3 === 0 ? ' ' : ''}${acc}`, '').trim() : null,\n dueDateFormatted: payload.dueDate ? dayjs(payload.dueDate).format('DD/MM/YYYY') : null,\n expirationDateFormatted: payload.expirationDate ? dayjs(payload.expirationDate).format('DD/MM/YYYY') : null,\n emissionDateFormatted: payload.emissionDate ? dayjs(payload.emissionDate).format('DD/MM/YYYY') : null,\n shouldDisplayDiscountColumn: false,\n disableVat: true,\n // @ts-ignore\n marginVats: _uniq((payload.assetMarginVatIds ?? []).map((m) => VatMarginCategyList.find((c) => c.id === m)?.label ?? null)),\n accountingCategoryFormatted: AccountingCategoryList.find((a) => a.id === payload.accountingCategory)?.label ?? null,\n };\n\n const commonTemplate = new CommercialDocumentCommonHTML();\n\n return {\n header: ejs?.render(commonTemplate.header, data),\n body: ejs?.render(bodyTemplate, data),\n footer: ejs?.render(commonTemplate.footer, { ...data, freeText: payload?.settings?.freeInvoiceText ?? null }),\n data,\n };\n}"]}
|
|
@@ -22,10 +22,12 @@ class CalendarEvent extends _Resource.Resource {
|
|
|
22
22
|
});
|
|
23
23
|
}
|
|
24
24
|
|
|
25
|
-
getAll(params) {
|
|
26
|
-
return this.axios.get('/calendar-events/all', {
|
|
25
|
+
getAll(params, cancelToken) {
|
|
26
|
+
return this.axios.get('/calendar-events/all', Object.assign(Object.assign({}, cancelToken ? {
|
|
27
|
+
cancelToken
|
|
28
|
+
} : {}), {
|
|
27
29
|
params
|
|
28
|
-
});
|
|
30
|
+
}));
|
|
29
31
|
}
|
|
30
32
|
|
|
31
33
|
update(id, payload) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CalendarEvent.js","mappings":";;;;;;;
|
|
1
|
+
{"version":3,"file":"CalendarEvent.js","mappings":";;;;;;;AAIA;;AAEM,MAAOA,aAAP,SAA6BC,kBAA7B,CAAqC;EACzCC,MAAM,CAACC,OAAD,EAAqC;IACzC,OAAO,KAAKC,KAAL,CAAWC,IAAX,CAAgB,kBAAhB,EAAoCF,OAApC,CAAP;EACD;;EAEDG,MAAM,CAACH,OAAD,EAAqC;IACzC,OAAO,KAAKC,KAAL,CAAWC,IAAX,CAAgB,yBAAhB,EAA2CF,OAA3C,CAAP;EACD;;EAEDI,GAAG,CAACC,EAAD,EAAaC,MAAb,EAAuC;IACxC,OAAO,KAAKL,KAAL,CAAWG,GAAX,CAAe,oBAAoBC,EAAE,EAArC,EAAyC;MAAEC;IAAF,CAAzC,CAAP;EACD;;EAEDC,MAAM,CAACD,MAAD,EAA8BE,WAA9B,EAAuD;IAC3D,OAAO,KAAKP,KAAL,CAAWG,GAAX,CAAe,sBAAf,EAAqCK,gCAAQD,WAAW,GAAG;MAAEA;IAAF,CAAH,GAAqB,EAAxC,GAA2C;MAAEF;IAAF,CAA3C,CAArC,CAAP;EACD;;EAEDI,MAAM,CAACL,EAAD,EAAaL,OAAb,EAAyC;IAC7C,OAAO,KAAKC,KAAL,CAAWU,GAAX,CAAe,oBAAoBN,EAAE,EAArC,EAAyCL,OAAzC,CAAP;EACD;;EAEDY,MAAM,CAACP,EAAD,EAAW;IACf,OAAO,KAAKJ,KAAL,CAAWW,MAAX,CAAkB,oBAAoBP,EAAE,EAAxC,CAAP;EACD;;AAvBwC;;QAA9BR,a,GAAAA,a","names":["CalendarEvent","Resource","create","payload","axios","post","verify","get","id","params","getAll","cancelToken","Object","update","put","delete"],"sourceRoot":"","sources":["../../../ts/api/resources/CalendarEvent.ts"],"sourcesContent":["import { CancelToken } from 'axios';\nimport {\n CreateCalendarEventForUsers, GetAllCalendarEvent, ICalendarEvent, ICalendarEventUser, QueryCalendarEvent, ReadAllCalendarEvent, UpdateCalendarEvent, VerifyCalendarEvent,\n} from '../../types';\nimport { Resource } from '../Resource';\n\nexport class CalendarEvent extends Resource {\n create(payload: CreateCalendarEventForUsers): Promise<ICalendarEventUser[]> {\n return this.axios.post('/calendar-events', payload);\n }\n\n verify(payload: CreateCalendarEventForUsers): Promise<VerifyCalendarEvent> {\n return this.axios.post('/calendar-events/verify', payload);\n }\n\n get(id: number, params: QueryCalendarEvent): Promise<ICalendarEvent> {\n return this.axios.get(`/calendar-events/${id}`, { params });\n }\n\n getAll(params: GetAllCalendarEvent, cancelToken?: CancelToken): Promise<ReadAllCalendarEvent> {\n return this.axios.get('/calendar-events/all', { ...(cancelToken ? { cancelToken } : {}), params });\n }\n\n update(id: number, payload: UpdateCalendarEvent): Promise<ICalendarEvent> {\n return this.axios.put(`/calendar-events/${id}`, payload);\n }\n\n delete(id: number): Promise<number> {\n return this.axios.delete(`/calendar-events/${id}`);\n }\n}"]}
|
|
@@ -44,6 +44,10 @@ class Invoice extends _Resource.Resource {
|
|
|
44
44
|
return this.axios.$post(`/commercial-management/files/${idFile}/mails`, payload);
|
|
45
45
|
}
|
|
46
46
|
|
|
47
|
+
sendMailWithMultipleFiles(payload) {
|
|
48
|
+
return this.axios.$post('/commercial-management/files/mails', payload);
|
|
49
|
+
}
|
|
50
|
+
|
|
47
51
|
getFormValues(id) {
|
|
48
52
|
return this.axios.$get(`/commercial-management/documents/${id}/inputs`);
|
|
49
53
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Invoice.js","mappings":";;;;;;;AACA;;
|
|
1
|
+
{"version":3,"file":"Invoice.js","mappings":";;;;;;;AACA;;AAeM,MAAOA,OAAP,SAAuBC,kBAAvB,CAA+B;EACnCC,qBAAqB,CAACC,MAAD,EAAuCC,WAAvC,EAAgE;IACnF,OAAO,KAAKC,KAAL,CAAWC,IAAX,CAAgB,iCAAhB,EAAiDC,gCAClDH,WAAW,GAAG;MAAEA;IAAF,CAAH,GAAqB,EADkB,GACf;MACvCD;IADuC,CADe,CAAjD,CAAP;EAID;;EAEDK,mBAAmB,CAACL,MAAD,EAAuCC,WAAvC,EAAgE;IACjF,OAAO,KAAKC,KAAL,CAAWC,IAAX,CAAgB,iCAAhB,EAAiDC,gCAClDH,WAAW,GAAG;MAAEA;IAAF,CAAH,GAAqB,EADkB,GACf;MACvCD;IADuC,CADe,CAAjD,CAAP;EAID;;EAEDM,MAAM,CAACC,OAAD,EAA+B;IACnC,OAAO,KAAKL,KAAL,CAAWM,KAAX,CAAiB,iCAAjB,EAAoDD,OAApD,CAAP;EACD;;EAEDE,MAAM,CAACC,EAAD,EAAaH,OAAb,EAA2C;IAC/C,OAAO,KAAKL,KAAL,CAAWS,IAAX,CAAgB,mCAAmCD,EAAE,EAArD,EAAyDH,OAAzD,CAAP;EACD;;EAEDK,MAAM,CAACF,EAAD,EAAW;IACf,OAAO,KAAKR,KAAL,CAAWW,OAAX,CAAmB,oCAAoCH,EAAE,EAAzD,CAAP;EACD;;EAEDI,WAAW,CAACC,MAAD,EAAe;IACxB,OAAO,KAAKb,KAAL,CAAWC,IAAX,CAAgB,gCAAgCY,MAAM,QAAtD,CAAP;EACD;;EAEDC,QAAQ,CAACD,MAAD,EAAiBR,OAAjB,EAA8C;IACpD,OAAO,KAAKL,KAAL,CAAWM,KAAX,CAAiB,gCAAgCO,MAAM,QAAvD,EAAiER,OAAjE,CAAP;EACD;;EAEDU,yBAAyB,CAACV,OAAD,EAA+C;IACtE,OAAO,KAAKL,KAAL,CAAWM,KAAX,CAAiB,oCAAjB,EAAuDD,OAAvD,CAAP;EACD;;EAEDW,aAAa,CAACR,EAAD,EAAW;IACtB,OAAO,KAAKR,KAAL,CAAWC,IAAX,CAAgB,oCAAoCO,EAAE,SAAtD,CAAP;EACD;;EAEDS,oBAAoB,CAACC,qBAAD,EAA2C;IAC7D,OAAO,KAAKlB,KAAL,CAAWC,IAAX,CAAgB,yCAAhB,EAA2D;MAAEH,MAAM,EAAE;QAAEoB;MAAF;IAAV,CAA3D,CAAP;EACD;;AA7CkC;;QAAxBvB,O,GAAAA,O","names":["Invoice","Resource","getCashBasedPaginated","params","cancelToken","axios","$get","Object","getAccrualPaginated","create","payload","$post","update","id","$put","delete","$delete","getAllMails","idFile","sendMail","sendMailWithMultipleFiles","getFormValues","getDefaultFormValues","idEstimateInvoiceType"],"sourceRoot":"","sources":["../../../ts/api/resources/Invoice.ts"],"sourcesContent":["import { CancelToken } from 'axios';\nimport { Resource } from '../Resource';\nimport {\n BasePaginate,\n CreateCommercialMail,\n CreateCommercialMailWithMultipleFiles,\n CreateInvoiceDocument,\n EstimateInvoiceType,\n ICommercialMail,\n IEstimateInvoice,\n QueryInvoice,\n QueryPaginate,\n ReadAccrualInvoice,\n ReadCashBasedInvoice,\n} from '../../types';\n\nexport class Invoice extends Resource {\n getCashBasedPaginated(params: QueryInvoice & QueryPaginate, cancelToken?: CancelToken): Promise<BasePaginate<ReadCashBasedInvoice>> {\n return this.axios.$get('/commercial-management/invoices', {\n ...(cancelToken ? { cancelToken } : {}),\n params,\n });\n }\n\n getAccrualPaginated(params: QueryInvoice & QueryPaginate, cancelToken?: CancelToken): Promise<BasePaginate<ReadAccrualInvoice>> {\n return this.axios.$get('/commercial-management/invoices', {\n ...(cancelToken ? { cancelToken } : {}),\n params,\n });\n }\n\n create(payload: CreateInvoiceDocument): Promise<IEstimateInvoice[]> {\n return this.axios.$post('/commercial-management/invoices', payload);\n }\n\n update(id: number, payload: CreateInvoiceDocument): Promise<IEstimateInvoice[]> {\n return this.axios.$put(`/commercial-management/invoices/${id}`, payload);\n }\n\n delete(id: number): Promise<true> {\n return this.axios.$delete(`/commercial-management/documents/${id}`);\n }\n\n getAllMails(idFile: number): Promise<ICommercialMail[]> {\n return this.axios.$get(`/commercial-management/files/${idFile}/mails`);\n }\n\n sendMail(idFile: number, payload: CreateCommercialMail): Promise<ICommercialMail> {\n return this.axios.$post(`/commercial-management/files/${idFile}/mails`, payload);\n }\n\n sendMailWithMultipleFiles(payload: CreateCommercialMailWithMultipleFiles): Promise<ICommercialMail[]> {\n return this.axios.$post('/commercial-management/files/mails', payload);\n }\n\n getFormValues(id: number): Promise<CreateInvoiceDocument> {\n return this.axios.$get(`/commercial-management/documents/${id}/inputs`);\n }\n\n getDefaultFormValues(idEstimateInvoiceType: EstimateInvoiceType): Promise<CreateInvoiceDocument> {\n return this.axios.$get('/commercial-management/documents/inputs', { params: { idEstimateInvoiceType } });\n }\n}"]}
|
|
@@ -12,169 +12,197 @@ const TimeCounterType = exports.TimeCounterType = {
|
|
|
12
12
|
id: 1,
|
|
13
13
|
label: 'OnBoarding',
|
|
14
14
|
aberrantTime: 60,
|
|
15
|
-
limitedRoles: [_Role.Role.FRONT_OFFICE]
|
|
15
|
+
limitedRoles: [_Role.Role.FRONT_OFFICE],
|
|
16
|
+
color: 'fire'
|
|
16
17
|
},
|
|
17
18
|
VAT: {
|
|
18
19
|
id: 2,
|
|
19
20
|
label: 'TVA',
|
|
20
21
|
aberrantTime: 60,
|
|
21
|
-
limitedRoles: [_Role.Role.MANAGER, _Role.Role.EXPERT_ACCOUNTANT, _Role.Role.FRONT_OFFICE]
|
|
22
|
+
limitedRoles: [_Role.Role.MANAGER, _Role.Role.EXPERT_ACCOUNTANT, _Role.Role.FRONT_OFFICE],
|
|
23
|
+
color: 'iris'
|
|
22
24
|
},
|
|
23
25
|
REVISION: {
|
|
24
26
|
id: 3,
|
|
25
27
|
label: 'Révision',
|
|
26
28
|
aberrantTime: 120,
|
|
27
|
-
limitedRoles: [_Role.Role.MANAGER, _Role.Role.EXPERT_ACCOUNTANT, _Role.Role.FRONT_OFFICE]
|
|
29
|
+
limitedRoles: [_Role.Role.MANAGER, _Role.Role.EXPERT_ACCOUNTANT, _Role.Role.FRONT_OFFICE],
|
|
30
|
+
color: 'bubblegum-light'
|
|
28
31
|
},
|
|
29
32
|
FOLDER_REVIEW: {
|
|
30
33
|
id: 4,
|
|
31
34
|
label: 'Revue dossier',
|
|
32
35
|
aberrantTime: 60,
|
|
33
|
-
limitedRoles: [_Role.Role.MANAGER, _Role.Role.EXPERT_ACCOUNTANT, _Role.Role.FRONT_OFFICE]
|
|
36
|
+
limitedRoles: [_Role.Role.MANAGER, _Role.Role.EXPERT_ACCOUNTANT, _Role.Role.FRONT_OFFICE],
|
|
37
|
+
color: 'cerulean'
|
|
34
38
|
},
|
|
35
39
|
REPORTING: {
|
|
36
40
|
id: 5,
|
|
37
41
|
label: 'Signalement',
|
|
38
42
|
aberrantTime: 60,
|
|
39
|
-
limitedRoles: [_Role.Role.CUSTOMER_SUCCESS]
|
|
43
|
+
limitedRoles: [_Role.Role.CUSTOMER_SUCCESS],
|
|
44
|
+
color: 'lipstick-dark'
|
|
40
45
|
},
|
|
41
46
|
SYNCHRONISATION: {
|
|
42
47
|
id: 6,
|
|
43
48
|
label: 'Synchronisation',
|
|
44
49
|
aberrantTime: 30,
|
|
45
|
-
limitedRoles: [_Role.Role.CUSTOMER_SUCCESS]
|
|
50
|
+
limitedRoles: [_Role.Role.CUSTOMER_SUCCESS],
|
|
51
|
+
color: 'orange-dark'
|
|
46
52
|
},
|
|
47
53
|
UNDER_SUPERVISION: {
|
|
48
54
|
id: 7,
|
|
49
55
|
label: 'En cours de supervision',
|
|
50
56
|
aberrantTime: 45,
|
|
51
|
-
limitedRoles: null
|
|
57
|
+
limitedRoles: null,
|
|
58
|
+
color: 'orange-dark'
|
|
52
59
|
},
|
|
53
60
|
CLIENT_CONTACT: {
|
|
54
61
|
id: 8,
|
|
55
62
|
label: 'Contact client (Appel/mail/chat)',
|
|
56
|
-
aberrantTime:
|
|
57
|
-
limitedRoles: null
|
|
63
|
+
aberrantTime: 20,
|
|
64
|
+
limitedRoles: null,
|
|
65
|
+
color: 'orange-light'
|
|
58
66
|
},
|
|
59
67
|
MEETING: {
|
|
60
68
|
id: 9,
|
|
61
69
|
label: 'Réunion',
|
|
62
|
-
aberrantTime:
|
|
63
|
-
limitedRoles: null
|
|
70
|
+
aberrantTime: 20,
|
|
71
|
+
limitedRoles: null,
|
|
72
|
+
color: 'fern-dark'
|
|
64
73
|
},
|
|
65
74
|
FORMATION: {
|
|
66
75
|
id: 10,
|
|
67
76
|
label: 'Formation',
|
|
68
|
-
aberrantTime:
|
|
69
|
-
limitedRoles: null
|
|
77
|
+
aberrantTime: 20,
|
|
78
|
+
limitedRoles: null,
|
|
79
|
+
color: 'fern'
|
|
70
80
|
},
|
|
71
81
|
FORECAST: {
|
|
72
82
|
id: 11,
|
|
73
83
|
label: 'Prévisionnel',
|
|
74
|
-
aberrantTime:
|
|
75
|
-
limitedRoles: [_Role.Role.FRONT_OFFICE]
|
|
84
|
+
aberrantTime: 20,
|
|
85
|
+
limitedRoles: [_Role.Role.FRONT_OFFICE],
|
|
86
|
+
color: 'cerulean-light'
|
|
76
87
|
},
|
|
77
88
|
CERTIFICATE: {
|
|
78
89
|
id: 12,
|
|
79
90
|
label: 'Attestation',
|
|
80
|
-
aberrantTime:
|
|
81
|
-
limitedRoles: [_Role.Role.CUSTOMER_SUCCESS]
|
|
91
|
+
aberrantTime: 20,
|
|
92
|
+
limitedRoles: [_Role.Role.CUSTOMER_SUCCESS],
|
|
93
|
+
color: 'lipstick-light'
|
|
82
94
|
},
|
|
83
95
|
COMPLEMENTARY_MISSION: {
|
|
84
96
|
id: 13,
|
|
85
97
|
label: 'Mission complémentaire',
|
|
86
|
-
aberrantTime:
|
|
87
|
-
limitedRoles: [_Role.Role.FRONT_OFFICE]
|
|
98
|
+
aberrantTime: 20,
|
|
99
|
+
limitedRoles: [_Role.Role.FRONT_OFFICE],
|
|
100
|
+
color: 'cerulean-light'
|
|
88
101
|
},
|
|
89
102
|
ORGANISATION: {
|
|
90
103
|
id: 14,
|
|
91
104
|
label: 'Organisation',
|
|
92
|
-
aberrantTime:
|
|
93
|
-
limitedRoles: null
|
|
105
|
+
aberrantTime: 20,
|
|
106
|
+
limitedRoles: null,
|
|
107
|
+
color: 'fern-light'
|
|
94
108
|
},
|
|
95
109
|
INTERNAL_ADVICE: {
|
|
96
110
|
id: 15,
|
|
97
111
|
label: 'Conseil interne',
|
|
98
|
-
aberrantTime:
|
|
99
|
-
limitedRoles: null
|
|
112
|
+
aberrantTime: 20,
|
|
113
|
+
limitedRoles: null,
|
|
114
|
+
color: 'fern-light'
|
|
100
115
|
},
|
|
101
116
|
LAB: {
|
|
102
117
|
id: 16,
|
|
103
118
|
label: 'LAB',
|
|
104
|
-
aberrantTime:
|
|
105
|
-
limitedRoles: [_Role.Role.EXPERT_ACCOUNTANT]
|
|
119
|
+
aberrantTime: 20,
|
|
120
|
+
limitedRoles: [_Role.Role.EXPERT_ACCOUNTANT],
|
|
121
|
+
color: 'fire'
|
|
106
122
|
},
|
|
107
123
|
SUPERVISION: {
|
|
108
124
|
id: 17,
|
|
109
125
|
label: 'Supervision',
|
|
110
|
-
aberrantTime:
|
|
111
|
-
limitedRoles: [_Role.Role.EXPERT_ACCOUNTANT, _Role.Role.MANAGER]
|
|
126
|
+
aberrantTime: 20,
|
|
127
|
+
limitedRoles: [_Role.Role.EXPERT_ACCOUNTANT, _Role.Role.MANAGER],
|
|
128
|
+
color: 'bubblegum-dark'
|
|
112
129
|
},
|
|
113
130
|
MAIL_PROCESSING: {
|
|
114
131
|
id: 18,
|
|
115
132
|
label: 'Traitement des courriers',
|
|
116
|
-
aberrantTime:
|
|
117
|
-
limitedRoles: [_Role.Role.CUSTOMER_SUCCESS]
|
|
133
|
+
aberrantTime: 20,
|
|
134
|
+
limitedRoles: [_Role.Role.CUSTOMER_SUCCESS],
|
|
135
|
+
color: 'lipstick-light'
|
|
118
136
|
},
|
|
119
137
|
SUPPORT_PROCESSING: {
|
|
120
138
|
id: 19,
|
|
121
139
|
label: 'Traitement support',
|
|
122
|
-
aberrantTime:
|
|
123
|
-
limitedRoles: [_Role.Role.CUSTOMER_SUCCESS]
|
|
140
|
+
aberrantTime: 20,
|
|
141
|
+
limitedRoles: [_Role.Role.CUSTOMER_SUCCESS],
|
|
142
|
+
color: 'error'
|
|
124
143
|
},
|
|
125
144
|
BILAN: {
|
|
126
145
|
id: 20,
|
|
127
146
|
label: 'Bilan',
|
|
128
147
|
aberrantTime: 120,
|
|
129
|
-
limitedRoles: [_Role.Role.FRONT_OFFICE, _Role.Role.EXPERT_ACCOUNTANT]
|
|
148
|
+
limitedRoles: [_Role.Role.FRONT_OFFICE, _Role.Role.EXPERT_ACCOUNTANT],
|
|
149
|
+
color: 'cerulean-dark'
|
|
130
150
|
},
|
|
131
151
|
PAYSLIP: {
|
|
132
152
|
id: 21,
|
|
133
153
|
label: 'Bulletin de paie/DSN',
|
|
134
154
|
aberrantTime: 30,
|
|
135
|
-
limitedRoles: [_Role.Role.SOCIAL]
|
|
155
|
+
limitedRoles: [_Role.Role.SOCIAL],
|
|
156
|
+
color: 'guacamole'
|
|
136
157
|
},
|
|
137
158
|
SOCIAL_PARAMETER: {
|
|
138
159
|
id: 22,
|
|
139
160
|
label: 'Paramétrage social',
|
|
140
161
|
aberrantTime: 40,
|
|
141
|
-
limitedRoles: [_Role.Role.SOCIAL]
|
|
162
|
+
limitedRoles: [_Role.Role.SOCIAL],
|
|
163
|
+
color: 'guacamole'
|
|
142
164
|
},
|
|
143
165
|
WORK_CONTRACT: {
|
|
144
166
|
id: 23,
|
|
145
167
|
label: 'Contrat de travail',
|
|
146
168
|
aberrantTime: 60,
|
|
147
|
-
limitedRoles: [_Role.Role.SOCIAL]
|
|
169
|
+
limitedRoles: [_Role.Role.SOCIAL],
|
|
170
|
+
color: 'guacamole'
|
|
148
171
|
},
|
|
149
172
|
DPAE: {
|
|
150
173
|
id: 24,
|
|
151
174
|
label: 'DPAE',
|
|
152
175
|
aberrantTime: 25,
|
|
153
|
-
limitedRoles: [_Role.Role.SOCIAL]
|
|
176
|
+
limitedRoles: [_Role.Role.SOCIAL],
|
|
177
|
+
color: 'guacamole'
|
|
154
178
|
},
|
|
155
179
|
FACTURATION: {
|
|
156
180
|
id: 25,
|
|
157
181
|
label: 'Facturation',
|
|
158
182
|
aberrantTime: 180,
|
|
159
|
-
limitedRoles: null
|
|
183
|
+
limitedRoles: null,
|
|
184
|
+
color: 'success'
|
|
160
185
|
},
|
|
161
186
|
LEGAL_DOCUMENT: {
|
|
162
187
|
id: 26,
|
|
163
188
|
label: 'Rédaction documents juridiques',
|
|
164
189
|
aberrantTime: 30,
|
|
165
|
-
limitedRoles: [_Role.Role.JURIDIC]
|
|
190
|
+
limitedRoles: [_Role.Role.JURIDIC],
|
|
191
|
+
color: 'caramel'
|
|
166
192
|
},
|
|
167
193
|
INFOGREFFE: {
|
|
168
194
|
id: 27,
|
|
169
195
|
label: 'Dépôt infogreffe ou autre',
|
|
170
196
|
aberrantTime: 15,
|
|
171
|
-
limitedRoles: [_Role.Role.JURIDIC]
|
|
197
|
+
limitedRoles: [_Role.Role.JURIDIC],
|
|
198
|
+
color: 'caramel'
|
|
172
199
|
},
|
|
173
200
|
APPOINTMENT: {
|
|
174
201
|
id: 28,
|
|
175
202
|
label: 'Rdv client',
|
|
176
203
|
aberrantTime: 15,
|
|
177
|
-
limitedRoles: null
|
|
204
|
+
limitedRoles: null,
|
|
205
|
+
color: 'orange-light'
|
|
178
206
|
}
|
|
179
207
|
};
|
|
180
208
|
//# sourceMappingURL=TimeCounterType.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TimeCounterType.js","mappings":";;;;;;;AAAA;;AAEO,MAAMA,eAAe,WAAfA,eAAe,GAAG;EAC7BC,UAAU,EAAE;IACVC,EAAE,EAAE,CADM;IAEVC,KAAK,EAAE,YAFG;IAGVC,YAAY,EAAE,EAHJ;IAIVC,YAAY,EAAE,CAACC,WAAKC,YAAN;
|
|
1
|
+
{"version":3,"file":"TimeCounterType.js","mappings":";;;;;;;AAAA;;AAEO,MAAMA,eAAe,WAAfA,eAAe,GAAG;EAC7BC,UAAU,EAAE;IACVC,EAAE,EAAE,CADM;IAEVC,KAAK,EAAE,YAFG;IAGVC,YAAY,EAAE,EAHJ;IAIVC,YAAY,EAAE,CAACC,WAAKC,YAAN,CAJJ;IAKVC,KAAK,EAAE;EALG,CADiB;EAQ7BC,GAAG,EAAE;IACHP,EAAE,EAAE,CADD;IAEHC,KAAK,EAAE,KAFJ;IAGHC,YAAY,EAAE,EAHX;IAIHC,YAAY,EAAE,CAACC,WAAKI,OAAN,EAAeJ,WAAKK,iBAApB,EAAuCL,WAAKC,YAA5C,CAJX;IAKHC,KAAK,EAAE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JD;IAKbxB,KAAK,EAAE;EALM,CA3Jc;EAkK7B2B,IAAI,EAAE;IACJjC,EAAE,EAAE,EADA;IAEJC,KAAK,EAAE,MAFH;IAGJC,YAAY,EAAE,EAHV;IAIJC,YAAY,EAAE,CAACC,WAAK0B,MAAN,CAJV;IAKJxB,KAAK,EAAE;EALH,CAlKuB;EAyK7B4B,WAAW,EAAE;IACXlC,EAAE,EAAE,EADO;IAEXC,KAAK,EAAE,aAFI;IAGXC,YAAY,EAAE,GAHH;IAIXC,YAAY,EAAE,IAJH;IAKXG,KAAK,EAAE;EALI,CAzKgB;EAgL7B6B,cAAc,EAAE;IACdnC,EAAE,EAAE,EADU;IAEdC,KAAK,EAAE,gCAFO;IAGdC,YAAY,EAAE,EAHA;IAIdC,YAAY,EAAE,CAACC,WAAKgC,OAAN,CAJA;IAKd9B,KAAK,EAAE;EALO,CAhLa;EAuL7B+B,UAAU,EAAE;IACVrC,EAAE,EAAE,EADM;IAEVC,KAAK,EAAE,2BAFG;IAGVC,YAAY,EAAE,EAHJ;IAIVC,YAAY,EAAE,CAACC,WAAKgC,OAAN,CAJJ;IAKV9B,KAAK,EAAE;EALG,CAvLiB;EA8L7BgC,WAAW,EAAE;IACXtC,EAAE,EAAE,EADO;IAEXC,KAAK,EAAE,YAFI;IAGXC,YAAY,EAAE,EAHH;IAIXC,YAAY,EAAE,IAJH;IAKXG,KAAK,EAAE;EALI;AA9LgB,CAAxB","names":["TimeCounterType","ONBOARDING","id","label","aberrantTime","limitedRoles","Role","FRONT_OFFICE","color","VAT","MANAGER","EXPERT_ACCOUNTANT","REVISION","FOLDER_REVIEW","REPORTING","CUSTOMER_SUCCESS","SYNCHRONISATION","UNDER_SUPERVISION","CLIENT_CONTACT","MEETING","FORMATION","FORECAST","CERTIFICATE","COMPLEMENTARY_MISSION","ORGANISATION","INTERNAL_ADVICE","LAB","SUPERVISION","MAIL_PROCESSING","SUPPORT_PROCESSING","BILAN","PAYSLIP","SOCIAL","SOCIAL_PARAMETER","WORK_CONTRACT","DPAE","FACTURATION","LEGAL_DOCUMENT","JURIDIC","INFOGREFFE","APPOINTMENT"],"sourceRoot":"","sources":["../../../ts/types/Enum/TimeCounterType.ts"],"sourcesContent":["import { Role } from './Role';\n\nexport const TimeCounterType = {\n ONBOARDING: {\n id: 1,\n label: 'OnBoarding',\n aberrantTime: 60,\n limitedRoles: [Role.FRONT_OFFICE],\n color: 'fire',\n },\n VAT: {\n id: 2,\n label: 'TVA',\n aberrantTime: 60,\n limitedRoles: [Role.MANAGER, Role.EXPERT_ACCOUNTANT, Role.FRONT_OFFICE],\n color: 'iris',\n },\n REVISION: {\n id: 3,\n label: 'Révision',\n aberrantTime: 120,\n limitedRoles: [Role.MANAGER, Role.EXPERT_ACCOUNTANT, Role.FRONT_OFFICE],\n color: 'bubblegum-light',\n },\n FOLDER_REVIEW: {\n id: 4,\n label: 'Revue dossier',\n aberrantTime: 60,\n limitedRoles: [Role.MANAGER, Role.EXPERT_ACCOUNTANT, Role.FRONT_OFFICE],\n color: 'cerulean',\n },\n REPORTING: {\n id: 5,\n label: 'Signalement',\n aberrantTime: 60,\n limitedRoles: [Role.CUSTOMER_SUCCESS],\n color: 'lipstick-dark',\n },\n SYNCHRONISATION: {\n id: 6,\n label: 'Synchronisation',\n aberrantTime: 30,\n limitedRoles: [Role.CUSTOMER_SUCCESS],\n color: 'orange-dark',\n },\n UNDER_SUPERVISION: {\n id: 7,\n label: 'En cours de supervision',\n aberrantTime: 45,\n limitedRoles: null,\n color: 'orange-dark',\n },\n CLIENT_CONTACT: {\n id: 8,\n label: 'Contact client (Appel/mail/chat)',\n aberrantTime: 20,\n limitedRoles: null,\n color: 'orange-light',\n },\n MEETING: {\n id: 9,\n label: 'Réunion',\n aberrantTime: 20,\n limitedRoles: null,\n color: 'fern-dark',\n },\n FORMATION: {\n id: 10,\n label: 'Formation',\n aberrantTime: 20,\n limitedRoles: null,\n color: 'fern',\n },\n FORECAST: {\n id: 11,\n label: 'Prévisionnel',\n aberrantTime: 20,\n limitedRoles: [Role.FRONT_OFFICE],\n color: 'cerulean-light',\n },\n CERTIFICATE: {\n id: 12,\n label: 'Attestation',\n aberrantTime: 20,\n limitedRoles: [Role.CUSTOMER_SUCCESS],\n color: 'lipstick-light',\n },\n COMPLEMENTARY_MISSION: {\n id: 13,\n label: 'Mission complémentaire',\n aberrantTime: 20,\n limitedRoles: [Role.FRONT_OFFICE],\n color: 'cerulean-light',\n },\n ORGANISATION: {\n id: 14,\n label: 'Organisation',\n aberrantTime: 20,\n limitedRoles: null,\n color: 'fern-light',\n },\n INTERNAL_ADVICE: {\n id: 15,\n label: 'Conseil interne',\n aberrantTime: 20,\n limitedRoles: null,\n color: 'fern-light',\n },\n LAB: {\n id: 16,\n label: 'LAB',\n aberrantTime: 20,\n limitedRoles: [Role.EXPERT_ACCOUNTANT],\n color: 'fire',\n },\n SUPERVISION: {\n id: 17,\n label: 'Supervision',\n aberrantTime: 20,\n limitedRoles: [Role.EXPERT_ACCOUNTANT, Role.MANAGER],\n color: 'bubblegum-dark',\n },\n MAIL_PROCESSING: {\n id: 18,\n label: 'Traitement des courriers',\n aberrantTime: 20,\n limitedRoles: [Role.CUSTOMER_SUCCESS],\n color: 'lipstick-light',\n },\n SUPPORT_PROCESSING: {\n id: 19,\n label: 'Traitement support',\n aberrantTime: 20,\n limitedRoles: [Role.CUSTOMER_SUCCESS],\n color: 'error',\n },\n BILAN: {\n id: 20,\n label: 'Bilan',\n aberrantTime: 120,\n limitedRoles: [Role.FRONT_OFFICE, Role.EXPERT_ACCOUNTANT],\n color: 'cerulean-dark',\n },\n PAYSLIP: {\n id: 21,\n label: 'Bulletin de paie/DSN',\n aberrantTime: 30,\n limitedRoles: [Role.SOCIAL],\n color: 'guacamole',\n },\n SOCIAL_PARAMETER: {\n id: 22,\n label: 'Paramétrage social',\n aberrantTime: 40,\n limitedRoles: [Role.SOCIAL],\n color: 'guacamole',\n },\n WORK_CONTRACT: {\n id: 23,\n label: 'Contrat de travail',\n aberrantTime: 60,\n limitedRoles: [Role.SOCIAL],\n color: 'guacamole',\n },\n DPAE: {\n id: 24,\n label: 'DPAE',\n aberrantTime: 25,\n limitedRoles: [Role.SOCIAL],\n color: 'guacamole',\n },\n FACTURATION: {\n id: 25,\n label: 'Facturation',\n aberrantTime: 180,\n limitedRoles: null,\n color: 'success',\n },\n LEGAL_DOCUMENT: {\n id: 26,\n label: 'Rédaction documents juridiques',\n aberrantTime: 30,\n limitedRoles: [Role.JURIDIC],\n color: 'caramel',\n },\n INFOGREFFE: {\n id: 27,\n label: 'Dépôt infogreffe ou autre',\n aberrantTime: 15,\n limitedRoles: [Role.JURIDIC],\n color: 'caramel',\n },\n APPOINTMENT: {\n id: 28,\n label: 'Rdv client',\n aberrantTime: 15,\n limitedRoles: null,\n color: 'orange-light',\n },\n};"]}
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.CreateRecurrence = exports.CreateReminder = exports.CreateCgv = exports.CreateInvoiceDocument = exports.CreatePreSaleDocument = exports.CommercialDocumentInputs = exports.CreateCommercialMail = exports.CreateCommercialSetting = undefined;
|
|
6
|
+
exports.CreateRecurrence = exports.CreateReminder = exports.CreateCgv = exports.CreateInvoiceDocument = exports.CreatePreSaleDocument = exports.CommercialDocumentInputs = exports.CreateCommercialMailWithMultipleFiles = exports.CreateCommercialMail = exports.CreateCommercialSetting = undefined;
|
|
7
7
|
|
|
8
8
|
var _classValidator = require("class-validator");
|
|
9
9
|
|
|
@@ -123,6 +123,10 @@ __decorate([(0, _utils.ApiProperty)(), (0, _classValidator.IsString)(), __metada
|
|
|
123
123
|
|
|
124
124
|
__decorate([(0, _utils.ApiProperty)(), (0, _classValidator.IsString)(), __metadata("design:type", String)], CreateCommercialMail.prototype, "content", void 0);
|
|
125
125
|
|
|
126
|
+
class CreateCommercialMailWithMultipleFiles extends CreateCommercialMail {}
|
|
127
|
+
|
|
128
|
+
exports.CreateCommercialMailWithMultipleFiles = CreateCommercialMailWithMultipleFiles;
|
|
129
|
+
|
|
126
130
|
class CommercialDocumentInputs {}
|
|
127
131
|
|
|
128
132
|
exports.CommercialDocumentInputs = CommercialDocumentInputs;
|
|
@@ -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;;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,EAHC,iCAGD,EAFC,gCAED,EADC,yBACD;;AA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AA,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 discount: string | null;\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
|
+
{"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,EAHC,iCAGD,EAFC,gCAED,EADC,yBACD;;AAKAA,YAHC,iCAGD,EAFC,iCAED,EADC,+BACD;;AAKAA,YAHC,iCAGD,EAFC,iCAED,EADC,+BACD;;AAKAA,YAHC,iCAGD,EAFC,iCAED,EADC,+BACD;;AAMAA,YAJC,iCAID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,qB,GAAAA,qB;;AAMP,MAAOC,qBAAP,SAAqCJ,wBAArC,CAA6D;;QAAtDI,qB,GAAAA,qB;;AAQP,MAAOC,SAAP,CAAgB;;QAATA,S,GAAAA,S;;AAEXT,YADC,yBACD;;AAGI,MAAOU,cAAP,CAAqB;;QAAdA,c,GAAAA,c;;AAIXV,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,MAAOW,gBAAP,CAAuB;;QAAhBA,gB,GAAAA,gB;;AAGXX,YAFC,yBAED,EADC,4BAAOY,8BAAP,CACD;;AAIAZ,YAFC,yBAED,EADC,mCACD;;AAIAA,YAFC,yBAED,EADC,mCACD;;AAKAA,YAHC,yBAGD,EAFC,yBAED,EADC,gCACD","names":["CreateCommercialSetting","__decorate","message","CreateCommercialMail","CreateCommercialMailWithMultipleFiles","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 CreateCommercialMailWithMultipleFiles extends CreateCommercialMail {\n idsFile: number[];\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 discount: string | null;\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}"]}
|