Преглед на файлове

[Backend] Produits : tableau d'édition avancée

feature/tableau_edition_avancee
Guillaume преди 3 години
родител
ревизия
bdd27ad2c2
променени са 6 файла, в които са добавени 82 реда и са изтрити 50 реда
  1. +47
    -38
      ShopBundle/Resources/public/css/backend/custom.css
  2. +16
    -6
      ShopBundle/Resources/public/sass/backend/custom.scss
  3. +1
    -0
      ShopBundle/Resources/views/backend/default/layout/layout-ajax.html.twig
  4. +2
    -3
      ShopBundle/Resources/views/backend/productfamily/form.html.twig
  5. +1
    -1
      ShopBundle/Resources/views/backend/productfamily/macros.html.twig
  6. +15
    -2
      ShopBundle/Services/Price/ProductPriceUtils.php

+ 47
- 38
ShopBundle/Resources/public/css/backend/custom.css Целия файл

@@ -640,14 +640,23 @@ table th .select2-container--default .select2-selection--single {
.layout-ajax #edit-productfamily-form .card-footer {
display: none;
}
/* line 251, ../../sass/backend/custom.scss */
.layout-ajax #edit-productfamily-form .in-advanced-editing-table .form {
padding-top: 0px;
}
/* line 254, ../../sass/backend/custom.scss */
.layout-ajax #edit-productfamily-form .in-advanced-editing-table .card-sections,
.layout-ajax #edit-productfamily-form .in-advanced-editing-table .row-note {
display: none;
}

/* ORDER */
/* line 254, ../../sass/backend/custom.scss */
/* line 264, ../../sass/backend/custom.scss */
.table-order-summary {
width: 100%;
}

/* line 257, ../../sass/backend/custom.scss */
/* line 267, ../../sass/backend/custom.scss */
.order-product-item.redelivery {
background: rgba(18, 104, 253, 0.38) !important;
}
@@ -655,36 +664,36 @@ table th .select2-container--default .select2-selection--single {
/*.select2-container--bootstrap .select2-selection{max-width: none;}*/
/*.order-product-item{margin: 15px 0; padding: 0;}*/
/* Product */
/* line 262, ../../sass/backend/custom.scss */
/* line 272, ../../sass/backend/custom.scss */
.product-form-modal {
display: none;
}

/* line 263, ../../sass/backend/custom.scss */
/* line 273, ../../sass/backend/custom.scss */
.product-form.modal .form-check-label {
font-style: italic;
color: #666;
text-align: left;
}

/* line 264, ../../sass/backend/custom.scss */
/* line 274, ../../sass/backend/custom.scss */
.products-collection-table .inherited {
color: #888;
font-style: italic;
font-weight: initial;
}

/* line 265, ../../sass/backend/custom.scss */
/* line 275, ../../sass/backend/custom.scss */
.products-collection-table td {
position: relative;
}

/* line 266, ../../sass/backend/custom.scss */
/* line 276, ../../sass/backend/custom.scss */
.card-body.p-0 .products-collection-table tbody > tr > td:first-of-type, .card-body.p-0 .products-collection-table tbody > tr > th:first-of-type, .card-body.p-0 .products-collection-table thead > tr > td:first-of-type, .card-body.p-0 .products-collection-table thead > tr > th:first-of-type {
padding-left: 0.35rem;
}

/* line 267, ../../sass/backend/custom.scss */
/* line 277, ../../sass/backend/custom.scss */
.products-collection-table .btn-empty-field {
position: absolute;
right: 3px;
@@ -693,14 +702,14 @@ table th .select2-container--default .select2-selection--single {
padding: 0px;
}

/* line 268, ../../sass/backend/custom.scss */
/* line 278, ../../sass/backend/custom.scss */
#lc-product-family-edit .products-collection-table {
table-layout: fixed;
/* background-clip: padding-box;*/
border-collapse: collapse;
}

/* line 269, ../../sass/backend/custom.scss */
/* line 279, ../../sass/backend/custom.scss */
#lc-product-family-edit .products-collection-table th {
font-size: 13px;
border-left: 1px solid #dee2e6;
@@ -710,22 +719,22 @@ table th .select2-container--default .select2-selection--single {
position: relative;
}

/* line 270, ../../sass/backend/custom.scss */
/* line 280, ../../sass/backend/custom.scss */
#lc-product-family-edit .products-collection-table tfoot th {
border-top: 2px solid #dee2e6;
}

/* line 271, ../../sass/backend/custom.scss */
/* line 281, ../../sass/backend/custom.scss */
#lc-product-family-edit .products-collection-table th span {
white-space: initial;
}

/* line 272, ../../sass/backend/custom.scss */
/* line 282, ../../sass/backend/custom.scss */
#lc-product-family-edit .products-collection-table th:last-child {
border-right: 1px solid #dee2e6;
}

