Skip to content
Snippets Groups Projects
Commit 5ca82b35 authored by Timothee P's avatar Timothee P :sunflower:
Browse files

Merge branch 'develop' into redmine-issues/13761

parents 7d00f7a3 78956510
No related branches found
No related tags found
No related merge requests found
stages:
- test-build
- Static analysis
- build
- deploy
......@@ -8,6 +9,17 @@ variables:
SONAR_HOST_URL: "https://sonarqube.neogeo.fr"
GIT_DEPTH: 0
test build:
stage: test-build
image: node:14
script:
- npm install
- npm run build
except:
- master
- develop
- ^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-((?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+([0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?$
build testing docker image:
stage: build
only:
......
......@@ -24,14 +24,18 @@ export function csvToJson(csv, delimiter) {
const [, ...lines] = allLines;
for (const line of lines) {
const obj = {};
const currentLine = line.split(delimiter);
if (line) {
const obj = {};
const currentLine = line.split(delimiter).map(el => {
return el.replace('\r', '');
});
for (let i = 0; i < headers.length; i++) {
obj[headers[i]] = currentLine[i];
}
for (let i = 0; i < headers.length; i++) {
obj[headers[i]] = currentLine[i];
}
result.push(obj);
result.push(obj);
}
}
return JSON.parse(JSON.stringify(result));
}
......@@ -116,7 +116,7 @@ const mapService = {
overlay.setPosition(undefined);
closer.blur();
return false;
};
};
}
this.map.addOverlay(this.overlay);
......@@ -244,8 +244,11 @@ const mapService = {
addLayers: function (layers, serviceMap, optionsMap, schemaType) {
this.layers = layers;
if (layers) { //* if admin has defined basemaps for this project
let count = 0;
layers.forEach((layer) => {
if (layer) {
count +=1;
const options = layer.options;
if (options) {
options.noWrap = true;
......@@ -268,6 +271,7 @@ const mapService = {
dictLayersToLeaflet[layer.id] = layerTms;
}
}
dictLayersToLeaflet[layer.id].setZIndex(count);
}
});
} else { //* else when no basemaps defined
......@@ -358,6 +362,7 @@ const mapService = {
});
this.mvtLayer.featureTypes = featureTypes;
this.mvtLayer.project_slug = projectSlug;
this.mvtLayer.setZIndex(30);
this.map.addLayer(this.mvtLayer);
window.layerMVT = this.mvtLayer;
},
......@@ -462,7 +467,7 @@ const mapService = {
source: drawSource,
style: styleFunction,
});
olLayer.setZIndex(29);
this.map.addLayer(olLayer);
return drawSource;
},
......
......@@ -54,7 +54,7 @@
</div>
<div
v-if="isCanceling"
class="ui dimmer modals page transition visible active"
class="ui dimmer modals transition visible active"
style="display: flex !important"
>
<div
......@@ -236,9 +236,9 @@ export default {
deleteFeature() {
this.$store
.dispatch('feature/DELETE_FEATURE', { feature_id: this.currentFeature.feature_id })
.then((response) => {
.then(async (response) => {
if (response.status === 204) {
this.GET_PROJECT_FEATURES({
await this.GET_PROJECT_FEATURES({
project_slug: this.$route.params.slug
});
this.goBackToProject();
......
......@@ -381,7 +381,7 @@ export default {
errors: [],
id_for_label: 'name',
field: {
max_length: 140,
max_length: 128,
},
html_name: 'name',
label: 'Nom',
......
......@@ -663,7 +663,8 @@ export default {
//* if field type is list, it's not possible to guess from value type
if (field_type === 'list') {
//*then check if the value is an available option
if (!options.includes(fieldInFeature)) {
if (fieldInFeature && !options.includes(fieldInFeature)) {
this.importError = `Le champ ${name} contient une valeur invalide.`;
return false;
}
} else if (customType !== field_type) {
......@@ -693,7 +694,7 @@ export default {
reader.addEventListener('load', (e) => {
// bypass json check for files larger then 10 Mo
let jsonValidity;
if (parseFloat(fileConvertSizeToMo(files[0])) <= 10) {
if (parseFloat(fileConvertSizeToMo(files[0].size)) <= 10) {
jsonValidity = this.checkJsonValidity(JSON.parse(e.target.result));
} else {
jsonValidity = true;
......
......@@ -244,6 +244,7 @@ export default {
slug: this.$route.params.slug,
reservedKeywords: [
// todo : add keywords for mapstyle (strokewidth...)
'id',
'title',
'description',
'status',
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment