Fixes
This commit is contained in:
parent
9d5a7522b9
commit
e2357ad09f
@ -2,6 +2,8 @@ version: '3.7'
|
||||
|
||||
services:
|
||||
application:
|
||||
volumes:
|
||||
- ${APP_CODE_PATH_HOST?}:${APP_CODE_PATH_CONTAINER?}
|
||||
environment:
|
||||
- APP_ENV=test
|
||||
php-cron:
|
||||
|
||||
21
.docker/docker-compose/docker-compose.local.dev.yml
Normal file
21
.docker/docker-compose/docker-compose.local.dev.yml
Normal file
@ -0,0 +1,21 @@
|
||||
version: '3.7'
|
||||
|
||||
services:
|
||||
application:
|
||||
environment:
|
||||
- APP_ENV=dev
|
||||
volumes:
|
||||
- ${APP_CODE_PATH_HOST?}:${APP_CODE_PATH_CONTAINER?}
|
||||
php-cron:
|
||||
environment:
|
||||
- APP_ENV=dev
|
||||
volumes:
|
||||
- ${APP_CODE_PATH_HOST?}:${APP_CODE_PATH_CONTAINER?}
|
||||
web:
|
||||
volumes:
|
||||
- ${APP_CODE_PATH_HOST?}:${APP_CODE_PATH_CONTAINER?}
|
||||
php-fpm:
|
||||
volumes:
|
||||
- ${APP_CODE_PATH_HOST?}:${APP_CODE_PATH_CONTAINER?}
|
||||
environment:
|
||||
- APP_ENV=test
|
||||
@ -22,8 +22,6 @@ services:
|
||||
- "SYS_PTRACE"
|
||||
security_opt:
|
||||
- "seccomp=unconfined"
|
||||
volumes:
|
||||
- ${APP_CODE_PATH_HOST?}:${APP_CODE_PATH_CONTAINER?}
|
||||
networks:
|
||||
- network
|
||||
extra_hosts:
|
||||
@ -31,8 +29,6 @@ services:
|
||||
php-cron:
|
||||
environment:
|
||||
- PHP_IDE_CONFIG=${PHP_IDE_CONFIG?}
|
||||
volumes:
|
||||
- ${APP_CODE_PATH_HOST?}:${APP_CODE_PATH_CONTAINER?}
|
||||
networks:
|
||||
- network
|
||||
cap_add:
|
||||
@ -43,8 +39,6 @@ services:
|
||||
- host.docker.internal:host-gateway
|
||||
|
||||
web:
|
||||
volumes:
|
||||
- ${APP_CODE_PATH_HOST?}:${APP_CODE_PATH_CONTAINER?}
|
||||
ports:
|
||||
- "${NGINX_HOST_HTTP_PORT:-80}:80"
|
||||
- "${NGINX_HOST_HTTPS_PORT:-443}:443"
|
||||
@ -106,8 +100,6 @@ services:
|
||||
- "SYS_PTRACE"
|
||||
security_opt:
|
||||
- "seccomp=unconfined"
|
||||
volumes:
|
||||
- ${APPLICATION_CODE_PATH_HOST?}:${APPLICATION_CODE_PATH_CONTAINER?}
|
||||
ports:
|
||||
- "${APPLICATION_SSH_HOST_PORT:-2222}:22"
|
||||
- "${APPLICATION_PANTHER_HOST_PORT:-9001}:9001"
|
||||
@ -118,6 +110,8 @@ services:
|
||||
- host.docker.internal:host-gateway
|
||||
depends_on:
|
||||
- chrome
|
||||
- mysql
|
||||
- mongodb
|
||||
mongodb:
|
||||
image: mongo:${MONGODB_VERSION?}
|
||||
#volumes:
|
||||
|
||||
@ -24,12 +24,12 @@ jobs:
|
||||
run: |
|
||||
make make-init ENVS="ENV=ci TAG=latest"
|
||||
make docker-compose-init-test
|
||||
- name: Build Images
|
||||
- name: Build Application Image
|
||||
run: |
|
||||
make docker-compose-build
|
||||
- name: Run Server
|
||||
make docker-compose-build DOCKER_SERVICE_NAME=application
|
||||
- name: Run Application Image
|
||||
run: |
|
||||
make docker-compose-up
|
||||
make docker-compose-up DOCKER_SERVICE_NAME=application
|
||||
- name: Load Data
|
||||
run: |
|
||||
docker exec -i psc_ci-mongodb-1 /usr/bin/mongorestore --archive < ./dev_db/mongodb.dump
|
||||
@ -44,6 +44,12 @@ jobs:
|
||||
- name: Generate Token
|
||||
run: |
|
||||
make console ARGS="lexik:jwt:generate-keypair"
|
||||
- name: Build Images
|
||||
run: |
|
||||
make docker-compose-build
|
||||
- name: Run Server
|
||||
run: |
|
||||
make docker-compose-up
|
||||
- name: Run Tests
|
||||
run: |
|
||||
make test
|
||||
@ -72,12 +78,12 @@ jobs:
|
||||
run: |
|
||||
make make-init ENVS="ENV=ci TAG=latest"
|
||||
make docker-compose-init-test
|
||||
- name: Build Images
|
||||
- name: Build Application Image
|
||||
run: |
|
||||
make docker-compose-build
|
||||
- name: Run Server
|
||||
make docker-compose-build DOCKER_SERVICE_NAME=application
|
||||
- name: Run Application Image
|
||||
run: |
|
||||
make docker-compose-up
|
||||
make docker-compose-up DOCKER_SERVICE_NAME=application
|
||||
- name: Load Data
|
||||
run: |
|
||||
docker exec -i psc_ci-mongodb-1 /usr/bin/mongorestore --archive < ./dev_db/mongodb.dump
|
||||
@ -92,6 +98,12 @@ jobs:
|
||||
- name: Generate Token
|
||||
run: |
|
||||
make console ARGS="lexik:jwt:generate-keypair"
|
||||
- name: Build Images
|
||||
run: |
|
||||
make docker-compose-build
|
||||
- name: Run Server
|
||||
run: |
|
||||
make docker-compose-up
|
||||
- name: Run Tests
|
||||
run: |
|
||||
make test
|
||||
|
||||
@ -21,6 +21,7 @@ DOCKER_COMPOSE_DIR:=$(DOCKER_DIR)/docker-compose
|
||||
DOCKER_COMPOSE_FILE_LOCAL_CI_PROD:=$(DOCKER_COMPOSE_DIR)/docker-compose.local.ci.prod.yml
|
||||
DOCKER_COMPOSE_FILE_LOCAL_CI:=$(DOCKER_COMPOSE_DIR)/docker-compose.local.ci.yml
|
||||
DOCKER_COMPOSE_FILE_LOCAL_PROD:=$(DOCKER_COMPOSE_DIR)/docker-compose.local.prod.yml
|
||||
DOCKER_COMPOSE_FILE_LOCAL_DEV:=$(DOCKER_COMPOSE_DIR)/docker-compose.local.dev.yml
|
||||
DOCKER_COMPOSE_FILE_LOCAL:=$(DOCKER_COMPOSE_DIR)/docker-compose.local.yml
|
||||
DOCKER_COMPOSE_FILE_PHP_BASE:=$(DOCKER_COMPOSE_DIR)/docker-compose-php-base.yml
|
||||
DOCKER_COMPOSE_PROJECT_NAME:=psc_$(ENV)
|
||||
@ -32,7 +33,7 @@ ifeq ($(ENV),prod)
|
||||
else ifeq ($(ENV),ci)
|
||||
DOCKER_COMPOSE_FILES:=-f $(DOCKER_COMPOSE_FILE_LOCAL_CI_PROD) -f $(DOCKER_COMPOSE_FILE_LOCAL_CI) -f $(DOCKER_COMPOSE_FILE_LOCAL_PROD) -f $(DOCKER_COMPOSE_FILE_LOCAL)
|
||||
else ifeq ($(ENV),local)
|
||||
DOCKER_COMPOSE_FILES:=-f $(DOCKER_COMPOSE_FILE_LOCAL_PROD) -f $(DOCKER_COMPOSE_FILE_LOCAL)
|
||||
DOCKER_COMPOSE_FILES:=-f $(DOCKER_COMPOSE_FILE_LOCAL_DEV) -f $(DOCKER_COMPOSE_FILE_LOCAL_PROD) -f $(DOCKER_COMPOSE_FILE_LOCAL)
|
||||
endif
|
||||
|
||||
# We need a couple of environment variables for docker compose so we define a make variable that we can
|
||||
|
||||
@ -153,6 +153,9 @@ class Voucher
|
||||
*/
|
||||
#[ORM\Column(name: 'wert', type: 'float')]
|
||||
protected $value;
|
||||
|
||||
#[ORM\Column(name: 'min_basket_value', type: 'float')]
|
||||
protected $minBasketValue;
|
||||
/**
|
||||
* Code
|
||||
*
|
||||
@ -191,6 +194,7 @@ class Voucher
|
||||
$this->toDate = new \DateTime();
|
||||
$this->createdAt = new \DateTime();
|
||||
$this->updatedAt = new \DateTime();
|
||||
$this->minBasketValue = 0;
|
||||
}
|
||||
|
||||
|
||||
@ -506,6 +510,14 @@ class Voucher
|
||||
$this->zeroPayment = $zeroPayment;
|
||||
}
|
||||
|
||||
public function setMinBasketValue(float $minBasketValue): void
|
||||
{
|
||||
$this->minBasketValue = $minBasketValue;
|
||||
}
|
||||
|
||||
public function getMinBasketValue(): float
|
||||
{
|
||||
return $this->minBasketValue;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -46,6 +46,7 @@ class VoucherType extends AbstractType
|
||||
->add('more', CheckboxType::class, ['label' => 'notindividualcodes', 'required' => false])
|
||||
->add('value', NumberType::class, ['label' => 'Value', 'required' => false])
|
||||
->add('count', NumberType::class, ['label' => 'Count', 'required' => false])
|
||||
->add('minBasketValue', NumberType::class, ['label' => 'min BasketValue', 'required' => false])
|
||||
->add('code', TextType::class, ['label' => 'Code', 'required' => false])
|
||||
->add('mode', ChoiceType::class, array(
|
||||
'label' => 'Modus',
|
||||
|
||||
@ -1,6 +1,7 @@
|
||||
Uid: Uid
|
||||
active: Aktiv
|
||||
Name: Name
|
||||
min BasketValue: ab Warenkorb Wert
|
||||
General: Allgemein
|
||||
from: von
|
||||
to: bis
|
||||
|
||||
@ -164,6 +164,14 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<div class="row mb-3">
|
||||
<label class="col-md-3 form-control-label">{{ form_label(form.minBasketValue) }}</label>
|
||||
<div class="col-md-9">
|
||||
{{ form_widget(form.minBasketValue) }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="tab-pane" id="add" role="tabpanel">
|
||||
|
||||
@ -146,6 +146,14 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<div class="row mb-3">
|
||||
<label class="col-md-3 form-control-label">{{ form_label(form.minBasketValue) }}</label>
|
||||
<div class="col-md-9">
|
||||
{{ form_widget(form.minBasketValue) }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-4">
|
||||
|
||||
@ -17,20 +17,20 @@ class Version20250303120815 extends Base
|
||||
{
|
||||
public function migrateDatabase()
|
||||
{
|
||||
$this->entityManager->getConnection()->exec("ALTER TABLE order MODIFY preis float default 0");
|
||||
$this->entityManager->getConnection()->exec("ALTER TABLE order MODIFY enable tinyint(1) default 1");
|
||||
$this->entityManager->getConnection()->exec("ALTER TABLE order MODIFY delivery_same int(1) default 0");
|
||||
$this->entityManager->getConnection()->exec("ALTER TABLE order MODIFY sender_same int(1) default 0");
|
||||
$this->entityManager->getConnection()->exec("ALTER TABLE order MODIFY invoice_same int(1) default 0");
|
||||
$this->entityManager->getConnection()->exec("ALTER TABLE order MODIFY zahlkosten float default 0");
|
||||
$this->entityManager->getConnection()->exec("ALTER TABLE order MODIFY versandkosten float default 0");
|
||||
$this->entityManager->getConnection()->exec("ALTER TABLE order MODIFY gutscheinabzugtyp int(1) default 0");
|
||||
$this->entityManager->getConnection()->exec("ALTER TABLE order MODIFY use_account_as_invoice int(1) default 0");
|
||||
$this->entityManager->getConnection()->exec("ALTER TABLE order MODIFY mwertalle mediumtext default null");
|
||||
$this->entityManager->getConnection()->exec("ALTER TABLE order MODIFY version int(5) default 1");
|
||||
$this->entityManager->getConnection()->exec("ALTER TABLE orderpos MODIFY resale_price float default 0");
|
||||
$this->entityManager->getConnection()->exec("ALTER TABLE orderpos MODIFY status int(3) default 10");
|
||||
$this->entityManager->getConnection()->exec("ALTER TABLE orderpos MODIFY layouter_mode int(1) default 0");
|
||||
$this->entityManager->getConnection()->exec("ALTER TABLE orderpos MODIFY render_print int(1) default 0");
|
||||
$this->entityManager->getConnection()->exec("ALTER TABLE orders MODIFY preis float default 0;");
|
||||
$this->entityManager->getConnection()->exec("ALTER TABLE orders MODIFY enable tinyint(1) default 1;");
|
||||
$this->entityManager->getConnection()->exec("ALTER TABLE orders MODIFY delivery_same int(1) default 0;");
|
||||
$this->entityManager->getConnection()->exec("ALTER TABLE orders MODIFY sender_same int(1) default 0;");
|
||||
$this->entityManager->getConnection()->exec("ALTER TABLE orders MODIFY invoice_same int(1) default 0;");
|
||||
$this->entityManager->getConnection()->exec("ALTER TABLE orders MODIFY zahlkosten float default 0;");
|
||||
$this->entityManager->getConnection()->exec("ALTER TABLE orders MODIFY versandkosten float default 0;");
|
||||
$this->entityManager->getConnection()->exec("ALTER TABLE orders MODIFY gutscheinabzugtyp int(1) default 0;");
|
||||
$this->entityManager->getConnection()->exec("ALTER TABLE orders MODIFY use_account_as_invoice int(1) default 0;");
|
||||
$this->entityManager->getConnection()->exec("ALTER TABLE orders MODIFY mwertalle mediumtext default null;");
|
||||
$this->entityManager->getConnection()->exec("ALTER TABLE orders MODIFY version int(5) default 1;");
|
||||
$this->entityManager->getConnection()->exec("ALTER TABLE orderspos MODIFY resale_price float default 0;");
|
||||
$this->entityManager->getConnection()->exec("ALTER TABLE orderspos MODIFY status int(3) default 10;");
|
||||
$this->entityManager->getConnection()->exec("ALTER TABLE orderspos MODIFY layouter_mode int(1) default 0;");
|
||||
$this->entityManager->getConnection()->exec("ALTER TABLE orderspos MODIFY render_print int(1) default 0;");
|
||||
}
|
||||
}
|
||||
|
||||
@ -0,0 +1,11 @@
|
||||
<?php
|
||||
|
||||
namespace PSC\System\UpdateBundle\Migrations;
|
||||
|
||||
class Version20250304145512 extends Base
|
||||
{
|
||||
public function migrateDatabase(): void
|
||||
{
|
||||
$this->entityManager->getConnection()->exec("ALTER TABLE credit_system ADD min_basket_value float null default 0;");
|
||||
}
|
||||
}
|
||||
Loading…
Reference in New Issue
Block a user