Skip to content

Commit b0cd313

Browse files
authored
Merge branch 'coopcycle:master' into master
2 parents 60b70bc + 5eeaaac commit b0cd313

File tree

662 files changed

+24618
-7457
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

662 files changed

+24618
-7457
lines changed

.env.dist

+11-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ COOPCYCLE_DB_HOST=postgres
1818
COOPCYCLE_DB_PORT=5432
1919
COOPCYCLE_DB_NAME=coopcycle
2020
COOPCYCLE_DB_USER=postgres
21-
COOPCYCLE_DB_PASSWORD=
21+
COOPCYCLE_DB_PASSWORD=ThisPasswordIsNotSoSecretChangeIt
2222
COOPCYCLE_REDIS_DSN=redis://redis:6379
2323
COOPCYCLE_OAUTH_FACEBOOK_CLIENT_ID=YourFacebookClientId
2424
COOPCYCLE_OAUTH_FACEBOOK_CLIENT_SECRET=YourFacebookClientSecret
@@ -121,3 +121,13 @@ TRANSPORTERS_CONFIG={}
121121
ODOO_URL=
122122
EDENRED_SYNCHRONIZER_BASE_URL=https://edenred-synchronizer.coopcycle.org/api/
123123
EDENRED_SYNCHRONIZER_API_KEY=
124+
PAYGREEN_ENVIRONMENT=SANDBOX
125+
PAYGREEN_ENABLED=0
126+
BILLING_ENABLED=0
127+
CUBEJS_DUCKDB_S3_ENDPOINT=minio:9000
128+
CUBEJS_DUCKDB_S3_REGION=fr-fr
129+
CUBEJS_DUCKDB_S3_ACCESS_KEY_ID=minio
130+
CUBEJS_DUCKDB_S3_SECRET_ACCESS_KEY=coopcycle
131+
CUBEJS_DUCKDB_S3_PATH=/images/exports/%type%
132+
INSEE_API_KEY=
133+
INSEE_API_SECRET=

.env.test

+1
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
11
APP_ENV=test
2+
BUSINESS_ACCOUNT_ENABLED=1

.eslintrc.js

+15-10
Original file line numberDiff line numberDiff line change
@@ -5,25 +5,28 @@ module.exports = {
55
es6: true,
66
node: true,
77
},
8-
extends: ['eslint:recommended', 'plugin:react/recommended', 'plugin:jest/recommended', 'plugin:storybook/recommended'],
8+
extends: [
9+
'eslint:recommended',
10+
'plugin:react/recommended',
11+
'plugin:jest/recommended',
12+
'plugin:storybook/recommended',
13+
'plugin:cypress/recommended',
14+
],
915
parser: 'babel-eslint',
1016
parserOptions: {
1117
ecmaFeatures: {
12-
jsx: true
18+
jsx: true,
1319
},
1420
ecmaVersion: 6,
1521
sourceType: 'module',
1622
},
17-
plugins: [
18-
'react',
19-
'jest',
20-
],
23+
plugins: ['react', 'jest'],
2124
globals: {
22-
'$': true,
25+
$: true,
2326
io: true,
2427
CoopCycle: true,
2528
Stripe: true,
26-
google: true
29+
google: true,
2730
},
2831
settings: {
2932
react: {
@@ -37,5 +40,7 @@ module.exports = {
3740
'react/prop-types': 'off',
3841
'react/display-name': 'off',
3942
'react/no-deprecated': 'warn',
40-
}
41-
};
43+
"cypress/unsafe-to-chain-command": "warn",
44+
"cypress/no-unnecessary-waiting": "warn",
45+
},
46+
}

.github/ISSUE_TEMPLATE/feature_request.md

-3
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,6 @@ assignees: ''
1010
**In order to** `achieve something`
1111
A clear description of a goal you want to archive
1212

13-
**As a** `role`
14-
Who would benefit from this change, e.g. a dispatcher, a courier, a restaurant ...
15-
1613
**I want** `something to be added or changed`
1714
A clear and concise description of what is to be added or changed in the software
1815

.github/workflows/build.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -13,15 +13,15 @@ jobs:
1313
- uses: actions/setup-node@v2
1414
- uses: actions/setup-python@v1
1515
with:
16-
python-version: 3.7
16+
python-version: '3.x'
1717
- name: Setup PHP
1818
uses: shivammathur/setup-php@v2
1919
with:
2020
php-version: 8.3
2121
tools: composer:v2
2222
extensions: redis
2323
env:
24-
GITHUB_TOKEN: ${{ secrets.COMPOSER_TOKEN }}
24+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2525
- run: composer install --prefer-dist --no-progress --no-scripts
2626
- run: npm ci
2727
- name: Install dependencies

