瀏覽代碼

Correctif mineur

develop
Fabien Normand 2 年之前
父節點
當前提交
a20dd6a090
共有 6 個檔案被更改,包括 18 行新增8 行删除
  1. +1
    -1
      Controller/AbstractAdminController.php
  2. +3
    -0
      Definition/Field/AbstractFieldDefinition.php
  3. +6
    -0
      Resources/assets/app/adminlte/main/scss/_common.scss
  4. +3
    -3
      Resources/assets/functions/prices.js
  5. +4
    -4
      Resources/assets/functions/widgets.js
  6. +1
    -0
      Resources/translations/admin.fr.yaml

+ 1
- 1
Controller/AbstractAdminController.php 查看文件

@@ -342,7 +342,7 @@ abstract class AbstractAdminController extends EaAbstractCrudController
}

$newEntity = $entityComponent->duplicateEntity($context->getEntity()->getInstance());
$em->create($newEntity);
$em->create($newEntity, false);
$em->flush();

$url = $this->get(AdminUrlGenerator::class)

+ 3
- 0
Definition/Field/AbstractFieldDefinition.php 查看文件

@@ -8,6 +8,7 @@ use EasyCorp\Bundle\EasyAdminBundle\Field\FormField;
use EasyCorp\Bundle\EasyAdminBundle\Field\IntegerField;
use EasyCorp\Bundle\EasyAdminBundle\Field\TextareaField;
use EasyCorp\Bundle\EasyAdminBundle\Field\TextField;
use Lc\CaracoleBundle\Field\AssociationField;
use Lc\SovBundle\Field\CKEditorField;
use Lc\SovBundle\Field\CollectionField;
use Lc\SovBundle\Field\ImageManagerField;
@@ -55,6 +56,8 @@ abstract class AbstractFieldDefinition
'status' => StatusField::new('status')->setSortable(true),
'createdAt' => DateTimeField::new('createdAt')->setSortable(true),
'updatedAt' => DateTimeField::new('updatedAt')->setSortable(true),
'createdBy' => AssociationField::new('createdBy'),
'updatedBy' => AssociationField::new('updatedBy')
];
}


+ 6
- 0
Resources/assets/app/adminlte/main/scss/_common.scss 查看文件

@@ -146,3 +146,9 @@ table.fixedHeader-floating {
}

.badge.stripped{background-image: url('../img/stripped.png');}

.ui-sortable-helper {
display: table;
}
.lc-draggable{width: 100%;}
.sortable{width: 100%}

+ 3
- 3
Resources/assets/functions/prices.js 查看文件

@@ -6,7 +6,7 @@ export class SovPrices {
}

static getPriceWithTax(priceWithoutTax, taxRate) {
return parseFloat(parseFloat(priceWithoutTax) * ((taxRate/100) + 1)).toFixed(2);
return parseFloat(parseFloat(priceWithoutTax) * ((taxRate/100) + 1)).toFixed(4);
}

static getMargin(price, buyingPrice){
@@ -24,11 +24,11 @@ export class SovPrices {

static applyReductionAmount(price, amount)
{
return parseFloat(price - amount).toFixed(2);
return parseFloat(price - amount).toFixed(4);
}

static applyPercent(price, percentage)
{
return parseFloat(price * (percentage / 100 + 1)).toFixed(2);
return parseFloat(price * (percentage / 100 + 1)).toFixed(4);
}
}

+ 4
- 4
Resources/assets/functions/widgets.js 查看文件

@@ -19,12 +19,12 @@ export class SovWidgets {
options.width = 'auto'
}

options.placeholder = "";

// @TODO : génère une erreur
/*if ($select.find('option[value=""]')) {
if ($select.find('option[value=""]').length) {
options.placeholder = $select.find('option[value=""]').html()
}*/

options.placeholder = "";
}

var myselect = $select.select2(options);


+ 1
- 0
Resources/translations/admin.fr.yaml 查看文件

@@ -119,6 +119,7 @@ entity:
label_plurial: Blocs
default:
fields:
placeholder: Sélectionner une valeur
id: Id
confirmDelete: Confirmer la suppression
createdAt: Créé le

Loading…
取消
儲存