Skip to content

Commit

Permalink
MA2-272 - Fixed sorting of API and TransactionStatus logs
Browse files Browse the repository at this point in the history
  • Loading branch information
FatchipRobert committed Apr 20, 2023
1 parent 9bfa748 commit b3308ae
Show file tree
Hide file tree
Showing 5 changed files with 224 additions and 339 deletions.
10 changes: 5 additions & 5 deletions view/adminhtml/requirejs-config.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,12 @@
/*jshint browser:true jquery:true*/
/*global alert*/

/* deactivated for now since no mixins are needed at the moment, file stays for potential future use
var config = {
config: {
mixins: {}
mixins: {
'Magento_Ui/js/grid/data-storage': {
'Payone_Core/js/grid/data-storage-mixin': true
}
}
}
};
*/
1 change: 0 additions & 1 deletion view/adminhtml/ui_component/payone_orders_grid.xml
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,6 @@
<bookmark name="bookmarks"/>
<columnsControls name="columns_controls"/>
<exportButton name="export_button"/>
<filterSearch name="fulltext"/>
<filters name="listing_filters">
<filterSelect name="store_id" provider="${ $.parentName }">
<settings>
Expand Down
231 changes: 77 additions & 154 deletions view/adminhtml/ui_component/payone_protocol_api_grid.xml
Original file line number Diff line number Diff line change
Expand Up @@ -28,180 +28,103 @@
<argument name="data" xsi:type="array">
<item name="js_config" xsi:type="array">
<item name="provider" xsi:type="string">payone_protocol_api_grid.payone_protocol_api_grid_data_source</item>
<item name="deps" xsi:type="string">payone_protocol_api_grid.payone_protocol_api_grid_data_source</item>
</item>
<item name="spinner" xsi:type="string">payone_protocol_api_columns</item>
</argument>
<dataSource name="payone_protocol_api_grid_data_source">
<argument name="dataProvider" xsi:type="configurableObject">
<argument name="class" xsi:type="string">Magento\Framework\View\Element\UiComponent\DataProvider\DataProvider</argument>
<argument name="name" xsi:type="string">payone_protocol_api_grid_data_source</argument>
<argument name="primaryFieldName" xsi:type="string">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>
</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>
<settings>
<spinner>payone_protocol_api_columns</spinner>
<deps>
<dep>payone_protocol_api_grid.payone_protocol_api_grid_data_source</dep>
</deps>
</settings>
<dataSource name="payone_protocol_api_grid_data_source" component="Magento_Ui/js/grid/provider">
<settings>
<updateUrl path="mui/index/render"/>
</settings>
<aclResource>Payone_Core::payone_protocol_api</aclResource>
<dataProvider class="Magento\Framework\View\Element\UiComponent\DataProvider\DataProvider" name="payone_protocol_api_grid_data_source">
<settings>
<requestFieldName>id</requestFieldName>
<primaryFieldName>main_table.id</primaryFieldName>
</settings>
</dataProvider>
</dataSource>
<container name="listing_top">
<argument name="data" xsi:type="array">
<item name="config" xsi:type="array">
<item name="template" xsi:type="string">ui/grid/toolbar</item>
</item>
</argument>
<bookmark name="bookmarks">
<argument name="data" xsi:type="array">
<item name="config" xsi:type="array">
<item name="storageConfig" xsi:type="array">
<item name="namespace" xsi:type="string">payone_protocol_api_grid</item>
</item>
</item>
</argument>
</bookmark>
<component name="columns_controls">
<argument name="data" xsi:type="array">
<item name="config" xsi:type="array">
<item name="columnsData" xsi:type="array">
<item name="provider" xsi:type="string">payone_protocol_api_grid.payone_protocol_api_grid.payone_protocol_api_columns</item>
</item>
<item name="component" xsi:type="string">Magento_Ui/js/grid/controls/columns</item>
<item name="displayArea" xsi:type="string">dataGridActions</item>
</item>
</argument>
</component>
<listingToolbar name="listing_top">
<settings>
<sticky>true</sticky>
</settings>
<bookmark name="bookmarks"/>
<columnsControls name="columns_controls"/>
<filters name="listing_filters">
<argument name="data" xsi:type="array">
<item name="config" xsi:type="array">
<item name="columnsProvider" xsi:type="string">payone_protocol_api_grid.payone_protocol_api_grid.payone_protocol_api_columns</item>
<item name="storageConfig" xsi:type="array">
<item name="provider" xsi:type="string">payone_protocol_api_grid.payone_protocol_api_grid.listing_top.bookmarks</item>
<item name="namespace" xsi:type="string">current.filters</item>
</item>
<item name="childDefaults" xsi:type="array">
<item name="provider" xsi:type="string">payone_protocol_api_grid.payone_protocol_api_grid.listing_top.listing_filters</item>
<item name="imports" xsi:type="array">
<item name="visible" xsi:type="string">payone_protocol_api_grid.payone_protocol_api_grid.payone_protocol_api_columns.${ $.index }:visible</item>
</item>
</item>
</item>
</argument>
<filterSelect name="store_id">
<argument name="optionsProvider" xsi:type="configurableObject">
<argument name="class" xsi:type="string">Magento\Store\Ui\Component\Listing\Column\Store\Options</argument>
</argument>
<argument name="data" xsi:type="array">
<item name="config" xsi:type="array">
<item name="caption" xsi:type="string" translate="true">All Store Views</item>
<item name="dataScope" xsi:type="string">store_id</item>
<item name="label" xsi:type="string" translate="true">Store-ID</item>
</item>
</argument>
<filterSelect name="store_id" provider="${ $.parentName }">
<settings>
<options class="Magento\Store\Ui\Component\Listing\Column\Store\Options"/>
<caption translate="true">All Store Views</caption>
<label translate="true">Purchase Point</label>
<dataScope>store_id</dataScope>
<imports>
<link name="visible">ns = ${ $.ns }, index = ${ $.index }:visible</link>
</imports>
</settings>
</filterSelect>
</filters>
<paging name="listing_paging">
<argument name="data" xsi:type="array">
<item name="config" xsi:type="array">
<item name="storageConfig" xsi:type="array">
<item name="provider" xsi:type="string">payone_protocol_api_grid.payone_protocol_api_grid.listing_top.bookmarks</item>
<item name="namespace" xsi:type="string">current.paging</item>
</item>
<item name="selectProvider" xsi:type="string">payone_protocol_api_grid.payone_protocol_api_grid.payone_protocol_api_columns.ids</item>
</item>
</argument>
</paging>
</container>
<paging name="listing_paging"/>
</listingToolbar>
<columns name="payone_protocol_api_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">payone_protocol_api_grid.payone_protocol_api_grid.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">payone_protocol_api_grid.payone_protocol_api_grid.payone_protocol_api_columns.actions</item>
<item name="target" xsi:type="string">applyAction</item>
<item name="params" xsi:type="array">
<item name="0" xsi:type="string">view</item>
<item name="1" xsi:type="string">${ $.$data.rowIndex }</item>
</item>
</item>
<item name="storageConfig" xsi:type="array">
<item name="provider" xsi:type="string">payone_protocol_api_grid.payone_protocol_api_grid.listing_top.bookmarks</item>
<item name="root" xsi:type="string">columns.${ $.index }</item>
<item name="namespace" xsi:type="string">current.${ $.storageConfig.root}</item>
<settings>
<childDefaults>
<param name="fieldAction" xsi:type="array">
<item name="provider" xsi:type="string">payone_protocol_api_grid.payone_protocol_api_grid.payone_protocol_api_columns.actions</item>
<item name="target" xsi:type="string">applyAction</item>
<item name="params" xsi:type="array">
<item name="0" xsi:type="string">view</item>
<item name="1" xsi:type="string">${ $.$data.rowIndex }</item>
</item>
</item>
</item>
</argument>
</param>
</childDefaults>
</settings>
<column name="id">
<argument name="data" xsi:type="array">
<item name="config" xsi:type="array">
<item name="indexField" xsi:type="string">id</item>
<item name="sorting" xsi:type="string">desc</item>
<item name="label" xsi:type="string" translate="true">ID</item>
</item>
</argument>
<settings>
<indexField>id</indexField>
<sorting>desc</sorting>
<label translate="true">ID</label>
</settings>
</column>
<column name="order_id">
<argument name="data" xsi:type="array">
<item name="config" xsi:type="array">
<item name="filter" xsi:type="string">text</item>
<item name="sorting" xsi:type="string">asc</item>
<item name="label" xsi:type="string" translate="true">OrderId</item>
</item>
</argument>
<settings>
<filter>text</filter>
<label translate="true">OrderId</label>
</settings>
</column>
<column name="txid">
<argument name="data" xsi:type="array">
<item name="config" xsi:type="array">
<item name="filter" xsi:type="string">text</item>
<item name="label" xsi:type="string" translate="true">Txid</item>
</item>
</argument>
<settings>
<filter>text</filter>
<label translate="true">Txid</label>
</settings>
</column>
<column name="refnr">
<argument name="data" xsi:type="array">
<item name="config" xsi:type="array">
<item name="filter" xsi:type="string">text</item>
<item name="label" xsi:type="string" translate="true">RefNr</item>
</item>
</argument>
<settings>
<filter>text</filter>
<label translate="true">RefNr</label>
</settings>
</column>
<column name="requesttype">
<argument name="data" xsi:type="array">
<item name="config" xsi:type="array">
<item name="filter" xsi:type="string">text</item>
<item name="sorting" xsi:type="string">asc</item>
<item name="label" xsi:type="string" translate="true">Request</item>
</item>
</argument>
<settings>
<filter>text</filter>
<label translate="true">Request</label>
</settings>
</column>
<column name="responsestatus">
<argument name="data" xsi:type="array">
<item name="config" xsi:type="array">
<item name="filter" xsi:type="string">text</item>
<item name="sorting" xsi:type="string">asc</item>
<item name="label" xsi:type="string" translate="true">Response</item>
</item>
</argument>
<settings>
<filter>text</filter>
<label translate="true">Response</label>
</settings>
</column>
<column name="timestamp" class="Magento\Ui\Component\Listing\Columns\Date">
<argument name="data" xsi:type="array">
<item name="config" xsi:type="array">
<item name="filter" xsi:type="string">dateRange</item>
<item name="component" xsi:type="string">Magento_Ui/js/grid/columns/date</item>
<item name="dataType" xsi:type="string">date</item>
<item name="label" xsi:type="string" translate="true">Create Date</item>
</item>
</argument>
<column name="timestamp" class="Magento\Ui\Component\Listing\Columns\Date" component="Magento_Ui/js/grid/columns/date">
<settings>
<filter>dateRange</filter>
<dataType>date</dataType>
<label translate="true">Create Date</label>
</settings>
</column>
<actionsColumn name="actions" class="Payone\Core\Ui\Component\Listing\Column\ViewAction">
<argument name="data" xsi:type="array">
Expand Down
Loading

0 comments on commit b3308ae

Please sign in to comment.