Переглянути джерело

Merge branch 'develop'

prodstable
Guillaume Bourgeois 1 рік тому
джерело
коміт
b33ff99bbd
8 змінених файлів з 2141 додано та 38 видалено
  1. +16
    -8
      backend/views/distribution/index.php
  2. +42
    -30
      backend/web/css/screen.css
  3. +5
    -0
      backend/web/js/vuejs/distribution-index.js
  4. +9
    -0
      backend/web/sass/_responsive.scss
  5. +4
    -0
      backend/web/sass/distribution/_index.scss
  6. +29
    -0
      common/config/test-local.php
  7. +132
    -0
      tests/codeception/producer/_output/ContactCept.fail.html
  8. +1904
    -0
      tests/codeception/producer/_output/HomeCept.fail.html

+ 16
- 8
backend/views/distribution/index.php Переглянути файл

@@ -362,17 +362,14 @@ $this->setPageTitle('Distributions') ;
</td>
<td class="column-amount">
{{ order.amount.replace(/(\d)(?=(\d{3})+(?:\.\d+)?$)/g, "$1,")+'&nbsp;€' }}
</td>
<td class="column-state-payment">
<div class="input-group">
<span class="label label-success input-group-addon" v-if="order.amount_paid == order.amount">payé</span>
<span class="label label-default input-group-addon" v-else-if="order.amount_paid == 0">non réglé</span>
<span class="label label-default input-group-addon" v-else-if="order.amount_paid > order.amount">surplus</span>
<span class="label label-warning input-group-addon" v-else-if="order.amount_paid < order.amount">reste à payer</span>

<span class="glyphicon glyphicon-time" title="Paiement automatique" v-if="order.auto_payment && producer && producer.credit && (order.amount_paid == 0 || order.amount_paid < order.amount)"></span>
<div class="state-payment-mobile">
<order-state-payment :order="order" :producer="producer"></order-state-payment>
</div>
</td>
<td class="column-state-payment">
<order-state-payment :order="order" :producer="producer"></order-state-payment>
</td>
<td class="column-payment" v-if="producer && producer.credit">
<div class="btn-group" v-if="order.user && !order.date_delete">
<button class="btn btn-xs btn-default" v-if="order.amount_paid == order.amount" @click="orderPaymentClick" :data-id-order="order.id" data-type="refund" :data-amount="order.amount">
@@ -573,6 +570,17 @@ $this->setPageTitle('Distributions') ;
</div>
</div>

<script type="text/x-template" id="order-state-payment">
<div class="input-group">
<span class="label label-success input-group-addon" v-if="order.amount_paid == order.amount">payé</span>
<span class="label label-default input-group-addon" v-else-if="order.amount_paid == 0">non réglé</span>
<span class="label label-default input-group-addon" v-else-if="order.amount_paid > order.amount">surplus</span>
<span class="label label-warning input-group-addon" v-else-if="order.amount_paid < order.amount">reste à payer</span>

<span class="glyphicon glyphicon-time" title="Paiement automatique" v-if="order.auto_payment && producer && producer.credit && (order.amount_paid == 0 || order.amount_paid < order.amount)"></span>
</div>
<script type="text/x-template" id="order-form-template">

<!-- template for the order-form component -->
<script type="text/x-template" id="order-form-template">
<modal class="modal-form-order" @close="$emit('close')">

+ 42
- 30
backend/web/css/screen.css Переглянути файл

