@silexpert/core 0.4.200 → 0.4.202
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/Checklist.d.ts +20 -0
- package/es/api/resources/Checklist.d.ts.map +1 -0
- package/es/api/resources/Checklist.js +38 -0
- package/es/api/resources/Checklist.js.map +1 -0
- package/es/api/resources/GeneralLedger.d.ts +2 -1
- package/es/api/resources/GeneralLedger.d.ts.map +1 -1
- package/es/api/resources/GeneralLedger.js +3 -0
- package/es/api/resources/GeneralLedger.js.map +1 -1
- package/es/api/resources/Lettering.d.ts +7 -0
- package/es/api/resources/Lettering.d.ts.map +1 -0
- package/es/api/resources/Lettering.js +13 -0
- package/es/api/resources/Lettering.js.map +1 -0
- package/es/api/resources/Mobile.d.ts +6 -0
- package/es/api/resources/Mobile.d.ts.map +1 -0
- package/es/api/resources/Mobile.js +7 -0
- package/es/api/resources/Mobile.js.map +1 -0
- package/es/api/resources/Notification.d.ts +5 -0
- package/es/api/resources/Notification.d.ts.map +1 -0
- package/es/api/resources/Notification.js +7 -0
- package/es/api/resources/Notification.js.map +1 -0
- package/es/api/resources/Revision.d.ts +2 -1
- package/es/api/resources/Revision.d.ts.map +1 -1
- package/es/api/resources/Revision.js +3 -0
- package/es/api/resources/Revision.js.map +1 -1
- package/es/api/resources/Transaction.d.ts +5 -13
- package/es/api/resources/Transaction.d.ts.map +1 -1
- package/es/api/resources/Transaction.js +5 -0
- package/es/api/resources/Transaction.js.map +1 -1
- package/es/api/resources.d.ts +8 -0
- package/es/api/resources.d.ts.map +1 -1
- package/es/api/resources.js +8 -0
- package/es/api/resources.js.map +1 -1
- package/es/types/Enum/Account.d.ts +4 -0
- package/es/types/Enum/Account.d.ts.map +1 -1
- package/es/types/Enum/Account.js +4 -0
- package/es/types/Enum/Account.js.map +1 -1
- package/es/types/Enum/BrandClementine.d.ts +10 -0
- package/es/types/Enum/BrandClementine.d.ts.map +1 -1
- package/es/types/Enum/BrandClementine.js +5 -0
- package/es/types/Enum/BrandClementine.js.map +1 -1
- package/es/types/Enum/BrandComptalib.d.ts +6 -0
- package/es/types/Enum/BrandComptalib.d.ts.map +1 -1
- package/es/types/Enum/BrandComptalib.js +8 -0
- package/es/types/Enum/BrandComptalib.js.map +1 -1
- package/es/types/Enum/BrandLegalstart.d.ts +2 -0
- package/es/types/Enum/BrandLegalstart.d.ts.map +1 -1
- package/es/types/Enum/BrandLegalstart.js +2 -0
- package/es/types/Enum/BrandLegalstart.js.map +1 -1
- package/es/types/Enum/ChecklistType.d.ts +60 -0
- package/es/types/Enum/ChecklistType.d.ts.map +1 -0
- package/es/types/Enum/ChecklistType.js +64 -0
- package/es/types/Enum/ChecklistType.js.map +1 -0
- package/es/types/Enum/EstimateInvoice.d.ts +1 -1
- package/es/types/Enum/EstimateInvoice.d.ts.map +1 -1
- package/es/types/Enum/EstimateInvoice.js +9 -9
- package/es/types/Enum/EstimateInvoice.js.map +1 -1
- package/es/types/Enum/MailAuto.d.ts +3 -1
- package/es/types/Enum/MailAuto.d.ts.map +1 -1
- package/es/types/Enum/MailAuto.js +2 -0
- package/es/types/Enum/MailAuto.js.map +1 -1
- package/es/types/Enum/NotificationType.d.ts +5 -0
- package/es/types/Enum/NotificationType.d.ts.map +1 -0
- package/es/types/Enum/NotificationType.js +6 -0
- package/es/types/Enum/NotificationType.js.map +1 -0
- package/es/types/Interface/api/checklist/Query.d.ts +20 -0
- package/es/types/Interface/api/checklist/Query.d.ts.map +1 -0
- package/es/types/Interface/api/checklist/Query.js +59 -0
- package/es/types/Interface/api/checklist/Query.js.map +1 -0
- package/es/types/Interface/api/checklist/Read.d.ts +12 -0
- package/es/types/Interface/api/checklist/Read.d.ts.map +1 -0
- package/es/types/Interface/api/checklist/Read.js +2 -0
- package/es/types/Interface/api/checklist/Read.js.map +1 -0
- package/es/types/Interface/api/checklist/Update.d.ts +6 -0
- package/es/types/Interface/api/checklist/Update.d.ts.map +1 -0
- package/es/types/Interface/api/checklist/Update.js +25 -0
- package/es/types/Interface/api/checklist/Update.js.map +1 -0
- package/es/types/Interface/api/generalLedger/IGeneralLedgerAccountingEntry.d.ts +3 -1
- package/es/types/Interface/api/generalLedger/IGeneralLedgerAccountingEntry.d.ts.map +1 -1
- package/es/types/Interface/api/generalLedger/IGeneralLedgerAccountingEntry.js.map +1 -1
- package/es/types/Interface/api/generalLedger/IGeneralLedgerThirdParty.d.ts +10 -0
- package/es/types/Interface/api/generalLedger/IGeneralLedgerThirdParty.d.ts.map +1 -0
- package/es/types/Interface/api/generalLedger/IGeneralLedgerThirdParty.js +2 -0
- package/es/types/Interface/api/generalLedger/IGeneralLedgerThirdParty.js.map +1 -0
- package/es/types/Interface/api/generalLedger/QueryGeneralLedgerAuxiliary.d.ts +12 -0
- package/es/types/Interface/api/generalLedger/QueryGeneralLedgerAuxiliary.d.ts.map +1 -0
- package/es/types/Interface/api/generalLedger/QueryGeneralLedgerAuxiliary.js +63 -0
- package/es/types/Interface/api/generalLedger/QueryGeneralLedgerAuxiliary.js.map +1 -0
- package/es/types/Interface/api/lettering/QueryRegroupLettering.d.ts +4 -0
- package/es/types/Interface/api/lettering/QueryRegroupLettering.d.ts.map +1 -0
- package/es/types/Interface/api/lettering/QueryRegroupLettering.js +19 -0
- package/es/types/Interface/api/lettering/QueryRegroupLettering.js.map +1 -0
- package/es/types/Interface/api/mobile/UpdateMobile.d.ts +4 -0
- package/es/types/Interface/api/mobile/UpdateMobile.d.ts.map +1 -0
- package/es/types/Interface/api/mobile/UpdateMobile.js +17 -0
- package/es/types/Interface/api/mobile/UpdateMobile.js.map +1 -0
- package/es/types/Interface/api/notification/CreateNotification.d.ts +6 -0
- package/es/types/Interface/api/notification/CreateNotification.d.ts.map +1 -0
- package/es/types/Interface/api/notification/CreateNotification.js +22 -0
- package/es/types/Interface/api/notification/CreateNotification.js.map +1 -0
- package/es/types/Interface/api/revision/QueryRevisionApprobation.d.ts +7 -0
- package/es/types/Interface/api/revision/QueryRevisionApprobation.d.ts.map +1 -0
- package/es/types/Interface/api/revision/QueryRevisionApprobation.js +34 -0
- package/es/types/Interface/api/revision/QueryRevisionApprobation.js.map +1 -0
- package/es/types/Interface/api/revision/ReadRevisionAccount.d.ts +2 -2
- package/es/types/Interface/api/revision/ReadRevisionAccount.d.ts.map +1 -1
- package/es/types/Interface/api/revision/ReadRevisionAccount.js.map +1 -1
- package/es/types/Interface/api/society/ReadSociety.d.ts +4 -0
- package/es/types/Interface/api/society/ReadSociety.d.ts.map +1 -1
- package/es/types/Interface/api/society/ReadSociety.js.map +1 -1
- package/es/types/Interface/api/tax/ReadTax.d.ts +9 -0
- package/es/types/Interface/api/tax/ReadTax.d.ts.map +1 -1
- package/es/types/Interface/api/tax/ReadTax.js.map +1 -1
- package/es/types/Interface/models/IAccountDetail.d.ts +6 -6
- package/es/types/Interface/models/IAccountDetail.d.ts.map +1 -1
- package/es/types/Interface/models/IAccountDetail.js.map +1 -1
- package/es/types/Interface/models/IAccountingEntry.d.ts +1 -0
- package/es/types/Interface/models/IAccountingEntry.d.ts.map +1 -1
- package/es/types/Interface/models/IAccountingEntry.js.map +1 -1
- package/es/types/Interface/models/IAccountingTransaction.d.ts +0 -3
- package/es/types/Interface/models/IAccountingTransaction.d.ts.map +1 -1
- package/es/types/Interface/models/IAccountingTransaction.js.map +1 -1
- package/es/types/Interface/models/IApiError.d.ts +5 -1
- package/es/types/Interface/models/IApiError.d.ts.map +1 -1
- package/es/types/Interface/models/IApiError.js +4 -0
- package/es/types/Interface/models/IApiError.js.map +1 -1
- package/es/types/Interface/models/IChecklist.d.ts +13 -9
- package/es/types/Interface/models/IChecklist.d.ts.map +1 -1
- package/es/types/Interface/models/IChecklist.js.map +1 -1
- package/es/types/Interface/models/IChecklistDetail.d.ts +1 -0
- package/es/types/Interface/models/IChecklistDetail.d.ts.map +1 -1
- package/es/types/Interface/models/IChecklistDetail.js.map +1 -1
- package/es/types/Interface/models/IChecklistType.d.ts +7 -0
- package/es/types/Interface/models/IChecklistType.d.ts.map +1 -1
- package/es/types/Interface/models/IChecklistType.js.map +1 -1
- package/es/types/Interface/models/ILettering.d.ts +0 -2
- package/es/types/Interface/models/ILettering.d.ts.map +1 -1
- package/es/types/Interface/models/ILettering.js.map +1 -1
- package/es/types/Interface/models/IMobile.d.ts +11 -0
- package/es/types/Interface/models/IMobile.d.ts.map +1 -0
- package/es/types/Interface/models/IMobile.js +2 -0
- package/es/types/Interface/models/IMobile.js.map +1 -0
- package/es/types/Interface/models/ISociety.d.ts +4 -2
- package/es/types/Interface/models/ISociety.d.ts.map +1 -1
- package/es/types/Interface/models/ISociety.js.map +1 -1
- package/es/types/Interface/models/IUser.d.ts +2 -0
- package/es/types/Interface/models/IUser.d.ts.map +1 -1
- package/es/types/Interface/models/IUser.js.map +1 -1
- package/es/types/index.d.ts +13 -0
- package/es/types/index.d.ts.map +1 -1
- package/es/types/index.js +13 -0
- package/es/types/index.js.map +1 -1
- package/es/utils/checklist.d.ts +3 -0
- package/es/utils/checklist.d.ts.map +1 -0
- package/es/utils/checklist.js +37 -0
- package/es/utils/checklist.js.map +1 -0
- package/js/api/resources/Checklist.js +68 -0
- package/js/api/resources/Checklist.js.map +1 -0
- package/js/api/resources/GeneralLedger.js +6 -0
- package/js/api/resources/GeneralLedger.js.map +1 -1
- package/js/api/resources/Lettering.js +25 -0
- package/js/api/resources/Lettering.js.map +1 -0
- package/js/api/resources/Mobile.js +18 -0
- package/js/api/resources/Mobile.js.map +1 -0
- package/js/api/resources/Notification.js +18 -0
- package/js/api/resources/Notification.js.map +1 -0
- package/js/api/resources/Revision.js +4 -0
- package/js/api/resources/Revision.js.map +1 -1
- package/js/api/resources/Transaction.js +6 -0
- package/js/api/resources/Transaction.js.map +1 -1
- package/js/api/resources.js +13 -1
- package/js/api/resources.js.map +1 -1
- package/js/types/Enum/Account.js +4 -0
- package/js/types/Enum/Account.js.map +1 -1
- package/js/types/Enum/BrandClementine.js +5 -0
- package/js/types/Enum/BrandClementine.js.map +1 -1
- package/js/types/Enum/BrandComptalib.js +8 -0
- package/js/types/Enum/BrandComptalib.js.map +1 -1
- package/js/types/Enum/BrandLegalstart.js +2 -0
- package/js/types/Enum/BrandLegalstart.js.map +1 -1
- package/js/types/Enum/ChecklistType.js +76 -0
- package/js/types/Enum/ChecklistType.js.map +1 -0
- package/js/types/Enum/EstimateInvoice.js +9 -9
- package/js/types/Enum/EstimateInvoice.js.map +1 -1
- package/js/types/Enum/MailAuto.js +2 -0
- package/js/types/Enum/MailAuto.js.map +1 -1
- package/js/types/Enum/NotificationType.js +12 -0
- package/js/types/Enum/NotificationType.js.map +1 -0
- package/js/types/Interface/api/checklist/Query.js +57 -0
- package/js/types/Interface/api/checklist/Query.js.map +1 -0
- package/js/types/Interface/api/checklist/Read.js +6 -0
- package/js/types/Interface/api/checklist/Read.js.map +1 -0
- package/js/types/Interface/api/checklist/Update.js +33 -0
- package/js/types/Interface/api/checklist/Update.js.map +1 -0
- package/js/types/Interface/api/generalLedger/IGeneralLedgerThirdParty.js +6 -0
- package/js/types/Interface/api/generalLedger/IGeneralLedgerThirdParty.js.map +1 -0
- package/js/types/Interface/api/generalLedger/QueryGeneralLedgerAuxiliary.js +54 -0
- package/js/types/Interface/api/generalLedger/QueryGeneralLedgerAuxiliary.js.map +1 -0
- package/js/types/Interface/api/lettering/QueryRegroupLettering.js +29 -0
- package/js/types/Interface/api/lettering/QueryRegroupLettering.js.map +1 -0
- package/js/types/Interface/api/mobile/UpdateMobile.js +27 -0
- package/js/types/Interface/api/mobile/UpdateMobile.js.map +1 -0
- package/js/types/Interface/api/notification/CreateNotification.js +31 -0
- package/js/types/Interface/api/notification/CreateNotification.js.map +1 -0
- package/js/types/Interface/api/revision/QueryRevisionApprobation.js +35 -0
- package/js/types/Interface/api/revision/QueryRevisionApprobation.js.map +1 -0
- package/js/types/Interface/models/IApiError.js +4 -0
- package/js/types/Interface/models/IApiError.js.map +1 -1
- package/js/types/Interface/models/IMobile.js +6 -0
- package/js/types/Interface/models/IMobile.js.map +1 -0
- package/js/types/index.js +156 -0
- package/js/types/index.js.map +1 -1
- package/js/utils/checklist.js +48 -0
- package/js/utils/checklist.js.map +1 -0
- package/package.json +1 -1
- package/ts/api/resources/Checklist.ts +51 -0
- package/ts/api/resources/GeneralLedger.ts +5 -1
- package/ts/api/resources/Lettering.ts +15 -0
- package/ts/api/resources/Mobile.ts +8 -0
- package/ts/api/resources/Notification.ts +7 -0
- package/ts/api/resources/Revision.ts +6 -0
- package/ts/api/resources/Transaction.ts +10 -14
- package/ts/api/resources.ts +8 -0
- package/ts/types/Enum/Account.ts +4 -0
- package/ts/types/Enum/BrandClementine.ts +5 -0
- package/ts/types/Enum/BrandComptalib.ts +8 -0
- package/ts/types/Enum/BrandLegalstart.ts +2 -0
- package/ts/types/Enum/ChecklistType.ts +62 -0
- package/ts/types/Enum/EstimateInvoice.ts +1 -1
- package/ts/types/Enum/MailAuto.ts +2 -0
- package/ts/types/Enum/NotificationType.ts +4 -0
- package/ts/types/Interface/api/checklist/Query.ts +51 -0
- package/ts/types/Interface/api/checklist/Read.ts +10 -0
- package/ts/types/Interface/api/checklist/Update.ts +13 -0
- package/ts/types/Interface/api/generalLedger/IGeneralLedgerAccountingEntry.ts +3 -1
- package/ts/types/Interface/api/generalLedger/IGeneralLedgerThirdParty.ts +10 -0
- package/ts/types/Interface/api/generalLedger/QueryGeneralLedgerAuxiliary.ts +47 -0
- package/ts/types/Interface/api/lettering/QueryRegroupLettering.ts +8 -0
- package/ts/types/Interface/api/mobile/UpdateMobile.ts +6 -0
- package/ts/types/Interface/api/notification/CreateNotification.ts +10 -0
- package/ts/types/Interface/api/revision/QueryRevisionApprobation.ts +22 -0
- package/ts/types/Interface/api/revision/ReadRevisionAccount.ts +2 -2
- package/ts/types/Interface/api/society/ReadSociety.ts +5 -0
- package/ts/types/Interface/api/tax/ReadTax.ts +8 -1
- package/ts/types/Interface/models/IAccountDetail.ts +6 -6
- package/ts/types/Interface/models/IAccountingEntry.ts +1 -0
- package/ts/types/Interface/models/IAccountingTransaction.ts +0 -3
- package/ts/types/Interface/models/IApiError.ts +5 -0
- package/ts/types/Interface/models/IChecklist.ts +13 -9
- package/ts/types/Interface/models/IChecklistDetail.ts +1 -0
- package/ts/types/Interface/models/IChecklistType.ts +7 -0
- package/ts/types/Interface/models/ILettering.ts +0 -2
- package/ts/types/Interface/models/IMobile.ts +13 -0
- package/ts/types/Interface/models/ISociety.ts +4 -2
- package/ts/types/Interface/models/IUser.ts +2 -0
- package/ts/types/index.ts +13 -0
- package/ts/utils/checklist.ts +43 -0
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.getAllBlockingIssues = getAllBlockingIssues;
|
|
7
|
+
|
|
8
|
+
var _types = require("../types");
|
|
9
|
+
|
|
10
|
+
function getAllBlockingIssues(checklist, meta) {
|
|
11
|
+
const {
|
|
12
|
+
questionsList,
|
|
13
|
+
answers
|
|
14
|
+
} = meta;
|
|
15
|
+
const blockingQuestions = questionsList.filter(q => checklist.type === _types.ChecklistTypeEnum.REINFORCED ? q.isBlockingReinforced : checklist.type === _types.ChecklistTypeEnum.DEFAULT ? q.isBlockingSimple : false);
|
|
16
|
+
const blockingIssues = [];
|
|
17
|
+
blockingQuestions.forEach(question => {
|
|
18
|
+
const answer = answers.find(a => a.idTypeChecklist === question.id);
|
|
19
|
+
|
|
20
|
+
if (!answer) {
|
|
21
|
+
blockingIssues.push(question);
|
|
22
|
+
} else if (question.name === _types.ChecklistDetailName.ACTION_TAKEN) {
|
|
23
|
+
// Comptes bancaires actifs synchronisés ?
|
|
24
|
+
const questionForAreAllBankAccountsSynchronized = questionsList.find(q => q.name === _types.ChecklistDetailName.ARE_ALL_BANK_ACCOUNTS_SYNCHRONIZED);
|
|
25
|
+
const answerForAreAllBankAccountsSynchronized = answers.find(a => a.idTypeChecklist && a.idTypeChecklist === (questionForAreAllBankAccountsSynchronized === null || questionForAreAllBankAccountsSynchronized === void 0 ? void 0 : questionForAreAllBankAccountsSynchronized.id)); // Applicatin annotée à 80/100% ?
|
|
26
|
+
|
|
27
|
+
const questionForAnnoted = questionsList.find(q => q.name === (checklist.type === _types.ChecklistTypeEnum.REINFORCED ? _types.ChecklistDetailName.FULLY_ANNOTED : _types.ChecklistDetailName.ALMOST_ANNOTED));
|
|
28
|
+
const answerForAnnoted = answers.find(a => a.idTypeChecklist && a.idTypeChecklist === (questionForAnnoted === null || questionForAnnoted === void 0 ? void 0 : questionForAnnoted.id));
|
|
29
|
+
|
|
30
|
+
if ((!(answerForAnnoted === null || answerForAnnoted === void 0 ? void 0 : answerForAnnoted.value) || answerForAnnoted.value === '0' || !(answerForAreAllBankAccountsSynchronized === null || answerForAreAllBankAccountsSynchronized === void 0 ? void 0 : answerForAreAllBankAccountsSynchronized.value) || answerForAreAllBankAccountsSynchronized.value === '0') && (answer.value === '2' || answer.value === '0' || !answer.value || answer.value === '')) {
|
|
31
|
+
blockingIssues.push(question);
|
|
32
|
+
}
|
|
33
|
+
} else if (question.name === _types.ChecklistDetailName.HAS_JUSTIFIED_CONTRIBUTIONS) {
|
|
34
|
+
const questionForComment = questionsList.find(q => q.name === _types.ChecklistDetailName.COMMENTS);
|
|
35
|
+
const comment = answers.find(a => a.idTypeChecklist && a.idTypeChecklist === (questionForComment === null || questionForComment === void 0 ? void 0 : questionForComment.id));
|
|
36
|
+
|
|
37
|
+
if (!answer.value || answer.value === '0' || answer.value === '1' && (!(comment === null || comment === void 0 ? void 0 : comment.value) || (comment === null || comment === void 0 ? void 0 : comment.value) === '')) {
|
|
38
|
+
blockingIssues.push(question);
|
|
39
|
+
}
|
|
40
|
+
} else if ([_types.ChecklistDetailType.SELECT, _types.ChecklistDetailType.SWITCH].includes(question.type)) {
|
|
41
|
+
if (!answer.value || answer.value === '0') {
|
|
42
|
+
blockingIssues.push(question);
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
});
|
|
46
|
+
return blockingIssues;
|
|
47
|
+
}
|
|
48
|
+
//# sourceMappingURL=checklist.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"checklist.js","mappings":"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","names":["getAllBlockingIssues","checklist","meta","questionsList","answers","blockingQuestions","filter","q","type","ChecklistTypeEnum","REINFORCED","isBlockingReinforced","DEFAULT","isBlockingSimple","blockingIssues","forEach","question","answer","find","a","idTypeChecklist","id","push","name","ChecklistDetailName","ACTION_TAKEN","questionForAreAllBankAccountsSynchronized","ARE_ALL_BANK_ACCOUNTS_SYNCHRONIZED","answerForAreAllBankAccountsSynchronized","questionForAnnoted","FULLY_ANNOTED","ALMOST_ANNOTED","answerForAnnoted","value","HAS_JUSTIFIED_CONTRIBUTIONS","questionForComment","COMMENTS","comment","ChecklistDetailType","SELECT","SWITCH","includes"],"sourceRoot":"","sources":["../../ts/utils/checklist.ts"],"sourcesContent":["import {\n ChecklistDetailName, ChecklistDetailType, ChecklistTypeEnum, IChecklist, IChecklistType, QueryGetAllBlockingIssues,\n} from '../types';\n\nexport function getAllBlockingIssues(checklist: IChecklist, meta: QueryGetAllBlockingIssues): IChecklistType[] {\n const { questionsList, answers } = meta;\n\n const blockingQuestions = questionsList.filter((q) => (checklist.type === ChecklistTypeEnum.REINFORCED ? q.isBlockingReinforced : checklist.type === ChecklistTypeEnum.DEFAULT ? q.isBlockingSimple : false));\n const blockingIssues: IChecklistType[] = [];\n\n blockingQuestions.forEach((question) => {\n const answer = answers.find((a) => a.idTypeChecklist === question.id);\n\n if (!answer) {\n blockingIssues.push(question);\n } else if (question.name === ChecklistDetailName.ACTION_TAKEN) {\n // Comptes bancaires actifs synchronisés ?\n const questionForAreAllBankAccountsSynchronized = questionsList.find((q) => q.name === ChecklistDetailName.ARE_ALL_BANK_ACCOUNTS_SYNCHRONIZED);\n const answerForAreAllBankAccountsSynchronized = answers.find((a) => a.idTypeChecklist && a.idTypeChecklist === questionForAreAllBankAccountsSynchronized?.id);\n\n // Applicatin annotée à 80/100% ?\n const questionForAnnoted = questionsList.find((q) => q.name === (checklist.type === ChecklistTypeEnum.REINFORCED ? ChecklistDetailName.FULLY_ANNOTED : ChecklistDetailName.ALMOST_ANNOTED));\n const answerForAnnoted = answers.find((a) => a.idTypeChecklist && a.idTypeChecklist === questionForAnnoted?.id);\n\n if ((!answerForAnnoted?.value || answerForAnnoted.value === '0' || !answerForAreAllBankAccountsSynchronized?.value || answerForAreAllBankAccountsSynchronized.value === '0') && (answer.value === '2' || answer.value === '0' || !answer.value || answer.value === '')) {\n blockingIssues.push(question);\n }\n } else if (question.name === ChecklistDetailName.HAS_JUSTIFIED_CONTRIBUTIONS) {\n const questionForComment = questionsList.find((q) => q.name === ChecklistDetailName.COMMENTS);\n const comment = answers.find((a) => a.idTypeChecklist && a.idTypeChecklist === questionForComment?.id);\n\n if (!answer.value || answer.value === '0' || (answer.value === '1' && (!comment?.value || comment?.value === ''))) {\n blockingIssues.push(question);\n }\n } else if ([ChecklistDetailType.SELECT as string, ChecklistDetailType.SWITCH].includes(question.type)) {\n if (!answer.value || answer.value === '0') {\n blockingIssues.push(question);\n }\n }\n });\n\n return blockingIssues;\n}\n"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@silexpert/core",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.202",
|
|
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",
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import {
|
|
2
|
+
IChecklist, IChecklistType, QueryGetAllBlockingIssues, QueryGetAllDeadlines, QueryGetAllQuestions, ReadChecklistDeadline, UpdateAnswer,
|
|
3
|
+
} from '../../types';
|
|
4
|
+
import { getAllBlockingIssues } from '../../utils/checklist';
|
|
5
|
+
import { Resource } from '../Resource';
|
|
6
|
+
|
|
7
|
+
export class Checklist extends Resource {
|
|
8
|
+
getAllDeadlines(params: QueryGetAllDeadlines): Promise<ReadChecklistDeadline[]> {
|
|
9
|
+
return this.axios.$get('/checklists/deadlines', { params });
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
get(id: number): Promise<IChecklist | null> {
|
|
13
|
+
return this.axios.$get(`/checklists/${id}`);
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
getToComplete(idSociety: number): Promise<ReadChecklistDeadline> {
|
|
17
|
+
return this.axios.$get('/checklists/to-complete', { params: { idSociety } });
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
create(payload: IChecklist): Promise<IChecklist> {
|
|
21
|
+
return this.axios.$post('/checklists', payload);
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
update(id: number, payload: Partial<IChecklist>) {
|
|
25
|
+
return this.axios.$put(`/checklists/${id}`, payload);
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
getAllErrors(checklist: IChecklist, meta: QueryGetAllBlockingIssues): IChecklistType[] {
|
|
29
|
+
return getAllBlockingIssues(checklist, meta);
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
/**
|
|
33
|
+
* QUESTIONS
|
|
34
|
+
*/
|
|
35
|
+
|
|
36
|
+
getAllQuestions(params: QueryGetAllQuestions): Promise<IChecklistType[]> {
|
|
37
|
+
return this.axios.$get('/checklists/questions', { params });
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
/**
|
|
41
|
+
* ANSWERS
|
|
42
|
+
*/
|
|
43
|
+
|
|
44
|
+
updateAnswers(id: number, payload: UpdateAnswer[]): Promise<boolean> {
|
|
45
|
+
return this.axios.$post(`/checklists/${id}/answers`, payload);
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
synchronize(id: number) {
|
|
49
|
+
return this.axios.$post(`/checklists/${id}/answers`);
|
|
50
|
+
}
|
|
51
|
+
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { BasePaginateInterface, IGeneralLedgerAccount } from '../../types';
|
|
1
|
+
import { BasePaginateInterface, IGeneralLedgerAccount, IGeneralLedgerThirdParty } from '../../types';
|
|
2
2
|
import { QueryGeneralLedger } from '../../types/Interface/api/generalLedger/QueryGeneralLedger';
|
|
3
3
|
import { Resource } from '../Resource';
|
|
4
4
|
|
|
@@ -54,4 +54,8 @@ export class GeneralLedger extends Resource {
|
|
|
54
54
|
},
|
|
55
55
|
});
|
|
56
56
|
}
|
|
57
|
+
|
|
58
|
+
getAuxiliary(params: QueryGeneralLedger): Promise<BasePaginateInterface<IGeneralLedgerThirdParty[]>> {
|
|
59
|
+
return this.axios.$get('/generalLedger/auxiliary', { params });
|
|
60
|
+
}
|
|
57
61
|
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { IAccountingEntry, QueryRegroupLettering } from '../../types';
|
|
2
|
+
import { Resource } from '../Resource';
|
|
3
|
+
|
|
4
|
+
export class Lettering extends Resource {
|
|
5
|
+
delete(idAccountingTransaction: number, idAccountingEntry: number): Promise<IAccountingEntry[]> {
|
|
6
|
+
const params: Partial<IAccountingEntry> = {
|
|
7
|
+
idLettering: null,
|
|
8
|
+
};
|
|
9
|
+
return this.axios.$put(`/transactions/${idAccountingTransaction}/entries/${idAccountingEntry}`, params);
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
regroup(params: QueryRegroupLettering): Promise<IAccountingEntry[]> {
|
|
13
|
+
return this.axios.$post('/generalLedger/auxiliary', params);
|
|
14
|
+
}
|
|
15
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { IMobile, UpdateMobileForm } from '../..';
|
|
2
|
+
import { Resource } from '../Resource';
|
|
3
|
+
|
|
4
|
+
export class Mobile extends Resource {
|
|
5
|
+
createMobileToken(userId: number, payload: UpdateMobileForm): Promise<IMobile> {
|
|
6
|
+
return this.axios.$put(`/mobiles/${userId}`, payload);
|
|
7
|
+
}
|
|
8
|
+
}
|
|
@@ -5,6 +5,8 @@ import {
|
|
|
5
5
|
ReadRevisionMergeIntoAccount,
|
|
6
6
|
QueryRevisionSearchEntries,
|
|
7
7
|
QueryRevisionPaginate,
|
|
8
|
+
IAccountingTransaction,
|
|
9
|
+
QueryRevisionApprobation,
|
|
8
10
|
} from '../..';
|
|
9
11
|
|
|
10
12
|
export class Revision extends Resource {
|
|
@@ -31,4 +33,8 @@ export class Revision extends Resource {
|
|
|
31
33
|
mergeIntoAccount(idAccount: number, bodyParams: QueryRevisionMergeIntoAccount): Promise<ReadRevisionMergeIntoAccount> {
|
|
32
34
|
return this.axios.$post(`/revisions/merge-into-account/${idAccount}`, bodyParams);
|
|
33
35
|
}
|
|
36
|
+
|
|
37
|
+
approve(id: number, params: QueryRevisionApprobation): Promise<IAccountingTransaction[]> {
|
|
38
|
+
return this.axios.$post(`/revisions/accounts/${id}/approve`, params);
|
|
39
|
+
}
|
|
34
40
|
}
|
|
@@ -1,38 +1,34 @@
|
|
|
1
1
|
import { Resource } from '../Resource';
|
|
2
2
|
import {
|
|
3
|
-
AccountingJournal,
|
|
4
3
|
BasePaginate,
|
|
5
|
-
|
|
4
|
+
ReadFormattedAccountingTransaction, UpdateAccountingTransaction, DeleteTransactions, QueryUnexport, QueryGetAllTransactions, IAccountingTransaction, ReadAccountantBalance, CreateManualEntry, IAccountingEntry, QueryDeleteInvoices, ReadDeletedInvoices, QuerySocietyTransactionCount, ReadSocietyTransactionCount, ReadBankAccountSum, QueryBankAccountSum, QueryTransaction,
|
|
6
5
|
} from '../../types';
|
|
7
6
|
|
|
8
7
|
export class Transaction extends Resource {
|
|
9
|
-
getFormattedPaginate(idSociety: number, params: {
|
|
10
|
-
idAccountingJournal: AccountingJournal,
|
|
11
|
-
idBankAccount?: Array<number>,
|
|
12
|
-
orderBy?: string,
|
|
13
|
-
descending?: boolean,
|
|
14
|
-
startDate?: string,
|
|
15
|
-
endDate?: string,
|
|
16
|
-
onlyDebit?: boolean
|
|
17
|
-
onlyCredit?: boolean
|
|
18
|
-
} & QueryPaginate): Promise<BasePaginate<ReadFormattedAccountingTransaction> | Error> {
|
|
8
|
+
getFormattedPaginate(idSociety: number, params: QueryTransaction): Promise<BasePaginate<ReadFormattedAccountingTransaction>> {
|
|
19
9
|
return this.axios.$get(`/society/${idSociety}/transactions`, {
|
|
20
10
|
params,
|
|
21
11
|
});
|
|
22
12
|
}
|
|
13
|
+
|
|
14
|
+
export(idSociety: number, params: QueryTransaction): Promise<BasePaginate<ReadFormattedAccountingTransaction>> {
|
|
15
|
+
return this.axios.$get(`/society/${idSociety}/transactions/export`, {
|
|
16
|
+
params,
|
|
17
|
+
});
|
|
18
|
+
}
|
|
23
19
|
getAll(idSociety: number, query: QueryGetAllTransactions): Promise<IAccountingTransaction[]> {
|
|
24
20
|
return this.axios.$get(`/society/${idSociety}/transactions/list`, { params: query });
|
|
25
21
|
}
|
|
26
22
|
unexport(idSociety: number, params: QueryUnexport): Promise<void> {
|
|
27
23
|
return this.axios.$put(`/society/${idSociety}/transactions/unexport`, params);
|
|
28
24
|
}
|
|
29
|
-
annotate(id: number, data: UpdateAccountingTransaction): Promise<ReadFormattedAccountingTransaction
|
|
25
|
+
annotate(id: number, data: UpdateAccountingTransaction): Promise<ReadFormattedAccountingTransaction> {
|
|
30
26
|
return this.axios.$put(`/transactions/${id}`, data);
|
|
31
27
|
}
|
|
32
28
|
delete(idSociety: number, id: number): Promise<number> {
|
|
33
29
|
return this.axios.$delete(`/society/${idSociety}/transaction/${id}`);
|
|
34
30
|
}
|
|
35
|
-
deleteTransactions(id: number, data: DeleteTransactions): Promise<number
|
|
31
|
+
deleteTransactions(id: number, data: DeleteTransactions): Promise<number> {
|
|
36
32
|
return this.axios.$delete(`/bankAccount/${id}/transactions`, { params: data });
|
|
37
33
|
}
|
|
38
34
|
|
package/ts/api/resources.ts
CHANGED
|
@@ -72,6 +72,10 @@ import { Mail } from './resources/Mail';
|
|
|
72
72
|
import { Employee } from './resources/Employee';
|
|
73
73
|
import { SheetMonthSchedule } from './resources/SheetMonthSchedule';
|
|
74
74
|
import { NafCode } from './resources/NafCode';
|
|
75
|
+
import { Checklist } from './resources/Checklist';
|
|
76
|
+
import { Lettering } from './resources/Lettering';
|
|
77
|
+
import { Notification } from './resources/Notification';
|
|
78
|
+
import { Mobile } from './resources/Mobile';
|
|
75
79
|
|
|
76
80
|
export const resources = {
|
|
77
81
|
simulation: Simulation,
|
|
@@ -148,4 +152,8 @@ export const resources = {
|
|
|
148
152
|
employee: Employee,
|
|
149
153
|
sheetMonthSchedule: SheetMonthSchedule,
|
|
150
154
|
nafCode: NafCode,
|
|
155
|
+
checklist: Checklist,
|
|
156
|
+
lettering: Lettering,
|
|
157
|
+
mobile: Mobile,
|
|
158
|
+
notification: Notification,
|
|
151
159
|
};
|
package/ts/types/Enum/Account.ts
CHANGED
|
@@ -2,6 +2,8 @@ export const BrandClementine = [
|
|
|
2
2
|
{
|
|
3
3
|
idTypeBrand: 1,
|
|
4
4
|
name: 'Clementine',
|
|
5
|
+
urlS3: 'https://s3.eu-west-3.amazonaws.com/resources-clementine/',
|
|
6
|
+
logoS3: 'config/72030539-45a0-57fb-a7bb-e151e7d2721b.svg',
|
|
5
7
|
colors: {
|
|
6
8
|
primary: '#ff7e3c',
|
|
7
9
|
},
|
|
@@ -76,6 +78,7 @@ export const BrandClementine = [
|
|
|
76
78
|
{
|
|
77
79
|
idTypeBrand: 2,
|
|
78
80
|
name: 'Legalstart',
|
|
81
|
+
urlS3: 'https://s3.eu-west-3.amazonaws.com/resources-clementine/',
|
|
79
82
|
colors: {
|
|
80
83
|
primary: '#16a974',
|
|
81
84
|
},
|
|
@@ -165,6 +168,8 @@ export const BrandClementine = [
|
|
|
165
168
|
{
|
|
166
169
|
idTypeBrand: 4,
|
|
167
170
|
name: 'Pourcentage',
|
|
171
|
+
urlS3: 'https://s3.eu-west-3.amazonaws.com/resources-clementine/',
|
|
172
|
+
logoS3: 'config/pourcentage-logo.png',
|
|
168
173
|
colors: {
|
|
169
174
|
primary: '#1e6f5c',
|
|
170
175
|
},
|
|
@@ -2,6 +2,8 @@ export const BrandComptalib = [
|
|
|
2
2
|
{
|
|
3
3
|
idTypeBrand: 1,
|
|
4
4
|
name: 'Comptalib',
|
|
5
|
+
urlS3: 'https://s3.eu-west-3.amazonaws.com/resources-comptalib/',
|
|
6
|
+
logoS3: 'config/72030539-45a0-57fb-a7bb-e151e7d2721b.svg',
|
|
5
7
|
colors: {
|
|
6
8
|
primary: '#1656ff',
|
|
7
9
|
},
|
|
@@ -52,6 +54,8 @@ export const BrandComptalib = [
|
|
|
52
54
|
},
|
|
53
55
|
{
|
|
54
56
|
idTypeBrand: 2,
|
|
57
|
+
urlS3: 'https://s3.eu-west-3.amazonaws.com/resources-comptalib/',
|
|
58
|
+
logoS3: 'config/pourcentage-logo.png',
|
|
55
59
|
name: 'Pourcentage',
|
|
56
60
|
colors: {
|
|
57
61
|
primary: '#1e6f5c',
|
|
@@ -128,6 +132,8 @@ export const BrandComptalib = [
|
|
|
128
132
|
{
|
|
129
133
|
idTypeBrand: 3,
|
|
130
134
|
name: 'Le Comptable Français',
|
|
135
|
+
urlS3: 'https://s3.eu-west-3.amazonaws.com/resources-comptalib/',
|
|
136
|
+
logoS3: 'config/le-comptable-francais-logo.png',
|
|
131
137
|
colors: {
|
|
132
138
|
primary: '#191237',
|
|
133
139
|
},
|
|
@@ -200,6 +206,8 @@ export const BrandComptalib = [
|
|
|
200
206
|
{
|
|
201
207
|
idTypeBrand: 4,
|
|
202
208
|
name: 'AEC54',
|
|
209
|
+
urlS3: 'https://s3.eu-west-3.amazonaws.com/resources-comptalib/',
|
|
210
|
+
logoS3: 'config/logo-aec.png',
|
|
203
211
|
colors: {
|
|
204
212
|
primary: '#6900AE',
|
|
205
213
|
},
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
export enum ChecklistTypeEnum {
|
|
2
|
+
OBSOLETE = 0,
|
|
3
|
+
DEFAULT = 1,
|
|
4
|
+
REINFORCED = 2,
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
export enum ChecklistDetailName {
|
|
8
|
+
IS_INVOICING_UP_TO_DATE = 'isInvoicingUpToDate',
|
|
9
|
+
ARE_ALL_BANK_ACCOUNTS_SYNCHRONIZED = 'areAllBankAccountsSynchronized',
|
|
10
|
+
ALMOST_ANNOTED = 'almostAnnoted',
|
|
11
|
+
FULLY_ANNOTED = 'fullyAnnoted',
|
|
12
|
+
ACTION_TAKEN = 'actionTaken',
|
|
13
|
+
HAS_RENT_DOCUMENT = 'hasRentDocument',
|
|
14
|
+
HAS_DEBTS_DOCUMENT = 'hasDebtsDocument',
|
|
15
|
+
HAS_LOAN_DOCUMENT = 'hasLoanDocument',
|
|
16
|
+
HAS_INSURANCE_DOCUMENT = 'hasInsuranceDocument',
|
|
17
|
+
HAS_SUBSIDIES_DOCUMENT = 'hasSubsidiesDocument',
|
|
18
|
+
HAS_CASH_APPROVED = 'hasCashApproved',
|
|
19
|
+
HAS_CA3 = 'hasCA3',
|
|
20
|
+
HAS_GESCOM = 'hasGESCOM',
|
|
21
|
+
HAS_POLICE = 'hasPolice',
|
|
22
|
+
HAS_TNS = 'hasTNS',
|
|
23
|
+
HAS_ACCOUNT_STATEMENT = 'hasAccountStatement',
|
|
24
|
+
HAS_CURRENT_ACCOUNT_TO_VALID = 'hasCurrentAccountToValid',
|
|
25
|
+
HAS_JUSTIFIED_CONTRIBUTIONS = 'hasJustifiedContributions',
|
|
26
|
+
HAS_CUSTOMER_CARD_UP_TO_DATE = 'hasCustomerCardUpToDate',
|
|
27
|
+
HAS_LAST_YEAR_INTEGRATED = 'hasLastYearIntegrated',
|
|
28
|
+
HAS_VAT_BALANCE_JUSTIFIED = 'hasVatBalanceJustified',
|
|
29
|
+
HAS_TREATED_AMOUNT = 'hasTreatedAmount',
|
|
30
|
+
HAS_CLEARED_INTERNAL_TRANSFER = 'hasClearedInternalTransfer',
|
|
31
|
+
HAS_INSERT_ORI = 'hasInsertORI',
|
|
32
|
+
HAS_VAT_CHECKED = 'hasVatChecked',
|
|
33
|
+
HAS_CONSISTENCY_CHECK = 'hasConsistencyCheck',
|
|
34
|
+
IS_VAT_REGULATION_DONE = 'isVatRegulationDone',
|
|
35
|
+
IS_WAITING_ACCOUNT_RESET = 'isWaitingAccountReset',
|
|
36
|
+
HAS_BALANCE_TREATED = 'hasBalanceTreated',
|
|
37
|
+
DATA_ARE_REVISED = 'dataAreRevised',
|
|
38
|
+
HAS_BANK_ACCOUNT_CLOSED = 'hasBankAccountClosed',
|
|
39
|
+
HAS_SHEET_MONTH_SCHEDULE_ON_CADOR = 'hasSheetMonthScheduleOnCador',
|
|
40
|
+
HAS_REVIEWED_IMMOBILISATIONS = 'hasReviewedImmobilisations',
|
|
41
|
+
HAS_SEND_TECHNICAL_DOCUMENT = 'hasSendTechnicalDocument',
|
|
42
|
+
COMMENTS = 'comments',
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
export enum ChecklistDetailValue {
|
|
46
|
+
YES = 1,
|
|
47
|
+
NO = 0,
|
|
48
|
+
NA = 2,
|
|
49
|
+
MAIL = 3,
|
|
50
|
+
WAITING_SUPPORT_TICKET = 4,
|
|
51
|
+
LRAR = 5,
|
|
52
|
+
CALL = 6,
|
|
53
|
+
PERSONAL_TAX_NOTICE = 7,
|
|
54
|
+
SAVINGS_STATEMENT = 8,
|
|
55
|
+
SHEET_MONTH_SCHEDULE = 9,
|
|
56
|
+
OTHER = 10,
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
export enum ChecklistDetailType {
|
|
60
|
+
SELECT = 'select',
|
|
61
|
+
SWITCH = 'switch',
|
|
62
|
+
}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import {
|
|
2
|
+
IsBoolean,
|
|
3
|
+
IsDateString, IsEnum, IsNumber, IsOptional, IsPositive,
|
|
4
|
+
} from 'class-validator';
|
|
5
|
+
import { ApiProperty, ApiPropertyOptional } from '../../../../utils';
|
|
6
|
+
import { ToBoolean } from '../../../../utils/transforms/boolean.transform';
|
|
7
|
+
import { ChecklistTypeEnum } from '../../../Enum/ChecklistType';
|
|
8
|
+
import { IChecklistDetail } from '../../models/IChecklistDetail';
|
|
9
|
+
import { IChecklistType } from '../../models/IChecklistType';
|
|
10
|
+
|
|
11
|
+
export class QueryGetAllDeadlines {
|
|
12
|
+
@ApiProperty()
|
|
13
|
+
@IsNumber()
|
|
14
|
+
@IsPositive()
|
|
15
|
+
idSociety: number;
|
|
16
|
+
|
|
17
|
+
@ApiPropertyOptional()
|
|
18
|
+
@IsDateString()
|
|
19
|
+
@IsOptional()
|
|
20
|
+
minDate?: string;
|
|
21
|
+
|
|
22
|
+
@ApiPropertyOptional()
|
|
23
|
+
@IsDateString()
|
|
24
|
+
@IsOptional()
|
|
25
|
+
maxDate?: string;
|
|
26
|
+
|
|
27
|
+
@ApiPropertyOptional({ description: 'Retrieve deadlines by exercices date' })
|
|
28
|
+
@IsBoolean()
|
|
29
|
+
@ToBoolean()
|
|
30
|
+
@IsOptional()
|
|
31
|
+
byExercices?: boolean;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
export class QueryGetAllQuestions {
|
|
35
|
+
@ApiPropertyOptional()
|
|
36
|
+
@IsOptional()
|
|
37
|
+
@IsEnum(ChecklistTypeEnum)
|
|
38
|
+
type?: ChecklistTypeEnum;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
export class QueryGetAllBlockingIssues {
|
|
42
|
+
questionsList: IChecklistType[];
|
|
43
|
+
answers: IChecklistDetail[];
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
export class QueryGetToComplete {
|
|
47
|
+
@ApiProperty()
|
|
48
|
+
@IsNumber()
|
|
49
|
+
@IsPositive()
|
|
50
|
+
idSociety: number;
|
|
51
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { ChecklistDetailValue } from '../../../Enum/ChecklistType';
|
|
2
|
+
import { IChecklist } from '../../models/IChecklist';
|
|
3
|
+
|
|
4
|
+
export type ReadChecklistDeadline = {
|
|
5
|
+
date: string;
|
|
6
|
+
isReinforced: boolean;
|
|
7
|
+
checklist: IChecklist | null;
|
|
8
|
+
};
|
|
9
|
+
|
|
10
|
+
export type ReadValue = { name: string; value: ChecklistDetailValue | null };
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { IsEnum, IsString } from 'class-validator';
|
|
2
|
+
import { ApiProperty } from '../../../../utils';
|
|
3
|
+
import { ChecklistDetailValue } from '../../../Enum/ChecklistType';
|
|
4
|
+
|
|
5
|
+
export class UpdateAnswer {
|
|
6
|
+
@ApiProperty()
|
|
7
|
+
@IsString()
|
|
8
|
+
name: string;
|
|
9
|
+
|
|
10
|
+
@ApiProperty()
|
|
11
|
+
@IsEnum(ChecklistDetailValue)
|
|
12
|
+
value: ChecklistDetailValue;
|
|
13
|
+
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AccountingJournal } from '../../..';
|
|
1
|
+
import { AccountingJournal, ILettering, IThirdParty } from '../../..';
|
|
2
2
|
|
|
3
3
|
export interface IGeneralLedgerAccountingEntry {
|
|
4
4
|
designation: string
|
|
@@ -8,5 +8,7 @@ export interface IGeneralLedgerAccountingEntry {
|
|
|
8
8
|
credit: number
|
|
9
9
|
debit: number
|
|
10
10
|
intermediateSolde: number
|
|
11
|
+
thirdParty?: IThirdParty;
|
|
12
|
+
lettering?: ILettering;
|
|
11
13
|
exported?: Date
|
|
12
14
|
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { IGeneralLedgerAccountingEntry } from './IGeneralLedgerAccountingEntry';
|
|
2
|
+
|
|
3
|
+
export interface IGeneralLedgerThirdParty {
|
|
4
|
+
idThirdParty: number
|
|
5
|
+
name: string,
|
|
6
|
+
totalCredit: number
|
|
7
|
+
totalDebit: number
|
|
8
|
+
totalSolde: number
|
|
9
|
+
entries: IGeneralLedgerAccountingEntry[]
|
|
10
|
+
}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import {
|
|
2
|
+
IsBoolean, IsEnum, IsInt, IsOptional, IsString, Min,
|
|
3
|
+
} from 'class-validator';
|
|
4
|
+
import { ApiProperty, ApiPropertyOptional } from '../../../../utils';
|
|
5
|
+
import { ToBoolean } from '../../../../utils/transforms/boolean.transform';
|
|
6
|
+
import { IsFormattedDateString } from '../../../../utils/validators/formattedDateString.validator';
|
|
7
|
+
import { ThirdPartyType } from '../../../Enum/ThirdPartyType';
|
|
8
|
+
|
|
9
|
+
export class QueryGeneralLedgerAuxiliary {
|
|
10
|
+
@ApiProperty()
|
|
11
|
+
@IsFormattedDateString()
|
|
12
|
+
dateStart: string;
|
|
13
|
+
|
|
14
|
+
@ApiProperty()
|
|
15
|
+
@IsFormattedDateString()
|
|
16
|
+
dateEnd: string;
|
|
17
|
+
|
|
18
|
+
@ApiProperty()
|
|
19
|
+
@IsEnum(ThirdPartyType)
|
|
20
|
+
idThirdPartyType: ThirdPartyType;
|
|
21
|
+
|
|
22
|
+
@ApiProperty()
|
|
23
|
+
@IsInt()
|
|
24
|
+
@Min(1)
|
|
25
|
+
limit: number;
|
|
26
|
+
|
|
27
|
+
@ApiProperty()
|
|
28
|
+
@IsInt()
|
|
29
|
+
@Min(1)
|
|
30
|
+
page: number;
|
|
31
|
+
|
|
32
|
+
@ApiPropertyOptional({ default: false, describe: 'If set to true, it will search only entries with no lettering' })
|
|
33
|
+
@IsBoolean()
|
|
34
|
+
@ToBoolean()
|
|
35
|
+
@IsOptional()
|
|
36
|
+
omitLettering?: boolean;
|
|
37
|
+
|
|
38
|
+
@ApiPropertyOptional({ default: true })
|
|
39
|
+
@IsBoolean()
|
|
40
|
+
@ToBoolean()
|
|
41
|
+
@IsOptional()
|
|
42
|
+
descending?: boolean;
|
|
43
|
+
|
|
44
|
+
@ApiPropertyOptional()
|
|
45
|
+
@IsString()
|
|
46
|
+
search?: string;
|
|
47
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import {
|
|
2
|
+
IsDate, IsNumber, IsString,
|
|
3
|
+
} from 'class-validator';
|
|
4
|
+
import { ApiProperty, ApiPropertyOptional } from '../../../..';
|
|
5
|
+
|
|
6
|
+
export class QueryRevisionApprobation {
|
|
7
|
+
@ApiProperty()
|
|
8
|
+
@IsDate()
|
|
9
|
+
startDate: Date;
|
|
10
|
+
|
|
11
|
+
@ApiProperty()
|
|
12
|
+
@IsDate()
|
|
13
|
+
endDate: Date;
|
|
14
|
+
|
|
15
|
+
@ApiProperty()
|
|
16
|
+
@IsNumber()
|
|
17
|
+
idSociety: number;
|
|
18
|
+
|
|
19
|
+
@ApiPropertyOptional()
|
|
20
|
+
@IsString()
|
|
21
|
+
comment?: string;
|
|
22
|
+
}
|
|
@@ -18,6 +18,8 @@ export interface ReadRevisionAccount {
|
|
|
18
18
|
idAccountingTransaction: number;
|
|
19
19
|
idVat: number | null;
|
|
20
20
|
idImmobilization: number | null;
|
|
21
|
+
idLettering?: number | null;
|
|
22
|
+
lettering?: ILettering;
|
|
21
23
|
createdAt: Date;
|
|
22
24
|
updatedAt: Date;
|
|
23
25
|
accountingTransaction: {
|
|
@@ -28,10 +30,8 @@ export interface ReadRevisionAccount {
|
|
|
28
30
|
idUser: number | null;
|
|
29
31
|
exported: Date | null;
|
|
30
32
|
idAccountingJournal: number;
|
|
31
|
-
idLettering: number | null;
|
|
32
33
|
accountingFiles: Array<IAccountingFile>;
|
|
33
34
|
accountingJournal: IAccountingJournal;
|
|
34
|
-
lettering: ILettering;
|
|
35
35
|
user: IUser;
|
|
36
36
|
},
|
|
37
37
|
thirdParty: { id: number, fullname: string } | null,
|