init
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
<?xml version="1.0"?>
|
||||
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:noNamespaceSchemaLocation="urn:magento:framework/Acl/etc/acl.xsd">
|
||||
<acl>
|
||||
<resources>
|
||||
<resource id="Magento_Backend::admin">
|
||||
<resource id="Magento_Catalog::catalog">
|
||||
<resource id="Esun_Agent::agents" title="Agent Management" sortOrder="60">
|
||||
<resource id="Esun_Agent::save" title="Save Agents" sortOrder="10"/>
|
||||
<resource id="Esun_Agent::delete" title="Delete Agents" sortOrder="20"/>
|
||||
<resource id="Esun_Agent::applications" title="Agent Applications" sortOrder="30">
|
||||
<resource id="Esun_Agent::applications_delete" title="Delete Agent Applications" sortOrder="10"/>
|
||||
</resource>
|
||||
</resource>
|
||||
</resource>
|
||||
</resource>
|
||||
</resources>
|
||||
</acl>
|
||||
</config>
|
||||
@@ -0,0 +1,20 @@
|
||||
<?xml version="1.0"?>
|
||||
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Backend:etc/menu.xsd">
|
||||
<menu>
|
||||
<add id="Esun_Agent::agents"
|
||||
title="Agents Management"
|
||||
module="Esun_Agent"
|
||||
sortOrder="60"
|
||||
parent="Esun_ImageManager::esun"
|
||||
action="esun_agent/agent/index"
|
||||
resource="Esun_Agent::agents"/>
|
||||
<add id="Esun_Agent::applications"
|
||||
title="Agent Applications"
|
||||
module="Esun_Agent"
|
||||
sortOrder="70"
|
||||
parent="Esun_ImageManager::esun"
|
||||
action="esun_agent/application/index"
|
||||
resource="Esun_Agent::applications"/>
|
||||
</menu>
|
||||
</config>
|
||||
@@ -0,0 +1,9 @@
|
||||
<?xml version="1.0"?>
|
||||
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:noNamespaceSchemaLocation="urn:magento:framework/App/etc/routes.xsd">
|
||||
<router id="admin">
|
||||
<route id="esun_agent" frontName="esun_agent">
|
||||
<module name="Esun_Agent" before="Magento_Backend"/>
|
||||
</route>
|
||||
</router>
|
||||
</config>
|
||||
@@ -0,0 +1,53 @@
|
||||
<?xml version="1.0"?>
|
||||
<schema xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:noNamespaceSchemaLocation="urn:magento:framework:Setup/Declaration/Schema/etc/schema.xsd">
|
||||
<table name="esun_agent" resource="default" engine="innodb" comment="eSUN Agents">
|
||||
<column xsi:type="int" name="entity_id" unsigned="true" nullable="false" identity="true" comment="Entity ID"/>
|
||||
<column xsi:type="varchar" name="system_name" nullable="false" length="255" comment="System Name"/>
|
||||
<column xsi:type="varchar" name="name" nullable="false" length="255" comment="Company Name"/>
|
||||
<column xsi:type="varchar" name="continent" nullable="false" length="32" comment="Continent Code"/>
|
||||
<column xsi:type="varchar" name="country_code" nullable="false" length="2" comment="Country Code"/>
|
||||
<column xsi:type="varchar" name="country" nullable="false" length="128" comment="Country Name"/>
|
||||
<column xsi:type="varchar" name="website" nullable="false" length="1024" default="" comment="Website"/>
|
||||
<column xsi:type="text" name="address" nullable="false" comment="Address"/>
|
||||
<column xsi:type="varchar" name="logo" nullable="false" length="255" default="" comment="Logo Path"/>
|
||||
<column xsi:type="varchar" name="note" nullable="false" length="255" default="" comment="Public Note"/>
|
||||
<column xsi:type="decimal" name="map_x" nullable="true" scale="3" precision="6" comment="Map X Percent"/>
|
||||
<column xsi:type="decimal" name="map_y" nullable="true" scale="3" precision="6" comment="Map Y Percent"/>
|
||||
<column xsi:type="smallint" name="sort_order" unsigned="true" nullable="false" default="0" comment="Sort Order"/>
|
||||
<column xsi:type="smallint" name="is_active" unsigned="true" nullable="false" default="1" comment="Is Active"/>
|
||||
<column xsi:type="timestamp" name="created_at" on_update="false" nullable="false" default="CURRENT_TIMESTAMP" comment="Created At"/>
|
||||
<column xsi:type="timestamp" name="updated_at" on_update="true" nullable="false" default="CURRENT_TIMESTAMP" comment="Updated At"/>
|
||||
<constraint xsi:type="primary" referenceId="PRIMARY">
|
||||
<column name="entity_id"/>
|
||||
</constraint>
|
||||
<index referenceId="ESUN_AGENT_CONTINENT" indexType="btree">
|
||||
<column name="continent"/>
|
||||
</index>
|
||||
<index referenceId="ESUN_AGENT_COUNTRY_CODE" indexType="btree">
|
||||
<column name="country_code"/>
|
||||
</index>
|
||||
<index referenceId="ESUN_AGENT_IS_ACTIVE_SORT_ORDER" indexType="btree">
|
||||
<column name="is_active"/>
|
||||
<column name="sort_order"/>
|
||||
</index>
|
||||
</table>
|
||||
<table name="esun_agent_application" resource="default" engine="innodb" comment="eSUN Agent Applications">
|
||||
<column xsi:type="int" name="entity_id" unsigned="true" nullable="false" identity="true" comment="Entity ID"/>
|
||||
<column xsi:type="varchar" name="company_name" nullable="false" length="255" comment="Company Name"/>
|
||||
<column xsi:type="varchar" name="contact_person" nullable="false" length="255" comment="Contact Person"/>
|
||||
<column xsi:type="varchar" name="country" nullable="false" length="255" comment="Country"/>
|
||||
<column xsi:type="varchar" name="email" nullable="false" length="255" comment="Email"/>
|
||||
<column xsi:type="text" name="message" nullable="false" comment="Other Message"/>
|
||||
<column xsi:type="timestamp" name="created_at" on_update="false" nullable="false" default="CURRENT_TIMESTAMP" comment="Created At"/>
|
||||
<constraint xsi:type="primary" referenceId="PRIMARY">
|
||||
<column name="entity_id"/>
|
||||
</constraint>
|
||||
<index referenceId="ESUN_AGENT_APPLICATION_EMAIL" indexType="btree">
|
||||
<column name="email"/>
|
||||
</index>
|
||||
<index referenceId="ESUN_AGENT_APPLICATION_CREATED_AT" indexType="btree">
|
||||
<column name="created_at"/>
|
||||
</index>
|
||||
</table>
|
||||
</schema>
|
||||
@@ -0,0 +1,48 @@
|
||||
{
|
||||
"esun_agent": {
|
||||
"column": {
|
||||
"entity_id": true,
|
||||
"system_name": true,
|
||||
"name": true,
|
||||
"continent": true,
|
||||
"country_code": true,
|
||||
"country": true,
|
||||
"website": true,
|
||||
"address": true,
|
||||
"logo": true,
|
||||
"note": true,
|
||||
"map_x": true,
|
||||
"map_y": true,
|
||||
"sort_order": true,
|
||||
"is_active": true,
|
||||
"created_at": true,
|
||||
"updated_at": true
|
||||
},
|
||||
"index": {
|
||||
"ESUN_AGENT_CONTINENT": true,
|
||||
"ESUN_AGENT_COUNTRY_CODE": true,
|
||||
"ESUN_AGENT_IS_ACTIVE_SORT_ORDER": true
|
||||
},
|
||||
"constraint": {
|
||||
"PRIMARY": true
|
||||
}
|
||||
},
|
||||
"esun_agent_application": {
|
||||
"column": {
|
||||
"entity_id": true,
|
||||
"company_name": true,
|
||||
"contact_person": true,
|
||||
"country": true,
|
||||
"email": true,
|
||||
"message": true,
|
||||
"created_at": true
|
||||
},
|
||||
"index": {
|
||||
"ESUN_AGENT_APPLICATION_EMAIL": true,
|
||||
"ESUN_AGENT_APPLICATION_CREATED_AT": true
|
||||
},
|
||||
"constraint": {
|
||||
"PRIMARY": true
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,57 @@
|
||||
<?xml version="1.0"?>
|
||||
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd">
|
||||
<virtualType name="EsunAgentGridCollection"
|
||||
type="Magento\Framework\View\Element\UiComponent\DataProvider\SearchResult">
|
||||
<arguments>
|
||||
<argument name="mainTable" xsi:type="string">esun_agent</argument>
|
||||
<argument name="resourceModel" xsi:type="string">Esun\Agent\Model\ResourceModel\Agent</argument>
|
||||
</arguments>
|
||||
</virtualType>
|
||||
<type name="Magento\Framework\View\Element\UiComponent\DataProvider\CollectionFactory">
|
||||
<arguments>
|
||||
<argument name="collections" xsi:type="array">
|
||||
<item name="esun_agent_listing_data_source" xsi:type="string">EsunAgentGridCollection</item>
|
||||
<item name="esun_agent_application_listing_data_source" xsi:type="string">EsunAgentApplicationGridCollection</item>
|
||||
</argument>
|
||||
</arguments>
|
||||
</type>
|
||||
|
||||
<virtualType name="EsunAgentApplicationGridCollection"
|
||||
type="Magento\Framework\View\Element\UiComponent\DataProvider\SearchResult">
|
||||
<arguments>
|
||||
<argument name="mainTable" xsi:type="string">esun_agent_application</argument>
|
||||
<argument name="resourceModel" xsi:type="string">Esun\Agent\Model\ResourceModel\Application</argument>
|
||||
</arguments>
|
||||
</virtualType>
|
||||
|
||||
<virtualType name="EsunAgentImageUploader" type="Magento\Catalog\Model\ImageUploader">
|
||||
<arguments>
|
||||
<argument name="baseTmpPath" xsi:type="string">agent/tmp/logo</argument>
|
||||
<argument name="basePath" xsi:type="string">agent/logo</argument>
|
||||
<argument name="allowedExtensions" xsi:type="array">
|
||||
<item name="jpg" xsi:type="string">jpg</item>
|
||||
<item name="jpeg" xsi:type="string">jpeg</item>
|
||||
<item name="png" xsi:type="string">png</item>
|
||||
<item name="gif" xsi:type="string">gif</item>
|
||||
<item name="webp" xsi:type="string">webp</item>
|
||||
</argument>
|
||||
<argument name="allowedMimeTypes" xsi:type="array">
|
||||
<item name="jpg" xsi:type="string">image/jpeg</item>
|
||||
<item name="png" xsi:type="string">image/png</item>
|
||||
<item name="gif" xsi:type="string">image/gif</item>
|
||||
<item name="webp" xsi:type="string">image/webp</item>
|
||||
</argument>
|
||||
</arguments>
|
||||
</virtualType>
|
||||
<type name="Esun\Agent\Controller\Adminhtml\Agent\Upload">
|
||||
<arguments>
|
||||
<argument name="imageUploader" xsi:type="object">EsunAgentImageUploader</argument>
|
||||
</arguments>
|
||||
</type>
|
||||
<type name="Esun\Agent\Controller\Adminhtml\Agent\Save">
|
||||
<arguments>
|
||||
<argument name="imageUploader" xsi:type="object">EsunAgentImageUploader</argument>
|
||||
</arguments>
|
||||
</type>
|
||||
</config>
|
||||
@@ -0,0 +1,9 @@
|
||||
<?xml version="1.0"?>
|
||||
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:noNamespaceSchemaLocation="urn:magento:framework/App/etc/routes.xsd">
|
||||
<router id="standard">
|
||||
<route id="agent" frontName="agents">
|
||||
<module name="Esun_Agent"/>
|
||||
</route>
|
||||
</router>
|
||||
</config>
|
||||
@@ -0,0 +1,13 @@
|
||||
<?xml version="1.0"?>
|
||||
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:noNamespaceSchemaLocation="urn:magento:framework:Module/etc/module.xsd">
|
||||
<module name="Esun_Agent">
|
||||
<sequence>
|
||||
<module name="Magento_Catalog"/>
|
||||
<module name="Magento_Directory"/>
|
||||
<module name="Magento_Theme"/>
|
||||
<module name="Magento_Ui"/>
|
||||
<module name="Esun_ImageManager"/>
|
||||
</sequence>
|
||||
</module>
|
||||
</config>
|
||||
Reference in New Issue
Block a user