Skip to content

Commit 1da553e

Browse files
Added restricted organization
Signed-off-by: Amol Sontakke <[email protected]>
1 parent 86984d6 commit 1da553e

File tree

3 files changed

+29
-0
lines changed

3 files changed

+29
-0
lines changed

src/app/core/models/organization.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ export class OrganizationModel {
1010
signingEntityName: string;
1111
created: string;
1212
updated: string;
13+
isSanctioned:string;
1314
}
1415

1516
export class OrganizationListModel {

src/app/modules/corporate-contributor/container/corporate-dashboard/corporate-dashboard.component.html

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -252,3 +252,22 @@
252252
</div>
253253
</div>
254254
</ng-template>
255+
256+
<ng-template #errorModal let-modal>
257+
<div class="model">
258+
<div class="modal-body">
259+
<div class="row justify-content-center success-dialog">
260+
<div class="col-auto">
261+
<i class="fas fa-exclamation-circle logo red"></i>
262+
</div>
263+
<div class="col-12 title">{{title}}</div>
264+
<p class="col-11 success-message" [innerHTML]="message"></p>
265+
<div class="col-4">
266+
<button tabindex="-1" type="button" class="success-btn" (click)="onClickExitCLA()">
267+
Go Back
268+
</button>
269+
</div>
270+
</div>
271+
</div>
272+
</div>
273+
</ng-template>

src/app/modules/corporate-contributor/container/corporate-dashboard/corporate-dashboard.component.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ export class CorporateDashboardComponent implements OnInit, OnDestroy {
3636
@ViewChild('signedCLANotFoundModal') signedCLANotFoundModal: TemplateRef<any>;
3737
@ViewChild('successModal') successModal: TemplateRef<any>;
3838
@ViewChild('warningModal') warningModal: TemplateRef<any>;
39+
@ViewChild('errorModal') errorModal: TemplateRef<any>;
3940

4041
selectedCompany: string;
4142
searchBoxValue: string;
@@ -181,11 +182,19 @@ export class CorporateDashboardComponent implements OnInit, OnDestroy {
181182
.subscribe(
182183
(response) => {
183184
this.organization = response;
185+
if(!this.organization.isSanctioned){
184186
this.storageService.setItem(
185187
AppSettings.SELECTED_COMPANY,
186188
this.organization
187189
);
188190
this.checkEmployeeeSignature();
191+
}else {
192+
this.title = 'Restricted Organization';
193+
this.message =
194+
'We’re sorry, but you are currently unable to sign the Corporate Contributor License Agreement (CCLA).'+
195+
' If you believe this may be an error, please reach out to support';
196+
this.openWithDismiss(this.errorModal);
197+
}
189198
},
190199
() => {
191200
this.storageService.removeItem(AppSettings.SELECTED_COMPANY);

0 commit comments

Comments
 (0)