Commit 3e932b61 by Julien Jorry

BIG UPDATE FRONT + BO

parent fb315506
......@@ -2,3 +2,2093 @@
width: 100%;
max-width: 100%;
}
.main-header .sidebar-front {
float: left;
background-color: transparent;
background-image: none;
padding: 15px 15px;
color: #3c8dbc;
border-right: 1px solid #eee;
}
.card {
position: relative;
display: -webkit-box;
display: -ms-flexbox;
display: flex;
-webkit-box-orient: vertical;
-webkit-box-direction: normal;
-ms-flex-direction: column;
flex-direction: column;
min-width: 0;
word-wrap: break-word;
background-color: #fff;
background-clip: border-box;
border: 1px solid rgba(0, 0, 0, 0.125);
border-radius: 0.25rem;
}
.card > hr {
margin-right: 0;
margin-left: 0;
}
.card > .list-group:first-child .list-group-item:first-child {
border-top-left-radius: 0.25rem;
border-top-right-radius: 0.25rem;
}
.card > .list-group:last-child .list-group-item:last-child {
border-bottom-right-radius: 0.25rem;
border-bottom-left-radius: 0.25rem;
}
.card-body {
-webkit-box-flex: 1;
-ms-flex: 1 1 auto;
flex: 1 1 auto;
padding: 1.25rem;
}
.card-title {
margin-bottom: 0.75rem;
}
.card-subtitle {
margin-top: -0.375rem;
margin-bottom: 0;
}
.card-text:last-child {
margin-bottom: 0;
}
.card-link:hover {
text-decoration: none;
}
.card-link + .card-link {
margin-left: 1.25rem;
}
.card-header {
padding: 0.75rem 1.25rem;
margin-bottom: 0;
background-color: rgba(0, 0, 0, 0.03);
border-bottom: 1px solid rgba(0, 0, 0, 0.125);
}
.card-header:first-child {
border-radius: calc(0.25rem - 1px) calc(0.25rem - 1px) 0 0;
}
.card-header + .list-group .list-group-item:first-child {
border-top: 0;
}
.card-footer {
padding: 0.75rem 1.25rem;
background-color: rgba(0, 0, 0, 0.03);
border-top: 1px solid rgba(0, 0, 0, 0.125);
}
.card-footer:last-child {
border-radius: 0 0 calc(0.25rem - 1px) calc(0.25rem - 1px);
}
.card-header-tabs {
margin-right: -0.625rem;
margin-bottom: -0.75rem;
margin-left: -0.625rem;
border-bottom: 0;
}
.card-header-pills {
margin-right: -0.625rem;
margin-left: -0.625rem;
}
.card-img-overlay {
position: absolute;
top: 0;
right: 0;
bottom: 0;
left: 0;
padding: 1.25rem;
}
.card-img {
width: 100%;
border-radius: calc(0.25rem - 1px);
}
.card-img-top {
width: 100%;
border-top-left-radius: calc(0.25rem - 1px);
border-top-right-radius: calc(0.25rem - 1px);
}
.card-img-bottom {
width: 100%;
border-bottom-right-radius: calc(0.25rem - 1px);
border-bottom-left-radius: calc(0.25rem - 1px);
}
.card-deck {
display: -webkit-box;
display: -ms-flexbox;
display: flex;
-webkit-box-orient: vertical;
-webkit-box-direction: normal;
-ms-flex-direction: column;
flex-direction: column;
}
.card-deck .card {
margin-bottom: 15px;
}
@media (min-width: 576px) {
.card-deck {
-webkit-box-orient: horizontal;
-webkit-box-direction: normal;
-ms-flex-flow: row wrap;
flex-flow: row wrap;
margin-right: -15px;
margin-left: -15px;
}
.card-deck .card {
display: -webkit-box;
display: -ms-flexbox;
display: flex;
-webkit-box-flex: 1;
-ms-flex: 1 0 0%;
flex: 1 0 0%;
-webkit-box-orient: vertical;
-webkit-box-direction: normal;
-ms-flex-direction: column;
flex-direction: column;
margin-right: 15px;
margin-bottom: 0;
margin-left: 15px;
}
}
.card-group {
display: -webkit-box;
display: -ms-flexbox;
display: flex;
-webkit-box-orient: vertical;
-webkit-box-direction: normal;
-ms-flex-direction: column;
flex-direction: column;
}
.card-group > .card {
margin-bottom: 15px;
}
@media (min-width: 576px) {
.card-group {
-webkit-box-orient: horizontal;
-webkit-box-direction: normal;
-ms-flex-flow: row wrap;
flex-flow: row wrap;
}
.card-group > .card {
-webkit-box-flex: 1;
-ms-flex: 1 0 0%;
flex: 1 0 0%;
margin-bottom: 0;
}
.card-group > .card + .card {
margin-left: 0;
border-left: 0;
}
.card-group > .card:not(:last-child) {
border-top-right-radius: 0;
border-bottom-right-radius: 0;
}
.card-group > .card:not(:last-child) .card-img-top,
.card-group > .card:not(:last-child) .card-header {
border-top-right-radius: 0;
}
.card-group > .card:not(:last-child) .card-img-bottom,
.card-group > .card:not(:last-child) .card-footer {
border-bottom-right-radius: 0;
}
.card-group > .card:not(:first-child) {
border-top-left-radius: 0;
border-bottom-left-radius: 0;
}
.card-group > .card:not(:first-child) .card-img-top,
.card-group > .card:not(:first-child) .card-header {
border-top-left-radius: 0;
}
.card-group > .card:not(:first-child) .card-img-bottom,
.card-group > .card:not(:first-child) .card-footer {
border-bottom-left-radius: 0;
}
}
.card-columns .card {
margin-bottom: 0.75rem;
}
@media (min-width: 576px) {
.card-columns {
-webkit-column-count: 3;
column-count: 3;
-webkit-column-gap: 1.25rem;
column-gap: 1.25rem;
orphans: 1;
widows: 1;
}
.card-columns .card {
display: inline-block;
width: 100%;
}
}
.accordion > .card {
overflow: hidden;
}
.accordion > .card:not(:first-of-type) .card-header:first-child {
border-radius: 0;
}
.accordion > .card:not(:first-of-type):not(:last-of-type) {
border-bottom: 0;
border-radius: 0;
}
.accordion > .card:first-of-type {
border-bottom: 0;
border-bottom-right-radius: 0;
border-bottom-left-radius: 0;
}
.accordion > .card:last-of-type {
border-top-left-radius: 0;
border-top-right-radius: 0;
}
.accordion > .card .card-header {
margin-bottom: -1px;
}
.m-0 {
margin: 0 !important;
}
.mt-0,
.my-0 {
margin-top: 0 !important;
}
.mr-0,
.mx-0 {
margin-right: 0 !important;
}
.mb-0,
.my-0 {
margin-bottom: 0 !important;
}
.ml-0,
.mx-0 {
margin-left: 0 !important;
}
.m-1 {
margin: 0.25rem !important;
}
.mt-1,
.my-1 {
margin-top: 0.25rem !important;
}
.mr-1,
.mx-1 {
margin-right: 0.25rem !important;
}
.mb-1,
.my-1 {
margin-bottom: 0.25rem !important;
}
.ml-1,
.mx-1 {
margin-left: 0.25rem !important;
}
.m-2 {
margin: 0.5rem !important;
}
.mt-2,
.my-2 {
margin-top: 0.5rem !important;
}
.mr-2,
.mx-2 {
margin-right: 0.5rem !important;
}
.mb-2,
.my-2 {
margin-bottom: 0.5rem !important;
}
.ml-2,
.mx-2 {
margin-left: 0.5rem !important;
}
.m-3 {
margin: 1rem !important;
}
.mt-3,
.my-3 {
margin-top: 1rem !important;
}
.mr-3,
.mx-3 {
margin-right: 1rem !important;
}
.mb-3,
.my-3 {
margin-bottom: 1rem !important;
}
.ml-3,
.mx-3 {
margin-left: 1rem !important;
}
.m-4 {
margin: 1.5rem !important;
}
.mt-4,
.my-4 {
margin-top: 1.5rem !important;
}
.mr-4,
.mx-4 {
margin-right: 1.5rem !important;
}
.mb-4,
.my-4 {
margin-bottom: 1.5rem !important;
}
.ml-4,
.mx-4 {
margin-left: 1.5rem !important;
}
.m-5 {
margin: 3rem !important;
}
.mt-5,
.my-5 {
margin-top: 3rem !important;
}
.mr-5,
.mx-5 {
margin-right: 3rem !important;
}
.mb-5,
.my-5 {
margin-bottom: 3rem !important;
}
.ml-5,
.mx-5 {
margin-left: 3rem !important;
}
.p-0 {
padding: 0 !important;
}
.pt-0,
.py-0 {
padding-top: 0 !important;
}
.pr-0,
.px-0 {
padding-right: 0 !important;
}
.pb-0,
.py-0 {
padding-bottom: 0 !important;
}
.pl-0,
.px-0 {
padding-left: 0 !important;
}
.p-1 {
padding: 0.25rem !important;
}
.pt-1,
.py-1 {
padding-top: 0.25rem !important;
}
.pr-1,
.px-1 {
padding-right: 0.25rem !important;
}
.pb-1,
.py-1 {
padding-bottom: 0.25rem !important;
}
.pl-1,
.px-1 {
padding-left: 0.25rem !important;
}
.p-2 {
padding: 0.5rem !important;
}
.pt-2,
.py-2 {
padding-top: 0.5rem !important;
}
.pr-2,
.px-2 {
padding-right: 0.5rem !important;
}
.pb-2,
.py-2 {
padding-bottom: 0.5rem !important;
}
.pl-2,
.px-2 {
padding-left: 0.5rem !important;
}
.p-3 {
padding: 1rem !important;
}
.pt-3,
.py-3 {
padding-top: 1rem !important;
}
.pr-3,
.px-3 {
padding-right: 1rem !important;
}
.pb-3,
.py-3 {
padding-bottom: 1rem !important;
}
.pl-3,
.px-3 {
padding-left: 1rem !important;
}
.p-4 {
padding: 1.5rem !important;
}
.pt-4,
.py-4 {
padding-top: 1.5rem !important;
}
.pr-4,
.px-4 {
padding-right: 1.5rem !important;
}
.pb-4,
.py-4 {
padding-bottom: 1.5rem !important;
}
.pl-4,
.px-4 {
padding-left: 1.5rem !important;
}
.p-5 {
padding: 3rem !important;
}
.pt-5,
.py-5 {
padding-top: 3rem !important;
}
.pr-5,
.px-5 {
padding-right: 3rem !important;
}
.pb-5,
.py-5 {
padding-bottom: 3rem !important;
}
.pl-5,
.px-5 {
padding-left: 3rem !important;
}
.m-n1 {
margin: -0.25rem !important;
}
.mt-n1,
.my-n1 {
margin-top: -0.25rem !important;
}
.mr-n1,
.mx-n1 {
margin-right: -0.25rem !important;
}
.mb-n1,
.my-n1 {
margin-bottom: -0.25rem !important;
}
.ml-n1,
.mx-n1 {
margin-left: -0.25rem !important;
}
.m-n2 {
margin: -0.5rem !important;
}
.mt-n2,
.my-n2 {
margin-top: -0.5rem !important;
}
.mr-n2,
.mx-n2 {
margin-right: -0.5rem !important;
}
.mb-n2,
.my-n2 {
margin-bottom: -0.5rem !important;
}
.ml-n2,
.mx-n2 {
margin-left: -0.5rem !important;
}
.m-n3 {
margin: -1rem !important;
}
.mt-n3,
.my-n3 {
margin-top: -1rem !important;
}
.mr-n3,
.mx-n3 {
margin-right: -1rem !important;
}
.mb-n3,
.my-n3 {
margin-bottom: -1rem !important;
}
.ml-n3,
.mx-n3 {
margin-left: -1rem !important;
}
.m-n4 {
margin: -1.5rem !important;
}
.mt-n4,
.my-n4 {
margin-top: -1.5rem !important;
}
.mr-n4,
.mx-n4 {
margin-right: -1.5rem !important;
}
.mb-n4,
.my-n4 {
margin-bottom: -1.5rem !important;
}
.ml-n4,
.mx-n4 {
margin-left: -1.5rem !important;
}
.m-n5 {
margin: -3rem !important;
}
.mt-n5,
.my-n5 {
margin-top: -3rem !important;
}
.mr-n5,
.mx-n5 {
margin-right: -3rem !important;
}
.mb-n5,
.my-n5 {
margin-bottom: -3rem !important;
}
.ml-n5,
.mx-n5 {
margin-left: -3rem !important;
}
.m-auto {
margin: auto !important;
}
.mt-auto,
.my-auto {
margin-top: auto !important;
}
.mr-auto,
.mx-auto {
margin-right: auto !important;
}
.mb-auto,
.my-auto {
margin-bottom: auto !important;
}
.ml-auto,
.mx-auto {
margin-left: auto !important;
}
@media (min-width: 576px) {
.m-sm-0 {
margin: 0 !important;
}
.mt-sm-0,
.my-sm-0 {
margin-top: 0 !important;
}
.mr-sm-0,
.mx-sm-0 {
margin-right: 0 !important;
}
.mb-sm-0,
.my-sm-0 {
margin-bottom: 0 !important;
}
.ml-sm-0,
.mx-sm-0 {
margin-left: 0 !important;
}
.m-sm-1 {
margin: 0.25rem !important;
}
.mt-sm-1,
.my-sm-1 {
margin-top: 0.25rem !important;
}
.mr-sm-1,
.mx-sm-1 {
margin-right: 0.25rem !important;
}
.mb-sm-1,
.my-sm-1 {
margin-bottom: 0.25rem !important;
}
.ml-sm-1,
.mx-sm-1 {
margin-left: 0.25rem !important;
}
.m-sm-2 {
margin: 0.5rem !important;
}
.mt-sm-2,
.my-sm-2 {
margin-top: 0.5rem !important;
}
.mr-sm-2,
.mx-sm-2 {
margin-right: 0.5rem !important;
}
.mb-sm-2,
.my-sm-2 {
margin-bottom: 0.5rem !important;
}
.ml-sm-2,
.mx-sm-2 {
margin-left: 0.5rem !important;
}
.m-sm-3 {
margin: 1rem !important;
}
.mt-sm-3,
.my-sm-3 {
margin-top: 1rem !important;
}
.mr-sm-3,
.mx-sm-3 {
margin-right: 1rem !important;
}
.mb-sm-3,
.my-sm-3 {
margin-bottom: 1rem !important;
}
.ml-sm-3,
.mx-sm-3 {
margin-left: 1rem !important;
}
.m-sm-4 {
margin: 1.5rem !important;
}
.mt-sm-4,
.my-sm-4 {
margin-top: 1.5rem !important;
}
.mr-sm-4,
.mx-sm-4 {
margin-right: 1.5rem !important;
}
.mb-sm-4,
.my-sm-4 {
margin-bottom: 1.5rem !important;
}
.ml-sm-4,
.mx-sm-4 {
margin-left: 1.5rem !important;
}
.m-sm-5 {
margin: 3rem !important;
}
.mt-sm-5,
.my-sm-5 {
margin-top: 3rem !important;
}
.mr-sm-5,
.mx-sm-5 {
margin-right: 3rem !important;
}
.mb-sm-5,
.my-sm-5 {
margin-bottom: 3rem !important;
}
.ml-sm-5,
.mx-sm-5 {
margin-left: 3rem !important;
}
.p-sm-0 {
padding: 0 !important;
}
.pt-sm-0,
.py-sm-0 {
padding-top: 0 !important;
}
.pr-sm-0,
.px-sm-0 {
padding-right: 0 !important;
}
.pb-sm-0,
.py-sm-0 {
padding-bottom: 0 !important;
}
.pl-sm-0,
.px-sm-0 {
padding-left: 0 !important;
}
.p-sm-1 {
padding: 0.25rem !important;
}
.pt-sm-1,
.py-sm-1 {
padding-top: 0.25rem !important;
}
.pr-sm-1,
.px-sm-1 {
padding-right: 0.25rem !important;
}
.pb-sm-1,
.py-sm-1 {
padding-bottom: 0.25rem !important;
}
.pl-sm-1,
.px-sm-1 {
padding-left: 0.25rem !important;
}
.p-sm-2 {
padding: 0.5rem !important;
}
.pt-sm-2,
.py-sm-2 {
padding-top: 0.5rem !important;
}
.pr-sm-2,
.px-sm-2 {
padding-right: 0.5rem !important;
}
.pb-sm-2,
.py-sm-2 {
padding-bottom: 0.5rem !important;
}
.pl-sm-2,
.px-sm-2 {
padding-left: 0.5rem !important;
}
.p-sm-3 {
padding: 1rem !important;
}
.pt-sm-3,
.py-sm-3 {
padding-top: 1rem !important;
}
.pr-sm-3,
.px-sm-3 {
padding-right: 1rem !important;
}
.pb-sm-3,
.py-sm-3 {
padding-bottom: 1rem !important;
}
.pl-sm-3,
.px-sm-3 {
padding-left: 1rem !important;
}
.p-sm-4 {
padding: 1.5rem !important;
}
.pt-sm-4,
.py-sm-4 {
padding-top: 1.5rem !important;
}
.pr-sm-4,
.px-sm-4 {
padding-right: 1.5rem !important;
}
.pb-sm-4,
.py-sm-4 {
padding-bottom: 1.5rem !important;
}
.pl-sm-4,
.px-sm-4 {
padding-left: 1.5rem !important;
}
.p-sm-5 {
padding: 3rem !important;
}
.pt-sm-5,
.py-sm-5 {
padding-top: 3rem !important;
}
.pr-sm-5,
.px-sm-5 {
padding-right: 3rem !important;
}
.pb-sm-5,
.py-sm-5 {
padding-bottom: 3rem !important;
}
.pl-sm-5,
.px-sm-5 {
padding-left: 3rem !important;
}
.m-sm-n1 {
margin: -0.25rem !important;
}
.mt-sm-n1,
.my-sm-n1 {
margin-top: -0.25rem !important;
}
.mr-sm-n1,
.mx-sm-n1 {
margin-right: -0.25rem !important;
}
.mb-sm-n1,
.my-sm-n1 {
margin-bottom: -0.25rem !important;
}
.ml-sm-n1,
.mx-sm-n1 {
margin-left: -0.25rem !important;
}
.m-sm-n2 {
margin: -0.5rem !important;
}
.mt-sm-n2,
.my-sm-n2 {
margin-top: -0.5rem !important;
}
.mr-sm-n2,
.mx-sm-n2 {
margin-right: -0.5rem !important;
}
.mb-sm-n2,
.my-sm-n2 {
margin-bottom: -0.5rem !important;
}
.ml-sm-n2,
.mx-sm-n2 {
margin-left: -0.5rem !important;
}
.m-sm-n3 {
margin: -1rem !important;
}
.mt-sm-n3,
.my-sm-n3 {
margin-top: -1rem !important;
}
.mr-sm-n3,
.mx-sm-n3 {
margin-right: -1rem !important;
}
.mb-sm-n3,
.my-sm-n3 {
margin-bottom: -1rem !important;
}
.ml-sm-n3,
.mx-sm-n3 {
margin-left: -1rem !important;
}
.m-sm-n4 {
margin: -1.5rem !important;
}
.mt-sm-n4,
.my-sm-n4 {
margin-top: -1.5rem !important;
}
.mr-sm-n4,
.mx-sm-n4 {
margin-right: -1.5rem !important;
}
.mb-sm-n4,
.my-sm-n4 {
margin-bottom: -1.5rem !important;
}
.ml-sm-n4,
.mx-sm-n4 {
margin-left: -1.5rem !important;
}
.m-sm-n5 {
margin: -3rem !important;
}
.mt-sm-n5,
.my-sm-n5 {
margin-top: -3rem !important;
}
.mr-sm-n5,
.mx-sm-n5 {
margin-right: -3rem !important;
}
.mb-sm-n5,
.my-sm-n5 {
margin-bottom: -3rem !important;
}
.ml-sm-n5,
.mx-sm-n5 {
margin-left: -3rem !important;
}
.m-sm-auto {
margin: auto !important;
}
.mt-sm-auto,
.my-sm-auto {
margin-top: auto !important;
}
.mr-sm-auto,
.mx-sm-auto {
margin-right: auto !important;
}
.mb-sm-auto,
.my-sm-auto {
margin-bottom: auto !important;
}
.ml-sm-auto,
.mx-sm-auto {
margin-left: auto !important;
}
}
@media (min-width: 768px) {
.m-md-0 {
margin: 0 !important;
}
.mt-md-0,
.my-md-0 {
margin-top: 0 !important;
}
.mr-md-0,
.mx-md-0 {
margin-right: 0 !important;
}
.mb-md-0,
.my-md-0 {
margin-bottom: 0 !important;
}
.ml-md-0,
.mx-md-0 {
margin-left: 0 !important;
}
.m-md-1 {
margin: 0.25rem !important;
}
.mt-md-1,
.my-md-1 {
margin-top: 0.25rem !important;
}
.mr-md-1,
.mx-md-1 {
margin-right: 0.25rem !important;
}
.mb-md-1,
.my-md-1 {
margin-bottom: 0.25rem !important;
}
.ml-md-1,
.mx-md-1 {
margin-left: 0.25rem !important;
}
.m-md-2 {
margin: 0.5rem !important;
}
.mt-md-2,
.my-md-2 {
margin-top: 0.5rem !important;
}
.mr-md-2,
.mx-md-2 {
margin-right: 0.5rem !important;
}
.mb-md-2,
.my-md-2 {
margin-bottom: 0.5rem !important;
}
.ml-md-2,
.mx-md-2 {
margin-left: 0.5rem !important;
}
.m-md-3 {
margin: 1rem !important;
}
.mt-md-3,
.my-md-3 {
margin-top: 1rem !important;
}
.mr-md-3,
.mx-md-3 {
margin-right: 1rem !important;
}
.mb-md-3,
.my-md-3 {
margin-bottom: 1rem !important;
}
.ml-md-3,
.mx-md-3 {
margin-left: 1rem !important;
}
.m-md-4 {
margin: 1.5rem !important;
}
.mt-md-4,
.my-md-4 {
margin-top: 1.5rem !important;
}
.mr-md-4,
.mx-md-4 {
margin-right: 1.5rem !important;
}
.mb-md-4,
.my-md-4 {
margin-bottom: 1.5rem !important;
}
.ml-md-4,
.mx-md-4 {
margin-left: 1.5rem !important;
}
.m-md-5 {
margin: 3rem !important;
}
.mt-md-5,
.my-md-5 {
margin-top: 3rem !important;
}
.mr-md-5,
.mx-md-5 {
margin-right: 3rem !important;
}
.mb-md-5,
.my-md-5 {
margin-bottom: 3rem !important;
}
.ml-md-5,
.mx-md-5 {
margin-left: 3rem !important;
}
.p-md-0 {
padding: 0 !important;
}
.pt-md-0,
.py-md-0 {
padding-top: 0 !important;
}
.pr-md-0,
.px-md-0 {
padding-right: 0 !important;
}
.pb-md-0,
.py-md-0 {
padding-bottom: 0 !important;
}
.pl-md-0,
.px-md-0 {
padding-left: 0 !important;
}
.p-md-1 {
padding: 0.25rem !important;
}
.pt-md-1,
.py-md-1 {
padding-top: 0.25rem !important;
}
.pr-md-1,
.px-md-1 {
padding-right: 0.25rem !important;
}
.pb-md-1,
.py-md-1 {
padding-bottom: 0.25rem !important;
}
.pl-md-1,
.px-md-1 {
padding-left: 0.25rem !important;
}
.p-md-2 {
padding: 0.5rem !important;
}
.pt-md-2,
.py-md-2 {
padding-top: 0.5rem !important;
}
.pr-md-2,
.px-md-2 {
padding-right: 0.5rem !important;
}
.pb-md-2,
.py-md-2 {
padding-bottom: 0.5rem !important;
}
.pl-md-2,
.px-md-2 {
padding-left: 0.5rem !important;
}
.p-md-3 {
padding: 1rem !important;
}
.pt-md-3,
.py-md-3 {
padding-top: 1rem !important;
}
.pr-md-3,
.px-md-3 {
padding-right: 1rem !important;
}
.pb-md-3,
.py-md-3 {
padding-bottom: 1rem !important;
}
.pl-md-3,
.px-md-3 {
padding-left: 1rem !important;
}
.p-md-4 {
padding: 1.5rem !important;
}
.pt-md-4,
.py-md-4 {
padding-top: 1.5rem !important;
}
.pr-md-4,
.px-md-4 {
padding-right: 1.5rem !important;
}
.pb-md-4,
.py-md-4 {
padding-bottom: 1.5rem !important;
}
.pl-md-4,
.px-md-4 {
padding-left: 1.5rem !important;
}
.p-md-5 {
padding: 3rem !important;
}
.pt-md-5,
.py-md-5 {
padding-top: 3rem !important;
}
.pr-md-5,
.px-md-5 {
padding-right: 3rem !important;
}
.pb-md-5,
.py-md-5 {
padding-bottom: 3rem !important;
}
.pl-md-5,
.px-md-5 {
padding-left: 3rem !important;
}
.m-md-n1 {
margin: -0.25rem !important;
}
.mt-md-n1,
.my-md-n1 {
margin-top: -0.25rem !important;
}
.mr-md-n1,
.mx-md-n1 {
margin-right: -0.25rem !important;
}
.mb-md-n1,
.my-md-n1 {
margin-bottom: -0.25rem !important;
}
.ml-md-n1,
.mx-md-n1 {
margin-left: -0.25rem !important;
}
.m-md-n2 {
margin: -0.5rem !important;
}
.mt-md-n2,
.my-md-n2 {
margin-top: -0.5rem !important;
}
.mr-md-n2,
.mx-md-n2 {
margin-right: -0.5rem !important;
}
.mb-md-n2,
.my-md-n2 {
margin-bottom: -0.5rem !important;
}
.ml-md-n2,
.mx-md-n2 {
margin-left: -0.5rem !important;
}
.m-md-n3 {
margin: -1rem !important;
}
.mt-md-n3,
.my-md-n3 {
margin-top: -1rem !important;
}
.mr-md-n3,
.mx-md-n3 {
margin-right: -1rem !important;
}
.mb-md-n3,
.my-md-n3 {
margin-bottom: -1rem !important;
}
.ml-md-n3,
.mx-md-n3 {
margin-left: -1rem !important;
}
.m-md-n4 {
margin: -1.5rem !important;
}
.mt-md-n4,
.my-md-n4 {
margin-top: -1.5rem !important;
}
.mr-md-n4,
.mx-md-n4 {
margin-right: -1.5rem !important;
}
.mb-md-n4,
.my-md-n4 {
margin-bottom: -1.5rem !important;
}
.ml-md-n4,
.mx-md-n4 {
margin-left: -1.5rem !important;
}
.m-md-n5 {
margin: -3rem !important;
}
.mt-md-n5,
.my-md-n5 {
margin-top: -3rem !important;
}
.mr-md-n5,
.mx-md-n5 {
margin-right: -3rem !important;
}
.mb-md-n5,
.my-md-n5 {
margin-bottom: -3rem !important;
}
.ml-md-n5,
.mx-md-n5 {
margin-left: -3rem !important;
}
.m-md-auto {
margin: auto !important;
}
.mt-md-auto,
.my-md-auto {
margin-top: auto !important;
}
.mr-md-auto,
.mx-md-auto {
margin-right: auto !important;
}
.mb-md-auto,
.my-md-auto {
margin-bottom: auto !important;
}
.ml-md-auto,
.mx-md-auto {
margin-left: auto !important;
}
}
@media (min-width: 992px) {
.m-lg-0 {
margin: 0 !important;
}
.mt-lg-0,
.my-lg-0 {
margin-top: 0 !important;
}
.mr-lg-0,
.mx-lg-0 {
margin-right: 0 !important;
}
.mb-lg-0,
.my-lg-0 {
margin-bottom: 0 !important;
}
.ml-lg-0,
.mx-lg-0 {
margin-left: 0 !important;
}
.m-lg-1 {
margin: 0.25rem !important;
}
.mt-lg-1,
.my-lg-1 {
margin-top: 0.25rem !important;
}
.mr-lg-1,
.mx-lg-1 {
margin-right: 0.25rem !important;
}
.mb-lg-1,
.my-lg-1 {
margin-bottom: 0.25rem !important;
}
.ml-lg-1,
.mx-lg-1 {
margin-left: 0.25rem !important;
}
.m-lg-2 {
margin: 0.5rem !important;
}
.mt-lg-2,
.my-lg-2 {
margin-top: 0.5rem !important;
}
.mr-lg-2,
.mx-lg-2 {
margin-right: 0.5rem !important;
}
.mb-lg-2,
.my-lg-2 {
margin-bottom: 0.5rem !important;
}
.ml-lg-2,
.mx-lg-2 {
margin-left: 0.5rem !important;
}
.m-lg-3 {
margin: 1rem !important;
}
.mt-lg-3,
.my-lg-3 {
margin-top: 1rem !important;
}
.mr-lg-3,
.mx-lg-3 {
margin-right: 1rem !important;
}
.mb-lg-3,
.my-lg-3 {
margin-bottom: 1rem !important;
}
.ml-lg-3,
.mx-lg-3 {
margin-left: 1rem !important;
}
.m-lg-4 {
margin: 1.5rem !important;
}
.mt-lg-4,
.my-lg-4 {
margin-top: 1.5rem !important;
}
.mr-lg-4,
.mx-lg-4 {
margin-right: 1.5rem !important;
}
.mb-lg-4,
.my-lg-4 {
margin-bottom: 1.5rem !important;
}
.ml-lg-4,
.mx-lg-4 {
margin-left: 1.5rem !important;
}
.m-lg-5 {
margin: 3rem !important;
}
.mt-lg-5,
.my-lg-5 {
margin-top: 3rem !important;
}
.mr-lg-5,
.mx-lg-5 {
margin-right: 3rem !important;
}
.mb-lg-5,
.my-lg-5 {
margin-bottom: 3rem !important;
}
.ml-lg-5,
.mx-lg-5 {
margin-left: 3rem !important;
}
.p-lg-0 {
padding: 0 !important;
}
.pt-lg-0,
.py-lg-0 {
padding-top: 0 !important;
}
.pr-lg-0,
.px-lg-0 {
padding-right: 0 !important;
}
.pb-lg-0,
.py-lg-0 {
padding-bottom: 0 !important;
}
.pl-lg-0,
.px-lg-0 {
padding-left: 0 !important;
}
.p-lg-1 {
padding: 0.25rem !important;
}
.pt-lg-1,
.py-lg-1 {
padding-top: 0.25rem !important;
}
.pr-lg-1,
.px-lg-1 {
padding-right: 0.25rem !important;
}
.pb-lg-1,
.py-lg-1 {
padding-bottom: 0.25rem !important;
}
.pl-lg-1,
.px-lg-1 {
padding-left: 0.25rem !important;
}
.p-lg-2 {
padding: 0.5rem !important;
}
.pt-lg-2,
.py-lg-2 {
padding-top: 0.5rem !important;
}
.pr-lg-2,
.px-lg-2 {
padding-right: 0.5rem !important;
}
.pb-lg-2,
.py-lg-2 {
padding-bottom: 0.5rem !important;
}
.pl-lg-2,
.px-lg-2 {
padding-left: 0.5rem !important;
}
.p-lg-3 {
padding: 1rem !important;
}
.pt-lg-3,
.py-lg-3 {
padding-top: 1rem !important;
}
.pr-lg-3,
.px-lg-3 {
padding-right: 1rem !important;
}
.pb-lg-3,
.py-lg-3 {
padding-bottom: 1rem !important;
}
.pl-lg-3,
.px-lg-3 {
padding-left: 1rem !important;
}
.p-lg-4 {
padding: 1.5rem !important;
}
.pt-lg-4,
.py-lg-4 {
padding-top: 1.5rem !important;
}
.pr-lg-4,
.px-lg-4 {
padding-right: 1.5rem !important;
}
.pb-lg-4,
.py-lg-4 {
padding-bottom: 1.5rem !important;
}
.pl-lg-4,
.px-lg-4 {
padding-left: 1.5rem !important;
}
.p-lg-5 {
padding: 3rem !important;
}
.pt-lg-5,
.py-lg-5 {
padding-top: 3rem !important;
}
.pr-lg-5,
.px-lg-5 {
padding-right: 3rem !important;
}
.pb-lg-5,
.py-lg-5 {
padding-bottom: 3rem !important;
}
.pl-lg-5,
.px-lg-5 {
padding-left: 3rem !important;
}
.m-lg-n1 {
margin: -0.25rem !important;
}
.mt-lg-n1,
.my-lg-n1 {
margin-top: -0.25rem !important;
}
.mr-lg-n1,
.mx-lg-n1 {
margin-right: -0.25rem !important;
}
.mb-lg-n1,
.my-lg-n1 {
margin-bottom: -0.25rem !important;
}
.ml-lg-n1,
.mx-lg-n1 {
margin-left: -0.25rem !important;
}
.m-lg-n2 {
margin: -0.5rem !important;
}
.mt-lg-n2,
.my-lg-n2 {
margin-top: -0.5rem !important;
}
.mr-lg-n2,
.mx-lg-n2 {
margin-right: -0.5rem !important;
}
.mb-lg-n2,
.my-lg-n2 {
margin-bottom: -0.5rem !important;
}
.ml-lg-n2,
.mx-lg-n2 {
margin-left: -0.5rem !important;
}
.m-lg-n3 {
margin: -1rem !important;
}
.mt-lg-n3,
.my-lg-n3 {
margin-top: -1rem !important;
}
.mr-lg-n3,
.mx-lg-n3 {
margin-right: -1rem !important;
}
.mb-lg-n3,
.my-lg-n3 {
margin-bottom: -1rem !important;
}
.ml-lg-n3,
.mx-lg-n3 {
margin-left: -1rem !important;
}
.m-lg-n4 {
margin: -1.5rem !important;
}
.mt-lg-n4,
.my-lg-n4 {
margin-top: -1.5rem !important;
}
.mr-lg-n4,
.mx-lg-n4 {
margin-right: -1.5rem !important;
}
.mb-lg-n4,
.my-lg-n4 {
margin-bottom: -1.5rem !important;
}
.ml-lg-n4,
.mx-lg-n4 {
margin-left: -1.5rem !important;
}
.m-lg-n5 {
margin: -3rem !important;
}
.mt-lg-n5,
.my-lg-n5 {
margin-top: -3rem !important;
}
.mr-lg-n5,
.mx-lg-n5 {
margin-right: -3rem !important;
}
.mb-lg-n5,
.my-lg-n5 {
margin-bottom: -3rem !important;
}
.ml-lg-n5,
.mx-lg-n5 {
margin-left: -3rem !important;
}
.m-lg-auto {
margin: auto !important;
}
.mt-lg-auto,
.my-lg-auto {
margin-top: auto !important;
}
.mr-lg-auto,
.mx-lg-auto {
margin-right: auto !important;
}
.mb-lg-auto,
.my-lg-auto {
margin-bottom: auto !important;
}
.ml-lg-auto,
.mx-lg-auto {
margin-left: auto !important;
}
}
@media (min-width: 1200px) {
.m-xl-0 {
margin: 0 !important;
}
.mt-xl-0,
.my-xl-0 {
margin-top: 0 !important;
}
.mr-xl-0,
.mx-xl-0 {
margin-right: 0 !important;
}
.mb-xl-0,
.my-xl-0 {
margin-bottom: 0 !important;
}
.ml-xl-0,
.mx-xl-0 {
margin-left: 0 !important;
}
.m-xl-1 {
margin: 0.25rem !important;
}
.mt-xl-1,
.my-xl-1 {
margin-top: 0.25rem !important;
}
.mr-xl-1,
.mx-xl-1 {
margin-right: 0.25rem !important;
}
.mb-xl-1,
.my-xl-1 {
margin-bottom: 0.25rem !important;
}
.ml-xl-1,
.mx-xl-1 {
margin-left: 0.25rem !important;
}
.m-xl-2 {
margin: 0.5rem !important;
}
.mt-xl-2,
.my-xl-2 {
margin-top: 0.5rem !important;
}
.mr-xl-2,
.mx-xl-2 {
margin-right: 0.5rem !important;
}
.mb-xl-2,
.my-xl-2 {
margin-bottom: 0.5rem !important;
}
.ml-xl-2,
.mx-xl-2 {
margin-left: 0.5rem !important;
}
.m-xl-3 {
margin: 1rem !important;
}
.mt-xl-3,
.my-xl-3 {
margin-top: 1rem !important;
}
.mr-xl-3,
.mx-xl-3 {
margin-right: 1rem !important;
}
.mb-xl-3,
.my-xl-3 {
margin-bottom: 1rem !important;
}
.ml-xl-3,
.mx-xl-3 {
margin-left: 1rem !important;
}
.m-xl-4 {
margin: 1.5rem !important;
}
.mt-xl-4,
.my-xl-4 {
margin-top: 1.5rem !important;
}
.mr-xl-4,
.mx-xl-4 {
margin-right: 1.5rem !important;
}
.mb-xl-4,
.my-xl-4 {
margin-bottom: 1.5rem !important;
}
.ml-xl-4,
.mx-xl-4 {
margin-left: 1.5rem !important;
}
.m-xl-5 {
margin: 3rem !important;
}
.mt-xl-5,
.my-xl-5 {
margin-top: 3rem !important;
}
.mr-xl-5,
.mx-xl-5 {
margin-right: 3rem !important;
}
.mb-xl-5,
.my-xl-5 {
margin-bottom: 3rem !important;
}
.ml-xl-5,
.mx-xl-5 {
margin-left: 3rem !important;
}
.p-xl-0 {
padding: 0 !important;
}
.pt-xl-0,
.py-xl-0 {
padding-top: 0 !important;
}
.pr-xl-0,
.px-xl-0 {
padding-right: 0 !important;
}
.pb-xl-0,
.py-xl-0 {
padding-bottom: 0 !important;
}
.pl-xl-0,
.px-xl-0 {
padding-left: 0 !important;
}
.p-xl-1 {
padding: 0.25rem !important;
}
.pt-xl-1,
.py-xl-1 {
padding-top: 0.25rem !important;
}
.pr-xl-1,
.px-xl-1 {
padding-right: 0.25rem !important;
}
.pb-xl-1,
.py-xl-1 {
padding-bottom: 0.25rem !important;
}
.pl-xl-1,
.px-xl-1 {
padding-left: 0.25rem !important;
}
.p-xl-2 {
padding: 0.5rem !important;
}
.pt-xl-2,
.py-xl-2 {
padding-top: 0.5rem !important;
}
.pr-xl-2,
.px-xl-2 {
padding-right: 0.5rem !important;
}
.pb-xl-2,
.py-xl-2 {
padding-bottom: 0.5rem !important;
}
.pl-xl-2,
.px-xl-2 {
padding-left: 0.5rem !important;
}
.p-xl-3 {
padding: 1rem !important;
}
.pt-xl-3,
.py-xl-3 {
padding-top: 1rem !important;
}
.pr-xl-3,
.px-xl-3 {
padding-right: 1rem !important;
}
.pb-xl-3,
.py-xl-3 {
padding-bottom: 1rem !important;
}
.pl-xl-3,
.px-xl-3 {
padding-left: 1rem !important;
}
.p-xl-4 {
padding: 1.5rem !important;
}
.pt-xl-4,
.py-xl-4 {
padding-top: 1.5rem !important;
}
.pr-xl-4,
.px-xl-4 {
padding-right: 1.5rem !important;
}
.pb-xl-4,
.py-xl-4 {
padding-bottom: 1.5rem !important;
}
.pl-xl-4,
.px-xl-4 {
padding-left: 1.5rem !important;
}
.p-xl-5 {
padding: 3rem !important;
}
.pt-xl-5,
.py-xl-5 {
padding-top: 3rem !important;
}
.pr-xl-5,
.px-xl-5 {
padding-right: 3rem !important;
}
.pb-xl-5,
.py-xl-5 {
padding-bottom: 3rem !important;
}
.pl-xl-5,
.px-xl-5 {
padding-left: 3rem !important;
}
.m-xl-n1 {
margin: -0.25rem !important;
}
.mt-xl-n1,
.my-xl-n1 {
margin-top: -0.25rem !important;
}
.mr-xl-n1,
.mx-xl-n1 {
margin-right: -0.25rem !important;
}
.mb-xl-n1,
.my-xl-n1 {
margin-bottom: -0.25rem !important;
}
.ml-xl-n1,
.mx-xl-n1 {
margin-left: -0.25rem !important;
}
.m-xl-n2 {
margin: -0.5rem !important;
}
.mt-xl-n2,
.my-xl-n2 {
margin-top: -0.5rem !important;
}
.mr-xl-n2,
.mx-xl-n2 {
margin-right: -0.5rem !important;
}
.mb-xl-n2,
.my-xl-n2 {
margin-bottom: -0.5rem !important;
}
.ml-xl-n2,
.mx-xl-n2 {
margin-left: -0.5rem !important;
}
.m-xl-n3 {
margin: -1rem !important;
}
.mt-xl-n3,
.my-xl-n3 {
margin-top: -1rem !important;
}
.mr-xl-n3,
.mx-xl-n3 {
margin-right: -1rem !important;
}
.mb-xl-n3,
.my-xl-n3 {
margin-bottom: -1rem !important;
}
.ml-xl-n3,
.mx-xl-n3 {
margin-left: -1rem !important;
}
.m-xl-n4 {
margin: -1.5rem !important;
}
.mt-xl-n4,
.my-xl-n4 {
margin-top: -1.5rem !important;
}
.mr-xl-n4,
.mx-xl-n4 {
margin-right: -1.5rem !important;
}
.mb-xl-n4,
.my-xl-n4 {
margin-bottom: -1.5rem !important;
}
.ml-xl-n4,
.mx-xl-n4 {
margin-left: -1.5rem !important;
}
.m-xl-n5 {
margin: -3rem !important;
}
.mt-xl-n5,
.my-xl-n5 {
margin-top: -3rem !important;
}
.mr-xl-n5,
.mx-xl-n5 {
margin-right: -3rem !important;
}
.mb-xl-n5,
.my-xl-n5 {
margin-bottom: -3rem !important;
}
.ml-xl-n5,
.mx-xl-n5 {
margin-left: -3rem !important;
}
.m-xl-auto {
margin: auto !important;
}
.mt-xl-auto,
.my-xl-auto {
margin-top: auto !important;
}
.mr-xl-auto,
.mx-xl-auto {
margin-right: auto !important;
}
.mb-xl-auto,
.my-xl-auto {
margin-bottom: auto !important;
}
.ml-xl-auto,
.mx-xl-auto {
margin-left: auto !important;
}
}
/**
* STYLES IMPORTES DE BOOTSTRAP
*/
@import "~bootswatch/dist/lumen/variables";
@import "~bootstrap/scss/bootstrap";
@import "~bootstrap/scss/bootstrap-grid";
@import "~bootswatch/dist/lumen/bootswatch";
// @import "~bootstrap/scss/bootstrap-grid";
/**
* STYLES DE L'APPLICATION DE L'OUTIL DE GESTION DE MONNAIE LOCALE COMPLEMENTAIRE
......
......@@ -6,7 +6,8 @@
*/
// any CSS you require will output into a single css file (app.css in this case)
// require('../css/admin.css');
require('../css/admin.css');
require('bootstrap');
require('../js/flash-messages.js');
// Need jQuery? Install it with "yarn add jquery", then uncomment to require it.
// var $ = require('jquery');
$('#flash-messages').flashNotification('init');
\ No newline at end of file
......@@ -22,7 +22,7 @@ global.$ = global.jQuery = $;
require('bootstrap');
// require('../css/lumen/_variables.scss');
// require('../css/lumen/_bootswatch.scss');
require('../css/lumen/bootstrap.min.css');
// require('../css/lumen/bootstrap.min.css');
// require('../leaflet/leaflet.css');
......@@ -34,6 +34,48 @@ const mlc = require('../js/mlc.js');
// require('../../public/bundles/pixsortablebehavior/js/init.js');
$('#flash-messages').flashNotification('init');
$(function () {
var $collectionHolder;
// setup an "add a groupe presta (marché amap" link
var $addGroupeButton = $('<button type="button" class="add_groupe_link">Ajouter AMAP / Marché</button>');
var $newLinkLi = $('<p></p>').append($addGroupeButton);
/* */
function addGroupeForm($collectionHolder, $newLinkLi) {
// Get the data-prototype explained earlier
var prototype = $collectionHolder.data('prototype');
// get the new index
var index = $collectionHolder.data('index');
// Replace '__name__' in the prototype's HTML to
// instead be a number based on how many items we have
var newForm = prototype.replace(/__name__/g, index);
// increase the index with one for the next item
$collectionHolder.data('index', index + 1);
// Display the form in the page in an li, before the "Add a groupe" link li
var $newFormLi = $('<p></p>').append(newForm);
$newLinkLi.before($newFormLi);
}
jQuery(document).ready(function() {
// Get the ul that holds the collection of groupes
$collectionHolder = $('.groupeprestas');
// add the "add a groupe" anchor and li to the groupes ul
$collectionHolder.append($newLinkLi);
// count the current form inputs we have (e.g. 2), use that as the new
// index when inserting a new item (e.g. 2)
$collectionHolder.data('index', $collectionHolder.find(':input').length);
$addGroupeButton.on('click', function(e) {
// add a new groupe form (see next code block)
addGroupeForm($collectionHolder, $newLinkLi);
});
// BOOTSTRAP TOOLTIPS
$('[data-toggle="tooltip"]').tooltip()
})
});
......@@ -124,7 +124,7 @@ api_platform:
# get: ~
# post: ~
# put: ~
# App\Entity\TransfertPrestataireSiege:
# App\Entity\TransfertPrestataireComptoir:
# get: ~
# post: ~
# put: ~
......
......@@ -21,7 +21,7 @@ sonata_admin:
# action: '@SonataAdmin/CRUD/action.html.twig'
# select: '@SonataAdmin/CRUD/list__select.html.twig'
# filter: '@SonataAdmin/Form/filter_admin_fields.html.twig'
# dashboard: '@SonataAdmin/Core/dashboard.html.twig'
dashboard: '@SonataAdmin/dashboard.html.twig'
# search: '@SonataAdmin/Core/search.html.twig'
# batch_confirmation: '@SonataAdmin/CRUD/batch_confirmation.html.twig'
# inner_list_row: '@SonataAdmin/CRUD/list_inner_row.html.twig'
......
framework:
# ide: 'myide://open?url=file://%%f&line=%%l'
ide: sublime
test: true
session:
storage_id: session.storage.mock_file
......@@ -7,6 +7,7 @@ parameters:
locale: 'en'
sonata.user.admin.user.controller: 'App\Controller\CRUD\CRUDController'
sonata.media.admin.media.class: 'App\Admin\MediaAdmin'
mlc_title: 'Outil de gestion de monnaie locale complémentaire' # Nom complet (< 100 caractères)
mlc_name: 'Monnaie locale complémentaire' # Nom complet (< 100 caractères)
mlc_name_small: 'MLC' # Nom court (< 25 caractères)
slogan: 'Un outil de gestion de la MLC' # Slogan (< 200 caractères)
......@@ -238,6 +239,8 @@ services:
group: "Contenu"
label: "Rubriques"
public: true
calls:
- [ setSecurity, ['@security.helper']]
admin.faq.gerer:
class: App\Admin\FaqAdmin
......
......@@ -595,7 +595,7 @@ App\Entity\TransfertPrestataireComptoir:
createdAt: '<dateTimeBetween("-200 days", "now")>'
parenttype: 'transfert'
App\Entity\TransfertPrestataireSiege:
tre_pre_cpt{2..11}:
tre_pre_sie{2..11}:
operateur: '@userp<current()>'
type: 'prestataire_siege'
reference: 'test'
......
......@@ -1613,6 +1613,11 @@
"resolved": "https://registry.npmjs.org/bootstrap/-/bootstrap-4.2.1.tgz",
"integrity": "sha512-tt/7vIv3Gm2mnd/WeDx36nfGGHleil0Wg8IeB7eMrVkY0fZ5iTaBisSh8oNANc2IBsCc6vCgCNTIM/IEN0+50Q=="
},
"bootswatch": {
"version": "4.3.1",
"resolved": "https://registry.npmjs.org/bootswatch/-/bootswatch-4.3.1.tgz",
"integrity": "sha512-kNdpo/TnhO++aic1IODLIe1V0lx6pXwHMpwXMacpANDnuVDtgU1MUgUbVMC3rSWm4UcbImfwPraNYgjKDT0BtA=="
},
"brace-expansion": {
"version": "1.1.11",
"resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz",
......
......@@ -15,6 +15,7 @@
},
"dependencies": {
"bootstrap": "^4.2.1",
"bootswatch": "^4.3.1",
"jquery": "^3.3.1",
"popper.js": "^1.14.7"
}
......
......@@ -84,7 +84,7 @@ class CotisationAdherentAdmin extends CotisationAdmin
->add('expediteur', EntityType::class, array(
'label' => 'Expéditeur',
'class' => Adherent::class,
'choices' => $this->getConfigurationPool()->getContainer()->get('doctrine')->getRepository(Adherent::class)->findBy(array('enabled' => true)),
'choices' => $this->getConfigurationPool()->getContainer()->get('doctrine')->getRepository(Adherent::class)->findBy(array('enabled' => true), array('lastname'=> 'ASC')),
'placeholder' => 'Choisir un adhérent',
'required' => true,
))
......
......@@ -86,7 +86,7 @@ class CotisationPrestataireAdmin extends CotisationAdmin
->add('expediteur', EntityType::class, array(
'label' => 'Expéditeur',
'class' => Prestataire::class,
'choices' => $this->getConfigurationPool()->getContainer()->get('doctrine')->getRepository(Prestataire::class)->findBy(array('enabled' => true)),
'choices' => $this->getConfigurationPool()->getContainer()->get('doctrine')->getRepository(Prestataire::class)->findBy(array('enabled' => true), array('raison'=> 'ASC')),
'placeholder' => 'Choisir un prestataire',
'required' => true,
))
......
......@@ -99,6 +99,7 @@ class GroupeAdmin extends AbstractAdmin
unset($this->listModes['mosaic']);
$listMapper
->addIdentifier('name', null, array('label' => 'Nom du groupe'))
->addIdentifier('gestionnaires', null, array('label' => 'Gestionnaires'))
->addIdentifier('content', 'html', array('truncate' => array('length' => 80), 'label' => 'Description'))
->addIdentifier('compte', null, array('label' => 'Solde'))
->add(
......
......@@ -2,13 +2,20 @@
namespace App\Admin;
use App\Entity\Prestataire;
use App\Enum\GroupePrestaEnum;
use FOS\CKEditorBundle\Form\Type\CKEditorType;
use Sonata\AdminBundle\Admin\AbstractAdmin;
use Sonata\AdminBundle\Datagrid\DatagridMapper;
use Sonata\AdminBundle\Datagrid\ListMapper;
use Sonata\AdminBundle\Form\FormMapper;
use Sonata\AdminBundle\Route\RouteCollection;
use Sonata\AdminBundle\Show\ShowMapper;
use Sonata\MediaBundle\Form\Type\MediaType;
use Symfony\Bridge\Doctrine\Form\Type\EntityType;
use Symfony\Component\Form\Extension\Core\Type\CheckboxType;
use Symfony\Component\Form\Extension\Core\Type\ChoiceType;
use Symfony\Component\Form\Extension\Core\Type\CollectionType;
use Symfony\Component\Form\Extension\Core\Type\TextType;
use Symfony\Component\Form\Extension\Core\Type\TextareaType;
use Symfony\Component\Security\Core\Security;
......@@ -23,6 +30,11 @@ class GroupeprestataireAdmin extends AbstractAdmin
'_sort_by' => 'updatedAt',
];
public function configure()
{
parent::configure();
}
public function setSecurity(Security $security)
{
$this->security = $security;
......@@ -39,18 +51,14 @@ class GroupeprestataireAdmin extends AbstractAdmin
if (empty($user->getGroupesgere())) {
$query->andWhere('false');
} else {
$groupe = $user->getGroupesgere();
$em = $this->getConfigurationPool()->getContainer()->get('doctrine')->getEntityManager();
$connection = $em->getConnection();
$statement = $connection->prepare('SELECT f.id FROM flux f INNER JOIN adherent a ON (a.id = f.prestataire_id OR a.id = f.prestataire_dest_id) WHERE a.groupe_id = '.$groupe->getId());
$statement->execute();
$ids = $statement->fetchAll();
$query
->andWhere($query->expr()->in($query->getRootAliases()[0].'.id', ':ids'))
->setParameter('ids', $ids)
->andWhere($query->getRootAliases()[0].'.groupe = :groupe')
->setParameter('groupe', $user->getGroupesgere())
;
}
}
// dump($query->getQuery());
// exit();
return $query;
}
......@@ -60,29 +68,74 @@ class GroupeprestataireAdmin extends AbstractAdmin
*/
protected function configureFormFields(FormMapper $formMapper)
{
$user = $this->security->getUser();
$prestataires = $this->getConfigurationPool()->getContainer()->get('doctrine')->getRepository(Prestataire::class)->findBy(array('enabled' => true));
$groupepresta = $this->getSubject();
if ($this->isCurrentRoute('create') && $user->getGroupesgere() != null) {
$groupepresta->setGroupe($user->getGroupesgere());
}
$formMapper
->add('type', TextType::class, array(
'label' => 'Type (marche/amap) :',
'required' => true
->with('Informations', ['class' => 'col-md-7'])
->add('type', ChoiceType::class, array(
'required' => true,
'choices' => GroupePrestaEnum::getAvailableTypes(),
'choice_label' => function ($choice) {
return GroupePrestaEnum::getTypeName($choice);
},
))
->add('name', TextType::class, array(
'label' => 'Nom du groupe :',
'required' => true
))
->add('content', CKEditorType::class, array(
'label' => 'Texte',
'required' => false,
;
if (($user->isGranted('ROLE_GESTION_GROUPE') || $user->isGranted('ROLE_CONTACT')) && $this->security->getUser()->getGroupesgere() != null) {
$prestataires = $this->getConfigurationPool()->getContainer()->get('doctrine')->getRepository(Prestataire::class)->findBy(array('enabled' => true, 'groupe' => $this->security->getUser()->getGroupesgere()));
}
if ($user->isGranted('ROLE_SUPER_ADMIN') || $user->isGranted('ROLE_ADMIN_SIEGE')) {
$formMapper
->add('groupe', null, array(
'label' => 'Groupe local',
'required' => true,
))
->add('horaires', TextareaType::class, array(
;
}
$formMapper
->add('horaires', CKEditorType::class, array(
'label' => 'Horaires :',
'required' => false
))
->add('content', CKEditorType::class, array(
'label' => 'Texte',
'required' => false,
))
->add('enabled', CheckboxType::class, array(
'label' => 'Activé ?',
'required' => false,
'label_attr' => array('class' => 'checkbox-inline')
))
->end()
->with('Image', ['class' => 'col-md-5'])
->add('image', MediaType::class, array(
'provider' => 'sonata.media.provider.image',
'context' => 'groupe',
'label' => 'Image'
))
->end()
->with('Prestataires', ['class' => 'col-md-5'])
->add('prestataires', CollectionType::class, array(
'label' => 'Prestataires',
'entry_type' => EntityType::class,
'entry_options' => array(
'class' => Prestataire::class,
'choices' => $prestataires,
// 'choice_label' => 'name',
'placeholder' => 'Choisir un prestataire',
'required' => false,
'label' => false),
'by_reference' => false,
'allow_add' => true,
'allow_delete' => true
))
;
}
......@@ -91,7 +144,15 @@ class GroupeprestataireAdmin extends AbstractAdmin
*/
protected function configureListFields(ListMapper $listMapper)
{
$user = $this->security->getUser();
unset($this->listModes['mosaic']);
if ($user->isGranted('ROLE_SUPER_ADMIN') || $user->isGranted('ROLE_ADMIN_SIEGE')) {
$listMapper
->addIdentifier('groupe', null, array(
'label' => 'Groupe gestionnaire'
))
;
}
$listMapper
->addIdentifier('name', null, array(
'label' => 'Nom du groupe'
......@@ -121,6 +182,27 @@ class GroupeprestataireAdmin extends AbstractAdmin
;
}
protected function configureRoutes(RouteCollection $collection)
{
parent::configureRoutes($collection);
$collection->remove('delete');
}
public function getBatchActions()
{
$actions = parent::getBatchActions();
unset($actions['delete']);
return $actions;
}
public function getDashboardActions()
{
$actions = parent::getDashboardActions();
unset($actions['list']);
return $actions;
}
// @TODO : NE FONCTIONNE PAS : pour pouvoir classer par nombre de prestataires !
// voir https://github.com/sonata-project/SonataDoctrineORMAdminBundle/issues/297
// public function createQuery($context = 'list')
......
......@@ -59,6 +59,31 @@ class PrestataireAdmin extends AbstractAdmin
parent::configure();
}
/**
* {@inheritdoc}
*/
public function createQuery($context = 'list')
{
$user = $this->security->getUser();
$query = parent::createQuery($context);
$query
->innerJoin($query->getRootAliases()[0] .'.user', 'u')
->addSelect('u')
;
if ($user->isGranted('ROLE_GESTION_GROUPE') || $user->isGranted('ROLE_CONTACT')) {
if (empty($user->getGroupesgere())) {
$query->andWhere('false');
} else {
$groupe = $user->getGroupesgere();
$query
->andWhere($query->getRootAliases()[0] . '.groupe = :group')
->setParameter('group', $groupe)
;
}
}
return $query;
}
protected function configureSideMenu(MenuItemInterface $menu, $action, AdminInterface $childAdmin = null)
{
if (!$childAdmin && !in_array($action, ['edit', 'show'])) {
......@@ -414,29 +439,4 @@ class PrestataireAdmin extends AbstractAdmin
return $actions;
}
/**
* {@inheritdoc}
*/
public function createQuery($context = 'list')
{
$user = $this->security->getUser();
$query = parent::createQuery($context);
$query
->innerJoin($query->getRootAliases()[0] .'.user', 'u')
->addSelect('u')
;
if ($user->isGranted('ROLE_GESTION_GROUPE') || $user->isGranted('ROLE_CONTACT')) {
if (empty($user->getGroupesgere())) {
$query->andWhere('false');
} else {
$groupe = $user->getGroupesgere();
$query
->andWhere($query->getRootAliases()[0] . '.groupe = :group')
->setParameter('group', $groupe)
;
}
}
return $query;
}
}
......@@ -16,19 +16,24 @@ use Symfony\Component\Form\Extension\Core\Type\CheckboxType;
use Symfony\Component\Form\Extension\Core\Type\CollectionType;
use Symfony\Component\Form\Extension\Core\Type\HiddenType;
use Symfony\Component\Form\Extension\Core\Type\TextType;
use Symfony\Component\Security\Core\Security;
class RubriqueAdmin extends AbstractAdmin
{
protected $security;
protected $datagridValues = [
'_sort_order' => 'ASC',
'_sort_by' => 'name',
];
/**
* {@inheritdoc}
*/
protected function configureShowFields(ShowMapper $showMapper)
public function configure()
{
parent::configure();
}
public function setSecurity(Security $security)
{
$this->security = $security;
}
/**
......@@ -36,6 +41,11 @@ class RubriqueAdmin extends AbstractAdmin
*/
protected function configureFormFields(FormMapper $formMapper)
{
$user = $this->security->getUser();
$prestataires = $this->getConfigurationPool()->getContainer()->get('doctrine')->getRepository(Prestataire::class)->findBy(array('enabled' => true));
// if (($user->isGranted('ROLE_GESTION_GROUPE') || $user->isGranted('ROLE_CONTACT')) && $this->security->getUser()->getGroupesgere() != null) {
// $prestataires = $this->getConfigurationPool()->getContainer()->get('doctrine')->getRepository(Prestataire::class)->findBy(array('enabled' => true, 'groupe' => $this->security->getUser()->getGroupesgere()));
// }
$groupe = $this->getSubject();
$formMapper
->with("Création d'une rubrique")
......@@ -52,7 +62,7 @@ class RubriqueAdmin extends AbstractAdmin
'entry_type' => EntityType::class,
'entry_options' => array(
'class' => Prestataire::class,
'choices' => $this->getConfigurationPool()->getContainer()->get('doctrine')->getRepository(Prestataire::class)->findBy(array('enabled' => true)),
'choices' => $prestataires,
// 'choice_label' => 'name',
'placeholder' => 'Choisir un prestataire',
'required' => false,
......@@ -75,6 +85,14 @@ class RubriqueAdmin extends AbstractAdmin
$collection->remove('delete');
}
// public function getBatchActions()
// {
// $actions = parent::getBatchActions();
// unset($actions['delete']);
// return $actions;
// }
/**
* {@inheritdoc}
*/
......
......@@ -53,8 +53,7 @@ class TransfertAdmin extends FluxAdmin
->setParameter('ids', $ids)
;
}
}
if ($user->isGranted('ROLE_COMPTOIR')) {
} else if ($user->isGranted('ROLE_COMPTOIR')) {
if (empty($user->getComptoirsgere())) {
$query->andWhere('false');
} else {
......
......@@ -19,11 +19,11 @@ class GroupePrestaController extends AbstractController
}
/**
* @Route("/groupe/prestataires/{typeslug}/liste", name="groupepresta_liste")
* @Route("/groupe/prestataires/{type}/liste", name="groupepresta_liste")
*/
public function listeGroupePrestaAction($typeslug, Request $request)
public function listeGroupePrestaAction($type, Request $request)
{
$groupe = $this->em->getRepository(Groupeprestataire::class)->findBy(array('typeslug' => $typeslug, 'enabled' => true));
$groupe = $this->em->getRepository(Groupeprestataire::class)->findBy(array('type' => $type, 'enabled' => true));
if (empty($groupes)) {
return $this->redirectToRoute('index');
}
......@@ -34,11 +34,11 @@ class GroupePrestaController extends AbstractController
}
/**
* @Route("/groupe/prestataires/{typeslug}/carte", name="groupepresta_carte")
* @Route("/groupe/prestataires/{type}/carte", name="groupepresta_carte")
*/
public function carteGroupePrestaAction($typeslug, Request $request)
public function carteGroupePrestaAction($type, Request $request)
{
$groupes = $this->em->getRepository(Groupeprestataire::class)->findBy(array('typeslug' => $typeslug, 'enabled' => true));
$groupes = $this->em->getRepository(Groupeprestataire::class)->findBy(array('type' => $type, 'enabled' => true));
if (empty($groupes)) {
return $this->redirectToRoute('index');
}
......
......@@ -41,12 +41,21 @@ class UserAdherentController extends AbstractController
$form->handleRequest($request);
if ($form->isSubmitted() && $form->isValid()) {
$this->em->persist($form->getData());
$this->em->flush();
$this->addFlash(
'success',
'Infos du prestataire modifiée !'
);
$referer = $request->headers->get('referer');
if ($referer && !$request->isXmlHttpRequest()) {
return $this->redirect($referer);
} elseif (!$request->isXmlHttpRequest()) {
return new Response('', Response::HTTP_BAD_REQUEST);
}
}
return $this->render('adherent/infos.html.twig', array(
'user' => $this->getUser(),
'form' => $form->createView()
));
return $this->redirectToRoute('index');
}
/**
......
<?php
namespace App\Controller;
use App\Entity\Adherent;
use App\Entity\Cotisation;
use App\Entity\Geoloc;
use App\Entity\Groupe;
use App\Entity\TransactionAdherentPrestataire;
use App\Entity\TransfertComptoirAdherent;
use App\Entity\TransfertPrestataireComptoir;
use App\Entity\Usergroup;
use App\Form\Type\AdherentInfosFormType;
use App\Form\Type\AdhererFormType;
use App\Form\Type\GroupeInfosFormType;
use App\Form\Type\TransactionAdherentPrestataireFormType;
use App\Form\Type\TransfertComptoirAdherentFormType;
use App\Form\Type\TransfertPrestataireComptoirFormType;
use Doctrine\ORM\EntityManagerInterface;
use FOS\UserBundle\Model\UserManagerInterface;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\IsGranted;
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\Routing\Annotation\Route;
class UserComptoirController extends AbstractController
{
protected $em;
protected $um;
public function __construct(EntityManagerInterface $em, UserManagerInterface $um)
{
$this->em = $em;
$this->um = $um;
}
/**
* @Route("/user/comptoir/infos", name="comptoir_infos")
* @IsGranted("ROLE_COMPTOIR")
*/
public function groupeInfosAction(Request $request)
{
$form = $this->createForm(ComptoirInfosFormType::class, $this->getUser()->getComptoirsgere());
$form->handleRequest($request);
if ($form->isSubmitted() && $form->isValid()) {
$data = $form->getData();
$this->em->persist($data);
$this->em->flush();
$this->addFlash(
'success',
'Comptoir bien modifié !'
);
$referer = $request->headers->get('referer');
if ($referer && !$request->isXmlHttpRequest()) {
return $this->redirect($referer);
} elseif (!$request->isXmlHttpRequest()) {
return new Response('', Response::HTTP_BAD_REQUEST);
}
}
return $this->redirectToRoute('index');
}
/**
* @Route("/user/comptoir/transfert/adherent/", name="transfertComptoirAdherent")
* @IsGranted("ROLE_COMPTOIR")
*/
public function transfertComptoirAdherentAction(Request $request)
{
$entity = new TransfertComptoirAdherent();
$entity->setOperateur($this->getUser());
$form = $this->createForm(TransfertComptoirAdherentFormType::class, $entity);
$form->handleRequest($request);
if ($form->isSubmitted() && $form->isValid()) {
$data = $form->getData();
$this->em->persist($data);
$this->em->flush();
$this->addFlash(
'success',
'Transfert bien effectuée !'
);
$referer = $request->headers->get('referer');
if ($referer && !$request->isXmlHttpRequest()) {
return $this->redirect($referer);
} elseif (!$request->isXmlHttpRequest()) {
return new Response('', Response::HTTP_BAD_REQUEST);
}
}
return $this->render('flux/transaction.html.twig', [
'form' => $form->createView(),
'compte' => $this->getUser()->getComptoirsgere()->getCompte(),
'title' => 'Transfert à un adhérent'
]);
}
/**
* @Route("/user/comptoir/reconversion/", name="transfertPrestataireComptoir")
* @IsGranted("ROLE_COMPTOIR")
*/
public function transfertPrestataireComptoirAction(Request $request)
{
$entity = new TransfertPrestataireComptoir();
$entity->setOperateur($this->getUser());
$form = $this->createForm(TransfertPrestataireComptoirFormType::class, $entity);
$form->handleRequest($request);
if ($form->isSubmitted() && $form->isValid()) {
$data = $form->getData();
$this->em->persist($data);
$this->em->flush();
$this->addFlash(
'success',
'Reconversion bien effectuée !'
);
$referer = $request->headers->get('referer');
if ($referer && !$request->isXmlHttpRequest()) {
return $this->redirect($referer);
} elseif (!$request->isXmlHttpRequest()) {
return new Response('', Response::HTTP_BAD_REQUEST);
}
}
return $this->render('flux/transaction.html.twig', [
'form' => $form->createView(),
'compte' => $this->getUser()->getComptoirsgere()->getCompte(),
'title' => "Reconversion d'un prestataire"
]);
}
}
<?php
namespace App\Controller;
use App\Entity\User;
use App\Form\Type\RegistrationFormType;
use Doctrine\ORM\EntityManagerInterface;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\IsGranted;
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\Routing\Annotation\Route;
class UserController extends AbstractController
{
private $em;
public function __construct(EntityManagerInterface $em)
{
$this->em = $em;
}
/**
* @Route("/userinfos", name="user_infos")
* @IsGranted("ROLE_USER")
*/
public function userInfosAction(Request $request)
{
$form = $this->createForm(RegistrationFormType::class, $this->getUser());
$form->handleRequest($request);
if ($form->isSubmitted() && $form->isValid()) {
$this->em->persist($form->getData());
$this->em->flush();
$this->addFlash(
'success',
"Infos de l'utilisateur modifiée !"
);
$referer = $request->headers->get('referer');
if ($referer && !$request->isXmlHttpRequest()) {
return $this->redirect($referer);
} elseif (!$request->isXmlHttpRequest()) {
return new Response('', Response::HTTP_BAD_REQUEST);
}
}
return $this->redirectToRoute('index');
// return $this->render('presta/infos.html.twig', array(
// 'form' => $form->createView()
// ));
}
}
......@@ -5,16 +5,19 @@ namespace App\Controller;
use App\Entity\Adherent;
use App\Entity\Cotisation;
use App\Entity\Geoloc;
use App\Entity\Groupe;
use App\Entity\TransactionAdherentPrestataire;
use App\Entity\TransfertGroupeComptoir;
use App\Entity\Usergroup;
use App\Form\Type\AdherentInfosFormType;
use App\Form\Type\AdhererFormType;
use App\Form\Type\GroupeInfosFormType;
use App\Form\Type\TransactionAdherentPrestataireFormType;
use App\Form\Type\TransfertGroupeComptoirFormType;
use Doctrine\ORM\EntityManagerInterface;
use FOS\UserBundle\Model\UserManagerInterface;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\IsGranted;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Security;
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
......@@ -32,21 +35,31 @@ class UserGestionnaireGroupeController extends AbstractController
}
/**
* @Route("/groupe/infos", name="groupe_infos")
* @IsGranted("ROLE_ADHERENT")
* @Route("/user/groupe/infos", name="groupe_infos")
* @Security("is_granted('ROLE_GESTION_GROUPE') or is_granted('ROLE_CONTACT')")
*/
public function groupeInfosAction(Request $request)
{
// $form = $this->createForm(AdherentInfosFormType::class, $this->getUser()->getAdherent());
// $form->handleRequest($request);
$form = $this->createForm(GroupeInfosFormType::class, $this->getUser()->getGroupesgere());
$form->handleRequest($request);
// if ($form->isSubmitted() && $form->isValid()) {
// }
if ($form->isSubmitted() && $form->isValid()) {
$data = $form->getData();
$this->em->persist($data);
$this->em->flush();
$this->addFlash(
'success',
'Groupe local bien modifié !'
);
$referer = $request->headers->get('referer');
if ($referer && !$request->isXmlHttpRequest()) {
return $this->redirect($referer);
} elseif (!$request->isXmlHttpRequest()) {
return new Response('', Response::HTTP_BAD_REQUEST);
}
}
// return $this->render('adherent/infos.html.twig', array(
// 'user' => $this->getUser(),
// 'form' => $form->createView()
// ));
return $this->redirectToRoute('index');
}
/**
......
......@@ -5,9 +5,12 @@ namespace App\Controller;
use App\Entity\Prestataire;
use App\Entity\Rubrique;
use App\Entity\TransactionPrestataireAdherent;
use App\Entity\TransfertPrestataireSiege;
use App\Entity\TypePrestataire;
use App\Form\Type\GroupePrestataireInscriptionFormType;
use App\Form\Type\PrestataireInfosFormType;
use App\Form\Type\TransactionPrestataireAdherentFormType;
use App\Form\Type\TransfertPrestataireSiegeFormType;
use Doctrine\ORM\EntityManagerInterface;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\IsGranted;
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
......@@ -35,12 +38,57 @@ class UserPrestataireController extends AbstractController
if ($form->isSubmitted() && $form->isValid()) {
$this->em->persist($form->getData());
$this->em->flush();
$this->addFlash(
'success',
'Infos du prestataire modifiée !'
);
$referer = $request->headers->get('referer');
if ($referer && !$request->isXmlHttpRequest()) {
return $this->redirect($referer);
} elseif (!$request->isXmlHttpRequest()) {
return new Response('', Response::HTTP_BAD_REQUEST);
}
}
return $this->redirectToRoute('index');
}
/**
* @Route("/prestatairegroupes/inscription", name="groupeprestataire_inscription")
* @IsGranted("ROLE_PRESTATAIRE")
*/
public function groupePrestataireInscriptionAction(Request $request)
{
$form = $this->createForm(GroupePrestataireInscriptionFormType::class, $this->getUser()->getPrestataire());
$form->handleRequest($request);
if ($form->isSubmitted() && $form->isValid()) {
$prestataire = $form->getData();
// $this->getUser()->getPrestataire()->setGroupeprestataires($prestataire->getGroupeprestataires()->getValues());
// dump($prestataire);
// exit();
// dump($this->getUser()->getPrestataire()->getGroupeprestataires());
// exit();
// $this->em->persist($this->getUser()->getPrestataire());
$this->em->persist($prestataire);
$this->em->flush();
$this->addFlash(
'success',
'Information bien prise en compte !'
);
if ($request->isXmlHttpRequest()) {
return new JsonResponse(array('status' => 'success'));
} else {
$referer = $request->headers->get('referer');
if ($referer && !$request->isXmlHttpRequest()) {
return $this->redirect($referer);
} elseif (!$request->isXmlHttpRequest()) {
return new Response('', Response::HTTP_BAD_REQUEST);
}
}
}
return $this->render('presta/infos.html.twig', array(
'user' => $this->getUser(),
'form' => $form->createView()
));
return $this->redirectToRoute('index');
}
/**
......@@ -80,4 +128,39 @@ class UserPrestataireController extends AbstractController
]);
}
/**
* @Route("/prestataire/transfert/siege/", name="transactionPrestataireSiege")
* @IsGranted("ROLE_PRESTATAIRE")
*/
public function transfertPrestataireSiegeAction(Request $request)
{
$entity = new TransfertPrestataireSiege();
$entity->setOperateur($this->getUser());
$entity->setExpediteur($this->getUser()->getPrestataire());
$form = $this->createForm(TransfertPrestataireSiegeFormType::class, $entity);
$form->handleRequest($request);
if ($form->isSubmitted() && $form->isValid()) {
$data = $form->getData();
$this->em->persist($data);
$this->em->flush();
$this->addFlash(
'success',
'Reconversion envoyée, elle sera validée lorsque le virement sera effectué !'
);
$referer = $request->headers->get('referer');
if ($referer && !$request->isXmlHttpRequest()) {
return $this->redirect($referer);
} elseif (!$request->isXmlHttpRequest()) {
return new Response('', Response::HTTP_BAD_REQUEST);
}
}
return $this->render('flux/transaction.html.twig', [
'form' => $form->createView(),
'compte' => $this->getUser()->getPrestataire()->getCompte(),
'title' => 'Reconversion de monnaie au siège'
]);
}
}
......@@ -39,7 +39,7 @@ class Adherent
/**
* @var Groupe $groupe
*
* @ORM\ManyToOne(targetEntity="App\Entity\Groupe", inversedBy="adherents")
* @ORM\ManyToOne(targetEntity="Groupe", inversedBy="adherents")
*/
private $groupe;
......
......@@ -248,6 +248,9 @@ abstract class Flux
if ($flux->getMontant() <= 0) {
throw new \Exception("[FLUX] Opération impossible ! Montant inférieur ou égal à zéro !");
}
if ($flux->getExpediteur() == $flux->getDestinataire()) {
throw new \Exception("[FLUX] Opération impossible ! Expediteur et destinataire sont les mêmes !");
}
$compteExp = $flux->getExpediteur()->getCompte() - $flux->getMontant();
if ($flux->getParenttype() != 'cotisation' || ($flux->getParenttype() == 'cotisation' && $flux->getMoyen() == MoyenEnum::MOYEN_MLC)) {
if ($compteExp < 0) {
......
......@@ -11,6 +11,7 @@ use App\Entity\EntityTrait\ContactEmailTelTrait;
use App\Entity\EntityTrait\EnablableEntityTrait;
use App\Entity\EntityTrait\GeolocEntityTrait;
use App\Entity\EntityTrait\NameSlugContentEntityTrait;
use App\Enum\GroupePrestaEnum;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\ORM\Mapping as ORM;
use Gedmo\Mapping\Annotation as Gedmo;
......@@ -47,17 +48,9 @@ class Groupeprestataire
protected $type;
/**
* @var string|null
*
* @Gedmo\Slug(fields={"type"})
* @ORM\Column(length=50, unique=true)
*/
protected $typeslug;
/**
* @var ArrayCollection|Prestataire[]
*
* @ORM\ManyToMany(targetEntity="Prestataire", inversedBy="groupeprestataires", cascade={"persist"}, fetch="EXTRA_LAZY")
* @ORM\ManyToMany(targetEntity="Prestataire", inversedBy="groupeprestataires", cascade={"persist"})
*/
protected $prestataires;
......@@ -75,6 +68,13 @@ class Groupeprestataire
*/
private $horaires;
/**
* @var \Application\Sonata\MediaBundle\Entity\Media
* @ORM\ManyToOne(targetEntity="App\Application\Sonata\MediaBundle\Entity\Media", cascade={"persist"}, fetch="LAZY")
* @ORM\JoinColumn(name="media_id", referencedColumnName="id")
*/
protected $image;
public function __construct()
{
$this->prestataires = new ArrayCollection();
......@@ -103,26 +103,11 @@ class Groupeprestataire
*/
public function setType($type)
{
$this->type = $type;
return $this;
}
/**
* Get typeslug
* @return string
*/
public function getTypeSlug()
{
return $this->typeslug;
if (!in_array($type, GroupePrestaEnum::getAvailableTypes())) {
throw new \InvalidArgumentException("Type de groupe invalide [amap, marche] !");
}
$this->type = $type;
/**
* Set typeslug
* @return $this
*/
public function setTypeSlug($typeslug)
{
$this->typeslug = $typeslug;
return $this;
}
......@@ -197,8 +182,36 @@ class Groupeprestataire
return $this->groupe;
}
/**
* Get image
* @return image|null
*/
public function getImage()
{
return $this->image;
}
/**
* Set image
* @return $this
*/
public function setImage($image)
{
$this->image = $image;
return $this;
}
public function getPrestatairesCount()
{
return $this->getPrestataires()->count();
}
public function __toString(): string
{
$return = $this->getName();
if ($this->type != null) {
$return .= ' ('.strtoupper($this->type).')';
}
return $return;
}
}
......@@ -5,7 +5,9 @@ namespace App\Entity;
use App\Entity\EntityTrait\EnablableEntityTrait;
use App\Entity\EntityTrait\GeolocEntityTrait;
use App\Entity\EntityTrait\HasCompteEntity;
use App\Entity\Groupeprestataire;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\ORM\Mapping as ORM;
use Gedmo\Mapping\Annotation as Gedmo;
use Gedmo\Mapping\Annotation\Slug;
......@@ -149,13 +151,14 @@ class Prestataire
/**
* @var Groupe $groupe
*
* @ORM\ManyToOne(targetEntity="App\Entity\Groupe", inversedBy="prestataires")
* @ORM\ManyToOne(targetEntity="Groupe", inversedBy="prestataires")
*/
private $groupe;
/**
* @var ArrayCollection|Amap/Marché[]
* @ORM\ManyToMany(targetEntity="Groupeprestataire", mappedBy="prestataires", fetch="EXTRA_LAZY")
* AMAP / Marché
* @var ArrayCollection|Groupeprestataire[]
* @ORM\ManyToMany(targetEntity="Groupeprestataire", cascade={"persist"}, mappedBy="prestataires")
* @ORM\JoinTable(name="groupes_prestataires")
*/
private $groupeprestataires;
......@@ -457,6 +460,16 @@ class Prestataire
}
/**
* @param Amap[]|ArrayCollection
* @return this
*/
public function setGroupeprestataires($groupeprestataires)
{
$this->groupeprestataires = $groupeprestataires;
return $this;
}
/**
* @param Amap $amap
* @return $this
*/
......
......@@ -3,6 +3,7 @@
namespace App\Entity;
use Doctrine\ORM\Mapping as ORM;
use Symfony\Component\Validator\Constraints as Assert;
/**
* TRANSFERT
......@@ -25,10 +26,28 @@ class TransfertPrestataireSiege extends Transfert
protected $destinataire;
/**
* @var boolean
* @Assert\Type("bool")
* @ORM\Column(type="boolean")
*/
protected $reconverti = false;
public function getReconverti(): bool
{
return $this->reconverti;
}
public function setReconverti(bool $reconverti)
{
$this->reconverti = $reconverti;
return $this;
}
/**
* @return string
*/
public function getType(): string
{
return 'prestataire_siege';
return 'prestataire_siege'; //reconversion
}
}
<?php
namespace App\Enum;
abstract class GroupePrestaEnum
{
const MOYEN_AMAP = "amap";
const MOYEN_MARCHE = "marche";
/** @var array user friendly named type */
protected static $typeName = [
self::MOYEN_AMAP => 'AMAP',
self::MOYEN_MARCHE => 'Marché',
];
/**
* @param string $typeShortName
* @return string
*/
public static function getTypeName($typeShortName)
{
if (!isset(static::$typeName[$typeShortName])) {
return "Unknown type ($typeShortName)";
}
return static::$typeName[$typeShortName];
}
/**
* @return array<string>
*/
public static function getAvailableTypes()
{
return [
self::MOYEN_AMAP,
self::MOYEN_MARCHE
];
}
}
......@@ -8,6 +8,7 @@ abstract class MoyenEnum
const MOYEN_ESPECE = "espece";
const MOYEN_CHEQUE = "cheque";
const MOYEN_VIREMENT = "virement";
const MOYEN_TRANSFERT = "transfert";
const MOYEN_HELLOASSO = "helloasso";
const MOYEN_MLC = "mlc";
const MOYEN_AUTRE = "autre";
......@@ -19,6 +20,7 @@ abstract class MoyenEnum
self::MOYEN_ESPECE => 'Espèce',
self::MOYEN_CHEQUE => 'Chèque',
self::MOYEN_VIREMENT => 'Virement',
self::MOYEN_TRANSFERT => 'Transfert',
self::MOYEN_HELLOASSO => 'HelloAsso',
self::MOYEN_MLC => 'MLC',
self::MOYEN_AUTRE => 'Autre',
......@@ -47,6 +49,7 @@ abstract class MoyenEnum
self::MOYEN_ESPECE,
self::MOYEN_CHEQUE,
self::MOYEN_VIREMENT,
self::MOYEN_TRANSFERT,
self::MOYEN_HELLOASSO,
self::MOYEN_MLC,
self::MOYEN_AUTRE
......
......@@ -4,16 +4,30 @@ namespace App\Factory;
use App\Entity\TransactionAdherentAdherent;
use App\Entity\TransactionAdherentPrestataire;
use App\Entity\TransactionComptoirAdherent;
use App\Entity\TransactionComptoirGroupe;
use App\Entity\TransactionComptoirPrestataire;
use App\Entity\TransactionPrestataireAdherent;
use App\Entity\TransactionPrestatairePrestataire;
use App\Entity\TransfertGroupeComptoir;
use App\Entity\TransfertPrestataireComptoir;
use App\Entity\TransfertPrestataireSiege;
use App\Entity\TransfertSiegeGroupe;
use App\Entity\User;
use App\Enum\MoyenEnum;
use App\Form\Type\AdherentInfosFormType;
use App\Form\Type\ComptoirInfosFormType;
use App\Form\Type\GroupeInfosFormType;
use App\Form\Type\GroupePrestataireInscriptionFormType;
use App\Form\Type\PrestataireInfosFormType;
use App\Form\Type\RegistrationFormType;
use App\Form\Type\TransactionAdherentAdherentFormType;
use App\Form\Type\TransactionAdherentPrestataireFormType;
use App\Form\Type\TransactionPrestataireAdherentFormType;
use App\Form\Type\TransactionPrestatairePrestataireFormType;
use App\Form\Type\TransfertGroupeComptoirFormType;
use App\Form\Type\TransfertPrestataireComptoirFormType;
use App\Form\Type\TransfertPrestataireSiegeFormType;
use App\Form\Type\TransfertSiegeGroupeFormType;
use Symfony\Component\Form\FormFactoryInterface as FormF;
use Symfony\Component\Routing\RouterInterface;
......@@ -29,6 +43,66 @@ class FormFactory
$this->router = $router;
}
public function getUserInfosForm(User $user)
{
if (empty($user)) {
return null;
}
$form = $this->ff->create(RegistrationFormType::class, $user, array('action' => $this->router->generate('user_infos')));
return $form->createView();
}
public function getGroupeInfosForm(User $user)
{
if (empty($user) || empty($user->getGroupesgere())) {
return null;
}
$form = $this->ff->create(GroupeInfosFormType::class, $user->getGroupesgere(), array('action' => $this->router->generate('groupe_infos')));
return $form->createView();
}
public function getComptoirInfosForm(User $user)
{
if (empty($user) || empty($user->getComptoirsgere())) {
return null;
}
$form = $this->ff->create(ComptoirInfosFormType::class, $user->getComptoirsgere(), array('action' => $this->router->generate('comptoir_infos')));
return $form->createView();
}
public function getPrestataireInfosForm(User $user)
{
if (empty($user) || empty($user->getPrestataire())) {
return null;
}
$form = $this->ff->create(PrestataireInfosFormType::class, $user->getPrestataire(), array('action' => $this->router->generate('prestataire_infos')));
return $form->createView();
}
public function getAdherentInfosForm(User $user)
{
if (empty($user) || empty($user->getAdherent())) {
return null;
}
$form = $this->ff->create(AdherentInfosFormType::class, $user->getAdherent(), array('action' => $this->router->generate('adherent_infos')));
return $form->createView();
}
public function getGroupePrestataireInscriptionForm(User $user)
{
if (empty($user) || empty($user->getPrestataire())) {
return null;
}
$form = $this->ff->create(GroupePrestataireInscriptionFormType::class, $user->getPrestataire(), array('action' => $this->router->generate('groupeprestataire_inscription')));
return $form->createView();
}
public function getTransactionAdherentAdherentForm(User $user)
{
if (empty($user) || empty($user->getAdherent())) {
......@@ -81,20 +155,50 @@ class FormFactory
return $form->createView();
}
// public function getTransfertComptoirToXForm(User $user, $destinataire)
// {
// $type = strtolower($type);
// if (empty($user) || empty($user->getComptoirsgere()) || !($type == 'adherent' || $type == 'groupe' || $type == 'prestataire')) {
// return null;
// }
// $class = 'TransactionComptoir'.ucwords($type);
// $entity = new $class();
public function getTransfertPrestataireSiegeForm(User $user)
{
if (empty($user) || empty($user->getPrestataire())) {
return null;
}
$entity = new TransfertPrestataireSiege();
// $entity->setReconverti(false);
// $entity->setMoyen(MoyenEnum::MOYEN_MLC); //TODO : MOYEN_MLC correct ?
// $entity->setOperateur($user);
// $entity->setExpediteur($user->getComptoirsgere());
// $form = $this->ff->create('App\Form\Type\TransactionComptoir'.ucwords($type).'FormType', $entity, array('action' => $this->router->generate('transactionComptoir'.ucwords($type))));
$entity->setExpediteur($user->getPrestataire());
$form = $this->ff->create(TransfertPrestataireSiegeFormType::class, $entity, array('action' => $this->router->generate('transactionPrestataireSiege')));
// return $form->createView();
// }
return $form->createView();
}
public function getTransfertPrestataireComptoirForm(User $user)
{
if (empty($user) || empty($user->getComptoirsgere())) {
return null;
}
$entity = new TransfertPrestataireComptoir();
// $entity->setReconverti(false);
// $entity->setMoyen(MoyenEnum::MOYEN_MLC); //TODO : MOYEN_MLC correct ?
// $entity->setOperateur($user);
$entity->setDestinataire($user->getComptoirsgere());
$form = $this->ff->create(TransfertPrestataireComptoirFormType::class, $entity, array('action' => $this->router->generate('transfertPrestataireComptoir')));
return $form->createView();
}
public function getTransfertComptoirToXForm(User $user, $type)
{
$type = strtolower($type);
if (empty($user) || empty($user->getComptoirsgere()) || !($type == 'adherent' || $type == 'groupe' || $type == 'prestataire')) {
return null;
}
$class = "App\Entity\TransfertComptoir".ucwords($type);
$entity = new $class();
$entity->setOperateur($user);
$entity->setExpediteur($user->getComptoirsgere());
$form = $this->ff->create('App\Form\Type\TransfertComptoir'.ucwords($type).'FormType', $entity, array('action' => $this->router->generate('transfertComptoir'.ucwords($type))));
return $form->createView();
}
// public function getTransfertGroupeComptoirForm(User $user)
// {
......
<?php
namespace App\Form\Type;
use App\Entity\Comptoir;
use App\Entity\User;
use Doctrine\ORM\EntityManager;
use Doctrine\ORM\EntityManagerInterface;
use Doctrine\ORM\EntityRepository;
use FOS\CKEditorBundle\Form\Type\CKEditorType;
use Sonata\MediaBundle\Form\Type\MediaType;
use Symfony\Bridge\Doctrine\Form\Type\EntityType;
use Symfony\Component\DependencyInjection\ContainerAwareTrait;
use Symfony\Component\DependencyInjection\ContainerInterface;
use Symfony\Component\Form\AbstractType;
use Symfony\Component\Form\Extension\Core\Type\SubmitType;
use Symfony\Component\Form\Extension\Core\Type\TextType;
use Symfony\Component\Form\FormBuilderInterface;
use Symfony\Component\Form\FormEvent;
use Symfony\Component\Form\FormEvents;
use Symfony\Component\OptionsResolver\OptionsResolver;
class ComptoirInfosFormType extends AbstractType
{
protected $container;
protected $em;
public function __construct(ContainerInterface $container, EntityManagerInterface $em)
{
$this->container = $container;
$this->em = $em;
}
public function buildForm(FormBuilderInterface $builder, array $options)
{
$builder
->add('name', TextType::class, array(
'label' => 'Nom :',
'required' => true
))
->add('content', CKEditorType::class, array(
'label' => 'Description :',
'required' => false
))
->add('media', MediaType::class, array(
'provider' => 'sonata.media.provider.image',
'context' => 'comptoir',
'label' => 'Image'
))
->add('save', SubmitType::class, ['label' => "Modifier"])
;
}
public function configureOptions(OptionsResolver $resolver)
{
$resolver->setDefaults([
'data_class' => Comptoir::class,
'cascade_validation' => true
]);
}
public function getBlockPrefix()
{
return 'formComptoirInfos';
}
}
......@@ -35,17 +35,32 @@ class FluxFormType extends AbstractType
public function buildForm(FormBuilderInterface $builder, array $options)
{
$flux = $options['data'];
if (empty($this->security->getUser()) || empty($this->security->getUser()->getId()) || empty($flux) || empty($flux->getExpediteur())) {
if (empty($this->security->getUser()) || empty($this->security->getUser()->getId())) {
throw new \Exception("[FLUX] Opération impossible ! Pas d'utilisateur connecté !");
}
$maxvalue = $flux->getExpediteur()->getCompte();
if (empty($flux)) {
throw new \Exception("[FLUX] Opération impossible ! Pas de flux paramétré !");
}
// if (empty($flux) || empty($flux->getExpediteur())) {
// throw new \Exception("[FLUX] Opération impossible ! Pas d'expediteur paramétré !");
// }
$builder
->add('operateur', HiddenType::class, array(
'data' => $this->security->getUser()->getId(),
'data_class' => null,
'entity_class' => User::class,
'em' => $this->em
));
if (empty($flux->getExpediteur())) {
$builder
->add('montant', MoneyType::class, array(
'label' => 'Montant :',
'required' => true
))
;
} else {
$maxvalue = $flux->getExpediteur()->getCompte();
$builder
->add('montant', MoneyType::class, array(
'label' => 'Montant :',
'required' => true,
......@@ -56,6 +71,9 @@ class FluxFormType extends AbstractType
]),
],
))
;
}
$builder
->add('reference', TextType::class, array(
'label' => 'Reference :',
'required' => true
......
<?php
namespace App\Form\Type;
use App\Entity\Groupe;
use App\Entity\User;
use Doctrine\ORM\EntityManager;
use Doctrine\ORM\EntityManagerInterface;
use Doctrine\ORM\EntityRepository;
use FOS\CKEditorBundle\Form\Type\CKEditorType;
use Symfony\Bridge\Doctrine\Form\Type\EntityType;
use Symfony\Component\DependencyInjection\ContainerAwareTrait;
use Symfony\Component\DependencyInjection\ContainerInterface;
use Symfony\Component\Form\AbstractType;
use Symfony\Component\Form\Extension\Core\Type\ChoiceType;
use Symfony\Component\Form\Extension\Core\Type\CollectionType;
use Symfony\Component\Form\Extension\Core\Type\HiddenType;
use Symfony\Component\Form\Extension\Core\Type\SubmitType;
use Symfony\Component\Form\Extension\Core\Type\TextType;
use Symfony\Component\Form\FormBuilderInterface;
use Symfony\Component\Form\FormEvent;
use Symfony\Component\Form\FormEvents;
use Symfony\Component\OptionsResolver\OptionsResolver;
class GroupeInfosFormType extends AbstractType
{
protected $container;
protected $em;
public function __construct(ContainerInterface $container, EntityManagerInterface $em)
{
$this->container = $container;
$this->em = $em;
}
public function buildForm(FormBuilderInterface $builder, array $options)
{
$builder
->add('name', TextType::class, array(
'label' => 'Nom :',
'required' => true
))
->add('content', CKEditorType::class, array(
'label' => 'Description :',
'required' => false
))
->add('save', SubmitType::class, ['label' => "Modifier"])
;
}
public function configureOptions(OptionsResolver $resolver)
{
$resolver->setDefaults([
'data_class' => Groupe::class,
'cascade_validation' => true
]);
}
public function getBlockPrefix()
{
return 'formGroupeInfos';
}
}
<?php
namespace App\Form\Type;
use App\Entity\Groupeprestataire;
use App\Entity\Prestataire;
use Doctrine\ORM\EntityManagerInterface;
use Symfony\Bridge\Doctrine\Form\Type\EntityType;
use Symfony\Component\Form\AbstractType;
use Symfony\Component\Form\Extension\Core\Type\CollectionType;
use Symfony\Component\Form\Extension\Core\Type\SubmitType;
use Symfony\Component\Form\FormBuilderInterface;
use Symfony\Component\Form\FormEvent;
use Symfony\Component\Form\FormEvents;
use Symfony\Component\OptionsResolver\OptionsResolver;
class GroupePrestataireInscriptionFormType extends AbstractType
{
protected $em;
public function __construct(EntityManagerInterface $em)
{
$this->em = $em;
}
public function buildForm(FormBuilderInterface $builder, array $options)
{
$presta = $options['data'];
$builder
// ->add('groupeprestataires', CollectionType::class, array(
// 'label' => 'AMAP / Marchés',
// 'entry_type' => EntityType::class,
// 'entry_options' => array(
// 'class' => Groupeprestataire::class,
// 'choices' => $this->em->getRepository(Groupeprestataire::class)->findBy(array('enabled' => true)),
// 'choice_label' => 'name',
// 'placeholder' => 'Faites votre choix',
// 'required' => false,
// 'label' => false),
// 'by_reference' => false,
// 'allow_add' => true,
// 'allow_delete' => true
// ))
->add('groupeprestataires', CollectionType::class, array(
'label' => 'AMAP / Marchés',
'entry_type' => EntityType::class,
'entry_options' => array(
'class' => Groupeprestataire::class,
'choices' => $this->em->getRepository(Groupeprestataire::class)->findBy(array('enabled' => true)),
'choice_label' => 'name',
'placeholder' => 'groupe',
'required' => false,
'label' => false),
'by_reference' => false,
'allow_add' => true,
'allow_delete' => true,
// 'data' => $presta->getGroupeprestataires()
))
// ->add('groupeprestataires', EntityType::class, array(
// 'label' => 'AMAP / Marchés',
// // 'entry_type' => EntityType::class,
// 'class' => Groupeprestataire::class,
// 'choices' => $this->em->getRepository(Groupeprestataire::class)->findBy(array('enabled' => true)),
// 'choice_label' => 'name',
// 'placeholder' => 'Faites votre choix',
// 'required' => false,
// 'expanded' => true,
// 'multiple' => true,
// // 'mapped' => false,
// // 'data' => $presta->getGroupeprestataires()
// ))
->add('save', SubmitType::class, ['label' => "Valider"])
;
}
public function configureOptions(OptionsResolver $resolver)
{
$resolver->setDefaults([
'data_class' => Prestataire::class,
'cascade_validation' => true
]);
}
public function getBlockPrefix()
{
return 'groupe_presta_inscription';
}
}
......@@ -5,6 +5,7 @@ namespace App\Form\Type;
use App\Entity\Adherent;
use App\Entity\Groupe;
use App\Entity\Prestataire;
use App\Entity\Rubrique;
use App\Entity\User;
use App\Enum\MoyenEnum;
use App\Form\Type\GeolocFormType;
......@@ -18,6 +19,7 @@ use Symfony\Component\DependencyInjection\ContainerAwareTrait;
use Symfony\Component\DependencyInjection\ContainerInterface;
use Symfony\Component\Form\AbstractType;
use Symfony\Component\Form\Extension\Core\Type\ChoiceType;
use Symfony\Component\Form\Extension\Core\Type\CollectionType;
use Symfony\Component\Form\Extension\Core\Type\HiddenType;
use Symfony\Component\Form\Extension\Core\Type\SubmitType;
use Symfony\Component\Form\Extension\Core\Type\TextType;
......@@ -64,10 +66,6 @@ class PrestataireInfosFormType extends AbstractType
'label' => 'Métier responsable :',
'required' => true
))
->add('user', RegistrationFormType::class, array(
'label' => false,
'required' => false
))
->add('groupe', ChoiceType::class, array(
'required' => true,
'disabled' => true,
......@@ -80,8 +78,21 @@ class PrestataireInfosFormType extends AbstractType
'label' => 'ADRESSE',
'required' => false
))
->add('rubriques', CollectionType::class, array(
'label' => 'Rubriques',
'entry_type' => EntityType::class,
'entry_options' => array(
'class' => Rubrique::class,
'choices' => $this->container->get('doctrine')->getRepository(Rubrique::class)->findByEnabled(true),
'choice_label' => 'name',
'placeholder' => 'Rubrique',
'required' => false,
'label' => false),
'by_reference' => false,
'allow_add' => true,
'allow_delete' => true
))
->add('save', SubmitType::class, ['label' => "Modifier"])
->add('save2', SubmitType::class, ['label' => "Modifier"])
;
}
......
......@@ -4,6 +4,7 @@ namespace App\Form\Type;
use App\Entity\Adherent;
use App\Entity\TransactionAdherentAdherent;
use App\Enum\MoyenEnum;
use Symfony\Bridge\Doctrine\Form\Type\EntityType;
use Symfony\Component\Form\Extension\Core\Type\HiddenType;
use Symfony\Component\Form\FormBuilderInterface;
......@@ -22,13 +23,13 @@ class TransactionAdherentAdherentFormType extends TransactionFormType
))
->add('destinataire', EntityType::class, array(
'class' => Adherent::class,
'choices' => $this->em->getRepository(Adherent::class)->findBy(array('enabled' => true)),
'choices' => $this->em->getRepository(Adherent::class)->findbyExclude($this->security->getUser()->getAdherent()),
'placeholder' => 'Adherent',
'required' => true,
'label' => 'Adherent :',
))
->add('moyen', HiddenType::class, array(
'data' => 'virement'
'data' => MoyenEnum::MOYEN_VIREMENT
))
;
}
......
......@@ -23,7 +23,7 @@ class TransactionAdherentPrestataireFormType extends TransactionFormType
))
->add('destinataire', EntityType::class, array(
'class' => Prestataire::class,
'choices' => $this->em->getRepository(Prestataire::class)->findBy(array('enabled' => true)),
'choices' => $this->em->getRepository(Prestataire::class)->findBy(array('enabled' => true), array('raison'=> 'ASC')),
'placeholder' => 'Prestataire',
'required' => true,
'label' => 'Prestataire :',
......
......@@ -2,6 +2,7 @@
namespace App\Form\Type;
use App\Enum\MoyenEnum;
use App\Form\Type\FluxFormType;
use Symfony\Component\Form\Extension\Core\Type\HiddenType;
use Symfony\Component\Form\FormBuilderInterface;
......@@ -15,6 +16,9 @@ class TransactionFormType extends FluxFormType
'data' => 'transaction',
'data_class' => null
))
->add('moyen', HiddenType::class, array(
'data' => MoyenEnum::MOYEN_TRANSFERT
))
;
}
......
......@@ -23,7 +23,7 @@ class TransactionPrestatairePrestataireFormType extends TransactionFormType
))
->add('destinataire', EntityType::class, array(
'class' => Prestataire::class,
'choices' => $this->em->getRepository(Prestataire::class)->findBy(array('enabled' => true)),
'choices' => $this->em->getRepository(Prestataire::class)->findbyExclude($this->security->getUser()->getPrestataire()),
'placeholder' => 'Prestataire',
'required' => true,
'label' => 'Prestataire :',
......
......@@ -2,6 +2,7 @@
namespace App\Form\Type;
use App\Enum\MoyenEnum;
use App\Form\Type\FluxFormType;
use Symfony\Component\Form\Extension\Core\Type\HiddenType;
use Symfony\Component\Form\FormBuilderInterface;
......@@ -15,6 +16,9 @@ class TransfertFormType extends FluxFormType
'data' => 'transfert',
'data_class' => null
))
->add('moyen', HiddenType::class, array(
'data' => MoyenEnum::MOYEN_TRANSFERT
))
;
}
......
......@@ -4,6 +4,7 @@ namespace App\Form\Type;
use App\Entity\Comptoir;
use App\Entity\Groupe;
use App\Entity\Prestataire;
use App\Entity\TransfertPrestataireComptoir;
use Symfony\Bridge\Doctrine\Form\Type\EntityType;
use Symfony\Component\Form\Extension\Core\Type\HiddenType;
......@@ -15,18 +16,18 @@ class TransfertPrestataireComptoirFormType extends TransfertFormType
public function buildForm(FormBuilderInterface $builder, array $options)
{
$builder
->add('expediteur', HiddenType::class, array(
'data' => $this->security->getUser()->getPrestataire()->getId(),
->add('destinataire', HiddenType::class, array(
'data' => $this->security->getUser()->getComptoirsgere()->getId(),
'data_class' => null,
'entity_class' => Prestataire::class,
'entity_class' => Comptoir::class,
'em' => $this->em
))
->add('destinataire', EntityType::class, array(
'class' => Comptoir::class,
'choices' => $this->em->getRepository(Comptoir::class)->findBy(array('enabled' => true)),
'placeholder' => 'Comptoir',
->add('expediteur', EntityType::class, array(
'class' => Prestataire::class,
'choices' => $this->em->getRepository(Prestataire::class)->findBy(array('enabled' => true), array('raison' => 'ASC')),
'placeholder' => 'Prestataire',
'required' => true,
'label' => 'Comptoir :',
'label' => 'Prestataire :',
))
;
}
......
<?php
namespace App\Form\Type;
use App\Entity\Prestataire;
use App\Entity\Siege;
use App\Entity\TransfertPrestataireSiege;
use App\Entity\User;
use App\Enum\MoyenEnum;
use App\Form\Type\TransfertFormType;
use Symfony\Bridge\Doctrine\Form\Type\EntityType;
use Symfony\Component\Form\Extension\Core\Type\HiddenType;
use Symfony\Component\Form\FormBuilderInterface;
use Symfony\Component\OptionsResolver\OptionsResolver;
class TransfertPrestataireSiegeFormType extends TransfertFormType
{
public function buildForm(FormBuilderInterface $builder, array $options)
{
$builder
->add('expediteur', HiddenType::class, array(
'data' => $this->security->getUser()->getPrestataire()->getId(),
'data_class' => null,
'entity_class' => Prestataire::class,
'em' => $this->em
))
->add('destinataire', HiddenType::class, array(
'data' => 1,
'data_class' => null,
'entity_class' => Siege::class,
'em' => $this->em
))
;
}
/**
* {@inheritdoc}
*/
public function configureOptions(OptionsResolver $resolver)
{
$resolver->setDefaults(array(
'class' => TransfertPrestataireSiege::class,
));
}
public function getParent()
{
return TransfertFormType::class;
}
public function getBlockPrefix()
{
return 'formTransfertPrestataireSiege';
}
}
<?php
declare(strict_types=1);
namespace DoctrineMigrations;
use Doctrine\DBAL\Schema\Schema;
use Doctrine\Migrations\AbstractMigration;
/**
* Auto-generated Migration: Please modify to your needs!
*/
final class Version20190305161833 extends AbstractMigration
{
public function getDescription() : string
{
return '';
}
public function up(Schema $schema) : void
{
// this up() migration is auto-generated, please modify it to your needs
$this->abortIf($this->connection->getDatabasePlatform()->getName() !== 'mysql', 'Migration can only be executed safely on \'mysql\'.');
$this->addSql('ALTER TABLE flux ADD reconverti TINYINT(1) DEFAULT NULL');
}
public function down(Schema $schema) : void
{
// this down() migration is auto-generated, please modify it to your needs
$this->abortIf($this->connection->getDatabasePlatform()->getName() !== 'mysql', 'Migration can only be executed safely on \'mysql\'.');
$this->addSql('ALTER TABLE flux DROP reconverti');
}
}
<?php
declare(strict_types=1);
namespace DoctrineMigrations;
use Doctrine\DBAL\Schema\Schema;
use Doctrine\Migrations\AbstractMigration;
/**
* Auto-generated Migration: Please modify to your needs!
*/
final class Version20190306145550 extends AbstractMigration
{
public function getDescription() : string
{
return '';
}
public function up(Schema $schema) : void
{
// this up() migration is auto-generated, please modify it to your needs
$this->abortIf($this->connection->getDatabasePlatform()->getName() !== 'mysql', 'Migration can only be executed safely on \'mysql\'.');
$this->addSql('ALTER TABLE groupeprestaire ADD media_id INT DEFAULT NULL');
$this->addSql('ALTER TABLE groupeprestaire ADD CONSTRAINT FK_FB9ABBCEEA9FDD75 FOREIGN KEY (media_id) REFERENCES media__media (id)');
$this->addSql('CREATE INDEX IDX_FB9ABBCEEA9FDD75 ON groupeprestaire (media_id)');
}
public function down(Schema $schema) : void
{
// this down() migration is auto-generated, please modify it to your needs
$this->abortIf($this->connection->getDatabasePlatform()->getName() !== 'mysql', 'Migration can only be executed safely on \'mysql\'.');
$this->addSql('ALTER TABLE groupeprestaire DROP FOREIGN KEY FK_FB9ABBCEEA9FDD75');
$this->addSql('DROP INDEX IDX_FB9ABBCEEA9FDD75 ON groupeprestaire');
$this->addSql('ALTER TABLE groupeprestaire DROP media_id');
}
}
<?php
declare(strict_types=1);
namespace DoctrineMigrations;
use Doctrine\DBAL\Schema\Schema;
use Doctrine\Migrations\AbstractMigration;
/**
* Auto-generated Migration: Please modify to your needs!
*/
final class Version20190306150045 extends AbstractMigration
{
public function getDescription() : string
{
return '';
}
public function up(Schema $schema) : void
{
// this up() migration is auto-generated, please modify it to your needs
$this->abortIf($this->connection->getDatabasePlatform()->getName() !== 'mysql', 'Migration can only be executed safely on \'mysql\'.');
$this->addSql('DROP INDEX UNIQ_FB9ABBCED7E16479 ON groupeprestaire');
$this->addSql('ALTER TABLE groupeprestaire DROP typeslug');
}
public function down(Schema $schema) : void
{
// this down() migration is auto-generated, please modify it to your needs
$this->abortIf($this->connection->getDatabasePlatform()->getName() !== 'mysql', 'Migration can only be executed safely on \'mysql\'.');
$this->addSql('ALTER TABLE groupeprestaire ADD typeslug VARCHAR(50) NOT NULL COLLATE utf8mb4_unicode_ci');
$this->addSql('CREATE UNIQUE INDEX UNIQ_FB9ABBCED7E16479 ON groupeprestaire (typeslug)');
}
}
......@@ -18,4 +18,22 @@ class AdherentRepository extends ServiceEntityRepository
{
parent::__construct($registry, Adherent::class);
}
/**
* @return Adherent[] Returns an array of Adherent objects
*/
public function findbyExclude(Adherent $adherent)
{
$qb = $this->createQueryBuilder('p');
return $qb
->leftjoin('p.user', 'u')
->where('p.id != :presta')
->andWhere('p.enabled = :enabled')
->setParameter('presta', $adherent->getId())
->setParameter('enabled', true)
->orderBy('u.lastname', 'ASC')
->getQuery()
->getResult()
;
}
}
......@@ -3,7 +3,9 @@
namespace App\Repository;
use App\Entity\Adherent;
use App\Entity\Comptoir;
use App\Entity\Flux;
use App\Entity\Groupe;
use App\Entity\Prestataire;
use Doctrine\Bundle\DoctrineBundle\Repository\ServiceEntityRepository;
use Symfony\Bridge\Doctrine\RegistryInterface;
......@@ -37,6 +39,7 @@ class FluxRepository extends ServiceEntityRepository
return $qb
->where($qb->expr()->in('f.id', ':ids'))
->setParameter('ids', $results)
->orderBy('f.createdAt', 'DESC')
->getQuery()
;
}
......@@ -49,7 +52,7 @@ class FluxRepository extends ServiceEntityRepository
{
$em = $this->getEntityManager();
$connection = $em->getConnection();
$statement = $connection->prepare("SELECT f.id FROM flux f WHERE f.adherent_id = :id");
$statement = $connection->prepare("SELECT f.id FROM flux f WHERE f.adherent_id = :id OR f.adherent_dest_id = :id");
$statement->bindValue('id', $adherent->getId());
$statement->execute();
$results = $statement->fetchAll();
......@@ -57,6 +60,49 @@ class FluxRepository extends ServiceEntityRepository
return $qb
->where($qb->expr()->in('f.id', ':ids'))
->setParameter('ids', $results)
->orderBy('f.createdAt', 'DESC')
->getQuery()
;
}
/**
* @param Comptoir $comptoir [description]
* @return Query Returns a query fo finding an array of Flux
*/
public function getQueryByComptoir(Comptoir $comptoir)
{
$em = $this->getEntityManager();
$connection = $em->getConnection();
$statement = $connection->prepare("SELECT f.id FROM flux f WHERE f.comptoir_id = :id");
$statement->bindValue('id', $comptoir->getId());
$statement->execute();
$results = $statement->fetchAll();
$qb = $this->createQueryBuilder('f');
return $qb
->where($qb->expr()->in('f.id', ':ids'))
->setParameter('ids', $results)
->orderBy('f.createdAt', 'DESC')
->getQuery()
;
}
/**
* @param Groupe $groupe [description]
* @return Query Returns a query fo finding an array of Flux
*/
public function getQueryByGroupe(Groupe $groupe)
{
$em = $this->getEntityManager();
$connection = $em->getConnection();
$statement = $connection->prepare("SELECT f.id FROM flux f WHERE f.groupe_id = :id");
$statement->bindValue('id', $groupe->getId());
$statement->execute();
$results = $statement->fetchAll();
$qb = $this->createQueryBuilder('f');
return $qb
->where($qb->expr()->in('f.id', ':ids'))
->setParameter('ids', $results)
->orderBy('f.createdAt', 'DESC')
->getQuery()
;
}
......
......@@ -36,4 +36,21 @@ class PrestataireRepository extends ServiceEntityRepository
->getResult()
;
}
/**
* @return Prestataire[] Returns an array of Prestataire objects
*/
public function findbyExclude(Prestataire $presta)
{
$qb = $this->createQueryBuilder('p');
return $qb
->where('p.id != :presta')
->andWhere('p.enabled = :enabled')
->setParameter('presta', $presta->getId())
->setParameter('enabled', true)
->orderBy('p.raison', 'ASC')
->getQuery()
->getResult()
;
}
}
......@@ -8,6 +8,7 @@ use App\Entity\Groupe;
use App\Entity\News;
use App\Entity\Prestataire;
use App\Entity\Rubrique;
use App\Entity\Siege;
use App\Entity\User;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\Security\Core\User\UserInterface;
......@@ -30,6 +31,7 @@ class AppExtension extends AbstractExtension
public function getFunctions()
{
return [
new \Twig_SimpleFunction('getSiege', array($this, 'getSiege')),
new \Twig_SimpleFunction('getLastNews', array($this, 'getLastNews')),
new \Twig_SimpleFunction('getAllPrestataires', array($this, 'getAllPrestataires')),
new \Twig_SimpleFunction('getAllComptoirs', array($this, 'getAllComptoirs')),
......@@ -43,6 +45,11 @@ class AppExtension extends AbstractExtension
];
}
public function getSiege()
{
return $this->container->get('doctrine')->getRepository(Siege::class)->findOneById(1);
}
public function getLastNews($limit = 5)
{
return $this->container->get('doctrine')->getRepository(News::class)->findBy(array('enabled' => true), array('createdAt' => 'DESC'), $limit);
......@@ -81,6 +88,10 @@ class AppExtension extends AbstractExtension
$query = $this->container->get('doctrine')->getRepository(Flux::class)->getQueryByPrestataire($user->getPrestataire());
} else if ($user->getAdherent() != null) {
$query = $this->container->get('doctrine')->getRepository(Flux::class)->getQueryByAdherent($user->getAdherent());
} else if ($user->getComptoirsgere() != null) {
$query = $this->container->get('doctrine')->getRepository(Flux::class)->getQueryByComptoir($user->getComptoirsgere());
} else if ($user->getGroupesgere() != null) {
$query = $this->container->get('doctrine')->getRepository(Flux::class)->getQueryByGroupe($user->getGroupesgere());
}
if ($query != null) {
$pagination = $this->paginator->paginate(
......
......@@ -23,16 +23,48 @@ class FormExtension extends AbstractExtension
public function getFunctions()
{
return [
new \Twig_SimpleFunction('getUserInfosForm', array($this, 'getUserInfosForm')),
new \Twig_SimpleFunction('getGroupeInfosForm', array($this, 'getGroupeInfosForm')),
new \Twig_SimpleFunction('getComptoirInfosForm', array($this, 'getComptoirInfosForm')),
new \Twig_SimpleFunction('getPrestataireInfosForm', array($this, 'getPrestataireInfosForm')),
new \Twig_SimpleFunction('getAdherentInfosForm', array($this, 'getAdherentInfosForm')),
new \Twig_SimpleFunction('getGroupePrestataireInscriptionForm', array($this, 'getGroupePrestataireInscriptionForm')),
new \Twig_SimpleFunction('getTransactionAdherentAdherentForm', array($this, 'getTransactionAdherentAdherentForm')),
new \Twig_SimpleFunction('getTransactionAdherentPrestataireForm', array($this, 'getTransactionAdherentPrestataireForm')),
new \Twig_SimpleFunction('getTransactionPrestataireAdherentForm', array($this, 'getTransactionPrestataireAdherentForm')),
new \Twig_SimpleFunction('getTransactionPrestatairePrestataireForm', array($this, 'getTransactionPrestatairePrestataireForm')),
new \Twig_SimpleFunction('getTransfertPrestataireSiegeForm', array($this, 'getTransfertPrestataireSiegeForm')),
new \Twig_SimpleFunction('getTransfertPrestataireComptoirForm', array($this, 'getTransfertPrestataireComptoirForm')),
new \Twig_SimpleFunction('getTransfertComptoirToXForm', array($this, 'getTransfertComptoirToXForm')),
new \Twig_SimpleFunction('getTransfertGroupeComptoirForm', array($this, 'getTransfertGroupeComptoirForm')),
new \Twig_SimpleFunction('getTransfertSiegeGroupeForm', array($this, 'getTransfertSiegeGroupeForm')),
];
}
public function getPrestataireInfosForm(User $user)
{
return $this->container->get('app.formfactory')->getPrestataireInfosForm($user);
}
public function getAdherentInfosForm(User $user)
{
return $this->container->get('app.formfactory')->getAdherentInfosForm($user);
}
public function getUserInfosForm(User $user)
{
return $this->container->get('app.formfactory')->getUserInfosForm($user);
}
public function getGroupeInfosForm(User $user)
{
return $this->container->get('app.formfactory')->getGroupeInfosForm($user);
}
public function getComptoirInfosForm(User $user)
{
return $this->container->get('app.formfactory')->getComptoirInfosForm($user);
}
public function getGroupePrestataireInscriptionForm(User $user)
{
return $this->container->get('app.formfactory')->getGroupePrestataireInscriptionForm($user);
}
public function getTransactionAdherentAdherentForm(User $user)
{
return $this->container->get('app.formfactory')->getTransactionAdherentAdherentForm($user);
......@@ -49,9 +81,17 @@ class FormExtension extends AbstractExtension
{
return $this->container->get('app.formfactory')->getTransactionPrestatairePrestataireForm($user);
}
public function getTransfertComptoirToXForm(User $user)
public function getTransfertPrestataireSiegeForm(User $user)
{
return $this->container->get('app.formfactory')->getTransfertPrestataireSiegeForm($user);
}
public function getTransfertPrestataireComptoirForm(User $user)
{
return $this->container->get('app.formfactory')->getTransfertPrestataireComptoirForm($user);
}
public function getTransfertComptoirToXForm(User $user, $destinataire)
{
return $this->container->get('app.formfactory')->getTransfertComptoirToXForm($user);
return $this->container->get('app.formfactory')->getTransfertComptoirToXForm($user, $destinataire);
}
public function getTransfertGroupeComptoirForm(User $user)
{
......
{% extends 'block/block_collapse.html.twig' %}
{% block blocktitle %}
<i class="fa fa-user-tie mr-4"></i> {{'Modifier vos informations'|trans}}
{% endblock blocktitle %}
{% block blocksubtitle %}
{% endblock blocksubtitle %}
{% block blockcontent %}
{% set form = getAdherentInfosForm(app.user) %}
{{form_start(form)}}
{{ form_row(form.user)}}
{{ form_row(form.groupe)}}
{{ form_row(form.geoloc) }}
{{ form_row(form.save) }}
{{form_end(form)}}
{% endblock blockcontent %}
\ No newline at end of file
<div class="card mb-3">
<div class="card-header">Solde de mon compte : <b>{{app.user.adherent.ecompte}}</b></div>
<div class="card mb-3 {% if app.user.adherent.ecompte > 0 %}border-success{% else %}border-error{% endif %}">
<div class="card-header"><i class="fa fa-coins mr-4"></i> Solde de mon compte : <b>{{app.user.adherent.ecompte}}</b></div>
</div>
\ No newline at end of file
{% extends 'block/onetransaction.html.twig' %}
{% block blocktitle %}
<i class="fa fa-user mr-4"></i> Virement vers un adhérent
<i class="fa fa-exchange-alt mr-4"></i> Virement vers un adhérent
{% endblock blocktitle %}
{% block blockcontent %}
{% set form = getTransactionAdherentAdherentForm(app.user) %}
......
{% extends 'block/onetransaction.html.twig' %}
{% block blocktitle %}
<i class="fa fa-user mr-4"></i> Virement vers un prestataire
<i class="fa fa-exchange-alt mr-4"></i> Virement vers un prestataire
{% endblock blocktitle %}
{% block blockcontent %}
{% set form = getTransactionAdherentPrestataireForm(app.user) %}
......
{% set idcard = idcard|default(random(500)) %}
{% set collapse = collapse is defined ? collapse : 'collapse' %}
<div class="card mb-3">
<div class="card-header" style='cursor:pointer;' onmouseover="$(this).addClass('border-primary');" onmouseout="$(this).removeClass('border-primary');" data-toggle="collapse" data-target="#collapse{{idcard}}" aria-expanded="false" aria-controls="collapse{{idcard}}">{% block blocktitle %}TITLE with blocktitle{% endblock blocktitle %}</div>
<div class="card-body collapse" id="collapse{{idcard}}">
<div class="card-body {{collapse}}" id="collapse{{idcard}}" data-parent="#accordion">
<h4 class="card-title">{% block blocksubtitle %}SUBTITLE with blocksubtitle{% endblock blocksubtitle %}</h4>
<div class="card-text">
{% block blockcontent %}CONTENT with blockcontent{% endblock blockcontent %}
......
......@@ -3,7 +3,7 @@
{% extends 'block/block_collapse.html.twig' %}
{% block blocktitle %}
<i class="fa fa-user mr-4"></i> Mes cotisations
<i class="fa fa-clipboard-list mr-4"></i> Mes cotisations
{% endblock blocktitle %}
{% block blocksubtitle %}
{% endblock blocksubtitle %}
......
{% set compte = compte|default('[ERREUR] !') %}
{% set soldelabel = soldelabel|default('Solde'|trans) %}
{% set icon = icon|default('fa-coins'|trans) %}
<div class="card mb-3">
<div class="card-header"><i class="fa {{icon}} mr-4"></i> {{soldelabel}} : <b>{{compte}}</b></div>
</div>
\ No newline at end of file
......@@ -4,7 +4,7 @@
{% extends 'block/block_collapse.html.twig' %}
{% block blocktitle %}
<i class="fa fa-user mr-4"></i> Opérations
<i class="fa fa-list-alt mr-4"></i> Opérations
{% endblock blocktitle %}
{% block blocksubtitle %}
{% endblock blocksubtitle %}
......
{# UNIQUEMENT POUR LES TESTS #}
{% if app.environment == 'dev' %}
{% set routeName = routeName|default('index')%}
{% if is_granted('ROLE_PREVIOUS_ADMIN') %}
<div class='w-100 text-center'>
<a class='btn btn-xs m-1 btn-primary' href='{{path(routeName, [], true)}}?_switch_user=_exit'>
EXIT
</a>
</div>
{% else %}
<div class='mb-2'>
<a class='btn btn-xs m-1 btn-primary' href='{{path(routeName, [], true)}}?_switch_user=user_prestataire'>
PRESTATAIRE
</a>
<a class='btn btn-xs m-1 btn-primary' href='{{path(routeName, [], true)}}?_switch_user=user_adherent'>
ADHERENT
</a>
<a class='btn btn-xs m-1 btn-primary' href='{{path(routeName, [], true)}}?_switch_user=user_adminsiege'>
ADMIN SIEGE
</a>
<a class='btn btn-xs m-1 btn-primary' href='{{path(routeName, [], true)}}?_switch_user=user_comptoir'>
COMPTOIR
</a>
<a class='btn btn-xs m-1 btn-primary' href='{{path(routeName, [], true)}}?_switch_user=user_gestiongroupe'>
GESTION GROUPE
</a>
<a class='btn btn-xs m-1 btn-primary' href='{{path(routeName, [], true)}}?_switch_user=user_contact'>
CONTACT
</a>
<a class='btn btn-xs m-1 btn-primary' href='{{path(routeName, [], true)}}?_switch_user=user_tresorier'>
TRESORIER
</a>
<a class='btn btn-xs m-1 btn-primary' href='{{path(routeName, [], true)}}?_switch_user=user_controleur'>
CONTROLEUR
</a>
<a class='btn btn-xs m-1 btn-primary' href='{{path(routeName, [], true)}}?_switch_user=user_redacteur'>
REDACTEUR
</a>
</div>
{% endif %}
{% endif %}
{# ACTIONS PRINCIPALES POUR CHAQUE UTILISATEUR CONNECTE #}
<div id="accordion">
{% if is_granted('ROLE_ADMIN_SIEGE') %}
{% set siege = getSiege() %}
{% set compte = siege.getCompte() %}
{% set soldelabel = 'Solde du siège'|trans %}
{% include 'block/solde.html.twig' with {'compte': compte, 'soldelabel': soldelabel} %}
{% include 'block/userinfos.html.twig' %}
{% elseif is_granted('ROLE_REDACTEUR') %}
{% elseif is_granted('ROLE_TRESORIER') %}
{% set siege = getSiege() %}
{% set compte = siege.getCompte() %}
{% set soldelabel = 'Solde du siège'|trans %}
{% include 'block/solde.html.twig' with {'compte': compte, 'soldelabel': soldelabel} %}
{% include 'block/userinfos.html.twig' %}
{# {% include 'block/soldegroupes.html.twig' %} #}
{% elseif is_granted('ROLE_CONTROLEUR') %}
{% include 'block/userinfos.html.twig' %}
{% elseif is_granted('ROLE_GESTION_GROUPE') %}
{% if app.user.groupesgere != null %}
{% set compte = app.user.groupesgere.compte %}
{% set soldelabel = 'Solde du groupe'|trans %}
{% include 'block/solde.html.twig' with {'compte': compte, 'soldelabel': soldelabel} %}
{% endif %}
{% include 'groupe/block/infos.html.twig' %}
{% include 'block/userinfos.html.twig' %}
{% elseif is_granted('ROLE_COMPTOIR') %}
{% if app.user.comptoirsgere != null %}
{% set compte = app.user.comptoirsgere.compte %}
{% set soldelabel = 'Solde du comptoir "'|trans ~ app.user.comptoirsgere ~ '"' %}
{% include 'block/solde.html.twig' with {'compte': compte, 'soldelabel': soldelabel} %}
{% endif %}
{% include 'comptoir/block/infos.html.twig' %}
{% include 'block/userinfos.html.twig' %}
{% include 'block/transactions.html.twig' %}
{% include 'comptoir/block/transaction_adherent.html.twig' %}
{% include 'comptoir/block/reconversion.html.twig' %}
{% elseif is_granted('ROLE_CONTACT') %}
{% if app.user.groupesgere != null %}
{% set compte = app.user.groupesgere.compte %}
{% set soldelabel = 'Solde du groupe'|trans %}
{% include 'block/solde.html.twig' with {'compte': compte, 'soldelabel': soldelabel} %}
{% endif %}
{% include 'groupe/block/infos.html.twig' %}
{% include 'block/userinfos.html.twig' %}
{% include 'block/transactions.html.twig' %}
{% elseif is_granted('ROLE_SUPER_ADMIN') %}
{% set siege = getSiege() %}
{% set compte = siege.getCompte() %}
{% set soldelabel = 'Solde du siège'|trans %}
{% include 'block/solde.html.twig' with {'compte': compte, 'soldelabel': soldelabel} %}
{% include 'block/userinfos.html.twig' %}
{% elseif is_granted('ROLE_PRESTATAIRE') %}
{% include 'presta/block/solde.html.twig' %}
{% include 'presta/block/infos.html.twig' %}
{% include 'block/userinfos.html.twig' %}
{% include 'block/cotisations.html.twig' %}
{% include 'block/transactions.html.twig' %}
{% include 'groupepresta/block/inscription.html.twig' %}
{% include 'presta/block/transaction_presta.html.twig' %}
{% include 'presta/block/transaction_adherent.html.twig' %}
{% include 'presta/block/reconversion.html.twig' %}
{% elseif is_granted('ROLE_ADHERENT') %}
{% include 'adherent/block/solde.html.twig' %}
{% include 'adherent/block/infos.html.twig' %}
{% include 'block/cotisations.html.twig' %}
{% include 'block/transactions.html.twig' %}
{% include 'adherent/block/transaction_presta.html.twig' %}
{% include 'adherent/block/transaction_adherent.html.twig' %}
{% else %}
{% include 'presta/block/carte.html.twig' with {'title': 'Situer les Prestataires'|trans}%}
{% endif %}
</div>
\ No newline at end of file
{% extends 'block/block_collapse.html.twig' %}
{% block blocktitle %}
<i class="fa fa-user-cog mr-4"></i> {{'Compte utilisateur'|trans}}
{% endblock blocktitle %}
{% block blocksubtitle %}
{% endblock blocksubtitle %}
{% block blockcontent %}
{% set form = getUserInfosForm(app.user) %}
{{form_start(form)}}
{{ form_row(form.email) }}
{{ form_row(form.firstname) }}
{{ form_row(form.lastname) }}
{{ form_row(form.plainPassword) }}
<input type="submit" id="_submit" name="_submit" value="{{ 'Valider'|trans }}" />
{{form_end(form)}}
{% endblock blockcontent %}
\ No newline at end of file
{#
This file is part of the Sonata package.
(c) Thomas Rabaix <thomas.rabaix@sonata-project.org>
For the full copyright and license information, please view the LICENSE
file that was distributed with this source code.
#}
{% extends base_template %}
{% block title %}{{ 'title_dashboard'|trans({}, 'SonataAdminBundle') }}{% endblock%}
{% block breadcrumb %}{% endblock %}
{% block content %}
{# AJOUT POUR LA MLC #}
<div class="box">
<div class="box-header text-center">
<h3 class="box-title">{{'ADMINISTRATION'|trans }}</h3>
</div>
<div class="box-body">
{% include 'block/useradmin.html.twig' with {'routeName': 'sonata_admin_dashboard'}%}
</div>
</div>
{% set has_left = false %}
{% for block in blocks.left %}
{% if block.roles|length == 0 or is_granted_affirmative(block.roles) %}
{% set has_left = true %}
{% endif %}
{% endfor %}
{% set has_center = false %}
{% for block in blocks.center %}
{% if block.roles|length == 0 or is_granted_affirmative(block.roles) %}
{% set has_center = true %}
{% endif %}
{% endfor %}
{% set has_right = false %}
{% for block in blocks.right %}
{% if block.roles|length == 0 or is_granted_affirmative(block.roles) %}
{% set has_right = true %}
{% endif %}
{% endfor %}
{% set has_top = false %}
{% for block in blocks.top %}
{% if block.roles|length == 0 or is_granted_affirmative(block.roles) %}
{% set has_top = true %}
{% endif %}
{% endfor %}
{% set has_bottom = false %}
{% for block in blocks.bottom %}
{% if block.roles|length == 0 or is_granted_affirmative(block.roles) %}
{% set has_bottom = true %}
{% endif %}
{% endfor %}
{{ sonata_block_render_event('sonata.admin.dashboard.top', { 'admin_pool': sonata_admin.adminPool }) }}
{% if has_top %}
<div class="row">
{% for block in blocks.top %}
{% if block.roles|length == 0 or is_granted_affirmative(block.roles) %}
<div class="{{ block.class }}">
{{ sonata_block_render({ 'type': block.type, 'settings': block.settings}) }}
</div>
{% endif %}
{% endfor %}
</div>
{% endif %}
<div class="row">
{% set width_left = 4 %}
{% set width_right = 4 %}
{% set width_center = 4 %}
{# if center block is not present we make left and right ones wider #}
{% if not has_center %}
{% set width_left = 6 %}
{% set width_right = 6 %}
{% endif %}
{# if there is no right and left block present we make center one full width #}
{% if not has_left and not has_right %}
{% set width_center = 12 %}
{% endif %}
{# don't show left column if only center one is present #}
{% if has_left or has_right %}
<div class="col-md-{{ width_left }}">
{% for block in blocks.left %}
{% if block.roles|length == 0 or is_granted_affirmative(block.roles) %}
{{ sonata_block_render({ 'type': block.type, 'settings': block.settings}) }}
{% endif %}
{% endfor %}
</div>
{% endif %}
{% if has_center %}
<div class="col-md-{{ width_center }}">
{% for block in blocks.center %}
{% if block.roles|length == 0 or is_granted_affirmative(block.roles) %}
{{ sonata_block_render({ 'type': block.type, 'settings': block.settings}) }}
{% endif %}
{% endfor %}
</div>
{% endif %}
{# don't show right column if only center one is present #}
{% if has_left or has_right %}
<div class="col-md-{{ width_right }}">
{% for block in blocks.right %}
{% if block.roles|length == 0 or is_granted_affirmative(block.roles) %}
{{ sonata_block_render({ 'type': block.type, 'settings': block.settings}) }}
{% endif %}
{% endfor %}
</div>
{% endif %}
</div>
{% if has_bottom %}
<div class="row">
{% for block in blocks.bottom %}
{% if block.roles|length == 0 or is_granted_affirmative(block.roles) %}
<div class="{{ block.class }}">
{{ sonata_block_render({ 'type': block.type, 'settings': block.settings}) }}
</div>
{% endif %}
{% endfor %}
</div>
{% endif %}
{{ sonata_block_render_event('sonata.admin.dashboard.bottom', { 'admin_pool': sonata_admin.adminPool }) }}
{% endblock %}
{#
This file is part of the Sonata package.
Modified for MLC from Sonata package.
(c) Thomas Rabaix <thomas.rabaix@sonata-project.org>
For the full copyright and license information, please view the LICENSE
file that was distributed with this source code.
(c) Julien Jorry <julien.jorry@gmail.com>
#}
......@@ -28,6 +25,7 @@ file that was distributed with this source code.
{% block meta_tags %}
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta charset="UTF-8">
<link rel="shortcut icon" href="{{parameter('favicon_url')}}" type="image/x-icon" />
<meta content='width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no' name='viewport'>
{% endblock %}
......@@ -128,6 +126,8 @@ file that was distributed with this source code.
{% endblock %}
{% block logo %}
{% spaceless %}
{# MLC : LIEN VERS LE FRONT SUR LE LOGO #}
{# <a class="logo" href="{{ path('index') }}"> #}
<a class="logo" href="{{ path('sonata_admin_dashboard') }}">
{% if 'single_image' == sonata_admin.adminPool.getOption('title_mode') or 'both' == sonata_admin.adminPool.getOption('title_mode') %}
<img src="{{ asset(sonata_admin.adminPool.titlelogo) }}" alt="{{ sonata_admin.adminPool.title }}">
......@@ -140,6 +140,16 @@ file that was distributed with this source code.
{% endblock %}
{% block sonata_nav %}
<nav class="navbar navbar-static-top" role="navigation">
{# MLC : AJOUT POUR LIEN VERS LE FRONT #}
{% block front %}
<a href="{{path('index')}}" class="sidebar-front"
role="button" title="{{ "Page d'accueil"|trans({}, 'app') }}">
<i class="fa fa-lg fa-home"></i>
<span class="sr-only">{{ "Page d'accueil"|trans({}, 'app') }}</span>
</a>
{% endblock front %}
<a href="#" class="sidebar-toggle" data-toggle="offcanvas"
role="button" title="{{ 'toggle_navigation'|trans({}, 'SonataAdminBundle') }}">
<span class="sr-only">{{ 'toggle_navigation'|trans({}, 'SonataAdminBundle') }}</span>
......@@ -398,8 +408,9 @@ file that was distributed with this source code.
{% endblock %}
{% endif %}
{# AJOUT POUR EDITABLE BOOLEAN #}
{# MLC : AJOUT POUR EDITABLE BOOLEAN #}
{% block js %}
{{ encore_entry_script_tags('admin') }}
<script type="text/javascript">
$(document).ready(function() {
$.datepicker.regional['fr'] = {
......
......@@ -16,7 +16,7 @@
{# FAVICON #}
<link rel="shortcut icon" href="{{parameter('favicon_url')}}" type="image/x-icon" />
{# UTILISER LES FONT AWESOME POUR L'ICONOGRAPHIE #}
<link rel="stylesheet" href="/fontawesome/css/all.css">
<link rel="stylesheet" href="/fontawesome/css/all.min.css">
{# UTILISER LEAFLET POUR LA CARTE #}
<link rel="stylesheet" href="/leaflet/leaflet.css">
......
......@@ -54,23 +54,20 @@
{# MENU ADHERENT CONNECTE #}
{% if is_granted('ROLE_ADHERENT') %}
<a href="{{ path('adherent_infos') }}" class="dropdown-item">{{ 'Mes infos'|trans }}</a>
{# <a href="{{ path('adherent_infos') }}" class="dropdown-item">{{ 'Mes infos'|trans }}</a>
<a href="{{ path('transactionAdherentPrestataire') }}" class="dropdown-item">{{ 'Transaction vers presta'|trans }}</a>
<a href="{{ path('transactionAdherentAdherent') }}" class="dropdown-item">{{ 'Transaction vers adherent'|trans }}</a>
<a href="{{ path('transactionAdherentAdherent') }}" class="dropdown-item">{{ 'Transaction vers adherent'|trans }}</a> #}
{% endif %}
{# MENU PRESTATAIRE CONNECTE #}
{% if is_granted('ROLE_PRESTATAIRE') %}
<a href="{{ path('prestataire_infos') }}" class="dropdown-item">{{ 'Mes infos'|trans }}</a>
{# <a href="{{ path('prestataire_infos') }}" class="dropdown-item">{{ 'Mes infos'|trans }}</a>
<a href="{{ path('transactionPrestataireAdherent') }}" class="dropdown-item">{{ 'Transaction vers adherent'|trans }}</a>
<a href="{{ path('transactionPrestatairePrestataire') }}" class="dropdown-item">{{ 'Transaction vers presta'|trans }}</a>
<a href="{{ path('transactionPrestatairePrestataire') }}" class="dropdown-item">{{ 'Transaction vers presta'|trans }}</a> #}
{% endif %}
{# MENU PRESTATAIRE CONNECTE #}
{# MENU TRESORIER CONNECTE #}
{% if is_granted('ROLE_TRESORIER') %}
<a href="{{ path('prestataire_infos') }}" class="dropdown-item">{{ 'Mes infos'|trans }}</a>
<a href="{{ path('transactionPrestataireAdherent') }}" class="dropdown-item">{{ 'Transaction vers adherent'|trans }}</a>
<a href="{{ path('transactionPrestatairePrestataire') }}" class="dropdown-item">{{ 'Transaction vers presta'|trans }}</a>
{% endif %}
{% if app.user.groups|length > 1 %}
......
{% extends 'block/block_collapse.html.twig' %}
{% block blocktitle %}
<i class="fa fa-cogs mr-4"></i> {{'Configuration du Comptoir'|trans}}
{% endblock blocktitle %}
{% block blocksubtitle %}
{% endblock blocksubtitle %}
{% block blockcontent %}
{% set form = getComptoirInfosForm(app.user) %}
{{form_start(form)}}
{{ form_row(form.name) }}
{{ form_row(form.content) }}
{{ form_row(form.media) }}
{{ form_row(form.save) }}
{{form_end(form)}}
{% endblock blockcontent %}
\ No newline at end of file
{% extends 'block/onetransaction.html.twig' %}
{% block blocktitle %}
<i class="fa fa-external-link-alt mr-4"></i> Reconversion
{% endblock blocktitle %}
{% block blockcontent %}
{% set form = getTransfertPrestataireComptoirForm(app.user) %}
{{ parent() }}
{% endblock blockcontent %}
\ No newline at end of file
{% extends 'block/onetransaction.html.twig' %}
{% block blocktitle %}
<i class="fa fa-exchange-alt mr-4"></i> Virement vers un adhérent
{% endblock blocktitle %}
{% block blockcontent %}
{% set form = getTransfertComptoirToXForm(app.user, 'adherent') %}
{{ parent() }}
{% endblock blockcontent %}
\ No newline at end of file
{% extends 'block/block_collapse.html.twig' %}
{% block blocktitle %}
<i class="fa fa-cogs mr-4"></i> {{'Configuration du Groupe local'|trans}}
{% endblock blocktitle %}
{% block blocksubtitle %}
{% endblock blocksubtitle %}
{% block blockcontent %}
{% set form = getGroupeInfosForm(app.user) %}
{{form_start(form)}}
{{ form_row(form.name) }}
{{ form_row(form.content) }}
{{ form_row(form.save) }}
{{form_end(form)}}
{% endblock blockcontent %}
\ No newline at end of file
{% extends 'block/block_collapse.html.twig' %}
{% block blocktitle %}
<i class="fa fa-apple-alt mr-4"></i> {{'Inscription AMAP/Marchés'|trans}}
{% endblock blocktitle %}
{% block blocksubtitle %}
{% endblock blocksubtitle %}
{% block blockcontent %}
{% set form = getGroupePrestataireInscriptionForm(app.user) %}
{{form_start(form)}}
<div class="groupeprestas" data-prototype="{{ form_widget(form.groupeprestataires.vars.prototype)|e }}">
{% for groupe in form.groupeprestataires %}
{{ form_row(groupe) }}
{% endfor %}
</div>
{{ form_row(form.save) }}
{{form_end(form)}}
{% endblock blockcontent %}
\ No newline at end of file
......@@ -3,32 +3,19 @@
{% block content %}
<div class='container homepage'>
<div class='row mt-3'>
<div class='col-12 col-md-3'>
<div class='col-12 order-2 order-md-1 col-md-3'>
{% block colonne_gauche %}
{% include 'common/stats.html.twig' %}
{% include 'common/groupes.html.twig' %}
{% include 'common/rubriques.html.twig' %}
{% endblock colonne_gauche %}
</div>
<div class='col-12 col-md-6 text-center'>
<div class='col-12 order-1 order-md-2 col-md-6 text-center'>
{% block colonne_centre %}
{% include 'presta/block/carte.html.twig' with {'title': 'Situer les Prestataires'|trans}%}
{% if is_granted('ROLE_PRESTATAIRE') %}
{% include 'presta/block/solde.html.twig' %}
{% include 'block/cotisations.html.twig' %}
{% include 'block/transactions.html.twig' %}
{% include 'presta/block/transaction_presta.html.twig' %}
{% include 'presta/block/transaction_adherent.html.twig' %}
{% elseif is_granted('ROLE_ADHERENT') %}
{% include 'adherent/block/solde.html.twig' %}
{% include 'block/cotisations.html.twig' %}
{% include 'block/transactions.html.twig' %}
{% include 'adherent/block/transaction_presta.html.twig' %}
{% include 'adherent/block/transaction_adherent.html.twig' %}
{% endif %}
{% include 'block/useradmin.html.twig' %}
{% endblock colonne_centre %}
</div>
<div class='col-12 col-md-3'>
<div class='col-12 order-3 order-md-3 col-md-3'>
{% block colonne_droite %}
{% if app.user is null %}
<a class='btn btn-secondary w-100 mb-4' title='{{'Se connecter'|trans}}' href="{{path('fos_user_security_login')}}">{{'Se connecter'|trans}}</a>
......
......@@ -4,4 +4,4 @@
<div class='cartetitle mb-3'>
<h4><i class="fa fa-map"></i> Situer les Prestataires</h4>
</div>
<div id="{{id}}" style="{{style}}"></div>
\ No newline at end of file
<div id="{{id}}" style="{{style}}" class='my-3'></div>
\ No newline at end of file
{% extends 'block/block_collapse.html.twig' %}
{% block blocktitle %}
<i class="fa fa-user-tie mr-4"></i> {{'Professionnel'|trans}}
{% endblock blocktitle %}
{% block blocksubtitle %}
{% endblock blocksubtitle %}
{% block blockcontent %}
{% set form = getPrestataireInfosForm(app.user) %}
{{form_start(form)}}
{{ form_row(form.groupe) }}
{{ form_row(form.raison) }}
{{ form_row(form.statut) }}
{{ form_row(form.siret) }}
{{ form_row(form.iban) }}
{{ form_row(form.responsable) }}
{{ form_row(form.metier) }}
{{ form_row(form.rubriques) }}
{{ form_row(form.geoloc) }}
{{ form_row(form.save) }}
{{form_end(form)}}
{% endblock blockcontent %}
\ No newline at end of file
{% extends 'block/onetransaction.html.twig' %}
{% block blocktitle %}
<i class="fa fa-external-link-alt mr-4"></i> Reconversion
{% endblock blocktitle %}
{% block blockcontent %}
{% set form = getTransfertPrestataireSiegeForm(app.user) %}
{{ parent() }}
{% endblock blockcontent %}
\ No newline at end of file
<div class="card mb-3">
<div class="card-header">Solde de mon compte : <b>{{app.user.prestataire.compte}}</b></div>
<div class="card mb-3 {% if app.user and app.user.prestataire and app.user.prestataire.compte > 0 %}border-success{% else %}border-error{% endif %}">
<div class="card-header"><i class="fa fa-coins mr-4"></i> Solde de mon compte : <b>{{app.user.prestataire.compte}}</b></div>
</div>
\ No newline at end of file
{% extends 'block/onetransaction.html.twig' %}
{% block blocktitle %}
<i class="fa fa-user mr-4"></i> Virement vers un adhérent
<i class="fa fa-exchange-alt mr-4"></i> Virement vers un adhérent
{% endblock blocktitle %}
{% block blockcontent %}
{% set form = getTransactionPrestataireAdherentForm(app.user) %}
......
{% extends 'block/onetransaction.html.twig' %}
{% block blocktitle %}
<i class="fa fa-user mr-4"></i> Virement vers un prestataire
<i class="fa fa-exchange-alt mr-4"></i> Virement vers un prestataire
{% endblock blocktitle %}
{% block blockcontent %}
{% set form = getTransactionPrestatairePrestataireForm(app.user) %}
......
{% extends 'common/layout.html.twig' %}
{% block content %}
<div class='container prestataire_infos'>
<div class="row">
<div class="col-sm-12 col-md-6">
<div class='infos mt-4'>
{{form_start(form)}}
<h4><a class="btn btn-block btn-secondary" data-toggle="collapse" href="#infospresta" role="button" aria-expanded="false" aria-controls="infospresta"><span class="btn-label"><i class="fas fa-cogs mr-2"></i></span>Modifier les informations du prestataire</a></h4>
<div class="collapse" id="infospresta">
<div class="card card-body">
{{ form_row(form.groupe) }}
{{ form_row(form.raison) }}
{{ form_row(form.statut) }}
{{ form_row(form.siret) }}
{{ form_row(form.iban) }}
{{ form_row(form.responsable) }}
{{ form_row(form.metier) }}
{{ form_row(form.geoloc) }}
{{ form_row(form.save) }}
</div>
</div>
<h4><a class="btn btn-block btn-secondary" data-toggle="collapse" href="#infosuser" role="button" aria-expanded="false" aria-controls="infosuser">Modifier les informations du l'utilisateur</a></h4>
<div class="collapse" id="infosuser">
<div class="card card-body">
{{ form_row(form.user) }}
{{ form_row(form.save2) }}
</div>
</div>
{{form_end(form)}}
</div>
</div>
<div class="col-sm-12 col-md-6">
{% if app.user.prestataire is not null and app.user.prestataire.compte >= 0 %}
<div class='compte mt-4'>
<h4>Mon compte :</h4>
<ul class='list-group'>
<li class="list-group-item">{{(app.user.prestataire.compte)|number_format(2, '.', ',')}}</li>
</ul>
</div>
{% endif %}
{% if app.user.cotisations|length > 0 %}
<div class='cotisations mt-4'>
<h4>Mes cotisations :</h4>
<ul class='list-group'>
{% for cotisation in app.user.cotisations %}
<li class="list-group-item">{{cotisation.annee|upper}} : {{cotisation.montant}}&euro; (payée le {{cotisation.createdAt|date('d-m-Y')}})</li>
{% endfor %}
</ul>
</div>
{% endif %}
{% if getAllFlux(app.user, app.request).getTotalItemCount > 0 %}
<div class='flux mt-4'>
<h4>Mes transactions :</h4>
<h5>({{getAllFlux(app.user, app.request).getTotalItemCount}})</h5>
<ul class='list-group'>
{% for flux in getAllFlux(app.user, app.request) %}
<li class="list-group-item">{{flux.parenttype|capitalize}} à {{flux.destinataire}} {{flux.montant}}&euro; (payée le {{flux.createdAt|date('d-m-Y')}})</li>
{% endfor %}
</ul>
</div>
{% endif %}
{% if app.user.prestataire.rubriques|length > 0 %}
<div class='flux mt-4'>
<h4>Mes rubriques :</h4>
<ul class='list-group'>
{% for rubrique in app.user.prestataire.rubriques %}
{% if rubrique.enabled %}
<li class="list-group-item">{{rubrique.name|capitalize}}</li>
{% endif %}
{% endfor %}
</ul>
</div>
{% endif %}
</div>
</div>
</div>
{% endblock %}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment