Skip to content

Commit be8baea

Browse files
committed
Fix add uploads CSV file to Box entity
1 parent 5e8e4b1 commit be8baea

26 files changed

+900
-256
lines changed

.idea/data-manager.iml

Lines changed: 4 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/misc.xml

Lines changed: 3 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/php.xml

Lines changed: 4 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/workspace.xml

Lines changed: 317 additions & 213 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

box.csv

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
last_check;period_start;period_end;provider;$key;name;price;commitment;step;price_after_step;speed_up;speed_up_unity;speed_down;speed_down_unity;remb_max_resiliation;info;web;#provider;#commentaire
2+
20/08/2018;;;1;BBF;Bbox Fit;12,99;12;12; 22,99 � ;200;Mb/s;500;Mb/s; 100,00 � ;;https://www.bouyguestelecom.fr/offres-internet/bbox-fit;1;D_bit � confirmer
3+
20/08/2018;;;1;BBM;Bbox Must;17,99;12;12; 32,99 � ;200;Mb/s;500;Mb/s; 100,00 � ;;https://www.bouyguestelecom.fr/offres-internet/bbox-must;1;
4+
20/08/2018;;;1;BBU;Bbox Ultym;22,99;12;12; 37,99 � ;250;Mb/s;1;Gb/s; 100,00 � ;;https://www.bouyguestelecom.fr/offres-internet/bbox-ultym;1;
5+
20/08/2018;;;2;SFRS;Starter;14;12;12; 39,00 � ;50;Mb/s;200;Mb/s;;10Go Cloud;https://www.sfr.fr/box-mobile/#sfrintid=HS_MAIN_Box+Mobile;2;
6+
20/08/2018;;;2;SFRP;Power;29;12;12; 44,00 � ;100;Mb/s;400;Mb/s;;100Go Cloud;https://www.sfr.fr/box-mobile/#sfrintid=HS_MAIN_Box+Mobile;2;
7+
20/08/2018;;;2;SFRPM;Premium;37;12;12; 54,00 � ;200;Mb/s;1;Gb/s;;1000Go Cloud;https://www.sfr.fr/offre-internet/box/#sfrintid=HS_MAIN_Offres-box;2;
8+
20/08/2018;;28/08/2018;3;FRC;Crystal;9,99;12;12; 24,99 � ;1;Mb/s;15;Mb/s; 100,00 � ;TV en option pour 4,99� /mois;http://www.free.fr/offre/freebox-crystal.html;3;
9+
20/08/2018;;28/08/2018;3;FRM;Mini 4k;14,99;12;12; 34,99 � ;200;Mb/s;1;Gb/s; 100,00 � ;;http://www.free.fr/offre/freebox-mini.html;3;
10+
20/08/2018;;28/08/2018;3;FRR;R_volution;19,99;12;12; 44,99 � ;200;Mb/s;1;Gb/s; 100,00 � ;;http://www.free.fr/offre/freebox-revolution.html;3;
11+
20/08/2018;;;4;OPLAY;Play;25,99;12;12; 47,99 � ;100;Mb/s;200;Mb/s;;42,99 apr�s palier si ADSL;https://boutique.orange.fr/internet/offres-fibre;4;
12+
20/08/2018;;;4;OJET;Jet;33,99;12;12; 55,99 � ;200;Mb/s;500;Mb/s;;50,99 apr�s palier si ADSL;https://boutique.orange.fr/internet/offres-fibre;4;
13+
20/08/2018;;;4;OZEN;Zen;19,99;12;12; 41,99 � ;100;Mb/s;100;Mb/s;;36,99 apr�s palier si ADSL;https://boutique.orange.fr/internet/offres-fibre;4;
14+
20/08/2018;;30/07/2018;5;REDB;RED Box;20;;;;50;Mb/s;200;Mb/s; 100,00 � ;;https://static.s-sfr.fr/media/fis_newgammethd-dsl.pdf;5;
15+
;;;;;BLABLA;333;;;;;;;;;;;;

composer.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,8 @@
2525
"symfony/twig-bundle": "4.2.*",
2626
"symfony/validator": "4.2.*",
2727
"symfony/web-link": "4.2.*",
28-
"symfony/yaml": "4.2.*"
28+
"symfony/yaml": "4.2.*",
29+
"vich/uploader-bundle": "^1.9"
2930
},
3031
"require-dev": {
3132
"doctrine/doctrine-fixtures-bundle": "^3.1",

composer.lock

Lines changed: 252 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

config/packages/easy_admin.yaml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,14 @@ easy_admin:
22
site_name: '<img src="https://res.cloudinary.com/hrscywv4p/image/upload/c_limit,fl_lossy,h_300,w_300,f_auto,q_auto/v1/1391026/head_b7uqte.png"/>'
33
user:
44
name_property_path: 'username'
5-
display_avatar: false
5+
display_avatar: true
66
list:
77
title: 'Liste des %%entity_label%%'
88
design:
9+
templates:
10+
paginator: 'admin/my_paginator.html.twig'
11+
layout: 'admin/layouts/custom_layout.html.twig'
12+
label_null: 'admin/null_value.html.twig'
913
assets:
1014
# all kinds of assets are supported and linked accordingly
1115
css:
@@ -28,9 +32,9 @@ easy_admin:
2832
brand_color: '#0cc5b9 !important'
2933
menu:
3034
- { label: 'Menu' }
31-
- {label: 'Dashboard', icon: 'dashboard', route: 'admin_dashboard', default: true}
35+
- { label: 'Dashboard', icon: 'dashboard', route: 'admin_dashboard', default: true}
3236
- { entity: 'User', icon: 'user' }
33-
- { entity: 'Box', icon: 'square' }
37+
- { label: 'Box', icon: 'square', route: 'admin_box_index' }
3438
entities:
3539
# List the entity class name you want to manage
3640
User:

config/services.yaml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
# https://symfony.com/doc/current/best_practices/configuration.html#application-related-configuration
66
parameters:
77
locale: 'en'
8+
csv_directory: '%kernel.project_dir%/public/uploads/data'
89

910
services:
1011
# default configuration for services in *this* file
@@ -26,3 +27,11 @@ services:
2627

2728
# add more service definitions when explicit configuration is needed
2829
# please note that last definitions always *replace* previous ones
30+
App\Service\FileUploader:
31+
arguments:
32+
$targetDirectory: '%csv_directory%'
33+
34+
App\EventListener\CsvUploadListener:
35+
tags:
36+
- { name: doctrine.event_listener, event: prePersist }
37+
- { name: doctrine.event_listener, event: preUpdate }

0 commit comments

Comments
 (0)