Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deleted console logs from JS and unused properties from CreateNewWishlistAction #113

Merged
merged 1 commit into from
Mar 7, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 1 addition & 13 deletions src/Controller/Action/CreateNewWishlistAction.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,32 +23,20 @@

final class CreateNewWishlistAction
{
private FormFactoryInterface $formFactory;

private MessageBusInterface $commandBus;

private Environment $twigEnvironment;

private FlashBagInterface $flashBag;

private TranslatorInterface $translator;

private UrlGeneratorInterface $urlGenerator;

public function __construct(
FormFactoryInterface $formFactory,
MessageBusInterface $commandBus,
Environment $twigEnvironment,
FlashBagInterface $flashBag,
TranslatorInterface $translator,
UrlGeneratorInterface $urlGenerator
TranslatorInterface $translator
) {
$this->formFactory = $formFactory;
$this->commandBus = $commandBus;
$this->twigEnvironment = $twigEnvironment;
$this->flashBag = $flashBag;
$this->translator = $translator;
$this->urlGenerator = $urlGenerator;
}

public function __invoke(Request $request): Response
Expand Down
2 changes: 0 additions & 2 deletions src/Resources/assets/shop/js/handleCopyToWishlistListModal.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import { CreateCopyToWishlistsListModal } from './copyToWishlistsListModal'

const copyToWishlistBtn = document.querySelector('[data-bb-wl-list-modal-target="choose-wishlist-button"]')
console.log(copyToWishlistBtn);
const setAddWishlistModal = () => {
copyToWishlistBtn.addEventListener('click', (e) => {
e.preventDefault();
Expand Down Expand Up @@ -30,7 +29,6 @@ const setAddWishlistModal = () => {
try {
const response = await fetch(url, requestConfig);
const data = await response.json();
console.log(data);
wishlistsBtn.classList.add('bb-copy-to-wishlist-sukces')
setTimeout(() => {
wishlistsBtn.classList.remove('bb-copy-to-wishlist-sukces')
Expand Down
3 changes: 0 additions & 3 deletions src/Resources/config/services.yml
Original file line number Diff line number Diff line change
Expand Up @@ -260,12 +260,9 @@ services:
bitbag_sylius_wishlist_plugin.controller.action.create_new_wishlist:
class: BitBag\SyliusWishlistPlugin\Controller\Action\CreateNewWishlistAction
arguments:
- "@form.factory"
- "@sylius.command_bus"
- "@twig"
- "@session.flash_bag"
- "@translator"
- "@router"
tags:
- { name: controller.service_arguments }

Expand Down