Skip to content

Commit

Permalink
252231: tooltip is not readable
Browse files Browse the repository at this point in the history
remove description by combined meals
  • Loading branch information
Martin Tepper committed Mar 30, 2022
1 parent 9c97e16 commit 9ea2031
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/Mealz/MealBundle/Service/CombinedMealService.php
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,8 @@ private function createCombinedDish(DishRepository $dishRepo): Dish
$combinedDish->setPrice($this->defaultPrice);
$combinedDish->setTitleEn(self::COMBINED_DISH_TITLE_EN);
$combinedDish->setTitleDe('Kombi-Gericht');
$combinedDish->setDescriptionEn('Description - ' . $combinedDish->getTitleEn());
$combinedDish->setDescriptionDe('Beschreibung - ' . $combinedDish->getTitleDe());
$combinedDish->setDescriptionEn('');
$combinedDish->setDescriptionDe('');

$this->entityManager->persist($combinedDish);
$this->entityManager->flush();
Expand Down
3 changes: 2 additions & 1 deletion src/Resources/js/modules/combined-meal-service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ export class CombinedMealService {
// update dish description with titles of booked dishes
const bookedDishTitles = bdt.map(dishTitle => $(`<div class="dish">${dishTitle}</div>`));
$dishContainer.find('.description .dish-combination').empty().append(...bookedDishTitles);
$dishContainer.find('.title').removeClass('no-description');
// update booked dish IDs in data attribute
$dishContainer.attr('data-booked-dishes', bookedDishSlugs.join(','));

Expand Down Expand Up @@ -142,7 +143,7 @@ export class CombinedMealService {
private static resetDish($dishContainer: JQuery): void {
let desc = $dishContainer.data('description');
$dishContainer.find('.description .dish-combination').empty().text(desc);
$dishContainer.find('.title').removeClass('edit');
$dishContainer.find('.title').removeClass('edit').addClass('no-description');
$dishContainer.attr('data-id', '');
$dishContainer.attr('data-booked-dishes', '');
}
Expand Down
4 changes: 3 additions & 1 deletion src/Resources/sass/modules/_meal.scss
Original file line number Diff line number Diff line change
Expand Up @@ -430,11 +430,13 @@
visibility: hidden;
width: 135px;
margin-left: -60px;
padding: 5px 0;
padding: 6px 3px;
border-radius: 6px;
white-space: normal;
color: $color-white;
background-color: $color-base;
opacity: 0;
line-height: 1.2em;
text-align: center;
transition: opacity 1s;

Expand Down

0 comments on commit 9ea2031

Please sign in to comment.