Merge pull request #3436 from betagouv/dev

2019-02-14-01
This commit is contained in:
Pierre de La Morinerie 2019-02-14 15:49:15 +01:00 committed by GitHub
commit 3579d70435
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
23 changed files with 117 additions and 46 deletions

View file

@ -20,6 +20,7 @@ Vous souhaitez y apporter des changements ou des améliorations ? Lisez notre [
#### Développement #### Développement
- rbenv : voir https://github.com/rbenv/rbenv-installer#rbenv-installer--doctor-scripts
- Yarn : voir https://yarnpkg.com/en/docs/install - Yarn : voir https://yarnpkg.com/en/docs/install
- Overmind : - Overmind :
* Mac : `brew install overmind` * Mac : `brew install overmind`
@ -52,7 +53,11 @@ Afin d'initialiser l'environnement de développement, exécutez la commande suiv
overmind start overmind start
L'application tourne à l'adresse `http://localhost:3000`. Un utilisateur de test est disponible, avec les identifiants `test@exemple.fr`/`testpassword`. L'application tourne à l'adresse `http://localhost:3000`.
### Utilisateurs de test
En local, un utilisateur de test est créé automatiquement, avec les identifiants `test@exemple.fr`/`this is a very complicated password !`. (voir [db/seeds.rb](https://github.com/betagouv/tps/blob/dev/db/seeds.rb))
### Programmation des jobs ### Programmation des jobs

View file

@ -2,6 +2,7 @@ $blue: #0069CC;
$light-blue: #1C7EC9; $light-blue: #1C7EC9;
$lighter-blue: #C3D9FF; $lighter-blue: #C3D9FF;
$black: #333333; $black: #333333;
$white: #FFFFFF;
$grey: #999999; $grey: #999999;
$light-grey: #F8F8F8; $light-grey: #F8F8F8;
$border-grey: #CCCCCC; $border-grey: #CCCCCC;

View file

@ -53,6 +53,11 @@ strong {
font-weight: bold; font-weight: bold;
} }
sup {
vertical-align: super;
font-size: 0.83em;
}
.container { .container {
@include horizontal-padding($default-padding); @include horizontal-padding($default-padding);
max-width: $page-width + 2 * $default-padding; max-width: $page-width + 2 * $default-padding;

View file

@ -1,4 +1,5 @@
@import "colors"; @import "colors";
@import "constants";
#champs-editor { #champs-editor {
.spinner { .spinner {
@ -111,10 +112,21 @@
} }
} }
.header,
.footer { .footer {
margin-bottom: 70px;
}
.buttons {
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
margin-top: 30px; margin: 0px;
margin-bottom: 30px; position: fixed;
bottom: 0px;
background-color: $white;
max-width: $page-width;
width: 100%;
border: 1px solid $border-grey;
padding: 10px;
border-top-left-radius: 5px;
border-top-right-radius: 5px;
} }

View file

@ -53,7 +53,7 @@ class SupportController < ApplicationController
phone: params[:phone], phone: params[:phone],
text: params[:text], text: params[:text],
file: params[:file], file: params[:file],
dossier_id: dossier&.id, dossier_id: params[:dossier_id],
browser: browser_name, browser: browser_name,
tags: tags tags: tags
).send_form ).send_form

View file

@ -1,18 +1,5 @@
<template> <template>
<div class="champs-editor"> <div class="champs-editor">
<div v-if="state.typesDeChamp.length > 3" class="header">
<button class="button" @click.prevent="addChamp">
<template v-if="state.isAnnotation">
Ajouter une annotation
</template>
<template v-else>
Ajouter un champ
</template>
</button>
<button class="button primary" @click.prevent="save">Enregistrer</button>
</div>
<Draggable :list="state.typesDeChamp" :options="{handle:'.handle'}"> <Draggable :list="state.typesDeChamp" :options="{handle:'.handle'}">
<DraggableItem <DraggableItem
v-for="(item, index) in state.typesDeChamp" v-for="(item, index) in state.typesDeChamp"
@ -22,8 +9,9 @@
:key="item.id" /> :key="item.id" />
</Draggable> </Draggable>
<div class="footer"> <div class="footer"></div>
<button class="button" @click.prevent="addChamp"> <div class="buttons">
<button class="button" v-scroll-to="'.footer'" @click.prevent="addChamp">
<template v-if="state.isAnnotation"> <template v-if="state.isAnnotation">
Ajouter une annotation Ajouter une annotation
</template> </template>

View file

@ -1,11 +1,13 @@
import Vue from 'vue'; import Vue from 'vue';
import Draggable from 'vuedraggable'; import Draggable from 'vuedraggable';
import VueScrollTo from 'vue-scrollto';
import DraggableItem from './DraggableItem'; import DraggableItem from './DraggableItem';
import DraggableList from './DraggableList'; import DraggableList from './DraggableList';
Vue.component('Draggable', Draggable); Vue.component('Draggable', Draggable);
Vue.component('DraggableItem', DraggableItem); Vue.component('DraggableItem', DraggableItem);
Vue.use(VueScrollTo, { duration: 1500, easing: 'ease' });
addEventListener('DOMContentLoaded', () => { addEventListener('DOMContentLoaded', () => {
const el = document.querySelector('#champs-editor'); const el = document.querySelector('#champs-editor');

View file

@ -27,7 +27,7 @@ module ActiveStorage
def publicize(url) def publicize(url)
search = %r{^https://[^/]+/v1/AUTH_[a-f0-9]{32}} search = %r{^https://[^/]+/v1/AUTH_[a-f0-9]{32}}
replace = 'https://static.demarches-simplifiees.fr' replace = "https://#{ENV['APP_HOST']}/direct-upload"
url.gsub(search, replace) url.gsub(search, replace)
end end
end end

View file

@ -248,9 +248,6 @@
{ {
"nom": "ETHIOPIE" "nom": "ETHIOPIE"
}, },
{
"nom": "EX-REPUBLIQUE YOUGOSLAVE DE MACEDOINE"
},
{ {
"nom": "FEROE (ILES)" "nom": "FEROE (ILES)"
}, },
@ -431,6 +428,9 @@
{ {
"nom": "MACAO" "nom": "MACAO"
}, },
{
"nom": "MACEDOINE DU NORD (REPUBLIQUE DE)"
},
{ {
"nom": "MADAGASCAR" "nom": "MADAGASCAR"
}, },

View file

@ -45,7 +45,11 @@ class Etablissement < ApplicationRecord
def inline_adresse def inline_adresse
# squeeze needed because of space in excess in the data # squeeze needed because of space in excess in the data
"#{numero_voie} #{type_voie} #{nom_voie}, #{complement_adresse}, #{code_postal} #{localite}".squeeze(' ') [
"#{numero_voie} #{type_voie} #{nom_voie}",
complement_adresse,
"#{code_postal} #{localite}"
].reject(&:blank?).join(', ').squeeze(' ')
end end
def verify def verify

View file

@ -22,11 +22,12 @@
var previousPageUrl = null; var previousPageUrl = null;
addEventListener('turbolinks:load', function(event) { addEventListener('turbolinks:load', function(event) {
if (previousPageUrl) { if (previousPageUrl) {
var loadTimeMs = event.data.timing.visitEnd - event.data.timing.visitStart;
_paq.push(['setReferrerUrl', previousPageUrl]); _paq.push(['setReferrerUrl', previousPageUrl]);
_paq.push(['setCustomUrl', '/' + window.location.href]); _paq.push(['setCustomUrl', '/' + window.location.href]);
_paq.push(['setDocumentTitle', document.title]); _paq.push(['setDocumentTitle', document.title]);
_paq.push(['setGenerationTimeMs', loadTimeMs]); if (event.data && event.data.timing) {
_paq.push(['setGenerationTimeMs', event.data.timing.visitEnd - event.data.timing.visitStart]);
}
_paq.push(['trackPageView']); _paq.push(['trackPageView']);
} }
previousPageUrl = window.location.href; previousPageUrl = window.location.href;

View file

@ -5,8 +5,6 @@
.dossiers-headers.sub-header .dossiers-headers.sub-header
.container .container
= link_to "Commencer une nouvelle démarche", demarches_url, class: "button secondary new-demarche"
- if @dossiers_invites.count == 0 - if @dossiers_invites.count == 0
%h1.page-title Mes dossiers %h1.page-title Mes dossiers
@ -71,5 +69,7 @@
- else - else
.blank-tab .blank-tab
%h2.empty-text Aucun dossier. %h2.empty-text Aucun dossier.
%p.empty-text-details Vous navez pas encore commencé de démarche. %p.empty-text-details
= link_to "Commencer une nouvelle démarche", demarches_url, class: "button primary" Pour remplir une démarche, contactez votre administration en lui demandant le lien de la démarche.
%br
Celui ci doit ressembler à https://www.demarches-simplifiees.fr/commencer/xxx.

View file

@ -5,7 +5,7 @@
.title-container .title-container
%span.icon.folder %span.icon.folder
%h1= dossier.procedure.libelle %h1= dossier.procedure.libelle
%h2 Dossier nº #{dossier.id} %h2 Dossier nº #{dossier.id} - Déposé le #{l(dossier.en_construction_at, format: '%d %B %Y')}
- if current_user.owns?(dossier) - if current_user.owns?(dossier)
.header-actions .header-actions

View file

@ -24,7 +24,7 @@
- else - else
%ul %ul
- champ.cadastres.each do |pc| - champ.cadastres.each do |pc|
%li Parcelle n° #{pc.numero} - Feuille #{pc.code_arr} #{pc.section} #{pc.feuille} %li Parcelle n° #{pc.numero} - Feuille #{pc.code_arr} #{pc.section} #{pc.feuille} - #{pc.surface_parcelle.round} m<sup>2</sup>
- if champ.parcelles_agricoles? - if champ.parcelles_agricoles?
.areas-title Parcelles agricoles (RPG) .areas-title Parcelles agricoles (RPG)

View file

@ -18,7 +18,7 @@ namespace :'2018_07_31_nutriscore' do
champ_opts = { header_engagement_order_place => { source_overrides: { 'libelle' => 'PARTIE 3 : ENGAGEMENT DE LEXPLOITANT' }, destination_overrides: { 'libelle' => 'PARTIE 4 : ENGAGEMENT DE LEXPLOITANT' } } } champ_opts = { header_engagement_order_place => { source_overrides: { 'libelle' => 'PARTIE 3 : ENGAGEMENT DE LEXPLOITANT' }, destination_overrides: { 'libelle' => 'PARTIE 4 : ENGAGEMENT DE LEXPLOITANT' } } }
pays_drop_down_values = "FRANCE\r\nACORES, MADERE\r\nAFGHANISTAN\r\nAFRIQUE DU SUD\r\nALASKA\r\nALBANIE\r\nALGERIE\r\nALLEMAGNE\r\nANDORRE\r\nANGOLA\r\nANGUILLA\r\nANTIGUA-ET-BARBUDA\r\nANTILLES NEERLANDAISES\r\nARABIE SAOUDITE\r\nARGENTINE\r\nARMENIE\r\nARUBA\r\nAUSTRALIE\r\nAUTRICHE\r\nAZERBAIDJAN\r\nBAHAMAS\r\nBAHREIN\r\nBANGLADESH\r\nBARBADE\r\nBELGIQUE\r\nBELIZE\r\nBENIN\r\nBERMUDES\r\nBHOUTAN\r\nBIELORUSSIE\r\nBIRMANIE\r\nBOLIVIE\r\nBONAIRE, SAINT EUSTACHE ET SABA\r\nBOSNIE-HERZEGOVINE\r\nBOTSWANA\r\nBOUVET (ILE)\r\nBRESIL\r\nBRUNEI\r\nBULGARIE\r\nBURKINA\r\nBURUNDI\r\nCAIMANES (ILES)\r\nCAMBODGE\r\nCAMEROUN\r\nCAMEROUN ET TOGO\r\nCANADA\r\nCANARIES (ILES)\r\nCAP-VERT\r\nCENTRAFRICAINE (REPUBLIQUE)\r\nCHILI\r\nCHINE\r\nCHRISTMAS (ILE)\r\nCHYPRE\r\nCLIPPERTON (ILE)\r\nCOCOS ou KEELING (ILES)\r\nCOLOMBIE\r\nCOMORES\r\nCONGO\r\nCONGO (REPUBLIQUE DEMOCRATIQUE)\r\nCOOK (ILES)\r\nCOREE\r\nCOREE (REPUBLIQUE DE)\r\nCOREE (REPUBLIQUE POPULAIRE DEMOCRATIQUE DE)\r\nCOSTA RICA\r\nCOTE D'IVOIRE\r\nCROATIE\r\nCUBA\r\nCURAÇAO\r\nDANEMARK\r\nDJIBOUTI\r\nDOMINICAINE (REPUBLIQUE)\r\nDOMINIQUE\r\nEGYPTE\r\nEL SALVADOR\r\nEMIRATS ARABES UNIS\r\nEQUATEUR\r\nERYTHREE\r\nESPAGNE\r\nESTONIE\r\nETATS MALAIS NON FEDERES\r\nETATS-UNIS\r\nETHIOPIE\r\nEX-REPUBLIQUE YOUGOSLAVE DE MACEDOINE\r\nFEROE (ILES)\r\nFIDJI\r\nFINLANDE\r\nGABON\r\nGAMBIE\r\nGEORGIE\r\nGEORGIE DU SUD ET LES ILES SANDWICH DU SUD\r\nGHANA\r\nGIBRALTAR\r\nGOA\r\nGRECE\r\nGRENADE\r\nGROENLAND\r\nGUADELOUPE\r\nGUAM\r\nGUATEMALA\r\nGUERNESEY\r\nGUINEE\r\nGUINEE EQUATORIALE\r\nGUINEE-BISSAU\r\nGUYANA\r\nGUYANE\r\nHAITI\r\nHAWAII (ILES)\r\nHEARD ET MACDONALD (ILES)\r\nHONDURAS\r\nHONG-KONG\r\nHONGRIE\r\nILES PORTUGAISES DE L'OCEAN INDIEN\r\nINDE\r\nINDONESIE\r\nIRAN\r\nIRAQ\r\nIRLANDE, ou EIRE\r\nISLANDE\r\nISRAEL\r\nITALIE\r\nJAMAIQUE\r\nJAPON\r\nJERSEY\r\nJORDANIE\r\nKAMTCHATKA\r\nKAZAKHSTAN\r\nKENYA\r\nKIRGHIZISTAN\r\nKIRIBATI\r\nKOSOVO\r\nKOWEIT\r\nLA REUNION\r\nLABRADOR\r\nLAOS\r\nLESOTHO\r\nLETTONIE\r\nLIBAN\r\nLIBERIA\r\nLIBYE\r\nLIECHTENSTEIN\r\nLITUANIE\r\nLUXEMBOURG\r\nMACAO\r\nMADAGASCAR\r\nMALAISIE\r\nMALAWI\r\nMALDIVES\r\nMALI\r\nMALOUINES, OU FALKLAND (ILES)\r\nMALTE\r\nMAN (ILE)\r\nMANDCHOURIE\r\nMARIANNES DU NORD (ILES)\r\nMAROC\r\nMARSHALL (ILES)\r\nMARTINIQUE\r\nMAURICE\r\nMAURITANIE\r\nMAYOTTE\r\nMEXIQUE\r\nMICRONESIE (ETATS FEDERES DE)\r\nMOLDAVIE\r\nMONACO\r\nMONGOLIE\r\nMONTENEGRO\r\nMONTSERRAT\r\nMOZAMBIQUE\r\nNAMIBIE\r\nNAURU\r\nNEPAL\r\nNICARAGUA\r\nNIGER\r\nNIGERIA\r\nNIUE\r\nNORFOLK (ILE)\r\nNORVEGE\r\nNOUVELLE-CALEDONIE\r\nNOUVELLE-ZELANDE\r\nOCEAN INDIEN (TERRITOIRE BRITANNIQUE DE L')\r\nOMAN\r\nOUGANDA\r\nOUZBEKISTAN\r\nPAKISTAN\r\nPALAOS (ILES)\r\nPALESTINE (Etat de)\r\nPANAMA\r\nPAPOUASIE-NOUVELLE-GUINEE\r\nPARAGUAY\r\nPAYS-BAS\r\nPEROU\r\nPHILIPPINES\r\nPITCAIRN (ILE)\r\nPOLOGNE\r\nPOLYNESIE FRANCAISE\r\nPORTO RICO\r\nPORTUGAL\r\nPOSSESSIONS BRITANNIQUES AU PROCHE-ORIENT\r\nPRESIDES\r\nPROVINCES ESPAGNOLES D'AFRIQUE\r\nQATAR\r\nREPUBLIQUE DEMOCRATIQUE ALLEMANDE\r\nREPUBLIQUE FEDERALE D'ALLEMAGNE\r\nROUMANIE\r\nROYAUME-UNI\r\nRUSSIE\r\nRWANDA\r\nSAHARA OCCIDENTAL\r\nSAINT-BARTHELEMY\r\nSAINT-CHRISTOPHE-ET-NIEVES\r\nSAINT-MARIN\r\nSAINT-MARTIN\r\nSAINT-MARTIN (PARTIE NEERLANDAISE)\r\nSAINT-PIERRE-ET-MIQUELON\r\nSAINT-VINCENT-ET-LES GRENADINES\r\nSAINTE HELENE, ASCENSION ET TRISTAN DA CUNHA\r\nSAINTE-LUCIE\r\nSALOMON (ILES)\r\nSAMOA AMERICAINES\r\nSAMOA OCCIDENTALES\r\nSAO TOME-ET-PRINCIPE\r\nSENEGAL\r\nSERBIE\r\nSEYCHELLES\r\nSIBERIE\r\nSIERRA LEONE\r\nSINGAPOUR\r\nSLOVAQUIE\r\nSLOVENIE\r\nSOMALIE\r\nSOUDAN\r\nSOUDAN ANGLO-EGYPTIEN, KENYA, OUGANDA\r\nSOUDAN DU SUD\r\nSRI LANKA\r\nSUEDE\r\nSUISSE\r\nSURINAME\r\nSVALBARD et ILE JAN MAYEN\r\nSWAZILAND\r\nSYRIE\r\nTADJIKISTAN\r\nTAIWAN\r\nTANGER\r\nTANZANIE\r\nTCHAD\r\nTCHECOSLOVAQUIE\r\nTCHEQUE (REPUBLIQUE)\r\nTERR. DES ETATS-UNIS D'AMERIQUE EN AMERIQUE\r\nTERR. DES ETATS-UNIS D'AMERIQUE EN OCEANIE\r\nTERR. DU ROYAUME-UNI DANS L'ATLANTIQUE SUD\r\nTERRE-NEUVE\r\nTERRES AUSTRALES FRANCAISES\r\nTERRITOIRES DU ROYAUME-UNI AUX ANTILLES\r\nTHAILANDE\r\nTIMOR ORIENTAL\r\nTOGO\r\nTOKELAU\r\nTONGA\r\nTRINITE-ET-TOBAGO\r\nTUNISIE\r\nTURKESTAN RUSSE\r\nTURKMENISTAN\r\nTURKS ET CAIQUES (ILES)\r\nTURQUIE\r\nTURQUIE D'EUROPE\r\nTUVALU\r\nUKRAINE\r\nURUGUAY\r\nVANUATU\r\nVATICAN, ou SAINT-SIEGE\r\nVENEZUELA\r\nVIERGES BRITANNIQUES (ILES)\r\nVIERGES DES ETATS-UNIS (ILES)\r\nVIET NAM\r\nVIET NAM DU NORD\r\nVIET NAM DU SUD\r\nWALLIS-ET-FUTUNA\r\nYEMEN\r\nYEMEN (REPUBLIQUE ARABE DU)\r\nYEMEN DEMOCRATIQUE\r\nZAMBIE\r\nZANZIBAR\r\nZIMBABWE" pays_drop_down_values = "FRANCE\r\nACORES, MADERE\r\nAFGHANISTAN\r\nAFRIQUE DU SUD\r\nALASKA\r\nALBANIE\r\nALGERIE\r\nALLEMAGNE\r\nANDORRE\r\nANGOLA\r\nANGUILLA\r\nANTIGUA-ET-BARBUDA\r\nANTILLES NEERLANDAISES\r\nARABIE SAOUDITE\r\nARGENTINE\r\nARMENIE\r\nARUBA\r\nAUSTRALIE\r\nAUTRICHE\r\nAZERBAIDJAN\r\nBAHAMAS\r\nBAHREIN\r\nBANGLADESH\r\nBARBADE\r\nBELGIQUE\r\nBELIZE\r\nBENIN\r\nBERMUDES\r\nBHOUTAN\r\nBIELORUSSIE\r\nBIRMANIE\r\nBOLIVIE\r\nBONAIRE, SAINT EUSTACHE ET SABA\r\nBOSNIE-HERZEGOVINE\r\nBOTSWANA\r\nBOUVET (ILE)\r\nBRESIL\r\nBRUNEI\r\nBULGARIE\r\nBURKINA\r\nBURUNDI\r\nCAIMANES (ILES)\r\nCAMBODGE\r\nCAMEROUN\r\nCAMEROUN ET TOGO\r\nCANADA\r\nCANARIES (ILES)\r\nCAP-VERT\r\nCENTRAFRICAINE (REPUBLIQUE)\r\nCHILI\r\nCHINE\r\nCHRISTMAS (ILE)\r\nCHYPRE\r\nCLIPPERTON (ILE)\r\nCOCOS ou KEELING (ILES)\r\nCOLOMBIE\r\nCOMORES\r\nCONGO\r\nCONGO (REPUBLIQUE DEMOCRATIQUE)\r\nCOOK (ILES)\r\nCOREE\r\nCOREE (REPUBLIQUE DE)\r\nCOREE (REPUBLIQUE POPULAIRE DEMOCRATIQUE DE)\r\nCOSTA RICA\r\nCOTE D'IVOIRE\r\nCROATIE\r\nCUBA\r\nCURAÇAO\r\nDANEMARK\r\nDJIBOUTI\r\nDOMINICAINE (REPUBLIQUE)\r\nDOMINIQUE\r\nEGYPTE\r\nEL SALVADOR\r\nEMIRATS ARABES UNIS\r\nEQUATEUR\r\nERYTHREE\r\nESPAGNE\r\nESTONIE\r\nETATS MALAIS NON FEDERES\r\nETATS-UNIS\r\nETHIOPIE\r\nFEROE (ILES)\r\nFIDJI\r\nFINLANDE\r\nGABON\r\nGAMBIE\r\nGEORGIE\r\nGEORGIE DU SUD ET LES ILES SANDWICH DU SUD\r\nGHANA\r\nGIBRALTAR\r\nGOA\r\nGRECE\r\nGRENADE\r\nGROENLAND\r\nGUADELOUPE\r\nGUAM\r\nGUATEMALA\r\nGUERNESEY\r\nGUINEE\r\nGUINEE EQUATORIALE\r\nGUINEE-BISSAU\r\nGUYANA\r\nGUYANE\r\nHAITI\r\nHAWAII (ILES)\r\nHEARD ET MACDONALD (ILES)\r\nHONDURAS\r\nHONG-KONG\r\nHONGRIE\r\nILES PORTUGAISES DE L'OCEAN INDIEN\r\nINDE\r\nINDONESIE\r\nIRAN\r\nIRAQ\r\nIRLANDE, ou EIRE\r\nISLANDE\r\nISRAEL\r\nITALIE\r\nJAMAIQUE\r\nJAPON\r\nJERSEY\r\nJORDANIE\r\nKAMTCHATKA\r\nKAZAKHSTAN\r\nKENYA\r\nKIRGHIZISTAN\r\nKIRIBATI\r\nKOSOVO\r\nKOWEIT\r\nLA REUNION\r\nLABRADOR\r\nLAOS\r\nLESOTHO\r\nLETTONIE\r\nLIBAN\r\nLIBERIA\r\nLIBYE\r\nLIECHTENSTEIN\r\nLITUANIE\r\nLUXEMBOURG\r\nMACAO\r\nMACEDOINE DU NORD (REPUBLIQUE DE)\r\nMADAGASCAR\r\nMALAISIE\r\nMALAWI\r\nMALDIVES\r\nMALI\r\nMALOUINES, OU FALKLAND (ILES)\r\nMALTE\r\nMAN (ILE)\r\nMANDCHOURIE\r\nMARIANNES DU NORD (ILES)\r\nMAROC\r\nMARSHALL (ILES)\r\nMARTINIQUE\r\nMAURICE\r\nMAURITANIE\r\nMAYOTTE\r\nMEXIQUE\r\nMICRONESIE (ETATS FEDERES DE)\r\nMOLDAVIE\r\nMONACO\r\nMONGOLIE\r\nMONTENEGRO\r\nMONTSERRAT\r\nMOZAMBIQUE\r\nNAMIBIE\r\nNAURU\r\nNEPAL\r\nNICARAGUA\r\nNIGER\r\nNIGERIA\r\nNIUE\r\nNORFOLK (ILE)\r\nNORVEGE\r\nNOUVELLE-CALEDONIE\r\nNOUVELLE-ZELANDE\r\nOCEAN INDIEN (TERRITOIRE BRITANNIQUE DE L')\r\nOMAN\r\nOUGANDA\r\nOUZBEKISTAN\r\nPAKISTAN\r\nPALAOS (ILES)\r\nPALESTINE (Etat de)\r\nPANAMA\r\nPAPOUASIE-NOUVELLE-GUINEE\r\nPARAGUAY\r\nPAYS-BAS\r\nPEROU\r\nPHILIPPINES\r\nPITCAIRN (ILE)\r\nPOLOGNE\r\nPOLYNESIE FRANCAISE\r\nPORTO RICO\r\nPORTUGAL\r\nPOSSESSIONS BRITANNIQUES AU PROCHE-ORIENT\r\nPRESIDES\r\nPROVINCES ESPAGNOLES D'AFRIQUE\r\nQATAR\r\nREPUBLIQUE DEMOCRATIQUE ALLEMANDE\r\nREPUBLIQUE FEDERALE D'ALLEMAGNE\r\nROUMANIE\r\nROYAUME-UNI\r\nRUSSIE\r\nRWANDA\r\nSAHARA OCCIDENTAL\r\nSAINT-BARTHELEMY\r\nSAINT-CHRISTOPHE-ET-NIEVES\r\nSAINT-MARIN\r\nSAINT-MARTIN\r\nSAINT-MARTIN (PARTIE NEERLANDAISE)\r\nSAINT-PIERRE-ET-MIQUELON\r\nSAINT-VINCENT-ET-LES GRENADINES\r\nSAINTE HELENE, ASCENSION ET TRISTAN DA CUNHA\r\nSAINTE-LUCIE\r\nSALOMON (ILES)\r\nSAMOA AMERICAINES\r\nSAMOA OCCIDENTALES\r\nSAO TOME-ET-PRINCIPE\r\nSENEGAL\r\nSERBIE\r\nSEYCHELLES\r\nSIBERIE\r\nSIERRA LEONE\r\nSINGAPOUR\r\nSLOVAQUIE\r\nSLOVENIE\r\nSOMALIE\r\nSOUDAN\r\nSOUDAN ANGLO-EGYPTIEN, KENYA, OUGANDA\r\nSOUDAN DU SUD\r\nSRI LANKA\r\nSUEDE\r\nSUISSE\r\nSURINAME\r\nSVALBARD et ILE JAN MAYEN\r\nSWAZILAND\r\nSYRIE\r\nTADJIKISTAN\r\nTAIWAN\r\nTANGER\r\nTANZANIE\r\nTCHAD\r\nTCHECOSLOVAQUIE\r\nTCHEQUE (REPUBLIQUE)\r\nTERR. DES ETATS-UNIS D'AMERIQUE EN AMERIQUE\r\nTERR. DES ETATS-UNIS D'AMERIQUE EN OCEANIE\r\nTERR. DU ROYAUME-UNI DANS L'ATLANTIQUE SUD\r\nTERRE-NEUVE\r\nTERRES AUSTRALES FRANCAISES\r\nTERRITOIRES DU ROYAUME-UNI AUX ANTILLES\r\nTHAILANDE\r\nTIMOR ORIENTAL\r\nTOGO\r\nTOKELAU\r\nTONGA\r\nTRINITE-ET-TOBAGO\r\nTUNISIE\r\nTURKESTAN RUSSE\r\nTURKMENISTAN\r\nTURKS ET CAIQUES (ILES)\r\nTURQUIE\r\nTURQUIE D'EUROPE\r\nTUVALU\r\nUKRAINE\r\nURUGUAY\r\nVANUATU\r\nVATICAN, ou SAINT-SIEGE\r\nVENEZUELA\r\nVIERGES BRITANNIQUES (ILES)\r\nVIERGES DES ETATS-UNIS (ILES)\r\nVIET NAM\r\nVIET NAM DU NORD\r\nVIET NAM DU SUD\r\nWALLIS-ET-FUTUNA\r\nYEMEN\r\nYEMEN (REPUBLIQUE ARABE DU)\r\nYEMEN DEMOCRATIQUE\r\nZAMBIE\r\nZANZIBAR\r\nZIMBABWE"
((0..(zone_geographique_header_order_place - 1)).to_a - [siret_order_place, fonction_order_place]).each do |i| ((0..(zone_geographique_header_order_place - 1)).to_a - [siret_order_place, fonction_order_place]).each do |i|
map_source_to_destination_champ(i, i, **(champ_opts[i] || {})) map_source_to_destination_champ(i, i, **(champ_opts[i] || {}))

View file

@ -13,7 +13,7 @@ task :setup do
domains = domains_for_stage(ENV.fetch('STAGE')) domains = domains_for_stage(ENV.fetch('STAGE'))
domains.each do |domain| domains.each do |domain|
sh "mina setup domain=#{domain} force_asset_precompile=true" sh "mina setup domain=#{domain}"
end end
end end

View file

@ -0,0 +1,14 @@
namespace :after_party do
desc 'Deployment task: fix_macedonia'
task fix_macedonia: :environment do
puts "Running deploy task 'fix_macedonia'"
# Put your task implementation HERE.
Champ.where(type: "Champs::PaysChamp", value: "EX-REPUBLIQUE YOUGOSLAVE DE MACEDOINE").update_all(value: "MACEDOINE DU NORD (REPUBLIQUE DE)")
# Update task as completed. If you remove the line below, the task will
# run with every deploy (or every time you call after_party:run).
AfterParty::TaskRecord.create version: '20190212164238'
end # task :fix_macedonia
end # namespace :after_party

View file

@ -19,7 +19,8 @@
"vue": "^2.5.21", "vue": "^2.5.21",
"vue-loader": "^15.5.1", "vue-loader": "^15.5.1",
"vue-template-compiler": "^2.5.21", "vue-template-compiler": "^2.5.21",
"vuedraggable": "^2.16.0" "vuedraggable": "^2.16.0",
"vue-scrollto": "^2.13.0"
}, },
"devDependencies": { "devDependencies": {
"eclint": "^2.8.0", "eclint": "^2.8.0",

View file

@ -105,7 +105,7 @@ feature 'As an administrateur I wanna create a new procedure', js: true do
blur blur
expect(page).to have_content('Formulaire enregistré') expect(page).to have_content('Formulaire enregistré')
within '.footer' do within '.buttons' do
click_on 'Ajouter un champ' click_on 'Ajouter un champ'
end end
expect(page).to have_selector('#procedure_types_de_champ_attributes_1_libelle') expect(page).to have_selector('#procedure_types_de_champ_attributes_1_libelle')

View file

@ -13,7 +13,7 @@ feature 'As an administrateur I can edit types de champ', js: true do
it "Add a new champ" do it "Add a new champ" do
click_on 'Supprimer' click_on 'Supprimer'
within '.footer' do within '.buttons' do
click_on 'Ajouter un champ' click_on 'Ajouter un champ'
end end
expect(page).to have_selector('#procedure_types_de_champ_attributes_0_libelle') expect(page).to have_selector('#procedure_types_de_champ_attributes_0_libelle')
@ -22,7 +22,7 @@ feature 'As an administrateur I can edit types de champ', js: true do
expect(page).to have_content('Formulaire enregistré') expect(page).to have_content('Formulaire enregistré')
page.refresh page.refresh
within '.footer' do within '.buttons' do
click_on 'Enregistrer' click_on 'Enregistrer'
end end
@ -30,7 +30,7 @@ feature 'As an administrateur I can edit types de champ', js: true do
end end
it "Add multiple champs" do it "Add multiple champs" do
within '.footer' do within '.buttons' do
click_on 'Ajouter un champ' click_on 'Ajouter un champ'
click_on 'Ajouter un champ' click_on 'Ajouter un champ'
click_on 'Ajouter un champ' click_on 'Ajouter un champ'
@ -107,7 +107,7 @@ feature 'As an administrateur I can edit types de champ', js: true do
expect(page).to have_content('Formulaire enregistré') expect(page).to have_content('Formulaire enregistré')
expect(page).to have_content('Supprimer', count: 2) expect(page).to have_content('Supprimer', count: 2)
within '.footer' do within '.buttons' do
click_on 'Ajouter un champ' click_on 'Ajouter un champ'
end end

View file

@ -1,17 +1,20 @@
describe ActiveStorage::Service::DsProxyService do describe ActiveStorage::Service::DsProxyService do
let(:private_host) { 'storage.sbg1.cloud.ovh.net:443' } let(:private_host) { 'storage.sbg1.cloud.ovh.net:443' }
let(:public_host) { 'static.demarches-simplifiees.fr' } let(:public_host) { 'www.demarches-simplifiees.fr' }
let(:auth) { 'AUTH_a24c37ed11a84896914514384898c34b' } let(:auth) { 'AUTH_a24c37ed11a84896914514384898c34b' }
let(:bucket) { 'test_local' } let(:bucket) { 'test_local' }
let(:key) { '2R6rr89nFeSRkSgXHd3smvEf' } let(:key) { '2R6rr89nFeSRkSgXHd3smvEf' }
let(:temp_url_params) { 'temp_url_sig=5ab8cfc3ba5da2598a6c88cc6b1b461fe4e115bc&temp_url_expires=1547598179' } let(:temp_url_params) { 'temp_url_sig=5ab8cfc3ba5da2598a6c88cc6b1b461fe4e115bc&temp_url_expires=1547598179' }
let(:storage_service) { storage_service = double(ActiveStorage::Service) } let(:storage_service) { storage_service = double(ActiveStorage::Service) }
subject { ActiveStorage::Service::DsProxyService.new(wrapped: storage_service) }
subject do
allow(ENV).to receive(:[]).with('APP_HOST').and_return(public_host)
ActiveStorage::Service::DsProxyService.new(wrapped: storage_service)
end
describe '#url' do describe '#url' do
let(:private_url) { "https://#{private_host}/v1/#{auth}/#{bucket}/#{key}?#{temp_url_params}" } let(:private_url) { "https://#{private_host}/v1/#{auth}/#{bucket}/#{key}?#{temp_url_params}" }
let(:public_url) { "https://#{public_host}/#{bucket}/#{key}?#{temp_url_params}" } let(:public_url) { "https://#{public_host}/direct-upload/#{bucket}/#{key}?#{temp_url_params}" }
before do before do
expect(storage_service).to receive(:url).and_return(private_url) expect(storage_service).to receive(:url).and_return(private_url)
@ -25,7 +28,7 @@ describe ActiveStorage::Service::DsProxyService do
describe '#url_for_direct_upload' do describe '#url_for_direct_upload' do
let(:download_params) { 'inline&filename=documents_top_confidentiels.bmp' } let(:download_params) { 'inline&filename=documents_top_confidentiels.bmp' }
let(:private_url) { "https://#{private_host}/v1/#{auth}/#{bucket}/#{key}?#{temp_url_params}&#{download_params}" } let(:private_url) { "https://#{private_host}/v1/#{auth}/#{bucket}/#{key}?#{temp_url_params}&#{download_params}" }
let(:public_url) { "https://#{public_host}/#{bucket}/#{key}?#{temp_url_params}&#{download_params}" } let(:public_url) { "https://#{public_host}/direct-upload/#{bucket}/#{key}?#{temp_url_params}&#{download_params}" }
before do before do
expect(storage_service).to receive(:url_for_direct_upload).and_return(private_url) expect(storage_service).to receive(:url_for_direct_upload).and_return(private_url)

View file

@ -13,6 +13,29 @@ describe Etablissement do
let(:etablissement) { create(:etablissement, nom_voie: 'green moon') } let(:etablissement) { create(:etablissement, nom_voie: 'green moon') }
it { expect(etablissement.inline_adresse).to eq '6 RUE green moon, IMMEUBLE BORA, 92270 BOIS COLOMBES' } it { expect(etablissement.inline_adresse).to eq '6 RUE green moon, IMMEUBLE BORA, 92270 BOIS COLOMBES' }
context 'with missing complement adresse' do
let(:expected_adresse) { '6 RUE RAOUL NORDLING, 92270 BOIS COLOMBES' }
subject { etablissement.inline_adresse }
context 'when blank' do
let(:etablissement) { create(:etablissement, complement_adresse: '') }
it { is_expected.to eq expected_adresse }
end
context 'when whitespace' do
let(:etablissement) { create(:etablissement, complement_adresse: ' ') }
it { is_expected.to eq expected_adresse }
end
context 'when nil' do
let(:etablissement) { create(:etablissement, complement_adresse: nil) }
it { is_expected.to eq expected_adresse }
end
end
end end
describe '#verify' do describe '#verify' do

View file

@ -1363,6 +1363,11 @@ bcrypt-pbkdf@^1.0.0:
dependencies: dependencies:
tweetnacl "^0.14.3" tweetnacl "^0.14.3"
bezier-easing@^2.0.3:
version "2.1.0"
resolved "https://registry.yarnpkg.com/bezier-easing/-/bezier-easing-2.1.0.tgz#c04dfe8b926d6ecaca1813d69ff179b7c2025d86"
integrity sha1-wE3+i5JtbsrKGBPWn/F5t8ICXYY=
big.js@^3.1.3: big.js@^3.1.3:
version "3.2.0" version "3.2.0"
resolved "https://registry.yarnpkg.com/big.js/-/big.js-3.2.0.tgz#a5fc298b81b9e0dca2e458824784b65c52ba588e" resolved "https://registry.yarnpkg.com/big.js/-/big.js-3.2.0.tgz#a5fc298b81b9e0dca2e458824784b65c52ba588e"
@ -8524,6 +8529,13 @@ vue-loader@^15.5.1:
vue-hot-reload-api "^2.3.0" vue-hot-reload-api "^2.3.0"
vue-style-loader "^4.1.0" vue-style-loader "^4.1.0"
vue-scrollto@^2.13.0:
version "2.13.0"
resolved "https://registry.yarnpkg.com/vue-scrollto/-/vue-scrollto-2.13.0.tgz#fe23c9e5d684271c48154e8d504370cd40a8d6fd"
integrity sha512-ZjvWhY2LbEGqbtvDrBBm04AvgNfYGySJnakyHXxgv4UNlM0hRpkN1UKjKqB8J8U96YOEra+WjxmhujrBGeshbA==
dependencies:
bezier-easing "^2.0.3"
vue-style-loader@^4.1.0: vue-style-loader@^4.1.0:
version "4.1.2" version "4.1.2"
resolved "https://registry.yarnpkg.com/vue-style-loader/-/vue-style-loader-4.1.2.tgz#dedf349806f25ceb4e64f3ad7c0a44fba735fcf8" resolved "https://registry.yarnpkg.com/vue-style-loader/-/vue-style-loader-4.1.2.tgz#dedf349806f25ceb4e64f3ad7c0a44fba735fcf8"