Added pages to see, create, modify & delete redeemable actions. User card top right with disconnect & log out. Code clean up.

This commit is contained in:
Tom
2025-01-08 21:50:18 +00:00
parent 11dfde9a03
commit d595c3500e
41 changed files with 1228 additions and 321 deletions

View File

@ -0,0 +1,14 @@
import { AbstractControl, ValidationErrors, ValidatorFn } from "@angular/forms";
export function createItemExistsInArrayValidator(items: any[], getter: (value: any) => any): ValidatorFn {
return (control: AbstractControl): ValidationErrors | null => {
const value = control.value;
if (!value)
return null;
const matches = items.some(i => getter(i) == value);
return matches ? { itemExistsInArray: true } : null;
}
}