Commit 5d07fb68 authored by Lucas Détré's avatar Lucas Détré

Merge branch 'new-simulator' into 'vue-editor'

New simulator

See merge request !29
parents a0570397 60c1d091
Pipeline #2392 passed with stage
in 1 minute and 48 seconds
<template>
<div id="Catalogue">
<div id="CatalogueSearch">
<div class="container mb-0 mt-0">
<div class="row">
<div class="col-md-6">
<h2>Recherche Catalogue</h2>
<input type="text" ref="intercarif" placeholder="Identifiant INTERCARIF" v-model="intercarif">
<input @click="search()" type="button" class="btn main-button ml-4" value="Chercher">
<p>Plus d'info sur le format du catalogue: <a href="http://lheo.gouv.fr/langage">http://lheo.gouv.fr/langage</a>.</p>
<div class="col-md-12">
<h2>Catalogue</h2>
<input type="text" ref="intercarif" placeholder="Identifiant INTERCARIF" v-model="intercarif" class="form-control"><br>
<input @click="search()" type="button" class="btn main-button pull-right" value="Chercher">
</div>
<div class="col-md-6 results">
</div>
<br>
<div class="row">
<div class="col-md-12 results">
<div v-if="this.intercarif && Object.keys(this.results).length">
<pre>{{ this.results }}</pre>
</div>
......@@ -24,6 +26,7 @@
</template>
<script>
export default {
name: 'CatalogueSearch',
data: function () {
return {
intercarif: "",
......
<template>
<div id="CertifInfo">
<div id="CertifInfoSearch">
<div class="container">
<div class="row">
<div class="col-md-6">
<h2>Recherche Certif Info</h2>
<input type="text" ref="certifinfo" placeholder="Code Certif Info" v-model="certifinfo">
<input @click="search()" type="button" class="btn main-button ml-4" value="Chercher">
<div class="col-md-12">
<h2>Certif Info</h2>
<input type="text" ref="certifinfo" placeholder="Code Certif Info" v-model="certifinfo" class="form-control"><br>
<input @click="search()" type="button" class="btn main-button pull-right" value="Chercher">
</div>
<div class="col-md-6 results">
</div>
<br>
<div class="row">
<div class="col-md-12 results">
<div v-if="this.certifinfo && Object.keys(this.results).length">
<ul class="dash">
<li v-for="(result,code) in this.results" :key="code">
......@@ -25,7 +28,7 @@
</template>
<script>
export default {
name: 'CertifInfo',
name: 'CertifInfoSearch',
data: function () {
return {
certifinfo: "",
......
......@@ -2,12 +2,15 @@
<div id="IDCCSearch">
<div class="container">
<div class="row">
<div class="col-md-6">
<h2>Recherche IDCC</h2>
<input type="text" ref="idcc" placeholder="Chercher une convention collective" v-model="idcc">
<input @click="search()" type="button" class="btn main-button ml-4" value="Chercher">
<div class="col-md-12">
<h2>IDCC</h2>
<input type="text" ref="idcc" placeholder="Chercher une convention collective" v-model="idcc" class="form-control"><br>
<input @click="search()" type="button" class="btn main-button pull-right" value="Chercher">
</div>
<div class="col-md-6 results">
</div>
<br>
<div class="row">
<div class="col-md-12 results">
<div v-if="this.idcc && Object.keys(this.results).length">
<ul class="dash">
<li v-for="(result,code) in this.results" :key="code">
......
<template>
<div id="NAFSearch">
<div class="container">
<div class="row">
<div class="col-md-12">
<h2>NAF</h2>
<input type="text" ref="naf" placeholder="Code NAF" v-model="naf" class="form-control"><br>
<input @click="search()" type="button" class="btn main-button pull-right" value="Chercher">
</div>
</div>
<br>
<div class="row">
<div class="col-md-12 results">
<div v-if="this.naf && Object.keys(this.results).length">
<ul class="dash">
<li v-for="(result,code) in this.results" :key="code">
{{ result.name }}
</li>
</ul>
</div>
<div v-if="this.naf && this.resultsIsEmpty">
<p> Aucune activité principale trouvée avec l'identifiant «{{ this.naf }}».</p>
</div>
</div>
</div>
</div>
</div>
</template>
<script>
export default {
name: 'NAFSearch',
data: function () {
return {
naf: "",
results: {},
resultsIsEmpty: false,
}
},
computed: {
},
methods: {
search: function () {
this.$http.get('/naf?q='+this.naf).then(response => {
this.results = response.body;
this.resultsIsEmpty = this.isEmpty(this.results);
}).created;
},
isEmpty: function (obj) {
for(var key in obj) {
if(obj.hasOwnProperty(key))
return false;
}
return true;
}
}
}
</script>
......@@ -11,7 +11,9 @@
<svg class="nav-icon">
<use xlink:href="#accueil_icon" />
</svg>
Accueil
<span class="nav-label">
Accueil
</span>
</router-link>
</li>
<li class="nav-item">
......@@ -19,7 +21,9 @@
<svg class="nav-icon">
<use xlink:href="#referentiel_icon" />
</svg>
Référentiel
<span class="nav-label">
Référentiel
</span>
</router-link>
</li>
<li class="nav-item">
......@@ -27,23 +31,30 @@
<svg class="nav-icon">
<use xlink:href="#financements_icon" />
</svg>
Financements
<span class="nav-label">
Financements
</span>
</router-link>
</li>
<!--<li class="nav-item">
<li class="nav-item">
<router-link to="/simulateur" name="simulateur" class="nav-link">
<svg class="nav-icon">
<use xlink:href="#simulateur_icon" />
</svg>
Simulateur
<span class="nav-label">
Simulateur
</span>
</router-link>
</li>
<!--
<li class="nav-item">
<router-link to="/scenarios" name="scenarios" class="nav-link">
<svg class="nav-icon">
<use xlink:href="#scenarios_icon" />
</svg>
Scénarios
<span class="nav-label">
Scénarios
</span>
</router-link>
</li>-->
<li class="nav-item">
......@@ -51,7 +62,9 @@
<svg class="nav-icon">
<use xlink:href="#outils_icon" />
</svg>
Outils
<span class="nav-label">
Outils
</span>
</router-link>
</li>
</ul>
......@@ -166,4 +179,15 @@
.router-link-active:hover {
color:white;
}
@media screen and (max-width: 1024px) {
.nav-label {
display: none !important;
}
.nav-icon {
width: 23px !important;
height:23px !important;
align-content: center;
}
}
</style>
<template>
<div id="Outils">
<IDCCSearch class="section-outil"></IDCCSearch>
<hr class="outil-horizontal-separator">
<Catalogue class="section-outil"></Catalogue>
<hr class="outil-horizontal-separator">
<CertifInfo class="section-outil"></CertifInfo>
<div class="container ml-3 mr-3 mt-5">
<div class="row outils-row">
<div class="col-md-6 col-sm-12">
<IDCCSearch class="section-outil"></IDCCSearch>
</div>
<div class="col-md-6 col-sm-12">
<CatalogueSearch class="section-outil"></CatalogueSearch>
</div>
</div>
<div class="col-md-12 pb-3">
<hr class="outil-horizontal-separator">
</div>
<div class="row">
<div class="col-md-6 col-sm-12">
<CertifInfoSearch class="section-outil"></CertifInfoSearch>
</div>
<div class="col-md-6 col-sm-12">
<NAFSearch class="section-outil"></NAFSearch>
</div>
</div>
</div>
</div>
</template>
<script>
import IDCCSearch from './IDCCSearch.vue'
import Catalogue from './Catalogue.vue'
import CertifInfo from './CertifInfo.vue'
import CatalogueSearch from './CatalogueSearch.vue'
import CertifInfoSearch from './CertifInfoSearch.vue'
import NAFSearch from './NAFSearch.vue'
export default {
name: 'Outils',
components: {
IDCCSearch,
Catalogue,
CertifInfo
CatalogueSearch,
CertifInfoSearch,
NAFSearch
}
}
</script>
<style scoped>
.section-outil {
padding-top: 1.5rem;
padding-bottom: 1.5rem;
margin-left: 2rem;
#Outils {
padding-top: 2vh;
}
.outils-row {
min-height:30vh;
}
</style>
This diff is collapsed.
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