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

WIP: Msi stock ui aggregation #39

Merged
merged 82 commits into from
Jul 28, 2017
Merged

WIP: Msi stock ui aggregation #39

merged 82 commits into from
Jul 28, 2017

Conversation

larsroettig
Copy link
Member

No description provided.

vrann and others added 30 commits June 26, 2017 13:01
- created Resource models, models and APIs
- created StockRepositoryInterface and StockRepository
    - created Stock UI files and view ui layout and component for adminhtml

Merge branch 'msi-stock-ui-aggregation' of https://github.com/jonfres/magento2 into msi-stock-ui-aggregation
        - controller Stock and menu option for Manage Stock added
  - controller Stock and menu option for Manage Stock added2
- changed implementation of StockRepository
…/magento2 into msi-stock-ui-aggregation

# Conflicts:
#	app/code/Magento/Inventory/Ui/DataProvider/StockDataProvider.php
- Code Review Changes
- Implement List and Delete Function
- Implement Test for List and Delete Function
- Code Review Changes
- Code review changes
- Add new save methode for better performence
- Add new test case for save methode
- Remove nullable search SearchCriteria and the test case
MSI
- Fixes after CR of Source item management #38
…rce-item-management

# Conflicts:
#	app/code/Magento/Inventory/Model/ResourceModel/SourceItem/Collection.php
#	app/code/Magento/InventoryApi/Api/Data/SourceItemInterface.php
Valeriy Nayda added 13 commits July 20, 2017 11:10
- fix tests
- split InstallSchema
- update Magento\Framework\DB\Ddl\Table
- fix static tests
- fix static tests
@@ -13,7 +13,7 @@
use Magento\Shipping\Model\Config;

/**
* Class CarrierRequestDataHydrator
* Populate Source by carrier codes links
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Populate Source by carrier code links

@@ -10,7 +10,7 @@
use Magento\Framework\Controller\ResultFactory;

/**
* Class Index
* Index Controller
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if you give such description, you should specify Index Controller of which Entity.

This is Source Index Controller.

@@ -16,7 +16,7 @@
use Magento\InventoryApi\Api\Data\SourceInterface;

/**
* Class InlineEdit
* InlineEdit Controller
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same as above

use Magento\Framework\Exception\NoSuchEntityException;
use Magento\Framework\Registry;
use Magento\InventoryApi\Api\Data\SourceInterface;
use Magento\InventoryApi\Api\Data\SourceInterfaceFactory;
use Magento\InventoryApi\Api\SourceRepositoryInterface;

/**
* Class Save
* Save Controller
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please fix description

use Magento\InventoryApi\Api\Data\StockInterface;

/**
* InlineEdit Controller
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please fix description for all controller classes

*/
public function execute($stockId, $sourceId)
{
if (0 === (int)$stockId || 0 === (int)$sourceId) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

again use empty function

$items = $collection->getItems();

if (empty($items)) {
throw new CouldNotDeleteException(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why do you think we need to throw an exception when there is no relation to delete?
for example, amqp says that each message in queue should be idempotent , thus
it implies that each message could be delivered "at least once"
so, there is a possibility that worker would handle the same message twice
so, why do we thrown an exception when handler will process message second time?

moreover it's cheaper just to delete link

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Deleted

* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
namespace Magento\Inventory\Setup\InstallStep;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't like the name "Step" here

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Refactored

use Magento\InventoryApi\Api\StockRepositoryInterface;

/**
* Class StockDataProvider
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please provide precise and clear description

$data = parent::getData();
if ('inventory_stock_form_data_source' === $this->name) {
// It is need for support of several fieldsets.
// For details see \Magento\Ui\Component\Form::getDatastockData
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

there is only getDataSourceData function in Magento\Ui\Component\Form

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed

@naydav naydav merged commit 994c7ed into develop Jul 28, 2017
@vrann vrann added msi and removed msi labels Sep 29, 2017
okolesnyk pushed a commit that referenced this pull request Mar 6, 2018
 - Merge Pull Request magento-engcom/php-7.2-support#39 from pmclain/php-7.2-support:update/cm-redis-session-abstract
 - Merged commits:
   1. 6b1ae42
@maghamed maghamed deleted the msi-stock-ui-aggregation branch December 11, 2018 18:12
engcom-Golf pushed a commit to engcom-Golf/inventory that referenced this pull request Dec 15, 2020
MC-39893:  Revert composer2 changes in mainline
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants