Commit 5476c7bd authored by Hadrien RENAUD's avatar Hadrien RENAUD

Merge branch 'master' into 'prod'

Push master into prod

See merge request br/chocapix-client!10
parents 9e801953 9105e096
Pipeline #4655 passed with stage
in 12 minutes and 33 seconds
node_modules
node_modules_old
dist
dist.new
dist.bak
dist.bak.bak
.tmp
.sass-cache
bower_components
bars.sublime-project
bars.sublime-workspace
.DS_Store
*~
image : circleci/node:latest
#test:
# script:
# - sudo apt install python-pip python-dev
# - git clone https://gitlab.binets.fr/br/chocapix-server.git ../chocapix-server
# - ./test/configure-vm.sh
# - npm install grunt
# - ./node_modules/.bin/grunt serve &
# - sleep 5
# - ./test-in-vm.sh run
build:
script:
- make
artifacts:
paths:
- dist
expire_in: 1 week
......@@ -14,6 +14,9 @@ module.exports = function (grunt) {
// Time how long tasks take. Can help when optimizing build times
require('time-grunt')(grunt);
// Load serve-static
var serveStatic = require('serve-static');
// Configurable paths for the application
var appConfig = {
......@@ -82,12 +85,12 @@ module.exports = function (grunt) {
open: true,
middleware: function (connect) {
return [
connect.static('.tmp'),
serveStatic('.tmp'),
connect().use(
'/bower_components',
connect.static('./bower_components')
serveStatic('./bower_components')
),
connect.static(appConfig.app)
serveStatic(appConfig.app)
];
}
}
......@@ -97,13 +100,13 @@ module.exports = function (grunt) {
port: 9001,
middleware: function (connect) {
return [
connect.static('.tmp'),
connect.static('test'),
serveStatic('.tmp'),
serveStatic('test'),
connect().use(
'/bower_components',
connect.static('./bower_components')
serveStatic('./bower_components')
),
connect.static(appConfig.app)
serveStatic(appConfig.app)
];
}
}
......
.PHONY: clean install
install: notroot
export HOME=`mktemp -d /tmp/npmXXXXXX ` ;\
npm install &&\
npm install gulp bower &&\
node_modules/.bin/bower install &&\
rm -rf dist.bak &&\
if [ -d dist ] ; then mv dist dist.bak ; fi ;\
sudo node_modules/.bin/gulp build ;\
clean:
rm -rf .npm
rm -rf node_modules
rm -rf .tmp
rm -rf bower_components
notroot:
getent group `id --group` | grep -v root --quiet
......@@ -232,6 +232,53 @@ tr.condensed td {
td.alinea {
padding-left: 48px !important;
}
li.condensed div {
padding-top: 4px !important;
padding-bottom: 4px !important;
font-size: 0.8em;
}
div.alinea {
padding-left: 48px !important;
}
li.danger {
background-color: #f2dede;
}
li.danger:hover {
background-color: #ebcccc;
}
li.warning {
background-color: #fcf8e3;
}
li.warning:hover {
background-color: #faf2cc;
}
li.info {
background-color: #d9edf7;
}
li.info:hover {
background-color: #c4e3f3;
}
.div-in-list {
display: inline-block;
padding: 8px;
line-height: 1.42857143;
vertical-align: top;
}
.div-head-list {
display: inline-block;
padding: 8px;
font-weight: bold;
vertical-align: bottom;
}
.div-list-right {
width: 35%;
}
.div-list-left {
width: 64%;
}
.div-head-list > * {
font-weight: bold;
}
hr.derrierebtn {
position: relative;
......
app/assets/img/sections/equitationjone.png

8.33 KB | W: | H:

app/assets/img/sections/equitationjone.png

8.68 KB | W: | H:

app/assets/img/sections/equitationjone.png
app/assets/img/sections/equitationjone.png
app/assets/img/sections/equitationjone.png
app/assets/img/sections/equitationjone.png
  • 2-up
  • Swipe
  • Onion skin
......@@ -14,6 +14,7 @@
</li>
</ul>
</div>
<list:negative:sellitems list="list" ng-if="user.can('add_role');"></list:negative:sellitems>
</div>
<div class="col-sm-6">
......@@ -89,6 +90,5 @@
<bars:suggestions suggestions="suggestions" ng-if="user.account"></bars:suggestions>
</div>
</div>
<bars:history filter="{user: user.user.id}" page-size="10" ng-show="user_authenticated()" daily-total="true"></bars:history>
</div>
......@@ -121,6 +121,9 @@ angular.module('bars.main', [
}, function (err) {
$rootScope.$broadcast('api.SuggestedItem.error');
});
}],
food_list: ['api.models.sellitem', function(SellItem) {
return SellItem.all();
}]
},
views: {
......@@ -215,8 +218,8 @@ angular.module('bars.main', [
.controller(
'main.ctrl.bar',
['$scope', 'news', 'auth.user', '$timeout', 'suggesteditems',
function($scope, news, AuthUser, $timeout, suggesteditems) {
['$scope', 'news', 'auth.user', '$timeout', 'suggesteditems', 'food_list',
function($scope, news, AuthUser, $timeout, suggesteditems, food_list) {
$scope.bar.active = 'index';
$scope.list_news = function () {
return _.sortBy(_.reject(news, 'deleted'), 'last_modified');
......@@ -257,6 +260,8 @@ angular.module('bars.main', [
$scope.suggestions = suggesteditems;
$scope.list = food_list;
$timeout(function() {
var $div = $('#lnews');
$div.on('mousewheel DOMMouseScroll', function(e) {
......
......@@ -3,7 +3,7 @@
angular.module('bars.granking')
.factory('ranking.items', function () {
return {
beer: [2, 3, 1, 5, 6, 558, 4, 7, 1334, 1024, 1584, 697, 696, 1249, 1247, 1248, 1250, 1251, 340, 3754, 1602, 3236, 747, 1405, 1787, 1788, 3810, 418, 1392, 2596, 3472, 1330, 2495, 2598, 340, 1517, 558, 2597, 1586, 2494, 3230, 2493, 1300, 1284, 966, 809, 2596, 2194, 2778, 1582, 963],
pizza: [131, 134, 135, 136, 140, 300, 361, 377, 378, 416, 526, 528, 529, 639, 640, 641, 642, 726, 772, 774, 775, 776, 790, 792, 849, 989, 991, 1139, 1142, 1158, 1159, 1160, 1338, 1431, 1433, 1556, 1705, 1731, 1732, 1733, 1734, 1735, 1769, 1959, 2069, 2071, 2074, 2079, 2341, 2342, 2442, 2595, 2703, 2704, 2857, 2876, 2877, 2879, 2880, 2881, 2882, 2911, 2912, 2941, 3031, 3137, 3292, 3308, 3309, 3310, 3473, 3534, 3535, 3573, 3613, 3721, 3746, 3816, 3863, 3864, 3879, 3904, 3908, 3923, 3924, 3942, 3943]
beer: [2, 3, 1, 5, 6, 558, 4, 7, 1334, 1024, 1584, 697, 696, 1249, 1247, 1248, 1250, 1251, 340, 3754, 1602, 3236, 747, 1405, 1787, 1788, 3810, 418, 1392, 2596, 3472, 1330, 2495, 2598, 340, 1517, 558, 2597, 1586, 2494, 3230, 2493, 1300, 1284, 966, 809, 2596, 2194, 2778, 1582, 963, 1327, 10588, 5746, 11156],
pizza: [131, 134, 135, 136, 140, 300, 361, 377, 378, 416, 526, 528, 529, 639, 640, 641, 642, 726, 772, 774, 775, 776, 790, 792, 849, 989, 991, 1139, 1142, 1158, 1159, 1160, 1338, 1431, 1433, 1556, 1705, 1731, 1732, 1733, 1734, 1735, 1769, 1959, 2069, 2071, 2074, 2079, 2341, 2342, 2442, 2595, 2703, 2704, 2857, 2876, 2877, 2879, 2880, 2881, 2882, 2911, 2912, 2941, 3031, 3137, 3292, 3308, 3309, 3310, 3473, 3534, 3535, 3573, 3613, 3721, 3746, 3816, 3863, 3864, 3879, 3904, 3908, 3923, 3924, 3942, 3943, 7609, 7608]
};
});
<div class="panel panel-default">
<div class="panel-heading clearfix">
<h4 class="panel-title pull-left text-capitalizefirst" style="padding-top: 7.5px;">Aliments en négatif</h4>
</div>
{{ food_list }}
<div ng-if="list.length > 0" infinite-scroll="showMore()" infinite-scroll-distance="1">
<div style="border-bottom: 1px solid #ddd;">
<div class="div-head-list div-list-left">Nom &ensp;<a href="" ng-click="reverse = list_order == 'name' ? !reverse : false; list_order = 'name'"><span class="glyphicon glyphicon-sort"></span></a></div>
<div class="div-head-list div-list-right">Quantité totale &ensp;<a href="" ng-click="reverse = list_order == 'fuzzy_qty' ? !reverse : false; list_order = 'fuzzy_qty'"><span class="glyphicon glyphicon-sort"></span></a></div>
</div>
<ul style="list-style: none;padding:0;max-height: 150px; overflow: auto;margin-bottom: 0;">
<li ng-repeat-start="f in list | filter: isNegative | orderBy:list_order:reverse | limitTo: limit.nb track by f.id" ng-class="f.deleted && 'del' || (f.fuzzy_qty < 0 && 'danger' || (f.stockitems.length == 0 && 'warning' || '')) " style="border-top: 1px solid #ddd;">
<div class="div-in-list div-list-left">
<a ng-click="collapse = !collapse" tooltip="Voir la liste des aliments achetés" href class="food-list-collapse"><span class="glyphicon" ng-class="collapse && 'glyphicon-collapse-up' || 'glyphicon-collapse-down'"></span></a>
<bars:sellitem:oneway item=":: f"></bars:sellitem:oneway>
</div>
<div class="div-in-list div-list-right" style="border-top: 1px solid #ddd;"><bars:sellitem:qty:oneway item=":: f" qty=":: f.fuzzy_qty" out="'sell'"></bars:sellitem:qty:oneway></div>
</li>
<li ng-repeat="si in f.stockitems | orderBy:list_order:reverse" class="info condensed" ng-if="collapse" style="border-top: 1px solid #ddd;">
<div class="alinea div-in-list div-list-left" >
<a title="Voir la fiche globale de cet aliment" ui-sref="bar.food.item_details({ bar: '{{ :: si.bar.id }}', id: '{{ :: si.details.id }}' })">
<bars:itemdetails qty="1" itemdetails=":: si.details"></bars:itemdetails>
</a>
</div>
<div class="div-in-list div-list-right">
<bars:sellitem:qty:oneway item=":: f" qty=":: si.qty" out="'sell'"></bars:sellitem:qty:oneway>
<span ng-if="f.fuzzy_qty != 0">
({{ si.qty/f.fuzzy_qty*100 | number }} %)
</span>
</div>
</li>
<li ng-repeat-end ng-if="false">
</li>
</ul>
</div>
<div class="panel-body" ng-if="list.length == 0">
<em>Aucun aliment n'est actuellement en négatif dans le bar.</em>
</div>
</div>
......@@ -162,7 +162,6 @@ angular.module('bars.api.food', [
})
.state('bar.food.details', {
url: "/:id",
controller: 'api.ctrl.food_details',
resolve: {
food_item: ['$stateParams', 'api.models.sellitem', function($stateParams, SellItem) {
return SellItem.getSync($stateParams.id);
......@@ -185,7 +184,7 @@ angular.module('bars.api.food', [
controller: 'api.ctrl.food_details.stocks',
},
'graphs@bar.food.details': {
templateUrl: "components/API/food/views/details-graphs.html",
templateUrl: "components/API/food/views/details-graphs.html",
controller: 'api.ctrl.food_details.graphs',
},
'ranking@bar.food.details': {
......@@ -246,6 +245,31 @@ angular.module('bars.api.food', [
}, 300);
}]
)
.controller('api.ctrl.food_list_negative_sellitems',
['$scope', '$timeout',
function($scope, $timeout) {
$scope.isNegative = function(o) {
return o.fuzzy_qty < 0;
};
$scope.list_order = 'name';
$scope.reverse = false;
$scope.limit = {nb: 30};
$scope.showMore = function () {
$scope.limit.nb += 5;
};
}]
)
.directive('listNegativeSellitems', function() {
return {
restrict: 'E',
scope: {
list: '=',
},
templateUrl: 'components/API/food/directives/list-negative-sellitems-directive.html',
controller: 'api.ctrl.food_list_negative_sellitems'
};
})
.controller('api.ctrl.food_details',
['$scope', '$stateParams', 'food_item', 'auth.user', 'api.models.buyitemprice', 'api.services.action', 'bars.meal',
function($scope, $stateParams, food_item, AuthUser, BuyItemPrice, APIAction, Meal) {
......@@ -463,6 +487,7 @@ angular.module('bars.api.food', [
food_item.tax = $scope.newFood_item.tax/100;
food_item.keywords = $scope.newFood_item.keywords;
food_item.unit_factor = 1/$scope.newFood_item.unit_factor;
food_item.sell_fraction = $scope.newFood_item.sell_fraction;
food_item.$save().then(function() {
AuthUser.updateMenus();
......
......@@ -22,6 +22,15 @@
<input type="text" class="form-control" id="funit_plural" placeholder="" ng-model="newFood_item.unit_name_plural">
</div>
</div>
<div class="form-group">
<label for="sell_fraction" class="col-sm-3 control-label">Autoriser le fractionnement</label>
<div class="col-sm-9">
<div class="input-group" style="float: left;">
<input type="checkbox" class="form-control" id="sell_fraction" ng-model="newFood_item.sell_fraction" ng-attr-checked="{{ newFood_item.sell_fraction && 'checked' || undefined }}">
</div>
<p class="help-block col-sm-9">Autoriser les unités à être vendues par fractions (0.5 pizza, 121.43g de riz, ...)</p>
</div>
</div>
<div class="form-group" ng-show="newFood_item.unit_name != food_item.unit_name">
<label for="unit_factor" class="col-sm-3 control-label">1 {{ newFood_item.unit_name || food_item.details.name }} = </label>
<div class="col-sm-9">
......
......@@ -12,6 +12,17 @@ angular.module('bars.admin', [
.config(['$stateProvider', function($stateProvider) {
$stateProvider.state('bar.admin', {
url: "/admin",
resolve: {
account_list: ['api.models.account', function(Account) {
return Account.all();
}],
stockitem_list: ['api.models.stockitem', function(StockItem) {
return StockItem.all();
}],
bar_account: ['api.models.account', function(Account) {
return Account.ofUser(6);
}]
},
views: {
'@bar': {
templateUrl: "components/admin/layout.html",
......@@ -19,18 +30,7 @@ angular.module('bars.admin', [
},
'@bar.admin': {
templateUrl: "components/admin/dashboard.html",
controller: 'admin.ctrl.home',
resolve: {
account_list: ['api.models.account', function(Account) {
return Account.all();
}],
stockitem_list: ['api.models.stockitem', function(StockItem) {
return StockItem.all();
}],
bar_account: ['api.models.account', function(Account) {
return Account.ofUser(6);
}]
}
controller: 'admin.ctrl.home'
}
}
});
......
<script src="//mozilla.github.io/pdf.js/build/pdf.js"></script>
<div class="col-sm-12 col-md-12 col-lg-12">
<h3>Auto-Appro : Ooshop</h3>
<div class="row" ng-show="stape == 1">
<div class="col-md-2 text-right h3">
Étape 1<br />
<small>Connexion</small>
</div>
<div class="col-md-10">
<form class="form-horizontal" ng-submit="stape1.validate(stape1.login, stape1.password)">
<div class="form-group">
<label class="col-md-4 col-lg-2 control-label">Adresse email</label>
<div class="col-md-8 col-lg-10">
<input type="email" class="form-control" placeholder="louis.vaneau@polytechnique.edu" ng-model="stape1.login" />
</div>
</div>
<div class="form-group">
<label class="col-md-4 col-lg-2 control-label">Mot de passe</label>
<div class="col-md-8 col-lg-10">
<input type="password" class="form-control" placeholder="****" ng-model="stape1.password" />
</div>
</div>
<div class="form-group">
<div class="col-md-offset-4 col-md-8 col-lg-10 col-lg-offset-2">
<button type="submit" class="btn btn-success" ng-class="stape1.loading && 'disabled' || ''">
Connexion à Ooshop <span class="glyphicon-refresh-animate glyphicon glyphicon-refresh" ng-show="stape1.loading"></span>
</button>
</div>
</div>
</form>
</div>
</div>
<div class="row" ng-show="stape == 2">
<div class="col-md-2 text-right h3">
Étape 2<br />
<small>Choix de la commande</small>
</div>
<div class="col-md-10">
<table class="table table-hover table-striped">
<thead>
<tr>
<th>Date</th>
<th>Numéro de commande</th>
<th class="text-center">Prévisualiser</th>
<th class="text-center">Sélectionner</th>
</tr>
</thead>
<tbody>
<tr ng-repeat="order in stape2.orders">
<td>{{ order.date | amParse:'DD/MM/YYYY' | amCalendar }}</td>
<td>{{ order.id }}</td>
<td class="text-center">
<a href ng-click="stape2.preview(order)" ng-show="!order.loadingp">Prévisualiser</a>
<span class="glyphicon-refresh-animate glyphicon glyphicon-refresh" ng-if="order.loadingp"></span>
</td>
<td class="text-center">
<a href ng-click="stape2.select(order)" ng-show="!order.loadings">Sélectionner</a>
<span class="glyphicon-refresh-animate glyphicon glyphicon-refresh" ng-if="order.loadings"></span>
</td>
</tr>
</tbody>
</table>
<div class="col-md-10">
<div class="well">
Séléctionne la facture de l’appro au format PDF (à télécharger sur la page <a href="https://ooshop.carrefour.fr/orders">Mes dernières commandes</a>).
</div>
<form class="form-horizontal" ng-submit="validate()">
<div class="form-group">
<input required id="receipt_pdf" type="file" />
<button type="submit" class="btn btn-success" ng-class="parsing_receipt && 'disabled' || ''">Valider</button>
</div>
</form>
<p ng-show="parsing_receipt">Analyse du PDF en cours...</p>
</div>
</div>
<div class="col-sm-12 col-md-12 col-lg-12">
<h3>Auto-Appro : Ooshop</h3>
<div class="col-md-10">
<div class="well">
Rendez-vous sur www.ooshop.com, dans l’onglet <a href="http://www.ooshop.com/courses-en-ligne/WebForms/Utilisateur/MesCommandes.aspx">Mes commandes</a>, puis séléctionnez "Imprimer la facture" pour la commande voulue. Refusez l’impression, mais copiez la facture intégralement (avec ctrl-A ctrl-C par exemple), puis collez-la dans l’encadré suivant (ctrl-V).
</div>
<form class="form-horizontal" ng-submit="validate(input)">
<div class="form-group">
<label class="col-md-4 col-lg-2 control-label">Copiez votre facture Ooshop ici</label>
<div class="col-md-8 col-lg-10">
<textarea name="Facture" class="form-control" ng-model="input" />
</div>
<button type="submit" class="btn btn-success" ng-class="input == '' && 'disabled' || ''">Valider</button>
</div>
</form>
</div>
</div>
......@@ -229,80 +229,98 @@ angular.module('bars.admin.food', [
.controller('admin.ctrl.food.autoappro.ooshop',
['$scope', '$http', '$modal', '$state', 'admin.appro',
function($scope, $http, $modal, $state, Appro) {
// var OOSHOP_URL = 'http://mshop.carrefour.com/convertigo/projects/ooshop/.json'; // Original URL but no Access-Control-Origin header
// var OOSHOP_URL = 'https://neo.ntag.fr/ooshop/'; // Reverse proxy by ntag
var OOSHOP_URL = AUTOAPPRO_URL + '/ooshop/.json'; // Reverse proxy in the school
var cli_id;
function connexion(login, password) {
$scope.stape1.loading = true;
$http.get(OOSHOP_URL + '?__sequence=Login&login=' + login + '&password=' + password).then(function(result) {
if (result.data.document.isLogged == "false") {
throw("Wrong Ooshop password");
/**
* Extract text from a pdf file.
* Returns an array of arrays of strings.
* Found on:
* https://stackoverflow.com/questions/1554280/extract-text-from-pdf-in-javascript#29111164
*/
function pdfToText(data) {
pdfjsLib.workerSrc = '../../../../bower_components/pdfjs-dist/build/pdf.worker.min.js';
pdfjsLib.cMapUrl = 'js/vendor/pdfjs/cmaps/';
pdfjsLib.cMapPacked = true;
return pdfjsLib.getDocument(data).then(function(pdf) {
var pages = [];
for (var i = 0; i < pdf.numPages; i++) {
pages.push(i);
}
cli_id = result.data.document.cli_id;
return $http.get(OOSHOP_URL + '?__sequence=GetMyAccount&cli_id=' + cli_id);
}).then(function(result2) {
$scope.stape = 2;
$scope.stape1.loading = false;
$scope.stape2.orders = result2.data.document.commandes.commande;
}).catch(function() {
$scope.stape1.password = '';
$scope.stape1.loading = false;
return Promise.all(pages.map(function(pageNumber) {
return pdf.getPage(pageNumber + 1).then(function(page) {
return page.getTextContent().then(function(textContent) {
return textContent.items.map(function(item) {
return item.str;
});
});
});
})).then(function(pages) {
return pages;
});
});
}
function getOrder(id) {
return $http.get(OOSHOP_URL + '?__sequence=GetCmdProduct&cli_id=' + cli_id + '&id=' + id);
}
function previewOrder(order) {
order.loadingp = true;
getOrder(order.id).then(function(result) {
order.loadingp = false;
var modalOrder = $modal.open({
templateUrl: 'components/admin/food/autoappro/ooshop-modal-order.html',
controller: ['$scope', 'items', function ($scope, items) {
$scope.items = items;
}],
size: 'lg',
resolve: {
items: function () {
return result.data.document.items.TABLE;
function parseReceipt(receiptPdf) {
// receiptPdf must be a path to a pdf file or a Buffer.
return pdfToText(receiptPdf).then(function(result) {
function addItemToAutoAppro(qty, price, barcode, name) {
if (qty != 0 && !Appro.addItemFromBarcode(barcode, qty, price))
Appro.failedAutoAppro.push({name: name, qty: qty, totalPrice: price, barcode: barcode});
}
for (var j = 0, m = result.length ; j < m ; ++j) {
var page = result[j];
var step = 0;
var ean13 = '', libelle = '', qte_livree = 0, montant_ttc = 0;
for (var i = 0, n = page.length ; i < n ; ++i) {
var line = page[i];
if (step == 0 && line.search(/^[0-9]{13}$/) != -1) { ean13 = line; ++step; }
else if (step == 1) { name = line; ++step; }
else if (step == 3) { qte_livree = parseInt(line); ++step; }
else if (step == 7) { montant_ttc = parseFloat(line); ++step; }
else if (step == 8) {
if (line[0] == ' ') {
name += line;
} else {
addItemToAutoAppro(qte_livree, montant_ttc, ean13, name);
step = 0;
--i; // Relire la ligne car c'est surement le code barre de l'aliment suivant
ean13 = '';
}
}
else if (step != 0) ++step;
}
});
if (ean13 != '')
addItemToAutoAppro(qte_livree, montant_ttc, ean13, name);
}
});
}
function selectOrder(order) {
order.loadings = true;
getOrder(order.id).then(function(result) {
_.forEach(result.data.document.items.TABLE, function(item) {
var barcode = item.img_product_url.replace("Media/ProdImages/Produit/Images/", "").replace(".gif", "");
if (!Appro.addItemFromBarcode(barcode, parseFloat(item.art_qte), parseFloat(item.uvc_buy)*parseFloat(item.art_qte))) {
Appro.failedAutoAppro.push({
name: item.title,
qty: parseFloat(item.art_qte),
totalPrice: parseFloat(item.uvc_buy)*parseFloat(item.art_qte),
barcode: barcode,
container: item.contenance,
link: "http://www.ooshop.com/courses-en-ligne/ContentNavigation.aspx?NOEUD_IDFO=" + item.id
});
}
function getReceipt() {
$scope.parsing_receipt = true;
var receipt = document.getElementById("receipt_pdf").files[0];
var reader = new FileReader();
reader.readAsArrayBuffer(receipt);
reader.onload = function (evt) {
parseReceipt(evt.target.result).then(function() {
$state.go('bar.admin.food.appro', {bar: $scope.bar.id});
}, function (err) {
$scope.parsing_receipt = false;
allowValidate = true;
});
order.loadings = false;
$state.go('bar.admin.food.appro', {bar: $scope.bar.id});
});
}
}
$scope.input = '';
$scope.parsing_receipt = false;
var allowValidate = true;
$scope.validate = function () {
if (allowValidate) {
allowValidate = false;
getReceipt();
}
}
$scope.stape = 1;
$scope.stape1 = {
login: '',
password: '',
validate: connexion,
loading: false
};
$scope.stape2 = {
orders: [],
preview: previewOrder,
select: selectOrder
};
}
])
.controller('admin.ctrl.food.autoappro.intermarche',
......@@ -385,7 +403,7 @@ angular.module('bars.admin.food', [
.controller('admin.ctrl.food.autoappro.picard',
['$scope', '$http', '$modal', '$state', 'admin.appro',
function($scope, $http, $modal, $state, Appro) {
var PICARD_URL = AUTOAPPRO_URL + '/picard'; // Reverse proxy in the school
var PICARD_URL = 'http://chocapix/autoappro/picard'; // Reverse proxy in the school
var token;
function connexion(login, password) {
$scope.stape1.loading = true;
......@@ -470,7 +488,7 @@ angular.module('bars.admin.food', [
.controller('admin.ctrl.food.autoappro.houra',
['$scope', '$http', '$modal', '$state', 'admin.appro',
function($scope, $http, $modal, $state, Appro) {