Grundgerüst Shopping Category
Attribute und render defintitionen implementiert
This commit is contained in:
1 parent
07b58ccad7
commit
ce93c7a56e
1 file changed
+28
@@ -1,3 +1,31 @@
|
||||
export class ShoppingCategory {
|
||||
|
||||
constructor(categoryName) {
|
||||
this.categoryName = categoryName;
|
||||
this.itemsInCategory = [];
|
||||
this.remove = false;
|
||||
this.isEditing = false;
|
||||
}
|
||||
|
||||
render() {
|
||||
let element;
|
||||
if (this.isEditing) {
|
||||
element = this.#renderEditing();
|
||||
} else {
|
||||
element = this.#renderNormal();
|
||||
}
|
||||
|
||||
return element;
|
||||
}
|
||||
|
||||
#renderEditing() {
|
||||
|
||||
}
|
||||
|
||||
#renderNormal() {
|
||||
}
|
||||
|
||||
addItem(item) {
|
||||
this.itemsInCategory.push(item);
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user