Init des modules PaiementALivraison et LivraisonParSecteurs

This commit is contained in:
2021-02-02 11:01:58 +01:00
parent c1daba23d9
commit 2165100ac7
35 changed files with 3884 additions and 5 deletions

View File

@@ -0,0 +1,34 @@
<?xml version="1.0" encoding="UTF-8" ?>
<config xmlns="http://thelia.net/schema/dic/config"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://thelia.net/schema/dic/config http://thelia.net/schema/dic/config/thelia-1.0.xsd">
<loops>
<loop name="deliveryround" class="DeliveryRound\Loop\DeliveryRoundLoop" />
</loops>
<forms>
<form name="deliveryround_config_form" class="DeliveryRound\Form\DeliveryRoundConfigForm" />
<form name="deliveryround_form" class="DeliveryRound\Form\DeliveryRoundForm" />
<form name="deliveryround_delete_form" class="DeliveryRound\Form\DeliveryRoundDeleteForm" />
<form name="deliveryround_update_form" class="DeliveryRound\Form\DeliveryRoundUpdateForm" />
</forms>
<hooks>
<hook id="deliveryround.hook" class="DeliveryRound\Hook\DeliveryRoundHook" scope="request">
<tag name="hook.event_listener" event="module.configuration" type="back" method="onModuleConfig" />
<tag name="hook.event_listener" event="module.config-js" type="back" method="onModuleConfigJs" />
<tag name="hook.event_listener" event="order-delivery.extra" type="front" method="onOrderDeliveryExtra"/>
</hook>
</hooks>
<services>
<service id="send.deliveryround.mail" class="DeliveryRound\EventListeners\SendEMail" scope="request">
<argument type="service" id="thelia.parser" />
<argument type="service" id="mailer"/>
<tag name="kernel.event_subscriber"/>
</service>
</services>
</config>

View File

@@ -0,0 +1,22 @@
# This is a fix for InnoDB in MySQL >= 4.1.x
# It "suspends judgement" for fkey relationships until are tables are set.
SET FOREIGN_KEY_CHECKS = 0;
-- ---------------------------------------------------------------------
-- delivery_round
-- ---------------------------------------------------------------------
CREATE TABLE IF NOT EXISTS `delivery_round`
(
`id` INTEGER NOT NULL AUTO_INCREMENT,
`zip_code` VARCHAR(20) NOT NULL,
`city` VARCHAR(255) NOT NULL,
`address` TEXT,
`day` TINYINT NOT NULL,
`delivery_period` TEXT,
PRIMARY KEY (`id`)
) ENGINE=InnoDB;
# This restores the fkey checks, after having unset them earlier
SET FOREIGN_KEY_CHECKS = 1;

View File

@@ -0,0 +1,26 @@
<?xml version="1.0" encoding="UTF-8"?>
<module xmlns="http://thelia.net/schema/dic/module"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://thelia.net/schema/dic/module http://thelia.net/schema/dic/module/module-2_2.xsd">
<fullnamespace>DeliveryRound\DeliveryRound</fullnamespace>
<descriptive locale="en_US">
<title>Round management</title>
</descriptive>
<descriptive locale="fr_FR">
<title>Gestion des tournées</title>
</descriptive>
<languages>
<language>en_US</language>
<language>fr_FR</language>
</languages>
<version>1.2.2</version>
<authors>
<author>
<name>Etienne Perriere</name>
<email>eperriere@openstudio.fr</email>
</author>
</authors>
<type>delivery</type>
<thelia>2.2.0</thelia>
<stability>beta</stability>
</module>

View File

@@ -0,0 +1,23 @@
<?xml version="1.0" encoding="UTF-8" ?>
<routes xmlns="http://symfony.com/schema/routing"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://symfony.com/schema/routing http://symfony.com/schema/routing/routing-1.0.xsd">
<route id="deliveryround.config" path="/admin/module/DeliveryRound/config">
<default key="_controller">DeliveryRound:DeliveryRound:configure</default>
</route>
<route id="deliveryround.addlocation" path="/admin/module/DeliveryRound/addLocation">
<default key="_controller">DeliveryRound:DeliveryRound:addLocation</default>
</route>
<route id="deliveryround.delete" path="/admin/module/DeliveryRound/delete">
<default key="_controller">DeliveryRound:DeliveryRound:delete</default>
</route>
<route id="deliveryround.update" path="/admin/module/DeliveryRound/update">
<default key="_controller">DeliveryRound:DeliveryRound:update</default>
</route>
</routes>

View File

@@ -0,0 +1,16 @@
<?xml version="1.0" encoding="UTF-8"?>
<database defaultIdMethod="native" name="thelia"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="../../../../core/vendor/propel/propel/resources/xsd/database.xsd" >
<table name="delivery_round" namespace="DeliveryRound\Model">
<column autoIncrement="true" name="id" primaryKey="true" required="true" type="INTEGER" />
<column name="zip_code" required="true" type="VARCHAR" size="20" />
<column name="city" required="true" type="VARCHAR" size="255" />
<column name="address" type="LONGVARCHAR" />
<column name="day" required="true" type="ENUM" valueSet="monday, tuesday, wednesday, thursday, friday, saturday, sunday" />
<column name="delivery_period" type="LONGVARCHAR" />
</table>
<external-schema filename="local/config/schema.xml" referenceOnly="true" />
</database>

View File

@@ -0,0 +1,2 @@
# Sqlfile -> Database map
thelia.sql=thelia

View File

@@ -0,0 +1,24 @@
# This is a fix for InnoDB in MySQL >= 4.1.x
# It "suspends judgement" for fkey relationships until are tables are set.
SET FOREIGN_KEY_CHECKS = 0;
-- ---------------------------------------------------------------------
-- delivery_round
-- ---------------------------------------------------------------------
DROP TABLE IF EXISTS `delivery_round`;
CREATE TABLE `delivery_round`
(
`id` INTEGER NOT NULL AUTO_INCREMENT,
`zip_code` VARCHAR(20) NOT NULL,
`city` VARCHAR(255) NOT NULL,
`address` TEXT,
`day` TINYINT NOT NULL,
`delivery_period` TEXT,
PRIMARY KEY (`id`)
) ENGINE=InnoDB;
# This restores the fkey checks, after having unset them earlier
SET FOREIGN_KEY_CHECKS = 1;