Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
hmeneuvrier committed Sep 20, 2024
2 parents 63313e7 + f4b94ea commit 672928b
Show file tree
Hide file tree
Showing 217 changed files with 1,286 additions and 429 deletions.
1 change: 1 addition & 0 deletions .env
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ CLAMAV_HOST=histologe_clamav
CLAMAV_STRATEGY=clamd_unix
CLAMAV_SCAN_ENABLE=1
HISTORY_TRACKING_ENABLE=1
FEATURE_SCHS_SYNC_EVENT_ENABLE=0
### histologe ###

### object storage S3 ###
Expand Down
2 changes: 1 addition & 1 deletion .env.sample
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ CLAMAV_HOST=histologe_clamav
CLAMAV_STRATEGY=clamd_unix
CLAMAV_SCAN_ENABLE=1
FEATURE_PROFIL_EDITION_ENABLED=1

FEATURE_SCHS_SYNC_EVENT_ENABLE=0
###> knplabs/knp-snappy-bundle ###
WKHTMLTOPDF_PATH=wkhtmltopdf
WKHTMLTOIMAGE_PATH=wkhtmltoimage
Expand Down
32 changes: 0 additions & 32 deletions assets/app-back-bo.ts

This file was deleted.

3 changes: 0 additions & 3 deletions assets/app-front-signalement-form.ts

This file was deleted.

3 changes: 0 additions & 3 deletions assets/app-front-stats.ts

This file was deleted.

14 changes: 0 additions & 14 deletions assets/app.ts

This file was deleted.

32 changes: 32 additions & 0 deletions assets/scripts/app-back-bo.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
import './base-import.ts';

import './vue/index';
import './vue/signalement-list.ts';
import './vue/dashboard.ts';

import './vanilla/services/data_delete.js'
import './vanilla/services/modale_cgu_bo.js';
import './vanilla/services/pagination.js'
import './vanilla/services/search_filter_form.js'
import './vanilla/services/table_sortable.js'
import './vanilla/services/list_filter_helper.js';

import './vanilla/controllers/form_account.js';
import './vanilla/controllers/form_nde.js';
import './vanilla/controllers/form_notification.js';
import './vanilla/controllers/form_visite.js';
import './vanilla/controllers/form_modal_handler.js';

import './vanilla/controllers/back_account/back_account.js'
import './vanilla/controllers/back_archived_signalements/back_archived_signalements_reactiver.js'
import './vanilla/controllers/back_auto_affectation_rule/form_auto_affectation_rule.js'
import './vanilla/controllers/back_partner_view/form_partner.js';
import './vanilla/controllers/back_signalement_view/back_view_signalement.js';
import './vanilla/controllers/back_signalement_view/form_upload_documents.js';
import './vanilla/controllers/back_signalement_view/input_autocomplete_bailleur.js';
import './vanilla/controllers/back_signalement_view/form_cloture_modal.js';
import './vanilla/controllers/back_signalement_view/form_acceptation_refus.js';
import './vanilla/controllers/back_signalement_edit_file/back_signalement_edit_file.js';
import './vanilla/controllers/back_signalement_delete_file/back_signalement_delete_file.js';
import './vanilla/controllers/back_signalement_list_export/back_signalement_list_export.js';
import './vanilla/controllers/back_profil_edit_email/back_profil_edit_email.js';
3 changes: 3 additions & 0 deletions assets/scripts/app-front-signalement-form.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import './base-import.ts';

import './vue/signalement-form.ts';
3 changes: 3 additions & 0 deletions assets/scripts/app-front-stats.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import './base-import.ts';

import './vue/front-stats.ts';
14 changes: 14 additions & 0 deletions assets/scripts/app.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
// any CSS you import will output into a single css file (app.css in this case)
import '../styles/histologe.scss';

import './base-import.ts';

import './vanilla/services/component_search_address.js';
import './vanilla/services/form_helper.js';
import './vanilla/services/cookie_banner.js';
import './vanilla/services/maintenance_banner.js';

