Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
30d4c85250 | ||
|
|
6170e5f499 | ||
|
|
b1d56d85c0 | ||
|
|
3c76533541 | ||
|
|
076c03d6c6 | ||
|
|
4f1b4d90a6 | ||
|
|
10f916f262 | ||
|
|
744581bad9 | ||
|
|
b80fe490dc | ||
|
|
179e35a88b | ||
|
|
28b825db07 | ||
|
|
d8c72cf249 | ||
|
|
c4250cc201 | ||
|
|
f54f78b03e | ||
|
|
97a9c1c4e3 | ||
|
|
6ca6e89cd5 | ||
|
|
f5d09537b9 | ||
|
|
a5c34cc6a0 | ||
|
|
5c9fe38c4b | ||
|
|
feff65ab36 | ||
|
|
c8a354e868 | ||
|
|
ccd46e79fc | ||
|
|
6c6eec0b78 | ||
|
|
7662ce8771 | ||
|
|
8c8e9352d3 | ||
|
|
6e28c2a5db | ||
|
|
33d97a2f93 | ||
|
|
5f6c97d146 | ||
|
|
e9a7ccad4a | ||
|
|
93f3d362a4 | ||
|
|
1b84212da5 | ||
|
|
b646670848 |
@@ -0,0 +1 @@
|
||||
1.5.2
|
||||
@@ -6,8 +6,11 @@ ENV?="dev"
|
||||
#To compile project with plugins, add PLUGINS=1 or type `export PLUGINS=1`
|
||||
|
||||
install:
|
||||
#copy config file from template
|
||||
cp config.xml.dist config.xml
|
||||
#copy config file from template first time only
|
||||
@if [ ! -f config.xml ]; then \
|
||||
cp config.xml.dist config.xml; \
|
||||
fi
|
||||
|
||||
@if [ $(ENV) = "dev" ]; then \
|
||||
make install_dev; \
|
||||
fi
|
||||
@@ -37,6 +40,7 @@ install_dev:
|
||||
@make css
|
||||
@make compile
|
||||
@make frontend
|
||||
@make templates
|
||||
@echo "Well, it looks like everything is fine : librairies are installed, backend and frontend has been compiled !"
|
||||
|
||||
|
||||
@@ -46,7 +50,7 @@ compile:
|
||||
echo "compile Cagette.net with plugins"; \
|
||||
haxe cagetteAllPlugins.hxml; \
|
||||
else \
|
||||
echo "compile Cagette.net core"; \
|
||||
echo "compile CagettePéi core"; \
|
||||
haxe cagette.hxml; \
|
||||
fi
|
||||
|
||||
@@ -62,6 +66,8 @@ frontend:
|
||||
else \
|
||||
haxe cagetteJs.hxml; \
|
||||
fi
|
||||
mkdir -p tmp
|
||||
chown www-data:www-data tmp
|
||||
|
||||
#update POT file from source
|
||||
i18n:
|
||||
@@ -69,11 +75,9 @@ i18n:
|
||||
|
||||
#compile templates in each language, required for production env.
|
||||
templates:
|
||||
haxe cagette.hxml -D i18n_generation
|
||||
mkdir -p lang/master/tmp
|
||||
haxe cagette.hxml -D i18n_generation
|
||||
@make LANG=fr ctemplates
|
||||
#@make LANG=en ctemplates
|
||||
#@make LANG=de ctemplates
|
||||
msgfmt www/lang/texts_fr.po -o www/lang/texts_fr.mo
|
||||
chown www-data:www-data -R www
|
||||
|
||||
|
||||
@@ -1,4 +1,8 @@
|
||||
# Cagette péi
|
||||
|
||||
Fourche du logiciel Cagette.net à partir de la version 0.9.2 Novembre 2018
|
||||
Fourche du logiciel [Cagette.net](https://github.com/CagetteNet) à partir de la version 0.9.2 Novembre 2018
|
||||
|
||||
Certaines portions du code source de Cagette.net n'étant plus disponibles en téléchargement,
|
||||
j'ai repris sur la base d'un existant pour adapter au marché local réunionnais et leurs AMAPéi.
|
||||
|
||||
|
||||
|
||||
+23
-9
@@ -1,19 +1,33 @@
|
||||
-lib templo:3.0.0
|
||||
-lib hxevents:0.4.0
|
||||
-lib thx.semver:0.2.2
|
||||
-lib thx.csv:0.2.0
|
||||
# LOCKED LIBS
|
||||
-lib asys:0.3.0
|
||||
-lib datetime:3.1.1
|
||||
-lib history:0.0.1
|
||||
-lib hscript:2.3.0
|
||||
-lib hxevents:0.4.0
|
||||
-lib mime:0.1.2
|
||||
-lib modular:0.10.15
|
||||
-lib smtpmailer:0.4.0
|
||||
-lib tink_json:0.9.0
|
||||
-lib templo:3.0.0
|
||||
-lib thx.core:0.43.0
|
||||
-lib thx.csv:0.2.0
|
||||
-lib thx.semver:0.2.2
|
||||
-lib tink_await:0.6.0
|
||||
-lib tink_chunk:0.3.1
|
||||
-lib tink_core:1.18.0
|
||||
-lib tink_io:0.5.0
|
||||
-lib tink_json:0.9.0
|
||||
-lib tink_macro:0.21.1
|
||||
-lib tink_priority:0.1.4
|
||||
-lib tink_streams:0.2.1
|
||||
-lib tink_syntaxhub:0.4.3
|
||||
-lib tink_typecrawler:0.7.0
|
||||
|
||||
## GIT
|
||||
-lib sugoi:git:https://git.artcode.re/cagetters/sugoi.git
|
||||
-lib record-macros:git:https://git.artcode.re/cagetters/record-macros.git
|
||||
-lib dbadmin:git:https://git.artcode.re/cagetters/dbadmin.git
|
||||
|
||||
-lib sugoi:git:git@artcode.re:cagetters/sugoi.git
|
||||
-lib record-macros:git:git@artcode.re:cagetters/record-macros.git
|
||||
-lib dbadmin:git:git@artcode.re:cagetters/dbadmin.git
|
||||
|
||||
## SCRIPT
|
||||
-cp common
|
||||
-cp src
|
||||
-cp lang/master/tpl
|
||||
|
||||
+2
-2
@@ -1,8 +1,8 @@
|
||||
-dce no
|
||||
-cp common
|
||||
-cp js
|
||||
-lib sugoi:git:git@artcode.re:cagetters/sugoi.git
|
||||
-lib hxleaflet:git:git@artcode.re:cagetters/hxleaflet.git
|
||||
-lib sugoi:git:https://git.artcode.re/cagetters/sugoi.git
|
||||
-lib hxleaflet:git:https://git.artcode.re//hxleaflet.git
|
||||
-lib react:1.4.0
|
||||
-lib react-router-4:0.2.3
|
||||
-lib modular:0.10.15
|
||||
|
||||
+14
-24
@@ -1,29 +1,19 @@
|
||||
<config
|
||||
|
||||
database = "mysql://<USER>:<PASSWORD>@<HOST>/<DBNAME>"
|
||||
host = "<URL without http>"
|
||||
name = "<HTML head title>"
|
||||
default_email = "<EMAIL>"
|
||||
webmaster_email = "<EMAIL>"
|
||||
key = "<SECRET_PHRASE>"
|
||||
|
||||
maintain="0"
|
||||
cache="1"
|
||||
cachetpl="0"
|
||||
debug="0"
|
||||
sqllog="0"
|
||||
|
||||
lang="fr"
|
||||
langs="fr"
|
||||
langnames="Français"
|
||||
|
||||
host="www.amapeisudreunion.com"
|
||||
name = "AMAPEI Sud Réunion"
|
||||
default_email = "admin@amapeisudreunion.com"
|
||||
webmaster_email = "postmaster@amapeisudreunion.com"
|
||||
|
||||
database="mysql://cagette:cagette@ct1/cagette"
|
||||
sqllog="0"
|
||||
|
||||
debug="0"
|
||||
cache="1"
|
||||
maintain="0"
|
||||
cachetpl="0"
|
||||
key="carotteMagique"
|
||||
|
||||
smtp_host="localhost"
|
||||
smtp_port="25"
|
||||
smtp_user=""
|
||||
smtp_pass=""
|
||||
|
||||
mt.net.form.Form.HTML5 = "1"
|
||||
mt.net.form.Form.USE_TWITTER_BOOTSTRAP = "1"
|
||||
|
||||
google_geocoding_key="googlekey"
|
||||
/>
|
||||
|
||||
+9
-3
@@ -164,7 +164,13 @@ class ShopCart
|
||||
var groups = new Map<Int,{name:String,products:Array<ProductInfo>}>();
|
||||
var pinned = new Map<Int,{name:String,products:Array<ProductInfo>}>();
|
||||
|
||||
var firstCategGroup = this.categories[0].categs;
|
||||
|
||||
trace(this.categories);
|
||||
var firstCategGroup = null;
|
||||
if (this.categories.length > 0){
|
||||
firstCategGroup = this.categories[0].categs;
|
||||
}
|
||||
|
||||
|
||||
//trace(firstCategGroup);
|
||||
//trace(pinnedCategories);
|
||||
@@ -181,7 +187,7 @@ class ShopCart
|
||||
|
||||
for ( categ in p.categories){
|
||||
|
||||
if (Lambda.find(firstCategGroup, function(c) return c.id == categ) != null){
|
||||
if (firstCategGroup != null && Lambda.find(firstCategGroup, function(c) return c.id == categ) != null){
|
||||
|
||||
//is in this category group
|
||||
var g = groups.get(categ);
|
||||
@@ -442,4 +448,4 @@ class ShopCart
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
<h1>::groupName::</h1>
|
||||
::else::
|
||||
<div style="margin-bottom:22px;" >
|
||||
<a href="http://www.cagette.net" target="_blank">
|
||||
<a href="https://git.artcode.re/cagetters/cagette" target="_blank">
|
||||
<img src="/img/logo3.png" alt="::NAME::" />
|
||||
</a>
|
||||
</div>
|
||||
@@ -130,7 +130,7 @@
|
||||
<div class="row" id="footer">
|
||||
|
||||
<div class="col-md-9" >
|
||||
<a href="http://www.cagette.net" target="_blank">
|
||||
<a href="https://git.artcode.re/cagetters/cagette" target="_blank">
|
||||
<img src="/img/logo.png" alt="::_("Cagette.net")::"/>
|
||||
</a>
|
||||
</div>
|
||||
@@ -142,13 +142,11 @@
|
||||
<a href="http://www.cagette.net/wiki" target="_blank">::_("Documentation")::</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="https://www.cagette.pro" target="_blank">Formations pour producteurs</a>
|
||||
<a href="https://pad1.zourit.net/p/4a3b09afd25b4fdcb3f0a9598db21e61" target="_blank">Proposer une amélioration</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
::if (user!=null && user.isAmapManager()):: <a href="https://cagette.uservoice.com" target="_blank">::_("Propose features")::</a> ::end::
|
||||
<a href="https://pad1.zourit.net/p/4a3b09afd25b4fdcb3f0a9598db21e61" target="_blank">Soumettre une anomalie</a>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
<!--<p style="position: absolute;display: block;top: 96px;width: 700px;">
|
||||
|
||||
@@ -17,11 +17,11 @@ table.table td{
|
||||
<hr/>
|
||||
|
||||
<div style="color:#666;font-size:12px;">
|
||||
::_("This e-mail was sent from"):: <a href="http://::HOST::">::_("Cagette.net")::</a>.
|
||||
> ::_("This e-mail was sent from"):: <a href="http://::raw HOST::">::_("Cagette.net")::</a>.
|
||||
|
||||
::if group!=null::
|
||||
<br/>
|
||||
::_("You receive this message because you are part of"):: <b>::group.name::</b>
|
||||
::_("You receive this message because you are part of"):: <b>::_("Cagette.net")::</b>
|
||||
::end::
|
||||
|
||||
::if list!=null::
|
||||
@@ -32,9 +32,9 @@ table.table td{
|
||||
::if group!=null::
|
||||
<div style="width:50%;max-width:300px;margin: 12px auto;padding: 8px;text-decoration: none;background: #070;border-radius: 3px;text-align: center;">
|
||||
<a href="http://::HOST::/group/::group.id::" style="color: white;font-weight: bold;text-decoration: none;font-size:1.2em;">
|
||||
→ ::group.name::
|
||||
→ ::_("Cagette.net")::
|
||||
</a>
|
||||
</div>
|
||||
::end::
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
<div style="max-width:400px;margin:auto;border:solid 1px #AAA;border-radius:8px;padding:12px;text-align:center;font-family:Arial;">
|
||||
|
||||
<img src="http://::HOST::/img/logo2.png" title="Cagette.net" />
|
||||
<img src="http://::HOST::/img/logo2.png" title="CagettePéi" />
|
||||
|
||||
<p>
|
||||
::_("Hello"):: $$nullSafe(::name::),
|
||||
@@ -42,4 +42,4 @@
|
||||
</div>
|
||||
|
||||
|
||||
::end::
|
||||
::end::
|
||||
|
||||
@@ -5,4 +5,4 @@
|
||||
|
||||
|
||||
|
||||
::end::
|
||||
::end::
|
||||
|
||||
+4
-5
@@ -1,9 +1,7 @@
|
||||
{
|
||||
"name": "Cagette.net",
|
||||
"name": "CagettePei",
|
||||
"description": "le logiciel libre du circuit court",
|
||||
"author": "François Barbut <francois@alilo.fr>",
|
||||
"license": "GPL-2.0",
|
||||
"homepage": "http://www.cagette.net",
|
||||
"license": "AGPL-3.0",
|
||||
"dependencies": {
|
||||
"bootstrap": "^3.3.4",
|
||||
"eonasdan-bootstrap-datetimepicker": "^4.7.14",
|
||||
@@ -48,5 +46,6 @@
|
||||
},
|
||||
"bugs": {
|
||||
"url": "https://github.com/bablukid/cagette/issues"
|
||||
}
|
||||
},
|
||||
"version": "1.5.2"
|
||||
}
|
||||
|
||||
@@ -86,6 +86,17 @@ class Distribution extends Controller
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
function getUser(uid:Int):db.User {
|
||||
return db.User.manager.get(uid, false);
|
||||
}
|
||||
|
||||
function getBasket(userId, placeId, date){
|
||||
var user = getUser(userId);
|
||||
var place = db.Place.manager.get(placeId, false);
|
||||
return db.Basket.getOrCreate(user, place, date);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Attendance sheet to print ( mutidistrib )
|
||||
@@ -174,18 +185,25 @@ class Distribution extends Controller
|
||||
var data = new Array<Dynamic>();
|
||||
|
||||
for (o in orders3) {
|
||||
|
||||
|
||||
var basket = getBasket(o.userId,view.place.id,view.date);
|
||||
|
||||
data.push( {
|
||||
"name":o.userName,
|
||||
"productName":o.productName,
|
||||
"price":view.formatNum(o.productPrice),
|
||||
"quantity":o.quantity,
|
||||
"fees":view.formatNum(o.fees),
|
||||
"total":view.formatNum(o.total),
|
||||
"paid":o.paid
|
||||
"NUM": basket.num,
|
||||
"ADHERENT":o.userName,
|
||||
"PRODUIT":o.productName,
|
||||
"QTÉ":o.quantity,
|
||||
// "price":view.formatNum(o.productPrice),
|
||||
// "fees":view.formatNum(o.fees),
|
||||
// "total":view.formatNum(o.total),
|
||||
// "paid":o.paid
|
||||
});
|
||||
}
|
||||
|
||||
sugoi.tools.Csv.printCsvDataFromObjects(data, ["name", "productName", "price", "quantity","fees","total", "paid"],"Export-commandes-"+date.toString().substr(0,10)+"-Cagette");
|
||||
sugoi.tools.Csv.printCsvDataFromObjects(data, ["NUM","ADHERENT", "PRODUIT", "QTÉ"],"Export-commandes-"+date.toString().substr(0,10)+"-Cagette");
|
||||
//sugoi.tools.Csv.printCsvDataFromObjects(data, ["NUM","ADHERENT", "PRODUIT", "QTÉ","price","fees","total","paid"],"Export-commandes-"+date.toString().substr(0,10)+"-Cagette");
|
||||
//sugoi.tools.Csv.printCsvDataFromObjects(data, ["NUM","ADHERENT", "PRODUIT", "price", "quantity","fees","total", "paid"],"Export-commandes-"+date.toString().substr(0,10)+"-Cagette");
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
Executable → Regular
BIN
Binary file not shown.
|
Before Width: | Height: | Size: 17 KiB After Width: | Height: | Size: 27 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 26 KiB After Width: | Height: | Size: 27 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 27 KiB After Width: | Height: | Size: 27 KiB |
+19
-1137
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user