Browse Source

Merge branch 'develop'

master^2
Fab 3 years ago
parent
commit
a95cdc4102
20 changed files with 459 additions and 180 deletions
  1. +61
    -8
      ShopBundle/Controller/Backend/AdminController.php
  2. +1
    -2
      ShopBundle/Controller/Backend/ProductFamilyController.php
  3. +5
    -0
      ShopBundle/Model/PriceTrait.php
  4. +20
    -0
      ShopBundle/Model/ProductFamily.php
  5. +5
    -3
      ShopBundle/Model/ProductPropertyTrait.php
  6. +1
    -0
      ShopBundle/Repository/ProductFamilyRepository.php
  7. +165
    -116
      ShopBundle/Resources/public/css/backend/custom.css
  8. +6
    -2
      ShopBundle/Resources/public/js/backend/script/productfamily/vuejs-product-family.js
  9. +35
    -4
      ShopBundle/Resources/public/sass/backend/custom.scss
  10. +19
    -10
      ShopBundle/Resources/views/backend/default/block/actions.html.twig
  11. +34
    -0
      ShopBundle/Resources/views/backend/default/edit-ajax.html.twig
  12. +6
    -11
      ShopBundle/Resources/views/backend/default/field/toggle.html.twig
  13. +24
    -1
      ShopBundle/Resources/views/backend/default/layout/layout-ajax.html.twig
  14. +21
    -10
      ShopBundle/Resources/views/backend/default/list.html.twig
  15. +2
    -2
      ShopBundle/Resources/views/backend/form/custom_bootstrap_4.html.twig
  16. +7
    -2
      ShopBundle/Resources/views/backend/productfamily/edit.html.twig
  17. +5
    -5
      ShopBundle/Resources/views/backend/productfamily/form.html.twig
  18. +1
    -1
      ShopBundle/Resources/views/backend/productfamily/macros.html.twig
  19. +26
    -3
      ShopBundle/Services/Price/ProductPriceUtils.php
  20. +15
    -0
      ShopBundle/Services/ProductFamilyUtils.php

+ 61
- 8
ShopBundle/Controller/Backend/AdminController.php View File

'entity_class' => $this->entity['class'] 'entity_class' => $this->entity['class']
)); ));
$this->filtersForm->handleRequest($this->request); $this->filtersForm->handleRequest($this->request);

