I want to show orders which are assigned to the specific admin users.
If any admin user is logged in then orders which are assigned to logged-in admin user will be displayed in an Order grid.
Note: Admin users are seller which can manage their orders from admin
How can it be done using UI component?
My Seller Id column Code:
<?xml version="1.0" encoding="UTF-8"?>
<listing xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Ui/etc/ui_configuration.xsd">
<argument name="data" xsi:type="array">
<item name="js_config" xsi:type="array">
<item name="provider" xsi:type="string">show_ecomexpress_awb.show_ecomexpress_awb_listing_data_source</item>
<item name="deps" xsi:type="string">show_ecomexpress_awb.show_ecomexpress_awb_listing_data_source</item>
</item>
<item name="spinner" xsi:type="string">show_ecomexpress_awb_columns</item>
<item name="buttons" xsi:type="array">
<item name="import" xsi:type="array">
<item name="name" xsi:type="string">import</item>
<item name="label" xsi:type="string" translate="true">Import COD AWB</item>
<item name="class" xsi:type="string">primary</item>
<item name="url" xsi:type="string">ecomexpress/ecomexpress/fetch_fetchawb</item>
</item>
<item name="importppd" xsi:type="array">
<item name="name" xsi:type="string">importppd</item>
<item name="label" xsi:type="string" translate="true">Import PPD AWB</item>
<item name="class" xsi:type="string">primary</item>
<item name="url" xsi:type="string">ecomexpress/ecomexpress/fetch_fetchppdawb</item>
</item>
<item name="flush" xsi:type="array">
<item name="name" xsi:type="string">flush</item>
<item name="label" xsi:type="string" translate="true">Flush AWB</item>
<item name="class" xsi:type="string">primary</item>
<item name="url" xsi:type="string">ecomexpress/ecomexpress/deleteawb</item>
</item>
</item>
</argument>
<dataSource name="ecom_awb_listing_data_source">
<argument name="dataProvider" xsi:type="configurableObject">
<argument name="class" xsi:type="string">Ecom\Ecomexpress\Ui\DataProvider\Ecom\AwbDataProvider</argument>
<argument name="name" xsi:type="string">show_ecomexpress_awb_listing_data_source</argument>
<argument name="primaryFieldName" xsi:type="string">awb_id</argument>
<argument name="requestFieldName" xsi:type="string">id</argument>
<argument name="data" xsi:type="array">
<item name="config" xsi:type="array">
<item name="update_url" xsi:type="url" path="mui/index/render"/>
<item name="storageConfig" xsi:type="array">
<item name="indexField" xsi:type="string">awb_id</item>
</item>
</item>
</argument>
</argument>
<argument name="data" xsi:type="array">
<item name="js_config" xsi:type="array">
<item name="component" xsi:type="string">Magento_Ui/js/grid/provider</item>
</item>
</argument>
</dataSource>
<listingToolbar name="listing_top">
<argument name="data" xsi:type="array">
<item name="config" xsi:type="array">
<item name="sticky" xsi:type="boolean">true</item>
</item>
<item name="buttons" xsi:type="array">
<item name="export" xsi:type="array">
<item name="name" xsi:type="string">export</item>
<item name="label" xsi:type="string" translate="true">Export</item>
<item name="class" xsi:type="string">primary</item>
<item name="url" xsi:type="string">*/*/Export_export</item>
</item>
</item>
</argument>
<bookmark name="bookmarks"/>
<columnsControls name="columns_controls"/>
<filters name="listing_filters"/>
<paging name="listing_paging" />
</listingToolbar>
<columns name="show_ecomexpress_awb_columns">
<argument name="data" xsi:type="array">
<item name="config" xsi:type="array">
<item name="storageConfig" xsi:type="array">
<item name="provider" xsi:type="string">show_ecomexpress_awb.show_ecomexpress_awb.listing_top.bookmarks</item>
<item name="namespace" xsi:type="string">current</item>
</item>
<item name="childDefaults" xsi:type="array">
<item name="fieldAction" xsi:type="array">
<item name="provider" xsi:type="string">show_ecomexpress_awb.show_ecomexpress_awb.show_ecomexpress_awb_columns.actions</item>
<item name="target" xsi:type="string">applyAction</item>
<item name="params" xsi:type="array">
<item name="0" xsi:type="string">edit</item>
<item name="1" xsi:type="string">${ $.$data.rowIndex }</item>
</item>
</item>
<item name="storageConfig" xsi:type="array">
<item name="provider" xsi:type="string">show_ecomexpress_awb.show_ecomexpress_awb.listing_top.bookmarks</item>
<item name="root" xsi:type="string">columns.${ $.index }</item>
<item name="namespace" xsi:type="string">current.${ $.storageConfig.root}</item>
</item>
</item>
</item>
</argument>
<column name="awb_id">
<argument name="data" xsi:type="array">
<item name="config" xsi:type="array">
<item name="filter" xsi:type="string">text</item>
<item name="component" xsi:type="string">Magento_Ui/js/grid/columns/column</item>
<item name="dataType" xsi:type="string">text</item>
<item name="label" xsi:type="string" translate="true">Awb Id</item>
<item name="sortOrder" xsi:type="number">1</item>
</item>
</argument>
</column>
<column name="awb">
<argument name="data" xsi:type="array">
<item name="config" xsi:type="array">
<item name="filter" xsi:type="string">text</item>
<item name="component" xsi:type="string">Magento_Ui/js/grid/columns/column</item>
<item name="dataType" xsi:type="string">text</item>
<item name="label" xsi:type="string" translate="true">Awb</item>
<item name="sortOrder" xsi:type="number">2</item>
</item>
</argument>
</column>
<column name="shipment_to">
<argument name="data" xsi:type="array">
<item name="config" xsi:type="array">
<item name="filter" xsi:type="string">text</item>
<item name="component" xsi:type="string">Magento_Ui/js/grid/columns/column</item>
<item name="dataType" xsi:type="string">text</item>
<item name="label" xsi:type="string" translate="true">Ship to</item>
<item name="sortOrder" xsi:type="number">3</item>
</item>
</argument>
</column>
<!-- <column name="shipment_id">
<argument name="data" xsi:type="array">
<item name="config" xsi:type="array">
<item name="filter" xsi:type="string">text</item>
<item name="component" xsi:type="string">Magento_Ui/js/grid/columns/column</item>
<item name="dataType" xsi:type="string">text</item>
<item name="label" xsi:type="string" translate="true">Shipment#</item>
<item name="sortOrder" xsi:type="number">4</item>
</item>
</argument>
</column> -->
<actionsColumn name="shipment_id" class="Ecom\Ecomexpress\Ui\Renderer\Shipmentid">
<argument name="data" xsi:type="array">
<item name="config" xsi:type="array">
<item name="indexField" xsi:type="string">awb_id</item>
<item name="sortOrder" xsi:type="number">4</item>
<item name="label" xsi:type="string" translate="true">Shipment#</item>
</item>
</argument>
</actionsColumn>
<!-- <column name="state">
<argument name="data" xsi:type="array">
<item name="config" xsi:type="array">
<item name="filter" xsi:type="string">text</item>
<item name="component" xsi:type="string">Magento_Ui/js/grid/columns/column</item>
<item name="dataType" xsi:type="string">text</item>
<item name="label" xsi:type="string" translate="true">State</item>
<item name="sortOrder" xsi:type="number">5</item>
</item>
</argument>
</column> -->
<column name="state" class="Ecom\Ecomexpress\Ui\Renderer\Awbstatus">
<argument name="data" xsi:type="array">
<item name="config" xsi:type="array">
<item name="filter" xsi:type="string">text</item>
<item name="component" xsi:type="string">Magento_Ui/js/grid/columns/column</item>
<item name="dataType" xsi:type="string">text</item>
<item name="label" xsi:type="string" translate="true">State</item>
<item name="sortOrder" xsi:type="number">5</item>
</item>
</argument>
</column>
<column name="status">
<argument name="data" xsi:type="array">
<item name="config" xsi:type="array">
<item name="filter" xsi:type="string">text</item>
<item name="component" xsi:type="string">Magento_Ui/js/grid/columns/column</item>
<item name="dataType" xsi:type="string">text</item>
<item name="label" xsi:type="string" translate="true">Status</item>
<item name="sortOrder" xsi:type="number">6</item>
</item>
</argument>
</column>
<!-- <column name="orderid">
<argument name="data" xsi:type="array">
<item name="config" xsi:type="array">
<item name="filter" xsi:type="string">text</item>
<item name="component" xsi:type="string">Magento_Ui/js/grid/columns/column</item>
<item name="dataType" xsi:type="string">text</item>
<item name="label" xsi:type="string" translate="true">Order#</item>
<item name="sortOrder" xsi:type="number">7</item>
</item>
</argument>
</column> -->
<actionsColumn name="orderid" class="Ecom\Ecomexpress\Ui\Renderer\Orderid">
<argument name="data" xsi:type="array">
<item name="config" xsi:type="array">
<item name="indexField" xsi:type="string">orderid</item>
<item name="sortOrder" xsi:type="number">7</item>
<item name="label" xsi:type="string" translate="true">Order#</item>
</item>
</argument>
</actionsColumn>
<column name="awb_type">
<argument name="data" xsi:type="array">
<item name="config" xsi:type="array">
<item name="filter" xsi:type="string">text</item>
<item name="component" xsi:type="string">Magento_Ui/js/grid/columns/column</item>
<item name="dataType" xsi:type="string">text</item>
<item name="label" xsi:type="string" translate="true">AWB Type</item>
<item name="sortOrder" xsi:type="number">8</item>
</item>
</argument>
</column>
<column name="distributor_code" class="Ecom\Ecomexpress\Ui\Renderer\Distributorcode">
<argument name="data" xsi:type="array">
<item name="config" xsi:type="array">
<item name="filter" xsi:type="string"> </item>
<item name="component" xsi:type="string">Magento_Ui/js/grid/columns/column</item>
<item name="dataType" xsi:type="string">text</item>
<item name="label" xsi:type="string" translate="true">Distributor Code</item>
<item name="sortOrder" xsi:type="number">9</item>
</item>
</argument>
</column>
<column name="created_at">
<argument name="data" xsi:type="array">
<item name="config" xsi:type="array">
<item name="filter" xsi:type="string">text</item>
<item name="component" xsi:type="string">Magento_Ui/js/grid/columns/column</item>
<item name="dataType" xsi:type="string">text</item>
<item name="label" xsi:type="string" translate="true">Created At</item>
<item name="sortOrder" xsi:type="number">10</item>
</item>
</argument>
</column>
<column name="updated_at">
<argument name="data" xsi:type="array">
<item name="config" xsi:type="array">
<item name="filter" xsi:type="string">text</item>
<item name="component" xsi:type="string">Magento_Ui/js/grid/columns/column</item>
<item name="dataType" xsi:type="string">text</item>
<item name="label" xsi:type="string" translate="true">Updated At</item>
<item name="sortOrder" xsi:type="number">10</item>
</item>
</argument>
</column>
<column name="reverse_pickup_generated">
<argument name="data" xsi:type="array">
<item name="config" xsi:type="array">
<item name="filter" xsi:type="string">text</item>
<item name="component" xsi:type="string">Magento_Ui/js/grid/columns/column</item>
<item name="dataType" xsi:type="string">text</item>
<item name="label" xsi:type="string" translate="true">Reverse Pickup Generated</item>
<item name="sortOrder" xsi:type="number">10</item>
</item>
</argument>
</column>
<column name="in_used">
<argument name="data" xsi:type="array">
<item name="options" xsi:type="object">Magento\Config\Model\Config\Source\Yesno</item>
<item name="config" xsi:type="array">
<item name="sortOrder" xsi:type="number">60</item>
<item name="filter" xsi:type="string">select</item>
<item name="label" translate="true" xsi:type="string">In Used</item>
<item name="component" xsi:type="string">Magento_Ui/js/grid/columns/select</item>
<item name="dataType" xsi:type="string">select</item>
<item name="editor" xsi:type="array">
<item name="editorType" xsi:type="string">select</item>
</item>
</item>
</argument>
</column>
</columns>
</listing>
How can I do this?