@@ -2171,38 +2171,42 @@ termes.
.distribution-index #orders table td.column-state-payment {
width: 120px;
}
/* line 300, ../sass/distribution/_index.scss */
/* line 299, ../sass/distribution/_index.scss */
.distribution-index #orders table .state-payment-mobile {
display: none;
}
/* line 304, ../sass/distribution/_index.scss */
.distribution-index #orders table td.column-payment div.btn-group {
width: 125px;
}
/* line 306, ../sass/distribution/_index.scss */
/* line 310, ../sass/distribution/_index.scss */
.distribution-index #orders table tr.view ul {
list-style-type: none;
margin-left: 0px;
padding-left: 15px;
}
/* line 316, ../sass/distribution/_index.scss */
/* line 320, ../sass/distribution/_index.scss */
.distribution-index #orders table tr.view .comment {
margin-top: 20px;
}
/* line 320, ../sass/distribution/_index.scss */
/* line 324, ../sass/distribution/_index.scss */
.distribution-index #orders table tr.view .delivery {
margin-top: 20px;
}
/* line 329, ../sass/distribution/_index.scss */
/* line 333, ../sass/distribution/_index.scss */
.distribution-index .modal-form-order .modal-container {
width: 100%;
padding: 0px;
}
/* line 333, ../sass/distribution/_index.scss */
/* line 337, ../sass/distribution/_index.scss */
.distribution-index .modal-form-order .modal-container .modal-body {
padding-right: 15px;
}
/* line 336, ../sass/distribution/_index.scss */
/* line 340, ../sass/distribution/_index.scss */
.distribution-index .modal-form-order .modal-container .modal-body table {
margin-bottom: 150px;
}
/* line 341, ../sass/distribution/_index.scss */
/* line 345, ../sass/distribution/_index.scss */
.distribution-index .modal-form-order .modal-container .modal-footer {
border-top-color: #f4f4f4;
position: fixed;
@@ -2214,54 +2218,54 @@ termes.
text-align: center;
border-top: solid 1px #e0e0e0;
}
/* line 353, ../sass/distribution/_index.scss */
/* line 357, ../sass/distribution/_index.scss */
.distribution-index .modal-form-order .modal-container .modal-footer .actions-form button {
float: none;
}
/* line 357, ../sass/distribution/_index.scss */
/* line 361, ../sass/distribution/_index.scss */
.distribution-index .modal-form-order .modal-container .modal-footer .actions-form div.right {
float: right;
}
/* line 364, ../sass/distribution/_index.scss */
/* line 368, ../sass/distribution/_index.scss */
.distribution-index .modal-form-order .btn-credit {
float: right;
}
/* line 370, ../sass/distribution/_index.scss */
/* line 374, ../sass/distribution/_index.scss */
.distribution-index .modal-form-order table.table-products .product-ordered td {
background-color: #e9e9e9;
}
/* line 374, ../sass/distribution/_index.scss */
/* line 378, ../sass/distribution/_index.scss */
.distribution-index .modal-form-order table.table-products .product-ordered input.input-quantity {
font-size: 16px;
font-weight: bold;
}
/* line 380, ../sass/distribution/_index.scss */
/* line 384, ../sass/distribution/_index.scss */
.distribution-index .modal-form-order table.table-products td.price {
width: 150px;
}
/* line 383, ../sass/distribution/_index.scss */
/* line 387, ../sass/distribution/_index.scss */
.distribution-index .modal-form-order table.table-products td.price input {
text-align: center;
}
/* line 387, ../sass/distribution/_index.scss */
/* line 391, ../sass/distribution/_index.scss */
.distribution-index .modal-form-order table.table-products td.price .input-group-addon {
background-color: #eee;
}
/* line 392, ../sass/distribution/_index.scss */
/* line 396, ../sass/distribution/_index.scss */
.distribution-index .modal-form-order table.table-products td.quantity {
width: 165px;
}
/* line 395, ../sass/distribution/_index.scss */
/* line 399, ../sass/distribution/_index.scss */
.distribution-index .modal-form-order table.table-products td.quantity input {
text-align: center;
color: black;
}
/* line 400, ../sass/distribution/_index.scss */
/* line 404, ../sass/distribution/_index.scss */
.distribution-index .modal-form-order table.table-products td.quantity .form-control {
border-right: 0px none;
padding-right: 4px;
}
/* line 405, ../sass/distribution/_index.scss */
/* line 409, ../sass/distribution/_index.scss */
.distribution-index .modal-form-order table.table-products td.quantity .input-group-addon {
padding: 5px;
padding-left: 0px;
@@ -2269,35 +2273,35 @@ termes.
border-left: 0px none;
border-right: 0px none;
}
/* line 414, ../sass/distribution/_index.scss */
/* line 418, ../sass/distribution/_index.scss */
.distribution-index .modal-form-order table.table-products td.quantity-remaining {
text-align: right;
}
/* line 417, ../sass/distribution/_index.scss */
/* line 421, ../sass/distribution/_index.scss */
.distribution-index .modal-form-order table.table-products td.quantity-remaining.quantity-remaining, .distribution-index .modal-form-order table.table-products td.quantity-remaining.infinite {
color: #00A65A;
}
/* line 421, ../sass/distribution/_index.scss */
/* line 425, ../sass/distribution/_index.scss */
.distribution-index .modal-form-order table.table-products td.quantity-remaining.negative {
color: #DD4B39;
}
/* line 425, ../sass/distribution/_index.scss */
/* line 429, ../sass/distribution/_index.scss */
.distribution-index .modal-form-order table.table-products td.quantity-remaining.infinite, .distribution-index .modal-form-order table.table-products td.quantity-remaining.empty {
font-size: 18px;
}
/* line 432, ../sass/distribution/_index.scss */
/* line 436, ../sass/distribution/_index.scss */
.distribution-index .modal-form-order .actions-form button {
margin-left: 15px;
}
/* line 440, ../sass/distribution/_index.scss */
/* line 444, ../sass/distribution/_index.scss */
.distribution-index .modal-payment .info-box .info-box-icon {
width: 50px;
}
/* line 443, ../sass/distribution/_index.scss */
/* line 447, ../sass/distribution/_index.scss */
.distribution-index .modal-payment .info-box .info-box-icon i {
font-size: 30px;
}
/* line 448, ../sass/distribution/_index.scss */
/* line 452, ../sass/distribution/_index.scss */
.distribution-index .modal-payment .info-box .info-box-content {
margin-left: 50px;
}
@@ -2623,16 +2627,24 @@ termes.
display: block;
}
/* line 120, ../sass/_responsive.scss */
.distribution-index #orders table .state-payment-mobile {
display: block;
}
/* line 123, ../sass/_responsive.scss */
.distribution-index #orders table .state-payment-mobile .glyphicon-time {
display: none;
}
/* line 129, ../sass/_responsive.scss */
.distribution-index #orders table ul.dropdown-menu a {
padding: 15px;
}
/* line 125, ../sass/_responsive.scss */
/* line 134, ../sass/_responsive.scss */
.distribution-index #orders table button.dropdown-toggle,
.distribution-index #orders table button.btn-moins,
.distribution-index #orders table button.btn-plus {
padding: 15px;
}
/* line 132, ../sass/_responsive.scss */
/* line 141, ../sass/_responsive.scss */
.distribution-index #orders table .column-origin,
.distribution-index #orders table .column-point-sale,
.distribution-index #orders table .column-state-payment,