.github/workflows/test.yml

+41-25
Original file line numberDiff line numberDiff line change
@@ -48,42 +48,49 @@ jobs:
4848
STRIPE_PUBLISHABLE_KEY: ${{ secrets.STRIPE_PUBLISHABLE_KEY }}
4949
STRIPE_SECRET_KEY: ${{ secrets.STRIPE_SECRET_KEY }}
5050
steps:
51+
- name: Set timezone
52+
uses: szenius/[email protected]
53+
with:
54+
timezoneLinux: "Europe/Paris"
5155
- uses: actions/checkout@v2
5256
- name: Create .env file
5357
run: cp .env.dist .env
5458
- name: Pull Docker images
55-
run: docker-compose pull --ignore-pull-failures
59+
run: docker compose pull --ignore-pull-failures
5660
- name: Prepare OSRM data
5761
run: |
58-
docker-compose run -T --rm osrm wget --no-check-certificate https://coopcycle-assets.sfo2.digitaloceanspaces.com/osm/paris-france.osm.pbf -O /data/data.osm.pbf
59-
docker-compose run -T --rm osrm osrm-extract -p /opt/bicycle.lua /data/data.osm.pbf
60-
docker-compose run -T --rm osrm osrm-partition /data/data.osrm
61-
docker-compose run -T --rm osrm osrm-customize /data/data.osrm
62+
docker compose run -T --rm osrm wget --no-check-certificate https://coopcycle-assets.sfo2.digitaloceanspaces.com/osm/paris-france.osm.pbf -O /data/data.osm.pbf
63+
docker compose run -T --rm osrm osrm-extract -p /opt/bicycle.lua /data/data.osm.pbf
64+
docker compose run -T --rm osrm osrm-partition /data/data.osrm
65+
docker compose run -T --rm osrm osrm-customize /data/data.osrm
6266
- name: Start Docker containers
63-
run: docker-compose up -d
67+
run: docker compose up -d
6468
- name: Wait for PHP-FPM
65-
run: until docker inspect --format='{{ .State.Health.Status }}' $(docker-compose ps -q php) | grep -wq healthy; do sleep 5; done
69+
run: until docker inspect --format='{{ .State.Health.Status }}' $(docker compose ps -q php) | grep -wq healthy; do sleep 5; done
70+
timeout-minutes: 2
71+
- name: Wait webpack
72+
run: until [ -f "web/build/entrypoints.json" ]; do sleep 5; done
6673
timeout-minutes: 2
6774
- name: Show PHP logs
6875
if: always()
69-
run: docker-compose logs php
76+
run: docker compose logs php
7077
- name: Create database
71-
run: docker-compose exec -T php bin/console doctrine:schema:create --env=test
78+
run: docker compose exec -T php bin/console doctrine:schema:create --env=test
7279
- name: Create typesense collections
73-
run: docker-compose exec -T php bin/console typesense:create --env=test
80+
run: docker compose exec -T php bin/console typesense:create --env=test
7481
- name: Validate database schema
75-
run: docker-compose exec -T php bin/console doctrine:schema:validate --env=test --skip-sync
82+
run: docker compose exec -T php bin/console doctrine:schema:validate --env=test --skip-sync
7683
- name: Run PHPUnit
7784
run: |
7885
cp phpunit.xml.dist phpunit.xml
79-
docker-compose exec -T php vendor/bin/phpunit
86+
docker compose exec -T php vendor/bin/phpunit
8087
- name: Run Behat
81-
run: docker-compose exec -T php vendor/bin/behat -f progress
88+
run: docker compose exec -T php vendor/bin/behat -f progress
8289
- name: Show Symfony logs on failure
8390
if: ${{ failure() }}
84-
run: docker-compose exec -T php cat var/logs/test-$(date +'%Y-%m-%d').log | grep CRITICAL
91+
run: docker compose exec -T php cat var/logs/test-$(date +'%Y-%m-%d').log | grep INFO
8592
- name: Run Jest
86-
run: docker-compose exec -T webpack npm run jest
93+
run: docker compose exec -T webpack npm run jest
8794
E2E:
8895
name: Run end to end tests with cypress
8996
runs-on: ubuntu-latest
@@ -96,33 +103,39 @@ jobs:
96103
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
97104
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
98105
steps:
106+
- name: Set timezone
107+
uses: szenius/[email protected]
108+
with:
109+
timezoneLinux: "Europe/Paris"
99110
- uses: actions/checkout@v2
100111
- name: Create .env file
101112
run: cp .env.dist .env
102113
- name: Pull Docker images
103-
run: docker-compose pull --ignore-pull-failures
114+
run: docker compose pull --ignore-pull-failures
104115
- name: Prepare OSRM data
105116
run: |
106-
docker-compose run -T --rm osrm wget --no-check-certificate https://coopcycle-assets.sfo2.digitaloceanspaces.com/osm/paris-france.osm.pbf -O /data/data.osm.pbf
107-
docker-compose run -T --rm osrm osrm-extract -p /opt/bicycle.lua /data/data.osm.pbf
108-
docker-compose run -T --rm osrm osrm-partition /data/data.osrm
109-
docker-compose run -T --rm osrm osrm-customize /data/data.osrm
117+
docker compose run -T --rm osrm wget --no-check-certificate https://coopcycle-assets.sfo2.digitaloceanspaces.com/osm/paris-france.osm.pbf -O /data/data.osm.pbf
118+
docker compose run -T --rm osrm osrm-extract -p /opt/bicycle.lua /data/data.osm.pbf
119+
docker compose run -T --rm osrm osrm-partition /data/data.osrm
120+
docker compose run -T --rm osrm osrm-customize /data/data.osrm
110121
# Cypress GitHub Action uses npm ci, and it causes a "permission denied" error,
111122
# because it tries to remove the node_modules/ folder, which is mounted with root:root
112123
# We create the node_modules/ folder *BEFORE* starting the containers,
113124
# so that it can be removed without problems.
114125
- name: Create node_modules directory
115126
run: mkdir node_modules
116127
- name: Start Docker containers
117-
run: docker-compose up -d
128+
run: docker compose up -d
118129
- name: Wait for PHP-FPM
119-
run: until docker inspect --format='{{ .State.Health.Status }}' $(docker-compose ps -q php) | grep -wq healthy; do sleep 5; done
130+
run: until docker inspect --format='{{ .State.Health.Status }}' $(docker compose ps -q php) | grep -wq healthy; do sleep 5; done
131+
- name: Wait webpack
132+
run: until [ -f "web/build/entrypoints.json" ]; do sleep 5; done
120133
- name: Create database
121-
run: docker-compose exec -T php bin/console doctrine:schema:create --env=test
134+
run: docker compose exec -T php bin/console doctrine:schema:create --env=test
122135
- name: Create typesense collections
123-
run: docker-compose exec -T php bin/console typesense:create --env=test
136+
run: docker compose exec -T php bin/console typesense:create --env=test
124137
- name: Setup CoopCycle
125-
run: docker-compose exec -T php bin/console coopcycle:setup --env=test
138+
run: docker compose exec -T php bin/console coopcycle:setup --env=test
126139
- name: Run Cypress
127140
uses: cypress-io/github-action@v6
128141
with:
@@ -140,6 +153,9 @@ jobs:
140153
name: cypress-screenshots
141154
path: cypress/screenshots
142155
if-no-files-found: ignore # 'warn' or 'error' are also available, defaults to `warn`
156+
- name: Show Symfony logs on failure
157+
if: failure()
158+
run: docker compose exec -T php cat var/logs/test-$(date +'%Y-%m-%d').log | grep INFO
143159
COMPONENT:
144160
name: Run component tests with Cypress
145161
runs-on: ubuntu-latest

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -56,3 +56,4 @@
5656
.phpactor.json
5757

