WIP(shops): dates and fixes

This commit is contained in:
Sabe Jones
2024-04-22 17:52:07 -05:00
parent 28b936e2d1
commit 5cd58d4119
5 changed files with 8 additions and 10 deletions

View File

@@ -35,13 +35,9 @@
/>
</a>
<a
class="topbar-dropdown-item dropdown-item"
class="topbar-dropdown-item dropdown-item dropdown-separated"
@click="showAvatar('body', 'size')"
>{{ $t('editAvatar') }}</a>
<a
class="topbar-dropdown-item dropdown-item dropdown-separated"
@click="showAvatar('backgrounds', '2024')"
>{{ $t('backgrounds') }}</a>
<a
class="topbar-dropdown-item dropdown-item"
@click="showProfile('profile')"

View File

@@ -132,7 +132,7 @@ export default {
},
methods: {
getKeyProp (item) {
return this.keyProp ? item[this.keyProp] : item;
return this.keyProp ? item[this.keyProp] : item.key;
},
isDisabled (item) {
return typeof item[this.disabledProp] === 'undefined' ? false : item[this.disabledProp];

View File

@@ -857,9 +857,10 @@ export function getScheduleMatchingGroup (type, date) {
});
}
if (!cachedScheduleMatchers[type]) {
let end = moment(checkedDate).date(TYPE_SCHEDULE[type]);
if (end.date() <= checkedDate.date()) {
end = moment(end).add(1, 'months');
let end = moment(checkedDate);
end.date(TYPE_SCHEDULE[type]);
if (end.date() <= moment(checkedDate).date()) {
moment(end).add(1, 'months');
}
return {
end: end.toDate(),

View File

@@ -491,7 +491,7 @@ export default function getItemInfo (user, type, item, officialPinnedItems, lang
}
if (matcher) {
itemInfo.end = { matcher };
itemInfo.end = matcher.end;
}
return itemInfo;

View File

@@ -582,6 +582,7 @@ shops.getCustomizationsShopCategories = function getCustomizationsShopCategories
bg,
officialPinnedItems,
language,
matchers,
);
backgroundCategory.items.push(item);
}