-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[BO - Signalement] Affichage bouton édition et Modale d'édition de document #2235
[BO - Signalement] Affichage bouton édition et Modale d'édition de document #2235
Conversation
enum DocumentType: String | ||
{ | ||
use EnumTrait; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Je n'ai pas généralisé l'utilisation de l'EnumTrait, car ça mme semble risqué de mesurer les effets de bords.
Peut-être à penser à chaque fois qu'on touche un Enum
42e79f2
to
882ef45
Compare
70b99f0
to
03788eb
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
assets/controllers/back_signalement_edit_file/back_signalement_edit_file.js
Show resolved
Hide resolved
@numew effectivement, certains labels ont du html, j'avais oublié ça... 🤔 ... tu as une idée pour le dégager ? |
Je n'avais pas d'idée particulière en faisant la remarque, je pense que couper la chaîne à partir du premier caractère "<" ferait l'affaire, l'utilisation du critère me va bien aussi |
Si on coupe à partir du premier |
41b70a9
to
9704fdf
Compare
8235089
to
b0bf8b2
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Je n'ai à présent plus les bouton de suppression sur les photo et document en tant que super admin
|
||
private function isPartnerFileDeletableByAdmin(File $file, User $user): bool | ||
{ | ||
return $file->isPartnerFile() && $this->isAdminOrRTonHisTerritory($file, $user); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Je n'ai plus la possibilité de supprimer les image et documents (même en SUPER ADMIN), à première vu ca viendrait d'ici (il faut une condition OU au lieu de ET si je dis pas de bêtise)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
D'après les specs, même les super admins ne peuvent pas supprimer les photos et documents uploadés par les utilisateurs : https://github.com/MTES-MCT/histologe/wiki/Ajout-documents#bo---supprimer-les-documents-et-photos
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Je suis pas convaincu par cette spec mais d'accord
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Un retour de code en 2 fois
J'attends que tu valides avec Mathilde pour tester
@@ -77,6 +77,7 @@ | |||
content: (reference) => '<strong style="white-space: nowrap">' + reference.getAttribute('data-user') + '</strong>' + '<hr class="fr-pb-1v"><span style="white-space: nowrap">' + reference.getAttribute('data-mail') + '</span>', | |||
allowHTML: true, | |||
interactive: true, | |||
hideOnClick: true, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
j'ai essayé ça pour faire disparaitre le tooltip quand on affiche la modale. Je n'ai pas l'impression que ça marche.
J'ai aussi essayé document.querySelector('.part-infos-hover')._tippy.hide();
sans succès, si vous avez des idées
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
je pense que la fonction hide() n'existe qu'avec jQuery
peut-être essayent document.querySelector('.part-infos-hover').style.display = 'none';
ou un truc du genre ?
c'est dommage que l'option hideOnClick ne fonctionne pas
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Non, ça ne marche pas non plus...
d7c312e
to
66475e4
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mes retours de test (désolé si c'est précisé dans les specs que je n'ai pas lues intégralement...)
1/ Marges verticales à ajouter (déjà dit dans le code)
2/ si je suis dans un territoire, je peux sélectionner un type de doc ou photo (OK).
Mais en tant que SA, la liste est vide.
Normal ?
3/ la liaison aux désordres semble être différente de celle faite jusque là.
C'est à dire : je crée un signalement avec des photos liées à des désordres. Dans la modale Album, le nom du désordre s'affiche bien.
Par contre : je modifie le désordre dans la modale d'édition. Dans la modale Album, le nom du désordre est au format slug.
Editer <span class="fr-modal-file-edit-type"></span> | ||
</h1> | ||
|
||
<div class="fr-text--center fr-grid-row fr-grid-row--center"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ajouter un peu de marge verticale
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
En fait j'avoue que je ne vois pas trop pour la marge... c'est comme sur les autres modales.
On regarde jeudi ?
ok
non pas du tout... et je n'ai pas ce comportement (j'ai fait beaucoup de tests en SA)... c'est systématique ?
alors, il y a effectivement un truc bizarre, je ne pense pas que ça vienne de la PR, c'est dans SignalementDesordresProcessor.php, on a
ça veut dire qu'on a le label seulement si la photo est rattachée à une catégorie de désordre, et pas si elle est rattachée au critère ou à la précision... cf ici : https://histologe-staging.osc-fr1.scalingo.io/bo/signalements/ef321266-8703-4cab-9a93-25e31879d126 |
@emilschn je me suis occupée du point 3, pour le 1 et 2, je veux bien voir avec toi jeudi |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Relecture et tests OK
Un retour de test ! Je suis agent J'ai réussi à reproduire la liste de type vide, mais c'était un problème de cache js. Ca fonctionne pour le reste :) |
c00cd96
to
f6860d9
Compare
corrigé |
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Je valide :) Bravo !
Ticket
#2222
Description
Ajout de la possibilité d'éditer le type d'un document (et le desordreSlug le cas échéant).
Ajout d'un feature flipping sur les nouvelles fonctions liées aux documents
SPECS : https://github.com/MTES-MCT/histologe/wiki/Ajout-documents#bo---editer-les-documents-et-photos
Changements apportés
Pré-requis
Tests