+ 5
- 0
backend/web/js/vuejs/distribution-index.js Переглянути файл

@@ -758,6 +758,11 @@ var app = new Vue({
},
});

Vue.component('order-state-payment', {
props: ['order', 'producer'],
template: '#order-state-payment',
});

Vue.component('modal', {
template: '#modal-template'
})

+ 9
- 0
backend/web/sass/_responsive.scss Переглянути файл

@@ -116,6 +116,15 @@ termes.
}

table {

.state-payment-mobile {
display: block;

.glyphicon-time {
display: none;
}
}

ul.dropdown-menu {
a {
padding: 15px;

+ 4
- 0
backend/web/sass/distribution/_index.scss Переглянути файл

@@ -296,6 +296,10 @@ termes.
width: 120px;
}

.state-payment-mobile {
display: none;
}

td.column-payment {
div.btn-group {
width: 125px;

+ 29
- 0
common/config/test-local.php Переглянути файл

@@ -0,0 +1,29 @@
<?php

return [
'components' => [
'db' => [
'class' => 'yii\db\Connection',
'dsn' => 'mysql:host=localhost;dbname=opendistrib_test',
'username' => 'root',
'password' => 'root',
'charset' => 'utf8',
],
'mailer' => [
'class' => 'yii\swiftmailer\Mailer',
'viewPath' => '@common/mail',
// send all mails to a file by default. You have to set
// 'useFileTransport' to false and configure a transport
// for the mailer to send real emails.
'useFileTransport' => true,
'transport' => [
'class' => 'Swift_SmtpTransport',
'host' => 'smtp-laclic.alwaysdata.net',
'username' => 'nepasrepondre@laclic.fr',
'password' => 'UPdz4ain73u3T3S74z2MHG9gUKnu6Qq6',
'port' => '25',
//'encryption' => 'tls',
],
],
],
];

+ 132
- 0
tests/codeception/producer/_output/ContactCept.fail.html Переглянути файл

@@ -0,0 +1,132 @@
<!DOCTYPE html>
<html lang="fr-FR">
<head>
<title>Démo | Contact</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="base-url" content="/Opendistrib/producer/web">
<meta name="slug-producer" content="demo">
<link rel="icon" type="image/png"
href="/Opendistrib/producer/web/img/favicon-distrib.png"/>
<link href="/producer/web/assets/d52c06b/css/bootstrap.css" rel="stylesheet">
<link href="/producer/web/assets/86336c25/bootstrap/css/bootstrap.min.css?v=1660289677" rel="stylesheet">
<link href="/producer/web/assets/86336c25/js/jquery-ui-1.11.4.custom/jquery-ui.min.css?v=1660289677" rel="stylesheet">
<link href="/producer/web/assets/86336c25/js/jquery-ui-1.11.4.custom/jquery-ui.theme.css?v=1660289677" rel="stylesheet">
<link href="/producer/web/assets/86336c25/js/vuejs/vcalendar/vcalendar.min.css?v=1660289677" rel="stylesheet">
<link href="/producer/web/assets/86336c25/css/screen.css?v=1660289677" rel="stylesheet">
<link href="/producer/web/css/screen.css?v=1680250670" rel="stylesheet"></head>
<body class="site-contact">

<div id="header-bap">
<ul id="nav-bap" class="nav"><li id="label1" class="dropdown"><a class="dropdown-toggle" href="#" data-toggle="dropdown"><span class="glyphicon glyphicon-menu-hamburger"></span> <span class="caret"></span></a><ul id="w2" class="dropdown-menu"><li><a href="http://localhost/Opendistrib/frontend/web/site/index" tabindex="-1"><span class="glyphicon glyphicon-chevron-left"></span> Retour à l'accueil</a></li>
<li><a href="http://localhost/Opendistrib/frontend/web/site/signup" tabindex="-1"><span class="glyphicon glyphicon-user"></span> Inscription</a></li>
<li><a href="http://localhost/Opendistrib/frontend/web/site/login?return_url=http%3A%2F%2Flocalhost%2Findex-test.php%2Fdemo" tabindex="-1"><span class="glyphicon glyphicon-log-in"></span> Connexion</a></li></ul></li></ul></div>

<div class="container">
<div id="left" class="col-md-3">
<div class="fixed">
<h1>Démo</h1>
<h2>Boulangerie à Besançon (25000)</h2>

<nav id="main-nav">
<ul id="w3" class="nav"><li><a href="/Opendistrib/producer/web/demo"><span class="glyphicon glyphicon-th-large"></span> Accueil</a></li>
<li><a href="http://localhost/Opendistrib/frontend/web/site/producer?id=32&amp;return_url=http%3A%2F%2Flocalhost%2FOpendistrib%2Fproducer%2Fweb%2Fdemo%2Forder%2Forder"><span class="glyphicon glyphicon-plus"></span> Commander</a></li>
<li class="active"><a href="/Opendistrib/producer/web/demo/site/contact"><span class="glyphicon glyphicon-envelope"></span> Contact</a></li></ul> </nav>
</div>
</div>

<div id="main" class="col-md-9">
<div id="img-big">
<img class="img-photo" src="/Opendistrib/producer/web/uploads/bread-2595658_1920-5ced4b138049a.jpg"
alt="Photo Démo"/>
</div>
<div id="infos-producer">
<span data-toggle="tooltip" data-placement="bottom" title="Heure limite de commande">
<span class="glyphicon glyphicon-time"></span> Commande avant
<strong>16 h</strong></span>,
<span data-toggle="tooltip" data-placement="bottom"
title="Exemple : commande le lundi pour le
mardi"><strong>1 jour</strong> à l'avance</span>
<div class="clr"></div>
</div>

<h2 id="page-title">
Contact </h2>
<section id="content">
<div class="alert alert-danger" role="alert">
Il y a eu une erreur lors de l'envoi de votre message. </div>
<div class="site-contact">
<div class="row">
<div class="col-lg-5">
<form id="contact-form" action="/demo/site/contact" method="post"> <div class="form-group field-contactform-name required">
<label class="control-label" for="contactform-name">Nom</label>
<input type="text" id="contactform-name" class="form-control" name="ContactForm[name]" aria-required="true">

<p class="help-block help-block-error"></p>
</div> <div class="form-group field-contactform-email required">
<label class="control-label" for="contactform-email">Email</label>
<input type="text" id="contactform-email" class="form-control" name="ContactForm[email]" aria-required="true">

<p class="help-block help-block-error"></p>
</div> <div class="form-group field-contactform-subject required">
<label class="control-label" for="contactform-subject">Sujet</label>
<input type="text" id="contactform-subject" class="form-control" name="ContactForm[subject]" aria-required="true">

<p class="help-block help-block-error"></p>
</div> <div class="form-group field-contactform-body required">
<label class="control-label" for="contactform-body">Message</label>
<textarea id="contactform-body" class="form-control" name="ContactForm[body]" rows="6" aria-required="true"></textarea>

<p class="help-block help-block-error"></p>
</div>
<div class="form-group field-contactform-verifycode">
<label class="control-label" for="contactform-verifycode">Code de vérification</label>
<div class="row"><div class="col-md-12"><img id="contactform-verifycode-image" src="/index-test.php/demo/site/captcha?v=64269cf450f772.41015171" alt=""></div><div class="col-md-12"><input type="text" id="contactform-verifycode" class="form-control" name="ContactForm[verifyCode]"></div></div>

<p class="help-block help-block-error"></p>
</div> <div class="form-group field-contactform-istest">
<label class="control-label" for="contactform-istest">Is Test</label>
<input type="hidden" id="contactform-istest" class="form-control" name="ContactForm[isTest]">

<p class="help-block help-block-error"></p>
</div> <div class="form-group">
<button type="submit" class="btn btn-primary" name="contact-button">Envoyer</button> </div>
</form> </div>
</div>
</div>
</section>

</div>
</div>

<footer id="footer" class="container">
<div class="content">
<a href="http://localhost/Opendistrib/frontend/web/site/index">distrib</a> &bull;
<a href="http://localhost/Opendistrib/frontend/web/site/mentions">Mentions
légales</a> &bull;
<a href="http://localhost/Opendistrib/frontend/web/site/cgv">CGS</a> &bull;
<a id="code-source" href="https://forge.laclic.fr/Laclic/Opendistrib">Code source</a>
</div>
</footer>
<script type="text/javascript" src="https://cdn.polyfill.io/v3/polyfill.min.js?features=Intl.~locale.fr"></script>
<script src="https://code.jquery.com/jquery-1.11.2.min.js"></script>
<script src="/producer/web/assets/8f677d6c/yii.js"></script>
<script src="/producer/web/assets/8f677d6c/yii.captcha.js"></script>
<script src="/producer/web/assets/8f677d6c/yii.activeForm.js"></script>
<script src="/producer/web/assets/86336c25/js/jquery-ui-1.11.4.custom/jquery-ui.min.js?v=1660289677"></script>
<script src="/producer/web/assets/86336c25/js/promise-polyfill/promise.min.js?v=1660289677"></script>
<script src="/producer/web/assets/86336c25/js/axios/axios.min.js?v=1660289677"></script>
<script src="/producer/web/assets/86336c25/js/vuejs/vue.js?v=1660289677"></script>
<script src="/producer/web/assets/86336c25/js/vuejs/vcalendar/vcalendar.min.js?v=1660289677"></script>
<script src="/producer/web/assets/86336c25/js/utils.js?v=1660289677"></script>
<script src="/producer/web/js/producer.js?v=1660289677"></script>
<script src="/producer/web/assets/d52c06b/js/bootstrap.js"></script>
<script>jQuery(function ($) {
jQuery('#contactform-verifycode-image').yiiCaptcha({"refreshUrl":"\/index-test.php\/demo\/site\/captcha?refresh=1","hashKey":"yiiCaptcha\/site\/captcha"});
jQuery('#contact-form').yiiActiveForm([], []);
});</script></body>
</html>

+ 1904
- 0
tests/codeception/producer/_output/HomeCept.fail.html
Різницю між файлами не показано, бо вона завелика
Переглянути файл


Завантаження…
Відмінити
Зберегти