Преглед изворни кода

Merge branch 'develop'

master
Guillaume пре 2 година
родитељ
комит
ac233c787b
4 измењених фајлова са 11 додато и 7 уклоњено
  1. +5
    -0
      Definition/Field/PointSale/PointSaleFieldDefinition.php
  2. +1
    -1
      Repository/Product/ProductFamilyRepositoryQuery.php
  3. +1
    -0
      Repository/Product/ProductFamilyStore.php
  4. +4
    -6
      Solver/Product/ProductFamilySolver.php

+ 5
- 0
Definition/Field/PointSale/PointSaleFieldDefinition.php Прегледај датотеку

@@ -2,6 +2,7 @@

namespace Lc\CaracoleBundle\Definition\Field\PointSale;

use EasyCorp\Bundle\EasyAdminBundle\Field\ImageField;
use EasyCorp\Bundle\EasyAdminBundle\Field\IntegerField;
use EasyCorp\Bundle\EasyAdminBundle\Field\TextField;
use Lc\CaracoleBundle\Field\Address\AddressField;
@@ -9,6 +10,7 @@ use Lc\SovBundle\Definition\Field\AbstractFieldDefinition;
use Lc\SovBundle\Field\CKEditorField;
use Lc\SovBundle\Field\ImageManagerField;
use Lc\SovBundle\Field\StatusField;
use Lc\SovBundle\Form\Common\FileUploadType;

class PointSaleFieldDefinition extends AbstractFieldDefinition
{
@@ -54,6 +56,9 @@ class PointSaleFieldDefinition extends AbstractFieldDefinition
'id' => IntegerField::new('id')->setSortable(true)->onlyOnIndex(),
'title' => TextField::new('title')->setSortable(true),
'code' => TextField::new('code'),
/*'image' => ImageField::new('image')
->setUploadDir('public/uploads/images/pointsale')
->setFormType(FileUploadType::class),*/
'image' => ImageManagerField::new('image'),
'description' => CKEditorField::new('description'),
'status' => StatusField::new('status')->setSortable(true),

+ 1
- 1
Repository/Product/ProductFamilyRepositoryQuery.php Прегледај датотеку

@@ -161,7 +161,7 @@ class ProductFamilyRepositoryQuery extends AbstractRepositoryQuery
return $this->andWhereEqual('supplier', $supplier);
}

public function joinProductCategories(bool $addSelect = false): self
public function joinProductCategories(bool $addSelect = true): self
{
if (!$this->isJoinProductCategories) {
$this->isJoinProductCategories = true;

+ 1
- 0
Repository/Product/ProductFamilyStore.php Прегледај датотеку

@@ -208,6 +208,7 @@ class ProductFamilyStore extends AbstractStore
'ids' => [],
'categories' => [],
];

foreach ($productFamilies as $productFamily) {
$conditions['ids'][] = $productFamily->getId();
$conditions['categories'] = array_merge(

+ 4
- 6
Solver/Product/ProductFamilySolver.php Прегледај датотеку

@@ -14,7 +14,6 @@ use Lc\CaracoleBundle\Model\Section\SectionInterface;

class ProductFamilySolver
{

protected ProductSolver $productSolver;
protected ProductFamilySectionPropertySolver $productFamilySectionPropertySolver;
protected ProductCategorySolver $productCategorySolver;
@@ -26,7 +25,6 @@ class ProductFamilySolver
$this->productCategorySolver = $productCategorySolver;
}


public static function getBehaviorCountStockChoices(): array
{
return [
@@ -170,24 +168,24 @@ class ProductFamilySolver
return $productsOnlineArray;
}


public function getReductionCatalogInherited(ProductFamilyInterface $productFamily): ?ReductionCatalogInterface
{
return $productFamily->getReductionCatalog();
}


public function getProductCategoryParent(ProductFamilyInterface $productFamily, SectionInterface $section)
{
$productCategories = $productFamily->getProductCategories();

if (count($productCategories) > 0) {

foreach ($productCategories as $productCategory) {
if($productCategory->getSection() === $section && $productCategory->getParent()!==null){
if($productCategory->getSection()->getId() == $section->getId()
&& $productCategory->getParent() !== null) {

return $productCategory->getParent();
}
}

}

return false;

Loading…
Откажи
Сачувај