@tomei/rental 0.17.4-dev.9 → 0.17.4
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/src/components/joint-hirer/joint-hirer.js +1 -1
- package/dist/src/components/joint-hirer/joint-hirer.js.map +1 -1
- package/dist/src/components/rental/rental.js +0 -1
- package/dist/src/components/rental/rental.js.map +1 -1
- package/dist/src/components/rental-hirer-change-request/rental-hirer-change-request.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/src/components/joint-hirer/joint-hirer.ts +1 -1
- package/src/components/rental/rental.ts +0 -1
- package/src/components/rental-hirer-change-request/rental-hirer-change-request.ts +0 -23
package/package.json
CHANGED
|
@@ -237,7 +237,7 @@ export class JointHirer extends ObjectBase {
|
|
|
237
237
|
);
|
|
238
238
|
}
|
|
239
239
|
|
|
240
|
-
this._Rental = await Rental.init(this.RentalId
|
|
240
|
+
this._Rental = await Rental.init(dbTransaction, this.RentalId);
|
|
241
241
|
|
|
242
242
|
if (!this._Rental) {
|
|
243
243
|
throw new ClassError(
|
|
@@ -808,12 +808,6 @@ export class RentalHirerChangeRequest
|
|
|
808
808
|
jointHirer.CustomerId = customerId;
|
|
809
809
|
jointHirer.CustomerType = customerType;
|
|
810
810
|
await jointHirer.create(loginUser, dbTransaction);
|
|
811
|
-
|
|
812
|
-
//d. Set the AccountType to "Joint" for the rental
|
|
813
|
-
// const rental = await Rental.init(dbTransaction, this.RentalId);
|
|
814
|
-
// await rental.update(loginUser, dbTransaction, {
|
|
815
|
-
// AccountType: RentalAccountTypeEnum.JOINT,
|
|
816
|
-
// });
|
|
817
811
|
} else if (this.Type === HirerChangeRequestTypeEnum.REMOVE) {
|
|
818
812
|
// a. Get joint hirer from remove hirer request
|
|
819
813
|
const removeHirer = await this.getRemoveHirer(dbTransaction);
|
|
@@ -824,23 +818,6 @@ export class RentalHirerChangeRequest
|
|
|
824
818
|
|
|
825
819
|
//Call jointHirer.remove() method by passing loginUser and dbTransaction
|
|
826
820
|
await jointHirer.remove(loginUser, dbTransaction);
|
|
827
|
-
|
|
828
|
-
// //find the number of joint hirers after removal
|
|
829
|
-
// const rental = await Rental.init(dbTransaction, this.RentalId);
|
|
830
|
-
// rental.AccountType = RentalAccountTypeEnum.JOINT;
|
|
831
|
-
// const jointHirers = await rental.getJointHirers(dbTransaction);
|
|
832
|
-
|
|
833
|
-
// //filter out the active joint hirers
|
|
834
|
-
// const activeJointHirers = jointHirers.filter(
|
|
835
|
-
// (hirer) => hirer.Status === 'Active',
|
|
836
|
-
// );
|
|
837
|
-
|
|
838
|
-
// //if jointHirers is empty, set rental.AccountType to "Single"
|
|
839
|
-
// if (activeJointHirers.length === 0) {
|
|
840
|
-
// await rental.update(loginUser, dbTransaction, {
|
|
841
|
-
// AccountType: RentalAccountTypeEnum.SINGLE,
|
|
842
|
-
// });
|
|
843
|
-
// }
|
|
844
821
|
}
|
|
845
822
|
|
|
846
823
|
// 3. Call _Repo update method
|