Skip to content

Commit

Permalink
MOSIP-19629 button name changed to create when center create in eng lang
Browse files Browse the repository at this point in the history
Signed-off-by: MadhuMosip <[email protected]>
  • Loading branch information
MadhuMosip committed Feb 14, 2024
1 parent ce390e1 commit e806207
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -104,10 +104,10 @@ <h3>{{ "center.location-details" | translate }}</h3>
</mat-form-field>
</div>
<mat-card-actions class="action-buttons">
<button [disabled]="!primaryForm.dirty" id="createButton" mat-raised-button *ngIf="data.length != 0" (click)="submitPrimaryPanel()">
<button [disabled]="!primaryForm.dirty" id="createButton" mat-raised-button *ngIf="isEditable === 'editable'" (click)="submitPrimaryPanel()">
{{ "center.update" | translate }}
</button>
<button [disabled]="!primaryForm.dirty" id="createButton" mat-raised-button *ngIf="data.length == 0" (click)="submitPrimaryPanel()">
<button [disabled]="!primaryForm.dirty" id="createButton" mat-raised-button *ngIf="isEditable === 'langCode'" (click)="submitPrimaryPanel()">
{{ "center.create" | translate }}
</button>
<button mat-raised-button id="cancel" (click)="cancel()" *ngIf="secondaryLang">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@ export class EditComponent {
dynamicFieldValue = {};
showSpinner = false;
showUpdateButton = null;
isEditable:string;
constructor(
private location: Location,
private translateService: TranslateService,
Expand Down Expand Up @@ -225,7 +226,8 @@ export class EditComponent {
this.auditService.audit(8, centerSpecFile.auditEventIds[1], 'centers');
this.filteredLanguages = this.supportedLanguages;
this.getPrimaryPanelData(this.primaryLang);
});
});
this.isEditable = window.location.href.split('?')[1].split('=')[0];
}

setLocaleForDatePicker = (localeId) => {
Expand Down

0 comments on commit e806207

Please sign in to comment.