112 lines
3.1 KiB
Markdown
112 lines
3.1 KiB
Markdown
# Le Gaulois
|
|
|
|
## Features
|
|
|
|
### Club
|
|
|
|
#### Messages et Notifications
|
|
|
|
Page : `/club/notifications`
|
|
|
|
Les notifications de l'utilisateur connecté (`Customer`) sont affichées par date de création (`created_at`), du plus récent au plus ancien (`DESC`)
|
|
|
|
Au clic sur une notification de type `message`, nous sommes redirigé vers `/club/messages?m=[MESSAGE ID]`
|
|
|
|
Page : `/club/messages?m=[MESSAGE ID]`
|
|
|
|
Les messages sont affichés du plus récent au plus ancien.
|
|
|
|
Au clic sur une conversation, un call (DELETE `/club/conversations/mark-as-read`) est fait pour set comme "lues", les notifications des messages de la conversation séléctionnée.
|
|
|
|
##### Crons
|
|
Tous les jours à 14:15, lancement du job `DeleteOldMessages` qui supprime tous les messages dont la date de mise à jour (`updated_at`) est supérieur à 30 jours ainsi que les notifications dont le type est `message` dont la date de mise à jour (`updated_at`) est supérieur à 30 jours.
|
|
|
|
## Optimiser Images
|
|
|
|
### PNG
|
|
|
|
apt install imagick
|
|
convert -colors 256 -depth 8 +dither bg-footer-ori.png bg-footer-test.png
|
|
<https://compresspng.com/>
|
|
|
|
### Autre
|
|
|
|
apt install trimage
|
|
|
|
# Copy paste from the admin secure readme.md
|
|
Put every min in PROD :
|
|
```php
|
|
php artisan schedule:run
|
|
```
|
|
|
|
# Unit tests
|
|
Create new `.env.testing` with a new empty database `le-gaulois-testing` and just run this command :
|
|
```php
|
|
php artisan test
|
|
```
|
|
To see more details, please read the documentation of [uwil/unit-tests-laravel](https://lab.s-web.fr/ldc-web/projets/unit-tests-laravel/-/blob/main/README.md?ref_type=heads#documentation)
|
|
|
|
Legend : ✅ test added & operational, ⚠️ test added & operational but modified, ❌ no test (because no CRUD or specific model)
|
|
|
|
Models list :
|
|
|
|
✅ ActivityLog
|
|
⚠️ Approach (label/demarche)
|
|
❌ BlockList
|
|
✅ BrandAdvantage
|
|
❌ Breeder
|
|
✅ Claim
|
|
✅ ConsumptionMoment
|
|
❌ Customer
|
|
❌ DeliveryAddress
|
|
✅ DemarcheSlide
|
|
❌ DepartaimantsCollection
|
|
✅ Discount
|
|
❌ GeneralSetting
|
|
✅ HistoricalMilestone
|
|
❌ IncoNutritionalValue
|
|
✅ KeyNumber
|
|
✅ MainSlide
|
|
✅ Meat
|
|
⚠️ MenuNodeData
|
|
❌ Message
|
|
⚠️ News
|
|
✅ NewsBreeding
|
|
✅ NewsCategory
|
|
⚠️ NewsClub (News/Survey)
|
|
✅ NewsCorporate
|
|
❌ Notification
|
|
✅ Offer
|
|
❌ Order
|
|
❌ OrderSellItem
|
|
✅ Product
|
|
✅ ProductType
|
|
✅ Profession
|
|
✅ Range
|
|
✅ Recipe
|
|
✅ SellItem
|
|
✅ StaticPage
|
|
✅ Submeat
|
|
✅ Subrange
|
|
✅ SurveysAnswer
|
|
✅ Testimonial
|
|
❌ User
|
|
✅ Video
|
|
|
|
# Meilisearch
|
|
When deploying, if there any modification to a concerned Model, you may refresh Meilisearch cache. Concerned models are :
|
|
- News
|
|
- NewsBreeding
|
|
- Product
|
|
- Recipe
|
|
|
|
```sh
|
|
php artisan scout:flush "\App\Models\News"
|
|
php artisan scout:import "\App\Models\News"
|
|
php artisan scout:flush "\App\Models\NewsBreeding"
|
|
php artisan scout:import "\App\Models\NewsBreeding"
|
|
php artisan scout:flush "\App\Models\Product"
|
|
php artisan scout:import "\App\Models\Product"
|
|
php artisan scout:flush "\App\Models\Recipe"
|
|
php artisan scout:import "\App\Models\Recipe"
|
|
```
|