@tomei/rental 0.17.4-dev.3 → 0.17.4-dev.5
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/rental-hirer-change-request/rental-hirer-change-request.js +2 -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/rental-hirer-change-request/rental-hirer-change-request.ts +7 -1
package/package.json
CHANGED
|
@@ -828,8 +828,14 @@ export class RentalHirerChangeRequest
|
|
|
828
828
|
//find the number of joint hirers after removal
|
|
829
829
|
const rental = await Rental.init(dbTransaction, this.RentalId);
|
|
830
830
|
const jointHirers = await rental.getJointHirers(dbTransaction);
|
|
831
|
+
|
|
832
|
+
//filter out the active joint hirers
|
|
833
|
+
const activeJointHirers = jointHirers.filter(
|
|
834
|
+
(hirer) => hirer.Status === 'Active',
|
|
835
|
+
);
|
|
836
|
+
|
|
831
837
|
//if jointHirers is empty, set rental.AccountType to "Single"
|
|
832
|
-
if (
|
|
838
|
+
if (activeJointHirers.length === 0) {
|
|
833
839
|
await rental.update(loginUser, dbTransaction, {
|
|
834
840
|
AccountType: RentalAccountTypeEnum.SINGLE,
|
|
835
841
|
});
|