Skip to content
Snippets Groups Projects
Commit f25d885f authored by John Watkins's avatar John Watkins
Browse files

Items are now loaded into category dropdowns

parent ff91fbc6
Branches
No related tags found
2 merge requests!114LoggingService service class, new method to add a log to the "Logs" table when...,!93Thirty five
......@@ -152,6 +152,9 @@ public class AdminController {
}
}
System.out.println(filteredCategorySortedShops);
model.addAttribute("adminOfByCategory",filteredCategorySortedShops);
model.addAttribute("linkedShop", userShopLinked.hasShop(user.get().getUserId()));
model.addAttribute("highestShopLevel", highestShopLevel);
......
......@@ -20,8 +20,9 @@ html{
align-items: flex-start;
flex-direction: column;
z-index: 3;
transition: width 200ms, opacity 200ms;
transition: width 200ms, opacity 100ms;
pointer-events: all;
overflow-x: hidden;
}
#open-sidebar-tab {
......@@ -150,6 +151,41 @@ html{
color: #628ed6;
}
.sidebar .shop-tab{
height: 49px;
width: 200px;
display: flex;
padding: 0 10px;
justify-content: space-between;
align-items: center;
cursor: pointer;
color: #3273dc;
}
.sidebar .shop-tab:hover{
color: #628ed6;
}
.sidebar .shop-tab.shop-name{
color: red;
height: 50px;
}
.shop-tab-container{
border-bottom: 1px solid lightgray;
max-height: 50px;
overflow-y: hidden;
transition: max-height 300ms;
}
.shop-tab-container.open{
max-height: 500px;
}
.shop-tab-container.open .shop-tab .baseIcon .fa-caret-down{
transform: rotate(180deg);
}
.sidebar .active{
background-color: #f9f9f9;
}
......
src/main/resources/static/imgs/uploaded/45f41b47_75c1_4c81_b743_cd649a58f69c.jpg

6.35 KiB

......@@ -182,6 +182,7 @@ function saveStampboardChanges(shopId){
var formData = new FormData();
formData.append("file", icon[0]);
xhr.onload = function() {
console.log(xhr.responseText)
if (xhr.readyState === 4 && xhr.status === 200) {
filename = xhr.responseText;
var xhttp = new XMLHttpRequest();
......
......@@ -45,7 +45,19 @@
</div>
</div>
<div class="sidebar closed" id="side_shop_select">
test
<th:block th:each="category: ${adminOfByCategory.entrySet()}">
<div class="shop-tab-container" onclick="this.classList.toggle('open')">
<div class="shop-tab shop-category">
<p th:text="${category.getKey()}"></p>
<div class="baseIcon">
<i class="fas fa-caret-down fa-lg"></i>
</div>
</div>
<div class="shop-tab shop-name" th:each="shop: ${category.getValue()}">
<p th:text="${shop.entrySet.iterator.next().getKey()}"></p>
</div>
</div>
</th:block>
</div>
<main th:if="${highestPerm > 1 || linkedShop}">
<section id="profile-section" class="admin-section active">
......
......@@ -36,7 +36,7 @@
stamps=${shopMap.get('UserStampBoard').userStampPosition},
next_reward=${@claimableRewards.nextReward(shopMap.get('UserStampBoard'))},
reward_amount_obtained=${@claimableRewards.totalClaimableRewards(shopMap.get('UserStampBoard'))},
isFavourite=false,
isFavourite=${@checkFavourite.isFavourite(shopMap.get('Shop').shopId,loggedInUser.userId)},
total_reward_amount=${shopMap.get('Shop').getStampBoard.getRewards.size},
img_path=${shopMap.get('Shop').shopImage},
shopId=${shopMap.get('Shop').shopId}"></div>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment