@tomei/rental 0.17.3-dev.6 → 0.17.3-dev.7
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/dist/components/rental/rental.d.ts +2 -1
- package/dist/components/rental/rental.js +4 -1
- package/dist/components/rental/rental.js.map +1 -1
- package/dist/enum/agreement-signature-verification-method.enum.d.ts +4 -0
- package/dist/enum/agreement-signature-verification-method.enum.js +9 -0
- package/dist/enum/agreement-signature-verification-method.enum.js.map +1 -0
- package/dist/enum/index.d.ts +2 -1
- package/dist/enum/index.js +3 -1
- package/dist/enum/index.js.map +1 -1
- package/dist/models/agreement-signature.entity.d.ts +4 -0
- package/dist/models/agreement-signature.entity.js +22 -0
- package/dist/models/agreement-signature.entity.js.map +1 -1
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/migrations/agreement-signature-table-migration.js +12 -0
- package/package.json +1 -1
- package/src/components/rental/rental.ts +7 -1
- package/src/enum/agreement-signature-verification-method.enum.ts +4 -0
- package/src/enum/index.ts +2 -0
- package/src/models/agreement-signature.entity.ts +19 -0
|
@@ -39,6 +39,18 @@ module.exports = {
|
|
|
39
39
|
type: Sequelize.DATE,
|
|
40
40
|
allowNull: true,
|
|
41
41
|
},
|
|
42
|
+
VerificationMethod: {
|
|
43
|
+
type: Sequelize.STRING(30),
|
|
44
|
+
allowNull: false,
|
|
45
|
+
},
|
|
46
|
+
VerificationJustification: {
|
|
47
|
+
type: Sequelize.STRING(3000),
|
|
48
|
+
allowNull: true,
|
|
49
|
+
},
|
|
50
|
+
VerifiedById: {
|
|
51
|
+
type: Sequelize.STRING(30),
|
|
52
|
+
allowNull: true,
|
|
53
|
+
},
|
|
42
54
|
CreatedById: {
|
|
43
55
|
type: Sequelize.STRING(30),
|
|
44
56
|
allowNull: false,
|
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@ import { RentalStatusEnum } from '../../enum/rental-status.enum';
|
|
|
3
3
|
import { RentalRepository } from './rental.repository';
|
|
4
4
|
import { ClassError, ObjectBase } from '@tomei/general';
|
|
5
5
|
import { ApplicationConfig } from '@tomei/config';
|
|
6
|
-
import { AuthContext, LoginUser
|
|
6
|
+
import { AuthContext, LoginUser } from '@tomei/sso';
|
|
7
7
|
import { RentalPrice } from '../rental-price/rental-price';
|
|
8
8
|
import { Op, QueryTypes } from 'sequelize';
|
|
9
9
|
import { ActionEnum, Activity } from '@tomei/activity-history';
|
|
@@ -24,6 +24,7 @@ import { HirerTypeEnum } from '../../enum/hirer-type.enum';
|
|
|
24
24
|
import { AgreementHistoryRepository } from '../agreement-history/agreement-history.repository';
|
|
25
25
|
import { DocType, Document, IAccountSystem } from '@tomei/finance';
|
|
26
26
|
import { ItemClassMap } from '../../ClassMappings/ItemClassMap';
|
|
27
|
+
import { AgreementSignatureVerificationMethodEnum } from '../../enum/agreement-signature-verification-method.enum';
|
|
27
28
|
|
|
28
29
|
export class Rental extends ObjectBase {
|
|
29
30
|
ObjectId: string;
|
|
@@ -826,6 +827,8 @@ export class Rental extends ObjectBase {
|
|
|
826
827
|
PartyType: string,
|
|
827
828
|
dbTransaction: any,
|
|
828
829
|
statusAfterSign?: RentalStatusEnum | string,
|
|
830
|
+
method?: AgreementSignatureVerificationMethodEnum,
|
|
831
|
+
justification?: string,
|
|
829
832
|
) {
|
|
830
833
|
try {
|
|
831
834
|
// Part 1: Privilege Checking
|
|
@@ -886,6 +889,9 @@ export class Rental extends ObjectBase {
|
|
|
886
889
|
SignedAt: new Date(),
|
|
887
890
|
UpdatedById: loginUser.ObjectId,
|
|
888
891
|
UpdatedAt: new Date(),
|
|
892
|
+
VerificationMethod: method,
|
|
893
|
+
VerificationJustification: justification,
|
|
894
|
+
VerifiedById: loginUser.ObjectId,
|
|
889
895
|
};
|
|
890
896
|
|
|
891
897
|
await Rental._AgreementSignatureRepo.update(signaturePayload, {
|
package/src/enum/index.ts
CHANGED
|
@@ -7,6 +7,7 @@ import { HirerTypeEnum } from './hirer-type.enum';
|
|
|
7
7
|
import { HirerChangeRequestTypeEnum } from './rental-hirer-change-request-type';
|
|
8
8
|
import { HirerChangeRequestStatusEnum } from './rental-hirer-change-request-status';
|
|
9
9
|
import { HirerChangeRequestHirerRoleEnum } from './rental-hirer-change-request-hirer-role';
|
|
10
|
+
import { AgreementSignatureVerificationMethodEnum } from './agreement-signature-verification-method.enum';
|
|
10
11
|
|
|
11
12
|
export {
|
|
12
13
|
RentalStatusEnum,
|
|
@@ -18,4 +19,5 @@ export {
|
|
|
18
19
|
HirerChangeRequestTypeEnum,
|
|
19
20
|
HirerChangeRequestStatusEnum,
|
|
20
21
|
HirerChangeRequestHirerRoleEnum,
|
|
22
|
+
AgreementSignatureVerificationMethodEnum,
|
|
21
23
|
};
|
|
@@ -11,6 +11,7 @@ import {
|
|
|
11
11
|
import { AgreementModel } from './agreement.entity';
|
|
12
12
|
import { IAgreementSignatureAttr } from '../interfaces/agreemeent-signature-attr.interface';
|
|
13
13
|
import { AgreementSignatureStatusEnum } from '../enum/agreement-signature-status.enum';
|
|
14
|
+
import { AgreementSignatureVerificationMethodEnum } from '../enum/agreement-signature-verification-method.enum';
|
|
14
15
|
|
|
15
16
|
@Table({
|
|
16
17
|
tableName: 'rental_AgreementSignature',
|
|
@@ -63,6 +64,24 @@ export class AgreementSignatureModel
|
|
|
63
64
|
})
|
|
64
65
|
SignedAt: Date;
|
|
65
66
|
|
|
67
|
+
@Column({
|
|
68
|
+
allowNull: false,
|
|
69
|
+
type: DataType.STRING(30),
|
|
70
|
+
})
|
|
71
|
+
VerificationMethod: AgreementSignatureVerificationMethodEnum;
|
|
72
|
+
|
|
73
|
+
@Column({
|
|
74
|
+
allowNull: false,
|
|
75
|
+
type: DataType.STRING(3000),
|
|
76
|
+
})
|
|
77
|
+
VerificationJustification: string;
|
|
78
|
+
|
|
79
|
+
@Column({
|
|
80
|
+
allowNull: false,
|
|
81
|
+
type: DataType.STRING(30),
|
|
82
|
+
})
|
|
83
|
+
VerifiedById: string;
|
|
84
|
+
|
|
66
85
|
@Column({
|
|
67
86
|
allowNull: false,
|
|
68
87
|
type: DataType.STRING(30),
|