Просмотр исходного кода

Merge branch 'develop' of https://gitea.laclic.fr/Laclic/LcShopBundle into develop

feature/export_comptable
Guillaume 4 лет назад
Родитель
Сommit
3c91f9aca9
12 измененных файлов: 216 добавлений и 150 удалений
  1. +46
    -25
      ShopBundle/Controller/Backend/ProductFamilyController.php
  2. +1
    -0
      ShopBundle/Model/Product.php
  3. +2
    -1
      ShopBundle/Repository/OrderShopRepository.php
  4. +0
    -1
      ShopBundle/Resources/config/easy_admin/base.yaml
  5. +135
    -114
      ShopBundle/Resources/public/css/backend/custom.css
  6. +2
    -1
      ShopBundle/Resources/public/js/backend/script/default/vuejs-mixins.js
  7. +2
    -2
      ShopBundle/Resources/public/js/backend/script/productfamily/vuejs-product-family.js
  8. +4
    -2
      ShopBundle/Resources/public/sass/backend/custom.scss
  9. +1
    -0
      ShopBundle/Resources/translations/lcshop.fr.yaml
  10. +1
    -1
      ShopBundle/Resources/views/backend/default/layout/layout.html.twig
  11. +1
    -1
      ShopBundle/Resources/views/backend/default/list.html.twig
  12. +21
    -2
      ShopBundle/Resources/views/backend/productfamily/macros.html.twig

+ 46
- 25
ShopBundle/Controller/Backend/ProductFamilyController.php Просмотреть файл

@@ -48,8 +48,8 @@ class ProductFamilyController extends AdminController
));

