Skip to content

Commit

Permalink
Merge branch 'develop' into test
Browse files Browse the repository at this point in the history
  • Loading branch information
neophyte57 committed Dec 18, 2024
2 parents 963cb46 + 9fdf3e5 commit 88e9a99
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,8 @@
</ng-container>
</app-alert>

<app-business-licence-expiry [form]="formState.form"></app-business-licence-expiry>
<app-business-licence-expiry [form]="formState.form"
[showExpiryDate]="true"></app-business-licence-expiry>

<ng-container *ngIf="businessLicence.businessLicenceDocument">

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -124,10 +124,11 @@ export class BusinessLicenceRenewalPageComponent extends AbstractCommunitySiteRe
protected performSubmission(): Observable<void> {
// Transfer business licence renewal updates
// to the form state service for submission
const { businessLicenceGuid, businessLicenceExpiry, filename } = this.siteFormStateService.businessLicenceFormState;
const { businessLicenceGuid, businessLicenceExpiry, filename, deferredLicenceReason } = this.siteFormStateService.businessLicenceFormState;
businessLicenceGuid.patchValue(this.formState.businessLicenceGuid.value);
businessLicenceExpiry.patchValue(this.formState.businessLicenceExpiry.value);
filename.patchValue(this.formState.filename.value);
deferredLicenceReason.patchValue("");

this.siteFormStateService.businessLicenceFormState.flagBusinessLicenceUpdated();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
<app-site-progress-indicator [noContent]="this.overviewType === 'organization'"
[inProgress]="!isCompleted"></app-site-progress-indicator>

<app-expiry-alert [expiryDates]="siteExpiryDate">
<app-expiry-alert [expiryDates]="siteExpiryDate"
*ngIf="!isBusinessLicenceUpdated">
<!-- Work around for ngProjectAs not passing class reference to alert when applied to ng-content -->
<ng-container #alertTitle
class="alert-title">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,8 @@
</app-enrollee-property>

<ng-container *ngIf="!admin; else businessLicenceListView">
<ng-container *ngIf="site.businessLicence?.businessLicenceDocument; else deferredLicence">
<ng-container
*ngIf="(site.businessLicence?.businessLicenceDocument || businessLicenceUpdated); else deferredLicence">
<app-enrollee-property title="Expiry"
[hasError]="site.businessLicence?.expiryDate && withinRenewalPeriod"
[errorMessage]="'Please update business licence'">
Expand Down Expand Up @@ -232,4 +233,4 @@
(route)="onRouteRelative($event)">
<app-party-review [party]="site?.technicalSupport"></app-party-review>
</app-overview-section>
</ng-container>
</ng-container>
1 change: 1 addition & 0 deletions prime-dotnet-webapi/Controllers/SitesController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -422,6 +422,7 @@ private async Task<bool> HandleBusinessLicenseUpdateAsync(CommunitySite site, Si
var licenceDto = _mapper.Map<BusinessLicence>(existingLicence);
licenceDto.Id = 0;
licenceDto.ExpiryDate = newLicence.ExpiryDate;
licenceDto.DeferredLicenceReason = newLicence.DeferredLicenceReason;

var licence = await _communitySiteService.AddBusinessLicenceAsync(site.Id, licenceDto, newLicence.DocumentGuid.Value);
return licence != null;
Expand Down

0 comments on commit 88e9a99

Please sign in to comment.