Put the issue purge limit on the issues page

pull/2922/head
Jamie 6 years ago
parent 66af499970
commit d19efd91a5

@ -26,12 +26,13 @@
</div>
<div class="form-group" *ngIf="form.controls.deleteIssues.value">
<div class="checkbox">
<input type="checkbox" id="daysAfterResolvedToDelete" formControlName="daysAfterResolvedToDelete" ng-checked="form.daysAfterResolvedToDelete">
<label for="daysAfterResolvedToDelete">Leave the resolved issue for X amount of days before deletion</label>
</div>
<label for="daysAfterResolvedToDelete" class="control-label">Leave the resolved issue for X amount of
days before deletion</label>
<input type="number" class="form-control form-control-custom form-small" min="1" max="365" id="daysAfterResolvedToDelete"
formControlName="daysAfterResolvedToDelete" ng-checked="form.daysAfterResolvedToDelete">
</div>
<div class="form-group">
<div>
<button type="submit" [disabled]="form.invalid" class="btn btn-primary-outline ">Submit</button>
@ -52,8 +53,8 @@
<label for="categoryToAdd" class="control-label">Add Category</label>
</div>
<div class="col-md-9">
<input type="text" [(ngModel)]="categoryToAdd.value" class="form-control form-control-custom " id="categoryToAdd" name="categoryToAdd"
value="{{categoryToAdd.value}}">
<input type="text" [(ngModel)]="categoryToAdd.value" class="form-control form-control-custom " id="categoryToAdd"
name="categoryToAdd" value="{{categoryToAdd.value}}">
</div>
<div class="col-md-3">
<button class="btn btn-primary-outline" (click)="addCategory()">Add</button>

@ -55,6 +55,11 @@ export class IssuesComponent implements OnInit {
const settings = form.value;
if(settings.deleteIssues && settings.daysAfterResolvedToDelete <= 0) {
this.notificationService.error("You need to enter days greater than 0");
return;
}
this.settingsService.saveIssueSettings(settings).subscribe(x => {
if (x) {
this.notificationService.success("Successfully saved the Issue settings");

Loading…
Cancel
Save