Skip to content

Commit

Permalink
Revert "PRIME-2803 reflect changes at CareConnect (#2614)" (#2627)
Browse files Browse the repository at this point in the history
This reverts commit 7f69811.
  • Loading branch information
neophyte57 authored Nov 6, 2024
1 parent 7f69811 commit cd95c90
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 51 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,6 @@
class="radio-button"
[value]="vendor.code">
{{ vendor.name }}
<span *ngIf="vendor.name === 'CareConnect'" class="warning-text">*Do not select CareConnect as the vendor without first contacting CareConnect at [email protected]</span>
</mat-radio-button>
</mat-radio-group>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,3 @@
.radio-button {
margin: .25rem 0;
}

.warning-text {
color: red;
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import { ActivatedRoute, Router } from '@angular/router';
import { MatDialog } from '@angular/material/dialog';

import { UntilDestroy, untilDestroyed } from '@ngneat/until-destroy';
import { EMPTY } from 'rxjs';

import { noop, of } from 'rxjs';
import { exhaustMap, map, pairwise, startWith, tap } from 'rxjs/operators';
Expand All @@ -24,8 +23,6 @@ import { SiteFormStateService } from '@registration/shared/services/site-form-st
import { CareSettingPageFormState } from './care-setting-page-form-state.class';
import { NoContent } from '@core/resources/abstract-resource';
import { IStep } from '@shared/components/progress-indicator/progress-indicator.component';
import { DialogOptions } from '@shared/components/dialogs/dialog-options.model';
import { ConfirmDialogComponent } from '@shared/components/dialogs/confirm-dialog/confirm-dialog.component';

@UntilDestroy()
@Component({
Expand Down Expand Up @@ -173,42 +170,15 @@ export class CareSettingPageComponent extends AbstractCommunitySiteRegistrationP
}

protected submissionRequest(): NoContent {

const sitePayload = this.siteFormStateService.json;
const request$ = this.siteResource.updateSite(sitePayload);


if (this.formState.json.careSettingCode === CareSettingEnum.PRIVATE_COMMUNITY_HEALTH_PRACTICE
&& this.vendorConfig.find(v => v.code === this.formState.vendorCode.value).name === 'CareConnect'
) {
const data: DialogOptions = {
title: 'Confirmation',
message: `I confirm I have contacted CareConnect.`,
actionText: 'Yes, I\'ve contacted CareConnect',
actionType: 'warn'
};

return this.dialog.open(ConfirmDialogComponent, { data })
.afterClosed()
.pipe(
exhaustMap((confirmation: boolean) => {
if (confirmation) {
this.siteFormStateService.businessLicenceFormState.resetSiteId();
return request$;
}
return EMPTY;
})
);
} else {
if (this.formState.json.careSettingCode === CareSettingEnum.PRIVATE_COMMUNITY_HEALTH_PRACTICE) {
this.siteFormStateService.businessLicenceFormState.resetSiteId();
}
if (this.formState.json.careSettingCode !== CareSettingEnum.DEVICE_PROVIDER) {
this.siteFormStateService.deviceProviderFormState.clearIndividualDeviceProviders();
}
if (this.formState.json.careSettingCode !== CareSettingEnum.DEVICE_PROVIDER) {
this.siteFormStateService.deviceProviderFormState.clearIndividualDeviceProviders();
}
if (this.formState.json.careSettingCode === CareSettingEnum.PRIVATE_COMMUNITY_HEALTH_PRACTICE) {
this.siteFormStateService.businessLicenceFormState.resetSiteId();
}

return request$;
const payload = this.siteFormStateService.json;
return this.siteResource.updateSite(payload);
}

protected onSubmitFormIsValid(): void {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -108,10 +108,7 @@
<div class="mid-content">
<div class="mt1">Site registration for:</div>
<div class="button_title">
- Private community health practice
<div class="warning-text">*Before starting a new site registration with CareConnect as the vendor, contact
CareConnect at [email protected]
</div>
- Private community health practice<br/>
- Community pharmacy<br/>
- Device providers
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -150,8 +150,3 @@ a.tab-link:visited {
.mat-select-value {
color: #ffffff !important;
}

.warning-text {
color: orangered;
font-size: 1.25rem;
}

0 comments on commit cd95c90

Please sign in to comment.