diff --git a/Api/Data/TodoInterface.php b/Api/Data/TodoInterface.php new file mode 100644 index 0000000..7318d64 --- /dev/null +++ b/Api/Data/TodoInterface.php @@ -0,0 +1,42 @@ + + * @copyright Copyright (c) 2023-present JaJuMa GmbH . All rights reserved. + * @license http://opensource.org/licenses/mit-license.php MIT License + */ +declare(strict_types=1); + +namespace Jajuma\PotTodo\Api\Data; + +interface TodoInterface +{ + + const TASK = 'task'; + const TODO_ID = 'todo_id'; + + /** + * Get todo_id + * @return string|null + */ + public function getTodoId(); + + /** + * Set todo_id + * @param string $todoId + * @return \Jajuma\PotTodo\Todo\Api\Data\TodoInterface + */ + public function setTodoId($todoId); + + /** + * Get task + * @return string|null + */ + public function getTask(); + + /** + * Set task + * @param string $task + * @return \Jajuma\PotTodo\Todo\Api\Data\TodoInterface + */ + public function setTask($task); +} diff --git a/Api/Data/TodoSearchResultsInterface.php b/Api/Data/TodoSearchResultsInterface.php new file mode 100644 index 0000000..b4d44bc --- /dev/null +++ b/Api/Data/TodoSearchResultsInterface.php @@ -0,0 +1,26 @@ + + * @copyright Copyright (c) 2023-present JaJuMa GmbH . All rights reserved. + * @license http://opensource.org/licenses/mit-license.php MIT License + */ +declare(strict_types=1); + +namespace Jajuma\PotTodo\Api\Data; + +interface TodoSearchResultsInterface extends \Magento\Framework\Api\SearchResultsInterface +{ + + /** + * Get Todo list. + * @return \Jajuma\PotTodo\Api\Data\TodoInterface[] + */ + public function getItems(); + + /** + * Set task list. + * @param \Jajuma\PotTodo\Api\Data\TodoInterface[] $items + * @return $this + */ + public function setItems(array $items); +} \ No newline at end of file diff --git a/Api/TodoRepositoryInterface.php b/Api/TodoRepositoryInterface.php new file mode 100644 index 0000000..efaf8e9 --- /dev/null +++ b/Api/TodoRepositoryInterface.php @@ -0,0 +1,62 @@ + + * @copyright Copyright (c) 2023-present JaJuMa GmbH . All rights reserved. + * @license http://opensource.org/licenses/mit-license.php MIT License + */ +declare(strict_types=1); + +namespace Jajuma\PotTodo\Api; + +use Magento\Framework\Api\SearchCriteriaInterface; + +interface TodoRepositoryInterface +{ + + /** + * Save Todo + * @param \Jajuma\PotTodo\Api\Data\TodoInterface $todo + * @return \Jajuma\PotTodo\Api\Data\TodoInterface + * @throws \Magento\Framework\Exception\LocalizedException + */ + public function save( + \Jajuma\PotTodo\Api\Data\TodoInterface $todo + ); + + /** + * Retrieve Todo + * @param string $todoId + * @return \Jajuma\PotTodo\Api\Data\TodoInterface + * @throws \Magento\Framework\Exception\LocalizedException + */ + public function get($todoId); + + /** + * Retrieve Todo matching the specified criteria. + * @param \Magento\Framework\Api\SearchCriteriaInterface $searchCriteria + * @return \Jajuma\PotTodo\Api\Data\TodoSearchResultsInterface + * @throws \Magento\Framework\Exception\LocalizedException + */ + public function getList( + \Magento\Framework\Api\SearchCriteriaInterface $searchCriteria + ); + + /** + * Delete Todo + * @param \Jajuma\PotTodo\Api\Data\TodoInterface $todo + * @return bool true on success + * @throws \Magento\Framework\Exception\LocalizedException + */ + public function delete( + \Jajuma\PotTodo\Api\Data\TodoInterface $todo + ); + + /** + * Delete Todo by ID + * @param string $todoId + * @return bool true on success + * @throws \Magento\Framework\Exception\NoSuchEntityException + * @throws \Magento\Framework\Exception\LocalizedException + */ + public function deleteById($todoId); +} diff --git a/Block/PowerToys/Todo.php b/Block/PowerToys/Todo.php new file mode 100644 index 0000000..38a2a5f --- /dev/null +++ b/Block/PowerToys/Todo.php @@ -0,0 +1,16 @@ +_scopeConfig->isSetFlag(self::XML_PATH_ENABLE); + } +} \ No newline at end of file diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..10892ac --- /dev/null +++ b/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2023 JaJuMa + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/Magewire/Todo.php b/Magewire/Todo.php new file mode 100644 index 0000000..c87e82e --- /dev/null +++ b/Magewire/Todo.php @@ -0,0 +1,112 @@ + + * @copyright Copyright (c) 2023 JaJuMa GmbH . All rights reserved. + * @license http://opensource.org/licenses/mit-license.php MIT License + */ + +namespace Jajuma\PotTodo\Magewire; + +use Magewirephp\Magewire\Component; +use Magewirephp\Magewire\Model\Element\FlashMessage; +use Jajuma\PotTodo\Model\TodoFactory; +use Rakit\Validation\Validator; +use Magento\Framework\App\ResourceConnection; +use Jajuma\PotTodo\Model\ResourceModel\Todo\CollectionFactory as TodoCollectionFactory; + +class Todo extends \Magewirephp\Magewire\Component\Form +{ + public $task = ''; + + public $tasks = []; + + public $messageTodo = ''; + + public $rules = [ + 'task' => 'required' + ]; + + protected $messages = [ + 'task:required' => 'The "Task" property can\'t be empty', + ]; + + protected $todoFactory; + + protected $resourceConnection; + + private $todoCollectionFactory; + + public function __construct( + TodoFactory $todoFactory, + ResourceConnection $resourceConnection, + TodoCollectionFactory $todoCollectionFactory, + Validator $validator + ) { + $this->todoFactory = $todoFactory; + $this->todoCollectionFactory = $todoCollectionFactory; + $this->resourceConnection = $resourceConnection; + parent::__construct($validator); + } + + public function mount(): void + { + $this->fetchTasks(); + parent::mount(); + } + + private function fetchTasks() + { + $todoCollection = $this->getTaskCollection()->getItems(); + $this->tasks = []; + foreach ($todoCollection as $item) { + $this->tasks[] = $item->getData(); + } + } + + public function saveTask(string $title = null) + { + //validate data + try { + $this->validate(); + } catch (\Magewirephp\Magewire\Exception\ValidationException $exception) { + foreach ($this->getErrors() as $error) { + $this->dispatchErrorMessage($error); + } + } + $todoModel = $this->todoFactory->create(); + $data = [ + 'task' => $this->task + ]; + $todoModel->setData($data); + $todoModel->save(); + $this->messageTodo = 'Task has been saved successfully.'; + // Always empty it's current input title. + $this->task = ''; + $this->fetchTasks(); + } + + public function removeTask($taskId) + { + $todoModel = $this->todoFactory->create(); + $todoModel = $todoModel->load($taskId); + $todoModel->delete(); + $this->messageTodo = 'Task has been removed successfully.'; + $this->fetchTasks(); + } + + public function removeAllTask() + { + $connection = $this->resourceConnection->getConnection(); + $table = $connection->getTableName('jajuma_powertoys_todo'); + $query = "DELETE FROM " . $table; + $connection->query($query); + $this->messageTodo = 'All task has been removed successfully.'; + $this->tasks = []; + } + + private function getTaskCollection() + { + $todoCollectionFactory = $this->todoCollectionFactory->create(); + return $todoCollectionFactory; + } +} diff --git a/Model/ResourceModel/Todo.php b/Model/ResourceModel/Todo.php new file mode 100644 index 0000000..c14b45e --- /dev/null +++ b/Model/ResourceModel/Todo.php @@ -0,0 +1,23 @@ + + * @copyright Copyright (c) 2023-present JaJuMa GmbH . All rights reserved. + * @license http://opensource.org/licenses/mit-license.php MIT License + */ +declare(strict_types=1); + +namespace Jajuma\PotTodo\Model\ResourceModel; + +use Magento\Framework\Model\ResourceModel\Db\AbstractDb; + +class Todo extends AbstractDb +{ + + /** + * @inheritDoc + */ + protected function _construct() + { + $this->_init('jajuma_powertoys_todo', 'todo_id'); + } +} \ No newline at end of file diff --git a/Model/ResourceModel/Todo/Collection.php b/Model/ResourceModel/Todo/Collection.php new file mode 100644 index 0000000..346b3fe --- /dev/null +++ b/Model/ResourceModel/Todo/Collection.php @@ -0,0 +1,31 @@ + + * @copyright Copyright (c) 2023-present JaJuMa GmbH . All rights reserved. + * @license http://opensource.org/licenses/mit-license.php MIT License + */ +declare(strict_types=1); + +namespace Jajuma\PotTodo\Model\ResourceModel\Todo; + +use Magento\Framework\Model\ResourceModel\Db\Collection\AbstractCollection; + +class Collection extends AbstractCollection +{ + + /** + * @inheritDoc + */ + protected $_idFieldName = 'todo_id'; + + /** + * @inheritDoc + */ + protected function _construct() + { + $this->_init( + \Jajuma\PotTodo\Model\Todo::class, + \Jajuma\PotTodo\Model\ResourceModel\Todo::class + ); + } +} diff --git a/Model/Todo.php b/Model/Todo.php new file mode 100644 index 0000000..34fd07b --- /dev/null +++ b/Model/Todo.php @@ -0,0 +1,56 @@ + + * @copyright Copyright (c) 2023-present JaJuMa GmbH . All rights reserved. + * @license http://opensource.org/licenses/mit-license.php MIT License + */ +declare(strict_types=1); + +namespace Jajuma\PotTodo\Model; + +use Jajuma\PotTodo\Api\Data\TodoInterface; +use Magento\Framework\Model\AbstractModel; + +class Todo extends AbstractModel implements TodoInterface +{ + + /** + * @inheritDoc + */ + public function _construct() + { + $this->_init(\Jajuma\PotTodo\Model\ResourceModel\Todo::class); + } + + /** + * @inheritDoc + */ + public function getTodoId() + { + return $this->getData(self::TODO_ID); + } + + /** + * @inheritDoc + */ + public function setTodoId($todoId) + { + return $this->setData(self::TODO_ID, $todoId); + } + + /** + * @inheritDoc + */ + public function getTask() + { + return $this->getData(self::TASK); + } + + /** + * @inheritDoc + */ + public function setTask($task) + { + return $this->setData(self::TASK, $task); + } +} diff --git a/Model/TodoRepository.php b/Model/TodoRepository.php new file mode 100644 index 0000000..f423d01 --- /dev/null +++ b/Model/TodoRepository.php @@ -0,0 +1,149 @@ + + * @copyright Copyright (c) 2023-present JaJuMa GmbH . All rights reserved. + * @license http://opensource.org/licenses/mit-license.php MIT License + */ +declare(strict_types=1); + +namespace Jajuma\PotTodo\Model; + +use Jajuma\PotTodo\Api\Data\TodoInterface; +use Jajuma\PotTodo\Api\Data\TodoInterfaceFactory; +use Jajuma\PotTodo\Api\Data\TodoSearchResultsInterfaceFactory; +use Jajuma\PotTodo\Api\TodoRepositoryInterface; +use Jajuma\PotTodo\Model\ResourceModel\Todo as ResourceTodo; +use Jajuma\PotTodo\Model\ResourceModel\Todo\CollectionFactory as TodoCollectionFactory; +use Magento\Framework\Api\SearchCriteria\CollectionProcessorInterface; +use Magento\Framework\Exception\CouldNotDeleteException; +use Magento\Framework\Exception\CouldNotSaveException; +use Magento\Framework\Exception\NoSuchEntityException; + +class TodoRepository implements TodoRepositoryInterface +{ + + /** + * @var ResourceTodo + */ + protected $resource; + + /** + * @var TodoInterfaceFactory + */ + protected $todoFactory; + + /** + * @var TodoCollectionFactory + */ + protected $todoCollectionFactory; + + /** + * @var Todo + */ + protected $searchResultsFactory; + + /** + * @var CollectionProcessorInterface + */ + protected $collectionProcessor; + + + /** + * @param ResourceTodo $resource + * @param TodoInterfaceFactory $todoFactory + * @param TodoCollectionFactory $todoCollectionFactory + * @param TodoSearchResultsInterfaceFactory $searchResultsFactory + * @param CollectionProcessorInterface $collectionProcessor + */ + public function __construct( + ResourceTodo $resource, + TodoInterfaceFactory $todoFactory, + TodoCollectionFactory $todoCollectionFactory, + TodoSearchResultsInterfaceFactory $searchResultsFactory, + CollectionProcessorInterface $collectionProcessor + ) { + $this->resource = $resource; + $this->todoFactory = $todoFactory; + $this->todoCollectionFactory = $todoCollectionFactory; + $this->searchResultsFactory = $searchResultsFactory; + $this->collectionProcessor = $collectionProcessor; + } + + /** + * @inheritDoc + */ + public function save(TodoInterface $todo) + { + try { + $this->resource->save($todo); + } catch (\Exception $exception) { + throw new CouldNotSaveException(__( + 'Could not save the todo: %1', + $exception->getMessage() + )); + } + return $todo; + } + + /** + * @inheritDoc + */ + public function get($todoId) + { + $todo = $this->todoFactory->create(); + $this->resource->load($todo, $todoId); + if (!$todo->getId()) { + throw new NoSuchEntityException(__('Todo with id "%1" does not exist.', $todoId)); + } + return $todo; + } + + /** + * @inheritDoc + */ + public function getList( + \Magento\Framework\Api\SearchCriteriaInterface $criteria + ) { + $collection = $this->todoCollectionFactory->create(); + + $this->collectionProcessor->process($criteria, $collection); + + $searchResults = $this->searchResultsFactory->create(); + $searchResults->setSearchCriteria($criteria); + + $items = []; + foreach ($collection as $model) { + $items[] = $model; + } + + $searchResults->setItems($items); + $searchResults->setTotalCount($collection->getSize()); + return $searchResults; + } + + /** + * @inheritDoc + */ + public function delete(TodoInterface $todo) + { + try { + $todoModel = $this->todoFactory->create(); + $this->resource->load($todoModel, $todo->getTodoId()); + $this->resource->delete($todoModel); + } catch (\Exception $exception) { + throw new CouldNotDeleteException(__( + 'Could not delete the Todo: %1', + $exception->getMessage() + )); + } + return true; + } + + /** + * @inheritDoc + */ + public function deleteById($todoId) + { + return $this->delete($this->get($todoId)); + } +} diff --git a/README.md b/README.md new file mode 100644 index 0000000..9d007ff --- /dev/null +++ b/README.md @@ -0,0 +1,213 @@ +# :white_check_mark: Todo Power Toy for Magento 2 by [JaJuMa](https://www.jajuma.de/) + + + +Todo Power Toy for Magento 2 by [JaJuMa](https://www.jajuma.de/en) is a Quick Action toy +providing a todo list function for admins in your Magento store. + +Compatible with + +
+ + + + + + + + + + + +
Hyvä ThemesMage-OSMagento
+
+ +## Features + +This Quick Action Toy provides: +* A todo list for admins in your Magento store + +## Screenshots + + + + + + + + + + + + + + + + + + + +
Todo Toy
Dark Mode
Todo Toy
Light Mode
Todo List Popup
Dark Mode
Todo List Popup
Light Mode
+ + +## Requirements + +
+ + + + + +
:bangbang: This module requires Power Toys for Magento 2
:bangbang: by JaJuMa
+
+ +* Magento Power Toys v1.0.0+ +* Magento v2.4.5+ OR + Mage-OS v1.0.0+ +* Magewire v1.10+ +* Magewire-requirejs v1.1+ + +## Further Info, Extension Description & Manual + +* [Extension Website EN](https://www.jajuma.de/en/jajuma-develop/extensions/power-toys-for-magento-2) +* [Extension Website DE](https://www.jajuma.de/de/jajuma-develop/extensions/power-toys-fuer-magento-2) + +## Demos + +* [Magento Power Toys Demo on Luma Theme](https://www.jajuma.de/en/jajuma-shop/demo-shop-with-magento-2) +* [Magento Power Toys Demo on Hyvä Theme](https://www.jajuma.de/en/jajuma-shop/demo-shop-with-magento-2-and-hyva-themes) +* [Magento Power Toys Demo on Mage-OS](https://www.jajuma.de/en/jajuma-shop/demo-shop-with-mage-os-and-hyva-themes) + +## Installation + +Install via composer as any other Magento extension from Github: +``` +composer require jajuma/pot-todo +``` + +## Using Todo Power Toy For Magento + +After installing this module: +Go to +**JaJuMa -> Power Toys -> Configuration** +and enable & configure Todo Toy. + +After enabling, see the floating button at left/right edge of your screen +in your Backend & Frontend (while logged in as Admin). +When click on this button, the Power Toys Panel will open +displaying the Todo Toy. +A click on Todo Toy will display the todo list popup. + +* [See Manual for more details](https://www.jajuma.de/media/wysiwyg/jajuma-develop/power-toys-magento/manuals/JaJuMa_Todo_Power_Toy_Manual_v001.pdf) + + +## License + +The code is licensed under the [MIT License (MIT)](https://github.com/JaJuMa/pot-todo/blob/master/LICENSE) + +## :heart: Powered by + +Developing the Power Toys module and the toys was a lot easier and more fun thanks to [Magewire](https://github.com/magewirephp/magewire). +A big shout and Thank You to [Willem Poortman](https://github.com/wpoortman) for creating Magewire + +## Other [Magento 2 Extensions](ttps://www.jajuma.de/en/jajuma-develop/magento-extensions) by [JaJuMa](https://www.jajuma.de/) + +* :framed_picture: Performance & UX:
[Ultimate Image Optimizer for Magento 2](https://www.jajuma.de/en/jajuma-develop/extensions/ultimate-image-optimizer-extension-for-magento-2)
+ AVIF & WebP Images, Lazy Loading, High-Resolution / Retina images + +* :framed_picture: Performance & UX:
[WebP Optimized Images for Magento 2](https://www.jajuma.de/en/jajuma-develop/extensions/webp-optimized-images-extension-for-magento-2#portfolio-content)
+ The #1 WebP Images Solution for Magento 2 + +* :see_no_evil: SEO:
[PRG Pattern Link Masking for Magento 2](https://www.jajuma.de/en/jajuma-develop/extensions/prg-pattern-link-masking-for-magento-2)
+ Link Masking for Layered Navigation + +* :cop: User Experience:
[Shariff Social Share for Magento 2](https://www.jajuma.de/en/jajuma-develop/extensions/shariff-social-share-buttons-extension-for-magento-2)
+ GDPR compliant and customizable Sharing Buttons + +* :movie_camera: Content Management:
[Video Widget for Magento 2](https://www.jajuma.de/en/jajuma-develop/extensions/video-widget-gdpr-extension-for-magento-2)
+ Embedding YouTube videos, GDPR compliant with auto preview image & fully responsive + +* :rocket: Performance & UX:
[Page Preload for Magento 2](https://www.jajuma.de/en/jajuma-develop/extensions/page-preload-extension-for-magento-2)
+ Faster page transitions and subsequent page-loads by preloading / prefetching + +* :chart_with_upwards_trend: Marketing:
[Matomo Analytics for Magento 2](https://www.jajuma.de/en/jajuma-develop/extensions/honey-spam-anti-spam-extension-for-magento-2)
+ Web Analytics - GDPR Compliant + +* :honey_pot: Site Optimization:
[Honey Spam Anti-Spam for Magento 2](https://www.jajuma.de/en/jajuma-develop/extensions/honey-spam-anti-spam-extension-for-magento-2)
+ Spam Protection - Reliable & GDPR Compliant + +* :bell: Marketing:
[Customer Registration Reminder & Cleanup for Magento 2](https://www.jajuma.de/en/jajuma-develop/extensions/customer-registration-reminder-and-cleanup-extension-for-magento-2)
+ Increase Your Customer Engangement & Cleanup your Customer Account Data Automatically + +* :mega: UX & Marketing:
[Category Grid Callouts for Magento 2](https://www.jajuma.de/en/jajuma-develop/extensions/category-grid-callouts-extension-for-magento-2)
+ Enrich Your Category Grids With Eye-Catching Callouts + +* :thought_balloon: UX & Marketing:
[Customer Satisfaction Feedback for Magento 2](https://www.jajuma.de/en/jajuma-develop/extensions/category-grid-callouts-extension-for-magento-2)
+ Collect Valuable Feedback From Your Customers & Understand How To Satisfy Your Customers + +* :sparkler: UX:
[Auto Select Options for Magento 2](https://www.jajuma.de/en/jajuma-develop/extensions/auto-select-options-extension-for-magento-2)
+ Automatically Select Configurable & Custom Options Based On Your Customer's Preferences + +* :left_right_arrow: UX & Performance:
[Back Forward Cache - bfcache for Magento 2](https://www.jajuma.de/en/jajuma-develop/extensions/back-forward-cache-extension-for-magento-2)
+ Enable bfcache for Magento 2 for improved UX & Core Web Vitals + +* :heavy_division_sign: Accounting:
[Dynamic Shipping Tax Plus for Magento 2](https://www.jajuma.de/en/jajuma-develop/extensions/proportional-pro-rata-dynamic-shipping-tax-plus-extension-for-magento-2)
+ Dynamic Shipping Tax Calculation incl. pro-rata/proportional tax rates + +* :mag: Search:
[MySQL Search for Magento 2](https://www.jajuma.de/en/jajuma-develop/extensions/magento-without-elasticsearch-mysql-search-extension-for-magento-2)
+ MySQL Search for Magento 2 without Elasticsearch + +* :bangbang: Performance:
[Preload Critical Resources & Assets](https://www.jajuma.de/en/jajuma-develop/extensions/resource-hints-preload-critical-resources-assets-extension-for-magento-2)
+ Resource Hints for preloading important and critical resources + +* :octocat: Content Management:
[git 4 Page Builder](https://www.jajuma.de/en/jajuma-develop/extensions/git-4-page-builder-extension-for-magento-2)
+ Manage & deploy Magento 2 Page Builder content via git + +* :rocket: Performance:
[Hyvä Inline CSS](https://www.jajuma.de/en/jajuma-develop/extensions/hyva-inline-css-extension-for-magento-with-hyva-themes)
+ Run Magento 2 without CSS file by inline all CSS + +* :man_technologist: :free: Content Management:
[Syntax Highlighter 4 Page Builder](https://www.jajuma.de/en/jajuma-develop/extensions/syntax-highlighter-4-page-builder-extension-for-magento-2)
+ Syntax Highlighting and more for Magento 2 Page Builder + +* :triangular_flag_on_post: :free: UI & UX:
[Awesome Hyvä for Hyvä Themes](https://www.jajuma.de/en/jajuma-develop/extensions/font-awesome-icons-for-hyva-themes-extension)
+ Font Awesome 5 & 6 Icons for your [Hyvä Themes](https://www.jajuma.de/de/jajuma-shop/online-shop-mit-magento-2-und-hyva-themes) Store + +* :triangular_flag_on_post: :free: UI & UX:
[Hyvä Flags for Hyvä Themes](https://www.jajuma.de/en/jajuma-develop/extensions/country-language-flag-icons-for-hyva-themes-extension)
+ Country & Language Flag Icons for your [Hyvä Themes](https://www.jajuma.de/de/jajuma-shop/online-shop-mit-magento-2-und-hyva-themes) Store + +* :ok_man: :free: User Experience:
[Customer Navigation Manager for Magento 2](https://www.jajuma.de/en/jajuma-develop/extensions/customer-navigation-manager-extension-for-magento-2)
+ Easily manage the links in your Customer Account + +* :heavy_division_sign: :free: Accounting:
[Dynamic Shipping Tax for Magento 2](https://www.jajuma.de/en/jajuma-develop/extensions/dynamic-shipping-tax-extension-for-magento-2)
+ Dynamic Shipping Tax Calculation + +* :question: :free: Content:
[Hyvä FAQ Widget for Hyvä Themes](https://www.jajuma.de/en/jajuma-develop/extensions/dynamic-shipping-tax-extension-for-magento-2)
+ FAQ Widget for your [Hyvä Themes](https://www.jajuma.de/de/jajuma-shop/online-shop-mit-magento-2-und-hyva-themes) Store + +## Other [Services](https://www.jajuma.de/en/jajuma/company-magento-ecommerce-agency-stuttgart) by [JaJuMa](https://www.jajuma.de/) + +* :shopping: [JaJuMa-Market: Marketplace Software](https://www.jajuma.de/en/jajuma-market)
+ Complete Online Marketplace Software Solution. For Professional Demands. Feature Rich. Flexibly Customizable. + +* :shopping_cart: [JaJuMa-Shop](https://www.jajuma.de/en/jajuma-shop)
+ Customized Magento Shop Solutions. + +* :rocket: [JaJuMa-Shop: Hyvä Magento Shop Development](https://www.jajuma.de/de/jajuma-shop/online-shop-mit-magento-2-und-hyva-themes)
+ Hyvä Magento Shop Development. + +* :orange_book: [JaJuMa-Shop: Magento Handbuch in Deutsch](https://www.jajuma.de/de/jajuma-shop/magento-2-handbuch/)
+ Magento Handbuch in Deutsch. + +* :card_index_dividers: [JaJuMa-PIM](https://www.jajuma.de/en/jajuma-pim)
+ Product Information Management. Simple. Better. + +* :heavy_plus_sign: [JaJuMa-Develop: Magento 2 Extensions](https://www.jajuma.de/en/jajuma-develop/magento-extensions)
+ Individual Solutions For Your Business Case. + +* :paintbrush: [JaJuMa-Design](https://www.jajuma.de/en/jajuma-design)
+ Designs That Inspire. + +* :necktie: [JaJuMa-Consult](https://www.jajuma.de/en/jajuma-consult)
+ We Show You New Perspectives. + +© JaJuMa GmbH | [www.jajuma.de](www.jajuma.de) \ No newline at end of file diff --git a/composer.json b/composer.json new file mode 100644 index 0000000..a7ca005 --- /dev/null +++ b/composer.json @@ -0,0 +1,27 @@ +{ + "name": "jajuma/pot-todo", + "description": "Todo Power Toy for Magento 2 by JaJuMa", + "type": "magento2-module", + "license": "MIT", + "version": "1.0.0", + "authors": [ + { + "email": "info@jajuma.de", + "name": "JaJuMa" + } + ], + "minimum-stability": "dev", + "require": { + "magewirephp/magewire": "^1.10", + "magewirephp/magewire-requirejs": "^1.1", + "jajuma/power-toys": "^1.0" + }, + "autoload": { + "psr-4": { + "Jajuma\\PotTodo\\": "" + }, + "files": [ + "registration.php" + ] + } +} diff --git a/etc/adminhtml/system.xml b/etc/adminhtml/system.xml new file mode 100644 index 0000000..9c0c5bf --- /dev/null +++ b/etc/adminhtml/system.xml @@ -0,0 +1,14 @@ + + + +
+ + + + + Magento\Config\Model\Config\Source\Yesno + + +
+
+
diff --git a/etc/config.xml b/etc/config.xml new file mode 100644 index 0000000..324ebb0 --- /dev/null +++ b/etc/config.xml @@ -0,0 +1,10 @@ + + + + + + 1 + + + + diff --git a/etc/db_schema.xml b/etc/db_schema.xml new file mode 100644 index 0000000..1c115d4 --- /dev/null +++ b/etc/db_schema.xml @@ -0,0 +1,30 @@ + + + + + + + + + +
+ + + + + + + + + + + +
+ + + + + + +
+
diff --git a/etc/jajuma_powertoys.xml b/etc/jajuma_powertoys.xml new file mode 100644 index 0000000..712c99b --- /dev/null +++ b/etc/jajuma_powertoys.xml @@ -0,0 +1,35 @@ + + + + + + + + + + true + + popup + + Jajuma_PowerToys::svg/heroicons/outline/document-text.svg + Jajuma_PotTodo::custom_widget/magewire_todo_list.phtml + + Jajuma\PotTodo\Magewire\Todo + + true + + 0 + + 999 + + + + + diff --git a/etc/module.xml b/etc/module.xml new file mode 100644 index 0000000..e6e0b7e --- /dev/null +++ b/etc/module.xml @@ -0,0 +1,16 @@ + + + + + + + + + + diff --git a/registration.php b/registration.php new file mode 100644 index 0000000..fb46ca0 --- /dev/null +++ b/registration.php @@ -0,0 +1,10 @@ + + * @copyright Copyright (c) 2023 JaJuMa GmbH . All rights reserved. + * @license http://opensource.org/licenses/mit-license.php MIT License + */ + +use Magento\Framework\Component\ComponentRegistrar; + +ComponentRegistrar::register(ComponentRegistrar::MODULE, 'Jajuma_PotTodo', __DIR__); diff --git a/view/base/templates/custom_widget/magewire_todo_list.phtml b/view/base/templates/custom_widget/magewire_todo_list.phtml new file mode 100644 index 0000000..f38dc9d --- /dev/null +++ b/view/base/templates/custom_widget/magewire_todo_list.phtml @@ -0,0 +1,130 @@ + + * @copyright Copyright (c) 2023 JaJuMa GmbH . All rights reserved. + * @license http://opensource.org/licenses/mit-license.php MIT License + */ + +use Jajuma\PowerToys\Block\Widget\QuickAction; +use Magento\Framework\Escaper; + +/** @var QuickAction $block */ +/** @var Escaper $escaper */ +$magewire = $block->getMagewire(); +$tasks = $magewire->getTasks(); +?> +
+
+ + +
+
+ hasError('task')) : ?> +

getError('task') ?>

+ getMessageTodo()): ?> +

getMessageTodo() ?>

+ +
+ 0): ?> +
    + +
  • + + + + + + +
  • + +
+ + + +