diff --git a/package-lock.json b/package-lock.json index 5c65244599ec38ec18636b5cfef2ee74c1468351..b97b5e1ccb5cd3bb97abdb38ecd4be6de9711e06 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "geocontrib-frontend", - "version": "2.2.0", + "version": "2.3.1", "lockfileVersion": 1, "requires": true, "dependencies": { @@ -1795,6 +1795,87 @@ "webpack-chain": "^6.4.0", "webpack-dev-server": "^3.11.0", "webpack-merge": "^4.2.2" + }, + "dependencies": { + "ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "optional": true, + "requires": { + "color-convert": "^2.0.1" + } + }, + "chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dev": true, + "optional": true, + "requires": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + } + }, + "color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "optional": true, + "requires": { + "color-name": "~1.1.4" + } + }, + "color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true, + "optional": true + }, + "has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true, + "optional": true + }, + "loader-utils": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-2.0.2.tgz", + "integrity": "sha512-TM57VeHptv569d/GKh6TAYdzKblwDNiumOdkFnejjD0XwTH87K90w3O7AiJRqdQoXygvi1VQTJTLGhJl7WqA7A==", + "dev": true, + "optional": true, + "requires": { + "big.js": "^5.2.2", + "emojis-list": "^3.0.0", + "json5": "^2.1.2" + } + }, + "supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "optional": true, + "requires": { + "has-flag": "^4.0.0" + } + }, + "vue-loader-v16": { + "version": "npm:vue-loader@16.8.3", + "resolved": "https://registry.npmjs.org/vue-loader/-/vue-loader-16.8.3.tgz", + "integrity": "sha512-7vKN45IxsKxe5GcVCbc2qFU5aWzyiLrYJyUuMz4BQLKctCj/fmCa0w6fGiiQ2cLFetNcek1ppGJQDCup0c1hpA==", + "dev": true, + "optional": true, + "requires": { + "chalk": "^4.1.0", + "hash-sum": "^2.0.0", + "loader-utils": "^2.0.0" + } + } } }, "@vue/cli-shared-utils": { @@ -11511,87 +11592,6 @@ } } }, - "vue-loader-v16": { - "version": "npm:vue-loader@16.8.1", - "resolved": "https://registry.npmjs.org/vue-loader/-/vue-loader-16.8.1.tgz", - "integrity": "sha512-V53TJbHmzjBhCG5OYI2JWy/aYDspz4oVHKxS43Iy212GjGIG1T3EsB3+GWXFm/1z5VwjdjLmdZUFYM70y77vtQ==", - "dev": true, - "optional": true, - "requires": { - "chalk": "^4.1.0", - "hash-sum": "^2.0.0", - "loader-utils": "^2.0.0" - }, - "dependencies": { - "ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "dev": true, - "optional": true, - "requires": { - "color-convert": "^2.0.1" - } - }, - "chalk": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", - "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", - "dev": true, - "optional": true, - "requires": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - } - }, - "color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "dev": true, - "optional": true, - "requires": { - "color-name": "~1.1.4" - } - }, - "color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "dev": true, - "optional": true - }, - "has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", - "dev": true, - "optional": true - }, - "loader-utils": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-2.0.0.tgz", - "integrity": "sha512-rP4F0h2RaWSvPEkD7BLDFQnvSf+nK+wr3ESUjNTyAGobqrijmW92zc+SO6d4p4B1wh7+B/Jg1mkQe5NYUEHtHQ==", - "dev": true, - "optional": true, - "requires": { - "big.js": "^5.2.2", - "emojis-list": "^3.0.0", - "json5": "^2.1.2" - } - }, - "supports-color": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", - "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", - "dev": true, - "optional": true, - "requires": { - "has-flag": "^4.0.0" - } - } - } - }, "vue-multiselect": { "version": "2.1.6", "resolved": "https://registry.npmjs.org/vue-multiselect/-/vue-multiselect-2.1.6.tgz", diff --git a/package.json b/package.json index 3aab9d9ac4a43cd270fd2e234771ef76aede3a57..a090d84b15f3f20b1c4bc9a90a7fc2482078d19d 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "geocontrib-frontend", - "version": "2.3.2-rc1", + "version": "2.3.2-rc2", "private": true, "scripts": { "serve": "npm run init-proxy & npm run init-serve", diff --git a/src/assets/icons/fa-icons.js b/src/assets/icons/fa-icons.js index 5e9fff5abcbe8853af77ce58452a4b98f77eb614..6ee50a04c0bdcf03d8af346aa3f45b5ae8277a61 100644 --- a/src/assets/icons/fa-icons.js +++ b/src/assets/icons/fa-icons.js @@ -1,16 +1,8 @@ const faIcons = [ - 'ad', 'address-book', 'address-card', 'adjust', - 'air-freshener', - 'align-center', - 'align-justify', - 'align-left', - 'align-right', - 'allergies', 'ambulance', - 'american-sign-language-interpreting', 'anchor', 'angle-double-down', 'angle-double-left', @@ -20,8 +12,6 @@ const faIcons = [ 'angle-left', 'angle-right', 'angle-up', - 'angry', - 'ankh', 'apple-alt', 'archive', 'archway', @@ -44,101 +34,41 @@ const faIcons = [ 'asterisk', 'at', 'atlas', - 'atom', - 'audio-description', 'award', 'baby', 'baby-carriage', 'backspace', 'backward', - 'bacon', - 'bacteria', - 'bacterium', 'bahai', 'balance-scale', - 'balance-scale-left', - 'balance-scale-right', 'ban', 'band-aid', - 'barcode', - 'bars', 'baseball-ball', 'basketball-ball', - 'bath', - 'battery-empty', - 'battery-full', - 'battery-half', - 'battery-quarter', - 'battery-three-quarters', 'bed', 'beer', - 'bell', - 'bell-slash', - 'bezier-curve', - 'bible', 'bicycle', 'biking', 'binoculars', - 'biohazard', - 'birthday-cake', - 'blender', - 'blender-phone', 'blind', - 'blog', - 'bold', 'bolt', - 'bomb', - 'bone', 'bong', 'book', - 'book-dead', 'book-medical', 'book-open', 'book-reader', - 'bookmark', - 'border-all', - 'border-none', - 'border-style', - 'bowling-ball', - 'box', 'box-open', - 'box-tissue', - 'boxes', - 'braille', - 'brain', - 'bread-slice', 'briefcase', 'briefcase-medical', 'broadcast-tower', - 'broom', - 'brush', - 'bug', 'building', - 'bullhorn', - 'bullseye', - 'burn', 'bus', 'bus-alt', - 'business-time', - 'calculator', - 'calendar', - 'calendar-alt', - 'calendar-check', - 'calendar-day', - 'calendar-minus', - 'calendar-plus', - 'calendar-times', - 'calendar-week', 'camera', 'camera-retro', 'campground', - 'candy-cane', - 'cannabis', - 'capsules', 'car', 'car-alt', - 'car-battery', - 'car-crash', 'car-side', 'caravan', 'caret-down', @@ -153,29 +83,9 @@ const faIcons = [ 'cart-arrow-down', 'cart-plus', 'cash-register', - 'cat', - 'certificate', - 'chair', - 'chalkboard', - 'chalkboard-teacher', - 'charging-station', - 'chart-area', - 'chart-bar', - 'chart-line', - 'chart-pie', 'check', 'check-circle', - 'check-double', 'check-square', - 'cheese', - 'chess', - 'chess-bishop', - 'chess-board', - 'chess-king', - 'chess-knight', - 'chess-pawn', - 'chess-queen', - 'chess-rook', 'chevron-circle-down', 'chevron-circle-left', 'chevron-circle-right', @@ -184,371 +94,72 @@ const faIcons = [ 'chevron-left', 'chevron-right', 'chevron-up', - 'child', - 'church', - 'circle', - 'circle-notch', 'city', 'clinic-medical', - 'clipboard', - 'clipboard-check', - 'clipboard-list', 'clock', - 'clone', - 'closed-captioning', - 'cloud', - 'cloud-download-alt', - 'cloud-meatball', - 'cloud-moon', - 'cloud-moon-rain', - 'cloud-rain', - 'cloud-showers-heavy', - 'cloud-sun', - 'cloud-sun-rain', - 'cloud-upload-alt', 'cocktail', - 'code', 'code-branch', 'coffee', 'cog', 'cogs', - 'coins', - 'columns', 'comment', 'comment-alt', - 'comment-dollar', - 'comment-dots', - 'comment-medical', - 'comment-slash', - 'comments', - 'comments-dollar', - 'compact-disc', 'compass', 'compress', 'compress-alt', 'compress-arrows-alt', 'concierge-bell', - 'cookie', - 'cookie-bite', - 'copy', - 'copyright', - 'couch', 'credit-card', - 'crop', - 'crop-alt', 'cross', 'crosshairs', 'crow', - 'crown', - 'crutch', - 'cube', - 'cubes', - 'cut', - 'database', 'deaf', - 'democrat', - 'desktop', - 'dharmachakra', - 'diagnoses', - 'dice', - 'dice-d20', - 'dice-d6', - 'dice-five', - 'dice-four', - 'dice-one', - 'dice-six', - 'dice-three', - 'dice-two', - 'digital-tachograph', 'directions', - 'disease', - 'divide', - 'dizzy', - 'dna', 'dog', - 'dollar-sign', - 'dolly', - 'dolly-flatbed', - 'donate', - 'door-closed', - 'door-open', - 'dot-circle', - 'dove', - 'download', - 'drafting-compass', - 'dragon', - 'draw-polygon', - 'drum', - 'drum-steelpan', - 'drumstick-bite', - 'dumbbell', - 'dumpster', - 'dumpster-fire', - 'dungeon', 'edit', - 'egg', - 'eject', - 'ellipsis-h', - 'ellipsis-v', 'envelope', - 'envelope-open', - 'envelope-open-text', - 'envelope-square', - 'equals', - 'eraser', - 'ethernet', 'euro-sign', - 'exchange-alt', 'exclamation', 'exclamation-circle', 'exclamation-triangle', 'expand', - 'expand-alt', - 'expand-arrows-alt', - 'external-link-alt', - 'external-link-square-alt', 'eye', - 'eye-dropper', 'eye-slash', - 'fan', - 'fast-backward', - 'fast-forward', 'faucet', - 'fax', - 'feather', - 'feather-alt', 'female', - 'fighter-jet', 'file', - 'file-alt', - 'file-archive', - 'file-audio', - 'file-code', - 'file-contract', - 'file-csv', - 'file-download', - 'file-excel', - 'file-export', - 'file-image', - 'file-import', - 'file-invoice', - 'file-invoice-dollar', - 'file-medical', - 'file-medical-alt', - 'file-pdf', - 'file-powerpoint', - 'file-prescription', - 'file-signature', - 'file-upload', - 'file-video', - 'file-word', - 'fill', - 'fill-drip', - 'film', - 'filter', - 'fingerprint', - 'fire', 'fire-alt', - 'fire-extinguisher', - 'first-aid', 'fish', - 'fist-raised', 'flag', - 'flag-checkered', - 'flag-usa', 'flask', - 'flushed', - 'folder', - 'folder-minus', - 'folder-open', - 'folder-plus', - 'font', - 'football-ball', - 'forward', - 'frog', - 'frown', - 'frown-open', - 'funnel-dollar', - 'futbol', - 'gamepad', 'gas-pump', 'gavel', - 'gem', - 'genderless', - 'ghost', - 'gift', - 'gifts', - 'glass-cheers', - 'glass-martini', - 'glass-martini-alt', - 'glass-whiskey', - 'glasses', - 'globe', - 'globe-africa', - 'globe-americas', - 'globe-asia', - 'globe-europe', - 'golf-ball', - 'gopuram', 'graduation-cap', - 'greater-than', - 'greater-than-equal', - 'grimace', - 'grin', - 'grin-alt', - 'grin-beam', - 'grin-beam-sweat', - 'grin-hearts', - 'grin-squint', - 'grin-squint-tears', - 'grin-stars', - 'grin-tears', - 'grin-tongue', - 'grin-tongue-squint', - 'grin-tongue-wink', - 'grin-wink', - 'grip-horizontal', - 'grip-lines', - 'grip-lines-vertical', - 'grip-vertical', - 'guitar', 'h-square', - 'hamburger', 'hammer', - 'hamsa', - 'hand-holding', - 'hand-holding-heart', - 'hand-holding-medical', - 'hand-holding-usd', - 'hand-holding-water', - 'hand-lizard', - 'hand-middle-finger', - 'hand-paper', - 'hand-peace', - 'hand-point-down', - 'hand-point-left', - 'hand-point-right', - 'hand-point-up', - 'hand-pointer', - 'hand-rock', - 'hand-scissors', - 'hand-sparkles', - 'hand-spock', - 'hands', - 'hands-helping', - 'hands-wash', - 'handshake', - 'handshake-alt-slash', - 'handshake-slash', - 'hanukiah', - 'hard-hat', - 'hashtag', - 'hat-cowboy', - 'hat-cowboy-side', - 'hat-wizard', - 'hdd', - 'head-side-cough', - 'head-side-cough-slash', - 'head-side-mask', - 'head-side-virus', - 'heading', - 'headphones', - 'headphones-alt', - 'headset', - 'heart', - 'heart-broken', - 'heartbeat', - 'helicopter', - 'highlighter', 'hiking', - 'hippo', - 'history', - 'hockey-puck', - 'holly-berry', 'home', - 'horse', - 'horse-head', 'hospital', - 'hospital-alt', 'hospital-symbol', - 'hospital-user', - 'hot-tub', - 'hotdog', 'hotel', - 'hourglass', - 'hourglass-end', 'hourglass-half', - 'hourglass-start', 'house-damage', 'house-user', - 'hryvnia', - 'i-cursor', - 'ice-cream', - 'icicles', - 'icons', - 'id-badge', - 'id-card', - 'id-card-alt', - 'igloo', 'image', - 'images', - 'inbox', - 'indent', 'industry', - 'infinity', 'info', 'info-circle', - 'italic', - 'jedi', - 'joint', - 'journal-whills', - 'kaaba', - 'key', - 'keyboard', - 'khanda', - 'kiss', - 'kiss-beam', - 'kiss-wink-heart', - 'kiwi-bird', 'landmark', - 'language', - 'laptop', - 'laptop-code', 'laptop-house', - 'laptop-medical', - 'laugh', - 'laugh-beam', - 'laugh-squint', - 'laugh-wink', - 'layer-group', 'leaf', - 'lemon', - 'less-than', - 'less-than-equal', - 'level-down-alt', - 'level-up-alt', 'life-ring', 'lightbulb', - 'link', - 'lira-sign', - 'list', - 'list-alt', - 'list-ol', - 'list-ul', 'location-arrow', 'lock', - 'lock-open', 'long-arrow-alt-down', 'long-arrow-alt-left', 'long-arrow-alt-right', 'long-arrow-alt-up', - 'low-vision', - 'luggage-cart', - 'lungs', - 'lungs-virus', - 'magic', - 'magnet', - 'mail-bulk', 'male', 'map', 'map-marked', @@ -558,448 +169,105 @@ const faIcons = [ 'map-pin', 'map-signs', 'marker', - 'mars', - 'mars-double', - 'mars-stroke', - 'mars-stroke-h', - 'mars-stroke-v', - 'mask', 'medal', 'medkit', - 'meh', - 'meh-blank', - 'meh-rolling-eyes', - 'memory', - 'menorah', - 'mercury', - 'meteor', - 'microchip', 'microphone', - 'microphone-alt', - 'microphone-alt-slash', - 'microphone-slash', 'microscope', - 'minus', - 'minus-circle', - 'minus-square', - 'mitten', - 'mobile', 'mobile-alt', 'money-bill', - 'money-bill-alt', - 'money-bill-wave', - 'money-bill-wave-alt', - 'money-check', - 'money-check-alt', - 'monument', - 'moon', - 'mortar-pestle', - 'mosque', 'motorcycle', 'mountain', - 'mouse', 'mouse-pointer', 'mug-hot', 'music', - 'network-wired', - 'neuter', - 'newspaper', - 'not-equal', - 'notes-medical', - 'object-group', - 'object-ungroup', - 'oil-can', - 'om', - 'otter', - 'outdent', - 'pager', 'paint-brush', - 'paint-roller', 'palette', - 'pallet', 'paper-plane', - 'paperclip', - 'parachute-box', - 'paragraph', 'parking', - 'passport', - 'pastafarianism', - 'paste', - 'pause', - 'pause-circle', 'paw', - 'peace', 'pen', - 'pen-alt', - 'pen-fancy', - 'pen-nib', - 'pen-square', - 'pencil-alt', - 'pencil-ruler', - 'people-arrows', - 'people-carry', - 'pepper-hot', - 'percent', - 'percentage', - 'person-booth', - 'phone', 'phone-alt', - 'phone-slash', - 'phone-square', - 'phone-square-alt', - 'phone-volume', - 'photo-video', - 'piggy-bank', - 'pills', - 'pizza-slice', - 'place-of-worship', 'plane', - 'plane-arrival', - 'plane-departure', - 'plane-slash', - 'play', - 'play-circle', 'plug', 'plus', 'plus-circle', 'plus-square', 'podcast', - 'poll', - 'poll-h', - 'poo', - 'poo-storm', - 'poop', - 'portrait', - 'pound-sign', - 'power-off', - 'pray', - 'praying-hands', - 'prescription', - 'prescription-bottle', - 'prescription-bottle-alt', - 'print', - 'procedures', - 'project-diagram', - 'pump-medical', - 'pump-soap', - 'puzzle-piece', - 'qrcode', 'question', 'question-circle', - 'quidditch', - 'quote-left', - 'quote-right', - 'quran', 'radiation', - 'radiation-alt', - 'rainbow', - 'random', - 'receipt', - 'record-vinyl', 'recycle', - 'redo', - 'redo-alt', - 'registered', - 'remove-format', - 'reply', - 'reply-all', - 'republican', - 'restroom', - 'retweet', - 'ribbon', - 'ring', 'road', - 'robot', - 'rocket', - 'route', - 'rss', - 'rss-square', - 'ruble-sign', - 'ruler', - 'ruler-combined', - 'ruler-horizontal', - 'ruler-vertical', 'running', - 'rupee-sign', - 'sad-cry', - 'sad-tear', - 'satellite', 'satellite-dish', - 'save', - 'school', - 'screwdriver', - 'scroll', - 'sd-card', 'search', - 'search-dollar', 'search-location', - 'search-minus', - 'search-plus', 'seedling', - 'server', - 'shapes', - 'share', 'share-alt', - 'share-alt-square', - 'share-square', - 'shekel-sign', - 'shield-alt', - 'shield-virus', 'ship', - 'shipping-fast', - 'shoe-prints', - 'shopping-bag', 'shopping-basket', 'shopping-cart', - 'shower', 'shuttle-van', - 'sign', - 'sign-in-alt', - 'sign-language', - 'sign-out-alt', - 'signal', - 'signature', - 'sim-card', - 'sink', - 'sitemap', - 'skating', 'skiing', - 'skiing-nordic', - 'skull', - 'skull-crossbones', - 'slash', - 'sleigh', - 'sliders-h', - 'smile', - 'smile-beam', - 'smile-wink', - 'smog', - 'smoking', - 'smoking-ban', - 'sms', - 'snowboarding', 'snowflake', - 'snowman', - 'snowplow', - 'soap', - 'socks', - 'solar-panel', - 'sort', - 'sort-alpha-down', - 'sort-alpha-down-alt', - 'sort-alpha-up', - 'sort-alpha-up-alt', - 'sort-amount-down', - 'sort-amount-down-alt', - 'sort-amount-up', - 'sort-amount-up-alt', 'sort-down', - 'sort-numeric-down', - 'sort-numeric-down-alt', - 'sort-numeric-up', - 'sort-numeric-up-alt', - 'sort-up', - 'spa', - 'space-shuttle', - 'spell-check', - 'spider', - 'spinner', - 'splotch', - 'spray-can', 'square', 'square-full', - 'square-root-alt', - 'stamp', 'star', 'star-and-crescent', - 'star-half', - 'star-half-alt', 'star-of-david', 'star-of-life', - 'step-backward', - 'step-forward', 'stethoscope', 'sticky-note', - 'stop', - 'stop-circle', - 'stopwatch', - 'stopwatch-20', 'store', 'store-alt', - 'store-alt-slash', - 'store-slash', - 'stream', 'street-view', - 'strikethrough', - 'stroopwafel', - 'subscript', 'subway', 'suitcase', 'suitcase-rolling', 'sun', - 'superscript', - 'surprise', - 'swatchbook', 'swimmer', - 'swimming-pool', - 'synagogue', - 'sync', - 'sync-alt', 'syringe', - 'table', - 'table-tennis', - 'tablet', - 'tablet-alt', - 'tablets', - 'tachometer-alt', 'tag', - 'tags', - 'tape', - 'tasks', 'taxi', - 'teeth', - 'teeth-open', 'temperature-high', 'temperature-low', - 'tenge', - 'terminal', - 'text-height', - 'text-width', - 'th', - 'th-large', - 'th-list', - 'theater-masks', - 'thermometer', - 'thermometer-empty', - 'thermometer-full', - 'thermometer-half', - 'thermometer-quarter', - 'thermometer-three-quarters', 'thumbs-down', 'thumbs-up', 'thumbtack', - 'ticket-alt', 'times', 'times-circle', 'tint', 'tint-slash', - 'tired', - 'toggle-off', - 'toggle-on', - 'toilet', - 'toilet-paper', - 'toilet-paper-slash', 'toolbox', 'tools', - 'tooth', - 'torah', - 'torii-gate', 'tractor', - 'trademark', - 'traffic-light', - 'trailer', 'train', 'tram', - 'transgender', - 'transgender-alt', - 'trash', 'trash-alt', - 'trash-restore', - 'trash-restore-alt', 'tree', 'trophy', 'truck', - 'truck-loading', - 'truck-monster', 'truck-moving', - 'truck-pickup', 'tshirt', - 'tty', 'tv', 'umbrella', 'umbrella-beach', - 'underline', - 'undo', - 'undo-alt', - 'universal-access', 'university', - 'unlink', - 'unlock', - 'unlock-alt', - 'upload', - 'user', - 'user-alt', - 'user-alt-slash', - 'user-astronaut', - 'user-check', 'user-circle', - 'user-clock', - 'user-cog', - 'user-edit', 'user-friends', 'user-graduate', - 'user-injured', - 'user-lock', 'user-md', - 'user-minus', - 'user-ninja', - 'user-nurse', - 'user-plus', - 'user-secret', - 'user-shield', - 'user-slash', - 'user-tag', - 'user-tie', - 'user-times', - 'users', - 'users-cog', - 'users-slash', - 'utensil-spoon', 'utensils', - 'vector-square', - 'venus', - 'venus-double', - 'venus-mars', - 'vest', - 'vest-patches', 'vial', - 'vials', 'video', - 'video-slash', - 'vihara', - 'virus', - 'virus-slash', - 'viruses', - 'voicemail', - 'volleyball-ball', - 'volume-down', - 'volume-mute', - 'volume-off', - 'volume-up', - 'vote-yea', - 'vr-cardboard', 'walking', - 'wallet', - 'warehouse', 'water', - 'wave-square', - 'weight', 'weight-hanging', 'wheelchair', 'wifi', - 'wind', - 'window-close', - 'window-maximize', - 'window-minimize', - 'window-restore', - 'wine-bottle', - 'wine-glass', 'wine-glass-alt', - 'won-sign', - 'wrench', - 'x-ray', - 'yen-sign', - 'yin-yang' + 'wrench' ]; export default faIcons; diff --git a/src/assets/js/map-util.js b/src/assets/js/map-util.js index 10535ded16b11cdcfff46c84a9313c101265f0d2..d8b6c6008882f6878d8be14e8e2dfd60cfc4845e 100644 --- a/src/assets/js/map-util.js +++ b/src/assets/js/map-util.js @@ -297,9 +297,10 @@ const mapUtil = { }, retrieveFeatureColor: function (featureType, properties) { - if (featureType && featureType.colors_style && featureType.colors_style.custom_field_name) { - const currentValue = properties[featureType.colors_style.custom_field_name]; - const colorStyle = featureType.colors_style.colors[currentValue]; + const colorsStyle = featureType.colors_style.value ? featureType.colors_style.value : featureType.colors_style; + if (featureType && colorsStyle && colorsStyle.custom_field_name) { + const currentValue = properties[colorsStyle.custom_field_name]; + const colorStyle = colorsStyle.colors[currentValue]; return colorStyle ? colorStyle : featureType.color } else{ @@ -373,48 +374,44 @@ const mapUtil = { const featureGroup = new L.FeatureGroup(); features.forEach((feature) => { - const featureType = featureTypes.find((ft) => ft.slug === (feature.properties.feature_type.slug || feature.properties.feature_type)); + const featureProperties = feature.properties ? feature.properties : feature; + const featureType = featureTypes.find((ft) => ft.slug === (featureProperties.feature_type.slug || featureProperties.feature_type)); let filters = []; if (filter) { - const typeCheck = filter.featureType && feature.properties.feature_type.slug === filter.featureType; - const statusCheck = filter.featureStatus && feature.properties.status.value === filter.featureStatus; - const titleCheck = filter.featureTitle && feature.properties.title.includes(filter.featureTitle); + const typeCheck = filter.featureType && featureProperties.feature_type.slug === filter.featureType; + const statusCheck = filter.featureStatus && featureProperties.status.value === filter.featureStatus; + const titleCheck = filter.featureTitle && featureProperties.title.includes(filter.featureTitle); filters = [typeCheck, statusCheck, titleCheck]; } - if (!filter || !Object.values(filter).some(val => val) || Object.values(filter).some(val => val) && filters.length && filters.every(val => val !== false)) { - const geomJSON = flip(feature.geometry); + if ( + !filter || + !Object.values(filter).some(val => val) || + Object.values(filter).some(val => val) && + filters.length && filters.every(val => val !== false) + ) { + const geomJSON = flip(feature.geometry || feature.geom); const popupContent = this._createContentPopup(feature); // Look for a custom field let customField; let customFieldOption; - if (featureType.customfield_set && Object.keys(feature.properties).some(el => featureType.customfield_set.map(e => e.name).includes(el))) { - customField = Object.keys(feature.properties).filter(el => featureType.customfield_set.map(e => e.name).includes(el)); - customFieldOption = feature.properties[customField[0]]; + if (featureType.customfield_set && Object.keys(featureProperties).some(el => featureType.customfield_set.map(e => e.name).includes(el))) { + customField = Object.keys(featureProperties).filter(el => featureType.customfield_set.map(e => e.name).includes(el)); + customFieldOption = featureProperties[customField[0]]; } - let color = this.retrieveFeatureColor(featureType, feature.properties) || feature.properties.color; - - // if (!color && customFieldOption && featureType.colors_style) { - // color = - // featureType.colors_style.value ? - // featureType.colors_style.value.colors[customFieldOption].value ? - // featureType.colors_style.value.colors[customFieldOption].value : - // featureType.colors_style.value.colors[customFieldOption] : - // featureType.colors_style.colors[customFieldOption] - // } else { - // color = feature.properties.color; - // } + let color = this.retrieveFeatureColor(featureType, featureProperties) || featureProperties.color; if (color == undefined){ color = featureType.color; } + const colorValue = color.value ? color.value : color; if (geomJSON.type === 'Point') { if (customFieldOption && featureType.colors_style && featureType.colors_style.value && featureType.colors_style.value.icons) { const iconHTML = ` <i class="fas fa-${featureType.colors_style.value.icons[customFieldOption]} fa-2x" - style="color: ${color}" + style="color: ${colorValue}" ></i> `; const customMapIcon = L.divIcon({ @@ -424,31 +421,41 @@ const mapUtil = { }); L.marker(geomJSON.coordinates, { icon: customMapIcon, - color: color, + color: colorValue, zIndexOffset: 100 }) .bindPopup(popupContent) .addTo(featureGroup); } else { - L.circleMarker(geomJSON.coordinates, { - color: color, - radius: 4, - fillOpacity: 0.5, - weight: 3, + const iconHTML = ` + <i + class="fas fa-${featureType.icon} fa-2x" + style="color: ${colorValue}" + ></i> + `; + const customMapIcon = L.divIcon({ + html: iconHTML, + iconSize: [20, 20], + className: 'myDivIcon', + }); + L.marker(geomJSON.coordinates, { + icon: customMapIcon, + color: colorValue, + zIndexOffset: 100 }) .bindPopup(popupContent) .addTo(featureGroup); } } else if (geomJSON.type === 'LineString') { L.polyline(geomJSON.coordinates, { - color: color, + color: colorValue, weight: 3, }) .bindPopup(popupContent) .addTo(featureGroup); } else if (geomJSON.type === 'Polygon') { L.polygon(geomJSON.coordinates, { - color: color, + color: colorValue, weight: 3, fillOpacity: 0.5, }) @@ -457,7 +464,7 @@ const mapUtil = { } } }); - if (addToMap) { + if (map && addToMap) { map.addLayer(featureGroup); } @@ -474,10 +481,23 @@ const mapUtil = { return formatted_date; } let feature_type; - let status = feature.properties.status; - let date_maj = feature.properties.updated_on; - let feature_type_url = feature.properties.feature_type_url; - let feature_url = feature.properties.feature_url; + let status; + let date_maj; + let feature_type_url; + let feature_url; + + if (feature.properties) { + status = feature.properties.status; + date_maj = feature.properties.updated_on; + feature_type_url = feature.properties.feature_type_url; + feature_url = feature.properties.feature_url; + } else { + status = feature.status; + date_maj = feature.updated_on; + feature_type_url =feature.feature_type_url; + feature_url = feature.feature_url; + } + if (featureTypes) { // => VectorTile feature_type = featureTypes.find((x) => x.slug.split('-')[0] === '' + feature.properties.feature_type_id); status = statusList.find((x) => x.value === feature.properties.status).name; @@ -486,22 +506,24 @@ const mapUtil = { feature_url = feature_type_url + 'signalement/' + feature.properties.feature_id + '/'; //status=feature.properties.status; } else { - feature_type = feature.properties.feature_type; - status = feature.properties.status.label; + feature_type = feature.properties ? feature.properties.feature_type : feature.feature_type; + status = feature.properties ? feature.properties.status.label : feature.status.label; } - let author = ""; - if (feature.properties.creator) { - author = feature.properties.creator.full_name + let author = ''; + const creator = feature.properties ? feature.properties.creator : feature.creator + if (creator) { + author = creator.full_name ? `<div> - Auteur : ${feature.properties.creator.first_name} ${feature.properties.creator.last_name} + Auteur : ${creator.first_name} ${creator.last_name} </div>` - : feature.properties.creator.username ? `<div>Auteur: ${feature.properties.creator.username}</div>` : ''; + : creator.username ? `<div>Auteur: ${creator.username}</div>` : ''; } + const title = feature.properties ? feature.properties.title : feature.title; return ` <h4> - <a href="${feature_url}">${feature.properties.title}</a> + <a href="${feature_url}">${title}</a> </h4> <div> Statut : ${status} diff --git a/src/components/feature_type/SymbologySelector.vue b/src/components/feature_type/SymbologySelector.vue index 7e730930a5b193d63e737131ce32735c825e764c..cd3c2409e6c8a375c139fd075818b7c58b25aa56 100644 --- a/src/components/feature_type/SymbologySelector.vue +++ b/src/components/feature_type/SymbologySelector.vue @@ -23,7 +23,7 @@ > <font-awesome-icon :icon="['fas', form.icon]" - :style="{ color: form.color.value }" + :style="{ color: form.color.value || '#000000' }" class="icon alt" /> </button> @@ -161,7 +161,6 @@ export default { border-radius: 3px; box-shadow: 0 0 2px 1px rgb(131, 131, 131); .icon.alt { - color: rgb(75, 75, 75); width: 30px; height: 30px; } diff --git a/src/store/modules/feature.js b/src/store/modules/feature.js index 427e005e781c9649968f5d0f1c4959e8775ae8ee..7d42ef515fa16c814ea1aede68311d54b46ff486 100644 --- a/src/store/modules/feature.js +++ b/src/store/modules/feature.js @@ -124,11 +124,12 @@ const feature = { url = url.concat('', `${url.includes('?') ? '&' : '?'}ordering=${ordering}`); } if (search) { - url = url.concat('', `${url.includes('?') ? '&' : '?'}title__contains=${search}`); + url = url.concat('', `${url.includes('?') ? '&' : '?'}title__icontains=${search}`); } if (limit) { url = url.concat('', `${url.includes('?') ? '&' : '?'}limit=${limit}`); } + url = url.concat('', '&output=geojson'); return axios .get(url, { cancelToken: cancelToken.token }) .then((response) => { @@ -338,7 +339,6 @@ const feature = { .delete(url) .then((response) => { if (response && response.status === 204) { - console.log(response) commit("REMOVE_ATTACHMENTS_ID_TO_DELETE", payload.attachmentsId) return response } @@ -354,7 +354,6 @@ const feature = { .put(`${rootState.configuration.VUE_APP_DJANGO_API_BASE}features/${featureId}/feature-links/`, state.linkedFormset) .then((response) => { if (response.status === 200 && response.data) { - console.log(response, response.data) return "La relation a bien été ajouté" } }) @@ -363,8 +362,7 @@ const feature = { }); }, - DELETE_FEATURE({ state, rootState }, feature_id) { - console.log("Deleting feature:", feature_id, state) + DELETE_FEATURE({ rootState }, feature_id) { const url = `${rootState.configuration.VUE_APP_DJANGO_API_BASE}features/${feature_id}/?` + `feature_type__slug=${rootState.feature_type.current_feature_type_slug}` + `&project__slug=${rootState.project_slug}`; diff --git a/src/store/modules/map.js b/src/store/modules/map.js index b9843087d53556c34c8fd0b7831b5e4560755305..57ae63836919b88664930870cdbfe96b7d83034f 100644 --- a/src/store/modules/map.js +++ b/src/store/modules/map.js @@ -11,6 +11,7 @@ import { mapUtil } from "@/assets/js/map-util.js"; const map = { namespaced: true, state: { + map: null, basemaps: null, basemapsToDelete: [], features: [], @@ -18,6 +19,9 @@ const map = { availableLayers: null, }, mutations: { + SET_MAP(state, payload) { + state.map = payload; + }, SET_LAYERS(state, availableLayers) { state.availableLayers = availableLayers; }, @@ -110,7 +114,7 @@ const map = { }); }, - INITIATE_MAP({ state, rootGetters }, el) { + INITIATE_MAP({ state, rootGetters, commit }, el) { const project = rootGetters.project let mapDefaultViewCenter = [46, 2]; // defaultMapView.center; let mapDefaultViewZoom = 5; // defaultMapView.zoom; @@ -118,6 +122,7 @@ const map = { mapDefaultViewCenter, mapDefaultViewZoom, }); + commit('SET_MAP', mapUtil.getMap()); // Load the layers. // - if one basemap exists, check in the localstorage if one active basemap is set diff --git a/src/views/feature/Feature_edit.vue b/src/views/feature/Feature_edit.vue index 183929cbf0ff5a4c567a724442353ceb5440fdd1..62230a8ad09640c59bce137bb9c811e6f2ce1469 100644 --- a/src/views/feature/Feature_edit.vue +++ b/src/views/feature/Feature_edit.vue @@ -181,11 +181,6 @@ /> <div class="ui tab active map-container" data-tab="map"> <div id="map" ref="map"></div> - <!-- // todo: ajouter v-if --> - <!-- {% if serialized_base_maps|length > 0 %} {% include - "geocontrib/map-layers/sidebar-layers.html" with - basemaps=serialized_base_maps layers=serialized_layers - project=project.slug%} {% endif %} --> <SidebarLayers v-if="basemaps && map" /> </div> </div> @@ -544,7 +539,7 @@ export default { }) .catch((error) => { - console.log({ error }); + console.error({ error }); if (error && error.response && error.response) { this.erreurUploadMessage = error.response.data.error; } else { @@ -580,7 +575,6 @@ export default { }, addAttachment(attachment) { - console.log(attachment); this.$store.commit("feature/ADD_ATTACHMENT_FORM", { dataKey: this.attachmentDataKey, title: attachment.title, @@ -850,7 +844,10 @@ export default { if (this.currentRouteName === "editer-signalement") { this.map.addControl(this.drawControlEditOnly); - } else this.map.addControl(this.drawControlFull); + } else { + this.map.addControl(this.drawControlFull); + } + this.changeMobileBtnOrder(); this.map.on( "draw:created", @@ -984,6 +981,24 @@ export default { } }, + changeMobileBtnOrder() { //* move large toolbar for polygon creation, cutting map in the middle + function changeDisplay() { + let buttons = document.querySelector(".leaflet-draw-actions.leaflet-draw-actions-top.leaflet-draw-actions-bottom") + if (buttons && buttons.style) { + buttons.style.display = "flex" + buttons.style["flex-direction"] = "column" + } + } + if (window.screen.availWidth < 767) { //* change button order all the time to keep homogeinity on mobile + let wrapper = document.querySelector(".leaflet-top.leaflet-right"); + if (wrapper) wrapper.appendChild(wrapper.children[0]); + if (this.feature_type.geom_type === "polygon") { //* if it's a polygon, change tools direction to vertical + let polygonBtn = document.querySelector(".leaflet-draw-draw-polygon"); //* since elements are generated + if (polygonBtn) polygonBtn.addEventListener("click", changeDisplay) //* it should be done at each click + } + } + }, + getFeatureAttachments() { featureAPI .getFeatureAttachments(this.$route.params.slug_signal) diff --git a/src/views/feature/Feature_list.vue b/src/views/feature/Feature_list.vue index c31ad0879058b2a0a117cd71012851e6df2bb8c3..cdceee6da1d67c9929bd61db6ac3e6d0ce34bfb3 100644 --- a/src/views/feature/Feature_list.vue +++ b/src/views/feature/Feature_list.vue @@ -235,6 +235,7 @@ export default { lng: null, featuresCount: 0, paginatedFeatures: [], + currentLayer: null, pagination: { currentPage: 1, pagesize: 15, @@ -259,13 +260,56 @@ export default { "form.status.selected.value"() { this.fetchPagedFeatures(); }, + map(newValue) { + if (newValue && this.paginatedFeatures && this.paginatedFeatures.length) { + if (this.currentLayer) { + this.map.removeLayer(this.currentLayer); + } + this.currentLayer = mapUtil.addFeatures( + this.paginatedFeatures, + {}, + true, + this.feature_types + ); + } + }, + paginatedFeatures: { + deep: true, + handler(newValue, oldValue) { + if (newValue && newValue.length && newValue !== oldValue && this.map) { + if (this.currentLayer) { + this.map.removeLayer(this.currentLayer); + this.currentLayer = null; + } + this.currentLayer = mapUtil.addFeatures( + newValue, + {}, + true, + this.feature_types + ); + } else if (newValue && newValue.length === 0) { + if (this.currentLayer) { + this.map.removeLayer(this.currentLayer); + this.currentLayer = null; + } + } + } + } }, computed: { - ...mapGetters(["project", "permissions"]), - ...mapState("feature", ["checkedFeatures"]), - ...mapState("feature_type", ["feature_types"]), - ...mapState("map", ["basemaps"]), + ...mapGetters([ + 'project', 'permissions' + ]), + ...mapState('feature', [ + 'checkedFeatures' + ]), + ...mapState('feature_type', [ + 'feature_types' + ]), + ...mapState('map', [ + 'basemaps' + ]), API_BASE_URL() { return this.$store.state.configuration.VUE_APP_DJANGO_API_BASE; @@ -421,23 +465,25 @@ export default { url = newUrl; } const queryString = this.buildQueryString(); + console.log(queryString); url += queryString; this.$store.commit( "DISPLAY_LOADER", "Récupération des signalements en cours..." ); - featureAPI.getPaginatedFeatures(url).then((data) => { - if (data) { - this.featuresCount = data.count; - this.previous = data.previous; - this.next = data.next; - this.paginatedFeatures = data.results.features; - } - //* bbox needs to be updated with the same filters - if (queryString) this.fetchBboxNfit(queryString); - this.$store.commit("DISCARD_LOADER"); - }); + featureAPI.getPaginatedFeatures(url) + .then((data) => { + if (data) { + this.featuresCount = data.count; + this.previous = data.previous; + this.next = data.next; + this.paginatedFeatures = data.results.features; + } + //* bbox needs to be updated with the same filters + if (this.paginatedFeatures.length) this.fetchBboxNfit(queryString); + this.$store.commit("DISCARD_LOADER"); + }); }, //* Pagination for table *// diff --git a/src/views/feature_type/Feature_type_edit.vue b/src/views/feature_type/Feature_type_edit.vue index 8cbda5cfbed20f39a08a0e54273f14bf57c79e1f..4e634b44a3caa4c489a5631d80ae23d3c5f0bad7 100644 --- a/src/views/feature_type/Feature_type_edit.vue +++ b/src/views/feature_type/Feature_type_edit.vue @@ -63,7 +63,7 @@ <!-- {{ form.geom_type.errors }} --> </div> - <div class="required field"> + <div v-if="selectedGeomType !== 'Point'" class="required field"> <label :for="form.color.id_for_label">{{ form.color.label }}</label> <input type="color" diff --git a/src/views/feature_type/Feature_type_symbology.vue b/src/views/feature_type/Feature_type_symbology.vue index 67d0c7efa1956e69ced868544e0cc3702da6071f..b3c3b37f4b3380d412d9a9c8411177127b7e0a14 100644 --- a/src/views/feature_type/Feature_type_symbology.vue +++ b/src/views/feature_type/Feature_type_symbology.vue @@ -5,7 +5,14 @@ </div> <div id="message" class="fullwidth"> <div v-if="error" class="ui negative message"> - <p><i class="cross icon"></i> {{ error }}</p> + <p><i class="close icon"></i> {{ error }}</p> + </div> + <div v-if="success" class="ui positive message"> + <i + class="close icon" + @click="success = null" + /> + <p>{{ success }}</p> </div> </div> <div class="fourteen wide column"> @@ -61,10 +68,16 @@ > <SymbologySelector :title="option" - :initColor="feature_type.colors_style.value.colors[option] ? - feature_type.colors_style.value.colors[option].value : - feature_type.colors_style.value.colors[option]" - :initIcon="feature_type.colors_style.value.icons[option]" + :initColor="feature_type.colors_style.value ? + feature_type.colors_style.value.colors[option] ? + feature_type.colors_style.value.colors[option].value : + feature_type.colors_style.value.colors[option] + : null + " + :initIcon="feature_type.colors_style.value ? + feature_type.colors_style.value.icons[option] : + null + " :geomType="feature_type.customfield_set.geomType" @set="setColorsStyle" /> @@ -106,6 +119,7 @@ export default { return { loading: false, error: null, + success: null, selectedCustomfield: null, form: { color: '#000000', @@ -174,10 +188,11 @@ export default { this.SEND_FEATURE_SYMBOLOGY(this.form) .then(() => { this.loading = false; + this.success = 'La modification de la symbologie a été prise en compte.' }) .catch(() => { this.loading = false; - }) + }); } } } diff --git a/src/views/project/Project_detail.vue b/src/views/project/Project_detail.vue index 0b65164ca8331b3de91a551c4cba825a69f955ea..f284036ef0bd1236bb247ab9a9d5429170fd316b 100644 --- a/src/views/project/Project_detail.vue +++ b/src/views/project/Project_detail.vue @@ -367,7 +367,7 @@ <div class="ui relaxed list"> <div v-for="(item, index) in features" - :key="item.title + index" + :key="item.properties.title + index" class="item" > <div class="content"> @@ -377,21 +377,27 @@ name: 'details-signalement', params: { slug: project.slug, - slug_type_signal: item.feature_type.slug, - slug_signal: item.feature_id, + slug_type_signal: item.properties.feature_type.slug, + slug_signal: item.id, }, }" - >{{ item.title || item.feature_id }}</router-link + >{{ item.properties.title || item.id }}</router-link > </div> <div class="description"> - <i - >[{{ item.created_on | setDate - }}<span v-if="user && item.display_creator" - >, par {{ item.display_creator }} + <i> + [{{ item.properties.created_on}} + <span + v-if="user && item.properties.creator" + > + , par {{ + item.properties.creator.full_name ? + item.properties.creator.full_name : + item.properties.creator.username + }} </span> - ]</i - > + ] + </i> </div> </div> </div> @@ -658,6 +664,9 @@ export default { 'user', 'reloadIntervalId' ]), + ...mapState('map', [ + 'map' + ]), DJANGO_BASE_URL() { return this.$store.state.configuration.VUE_APP_DJANGO_BASE; }, @@ -670,6 +679,30 @@ export default { }, watch: { + map(newValue) { + if (newValue && this.features && this.features.length) { + mapUtil.addFeatures( + this.features, + {}, + true, + this.feature_types + ); + } + }, + features: { + deep: true, + handler(newValue, oldValue) { + if (newValue && newValue.length && newValue !== oldValue && this.map) { + mapUtil.addFeatures( + newValue, + {}, + true, + this.feature_types + ); + } + } + }, + feature_types: { deep: true, handler(newValue, oldValue) { @@ -748,7 +781,6 @@ export default { let self = this; this.arraysOfflineErrors = []; this.arraysOffline.forEach((feature) => { - console.log(feature); if (feature.type === "post") { promises.push( axios @@ -762,7 +794,7 @@ export default { } }) .catch((error) => { - console.log(error); + console.error(error); self.arraysOfflineErrors.push(feature); }) ); @@ -774,7 +806,6 @@ export default { feature.geojson ) .then((response) => { - console.log(response); if (response.status === 200 && response.data) { return "OK" } @@ -783,7 +814,7 @@ export default { } }) .catch((error) => { - console.log(error); + console.error(error); self.arraysOfflineErrors.push(feature); }) ); @@ -886,7 +917,6 @@ export default { this.$route.params.slug, this.$store.state.feature_type.feature_types ); - this.arraysOffline.forEach((x) => (x.geojson.properties.color = "red")); const features = this.arraysOffline.map((x) => x.geojson); mapUtil.addFeatures( diff --git a/src/views/project/Project_mapping.vue b/src/views/project/Project_mapping.vue index 34397ecb7b5f37acb1814dac5b3e6236cb799654..7ab8de8b85ed98b6d09f9a00100cfb7e8180b97b 100644 --- a/src/views/project/Project_mapping.vue +++ b/src/views/project/Project_mapping.vue @@ -87,7 +87,6 @@ export default { checkTitles() { let isValid = true; this.basemaps.forEach((basemap) => { - console.log(basemap); if (basemap.title === null || basemap.title === "") { basemap.errors = "Veuillez compléter ce champ."; isValid = false; @@ -134,7 +133,7 @@ export default { ); }) .catch((error) => { - console.log(error); + console.error(error); }); } },