feat(schedule): improve predefined schedule groups
This commit is contained in:
@@ -17,15 +17,16 @@ export class DataStorage<T extends { id: string }> {
|
||||
return this.readValues();
|
||||
}
|
||||
|
||||
add(value: T) {
|
||||
add(value: T): boolean {
|
||||
const values = this.readValues();
|
||||
for (const v of values) {
|
||||
if (v.id == value.id) {
|
||||
return;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
values.push(value);
|
||||
this.writeValues(values);
|
||||
return true;
|
||||
}
|
||||
|
||||
remove(id: string) {
|
||||
|
||||
Reference in New Issue
Block a user