Skip to content

Commit

Permalink
Merge pull request #1285 from Crown-Commercial-Service/p3sprint9
Browse files Browse the repository at this point in the history
Task 5421: PPON -PPG 59/60-Dev -UI Changes (#1284)
  • Loading branch information
ponselvamsakthivel-bc authored Apr 27, 2023
2 parents 978f943 + 380f9ae commit 8617690
Show file tree
Hide file tree
Showing 4 changed files with 38 additions and 32 deletions.
17 changes: 5 additions & 12 deletions src/app/pages/buyer/details/details.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,27 +47,20 @@ export class BuyerDetailsComponent extends BaseComponent implements OnInit {
}

public getSchemaName(schema: string): string {
let selecedScheme = this.schemeData.find(s => s.scheme === schema);
if(selecedScheme?.schemeName) {
return selecedScheme?.schemeName;
}
else if (schema === 'GB-CCS') {
let selecedScheme = this.schemeData.find(s => s.scheme === schema);
if (schema === 'GB-CCS') {
return 'Internal Identifier';
}
else if (schema === 'GB-PPG') {
return 'Public Procurement Organisation Number';
else if(selecedScheme?.schemeName) {
return selecedScheme?.schemeName;
}
else {
return '';
}
}

public getId(id:string, schema: string): string {
let selecedScheme = this.schemeData.find(s => s.scheme === schema);
if(selecedScheme?.schemeName) {
return id;
}
else if (schema === 'GB-PPG') {
if (schema === 'GB-PPG') {
return this.convertIdToHyphenId(id);
}
else {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ <h2 class="govuk-heading-m">Organisation registries</h2>
</tr>
<tr class="govuk-table__row" *ngFor="let row of additionalIdentifiers">
<th scope="row" class="govuk-table__header">{{ getSchemaName(row.scheme) }}</th>
<td class="govuk-table__cell">{{ row.id }}</td>
<td class="govuk-table__cell">{{ getId(row.id, row.scheme) }}</td>
<td class="govuk-table__cell"></td>
</tr>
</tbody>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -236,16 +236,34 @@ export class ViewPendingVerificationComponent implements OnInit {
}

public getSchemaName(schema: string): string {
let selecedScheme = this.schemeData.find((s) => s.scheme === schema);
if (selecedScheme?.schemeName) {
return selecedScheme?.schemeName;
} else if (schema === 'GB-CCS') {
let selecedScheme = this.schemeData.find(s => s.scheme === schema);
if (schema === 'GB-CCS') {
return 'Internal Identifier';
} else {
}
else if(selecedScheme?.schemeName) {
return selecedScheme?.schemeName;
}
else {
return '';
}
}

public getId(id:string, schema: string): string {
if (schema === 'GB-PPG') {
return this.convertIdToHyphenId(id);
}
else {
return id;
}
}

public convertIdToHyphenId(id:string): string {
if (id != null) {
return [id.slice(0, 3), '-', id.slice(3,6), '-', id.slice(6,9)].join('')
}
return id;
}

getPendingVerificationOrg() {
this.wrapperBuyerAndBothService.getpendingVerificationOrg(
this.organisationId,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -242,24 +242,20 @@ export class ViewVerifiedOrgComponent implements OnInit {
}

public getSchemaName(schema: string): string {
let selecedScheme = this.schemeData.find((s) => s.scheme === schema);
if (selecedScheme?.schemeName) {
return selecedScheme?.schemeName;
} else if (schema === 'GB-CCS') {
let selecedScheme = this.schemeData.find(s => s.scheme === schema);
if (schema === 'GB-CCS') {
return 'Internal Identifier';
} else if (schema === 'GB-PPG') {
return 'Public Procurement Organisation Number';
} else {
}
else if(selecedScheme?.schemeName) {
return selecedScheme?.schemeName;
}
else {
return '';
}
}

public getId(id:string, schema: string): string {
let selecedScheme = this.schemeData.find(s => s.scheme === schema);
if(selecedScheme?.schemeName) {
return id;
}
else if (schema === 'GB-PPG') {
if (schema === 'GB-PPG') {
return this.convertIdToHyphenId(id);
}
else {
Expand All @@ -273,8 +269,7 @@ export class ViewVerifiedOrgComponent implements OnInit {
}
return id;
}



public nevigateViewEdit() {
let data = {
companyHouseId: this.registries.identifier?.id,
Expand Down

0 comments on commit 8617690

Please sign in to comment.