/* line 273, ../../sass/backend/custom.scss */
/* line 283, ../../sass/backend/custom.scss */
#lc-product-family-edit .products-collection-table td {
border-left: 1px solid #dee2e6;
text-align: center;
@@ -733,26 +742,26 @@ table th .select2-container--default .select2-selection--single {
border-bottom: 1px solid #dee2e6;
}

/* line 274, ../../sass/backend/custom.scss */
/* line 284, ../../sass/backend/custom.scss */
#lc-product-family-edit .products-collection-table td:last-child {
border-right: 1px solid #dee2e6;
white-space: nowrap;
}

/* line 275, ../../sass/backend/custom.scss */
/* line 285, ../../sass/backend/custom.scss */
#lc-product-family-edit .btn-add-product {
margin: 20px 0;
float: right;
}

/* line 276, ../../sass/backend/custom.scss */
/* line 286, ../../sass/backend/custom.scss */
#lc-product-family-edit .inherited {
color: #888;
font-style: italic;
font-weight: initial;
}

/* line 277, ../../sass/backend/custom.scss */
/* line 287, ../../sass/backend/custom.scss */
#lc-product-family-edit .products-collection-table td .value {
min-width: 80%;
margin: auto;
@@ -760,79 +769,79 @@ table th .select2-container--default .select2-selection--single {
cursor: pointer;
}

/* line 278, ../../sass/backend/custom.scss */
/* line 288, ../../sass/backend/custom.scss */
#lc-product-family-edit .products-collection-table td .modal {
text-align: left;
}

/* line 279, ../../sass/backend/custom.scss */
/* line 289, ../../sass/backend/custom.scss */
table.products-collection-table th.main-info, td.buyingPrice, td.multiplyingFactor, td.priceWithTax {
background: #eeeeee;
background-clip: padding-box;
text-decoration: underline;
}

/* line 281, ../../sass/backend/custom.scss */
/* line 291, ../../sass/backend/custom.scss */
table.products-collection-table tr.disabled {
opacity: 0.5;
}

/* line 282, ../../sass/backend/custom.scss */
/* line 292, ../../sass/backend/custom.scss */
.table-striped tbody .tr-sep {
border-top: 2px solid #888;
}

/* DeliveryZone */
/* line 286, ../../sass/backend/custom.scss */
/* line 296, ../../sass/backend/custom.scss */
#autocomplete-cities {
position: relative;
}

/* line 290, ../../sass/backend/custom.scss */
/* line 300, ../../sass/backend/custom.scss */
#autocomplete-cities .ui-autocomplete {
left: 30%;
top: 41px;
margin-left: 18px;
}

/* line 296, ../../sass/backend/custom.scss */
/* line 306, ../../sass/backend/custom.scss */
.head-reminders {
margin-top: 15px;
}

/* TABLEAU DE BORD */
/* line 299, ../../sass/backend/custom.scss */
/* line 309, ../../sass/backend/custom.scss */
.todo-list > li {
position: relative;
}

/* line 300, ../../sass/backend/custom.scss */
/* line 310, ../../sass/backend/custom.scss */
.todo-list > li .text {
margin-left: 30px;
}

/* line 301, ../../sass/backend/custom.scss */
/* line 311, ../../sass/backend/custom.scss */
.todo-list > li .tools {
position: absolute;
top: 4px;
right: 15px;
}

/* line 303, ../../sass/backend/custom.scss */
/* line 313, ../../sass/backend/custom.scss */
#addTicketMessageForm {
margin-top: 30px;
border-top: 2px dotted #eee;
padding-top: 30px;
}

/* line 305, ../../sass/backend/custom.scss */
/* line 315, ../../sass/backend/custom.scss */
#dashboard .list-btn-statistic {
display: flex;
flex-wrap: wrap;
justify-content: center;
}

/* line 306, ../../sass/backend/custom.scss */
/* line 316, ../../sass/backend/custom.scss */
#dashboard .btn-statistic {
width: 120px;
height: 70px;
@@ -841,41 +850,41 @@ table.products-collection-table tr.disabled {
line-height: 1rem;
}

/* line 307, ../../sass/backend/custom.scss */
/* line 317, ../../sass/backend/custom.scss */
#dashboard .btn-statistic small {
margin-bottom: 10px;
display: block;
}

/* line 308, ../../sass/backend/custom.scss */
/* line 318, ../../sass/backend/custom.scss */
#dashboard .btn-statistic .value {
display: block;
}

/* line 310, ../../sass/backend/custom.scss */
/* line 320, ../../sass/backend/custom.scss */
#dashboard #range_date_interval {
margin-bottom: 20px;
}

/* line 311, ../../sass/backend/custom.scss */
/* line 321, ../../sass/backend/custom.scss */
#dashboard #range_date_interval label {
float: left;
margin-right: 20px;
}

