Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PSP-7228 Management summary lease information - text change #3588

Merged
merged 1 commit into from
Nov 10, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ exports[`PropertyManagementDetailView component renders as expected when provide
<div
class="c5 text-left col"
>
No active Lease/License
No
</div>
</div>
<div
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,7 @@ exports[`PropertyManagementUpdateForm component renders as expected 1`] = `
<div
class="c5 text-left col"
>
No active Lease/License
No
</div>
</div>
<div
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ describe('Property management model tests', () => {
expect(model.additionalDetails).toBe('');
expect(model.isTaxesPayable).toBe(null);
expect(model.isUtilitiesPayable).toBe(null);
expect(model.formattedLeaseInformation).toBe('No active Lease/License');
expect(model.formattedLeaseInformation).toBe('No');
});

it('fromApi sets values as expected from api response', () => {
Expand All @@ -35,11 +35,11 @@ describe('Property management model tests', () => {
expect(model.additionalDetails).toBe('test');
expect(model.isTaxesPayable).toBe(null);
expect(model.isUtilitiesPayable).toBe(null);
expect(model.formattedLeaseInformation).toBe('No active Lease/License');
expect(model.formattedLeaseInformation).toBe('No');
});

it.each([
['NO lease found', 0, null, 'No active Lease/License'],
['NO lease found', 0, null, 'No'],
['ONE lease with expiry date', 1, '2020-03-15', 'Yes (Mar 15, 2020)'],
['ONE lease with no expiry date', 1, null, 'Yes'],
['MULTIPLE leases', 5, null, 'Multiple'],
Expand Down
2 changes: 1 addition & 1 deletion source/frontend/src/utils/propertyUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ export function formatApiPropertyManagementLease(base?: Api_PropertyManagement |
const count = base?.relatedLeases || 0;
switch (count) {
case 0:
return 'No active Lease/License';
return 'No';

case 1:
const expiryDate = base?.leaseExpiryDate ? `(${prettyFormatDate(base.leaseExpiryDate)})` : '';
Expand Down
Loading