DEV: Make category object more Ember friendly (#26342)

Some of the properties, like 'categoriesById', 'parentCategory' and
'subcategories', were updated manually when categories were loaded.
This was not ideal because it required a lot of code to keep the
objects in sync and some of the properties were not updated correctly.
This commit is contained in:
Bianca Nenciu
2024-04-03 17:34:28 +03:00
committed by GitHub
parent 929b4f89d6
commit 2190c9b957
12 changed files with 191 additions and 191 deletions

View File

@ -8,7 +8,7 @@ acceptance("Chat | Hashtag CSS Generator", function (needs) {
const category3 = {
id: 4,
color: "2B81AF",
parentCategory: { id: 1 },
parent_category_id: 1,
name: "category3",
};
@ -71,7 +71,7 @@ acceptance("Chat | Hashtag CSS Generator", function (needs) {
".hashtag-category-badge { background-color: var(--primary-medium); }\n" +
".hashtag-color--category-1 { background-color: #ff0000; }\n" +
".hashtag-color--category-2 { background-color: #333; }\n" +
".hashtag-color--category-4 { background-color: #2B81AF; }"
".hashtag-color--category-4 { background: linear-gradient(-90deg, #2B81AF 50%, #ff0000 50%); }"
);
});
});