@tomei/rental 0.17.3-dev.6 → 0.17.3-dev.8
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/agreement-signature/agreement-signature.d.ts +4 -0
- package/dist/components/agreement-signature/agreement-signature.js +8 -0
- package/dist/components/agreement-signature/agreement-signature.js.map +1 -1
- 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/interfaces/agreemeent-signature-attr.interface.d.ts +4 -0
- 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/src/ClassMappings/ItemClassMap.d.ts +4 -0
- package/dist/src/ClassMappings/ItemClassMap.js +8 -0
- package/dist/src/ClassMappings/ItemClassMap.js.map +1 -0
- package/dist/src/ClassMappings/index.d.ts +2 -0
- package/dist/src/ClassMappings/index.js +6 -0
- package/dist/src/ClassMappings/index.js.map +1 -0
- package/dist/src/components/agreement/agreement.js +91 -72
- package/dist/src/components/agreement/agreement.js.map +1 -1
- package/dist/src/components/agreement/agreement.repository.js +50 -35
- package/dist/src/components/agreement/agreement.repository.js.map +1 -1
- package/dist/src/components/agreement-history/agreement-history.js +21 -10
- package/dist/src/components/agreement-history/agreement-history.js.map +1 -1
- package/dist/src/components/agreement-history/agreement-history.repository.js +50 -35
- package/dist/src/components/agreement-history/agreement-history.repository.js.map +1 -1
- package/dist/src/components/agreement-signature/agreement-signature.js +70 -57
- package/dist/src/components/agreement-signature/agreement-signature.js.map +1 -1
- package/dist/src/components/agreement-signature/agreement-signature.repository.js +51 -36
- package/dist/src/components/agreement-signature/agreement-signature.repository.js.map +1 -1
- package/dist/src/components/booking/booking.js +231 -206
- package/dist/src/components/booking/booking.js.map +1 -1
- package/dist/src/components/booking/booking.repository.js +50 -35
- package/dist/src/components/booking/booking.repository.js.map +1 -1
- package/dist/src/components/hirer-change-request-new-hirer/hirer-change-request-new-hirer.js +62 -47
- package/dist/src/components/hirer-change-request-new-hirer/hirer-change-request-new-hirer.js.map +1 -1
- package/dist/src/components/hirer-change-request-new-hirer/hirer-change-request-new-hirer.repository.js +63 -46
- package/dist/src/components/hirer-change-request-new-hirer/hirer-change-request-new-hirer.repository.js.map +1 -1
- package/dist/src/components/hirer-change-request-remove-hirer/hirer-change-request-remove-hirer.js +64 -49
- package/dist/src/components/hirer-change-request-remove-hirer/hirer-change-request-remove-hirer.js.map +1 -1
- package/dist/src/components/hirer-change-request-remove-hirer/hirer-change-request-remove-hirer.repository.js +64 -47
- package/dist/src/components/hirer-change-request-remove-hirer/hirer-change-request-remove-hirer.repository.js.map +1 -1
- package/dist/src/components/hirer-change-request-signature/hirer-change-request-signature.js +167 -150
- package/dist/src/components/hirer-change-request-signature/hirer-change-request-signature.js.map +1 -1
- package/dist/src/components/hirer-change-request-signature/hirer-change-request-signature.repository.js +64 -47
- package/dist/src/components/hirer-change-request-signature/hirer-change-request-signature.repository.js.map +1 -1
- package/dist/src/components/joint-hirer/joint-hirer.d.ts +2 -0
- package/dist/src/components/joint-hirer/joint-hirer.js +133 -81
- package/dist/src/components/joint-hirer/joint-hirer.js.map +1 -1
- package/dist/src/components/joint-hirer/joint-hirer.repository.js +50 -35
- package/dist/src/components/joint-hirer/joint-hirer.repository.js.map +1 -1
- package/dist/src/components/rental/rental.d.ts +12 -3
- package/dist/src/components/rental/rental.js +755 -549
- package/dist/src/components/rental/rental.js.map +1 -1
- package/dist/src/components/rental/rental.repository.js +50 -35
- package/dist/src/components/rental/rental.repository.js.map +1 -1
- package/dist/src/components/rental-hirer-change-request/rental-hirer-change-request.js +456 -416
- package/dist/src/components/rental-hirer-change-request/rental-hirer-change-request.js.map +1 -1
- package/dist/src/components/rental-hirer-change-request/rental-hirer-change-request.repository.js +63 -46
- package/dist/src/components/rental-hirer-change-request/rental-hirer-change-request.repository.js.map +1 -1
- package/dist/src/components/rental-price/rental-price.js +46 -33
- package/dist/src/components/rental-price/rental-price.js.map +1 -1
- package/dist/src/components/rental-price/rental-price.repository.js +50 -35
- package/dist/src/components/rental-price/rental-price.repository.js.map +1 -1
- package/dist/src/enum/agreement-signature-verification-method.enum.d.ts +4 -0
- package/dist/src/enum/agreement-signature-verification-method.enum.js +9 -0
- package/dist/src/enum/agreement-signature-verification-method.enum.js.map +1 -0
- package/dist/src/enum/index.d.ts +2 -1
- package/dist/src/enum/index.js +3 -1
- package/dist/src/enum/index.js.map +1 -1
- package/dist/src/index.d.ts +2 -1
- package/dist/src/index.js +3 -1
- package/dist/src/index.js.map +1 -1
- package/dist/src/models/agreement-signature.entity.d.ts +4 -0
- package/dist/src/models/agreement-signature.entity.js +22 -0
- package/dist/src/models/agreement-signature.entity.js.map +1 -1
- package/dist/src/models/hirer-change-request-new-hirer.entity.d.ts +1 -1
- package/dist/src/models/hirer-change-request-remove-hirer.entity.d.ts +1 -1
- package/dist/src/models/hirer-change-request-signature.entity.d.ts +1 -1
- package/dist/src/models/joint-hirer.entity.js +0 -4
- package/dist/src/models/joint-hirer.entity.js.map +1 -1
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/migrations/agreement-signature-table-migration.js +12 -0
- package/package.json +1 -1
- package/src/components/agreement-signature/agreement-signature.ts +12 -0
- 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/interfaces/agreemeent-signature-attr.interface.ts +4 -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
|
@@ -5,6 +5,7 @@ import { ApplicationConfig } from '@tomei/config';
|
|
|
5
5
|
import { LoginUser } from '@tomei/sso';
|
|
6
6
|
import { ActionEnum, Activity } from '@tomei/activity-history';
|
|
7
7
|
import { AgreementSignatureStatusEnum } from '../../enum/agreement-signature-status.enum';
|
|
8
|
+
import { AgreementSignatureVerificationMethodEnum } from '../../enum/agreement-signature-verification-method.enum';
|
|
8
9
|
|
|
9
10
|
export class AgreementSignature
|
|
10
11
|
extends ObjectBase
|
|
@@ -20,6 +21,9 @@ export class AgreementSignature
|
|
|
20
21
|
PartyType: string;
|
|
21
22
|
SignatureStatus: AgreementSignatureStatusEnum;
|
|
22
23
|
SignedAt: Date;
|
|
24
|
+
VerificationMethod: AgreementSignatureVerificationMethodEnum;
|
|
25
|
+
VerificationJustification: string;
|
|
26
|
+
VerifiedById: string;
|
|
23
27
|
CreatedById: string;
|
|
24
28
|
CreatedAt: Date;
|
|
25
29
|
UpdatedById: string;
|
|
@@ -45,6 +49,10 @@ export class AgreementSignature
|
|
|
45
49
|
this.PartyType = AgreementSignatureAttr.PartyType;
|
|
46
50
|
this.SignatureStatus = AgreementSignatureAttr.SignatureStatus;
|
|
47
51
|
this.SignedAt = AgreementSignatureAttr.SignedAt;
|
|
52
|
+
this.VerificationMethod = AgreementSignatureAttr.VerificationMethod;
|
|
53
|
+
this.VerificationJustification =
|
|
54
|
+
AgreementSignatureAttr.VerificationJustification;
|
|
55
|
+
this.VerifiedById = AgreementSignatureAttr.VerifiedById;
|
|
48
56
|
this.CreatedById = AgreementSignatureAttr.CreatedById;
|
|
49
57
|
this.CreatedAt = AgreementSignatureAttr.CreatedAt;
|
|
50
58
|
this.UpdatedById = AgreementSignatureAttr.UpdatedById;
|
|
@@ -101,6 +109,7 @@ export class AgreementSignature
|
|
|
101
109
|
}
|
|
102
110
|
|
|
103
111
|
this.ObjectId = this.createId();
|
|
112
|
+
this.VerifiedById = loginUser.ObjectId;
|
|
104
113
|
this.CreatedById = loginUser.ObjectId;
|
|
105
114
|
this.CreatedAt = new Date();
|
|
106
115
|
this.UpdatedById = loginUser.ObjectId;
|
|
@@ -114,6 +123,9 @@ export class AgreementSignature
|
|
|
114
123
|
PartyType: this.PartyType,
|
|
115
124
|
SignatureStatus: this.SignatureStatus,
|
|
116
125
|
SignedAt: this.SignedAt,
|
|
126
|
+
VerificationMethod: this.VerificationMethod,
|
|
127
|
+
VerificationJustification: this.VerificationJustification,
|
|
128
|
+
VerifiedById: this.VerifiedById,
|
|
117
129
|
CreatedById: this.CreatedById,
|
|
118
130
|
CreatedAt: this.CreatedAt,
|
|
119
131
|
UpdatedById: this.UpdatedById,
|
|
@@ -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
|
};
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { AgreementSignatureVerificationMethodEnum } from '../enum/agreement-signature-verification-method.enum';
|
|
1
2
|
import { AgreementSignatureStatusEnum } from '../enum/agreement-signature-status.enum';
|
|
2
3
|
|
|
3
4
|
export interface IAgreementSignatureAttr {
|
|
@@ -8,6 +9,9 @@ export interface IAgreementSignatureAttr {
|
|
|
8
9
|
PartyType: string;
|
|
9
10
|
SignatureStatus: AgreementSignatureStatusEnum;
|
|
10
11
|
SignedAt: Date;
|
|
12
|
+
VerificationMethod: AgreementSignatureVerificationMethodEnum;
|
|
13
|
+
VerificationJustification?: string;
|
|
14
|
+
VerifiedById?: string;
|
|
11
15
|
CreatedById: string;
|
|
12
16
|
CreatedAt: Date;
|
|
13
17
|
UpdatedById: string;
|
|
@@ -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),
|