if ($this->filtersForm->isSubmitted() && $this->filtersForm->isValid()) {
$easyadmin = $this->request->attributes->get('easyadmin');
$view = $easyadmin['view'];
if($easyadmin['view']=='listChildren') $view = 'list';
if (($this->filtersForm->isSubmitted() && $this->filtersForm->isValid()) || $this->entity[$view]['filters']!==false) {
foreach ($listFields as $field) { foreach ($listFields as $field) {
//if ($this->filtersForm->has($field['property'])->getConfig()->getOption('AdminController')) {
if ($this->filtersForm->has($field['property'])) { if ($this->filtersForm->has($field['property'])) {
switch ($field['dataType']) { switch ($field['dataType']) {
case 'option': case 'option':
case 'text': case 'text':
case 'string': case 'string':
case 'toggle': case 'toggle':
$filter = $this->filtersForm->get($field['property'])->getData();
$filter = $this->getListFilterParam($field['property']);
//$filter = $this->filtersForm->get($field['property'])->getData();
if ($filter !== null) { if ($filter !== null) {


$queryBuilder->andWhere('entity.' . $field['property'] . ' LIKE :' . $field['property'] . ''); $queryBuilder->andWhere('entity.' . $field['property'] . ' LIKE :' . $field['property'] . '');
} }
break; break;
case 'association' : case 'association' :
$filter = $this->filtersForm->get($field['property'])->getData();
$filter = $this->getListFilterParam($field['property']);
//$filter = $this->filtersForm->get($field['property'])->getData();
if ($filter !== null) { if ($filter !== null) {
if ($field['type_options']['multiple']) { if ($field['type_options']['multiple']) {
$queryBuilder->andWhere(':' . $field['property'] . ' MEMBER OF entity.' . $field['property'] . ''); $queryBuilder->andWhere(':' . $field['property'] . ' MEMBER OF entity.' . $field['property'] . '');
break; break;
case 'datetime': case 'datetime':
case 'date': case 'date':
$dateStart = $this->filtersForm->get($field['property'])->get('dateStart')->getData();
$dateEnd = $this->filtersForm->get($field['property'])->get('dateEnd')->getData();

$dateStart = $this->getListFilterParam($field['property'], 'dateStart');
$dateEnd = $this->getListFilterParam($field['property'], 'dateEnd');


if ($dateStart) $queryBuilder->andWhere('entity.' . $field['property'] . ' >= :dateStart')->setParameter('dateStart', $dateStart); if ($dateStart) $queryBuilder->andWhere('entity.' . $field['property'] . ' >= :dateStart')->setParameter('dateStart', $dateStart);
if ($dateEnd) $queryBuilder->andWhere('entity.' . $field['property'] . ' <= :dateEnd')->setParameter('dateEnd', $dateEnd); if ($dateEnd) $queryBuilder->andWhere('entity.' . $field['property'] . ' <= :dateEnd')->setParameter('dateEnd', $dateEnd);
return $queryBuilder; return $queryBuilder;
} }


//TODO finaliser la sauvegarde des filtres

protected function getListFilterParam($param, $extraParam = null){
$entityName = $this->entity['name'];
$sessionParam = $entityName.$param.$extraParam;
//CUSTOM
if($extraParam){
$value = $this->filtersForm->get($param)->get($extraParam)->getViewData();
}else{
$value = $this->filtersForm->get($param)->getViewData();
}

if($this->request->query->get('filterClear')){
$this->session->remove($sessionParam);
}else {
if ($value) {
$this->session->set($sessionParam, $value);
} else if ($this->session->get($sessionParam) && !$this->filtersForm->isSubmitted() && $this->filtersForm->get($param)) {
$value = $this->session->get($sessionParam);

if($extraParam){

if($this->filtersForm->get($param)->get($extraParam)->getConfig()->getOption('input')=='datetime'){

$this->filtersForm->get($param)->get($extraParam)->setData(new \DateTime($value));
}else{
$this->filtersForm->get($param)->get($extraParam)->setData($value);
}

}else {
//Champ association
if ($this->filtersForm->get($param)->getConfig()->getOption('class')) {
$valFormated = $this->em->getRepository($this->filtersForm->get($param)->getConfig()->getOption('class'))->find($value);
$this->filtersForm->get($param)->setData($valFormated);
} else {
//Champ noramux
$this->filtersForm->get($param)->setData($value);
}
}

}
}

if($value !== "")return $value;
else return null;

}




public function renderTemplate($actionName, $templatePath, array $parameters = []) public function renderTemplate($actionName, $templatePath, array $parameters = [])
{ {
return $this->executeDynamicMethod('render<EntityName>Template', ['list', $this->entity['templates']['list'], $parameters]); return $this->executeDynamicMethod('render<EntityName>Template', ['list', $this->entity['templates']['list'], $parameters]);
} }



protected function getListParam($param, $default =null){ protected function getListParam($param, $default =null){
$entityName = $this->entity['name']; $entityName = $this->entity['name'];
$sessionParam = $entityName.$param; $sessionParam = $entityName.$param;

+ 1
- 2
ShopBundle/Controller/Backend/ProductFamilyController.php View File



protected function editAction() protected function editAction()
{ {

$this->dispatch(EasyAdminEvents::PRE_EDIT); $this->dispatch(EasyAdminEvents::PRE_EDIT);


$id = $this->request->query->get('id'); $id = $this->request->query->get('id');


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', ''); $refererUrl = $this->request->query->get('referer', '');
return $this->redirectToRoute('easyadmin', ['entity' => 'ProductFamily', 'action' => 'edit', 'id' => $id, 'referer' => $refererUrl]);
return $this->redirectToRoute('easyadmin', ['entity' => 'ProductFamily', 'action' => 'edit', 'id' => $id, 'referer' => $refererUrl, 'ajax' => $this->request->query->get('ajax')]);
} else { } else {
return $this->redirectToReferrer(); return $this->redirectToReferrer();
} }

+ 5
- 0
ShopBundle/Model/PriceTrait.php View File

return $this->getTaxRate() ; return $this->getTaxRate() ;
} }


public function getBuyingPriceInherited(): ?float
{
return $this->getBuyingPrice() ;
}

public function getBuyingPrice(): ?float public function getBuyingPrice(): ?float
{ {
return $this->buyingPrice; return $this->buyingPrice;

+ 20
- 0
ShopBundle/Model/ProductFamily.php View File



return $this; return $this;
} }

public function getFieldBuyingPrice()
{
if($this->getBehaviorPrice() === self::BEHAVIOR_PRICE_BY_PIECE) {
return 'buyingPrice' ;
}
elseif($this->getBehaviorPrice() === self::BEHAVIOR_PRICE_BY_REFERENCE_UNIT) {
return 'buyingPriceByRefUnit' ;
}
}

public function getFieldPrice()
{
if($this->getBehaviorPrice() === self::BEHAVIOR_PRICE_BY_PIECE) {
return 'price' ;
}
elseif($this->getBehaviorPrice() === self::BEHAVIOR_PRICE_BY_REFERENCE_UNIT) {
return 'priceByRefUnit' ;
}
}
} }

+ 5
- 3
ShopBundle/Model/ProductPropertyTrait.php View File

*/ */
protected $propertyExpirationDate; protected $propertyExpirationDate;





public function getBuyingPriceByRefUnit(): ?float public function getBuyingPriceByRefUnit(): ?float
{ {
return $this->buyingPriceByRefUnit; return $this->buyingPriceByRefUnit;
} }


public function getBuyingPriceByRefUnitInherited(): ?float
{
return $this->getBuyingPriceByRefUnit() ;
}

public function setBuyingPriceByRefUnit(?float $buyingPriceByRefUnit): self public function setBuyingPriceByRefUnit(?float $buyingPriceByRefUnit): self
{ {
$this->buyingPriceByRefUnit = $buyingPriceByRefUnit; $this->buyingPriceByRefUnit = $buyingPriceByRefUnit;

+ 1
- 0
ShopBundle/Repository/ProductFamilyRepository.php View File

$query = $this->findByMerchantQuery() ; $query = $this->findByMerchantQuery() ;
$query = $this->joinRelations($query) ; $query = $this->joinRelations($query) ;


$query->andWhere('e.status = 1');
$query->andWhere(':section MEMBER OF e.sections') $query->andWhere(':section MEMBER OF e.sections')
->setParameter('section', $section) ; ->setParameter('section', $section) ;
$query->leftJoin('e.productCategories', 'productCategories'); $query->leftJoin('e.productCategories', 'productCategories');

+ 165
- 116
ShopBundle/Resources/public/css/backend/custom.css View File



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


/* line 61, ../../sass/backend/custom.scss */ /* line 61, ../../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.filtered {
border-top: 2px solid var(--primary);
} }


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

/* line 64, ../../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);
}

/* line 65, ../../sass/backend/custom.scss */
.card-body table.lc-table-list th.sorted.filtered {
border-top: 0px;
position: relative;
} }


/* line 66, ../../sass/backend/custom.scss */ /* line 66, ../../sass/backend/custom.scss */
.card-body table.lc-table-list th.sorted.filtered:after {
content: '';
height: 2px;
position: absolute;
left: 0;
width: 100%;
right: 0;
top: -1px;
background: linear-gradient(to right, var(--success) 0%, var(--success) 50%, var(--primary) 50%, var(--primary) 100%);
}

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


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


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


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


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


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


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


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


/* line 78, ../../sass/backend/custom.scss */
/* line 81, ../../sass/backend/custom.scss */
table th input { table th input {
width: 100%; width: 100%;
} }


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


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


/************************ form error *********************/ /************************ form error *********************/
/* line 85, ../../sass/backend/custom.scss */
/* line 88, ../../sass/backend/custom.scss */
.form-sent .form-control:invalid { .form-sent .form-control:invalid {
border-color: #dc3545; border-color: #dc3545;
padding-right: 2.25rem; padding-right: 2.25rem;
background-size: calc(.75em + .375rem) calc(.75em + .375rem); background-size: calc(.75em + .375rem) calc(.75em + .375rem);
} }


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


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


/*CUSTOM Checkbox /*CUSTOM Checkbox
/* Customize the label (the container) */ /* Customize the label (the container) */
/* line 92, ../../sass/backend/custom.scss */
/* line 95, ../../sass/backend/custom.scss */
.form-check-label { .form-check-label {
display: block; display: block;
position: relative; position: relative;
} }


/* Hide the browser's default checkbox */ /* Hide the browser's default checkbox */
/* line 94, ../../sass/backend/custom.scss */
/* line 97, ../../sass/backend/custom.scss */
.form-check-label input { .form-check-label input {
position: absolute; position: absolute;
opacity: 0; opacity: 0;
} }


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


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


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


/* line 101, ../../sass/backend/custom.scss */
/* line 104, ../../sass/backend/custom.scss */
.form-check-label input ~ .checkmark { .form-check-label input ~ .checkmark {
position: absolute; position: absolute;
top: 0; top: 0;
border: 1px solid var(--primary); border: 1px solid var(--primary);
} }


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


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


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


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


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


/* Create the checkmark/indicator (hidden when not checked) */ /* Create the checkmark/indicator (hidden when not checked) */
/* line 109, ../../sass/backend/custom.scss */
/* line 112, ../../sass/backend/custom.scss */
.form-check-label .checkmark:after { .form-check-label .checkmark:after {
content: ""; content: "";
position: absolute; position: absolute;
} }


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


/* Style the checkmark/indicator */ /* Style the checkmark/indicator */
/* line 113, ../../sass/backend/custom.scss */
/* line 116, ../../sass/backend/custom.scss */
.form-check-label .checkmark:after { .form-check-label .checkmark:after {
left: 7px; left: 7px;
top: 3px; top: 3px;
transform: rotate(45deg); transform: rotate(45deg);
} }


/* line 114, ../../sass/backend/custom.scss */
/* line 117, ../../sass/backend/custom.scss */
.form-check-label input[type="checkbox"] ~ .checkmark:after { .form-check-label input[type="checkbox"] ~ .checkmark:after {
left: 6px; left: 6px;
top: 2px; top: 2px;
transform: rotate(45deg); transform: rotate(45deg);
} }


/* line 115, ../../sass/backend/custom.scss */
/* line 118, ../../sass/backend/custom.scss */
.form-check-label input[type="radio"] ~ .checkmark:after { .form-check-label input[type="radio"] ~ .checkmark:after {
top: 4px; top: 4px;
left: 4px; left: 4px;
background: white; background: white;
} }


/* line 117, ../../sass/backend/custom.scss */
/* line 120, ../../sass/backend/custom.scss */
.form-check-label.big input[type="checkbox"] ~ .checkmark:after { .form-check-label.big input[type="checkbox"] ~ .checkmark:after {
left: 7px; left: 7px;
top: 3px; top: 3px;
} }


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


/*************************** PAGINATION *******************************/ /*************************** PAGINATION *******************************/
/* line 152, ../../sass/backend/custom.scss */
/* line 155, ../../sass/backend/custom.scss */
.pagination { .pagination {
justify-content: center; justify-content: center;
} }


/* line 153, ../../sass/backend/custom.scss */
/* line 156, ../../sass/backend/custom.scss */
.disabled .page-link { .disabled .page-link {
color: #343a40; color: #343a40;
} }


/* line 154, ../../sass/backend/custom.scss */
/* line 157, ../../sass/backend/custom.scss */
.disabled .page-link:hover, .page-link.current:hover { .disabled .page-link:hover, .page-link.current:hover {
background-color: #fff; background-color: #fff;
cursor: default; cursor: default;
} }


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


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


/* line 161, ../../sass/backend/custom.scss */
/* line 164, ../../sass/backend/custom.scss */
.lc-sortable div:last-child { .lc-sortable div:last-child {
display: none; display: none;
} }
.lc-ckfinder-wrap .lc-ckfinder-button{width: 100%; bottom: 0px; left: 0; position: absolute;} .lc-ckfinder-wrap .lc-ckfinder-button{width: 100%; bottom: 0px; left: 0; position: absolute;}
*/ */
/* VUES JS */ /* VUES JS */
/* line 176, ../../sass/backend/custom.scss */
/* line 179, ../../sass/backend/custom.scss */
.nav-item .btn { .nav-item .btn {
padding-right: 15px; padding-right: 15px;
position: relative; position: relative;
} }


/* line 177, ../../sass/backend/custom.scss */
/* line 180, ../../sass/backend/custom.scss */
.nav-item .btn .invalid-form { .nav-item .btn .invalid-form {
display: none; display: none;
position: absolute; position: absolute;
font-size: 1.2rem; font-size: 1.2rem;
} }


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


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


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


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


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


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


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


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


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


/* line 219, ../../sass/backend/custom.scss */
/* line 222, ../../sass/backend/custom.scss */
.new-productfamily ul.products li.product, .new-productfamily ul.products li.product,
.edit-productfamily ul.products li.product { .edit-productfamily ul.products li.product {
padding: 0px; padding: 0px;
position: relative; position: relative;
} }


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


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


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


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


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


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


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


/* line 244, ../../sass/backend/custom.scss */
.layout-ajax #edit-productfamily-form .card-sections {
width: 100%;
position: fixed;
left: 0px;
top: 0px;
z-index: 10;
}
/* line 252, ../../sass/backend/custom.scss */
.layout-ajax #edit-productfamily-form .form {
padding-top: 50px;
}
/* line 256, ../../sass/backend/custom.scss */
.layout-ajax #edit-productfamily-form .card-footer {
display: none;
}
/* line 261, ../../sass/backend/custom.scss */
.layout-ajax #edit-productfamily-form .in-advanced-editing-table .form {
padding-top: 0px;
}
/* line 264, ../../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 */ /* ORDER */
/* line 243, ../../sass/backend/custom.scss */
/* line 274, ../../sass/backend/custom.scss */
.table-order-summary { .table-order-summary {
width: 100%; width: 100%;
} }


/* line 246, ../../sass/backend/custom.scss */
/* line 277, ../../sass/backend/custom.scss */
.order-product-item.redelivery { .order-product-item.redelivery {
background: rgba(18, 104, 253, 0.38) !important; background: rgba(18, 104, 253, 0.38) !important;
} }
/*.select2-container--bootstrap .select2-selection{max-width: none;}*/ /*.select2-container--bootstrap .select2-selection{max-width: none;}*/
/*.order-product-item{margin: 15px 0; padding: 0;}*/ /*.order-product-item{margin: 15px 0; padding: 0;}*/
/* Product */ /* Product */
/* line 251, ../../sass/backend/custom.scss */
/* line 282, ../../sass/backend/custom.scss */
.product-form-modal { .product-form-modal {
display: none; display: none;
} }


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


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


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


/* line 255, ../../sass/backend/custom.scss */
/* line 286, ../../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 { .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; padding-left: 0.35rem;
} }


/* line 256, ../../sass/backend/custom.scss */
/* line 287, ../../sass/backend/custom.scss */
.products-collection-table .btn-empty-field { .products-collection-table .btn-empty-field {
position: absolute; position: absolute;
right: 3px; right: 3px;
padding: 0px; padding: 0px;
} }


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


/* line 258, ../../sass/backend/custom.scss */
/* line 289, ../../sass/backend/custom.scss */
#lc-product-family-edit .products-collection-table th { #lc-product-family-edit .products-collection-table th {
font-size: 13px; font-size: 13px;
border-left: 1px solid #dee2e6; border-left: 1px solid #dee2e6;
position: relative; position: relative;
} }


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


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


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


/* line 262, ../../sass/backend/custom.scss */
/* line 293, ../../sass/backend/custom.scss */
#lc-product-family-edit .products-collection-table td { #lc-product-family-edit .products-collection-table td {
border-left: 1px solid #dee2e6; border-left: 1px solid #dee2e6;
text-align: center; text-align: center;
border-bottom: 1px solid #dee2e6; border-bottom: 1px solid #dee2e6;
} }


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


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


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


/* line 266, ../../sass/backend/custom.scss */
/* line 297, ../../sass/backend/custom.scss */
#lc-product-family-edit .products-collection-table td .value { #lc-product-family-edit .products-collection-table td .value {
min-width: 80%; min-width: 80%;
margin: auto; margin: auto;
cursor: pointer; cursor: pointer;
} }


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


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


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


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


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


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


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


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


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


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


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


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


