Christophe Robillard
50fcd24b46
admin: fix pending demandes
...
fetch email with map
2020-02-04 16:21:42 +01:00
Christophe Robillard
53f420c748
admin: fix sql column ambiguity
...
administrateurs_instructeurs and users (loaded by
Administrateur.default_scope) have administrateur_id column with same
name. This commit indicates which column to use for GROUP query.
2020-02-04 16:21:42 +01:00
Christophe Robillard
cef776ff9e
admin: fix add administrateur to a procedure
2020-02-04 16:21:42 +01:00
Christophe Robillard
f8309c45a6
admin: order by user email
2020-02-04 16:21:42 +01:00
Christophe Robillard
91f1722088
admin: always eager load the user relationship
...
Now that `Administrateur.email` is merely an alias to
`administrateur.user.email`,
and we changed every occurence of `administrateurs.pluck(:email)` to
`administrateurs.map(&:email)`, the new version using `map` may cause N+1
queries if the users have not been preloaded.
It makes sense to always preload the user when fetching an
Administrateur:
- Administrateur and User have a strongly coupled relationship
- It avoids N+1 queries everywhere in the app
Of course fetching an administrateur without needing its user will now do
an unecessary fetch of the associated user. But it seems better than
leaving a risk of N+1 queries in many places.
2020-02-04 16:21:42 +01:00
Christophe Robillard
4a1980e95a
admin: disable the email column
2020-02-04 16:21:42 +01:00
Christophe Robillard
ed970d3f3c
admin: create without providing email
2020-02-04 16:21:42 +01:00
Christophe Robillard
2bb161c3cb
admin: alias Administrateur.email
2020-02-04 16:21:42 +01:00
Christophe Robillard
055918aabc
admin: replace calls to Administrateur.find_by(email: ...)
2020-02-04 16:21:42 +01:00
Christophe Robillard
c137917396
fix typo
2020-02-04 16:07:01 +01:00
Christophe Robillard
deb11f281f
remove useless relation between administrateur and dossiers
2020-02-04 16:07:01 +01:00
Christophe Robillard
5a46effcbc
remove useless condition to admin that can be deleted
...
administrateur can be deleted only if he/she has a procedure where
he/she is the only admin
2020-02-04 16:07:01 +01:00
Christophe Robillard
6fc8a27bd7
destroys not all dossiers
...
but only dossiers for a specific user
2020-02-04 16:07:01 +01:00
Christophe Robillard
cee4c5b8fb
Revert "Revert "4127 fix superadmin supprime compte usager""
...
This reverts commit 751f24f7bb
.
2020-02-04 16:07:01 +01:00
Paul Chavard
5afe158c89
Tweak a bit timeout values for export polling
2020-02-03 15:56:10 +01:00
Paul Chavard
068471003d
Add a timeout to select2 queries
2020-02-03 15:34:08 +01:00
Paul Chavard
a86129c3a1
Revert "Revert "Update javascript dependencies and add webpack-bundle-analyzer""
...
This reverts commit eddd59e554
.
2020-02-03 14:54:25 +01:00
Paul Chavard
08400cdd4c
Poll for export readiness updates
2020-01-29 22:52:03 +01:00
Keirua
eddd59e554
Revert "Update javascript dependencies and add webpack-bundle-analyzer"
2020-01-29 14:51:55 +01:00
clemkeirua
1c3573c7db
fix DoubleRender error for brouillon pdf
2020-01-29 14:24:23 +01:00
clemkeirua
fcea7c4f85
remove invalid excel worksheet characters
2020-01-29 11:45:56 +01:00
Paul Chavard
6030409b2f
[GraphQL] Use GraphQL::Types::BigInt instead of Int
2020-01-28 21:48:00 +01:00
Pierre de La Morinerie
96932faa3f
models: add a Dossier#with_hidden scope, and remove unscoped
usages
2020-01-28 17:32:38 +01:00
Pierre de La Morinerie
1448d5b098
models: add a Procedure#with_hidden scope, and remove unscoped
usages
...
This avoids the broad use of `unscoped` to remove the `hidden_at`
clause.
2020-01-28 17:32:38 +01:00
Paul Chavard
4982039086
Fix fontawesome not tree shaking properly
2020-01-28 16:37:44 +01:00
Paul Chavard
7ebebf2e80
Refactor leaflet code for better loading
2020-01-28 16:37:44 +01:00
clemkeirua
5f65665b07
added a method for modifying a user email
2020-01-28 16:15:46 +01:00
Paul Chavard
0a928b2d6b
[GraphQL] use Execution::Interpreter
...
GraphQL-Ruby 1.9.0 includes a new runtime module which you may use for your schema. Eventually, it will become the default.
2020-01-28 15:39:37 +01:00
Paul Chavard
7478a51846
[GraphQL] use official skylight support
2020-01-28 15:39:37 +01:00
Pierre de La Morinerie
6eaf0f7804
dossiers: fix the sticky bar on IE 11
...
This allows IE 11 users to see the draft autosave indicator.
The layout on IE 11 is still buggy though - but it's better than
nothing.
2020-01-28 15:20:30 +01:00
Paul Chavard
eec38bad73
Ajouter les informations de l’instructeur et de l’expert dans l’export des avis
...
fix #4667
2020-01-28 15:09:41 +01:00
Pierre de La Morinerie
9da4fa9f4d
dossier: ensure the dossier groupe_instructeur is always present
...
Otherwise we loose the link to the dossier's procedure, which is
definitely a bad thing.
2020-01-28 14:58:34 +01:00
Pierre de La Morinerie
eb9388d59f
dossier: ensure the routing dropdown must be selected
...
A blank routing dropdown nullify the groupe_instructeur – which
also removes the link between the dossier and the procedure.
Fix #4717
2020-01-28 14:58:34 +01:00
clemkeirua
696e39761f
deal with secondary_options that can be nil
2020-01-28 14:30:26 +01:00
clemkeirua
65b4bcf3a1
Permet de déposer un dossier lorsqu'un menu déroulant lié obligatoire n'a pas de valeur (car la liste est légitimement vide) dans le second champ.
2020-01-28 14:30:26 +01:00
Paul Chavard
517ab25783
Register canonical procedure when demarche republished under existing path
2020-01-28 12:49:53 +01:00
Keirua
455f164d02
Detail the reason why we include the search term in the results
...
Co-Authored-By: Pierre de La Morinerie <pierre.de_la_morinerie@beta.gouv.fr>
2020-01-27 16:47:32 +01:00
clemkeirua
9e858ae5ad
possibilite de selectionner un resultat quand il n'y a rien dans le champ adresse
2020-01-27 12:51:06 +01:00
Paul Chavard
f03cca4386
Search departements by code
2020-01-23 14:12:19 +00:00
Pierre de La Morinerie
751f24f7bb
Revert "4127 fix superadmin supprime compte usager"
2020-01-21 18:57:54 +01:00
Pierre de La Morinerie
a63c3dbfc4
app: improve wording of the strike banner
...
Make it clearer that the strike affects only the DS staff.
2020-01-21 16:49:55 +01:00
Christophe Robillard
88e73d4039
raise exception if problem with destroy
2020-01-21 15:05:33 +01:00
Christophe Robillard
675bbdad15
transfere les services lors de suppression admin
...
Lorsqu'un administrateur est supprimé, ses services sont transférés à un
autre administrateur pour chacune de ses procédures
2020-01-21 15:05:33 +01:00
Christophe Robillard
d9570eedc6
empêche suppression d'un user qui est instructeur
2020-01-21 15:05:33 +01:00
Christophe Robillard
a6d007dbd3
supprime un instructeur
2020-01-21 15:05:33 +01:00
Christophe Robillard
d4de5769ee
empêche la suppression d'un user qui est admin
2020-01-21 15:05:33 +01:00
Christophe Robillard
d8a51f986f
supprime un utilisateur qui a des dossiers cachés
2020-01-21 15:05:33 +01:00
clemkeirua
fb87a87f47
code review changes
2020-01-20 16:15:02 +01:00
clemkeirua
794e95e6eb
fix total count of groupe_instructeur
2020-01-20 16:15:02 +01:00
clemkeirua
12430a8068
ajout d'un écran intermediaire pour gérer la reaffectation des dossiers
2020-01-20 16:15:02 +01:00