/* line 312, ../../sass/backend/custom.scss */
/* line 322, ../../sass/backend/custom.scss */
#dashboard #range_date_interval .form-check {
float: left;
margin-right: 10px;
}

/* line 313, ../../sass/backend/custom.scss */
/* line 323, ../../sass/backend/custom.scss */
#dashboard .table-condensed .btn, #dashboard .table-condensed .btn-sm {
white-space: nowrap;
}

/* Tickets */
/* line 319, ../../sass/backend/custom.scss */
/* line 329, ../../sass/backend/custom.scss */
#ticket-list .btn-sm {
display: block;
}

+ 16
- 6
ShopBundle/Resources/public/sass/backend/custom.scss Целия файл

@@ -232,19 +232,29 @@ table th .select2-container--default .select2-selection--single{padding:0.3rem 0
.layout-ajax {
#edit-productfamily-form {
.card-sections {
width: 100% ;
position: fixed ;
left: 0px ;
top: 0px ;
width: 100%;
position: fixed;
left: 0px;
top: 0px;
z-index: 10;
}

.form {
padding-top: 50px ;
padding-top: 50px;
}

.card-footer {
display: none ;
display: none;
}

.in-advanced-editing-table {
.form {
padding-top: 0px ;
}
.card-sections,
.row-note {
display: none;
}
}
}
}

+ 1
- 0
ShopBundle/Resources/views/backend/default/layout/layout-ajax.html.twig Целия файл

@@ -3,6 +3,7 @@
<div class="layout-ajax">
{% block ajax %}
{% block head_stylesheets %}
<link rel="stylesheet" href="{{ asset('bundles/lcshop/css/backend/adminlte/plugins/fontawesome-free/css/all.min.css') }}">
<link rel="stylesheet" href="{{ asset('bundles/lcshop/css/backend/adminlte/adminlte.css') }}">
<link rel="stylesheet" href="{{ asset('bundles/lcshop/css/backend/custom.css') }}">
{% endblock %}

+ 2
- 3
ShopBundle/Resources/views/backend/productfamily/form.html.twig Целия файл

@@ -4,7 +4,7 @@

{% set formValues = form.vars.value %}

<div id="lc-product-family-edit">
<div id="lc-product-family-edit" class="{% if app.request.query.get('inAdvancedEditingTable') %}in-advanced-editing-table{% endif %}">
<div class="card card-light card-sections">
<div class="lc-vue-js-container card-header p-0 border-bottom-0">
<ul class="nav nav-tabs" id="nav-params">
@@ -18,7 +18,6 @@
<span class="glyphicon glyphicon-triangle-bottom"></span>
<i class="fa fa-exclamation-circle invalid-form"></i>
</a>

</li>
</ul>
</div>
@@ -104,7 +103,7 @@
</div>
</div>
{% if entity.note|striptags !="" %}
<div class="row">
<div class="row row-note">
{{ macros.startCard(12, 'ProductFamily.note', 'light') }}
{{ entity.note|raw }}
{{ macros.endCard() }}

+ 1
- 1
ShopBundle/Resources/views/backend/productfamily/macros.html.twig Целия файл

@@ -23,7 +23,7 @@
{{ productFamily.unit.unitReference }}
{% endif %}
</strong>
</span>
</span>
<br />
{% endfor %}
{% endmacro total_order_product_family %}

+ 15
- 2
ShopBundle/Services/Price/ProductPriceUtils.php Целия файл

@@ -79,14 +79,14 @@ class ProductPriceUtils
public function getBuyingPrice(ProductPropertyInterface $product)
{
if ($product->getBehaviorPriceInherited() == 'by-piece') {
return $product->getBuyingPriceInherited();
return $product->getBuyingPriceInherited() ;
}
elseif ($product->getBehaviorPriceInherited() == 'by-reference-unit') {

if ($product->getQuantityInherited() > 0) {
return $product->getBuyingPriceByRefUnitInherited() * ($product->getQuantityInherited() / $product->getUnitInherited()->getCoefficient());
}
else{
else {
return 0;
}
}
@@ -100,6 +100,19 @@ class ProductPriceUtils
);
}

public function getBuyingPriceByRefUnit(ProductPropertyInterface $product)
{
return $product->getBuyingPriceByRefUnitInherited() ;
}

public function getBuyingPriceByRefUnitWithTax(ProductPropertyInterface $product)
{
return $this->applyTax(
$this->getBuyingPriceByRefUnit($product),
$product->getTaxRateInherited()->getValue()
);
}

public function getMultiplyingFactor(ProductPropertyInterface $product)
{
return $this->round($this->getPriceWithTax($product) / $this->getBuyingPrice($product));

Loading…
Отказ
Запис