81 lines
3.5 KiB
HTML
81 lines
3.5 KiB
HTML
<h2 class="page-header">Manage Country Messages</h2>
|
|
<div class="manage-container">
|
|
|
|
<!-- Country Messages Form -->
|
|
<div class="form-container">
|
|
<form [formGroup]="countryForm" (ngSubmit)="saveRecord()">
|
|
<div class="form-row">
|
|
<mat-form-field appearance="outline">
|
|
<mat-label>Country</mat-label>
|
|
<mat-select (selectionChange)="onCountrySelectionChanged($event)">
|
|
<mat-option *ngFor="let country of countries" [value]="country.paramId">
|
|
{{ country.paramDesc }}
|
|
</mat-option>
|
|
</mat-select>
|
|
</mat-form-field>
|
|
</div>
|
|
|
|
<div class="form-row">
|
|
<mat-form-field appearance="outline">
|
|
<mat-label>Message</mat-label>
|
|
<textarea matInput formControlName="countryMessage" placeholder="Enter a message" rows="10"
|
|
required></textarea>
|
|
<mat-error *ngIf="countryForm.get('countryMessage')?.errors?.['required']">
|
|
Message is required
|
|
</mat-error>
|
|
</mat-form-field>
|
|
</div>
|
|
|
|
<div class="form-row">
|
|
<mat-form-field appearance="outline">
|
|
<mat-label>Type of Action</mat-label>
|
|
<mat-select (selectionChange)="onActionTypeSelectionChanged($event)" formControlName="actionType">
|
|
<mat-option *ngFor="let actionType of actionTypes" [value]="actionType">
|
|
{{ actionType }}
|
|
</mat-option>
|
|
</mat-select>
|
|
</mat-form-field>
|
|
|
|
<mat-form-field appearance="outline">
|
|
<mat-label>Action </mat-label>
|
|
<input matInput formControlName="action">
|
|
</mat-form-field>
|
|
</div>
|
|
|
|
<!-- <div class="readonly-section top-divider">
|
|
<div class="readonly-fields">
|
|
<div class="field-column">
|
|
<div class="readonly-field">
|
|
<label>Action Type</label>
|
|
<div class="readonly-value">
|
|
{{paramReadOnlyFields.actionType || 'N/A'}}
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="field-column">
|
|
<div class="readonly-field">
|
|
<label>Action </label>
|
|
<div class="readonly-value">
|
|
{{paramReadOnlyFields.action || 'N/A'}}
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div> -->
|
|
|
|
<div class="form-actions">
|
|
<button mat-raised-button color="primary" type="submit"
|
|
[disabled]="countryForm.invalid || changeInProgress">
|
|
Save
|
|
</button>
|
|
<button mat-raised-button color="primary" type="button" *ngIf="!currentCountry?.isInactive"
|
|
(click)="inActivateParamRecord()">Inactivate
|
|
Record</button>
|
|
<button mat-raised-button color="primary" type="button" *ngIf="currentCountry?.isInactive"
|
|
(click)="reActivateParamRecord()">Reactivate
|
|
Record</button>
|
|
</div>
|
|
</form>
|
|
</div>
|
|
|
|
</div> |