/* line 295, ../../sass/backend/custom.scss */
/* line 326, ../../sass/backend/custom.scss */
#dashboard .btn-statistic { #dashboard .btn-statistic {
width: 120px; width: 120px;
height: 70px; height: 70px;
line-height: 1rem; line-height: 1rem;
} }


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


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


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


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


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


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


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


/* line 314, ../../sass/backend/custom.scss */
/* line 345, ../../sass/backend/custom.scss */
#toast-container { #toast-container {
width: 350px; width: 350px;
} }


/* line 315, ../../sass/backend/custom.scss */
/* line 346, ../../sass/backend/custom.scss */
.toast { .toast {
float: right; float: right;
} }


/* line 317, ../../sass/backend/custom.scss */
/* line 348, ../../sass/backend/custom.scss */
#toast-container:before:hover { #toast-container:before:hover {
opacity: 1; opacity: 1;
cursor: pointer; cursor: pointer;
} }


/* line 321, ../../sass/backend/custom.scss */
/* line 352, ../../sass/backend/custom.scss */
#toast-close-all { #toast-close-all {
border: 0; border: 0;
position: absolute; position: absolute;

+ 6
- 2
ShopBundle/Resources/public/js/backend/script/productfamily/vuejs-product-family.js View File

// Reference array sent to dynamic staticRenderFns // Reference array sent to dynamic staticRenderFns
var staticRenderFns = []; var staticRenderFns = [];
$(window).on('load', function () { $(window).on('load', function () {
/*var appProductFamily ;
lcInitProductFamily() ;*/


Vue.component('product-unit-price', { Vue.component('product-unit-price', {
mixins: [mixinUnit, mixinPrice, mixinTemplate], mixins: [mixinUnit, mixinPrice, mixinTemplate],
watch: {} watch: {}
}); });



appProductFamily = new Vue({ appProductFamily = new Vue({
el: '#lc-product-family-edit', el: '#lc-product-family-edit',
mixins: [mixinReduction], mixins: [mixinReduction],
for (var key in formProductTemplate) { for (var key in formProductTemplate) {
appProductFamily.formProducts[key] = formProductTemplate[key]; appProductFamily.formProducts[key] = formProductTemplate[key];
} }

}); });

function lcInitProductFamily() {

}

+ 35
- 4
ShopBundle/Resources/public/sass/backend/custom.scss View File

.dataTables_length, .dataTables_filter{padding: .75rem 1.25rem 0.25rem;} .dataTables_length, .dataTables_filter{padding: .75rem 1.25rem 0.25rem;}


table.fixedHeader-floating{margin-top: 0px !important;} table.fixedHeader-floating{margin-top: 0px !important;}
table th.sorting_asc, table th.sorting_desc{border-top:3px solid var(--success);}
.card-body table.lc-table-list th.sorted, table th.sorting_asc, table th.sorting_desc{border-top:2px solid var(--success);}
table th.sorting_asc, table th.sorting_desc{border-top:2px solid var(--success);}
.card-body table.lc-table-list th.filtered{border-top:2px solid var(--primary);}
/*.card-body table.lc-table-list th{border-top:3px solid var(--success);}*/ /*.card-body table.lc-table-list th{border-top:3px solid var(--success);}*/
table th.filtered{border-top:3px solid var(--primary);}
table th.filtered{border-top:2px solid var(--primary);}
.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.sorted.filtered{border-top:0px; position: relative;}
.card-body table.lc-table-list th.sorted.filtered:after{ content: ''; height: 2px; position: absolute; left: 0; width: 100%; right: 0; top: -1px; background: linear-gradient(to right, var(--success) 0%, var(--success) 50%, var(--primary) 50%, var(--primary) 100%);}




.lc-table-list thead a{color: #212529} .lc-table-list thead a{color: #212529}
.field-price .input-group.priceByRefUnitWithTax input,.field-price .input-group.priceByRefUnitWithTax .input-group-text{font-weight: bold; border-color: #222 } .field-price .input-group.priceByRefUnitWithTax input,.field-price .input-group.priceByRefUnitWithTax .input-group-text{font-weight: bold; border-color: #222 }
.input-group.multiplyingFactor input,.input-group.multiplyingFactor .input-group-text{font-weight: bold; border-color: #222 } .input-group.multiplyingFactor input,.input-group.multiplyingFactor .input-group-text{font-weight: bold; border-color: #222 }



.layout-ajax {
#edit-productfamily-form {
.card-sections {
width: 100%;
position: fixed;
left: 0px;
top: 0px;
z-index: 10;
}

.form {
padding-top: 50px;
}

.card-footer {
display: none;
}

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


/* ORDER */ /* ORDER */



+ 19
- 10
ShopBundle/Resources/views/backend/default/block/actions.html.twig View File

{% if action.group is defined and action.group==true %} {% if action.group is defined and action.group==true %}
{% set dropdownAction = dropdownAction|merge({(loop.index0): action}) %} {% set dropdownAction = dropdownAction|merge({(loop.index0): action}) %}
{% else %} {% else %}
{% set display_button = true %}

{% if 'list' == action.name %} {% if 'list' == action.name %}
{% set action_href = request_parameters.referer|default('') ? request_parameters.referer|easyadmin_urldecode : path('easyadmin', request_parameters|merge({ action: 'list' })) %} {% set action_href = request_parameters.referer|default('') ? request_parameters.referer|easyadmin_urldecode : path('easyadmin', request_parameters|merge({ action: 'list' })) %}
{% elseif 'method' == action.type %} {% elseif 'method' == action.type %}
{% set action_href = path('easyadmin', request_parameters|merge({ action: action.name, id: item_id })) %} {% set action_href = path('easyadmin', request_parameters|merge({ action: action.name, id: item_id })) %}
{% elseif 'route' == action.type %} {% elseif 'route' == action.type %}
{% set action_href = path(action.name, request_parameters|merge({ action: action.name, id: item_id })) %} {% set action_href = path(action.name, request_parameters|merge({ action: action.name, id: item_id })) %}
{% elseif 'productfamily_advanced_editing' == action.type %}
{% set action_href = path('easyadmin', request_parameters|merge({ action: action.action, id: item_id })) %}
{% if action.name == 'products' and not item.activeProducts %}
{% set display_button = false %}
{% endif %}
{% endif %} {% endif %}


{{ include(action.template, {
action: action,
action_href: action_href,
is_dropdown: is_dropdown|default(false),
item: item,
item_id: item_id,
request_parameters: request_parameters,
translation_domain: translation_domain,
trans_parameters: trans_parameters,
}, with_context = false) }}
{% if display_button %}
{{ include(action.template, {
action: action,
action_href: action_href,
is_dropdown: is_dropdown|default(false),
item: item,
item_id: item_id,
request_parameters: request_parameters,
translation_domain: translation_domain,
trans_parameters: trans_parameters,
}, with_context = false) }}
{% endif %}
{% endif %} {% endif %}
{% endfor %} {% endfor %}
{% if dropdownAction|length > 0 %} {% if dropdownAction|length > 0 %}

+ 34
- 0
ShopBundle/Resources/views/backend/default/edit-ajax.html.twig View File

{% form_theme form with easyadmin_config('design.form_theme') only %}

{% set _entity_config = easyadmin_entity(app.request.query.get('entity')) %}
{% set _entity_id = attribute(entity, _entity_config.primary_key_field_name) %}
{% trans_default_domain _entity_config.translation_domain %}

{% set _trans_parameters = { '%entity_name%': _entity_config.name|trans, '%entity_label%': _entity_config.label|trans, '%entity_id%': _entity_id } %}

{% extends '@LcShop/backend/default/layout/layout-ajax.html.twig' %}

{% block ajax %}
{% block entity_form %}
{{ form(form) }}
{% endblock entity_form %}

{% block head_stylesheets %}
{{ parent() }}
<link rel="stylesheet"
href="{{ asset('bundles/lcshop/css/backend/adminlte/plugins/jquery-ui/jquery-ui.min.css') }}">
{% endblock %}

{% block plugin_javascript %}
{{ parent() }}
<script src="{{ asset('bundles/lcshop/js/backend/plugin/jquery-ui/jquery-ui.min.js') }}"></script>
<script type="text/javascript">
var CKEDITOR_BASEPATH = "{{ ckeditor_base_path("/bundles/fosckeditor/") }}";
</script>
<script type="text/javascript" src="{{ asset('bundles/fosckeditor/ckeditor.js') }}"></script>
{% endblock %}

{% block script_javascript %}
<script src="{{ asset('bundles/lcshop/js/backend/script/default/init-edit.js') }}"></script>
{% endblock %}
{% endblock %}

+ 6
- 11
ShopBundle/Resources/views/backend/default/field/toggle.html.twig View File

{% trans_default_domain 'EasyAdminBundle' %} {% trans_default_domain 'EasyAdminBundle' %}


<div class="custom-control custom-switch custom-switch-on-success custom-switch-off-danger" data-propertyname="{{ field_options.property }}">
<input type="checkbox" class="custom-control-input" id="customSwitch{{ item.id }}-{{ field_options.property }}" {{ value == true ? 'checked' }}>
<label class="custom-control-label" for="customSwitch{{ item.id }}-{{ field_options.property }}">{{ field_options.label }}</label>
</div>
{#
{% block toggle %}
<div class="custom-control custom-switch custom-switch-on-success custom-switch-off-danger" data-propertyname="{{ field_options.property }}">
<input type="checkbox" class="custom-control-input" id="customSwitch{{ item.id }}-{{ field_options.property }}" {{ value == true ? 'checked' }}>
<label class="custom-control-label" for="customSwitch{{ item.id }}-{{ field_options.property }}">{% block label %}{{ field_options.label }}{% endblock %}</label>
</div>
{% endblock %}


{% if value == true %}
<span class="badge badge-success">{{ 'label.true'|trans }}</span>
{% else %}
<span class="badge badge-danger">{{ 'label.false'|trans }}</span>
{% endif %}
#}

+ 24
- 1
ShopBundle/Resources/views/backend/default/layout/layout-ajax.html.twig View File

{% trans_default_domain "lcshop" %} {% trans_default_domain "lcshop" %}


<div class="layout-ajax">
{% block 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 %}


{% endblock %}
{% block plugin_javascript %}
<!-- jQuery -->
<script src="{{ asset('bundles/lcshop/js/backend/plugin/jquery/jquery.min.js') }}"></script>
<!-- Bootstrap 4 -->
<script src="{{ asset('bundles/lcshop/js/backend/plugin/bootstrap/bootstrap.bundle.min.js') }}"></script>
<script src="{{ asset('bundles/lcshop/js/backend/plugin/toastr/toastr.min.js') }}"></script>
<script src="{{ asset('bundles/lcshop/js/backend/plugin/select2/select2.full.min.js') }}"></script>
<script src="{{ asset('bundles/lcshop/js/backend/plugin/bootstrap/bootstrap-switch.min.js') }}"></script>
<!-- AdminLTE App -->
<script src="{{ asset('bundles/lcshop/js/backend/plugin/adminlte.min.js') }}"></script>
<script src="{{ asset('bundles/lcshop/js/backend/script/default/utils.js') }}"></script>
{% endblock plugin_javascript %}

{% block script_javascript %}
<script src="{{ asset('bundles/lcshop/js/backend/script/default/init-common.js') }}"></script>
{% endblock script_javascript %}
{% endblock %}
</div>

+ 21
- 10
ShopBundle/Resources/views/backend/default/list.html.twig View File

{% set _fields_visible_by_user = fields|filter((metadata, field) => easyadmin_is_granted(metadata.permission)) %} {% set _fields_visible_by_user = fields|filter((metadata, field) => easyadmin_is_granted(metadata.permission)) %}
{% set _number_of_hidden_results = 0 %} {% set _number_of_hidden_results = 0 %}
{% set _list_item_actions = easyadmin_get_actions_for_list_item(_entity_config.name) %} {% set _list_item_actions = easyadmin_get_actions_for_list_item(_entity_config.name) %}
<div class="row">
<div class="row" id="{% block list_id %}{% endblock %}">
<div class="col-12"> <div class="col-12">
<div class="card card-outline card-primary"> <div class="card card-outline card-primary">
<div class="card-header"> <div class="card-header">
{% block card_header %} {% block card_header %}

<h2 class="card-title text-lg "> <h2 class="card-title text-lg ">
<div class="btn-group"> <div class="btn-group">
{% set itemsPerPage = [10,20,30,50,100,200] %} {% set itemsPerPage = [10,20,30,50,100,200] %}
{% for itemPerPage in itemsPerPage %} {% for itemPerPage in itemsPerPage %}
<a href="{{ path('easyadmin', _request_parameters|merge({ maxResults: itemPerPage, page : "1" })) }}" <a href="{{ path('easyadmin', _request_parameters|merge({ maxResults: itemPerPage, page : "1" })) }}"
class="btn btn-sm {{ paginator.maxPerPage == itemPerPage ? 'btn-outline-secondary' : 'btn-secondary'}}">{{ itemPerPage }}</a>
class="btn btn-sm {{ paginator.maxPerPage == itemPerPage ? 'btn-outline-secondary' : 'btn-secondary' }}">{{ itemPerPage }}</a>
{% endfor %} {% endfor %}


</div> </div>
{% set nextSortDirection = isSortingField ? (app.request.get('sortDirection') == 'DESC' ? 'ASC' : 'DESC') : 'DESC' %} {% set nextSortDirection = isSortingField ? (app.request.get('sortDirection') == 'DESC' ? 'ASC' : 'DESC') : 'DESC' %}
{% set _column_label = metadata.label|trans(_trans_parameters) %} {% set _column_label = metadata.label|trans(_trans_parameters) %}
{% set _column_icon = isSortingField ? (nextSortDirection == 'DESC' ? 'fa-arrow-up' : 'fa-arrow-down') : 'fa-sort' %} {% set _column_icon = isSortingField ? (nextSortDirection == 'DESC' ? 'fa-arrow-up' : 'fa-arrow-down') : 'fa-sort' %}
{% set isFilteredField = false %}
{% if filters_form[field] is defined and filters_form[field].vars.value is not empty %}
{% if (metadata['dataType'] == 'datetime' or metadata['dataType'] == 'date') %}
{% if filters_form[field]['dateStart'].vars.value is not empty and filters_form[field]['dateEnd'].vars.value is not empty %}
{% set isFilteredField = true %}
{% endif %}
{% else %}
{% set isFilteredField = true %}
{% endif %}
{% endif %}


<th class="{{ isSortingField ? 'sorted' }} {{ metadata.virtual ? 'virtual' }} {{ metadata.dataType|lower }} {{ metadata.css_class }}" {{ easyadmin_config('design.rtl') ? 'dir="rtl"' }}>

<th class="{{ isSortingField ? 'sorted' }} {{ isFilteredField ? 'filtered': '' }} {{ metadata.virtual ? 'virtual' }} {{ metadata.dataType|lower }} {{ metadata.css_class }}" {{ easyadmin_config('design.rtl') ? 'dir="rtl"' }}>
{% if metadata.sortable %} {% if metadata.sortable %}
<a href="{{ path('easyadmin', _request_parameters|merge({ page: 1, sortField: metadata.property, sortDirection: nextSortDirection })) }}"> <a href="{{ path('easyadmin', _request_parameters|merge({ page: 1, sortField: metadata.property, sortDirection: nextSortDirection })) }}">
{{ _column_label|raw }} <i class="fa fa-fw {{ _column_icon }}"></i> {{ _column_label|raw }} <i class="fa fa-fw {{ _column_icon }}"></i>
</tr> </tr>
{% endblock table_head %} {% endblock table_head %}
{% block table_filters %} {% block table_filters %}
{% set fieldAreNotEmpty = false %}
{% if filters_form is defined %} {% if filters_form is defined %}
<tr class="table-filters-line"> <tr class="table-filters-line">
{% if _has_batch_actions %} {% if _has_batch_actions %}
<th> <th>


{% if filters_form[field] is defined %} {% if filters_form[field] is defined %}

{% if filters_form[field].vars.value is not null and filters_form[field].vars.value is not empty %}{% set fieldAreNotEmpty = true %}{% endif %}
{% if metadata['dataType'] == 'datetime' or metadata['dataType'] == 'date' %} {% if metadata['dataType'] == 'datetime' or metadata['dataType'] == 'date' %}
<div class="input-group input-group-sm"> <div class="input-group input-group-sm">
<input type="text" <input type="text"
aria-label="{{ "action.apply"|trans({}, 'lcshop') }}"> aria-label="{{ "action.apply"|trans({}, 'lcshop') }}">
<i class="fa fa-search"></i> <i class="fa fa-search"></i>
</button> </button>
{% if filters_form.vars.submitted %}
<a href="{{ path('easyadmin', {action: app.request.get('action'), entity: _entity_config.name}) }}"
{% if filters_form.vars.submitted or fieldAreNotEmpty %}
<a href="{{ path('easyadmin', _request_parameters|merge({ 'filterClear' : 'clearAll', list_filter : null, referer : null })) }}"
class="btn btn-sm btn-warning lc-reset-filters" class="btn btn-sm btn-warning lc-reset-filters"
data-toggle="tooltip" data-toggle="tooltip"
title="{{ "action.reset"|trans({}, 'lcshop') }}" title="{{ "action.reset"|trans({}, 'lcshop') }}"
{% else %} {% else %}
{# the empty string concatenation is needed when the primary key is an object (e.g. an Uuid object) #} {# the empty string concatenation is needed when the primary key is an object (e.g. an Uuid object) #}
{% set _item_id = '' ~ attribute(item, _entity_config.primary_key_field_name) %} {% set _item_id = '' ~ attribute(item, _entity_config.primary_key_field_name) %}
<tr data-id="{{ _item_id }}">

<tr id="tr-entity-id-{{ _item_id }}" data-id="{{ _item_id }}">
{% if _has_batch_actions %} {% if _has_batch_actions %}
<td><input type="checkbox" class="form-batch-checkbox" <td><input type="checkbox" class="form-batch-checkbox"
value="{{ _item_id }}"></td> value="{{ _item_id }}"></td>




<td class="{{ isSortingField ? 'sorted' }} {{ metadata.dataType|lower }} {{ metadata.css_class }}" {{ easyadmin_config('design.rtl') ? 'dir="rtl"' }}> <td class="{{ isSortingField ? 'sorted' }} {{ metadata.dataType|lower }} {{ metadata.css_class }}" {{ easyadmin_config('design.rtl') ? 'dir="rtl"' }}>
{% if (field == 'title' or field== 'id') and (metadata.dataType=="string" or metadata.dataType=="integer") %}

{% if (field == 'title' or field== 'id') and (metadata.dataType=="string" or metadata.dataType=="integer") and _entity_config.name != 'ProductFamilyAdvancedEditing' %}
<a class="link-as-text" <a class="link-as-text"
href="{{ path('easyadmin', _request_parameters|merge({ action: 'edit', id: item.id })) }}"> href="{{ path('easyadmin', _request_parameters|merge({ action: 'edit', id: item.id })) }}">
{{ easyadmin_render_field_for_list_view(_entity_config.name, item, metadata) }} {{ easyadmin_render_field_for_list_view(_entity_config.name, item, metadata) }}

+ 2
- 2
ShopBundle/Resources/views/backend/form/custom_bootstrap_4.html.twig View File

{% set _translation_domain = easyadmin.entity.translation_domain %} {% set _translation_domain = easyadmin.entity.translation_domain %}
{% set _trans_parameters = { '%entity_name%': easyadmin.entity.name|trans(domain = _translation_domain), '%entity_label%': easyadmin.entity.label|trans(domain = _translation_domain) } %} {% set _trans_parameters = { '%entity_name%': easyadmin.entity.name|trans(domain = _translation_domain), '%entity_label%': easyadmin.entity.label|trans(domain = _translation_domain) } %}


{# the 'save' action is hardcoded for the 'edit' and 'new' views #}
<button type="submit" name="save_and_leave" class="btn btn-primary action-save"> <button type="submit" name="save_and_leave" class="btn btn-primary action-save">
<span class="btn-label">{{ 'action.save'|trans(_trans_parameters, _translation_domain) }}</span> <span class="btn-label">{{ 'action.save'|trans(_trans_parameters, _translation_domain) }}</span>
</button> </button>

{% if easyadmin.entity.name =='ProductFamily' %} {% if easyadmin.entity.name =='ProductFamily' %}
<button name="submitAndStay" value="1" type="submit" class="btn btn-success action-save">
<button name="submitAndStay" value="1" type="submit" class="btn btn-success action-save action-save-and-stay">
<span class="btn-label">{{ 'action.saveAndStay'|trans(_trans_parameters, _translation_domain) }}</span> <span class="btn-label">{{ 'action.saveAndStay'|trans(_trans_parameters, _translation_domain) }}</span>
</button> </button>
{% endif %} {% endif %}

+ 7
- 2
ShopBundle/Resources/views/backend/productfamily/edit.html.twig View File

{% extends app.request.query.get('action') == 'edit' ? '@LcShop/backend/default/edit.html.twig' : '@LcShop/backend/default/new.html.twig' %}
{% extends app.request.query.get('action') == 'edit'
? (app.request.query.get('ajax') == 1 ? '@LcShop/backend/default/edit-ajax.html.twig' : '@LcShop/backend/default/edit.html.twig')
: '@LcShop/backend/default/new.html.twig' %}


{% block entity_form %} {% block entity_form %}
{% include '@LcShop/backend/productfamily/form.html.twig' %} {% include '@LcShop/backend/productfamily/form.html.twig' %}
{% block script_javascript %} {% block script_javascript %}
{{ parent() }} {{ parent() }}
{% include '@LcShop/backend/default/block/script-vuejs.html.twig' %} {% include '@LcShop/backend/default/block/script-vuejs.html.twig' %}
<script src="{{ asset('bundles/lcshop/js/backend/script/productfamily/vuejs-product-family.js')|lc_cache }}"></script>
<script src="{{ asset('bundles/lcshop/js/backend/script/productfamily/vuejs-product-family.js') }}"></script>
<script>
lcInitProductFamily() ;
</script>
{% endblock %} {% endblock %}

+ 5
- 5
ShopBundle/Resources/views/backend/productfamily/form.html.twig View File

{% import '@LcShop/backend/productfamily/macros.html.twig' as product_family_macros %} {% import '@LcShop/backend/productfamily/macros.html.twig' as product_family_macros %}


{% set formValues = form.vars.value %} {% set formValues = form.vars.value %}
<div id="lc-product-family-edit">
<div class="card card-light">
<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"> <div class="lc-vue-js-container card-header p-0 border-bottom-0">
<ul class="nav nav-tabs" id="nav-params"> <ul class="nav nav-tabs" id="nav-params">
<li class="nav-item" v-for="section in sectionsArray"> <li class="nav-item" v-for="section in sectionsArray">
<span class="glyphicon glyphicon-triangle-bottom"></span> <span class="glyphicon glyphicon-triangle-bottom"></span>
<i class="fa fa-exclamation-circle invalid-form"></i> <i class="fa fa-exclamation-circle invalid-form"></i>
</a> </a>

</li> </li>
</ul> </ul>
</div> </div>
{% if formValues.activeProducts %}activeProducts: "{{ formValues.activeProducts }}",{% endif %} {% if formValues.activeProducts %}activeProducts: "{{ formValues.activeProducts }}",{% endif %}
{% if formValues.giftVoucherActive %}giftVoucherActive: "{{ formValues.giftVoucherActive }}",{% endif %} {% if formValues.giftVoucherActive %}giftVoucherActive: "{{ formValues.giftVoucherActive }}",{% endif %}
{% if formValues.productsQuantityAsTitle %}productsQuantityAsTitle: {{ formValues.productsQuantityAsTitle }},{% endif %} {% if formValues.productsQuantityAsTitle %}productsQuantityAsTitle: {{ formValues.productsQuantityAsTitle }},{% endif %}
{% set current_section = app.request.query.get('currentSection') %}
{% if current_section is defined and current_section|length > 0 %}currentSection: "{{ current_section }}",{% endif %}
{% if form.sections.vars.value %}section: {{ form.sections.vars.value[0] }},{% endif %} {% if form.sections.vars.value %}section: {{ form.sections.vars.value[0] }},{% endif %}


}; };
</div> </div>
</div> </div>
{% if entity.note|striptags !="" %} {% if entity.note|striptags !="" %}
<div class="row">
<div class="row row-note">
{{ macros.startCard(12, 'ProductFamily.note', 'light') }} {{ macros.startCard(12, 'ProductFamily.note', 'light') }}
{{ entity.note|raw }} {{ entity.note|raw }}
{{ macros.endCard() }} {{ macros.endCard() }}
</div> </div>
{{ form_widget(form.stayOnPage, {"attr": {"v-model": "stayOnPage"}}) }} {{ form_widget(form.stayOnPage, {"attr": {"v-model": "stayOnPage"}}) }}



</div> </div>
{{ form_end(form) }} {{ form_end(form) }}



+ 1
- 1
ShopBundle/Resources/views/backend/productfamily/macros.html.twig View File

{{ productFamily.unit.unitReference }} {{ productFamily.unit.unitReference }}
{% endif %} {% endif %}
</strong> </strong>
</span>
</span>
<br /> <br />
{% endfor %} {% endfor %}
{% endmacro total_order_product_family %} {% endmacro total_order_product_family %}

+ 26
- 3
ShopBundle/Services/Price/ProductPriceUtils.php View File

public function getBuyingPrice(ProductPropertyInterface $product) public function getBuyingPrice(ProductPropertyInterface $product)
{ {
if ($product->getBehaviorPriceInherited() == 'by-piece') { if ($product->getBehaviorPriceInherited() == 'by-piece') {
return $product->getBuyingPriceInherited();
return $product->getBuyingPriceInherited() ;
} }
elseif ($product->getBehaviorPriceInherited() == 'by-reference-unit') { elseif ($product->getBehaviorPriceInherited() == 'by-reference-unit') {


if ($product->getQuantityInherited() > 0) { if ($product->getQuantityInherited() > 0) {
return $product->getBuyingPriceByRefUnitInherited() * ($product->getQuantityInherited() / $product->getUnitInherited()->getCoefficient()); return $product->getBuyingPriceByRefUnitInherited() * ($product->getQuantityInherited() / $product->getUnitInherited()->getCoefficient());
}else{
}
else {
return 0; return 0;
} }
} }
} }


public function getMultiplyingFactor(ProductPropertyInterface $product){
public function getBuyingPriceWithTax(ProductPropertyInterface $product)
{
return $this->applyTax(
$this->getBuyingPrice($product),
$product->getTaxRateInherited()->getValue()
);
}

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)); return $this->round($this->getPriceWithTax($product) / $this->getBuyingPrice($product));
} }



+ 15
- 0
ShopBundle/Services/ProductFamilyUtils.php View File

} }
} }


public function getMultiplyingFactor($productFamily)
{
if($productFamily->getBehaviorPrice() == ProductFamily::BEHAVIOR_PRICE_BY_PIECE) {
if($productFamily->getBuyingPrice() > 0) {
return number_format($this->priceUtils->getPriceWithTax($productFamily) / $productFamily->getBuyingPrice(), 3) ;
}
}
elseif($productFamily->getBehaviorPrice() == ProductFamily::BEHAVIOR_PRICE_BY_REFERENCE_UNIT) {
if($productFamily->getBuyingPriceByRefUnit() > 0) {
return number_format($this->priceUtils->getPriceByRefUnitWithTax($productFamily) / $productFamily->getBuyingPriceByRefUnit(), 3) ;
}
}

}

} }

Loading…
Cancel
Save