$formBuilder->add('stayOnPage', HiddenType::class, array(
'required'=>false,
'mapped'=>false,
'required' => false,
'mapped' => false,
));
$formBuilder->add('warningMessageType', ChoiceType::class, array(
'choices' => array(
@@ -167,9 +167,9 @@ class ProductFamilyController extends AdminController
return $formBuilder;
}

public function updateProductFamilyEntity($entity, $editForm=false)
public function updateProductFamilyEntity($entity, $editForm = false)
{
if($editForm) {
if ($editForm) {
$this->processReductionCatalog($entity, $editForm);
$this->processCategories($entity);
$this->processProducts($entity);
@@ -213,7 +213,7 @@ class ProductFamilyController extends AdminController
}
}

protected function processProducts($entity, $clone =false)
protected function processProducts($entity, $clone = false)
{
//si il existe un et un seul produit pour ce product family n'ajoute rien supprime rien
if (count($entity->getProducts()) == 0) {
@@ -223,12 +223,12 @@ class ProductFamilyController extends AdminController
$entity->addProduct($product);
} else {
foreach ($entity->getProducts() as $i => $product) {
if($clone){
if ($clone) {
$newProduct = clone $product;
$newProduct->setProductFamily($entity);
$this->em->persist($newProduct);
$entity->addProduct($newProduct);
}else {
} else {
$product->setProductFamily($entity);
$this->em->persist($product);
$entity->addProduct($product);
@@ -299,7 +299,6 @@ class ProductFamilyController extends AdminController
if ($editForm->isSubmitted() && count($entity->getProductCategories()) == 0) {
$editForm->get('productCategories')->addError(new FormError('Vous devez choisir au moins une catégorie'));
}

if ($editForm->isSubmitted() && $editForm->isValid() && count($entity->getProductCategories()) > 0) {

$this->processUploadedFiles($editForm);
@@ -310,10 +309,10 @@ class ProductFamilyController extends AdminController

$this->utils->addFlash('success', 'Produit sauvegardé');

if($editForm->get('stayOnPage')->getData()!="false" || $this->request->get('submitAndStay')!==null){
if ($editForm->get('stayOnPage')->getData() != "false" || $this->request->get('submitAndStay') !== null) {
$refererUrl = $this->request->query->get('referer', '');
return $this->redirectToRoute('easyadmin', ['entity' => 'ProductFamily', 'action' => 'edit', 'id' => $id, 'referer' => $refererUrl]) ;
}else {
return $this->redirectToRoute('easyadmin', ['entity' => 'ProductFamily', 'action' => 'edit', 'id' => $id, 'referer' => $refererUrl]);
} else {
return $this->redirectToReferrer();
}

@@ -361,9 +360,9 @@ class ProductFamilyController extends AdminController
$this->executeDynamicMethod('persist<EntityName>Entity', [$entity, $newForm]);
$this->dispatch(EasyAdminEvents::POST_PERSIST, ['entity' => $entity]);

if($newForm->get('stayOnPage')->getData()!="false" || $this->request->get('submitAndStay')!==null){
return $this->redirectToRoute('easyadmin', ['entity' => 'ProductFamily', 'action' => 'edit', 'id' => $entity->getId()]) ;
}else {
if ($newForm->get('stayOnPage')->getData() != "false" || $this->request->get('submitAndStay') !== null) {
return $this->redirectToRoute('easyadmin', ['entity' => 'ProductFamily', 'action' => 'edit', 'id' => $entity->getId()]);
} else {
return $this->redirectToReferrer();
}
}
@@ -389,37 +388,59 @@ class ProductFamilyController extends AdminController
return $this->executeDynamicMethod('render<EntityName>Template', ['new', $this->entity['templates']['new'], $parameters]);
}

public function duplicateAction(){
public function duplicateAction()
{
$id = $this->request->query->get('id');
$refererUrl = $this->request->query->get('referer', '');

$easyadmin = $this->request->attributes->get('easyadmin');

$entity= $this->em->getRepository($easyadmin['entity']['class'])->find($id);
$entity = $this->em->getRepository($easyadmin['entity']['class'])->find($id);

$newProductFamily = clone $entity ;
if($easyadmin['entity']['name'] == "ProductFamily"){
$newProductFamily = clone $entity;
if ($easyadmin['entity']['name'] == "ProductFamily") {
$this->processProducts($newProductFamily, true);
}
$this->em->persist($newProductFamily) ;
$this->em->flush() ;
$this->em->persist($newProductFamily);
$this->em->flush();

return $this->redirectToRoute('easyadmin', ['entity' => $easyadmin['entity']['name'], 'action' => 'edit', 'id' =>$newProductFamily->getId(), 'referer' =>$refererUrl ]) ;
return $this->redirectToRoute('easyadmin', ['entity' => $easyadmin['entity']['name'], 'action' => 'edit', 'id' => $newProductFamily->getId(), 'referer' => $refererUrl]);
}


public function getTotalProductOrdered($entity){
public function getTotalProductOrdered($entity)
{
$orderShopRepo = $this->em->getRepository(OrderShopInterface::class);
$totalProductOrdered = array();
$currentWeekNumber = $this->orderUtils->getWeekNumberCurrent();
$totalProductOrdered['total'][$currentWeekNumber +1] = 0;
$totalProductOrdered['total'][$currentWeekNumber ] = 0;

foreach ($entity->getProducts() as $product) {
$currentWeekNumber = $this->orderUtils->getWeekNumberCurrent();
//Les commandes sont ouvertes ont récupèrent les commandes en cours et celle de la semaine dernière
if ($this->orderUtils->isOpenSale()) {
$totalProductOrdered[$product->getId()][$currentWeekNumber +1] = $orderShopRepo->countValidOrderProductsOfWeekByProduct($currentWeekNumber +1, $product->getId());
$totalProductOrdered[$product->getId()][$currentWeekNumber] = $orderShopRepo->countValidOrderProductsOfWeekByProduct($currentWeekNumber, $product->getId());
$totalProductOrdered[$product->getId()][$currentWeekNumber - 1] = $orderShopRepo->countValidOrderProductsOfWeekByProduct($currentWeekNumber - 1, $product->getId());

if ($entity->getBehaviorCountStock() == ProductFamily::BEHAVIOR_COUNT_STOCK_BY_MEASURE) {
$ratioByMeasure = $product->getQuantity() / $product->getUnitInherited()->getCoefficient();
$totalProductOrdered['total'][$currentWeekNumber +1] += $orderShopRepo->countValidOrderProductsOfWeekByProduct($currentWeekNumber +1, $product->getId()) * $ratioByMeasure;
$totalProductOrdered['total'][$currentWeekNumber] += $orderShopRepo->countValidOrderProductsOfWeekByProduct($currentWeekNumber, $product->getId()) * $ratioByMeasure;
} else {
$totalProductOrdered['total'][$currentWeekNumber +1] += $orderShopRepo->countValidOrderProductsOfWeekByProduct($currentWeekNumber+1, $product->getId());
$totalProductOrdered['total'][$currentWeekNumber] += $orderShopRepo->countValidOrderProductsOfWeekByProduct($currentWeekNumber, $product->getId());
}

} else {
$totalProductOrdered[$product->getId()][$currentWeekNumber] = $orderShopRepo->countValidOrderProductsOfWeekByProduct($currentWeekNumber, $product->getId());
$totalProductOrdered[$product->getId()][$currentWeekNumber +1] = $orderShopRepo->countValidOrderProductsOfWeekByProduct($currentWeekNumber+1, $product->getId());
if ($entity->getBehaviorCountStock() == ProductFamily::BEHAVIOR_COUNT_STOCK_BY_MEASURE) {
$ratioByMeasure = $product->getQuantity() / $product->getUnitInherited()->getCoefficient();
$totalProductOrdered['total'][$currentWeekNumber+1] += $orderShopRepo->countValidOrderProductsOfWeekByProduct($currentWeekNumber+1, $product->getId()) * $ratioByMeasure;
}else{
$totalProductOrdered['total'][$currentWeekNumber+1] += $orderShopRepo->countValidOrderProductsOfWeekByProduct($currentWeekNumber+1, $product->getId());
}
}

}
return $totalProductOrdered;
}

+ 1
- 0
ShopBundle/Model/Product.php Просмотреть файл

@@ -51,6 +51,7 @@ abstract class Product extends AbstractEntity implements SortableInterface, Prod
public function __construct()
{
$this->orderProducts = new ArrayCollection();
$this->status = 1;
}

public function getBuyingPriceInherited()

+ 2
- 1
ShopBundle/Repository/OrderShopRepository.php Просмотреть файл

@@ -255,7 +255,8 @@ class OrderShopRepository extends BaseRepository implements DefaultRepositoryInt
$query->setParameter('product', $productId);
$query->select('SUM(orderProduct.quantityOrder) as quantity');

return $query->getQuery()->getOneOrNullResult();
$result = $query->getQuery()->getOneOrNullResult();
return $result['quantity'];

}
}

+ 0
- 1
ShopBundle/Resources/config/easy_admin/base.yaml Просмотреть файл

@@ -15,7 +15,6 @@ easy_admin:
- '/bundles/lcshop/js/backend/script/custom.js'
css:
- '/bundles/lcshop/css/backend/jquery-ui.min.css'
- '/bundles/lcshop/css/backend/custom.css'
form_theme:
- '@LcShop/backend/form/custom_bootstrap_4.html.twig'
- '@LcShop/backend/form/ckeditor_widget.html.twig'

+ 135
- 114
ShopBundle/Resources/public/css/backend/custom.css Просмотреть файл

@@ -72,7 +72,7 @@ a.link-as-text {
.main-sidebar .sidebar {
padding-left: 0px;
padding-right: 0px;
margin-top: 57px;
padding-top: 114px;
}

/* line 38, ../../sass/backend/custom.scss */
@@ -80,137 +80,158 @@ a.link-as-text {
padding: .4rem .5rem .4rem .7rem;
}

/* line 43, ../../sass/backend/custom.scss */
/* line 40, ../../sass/backend/custom.scss */
body#pdl-body .wrapper .main-sidebar {
bottom: 0;
float: none;
height: 100vh;
left: 0;
position: fixed;
top: 0;
}

/* line 41, ../../sass/backend/custom.scss */
body#pdl-body .wrapper .content-wrapper {
margin-top: 0;
padding-top: 57px;
}

/* line 42, ../../sass/backend/custom.scss */
.sidebar {
overflow-y: auto;
}

/* line 45, ../../sass/backend/custom.scss */
#lc-flash-messages {
display: none;
}

/* line 45, ../../sass/backend/custom.scss */
/* line 47, ../../sass/backend/custom.scss */
.main-sidebar .logo-long {
padding: 8px 0;
text-align: center;
}

/* line 46, ../../sass/backend/custom.scss */
/* line 48, ../../sass/backend/custom.scss */
.main-sidebar .logo-long img {
height: 40px;
display: inline-block;
}

/* line 47, ../../sass/backend/custom.scss */
/* line 49, ../../sass/backend/custom.scss */
.sidebar-collapse .main-sidebar .logo-long span {
display: none;
}

/* line 48, ../../sass/backend/custom.scss */
/* line 50, ../../sass/backend/custom.scss */
.sidebar-collapse .main-sidebar:hover .logo-long span {
display: inline-block;
}

/* line 50, ../../sass/backend/custom.scss */
/* line 52, ../../sass/backend/custom.scss */
.table.datatable-simple .highlight {
background: var(--teal);
}

/* line 51, ../../sass/backend/custom.scss */
/* line 53, ../../sass/backend/custom.scss */
.datatable-field-search.small {
width: 50px;
}

/* line 53, ../../sass/backend/custom.scss */
/* line 55, ../../sass/backend/custom.scss */
.dataTables_length, .dataTables_filter {
padding: .75rem 1.25rem 0.25rem;
}

/* line 55, ../../sass/backend/custom.scss */
/* line 57, ../../sass/backend/custom.scss */
table.fixedHeader-floating {
margin-top: 0px !important;
}

/* line 56, ../../sass/backend/custom.scss */
/* line 58, ../../sass/backend/custom.scss */
table th.sorting_asc, table th.sorting_desc {
border-top: 3px solid var(--success);
}

/* line 57, ../../sass/backend/custom.scss */
/* line 59, ../../sass/backend/custom.scss */
.card-body table.lc-table-list th.sorted, table th.sorting_asc, table th.sorting_desc {
border-top: 2px solid var(--success);
}

/*.card-body table.lc-table-list th{border-top:3px solid var(--success);}*/
/* line 59, ../../sass/backend/custom.scss */
/* line 61, ../../sass/backend/custom.scss */
table th.filtered {
border-top: 3px solid var(--primary);
}

/* line 62, ../../sass/backend/custom.scss */
/* line 64, ../../sass/backend/custom.scss */
.lc-table-list thead a {
color: #212529;
}

/* line 63, ../../sass/backend/custom.scss */
/* line 65, ../../sass/backend/custom.scss */
.table-filters-line th {
font-weight: 400;
position: relative;
}

/* line 64, ../../sass/backend/custom.scss */
/* line 66, ../../sass/backend/custom.scss */
.table-filters-line th input {
width: 350px;
}

/* line 65, ../../sass/backend/custom.scss */
/* line 67, ../../sass/backend/custom.scss */
#list_filter_id {
width: 60px;
}

/* line 66, ../../sass/backend/custom.scss */
/* line 68, ../../sass/backend/custom.scss */
.lc-table-list .date-range {
width: 130px;
}

/* line 68, ../../sass/backend/custom.scss */
/* line 70, ../../sass/backend/custom.scss */
th.actions, td.actions {
white-space: nowrap;
text-align: right;
}

/* line 70, ../../sass/backend/custom.scss */
/* line 72, ../../sass/backend/custom.scss */
.table td, .table th {
padding: 0.35rem;
}

/* line 71, ../../sass/backend/custom.scss */
/* line 73, ../../sass/backend/custom.scss */
.delivery-field .form-group {
display: inline-block;
margin-bottom: 0px;
margin-right: 15px;
}

/* line 72, ../../sass/backend/custom.scss */
/* line 74, ../../sass/backend/custom.scss */
.delivery-field .form-group .form-control {
width: 150px;
}

/* line 74, ../../sass/backend/custom.scss */
/* line 76, ../../sass/backend/custom.scss */
table th input {
width: auto;
}

/* line 75, ../../sass/backend/custom.scss */
/* line 77, ../../sass/backend/custom.scss */
table th .select2-container--default .select2-selection--single {
padding: 0.3rem 0.4rem;
}

/************************ LOGIN PAGE *********************/
/* line 78, ../../sass/backend/custom.scss */
/* line 80, ../../sass/backend/custom.scss */
.login-logo {
display: block;
margin: auto;
}

/************************ form error *********************/
/* line 81, ../../sass/backend/custom.scss */
/* line 83, ../../sass/backend/custom.scss */
.form-sent .form-control:invalid {
border-color: #dc3545;
padding-right: 2.25rem;
@@ -220,19 +241,19 @@ table th .select2-container--default .select2-selection--single {
background-size: calc(.75em + .375rem) calc(.75em + .375rem);
}

/* line 82, ../../sass/backend/custom.scss */
/* line 84, ../../sass/backend/custom.scss */
.form-sent select.form-control:invalid + .select2 .select2-selection {
border-color: #dc3545;
}

/* line 83, ../../sass/backend/custom.scss */
/* line 85, ../../sass/backend/custom.scss */
.form-sent select.form-control:invalid + .select2 .select2-selection b {
border-color: #dc3545 transparent transparent transparent;
}

/*CUSTOM Checkbox
/* Customize the label (the container) */
/* line 88, ../../sass/backend/custom.scss */
/* line 90, ../../sass/backend/custom.scss */
.form-check-label {
display: block;
position: relative;
@@ -245,7 +266,7 @@ table th .select2-container--default .select2-selection--single {
}

/* Hide the browser's default checkbox */
/* line 90, ../../sass/backend/custom.scss */
/* line 92, ../../sass/backend/custom.scss */
.form-check-label input {
position: absolute;
opacity: 0;
@@ -255,22 +276,22 @@ table th .select2-container--default .select2-selection--single {
}

/* Create a custom checkbox */
/* line 93, ../../sass/backend/custom.scss */
/* line 95, ../../sass/backend/custom.scss */
.form-check {
padding-left: 0px;
}

/* line 95, ../../sass/backend/custom.scss */
/* line 97, ../../sass/backend/custom.scss */
.form-sent .form-check-label input:invalid ~ .checkmark {
border-color: #dc3545;
}

/* line 96, ../../sass/backend/custom.scss */
/* line 98, ../../sass/backend/custom.scss */
.form-check-label input:disabled ~ .checkmark {
display: none;
}

/* line 97, ../../sass/backend/custom.scss */
/* line 99, ../../sass/backend/custom.scss */
.form-check-label input ~ .checkmark {
position: absolute;
top: 0;
@@ -281,36 +302,36 @@ table th .select2-container--default .select2-selection--single {
border: 1px solid var(--primary);
}

/* line 98, ../../sass/backend/custom.scss */
/* line 100, ../../sass/backend/custom.scss */
.form-check-label.big input ~ .checkmark {
height: 21px;
width: 21px;
}

/* line 99, ../../sass/backend/custom.scss */
/* line 101, ../../sass/backend/custom.scss */
.form-check-label input[type="checkbox"] ~ .checkmark {
top: 2px;
}

/* line 100, ../../sass/backend/custom.scss */
/* line 102, ../../sass/backend/custom.scss */
.form-check-label input[type="radio"] ~ .checkmark {
top: 3px;
border-radius: 50%;
}

/* line 101, ../../sass/backend/custom.scss */
/* line 103, ../../sass/backend/custom.scss */
.form-check-label:hover input ~ .checkmark {
background-color: #ccc;
}

/* When the checkbox is checked, add a blue background */
/* line 103, ../../sass/backend/custom.scss */
/* line 105, ../../sass/backend/custom.scss */
.form-check-label input:checked ~ .checkmark {
background-color: var(--primary);
}

/* Create the checkmark/indicator (hidden when not checked) */
/* line 105, ../../sass/backend/custom.scss */
/* line 107, ../../sass/backend/custom.scss */
.form-check-label .checkmark:after {
content: "";
position: absolute;
@@ -318,13 +339,13 @@ table th .select2-container--default .select2-selection--single {
}

/* Show the checkmark when checked */
/* line 107, ../../sass/backend/custom.scss */
/* line 109, ../../sass/backend/custom.scss */
.form-check-label input:checked ~ .checkmark:after {
display: block;
}

/* Style the checkmark/indicator */
/* line 109, ../../sass/backend/custom.scss */
/* line 111, ../../sass/backend/custom.scss */
.form-check-label .checkmark:after {
left: 7px;
top: 3px;
@@ -337,7 +358,7 @@ table th .select2-container--default .select2-selection--single {
transform: rotate(45deg);
}

/* line 110, ../../sass/backend/custom.scss */
/* line 112, ../../sass/backend/custom.scss */
.form-check-label input[type="checkbox"] ~ .checkmark:after {
left: 6px;
top: 2px;
@@ -350,7 +371,7 @@ table th .select2-container--default .select2-selection--single {
transform: rotate(45deg);
}

/* line 111, ../../sass/backend/custom.scss */
/* line 113, ../../sass/backend/custom.scss */
.form-check-label input[type="radio"] ~ .checkmark:after {
top: 4px;
left: 4px;
@@ -360,7 +381,7 @@ table th .select2-container--default .select2-selection--single {
background: white;
}

/* line 113, ../../sass/backend/custom.scss */
/* line 115, ../../sass/backend/custom.scss */
.form-check-label.big input[type="checkbox"] ~ .checkmark:after {
left: 7px;
top: 3px;
@@ -369,101 +390,101 @@ table th .select2-container--default .select2-selection--single {
}

/* Create a custom radio button */
/* line 117, ../../sass/backend/custom.scss */
/* line 119, ../../sass/backend/custom.scss */
.product-categories .parent .form-group.field-checkbox .form-check-label {
padding-left: 0px;
font-style: italic;
}

/* line 118, ../../sass/backend/custom.scss */
/* line 120, ../../sass/backend/custom.scss */
.product-categories .children .form-group.field-checkbox {
margin-left: 20px;
}

/* line 119, ../../sass/backend/custom.scss */
/* line 121, ../../sass/backend/custom.scss */
.product-categories .form-group {
margin-bottom: 0.15rem;
}

/* line 120, ../../sass/backend/custom.scss */
/* line 122, ../../sass/backend/custom.scss */
.lc-deleted-field {
display: none;
}

/* line 121, ../../sass/backend/custom.scss */
/* line 123, ../../sass/backend/custom.scss */
.lc-offline-field {
opacity: 0.5;
}

/* line 122, ../../sass/backend/custom.scss */
/* line 124, ../../sass/backend/custom.scss */
.lc-offline-field label::after {
content: ' [hors ligne]';
}

/* Général */
/* line 128, ../../sass/backend/custom.scss */
/* line 130, ../../sass/backend/custom.scss */
.btn.action-save {
float: right;
margin-left: 10px;
}

/* line 129, ../../sass/backend/custom.scss */
/* line 131, ../../sass/backend/custom.scss */
.button-action a.float-right {
margin-left: 10px;
}

/* line 131, ../../sass/backend/custom.scss */
/* line 133, ../../sass/backend/custom.scss */
.input-group-text {
padding: 0.25rem 0.75rem;
}

/* line 135, ../../sass/backend/custom.scss */
/* line 137, ../../sass/backend/custom.scss */
.col-form-label {
font-weight: bold;
}

/* line 137, ../../sass/backend/custom.scss */
/* line 139, ../../sass/backend/custom.scss */
#toast-container.toast-top-right {
top: 60px;
}

/* SIDEBAR */
/* line 140, ../../sass/backend/custom.scss */
/* line 142, ../../sass/backend/custom.scss */
.main-header.navbar {
padding: 0;
min-height: 57px;
}

/* line 141, ../../sass/backend/custom.scss */
/* line 143, ../../sass/backend/custom.scss */
.lc-navbar li {
border-left: 1px solid #e0e0e0;
padding: 0.5rem 1.5rem;
}

/* line 142, ../../sass/backend/custom.scss */
/* line 144, ../../sass/backend/custom.scss */
.lc-navbar li label {
margin-bottom: 0;
vertical-align: middle;
font-weight: normal !important;
}

/* line 144, ../../sass/backend/custom.scss */
/* line 146, ../../sass/backend/custom.scss */
#switch-merchant {
min-width: 170px;
}

/* Sortable */
/* line 150, ../../sass/backend/custom.scss */
/* line 152, ../../sass/backend/custom.scss */
.ui-sortable-helper {
display: table;
}

/* line 151, ../../sass/backend/custom.scss */
/* line 153, ../../sass/backend/custom.scss */
.ui-state-highlight {
background: #eee;
}

/* line 152, ../../sass/backend/custom.scss */
/* line 154, ../../sass/backend/custom.scss */
.lc-sortable div:last-child {
display: none;
}
@@ -480,13 +501,13 @@ table th .select2-container--default .select2-selection--single {
.lc-ckfinder-wrap .lc-ckfinder-button{width: 100%; bottom: 0px; left: 0; position: absolute;}
*/
/* VUES JS */
/* line 167, ../../sass/backend/custom.scss */
/* line 169, ../../sass/backend/custom.scss */
.nav-item .btn {
padding-right: 15px;
position: relative;
}

/* line 168, ../../sass/backend/custom.scss */
/* line 170, ../../sass/backend/custom.scss */
.nav-item .btn .invalid-form {
display: none;
position: absolute;
@@ -498,67 +519,67 @@ table th .select2-container--default .select2-selection--single {
font-size: 1.2rem;
}

/* line 169, ../../sass/backend/custom.scss */
/* line 171, ../../sass/backend/custom.scss */
.nav-item.has-invalid .btn .invalid-form {
display: inline-block;
z-index: 2;
}

/* ProductFamily */
/* line 174, ../../sass/backend/custom.scss */
/* line 176, ../../sass/backend/custom.scss */
.field-unit-quantity {
border-bottom: 2px dotted #eee;
padding-bottom: 10px;
margin-bottom: 20px;
}

/* line 175, ../../sass/backend/custom.scss */
/* line 177, ../../sass/backend/custom.scss */
.field-reduction-apply {
border-top: 2px dotted #eee;
padding-top: 10px;
margin-top: 20px;
}

/* line 177, ../../sass/backend/custom.scss */
/* line 179, ../../sass/backend/custom.scss */
.new-productfamily #nav-params,
.edit-productfamily #nav-params {
margin-bottom: 30px;
}

/* line 182, ../../sass/backend/custom.scss */
/* line 184, ../../sass/backend/custom.scss */
.new-productfamily #nav-params .btn,
.edit-productfamily #nav-params .btn {
margin-left: 20px;
}

/* line 187, ../../sass/backend/custom.scss */
/* line 189, ../../sass/backend/custom.scss */
.new-productfamily #product-categories .row,
.edit-productfamily #product-categories .row {
padding: 10px;
}

/* line 192, ../../sass/backend/custom.scss */
/* line 194, ../../sass/backend/custom.scss */
.new-productfamily #product-categories .form-group,
.edit-productfamily #product-categories .form-group {
width: 100%;
padding: 4px;
}

/* line 198, ../../sass/backend/custom.scss */
/* line 200, ../../sass/backend/custom.scss */
.new-productfamily #product-categories .children,
.edit-productfamily #product-categories .children {
margin-left: 20px;
width: 100%;
}

/* line 204, ../../sass/backend/custom.scss */
/* line 206, ../../sass/backend/custom.scss */
.new-productfamily ul.products,
.edit-productfamily ul.products {
padding: 0px;
list-style-type: none;
}

/* line 210, ../../sass/backend/custom.scss */
/* line 212, ../../sass/backend/custom.scss */
.new-productfamily ul.products li.product,
.edit-productfamily ul.products li.product {
padding: 0px;
@@ -566,55 +587,55 @@ table th .select2-container--default .select2-selection--single {
position: relative;
}

/* line 217, ../../sass/backend/custom.scss */
/* line 219, ../../sass/backend/custom.scss */
.new-productfamily ul.products li.add,
.edit-productfamily ul.products li.add {
text-align: right;
}

/* line 222, ../../sass/backend/custom.scss */
/* line 224, ../../sass/backend/custom.scss */
.autoresize textarea {
height: auto;
min-height: 38px;
}

/* line 224, ../../sass/backend/custom.scss */
/* line 226, ../../sass/backend/custom.scss */
.field-price .input-group.buyingPrice input, .field-price .input-group.buyingPrice .input-group-text {
font-weight: bold;
border-color: #222;
}

/* line 225, ../../sass/backend/custom.scss */
/* line 227, ../../sass/backend/custom.scss */
.field-price .input-group.buyingPriceByRefUnit input, .field-price .input-group.buyingPriceByRefUnit .input-group-text {
font-weight: bold;
border-color: #222;
}

/* line 226, ../../sass/backend/custom.scss */
/* line 228, ../../sass/backend/custom.scss */
.field-price .input-group.priceWithTax input, .field-price .input-group.priceWithTax .input-group-text {
font-weight: bold;
border-color: #222;
}

/* line 227, ../../sass/backend/custom.scss */
/* line 229, ../../sass/backend/custom.scss */
.field-price .input-group.priceByRefUnitWithTax input, .field-price .input-group.priceByRefUnitWithTax .input-group-text {
font-weight: bold;
border-color: #222;
}

/* line 228, ../../sass/backend/custom.scss */
/* line 230, ../../sass/backend/custom.scss */
.input-group.multiplyingFactor input, .input-group.multiplyingFactor .input-group-text {
font-weight: bold;
border-color: #222;
}

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

/* line 237, ../../sass/backend/custom.scss */
/* line 239, ../../sass/backend/custom.scss */
.order-product-item.redelivery {
background: rgba(18, 104, 253, 0.38) !important;
}
@@ -622,36 +643,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 242, ../../sass/backend/custom.scss */
/* line 244, ../../sass/backend/custom.scss */
.product-form-modal {
display: none;
}

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

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

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

/* line 246, ../../sass/backend/custom.scss */
/* line 248, ../../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 247, ../../sass/backend/custom.scss */
/* line 249, ../../sass/backend/custom.scss */
.products-collection-table .btn-empty-field {
position: absolute;
right: 3px;
@@ -660,14 +681,14 @@ table th .select2-container--default .select2-selection--single {
padding: 0px;
}

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

/* line 249, ../../sass/backend/custom.scss */
/* line 251, ../../sass/backend/custom.scss */
#lc-product-family-edit .products-collection-table th {
font-size: 13px;
border-left: 1px solid #dee2e6;
@@ -676,22 +697,22 @@ table th .select2-container--default .select2-selection--single {
border-bottom: 2px solid #dee2e6;
}

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

/* line 286, ../../sass/backend/custom.scss */
/* line 288, ../../sass/backend/custom.scss */
#dashboard .btn-statistic {
width: 120px;
height: 70px;
@@ -801,13 +822,13 @@ table.products-collection-table tr.disabled {
line-height: 1rem;
}

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

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

+ 2
- 1
ShopBundle/Resources/public/js/backend/script/default/vuejs-mixins.js Просмотреть файл

@@ -153,12 +153,13 @@ let mixinPrice = {
if (this.behaviorPriceValue == 'by-piece') {
this.setBuyingPriceByRefUnit();
this.setBuyingPriceByRefUnitWithTax();
log('ncihe');
this.setPriceByRefUnit();
this.setPriceByRefUnitWithTax();
} else if (this.behaviorPriceValue == 'by-reference-unit') {
this.setPriceFromPriceByRefUnit();
this.setPriceWithTax();
log('ncihe');
this.setBuyingPriceFromBuyingPriceByRefUnit();
this.setBuyingPriceWithTax();
}

+ 2
- 2
ShopBundle/Resources/public/js/backend/script/productfamily/vuejs-product-family.js Просмотреть файл

@@ -503,8 +503,8 @@ $(window).on('load', function () {

log(Object.keys(this.formProducts).length);
this.$nextTick(function () {
this.updateSortableProducts(false);
this.updateKeyboardNav();
this.updateSortableProducts(true);
});
},
updateKeyboardNav: function () {

+ 4
- 2
ShopBundle/Resources/public/sass/backend/custom.scss Просмотреть файл

@@ -34,10 +34,12 @@ a.link-as-text{color:#333;}

/***************************************** ADMIN SIDEBAR ***************************************/
.main-sidebar p{font-size: 0.8rem;}
.main-sidebar .sidebar{padding-left: 0px; padding-right: 0px; margin-top: 57px;}
.main-sidebar .sidebar{padding-left: 0px; padding-right: 0px; padding-top: 114px;}
.main-sidebar .nav-link{padding: .4rem .5rem .4rem .7rem;}


body#pdl-body .wrapper .main-sidebar{bottom: 0; float: none; height: 100vh; left: 0; position: fixed; top: 0;}
body#pdl-body .wrapper .content-wrapper{margin-top: 0; padding-top: 57px;}
.sidebar{overflow-y: auto;}


#lc-flash-messages{display: none;}

+ 1
- 0
ShopBundle/Resources/translations/lcshop.fr.yaml Просмотреть файл

@@ -454,6 +454,7 @@ action:
deselect: Désélectionner
form.empty_value: Aucun(e)
add: Ajouter
valid: Valider
product:
editStock: Gérer les stocks
editProductFamily: Éditer le produit

+ 1
- 1
ShopBundle/Resources/views/backend/default/layout/layout.html.twig Просмотреть файл

@@ -55,7 +55,7 @@
</head>

{% block body %}
<body class="{% block body_class %}sidebar-mini layout-navbar-fixed {% endblock %}{% block body_class_extend %}{% endblock %}">
<body id="pdl-body" class="{% block body_class %}sidebar-mini layout-navbar-fixed{% endblock %} {% block body_class_extend %}{% endblock %}">
{# <script>
document.body.classList.add(
'easyadmin-content-width-' + (localStorage.getItem('easyadmin/content/width') || 'normal'),

+ 1
- 1
ShopBundle/Resources/views/backend/default/list.html.twig Просмотреть файл

@@ -207,7 +207,7 @@
</div>
{% else %}
<div class="form-widget input-group-sm">
{% if metadata.dataType == 'integer' or metadata.dataType== 'text' %}
{% if metadata.dataType == 'integer' or metadata.dataType== 'string' %}
{{ form_widget(filters_form[field], {'attr': {'autocomplete': 'off', 'data-lc-autocomplete-url' : path('easyadmin', {
action: 'autocomplete',
field: field,

+ 21
- 2
ShopBundle/Resources/views/backend/productfamily/macros.html.twig Просмотреть файл

@@ -1,14 +1,33 @@
{% trans_default_domain 'lcshop' %}

{% macro total_order_product(totalProductOrdered) %}
{% macro total_order_product(totalProductOrdered, productFamily=false) %}
{% for weekNumber, weekNumberQuantity in totalProductOrdered %}
<span class="text-success"><i class="fa fa-calendar"></i> {{ weekNumber }}</span>
<span class="text-info"><i class="fa fa-shopping-basket"></i>
<strong>{{ weekNumberQuantity['quantity'] is null ? 0 : weekNumberQuantity['quantity']}}</strong></span>
<strong>
{{ weekNumberQuantity is null ? 0 : weekNumberQuantity}}
</strong>
</span>
<br />
{% endfor %}
{% endmacro total_order_product %}


{% macro total_order_product_family(totalProductOrdered, productFamily) %}
{% for weekNumber, weekNumberQuantity in totalProductOrdered %}
<span class="text-success"><i class="fa fa-calendar"></i> {{ weekNumber }}</span>
<span class="text-info"><i class="fa fa-shopping-basket"></i>
<strong>
{{ weekNumberQuantity is null ? 0 : weekNumberQuantity}}
{% if productFamily and productFamily.behaviorCountStock== constant('Lc\\ShopBundle\\Model\\ProductFamily::BEHAVIOR_COUNT_STOCK_BY_MEASURE') %}
{{ productFamily.unit.unitReference }}
{% endif %}
</strong>
</span>
<br />
{% endfor %}
{% endmacro total_order_product_family %}

{% macro product_field(colspan, field, field_name, field_display = false, display_suffix="",attr="") %}

{% if field_display == false %}{% set field_display = field_name %}{% endif %}

Загрузка…
Отмена
Сохранить