import './vanilla/controllers/activate_account/activate_account.js';
import './vanilla/controllers/front_demande_lien_signalement/front_demande_lien_signalement.js';
import './vanilla/controllers/front_suivi_signalement/front_suivi_signalement.js';
import './vanilla/controllers/front_contact/front_contact.js';
2 changes: 1 addition & 1 deletion assets/base-import.ts → assets/scripts/base-import.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import {
SENTRY_DSN_FRONT,
SENTRY_ENVIRONMENT,
SENTRY_TRACES_SAMPLE_RATE
} from'./controllers/environment'
} from'./vanilla/controllers/environment'

Sentry.init({
dsn: SENTRY_DSN_FRONT,
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
56 changes: 56 additions & 0 deletions assets/scripts/vanilla/services/search_filter_form.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
const setBadge = (el) => {
let container = el.parentElement.querySelector('.selected__value');
if (el.value !== '') {
let badge = document.createElement('span');
badge.classList.add('fr-badge', 'fr-badge--success', 'fr-m-1v')
badge.innerText = el.selectedOptions[0].text;
let input = document.createElement('input');
input.type = "hidden";
input.name = `${el.id}[]`;
input.value = el.value;
container.append(input);
badge.setAttribute('data-value', el.value);
container.querySelector('.fr-badge:not([data-value])')?.classList?.add('fr-hidden');
container.append(badge)
el.selectedOptions[0].classList.add('fr-hidden')
badge.addEventListener('click', (event) => {
removeBadge(badge);
})
} else {
container.querySelectorAll('.fr-badge[data-value]').forEach(badge => {
removeBadge(badge);
})
}
return false;
}
const removeBadge = (badge) => {
let val = badge.getAttribute('data-value');
let input = badge.parentElement.querySelector(`input[value="${val}"]`);
let select = badge?.parentElement?.parentElement?.querySelector(`select`) ?? badge?.parentElement?.parentElement?.querySelector(`input[type="date"]`);
select.querySelector(`option[value="${val}"]`)?.classList?.remove('fr-hidden');
input?.remove();
let badges = badge.parentElement.querySelectorAll('.fr-badge[data-value]').length !== 1;
console.log(badge.parentElement.querySelectorAll('.fr-badge[data-value]').length)
if (!badges) {
badge?.parentElement?.querySelector('.fr-badge:not([data-value])')?.classList?.remove('fr-hidden');
if (select.tagName === 'SELECT')
select.options[0].selected = true;
}
badge.remove();
}

document?.querySelectorAll('.select-search-filter-form')?.forEach(select => {
select.addEventListener(
"change",
() => {
setBadge(select);
},
false,
);
})

document?.querySelectorAll('[data-removable="true"]')?.forEach(removale => {
removale.addEventListener('click', () => {
removeBadge(removale);
})
})
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ export default defineComponent({
}
.histo-multi-select .selector {
background-color: #FFF;
background-color: var(--background-contrast-grey);
cursor: pointer;
}
.histo-multi-select.inactive .selector {
Expand All @@ -153,7 +153,7 @@ export default defineComponent({
width: 100%;
font-size: 1rem;
line-height: 1.5rem;
background-color: #FFF;
background-color: var(--background-contrast-grey);
border-radius: 4px;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,6 @@ export default defineComponent({

<style>
.histo-select select {
background-color: #FFF;
background-color: var(--background-contrast-grey);
}
</style>
Original file line number Diff line number Diff line change
Expand Up @@ -54,18 +54,22 @@ export default defineComponent({
<style>
@import 'datatables.net-dt';
.histo-data-table table {
border: 1px solid var(--border-contrast-grey);
}
.histo-data-table table thead {
color: var(--blue-france-sun-113-625);
color: var(--text-default-grey);
background-color: var(--background-alt-grey);
text-decoration: underline;
}
.histo-data-table table.dataTable.display tbody td {
box-shadow: none;
background-color: #FFF;
text-align: left;
}
.histo-data-table table.dataTable.display > tbody > tr.odd > td {
background-color: #CACAFBA6;
}
.histo-data-table table.dataTable.display > tbody > tr.even > td.sorting_1, .histo-data-table table.dataTable.display > tbody > tr.odd > td.sorting_1 {
box-shadow: none;
}
Expand All @@ -78,11 +82,12 @@ export default defineComponent({
}
.histo-data-table .dataTables_wrapper .dataTables_paginate .paginate_button.current {
border: 0px;
background: var(--blue-france-850-200);
background-color: var(--background-active-blue-france);
color: var(--text-inverted-blue-france) !important;
}
.histo-data-table .dataTables_wrapper .dataTables_paginate .paginate_button:hover {
color: #161616 !important;
background-color: #E5E5E5;
--hover-tint: var(--hover);
}
</style>
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,6 @@ export default defineComponent({

<style>
#app-dashboard {
background-color: #F6F6F6;
height: 100%;
}
</style>
Original file line number Diff line number Diff line change
Expand Up @@ -293,6 +293,7 @@ export default defineComponent({
<style>
.histo-dashboard-cards .fr-card .fr-card__body {
padding: 1.5rem;
box-shadow: 0px 3px 6px #16161633;
}
.histo-dashboard-cards .fr-card .fr-card__content {
padding: 0px;
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import axios from 'axios'
import formStore from './store'
import * as Sentry from '@sentry/browser'
import { AXIOS_TIMEOUT } from '../../../controllers/environment'
import { AXIOS_TIMEOUT } from '../../../vanilla/controllers/environment'

export const requests = {
doRequestGet (ajaxUrl: string, functionReturn: Function) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -511,12 +511,6 @@ export default defineComponent({
</script>
<style>
.grey-background {
.histo-select select {
background-color: var(--background-contrast-grey);
}
.histo-multi-select .selector {
background-color: var(--background-contrast-grey);
}
.histo-date-picker input {
background-color: var(--background-contrast-grey);
box-shadow: inset 0 -2px 0 0 var(--border-plain-grey);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -193,14 +193,6 @@ export default defineComponent({
</script>

<style>
.histo-app-stats {
background-color: var(--background-alt-grey);
}
.histo-app-stats a {
color: var(--blue-france-sun-113-625);
}
.loading {
font-size: 2rem;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<template #title>Criticité moyenne</template>
</TheHistoStatsDetailsItem>

<div class="fr-col-12">
<div class="fr-col-12 histo-chart-line">
<HistoChartLine :items=sharedState.stats.countSignalementPerMonth>
<template #title>Nombre total de signalements</template>
</HistoChartLine>
Expand Down Expand Up @@ -146,4 +146,8 @@ export default defineComponent({
font-style: italic;
font-size: 0.8rem;
}
.histo-chart-line {
border: 1px solid var(--blue-france-sun-113-625);
}
</style>
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ export default defineComponent({
font-weight: bold;
background: #FFF;
padding: 1rem 0.5rem;
border: 1px solid var(--border-default-grey);
}
.histo-stats-details-item div p:first-child {
font-size: 0.8rem;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@
</HistoCheckbox>
</div>
<div class="fr-col-12 fr-col-lg-12 fr-col-xl-3 align-right">
<a href="#" @click="onReinitLocalEvent"><span class="fr-fi-refresh-line"></span>Tout réinitialiser</a>
<a href="#" @click="onReinitLocalEvent" class="fr-link"><span class="fr-fi-refresh-line"></span>Tout réinitialiser</a>
</div>
</div>
</div>
Expand Down Expand Up @@ -172,4 +172,9 @@ export default defineComponent({
color: var(--blue-france-sun-113-625);
--icon-size: 1.1rem;
}
.histo-date-picker input {
background-color: var(--background-contrast-grey);
box-shadow: inset 0 -2px 0 0 var(--border-plain-grey);
border-radius: .25rem .25rem 0 0;
}
</style>
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes.
15 changes: 0 additions & 15 deletions assets/services/search_filter_form.js

This file was deleted.

8 changes: 8 additions & 0 deletions assets/styles/histologe.scss
Original file line number Diff line number Diff line change
Expand Up @@ -835,6 +835,10 @@ a.photo-preview {
cursor: pointer;
}

.avatar-histologe{
border-radius: 50%;
border: 1px solid var(--blue-france-main-525);
}
.avatar-placeholder {
display: flex;
align-items: center;
Expand Down Expand Up @@ -868,4 +872,8 @@ a.photo-preview {
width: 26px;
height: 26px;
font-size: 13px;
}

.text-decoration-underline{
text-decoration: underline;
}
Loading

0 comments on commit 672928b

Please sign in to comment.