5858
.vscode
59+
.tool-versions

CHANGELOG.md

+109-1
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,119 @@ All notable changes to this project will be documented in this file.
55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
66
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77

8+
## [3.16.0] - 2024-10-09
9+
10+
### Fixed
11+
* The delivery order form is now navigatable with TAB key
12+
* Multi-dropoff reorder suggestions show only on delivery form submit
13+
* You can select with TAB or ENTER key from the address autossugest dropdown
14+
* Phone number and contact name are now optional for admins in the delivery order form
15+
16+
## [3.15.0] - 2024-10-07
17+
18+
### Fixed
19+
* The "global foodtech delay" now solely applies to pickup times
20+
21+
## [3.14.11] - 2024-09-27
22+
23+
### Added
24+
* Allow limiting deliveries to a zone/distance for a store.
25+
26+
## [3.14.8] - 2024-09-26
27+
28+
### Added
29+
* Validate SIRET using INSEE APIs, to make sure it works with Edenred.
30+
31+
## [3.14.0] - 2024-09-24
32+
33+
### Added
34+
* Allow auto-assiging deliveries from a store to a rider.
35+
36+
## [3.13.0] - 2024-09-24
37+
38+
### Changed
39+
* Paying with Edenred with a credit card complement now generates two payments.
40+
41+
## [3.9.11] - 2024-09-12
42+
43+
### Added
44+
* Ability to filter out unassigned tours on dispatch map
45+
* Ability to filter out assigned tasks on dispatch map
46+
47+
### Fixed
48+
* Deliveries/orders created from dispatch recurrent rules are not in the right order
49+
50+
## [3.9.6] - 2024-09-10
51+
52+
### Added
53+
* Show order number in the dispatch panel, not task id
54+
55+
### Fixed
56+
* Crash when creating an incident from the dispatch panel
57+
58+
## [3.8.1] - 2024-08-21
59+
60+
### Added
61+
* Sugggest a more optimized route when creating a delivery.
62+
63+
## [3.7.9] - 2024-08-21
64+
65+
### Fixed
66+
* Crash when taking actions or adding comments to a incident
67+
68+
### Changed
69+
* Move the "Take action" button close to the header section in incident view
70+
71+
## [3.7.6] - 2024-08-20
72+
73+
### Fixed
74+
* Crash when bookmarking a new order: https://github.com/coopcycle/coopcycle-web/issues/4560
75+
* Bug on the delivery order form. It is not possible to add packages (clicking on the button had no effect).
76+
77+
## [3.7.3] - 2024-08-19
78+
79+
### Added
80+
* Introduce vehicles, warehouses and trailers by @Atala in https://github.com/coopcycle/coopcycle-web/pull/4485
81+
* Enable trailers edit
82+
* Show order number in orders/deliveries-related screens
83+
* 'Duplicate an order' button by @vladimir-8 in https://github.com/coopcycle/coopcycle-web/pull/4474
84+
* Add the ability for admins to bookmark/save orders by @vladimir-8 in https://github.com/coopcycle/coopcycle-web/pull/4489
85+
* Add order subscriptions by @vladimir-8 in https://github.com/coopcycle/coopcycle-web/pull/4511
86+
* Format price in exports.
87+
* Transporters: Add support for multiple synchronisation mechanism by @r0xsh in https://github.com/coopcycle/coopcycle-web/pull/4486
88+
89+
### Changed
90+
* Do not send geofencing notification to dispatchers and admin
91+
* Add the ability for a dispatcher to undo optimization
92+
93+
### Fixed
94+
* Crash in dispatch when task.metadata is NULL (legacy tasks)
95+
* As a dispatcher I want to be able to filter by "only this rider"
96+
* Vehicles/trailers deletion by Atala
97+
* Fix dispatch map crash when expanding marker's popup
98+
* Stripe payment failed for some customers when they selected an option to save their card for future payments: https://github.com/coopcycle/coopcycle/issues/62
99+
* Some situations where delivery fee was added twice: https://github.com/coopcycle/coopcycle-web/issues/3929
100+
101+
## [3.4.1] - 2024-07-08
102+
103+
### Added
104+
* Show volumes and weight in the dispatch for individual tasks, and sum for tours/routes and for what is assigned to a messenger. Includes a toggle setting. By @Atala in https://github.com/coopcycle/coopcycle-web/pull/4469
105+
* As a dispatcher, I can change the color of the dropoff markers, or show a colored line that demostrates the way the tasks are arranged into a route by @Atala in https://github.com/coopcycle/coopcycle-web/pull/4479
106+
* Allow dispatch to reorder timeslots on Store settings, which changes the way they are shown to a store when they use the order creation form by @r0xsh in https://github.com/coopcycle/coopcycle-web/pull/4417
107+
* Show task(s) in the right hand columns when selecting a task on the map by @Atala in #4455
108+
109+
### Changed
110+
* Move the search input from right panel to top bar to improve usability and show results better by @Atala in https://github.com/coopcycle/coopcycle-web/pull/4482
111+
112+
### Fixed
113+
* Allow last-mile orders to be paid after the delivery has been completed
114+
* In foodtech orders dashboard, fix search + show search result on top of column
115+
8116
## [3.0.4] - 2024-06-27
9117

10118
### Added
11119

12-
* FOOD TECH: Timing Modal. Display a modal when the client is about to make an order that's going to be rescheduled to the next shift
120+
* FOOD TECH: Timing Modal (web only). Display a modal when the client is about to make an order that's going to be rescheduled to the next shift
13121

14122
## [3.0.2] - 2024-06-27
15123

DOCKER_HUB.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ Read the [Docker Hub Quickstart](https://docs.docker.com/docker-hub/)
77

88
```
99
DOCKER_DEFAULT_PLATFORM=linux/amd64 docker compose build --no-cache php
10-
docker push coopcycle/php:8.2
10+
docker push coopcycle/php:8.3
1111
```
1212

1313
```

0 commit comments

Comments
 (0)