Skip to content

Commit

Permalink
Merge branch 'test'
Browse files Browse the repository at this point in the history
  • Loading branch information
neophyte57 committed Nov 28, 2024
2 parents 54a239d + 8c9e797 commit d42dc56
Show file tree
Hide file tree
Showing 5 changed files with 87 additions and 42 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,16 @@

</form>

<button mat-button
*ngIf="formState.hasRemoteUsers.value"
type="button"
color="primary"
class="mb-3"
(click)="onAdd()">
<mat-icon class="add-icon">add</mat-icon>
Add Remote Practitioners
</button>

<div class="mb-4"
*ngIf="formState.form.dirty && !lastRemoteUserRemoved">
<app-alert type="success"
Expand Down Expand Up @@ -99,15 +109,7 @@
</ng-container>
</app-alert>

<button mat-button
*ngIf="formState.hasRemoteUsers.value"
type="button"
color="primary"
class="mb-3"
(click)="onAdd()">
<mat-icon class="add-icon">add</mat-icon>
Add Remote Practitioners
</button>


<app-page-footer [isInitialEnrolment]="!isCompleted"
[primaryActionLabel]="(hasBeenSubmitted) ? 'Continue' : 'Save and Continue'"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -174,25 +174,29 @@

<ng-template #organizationMenu
let-organization="organization">
<button mat-icon-button
[matMenuTriggerFor]="rootMenu"
[disabled]="isPendingTransfer()">
<mat-icon>more_vert</mat-icon>
</button>

<mat-menu #rootMenu="matMenu"
aria-label="Organization actions menu">
<button mat-menu-item
<div class="mat-header-button-group">
<button mat-button
class="title_button"
type="button"
color="primary"
title="View/Update Organization Information"
[disabled]="isPendingTransfer()"
(click)="viewOrganization(organization)">
<span>View/Update Organization</span>
<mat-icon>description</mat-icon>
<span class="icon-text">Organization Info</span>
</button>

<button mat-menu-item
<button mat-button
class="title_button"
type="button"
color="primary"
title="Download Organization Agreement"
[matMenuTriggerFor]="subMenu"
[disabled]="!organizationAgreements?.length">
<span>Download Organization Agreement</span>
[disabled]="!organizationAgreements?.length || isPendingTransfer()">
<mat-icon>cloud_download</mat-icon>
<span class="icon-text">Organization Agreements</span>
</button>
</mat-menu>
</div>

<mat-menu #subMenu="matMenu">
<button *ngFor="let agreement of organizationAgreements"
Expand All @@ -201,31 +205,34 @@
<span>{{ AgreementType[agreement.agreementType] | case: 'snake' : 'space' | capitalize: true }}</span>
</button>
</mat-menu>

</ng-template>

<ng-template #siteMenu
let-site="site"
let-organizationId="organizationId">
<button mat-icon-button
[matMenuTriggerFor]="menu"
[disabled]="isPendingTransfer()">
<mat-icon>more_vert</mat-icon>
</button>

<mat-menu #menu="matMenu"
aria-label="Site actions menu">
<button mat-menu-item
<div class="mat-header-button-group">
<button mat-button
class="title_button"
type="button"
color="primary"
title="View/Update Site Information"
[disabled]="isPendingTransfer()"
(click)="viewSite(organizationId, site)">
<span>View/Update Site Information</span>
<mat-icon>description</mat-icon>
<span class="icon-text">Site Info</span>
</button>
<button *ngIf="site.careSettingCode === CareSettingEnum.PRIVATE_COMMUNITY_HEALTH_PRACTICE"
mat-menu-item
[disabled]="!site.completed || site.status === SiteStatusType.IN_REVIEW"
<button mat-button
class="title_button"
type="button"
color="primary"
title="View/Update Remote Practitioners"
*ngIf="site.careSettingCode === CareSettingEnum.PRIVATE_COMMUNITY_HEALTH_PRACTICE"
[disabled]="isPendingTransfer() || !site.completed || site.status === SiteStatusType.IN_REVIEW || site.status === SiteStatusType.LOCKED"
(click)="viewSiteRemoteUsers(organizationId, site)">
<span>View/Update Remote Practitioners</span>
<mat-icon>folder_shared</mat-icon>
<span class="icon-text">Remote Practitioners</span>
</button>
</mat-menu>
</div>
</ng-template>

</app-page>
Original file line number Diff line number Diff line change
@@ -1,6 +1,33 @@
@import 'palette';
@import 'bootstrap/bootstrap-imports';

/* Styles for screen widths lower than 1100px */
.icon-text {
display: none;
padding-left: 5px;
}

.title_button {
padding-top: 5px;
padding-left: 5px;
padding-right: 5px;
min-width: 40px;
}

/* Styles for screens wider than 1100px */
@media (min-width: 1100px) {
.icon-text {
display: block;
float: right;
}

.title_button {
padding-left: 10px;
padding-right: 10px;
min-width: 64px;
}
}

.alert-message {
max-width: 695px;
margin-bottom: 1.75rem;
Expand Down Expand Up @@ -56,6 +83,12 @@ div.add-org {
}
}

.mat-header-button-group {
right: 5px;
top: 10px;
position: absolute;
}

.text-red {
color: theme-palette(red);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,8 @@ export class SiteManagementPageComponent implements OnInit {
key: 'Site Address',
value: this.addressPipe.transform(site.physicalAddress, [...optionalAddressLineItems, 'provinceCode', 'countryCode'])
},
{ key: 'Vendor', value: this.configCodePipe.transform(siteVendorCode, 'vendors') }
{ key: 'Vendor', value: this.configCodePipe.transform(siteVendorCode, 'vendors') },
{ key: 'Site ID', value: site.pec }
];
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,8 @@
</app-overview-section>

<app-overview-section title="Site Business Licence"
[showEditRedirect]="showEditRedirect && site.status !== SiteStatusType.IN_REVIEW && !site.approvedDate"
[showEditRedirect]="showEditRedirect && site.status !== SiteStatusType.IN_REVIEW &&
site.status !== SiteStatusType.LOCKED && !site.approvedDate"
[editRoute]="SiteRoutes.BUSINESS_LICENCE"
(route)="onRouteRelative($event)">

Expand Down Expand Up @@ -163,7 +164,8 @@
<app-overview-section *ngIf="site?.physicalAddress?.street !== null && site?.physicalAddress?.city !== null &&
site?.physicalAddress?.provinceCode !== null && site?.physicalAddress?.postal !== null"
title="Site Address"
[showEditRedirect]="showEditRedirect && site.status !== SiteStatusType.IN_REVIEW && !site.approvedDate"
[showEditRedirect]="showEditRedirect && site.status !== SiteStatusType.IN_REVIEW
&& site.status !== SiteStatusType.LOCKED && !site.approvedDate"
[editRoute]="SiteRoutes.BUSINESS_LICENCE"
(route)="onRouteRelative($event)">
<app-enrollee-property title="Address">
Expand Down

0 comments on commit d42dc56

Please sign in to comment.