diff --git a/contrib/gn_module_occhab/frontend/app/components/occhab-map-form/occhab-form.component.html b/contrib/gn_module_occhab/frontend/app/components/occhab-map-form/occhab-form.component.html index bd02787501..f695028b7d 100644 --- a/contrib/gn_module_occhab/frontend/app/components/occhab-map-form/occhab-form.component.html +++ b/contrib/gn_module_occhab/frontend/app/components/occhab-map-form/occhab-form.component.html @@ -476,9 +476,9 @@
[parentFormControl]=" occHabForm.stationForm .get('habitats') - .controls[occHabForm.currentEditingHabForm].get( - 'id_nomenclature_community_interest' - ) + .controls[ + occHabForm.currentEditingHabForm + ].get('id_nomenclature_community_interest') " [items]="storeService.nomenclatureItems.HAB_INTERET_COM" comparedKey="id_nomenclature" @@ -515,9 +515,9 @@
[parentFormControl]=" occHabForm.stationForm .get('habitats') - .controls[occHabForm.currentEditingHabForm].get( - 'id_nomenclature_determination_type' - ) + .controls[ + occHabForm.currentEditingHabForm + ].get('id_nomenclature_determination_type') " [items]="storeService.nomenclatureItems.DETERMINATION_TYP_HAB" comparedKey="id_nomenclature" @@ -533,9 +533,9 @@
[parentFormControl]=" occHabForm.stationForm .get('habitats') - .controls[occHabForm.currentEditingHabForm].get( - 'id_nomenclature_collection_technique' - ) + .controls[ + occHabForm.currentEditingHabForm + ].get('id_nomenclature_collection_technique') " [items]="storeService.nomenclatureItems.TECHNIQUE_COLLECT_HAB" comparedKey="id_nomenclature" diff --git a/contrib/occtax/frontend/app/occtax-form/occtax-form.service.ts b/contrib/occtax/frontend/app/occtax-form/occtax-form.service.ts index 8e553112e9..25fe5681c8 100644 --- a/contrib/occtax/frontend/app/occtax-form/occtax-form.service.ts +++ b/contrib/occtax/frontend/app/occtax-form/occtax-form.service.ts @@ -1,16 +1,22 @@ -import { Injectable } from '@angular/core'; -import { UntypedFormControl } from '@angular/forms'; -import { BehaviorSubject, Observable, of } from 'rxjs'; -import { filter, tap, skip, distinctUntilChanged, switchMap } from 'rxjs/operators'; - -import { HttpClient, HttpParams } from '@angular/common/http'; -import { Router } from '@angular/router'; -import { AuthService, User } from '@geonature/components/auth/auth.service'; -import { CommonService } from '@geonature_common/service/common.service'; -import { DataFormService } from '@geonature_common/form/data-form.service'; -import { ModuleService } from '@geonature/services/module.service'; -import { OcctaxDataService } from '../services/occtax-data.service'; -import { ConfigService } from '@geonature/services/config.service'; +import { Injectable } from "@angular/core"; +import { UntypedFormControl } from "@angular/forms"; +import { BehaviorSubject, Observable, of } from "rxjs"; +import { + filter, + tap, + skip, + distinctUntilChanged, + switchMap, +} from "rxjs/operators"; + +import { HttpClient, HttpParams } from "@angular/common/http"; +import { Router } from "@angular/router"; +import { AuthService, User } from "@geonature/components/auth/auth.service"; +import { CommonService } from "@geonature_common/service/common.service"; +import { DataFormService } from "@geonature_common/form/data-form.service"; +import { ModuleService } from "@geonature/services/module.service"; +import { OcctaxDataService } from "../services/occtax-data.service"; +import { ConfigService } from "@geonature/services/config.service"; @Injectable() export class OcctaxFormService { @@ -31,7 +37,7 @@ export class OcctaxFormService { // public datasetOccurrenceAddFields: Array= []; public datasetCountingAddFields: Array = []; public idTaxonList: number; - public currentTab: 'releve' | 'taxons'; + public currentTab: "releve" | "taxons"; get observerFromCurrentUser() { return; @@ -73,8 +79,8 @@ export class OcctaxFormService { } }, (error) => { - this._commonService.translateToaster('error', 'Releve.DoesNotExist'); - this._router.navigate(['occtax/form']); + this._commonService.translateToaster("error", "Releve.DoesNotExist"); + this._router.navigate(["occtax/form"]); } ); } @@ -82,42 +88,51 @@ export class OcctaxFormService { getDefaultValues(idOrg?: number, regne?: string, group2_inpn?: string) { let params = new HttpParams(); if (idOrg) { - params = params.set('organism', idOrg.toString()); + params = params.set("organism", idOrg.toString()); } if (group2_inpn) { - params = params.append('regne', regne); + params = params.append("regne", regne); } if (regne) { - params = params.append('group2_inpn', group2_inpn); + params = params.append("group2_inpn", group2_inpn); } - return this._http.get(`${this.config.API_ENDPOINT}/occtax/defaultNomenclatures`, { - params: params, - }); + return this._http.get( + `${this.config.API_ENDPOINT}/occtax/defaultNomenclatures`, + { + params: params, + } + ); } - getAdditionnalFields(object_code: Array, idDataset?: string): Observable { + getAdditionnalFields( + object_code: Array, + idDataset?: string + ): Observable { return this.dataFormService .getadditionalFields({ - id_dataset: idDataset || 'null', + id_dataset: idDataset || "null", module_code: [this._moduleService.currentModule.module_code], object_code: object_code, }) .catch((error) => { - console.error('error while get addional fields', error); + console.error("error while get addional fields", error); return of([]); }); } onEditReleve(id) { - this._router.navigate(['occtax/form', id]); + this._router.navigate(["occtax/form", id]); } backToList() { - this._router.navigate(['occtax']); + this._router.navigate(["occtax"]); } formDisabled() { if (this.disabled) { - this._commonService.translateToaster('warning', 'Releve.FillGeometryFirst'); + this._commonService.translateToaster( + "warning", + "Releve.FillGeometryFirst" + ); } } @@ -133,10 +148,14 @@ export class OcctaxFormService { removeOccurrenceData(id_occurrence): void { const occtaxData = this.occtaxData.getValue(); if (occtaxData.releve.properties.t_occurrences_occtax) { - for (let i = 0; i < occtaxData.releve.properties.t_occurrences_occtax.length; i++) { + for ( + let i = 0; + i < occtaxData.releve.properties.t_occurrences_occtax.length; + i++ + ) { if ( - occtaxData.releve.properties.t_occurrences_occtax[i].id_occurrence_occtax === - id_occurrence + occtaxData.releve.properties.t_occurrences_occtax[i] + .id_occurrence_occtax === id_occurrence ) { occtaxData.releve.properties.t_occurrences_occtax.splice(i, 1); break; @@ -157,7 +176,7 @@ export class OcctaxFormService { } formatDate(strDate) { - const date = new Date(strDate + 'T00:00:00'); + const date = new Date(strDate + "T00:00:00"); return { year: date.getFullYear(), month: date.getMonth() + 1, @@ -170,7 +189,9 @@ export class OcctaxFormService { let inter = Object.assign([], globalAddFields); // remove formde dataset additional field from globalAddfield inter = globalAddFields.filter((globalField) => { - return !formerDatasetAddFields.map((f) => f.id_field).includes(globalField.id_field); + return !formerDatasetAddFields + .map((f) => f.id_field) + .includes(globalField.id_field); }); return inter; diff --git a/frontend/.prettierrc b/frontend/.prettierrc index ec3bd2eb2b..d13b182899 100644 --- a/frontend/.prettierrc +++ b/frontend/.prettierrc @@ -5,7 +5,7 @@ "tabWidth": 2, "semi": true, "bracketSpacing": true, - "trailingComma": "es5", + "trailingComma": "none", "singleAttributePerLine": true, "bracketSameLine": false, "htmlWhitespaceSensitivity": "ignore" diff --git a/frontend/cypress/e2e/import/constants/common.js b/frontend/cypress/e2e/import/constants/common.js index 7bacfa87c1..15c187e478 100644 --- a/frontend/cypress/e2e/import/constants/common.js +++ b/frontend/cypress/e2e/import/constants/common.js @@ -1,8 +1,8 @@ export const VIEWPORTS = [ { width: 1920, - height: 1080, - }, + height: 1080 + } ]; export const TIMEOUT_WAIT = 2000; diff --git a/frontend/cypress/e2e/import/constants/fieldsContent.js b/frontend/cypress/e2e/import/constants/fieldsContent.js index f37b212512..12368542bb 100644 --- a/frontend/cypress/e2e/import/constants/fieldsContent.js +++ b/frontend/cypress/e2e/import/constants/fieldsContent.js @@ -2,35 +2,35 @@ export const FIELDS_CONTENT_STEP_UPLOAD = { datasetField: { defaultValue: 'JDD-TEST-IMPORT-ADMIN', newValue: 'JDD-TEST-IMPORT-2', - selector: 'ng-select', + selector: 'ng-select' }, fileUploadField: { defaultValue: 'import/synthese/valid_file_test_link_list_import_synthese.csv', newValue: 'import/synthese/valid_file_import_synthese_test_changed.csv', parentSelector: '[data-qa="import-new-upload-file"]', - selector: '[data-qa="import-new-upload-file-label"]', - }, + selector: '[data-qa="import-new-upload-file-label"]' + } }; export const FIELDS_CONTENT_STEP_FILE_DECODE = { encodeField: { defaultValue: 'utf-8 (auto-détecté)', newValue: 'iso-8859-15', - selector: '[data-qa="import-new-decode-encode"]', + selector: '[data-qa="import-new-decode-encode"]' }, formatField: { defaultValue: 'csv (auto-détecté)', newValue: 'geojson', - selector: '[data-qa="import-new-decode-format"]', + selector: '[data-qa="import-new-decode-format"]' }, delimiterField: { defaultValue: '; (auto-détecté)', newValue: ',', - selector: '[data-qa="import-new-decode-delimiter"]', + selector: '[data-qa="import-new-decode-delimiter"]' }, sridField: { defaultValue: 'WGS84', newValue: 'Lambert93', - selector: '[data-qa="import-new-decode-srid"]', - }, + selector: '[data-qa="import-new-decode-srid"]' + } }; diff --git a/frontend/cypress/e2e/import/constants/files.js b/frontend/cypress/e2e/import/constants/files.js index 4f0b610418..f668a4bc3b 100644 --- a/frontend/cypress/e2e/import/constants/files.js +++ b/frontend/cypress/e2e/import/constants/files.js @@ -3,29 +3,29 @@ export const FILES = { valid: { fixture: 'import/synthese/valid_file_test_link_list_import_synthese.csv', toast: '', - formErrorElement: '', + formErrorElement: '' }, bad: { fixture: 'import/synthese/bad.csv', toast: '', - formErrorElement: '[data-qa="import-new-upload-error-empty"]', + formErrorElement: '[data-qa="import-new-upload-error-empty"]' }, empty: { fixture: 'import/synthese/empty.csv', toast: 'File must start with columns', - formErrorElement: '[data-qa="import-new-upload-error-firstColumn"]', + formErrorElement: '[data-qa="import-new-upload-error-firstColumn"]' }, bad_extension: { fixture: 'import/synthese/bad_extension.pdf', toast: '', - formErrorElement: '', - }, + formErrorElement: '' + } }, occhab: { valid: { fixture: 'import/occhab/valid_file.csv', toast: '', - formErrorElement: '', - }, - }, + formErrorElement: '' + } + } }; diff --git a/frontend/cypress/e2e/import/constants/filters.js b/frontend/cypress/e2e/import/constants/filters.js index a3a6f48c41..a5562d36ee 100644 --- a/frontend/cypress/e2e/import/constants/filters.js +++ b/frontend/cypress/e2e/import/constants/filters.js @@ -2,16 +2,16 @@ export const FILTERS_TABLE = [ { columnName: 'Jeu de données', searchTerm: ['JDD-TEST', 'JDD-TEST-IMPORT-ADMIN', 'JDD-INVALID'], - expectedRowsCount: [4, 1, 0], + expectedRowsCount: [4, 1, 0] }, { columnName: 'Fichier', searchTerm: ['valid_file_test_import', 'invalid_file.csv'], - expectedRowsCount: [2, 0], + expectedRowsCount: [2, 0] }, { columnName: 'Auteur', searchTerm: ['Administrateur-test-import', 'Agent-test-import'], - expectedRowsCount: [4, 1], - }, + expectedRowsCount: [4, 1] + } ]; diff --git a/frontend/cypress/e2e/import/constants/mappings.js b/frontend/cypress/e2e/import/constants/mappings.js index b3ebdbe9a4..a4c73156b2 100644 --- a/frontend/cypress/e2e/import/constants/mappings.js +++ b/frontend/cypress/e2e/import/constants/mappings.js @@ -2,5 +2,5 @@ export const DEFAULT_FIELDMAPPINGS = ['Synthese GeoNature', 'Format DEE (champs export const DEFAULT_CONTENTMAPPINGS = [ 'Nomenclatures SINP (labels)', - 'Nomenclatures SINP (codes)', + 'Nomenclatures SINP (codes)' ]; diff --git a/frontend/cypress/e2e/import/constants/selectors.js b/frontend/cypress/e2e/import/constants/selectors.js index 2993fb258a..5f57c4b730 100644 --- a/frontend/cypress/e2e/import/constants/selectors.js +++ b/frontend/cypress/e2e/import/constants/selectors.js @@ -4,34 +4,34 @@ export const SELECTORS_NAVIGATION = { step: { upload: { back_btn_selector: '', - next_btn_selector: '[data-qa="import-new-upload-validate"]', + next_btn_selector: '[data-qa="import-new-upload-validate"]' }, decode: { back_btn_selector: '[data-qa="import-file-decode-back-btn"]', step_btn_selector: '[data-qa="import-file-decode-step-btn"]', - next_btn_selector: '[data-qa="import-new-decode-validate"]', + next_btn_selector: '[data-qa="import-new-decode-validate"]' }, fieldmapping: { back_btn_selector: '[data-qa="import-fieldmapping-model-back-btn"]', step_btn_selector: '[data-qa="import-fieldmapping-step-btn"]', - next_btn_selector: '[data-qa="import-new-fieldmapping-model-validate"]', + next_btn_selector: '[data-qa="import-new-fieldmapping-model-validate"]' }, contentmapping: { back_btn_selector: '[data-qa="import-contentmapping-back-btn"]', step_btn_selector: '[data-qa="import-contentmapping-step-btn"]', - next_btn_selector: '[data-qa="import-new-contentmapping-model-validate"]', + next_btn_selector: '[data-qa="import-new-contentmapping-model-validate"]' }, import: { back_btn_selector: '[data-qa="import-data-back-btn"]', step_btn_selector: '[data-qa="import-data-step-btn"]', - next_btn_selector: '[data-qa="import-new-verification-start"]', - }, + next_btn_selector: '[data-qa="import-new-verification-start"]' + } }, general: { save_and_quit_btn_selector: '[data-qa="import-new-footer-save"]', cancel_and_delete_import_btn_selector: '[data-qa="import-new-footer-delete"]', - 'delete-import-modal-btn-selector': '[data-qa="modal-delete-validate"]', - }, + 'delete-import-modal-btn-selector': '[data-qa="modal-delete-validate"]' + } }; export const getSelectorsForStep = (stepName) => { diff --git a/frontend/cypress/e2e/import/constants/users.js b/frontend/cypress/e2e/import/constants/users.js index 6f3b9b85e0..43e64fb686 100644 --- a/frontend/cypress/e2e/import/constants/users.js +++ b/frontend/cypress/e2e/import/constants/users.js @@ -3,40 +3,40 @@ export const USERS = [ id: 0, login: { username: 'admin-test-import', - password: 'admin', + password: 'admin' }, destinations: { Synthèse: { count: 3, - code: 'synthese', + code: 'synthese' }, Occhab: { count: 1, - code: 'occhab', - }, + code: 'occhab' + } }, dataset: 'JDD-TEST-IMPORT-ADMIN', - datasetId: 9999, + datasetId: 9999 }, { id: 1, login: { username: 'agent-test-import', - password: 'agent', + password: 'agent' }, destinations: { Synthèse: { count: 1, - code: 'synthese', + code: 'synthese' }, Occhab: { count: 0, - code: 'occhab', - }, + code: 'occhab' + } }, dataset: 'JDD-TEST-IMPORT-2', - datasetId: 9998, - }, + datasetId: 9998 + } ]; export function availableDestinations(destinations) { diff --git a/frontend/cypress/e2e/import/list-table-download-file-spec.js b/frontend/cypress/e2e/import/list-table-download-file-spec.js index 08f2688b12..d3d9d58072 100644 --- a/frontend/cypress/e2e/import/list-table-download-file-spec.js +++ b/frontend/cypress/e2e/import/list-table-download-file-spec.js @@ -2,7 +2,7 @@ import { USERS } from './constants/users'; import { TIMEOUT_WAIT, VIEWPORTS } from './constants/common'; import { getSelectorImportListTableRowFile, - SELECTOR_IMPORT_LIST_TABLE, + SELECTOR_IMPORT_LIST_TABLE } from './constants/selectors'; // //////////////////////////////////////////////////////////////////////////// @@ -49,8 +49,8 @@ describe('File Upload and POST Request Test', () => { )}import/${DESTINATION_CODE}/imports/${JDD_ID}/upload`, body: formData, headers: { - 'Content-Type': 'multipart/form-data', - }, + 'Content-Type': 'multipart/form-data' + } }).then((response) => { // Assert the response status or body expect(response.status).to.equal(200); diff --git a/frontend/cypress/e2e/import/list-table-jdd-modify-delete-spec.js b/frontend/cypress/e2e/import/list-table-jdd-modify-delete-spec.js index 4c26312171..e59a73fb9a 100644 --- a/frontend/cypress/e2e/import/list-table-jdd-modify-delete-spec.js +++ b/frontend/cypress/e2e/import/list-table-jdd-modify-delete-spec.js @@ -5,7 +5,7 @@ import { getSelectorImportListTableRowDelete, getSelectorImportListTableRowEdit, SELECTOR_IMPORT_LIST_TABLE, - SELECTOR_IMPORT_MODAL_DELETE, + SELECTOR_IMPORT_MODAL_DELETE } from './constants/selectors'; // //////////////////////////////////////////////////////////////////////////// @@ -17,13 +17,13 @@ const JDD_LIST = [ { jdd_name: 'JDD-TEST-IMPORT-ADMIN', jdd_is_active: true, - url_on_click_edit: Cypress.env('urlApplication') + 'import/occhab/process/1001', + url_on_click_edit: Cypress.env('urlApplication') + 'import/occhab/process/1001' }, { jdd_name: 'JDD-TEST-IMPORT-INACTIF', jdd_is_active: false, - url_on_click_edit: Cypress.env('urlApplication') + 'import', - }, + url_on_click_edit: Cypress.env('urlApplication') + 'import' + } ]; // //////////////////////////////////////////////////////////////////////////// @@ -76,7 +76,7 @@ describe('Tests actions on active/inactive list JDD ', () => { .should('not.be.disabled'); cy.request('PATCH', `${Cypress.env('apiEndpoint')}meta/dataset/${user.datasetId}`, { - active: false, + active: false }); cy.reload(); @@ -86,7 +86,7 @@ describe('Tests actions on active/inactive list JDD ', () => { .should('be.disabled'); cy.request('PATCH', `${Cypress.env('apiEndpoint')}meta/dataset/${user.datasetId}`, { - active: true, + active: true }); cy.reload(); diff --git a/frontend/cypress/e2e/import/list-table-sort-column-spec.js b/frontend/cypress/e2e/import/list-table-sort-column-spec.js index 28ef856ce8..77dc0da02a 100644 --- a/frontend/cypress/e2e/import/list-table-sort-column-spec.js +++ b/frontend/cypress/e2e/import/list-table-sort-column-spec.js @@ -12,7 +12,7 @@ const COLUMNS = [ { columnName: 'Auteur', sortable: false }, { columnName: 'Debut import', sortable: true }, { columnName: 'Destination', sortable: true }, - { columnName: 'Fin import', sortable: true }, + { columnName: 'Fin import', sortable: true } ]; function getColumnIndexByName(columnName) { diff --git a/frontend/cypress/e2e/import/list-toolbar-destinations-spec.js b/frontend/cypress/e2e/import/list-toolbar-destinations-spec.js index 78e31b134c..2d87fb3d88 100644 --- a/frontend/cypress/e2e/import/list-toolbar-destinations-spec.js +++ b/frontend/cypress/e2e/import/list-toolbar-destinations-spec.js @@ -3,7 +3,7 @@ import { VIEWPORTS } from './constants/common'; import { SELECTOR_DESTINATIONS, SELECTOR_IMPORT_LIST_TOOLBAR, - SELECTOR_IMPORT_LIST_TOOLBAR_DESTINATIONS, + SELECTOR_IMPORT_LIST_TOOLBAR_DESTINATIONS } from './constants/selectors'; // //////////////////////////////////////////////////////////////////////////// diff --git a/frontend/cypress/e2e/import/list-toolbar-search-spec.js b/frontend/cypress/e2e/import/list-toolbar-search-spec.js index 9631a84bd1..fc64d9c4d6 100644 --- a/frontend/cypress/e2e/import/list-toolbar-search-spec.js +++ b/frontend/cypress/e2e/import/list-toolbar-search-spec.js @@ -3,7 +3,7 @@ import { VIEWPORTS } from './constants/common'; import { FILTERS_TABLE } from './constants/filters'; import { SELECTOR_IMPORT_LIST_TABLE, - SELECTOR_IMPORT_LIST_TOOLBAR_SEARCH, + SELECTOR_IMPORT_LIST_TOOLBAR_SEARCH } from './constants/selectors'; // //////////////////////////////////////////////////////////////////////////// @@ -32,7 +32,7 @@ describe('Tests list import columns and rows content', () => { cy.geonatureLogin(user.login.username, user.login.password); cy.visitImport(); cy.intercept(Cypress.env('apiEndpoint') + 'import/imports/?page=1&search=', { - fixture: 'import/synthese/liste_import.json', + fixture: 'import/synthese/liste_import.json' }); }); diff --git a/frontend/cypress/e2e/import/navigation-check-back-each-steps-spec.js b/frontend/cypress/e2e/import/navigation-check-back-each-steps-spec.js index 880fcfd40f..34e74e5669 100644 --- a/frontend/cypress/e2e/import/navigation-check-back-each-steps-spec.js +++ b/frontend/cypress/e2e/import/navigation-check-back-each-steps-spec.js @@ -5,14 +5,14 @@ import { SELECTOR_IMPORT_LIST_TABLE, getSelectorImportListTableRowEdit, getSelectorImportListTableRowDelete, - SELECTOR_IMPORT_MODAL_DELETE_VALIDATE, + SELECTOR_IMPORT_MODAL_DELETE_VALIDATE } from './constants/selectors'; import { USERS } from './constants/users'; import { TIMEOUT_WAIT, VIEWPORTS } from './constants/common'; import { FIELDS_CONTENT_STEP_UPLOAD, - FIELDS_CONTENT_STEP_FILE_DECODE, + FIELDS_CONTENT_STEP_FILE_DECODE } from './constants/fieldsContent'; // //////////////////////////////////////////////////////////////////////////// @@ -23,20 +23,20 @@ function getURLStepImport(destination_label, id_import) { const baseUrl = Cypress.env('urlApplication'); const urlStepsImport = { step_1_upload: { - url: `${baseUrl}import/${destination_label}/process/${id_import}/upload`, + url: `${baseUrl}import/${destination_label}/process/${id_import}/upload` }, step_2_decode_file: { - url: `${baseUrl}import/${destination_label}/process/${id_import}/decode`, + url: `${baseUrl}import/${destination_label}/process/${id_import}/decode` }, step_3_fieldmapping: { - url: `${baseUrl}import/${destination_label}/process/${id_import}/fieldmapping`, + url: `${baseUrl}import/${destination_label}/process/${id_import}/fieldmapping` }, step_4_contentmapping: { - url: `${baseUrl}import/${destination_label}/process/${id_import}/contentmapping`, + url: `${baseUrl}import/${destination_label}/process/${id_import}/contentmapping` }, step_5_import_data: { - url: `${baseUrl}import/${destination_label}/process/${id_import}/import`, - }, + url: `${baseUrl}import/${destination_label}/process/${id_import}/import` + } }; return urlStepsImport; diff --git a/frontend/cypress/e2e/import/navigation-list-spec.js b/frontend/cypress/e2e/import/navigation-list-spec.js index a6509cd0de..6ae0888c92 100644 --- a/frontend/cypress/e2e/import/navigation-list-spec.js +++ b/frontend/cypress/e2e/import/navigation-list-spec.js @@ -7,7 +7,7 @@ import { SELECTOR_IMPORT_LIST_TABLE, SELECTOR_IMPORT_LIST_TOOLBAR_DESTINATIONS, SELECTOR_IMPORT_LIST_TOOLBAR_SEARCH, - SELECTOR_IMPORT_MODAL_DESTINATION_START, + SELECTOR_IMPORT_MODAL_DESTINATION_START } from './constants/selectors'; // //////////////////////////////////////////////////////////////////////////// diff --git a/frontend/cypress/e2e/import/navigation-mappings-cancel-save-spec.js b/frontend/cypress/e2e/import/navigation-mappings-cancel-save-spec.js index 003cffe2b4..afa03dd87c 100644 --- a/frontend/cypress/e2e/import/navigation-mappings-cancel-save-spec.js +++ b/frontend/cypress/e2e/import/navigation-mappings-cancel-save-spec.js @@ -11,7 +11,7 @@ import { SELECTOR_IMPORT_FIELDMAPPING_OBSERVERS, SELECTOR_IMPORT_FIELDMAPPING_WKT, SELECTOR_IMPORT_FOOTER_DELETE, - SELECTOR_IMPORT_FOOTER_SAVE, + SELECTOR_IMPORT_FOOTER_SAVE } from './constants/selectors'; // //////////////////////////////////////////////////////////////////////////// diff --git a/frontend/cypress/e2e/import/step1-upload-spec.js b/frontend/cypress/e2e/import/step1-upload-spec.js index b2ec1e5aac..18535f2ad3 100644 --- a/frontend/cypress/e2e/import/step1-upload-spec.js +++ b/frontend/cypress/e2e/import/step1-upload-spec.js @@ -4,7 +4,7 @@ import { FILES } from './constants/files'; import { SELECTOR_IMPORT_UPLOAD_DATASET, SELECTOR_IMPORT_UPLOAD_FILE, - SELECTOR_IMPORT_UPLOAD_VALIDATE, + SELECTOR_IMPORT_UPLOAD_VALIDATE } from './constants/selectors'; // //////////////////////////////////////////////////////////////////////////// diff --git a/frontend/cypress/e2e/import/step3-field-mapping-spec.js b/frontend/cypress/e2e/import/step3-field-mapping-spec.js index 2598ecb528..e69a5ac5e2 100644 --- a/frontend/cypress/e2e/import/step3-field-mapping-spec.js +++ b/frontend/cypress/e2e/import/step3-field-mapping-spec.js @@ -20,7 +20,7 @@ import { SELECTOR_IMPORT_FIELDMAPPING_SELECTION_RENAME_OK, SELECTOR_IMPORT_FIELDMAPPING_SELECTION_RENAME_TEXT, SELECTOR_IMPORT_FIELDMAPPING_VALIDATE, - SELECTOR_IMPORT_FIELDMAPPING_WKT, + SELECTOR_IMPORT_FIELDMAPPING_WKT } from './constants/selectors'; // //////////////////////////////////////////////////////////////////////////// diff --git a/frontend/cypress/e2e/import/step4-content-mapping-spec.js b/frontend/cypress/e2e/import/step4-content-mapping-spec.js index 352dc0ae82..03f6c8a7f0 100644 --- a/frontend/cypress/e2e/import/step4-content-mapping-spec.js +++ b/frontend/cypress/e2e/import/step4-content-mapping-spec.js @@ -18,7 +18,7 @@ import { SELECTOR_IMPORT_CONTENTMAPPING_SELECTION_RENAME_OK, SELECTOR_IMPORT_CONTENTMAPPING_SELECTION_TEXT, SELECTOR_IMPORT_CONTENTMAPPING_VALIDATE, - SELECTOR_IMPORT_NEW_VERIFICATION_START, + SELECTOR_IMPORT_NEW_VERIFICATION_START } from './constants/selectors'; // //////////////////////////////////////////////////////////////////////////// diff --git a/frontend/cypress/e2e/import/step5-recaptiulatif-spec.js b/frontend/cypress/e2e/import/step5-recaptiulatif-spec.js index 1ff9303e8e..7e9ba88fd9 100644 --- a/frontend/cypress/e2e/import/step5-recaptiulatif-spec.js +++ b/frontend/cypress/e2e/import/step5-recaptiulatif-spec.js @@ -3,7 +3,7 @@ import { VIEWPORTS } from './constants/common'; import { FILES } from './constants/files'; import { SELECTOR_IMPORT_RECAPITULATIF, - SELECTOR_IMPORT_RECAPITULATIF_MAP, + SELECTOR_IMPORT_RECAPITULATIF_MAP } from './constants/selectors'; // //////////////////////////////////////////////////////////////////////////// diff --git a/frontend/cypress/e2e/import/step6-report-spec.js b/frontend/cypress/e2e/import/step6-report-spec.js index 47c056db9a..3349e55c65 100644 --- a/frontend/cypress/e2e/import/step6-report-spec.js +++ b/frontend/cypress/e2e/import/step6-report-spec.js @@ -7,7 +7,7 @@ import { SELECTOR_IMPORT_REPORT_DOWNLOAD_PDF, SELECTOR_IMPORT_REPORT_ERRORS_CSV, SELECTOR_IMPORT_REPORT_ERRORS_TITLE, - SELECTOR_IMPORT_REPORT_MAP, + SELECTOR_IMPORT_REPORT_MAP } from './constants/selectors'; // //////////////////////////////////////////////////////////////////////////// @@ -54,7 +54,7 @@ describe('Import - Report step', () => { // Download a verify the error file cy.get(SELECTOR_IMPORT_REPORT_ERRORS_CSV).click({ - force: true, + force: true }); cy.verifyDownload(FILENAME_INVALID_DATA, DOWNLOADS_FOLDER).then(() => { cy.fixture('import/synthese/invalid_data.csv').then((fixtureFileContent) => { @@ -76,7 +76,7 @@ describe('Import - Report step', () => { // PDF report cy.get(SELECTOR_IMPORT_REPORT_DOWNLOAD_PDF).click({ - force: true, + force: true }); cy.wait(TIMEOUT_WAIT); diff --git a/frontend/cypress/e2e/metadata-spec.js b/frontend/cypress/e2e/metadata-spec.js index 611cfbe058..99f53ff781 100644 --- a/frontend/cypress/e2e/metadata-spec.js +++ b/frontend/cypress/e2e/metadata-spec.js @@ -11,12 +11,12 @@ describe('Testing metadata', () => { name: 'CA-created', // name:'Mon cadre d\'acquisition', description: "description de mon cadre d'acquisition", - startDate: '17/03/2022', + startDate: '17/03/2022' }; const newJdd = { name: 'Mon jeu de données', shortname: 'Mon jdd', - description: 'description de mon jdd', + description: 'description de mon jdd' }; beforeEach(() => { @@ -175,7 +175,7 @@ describe('Testing metadata', () => { cy.get('[data-qa="pnx-metadata-acq-framework-header-' + caUUID + '"]').click(); cy.get('[data-qa="pnx-metadata-dataset-name-' + newJdd.name + '"] td > button').click({ multiple: true, - force: true, + force: true }); }); diff --git a/frontend/cypress/e2e/occhab-spec.js b/frontend/cypress/e2e/occhab-spec.js index 0dd368585b..c4ad3ee0c7 100644 --- a/frontend/cypress/e2e/occhab-spec.js +++ b/frontend/cypress/e2e/occhab-spec.js @@ -22,7 +22,7 @@ describe('Testing occhab', () => { [300, 250], [300, 300], [250, 300], - [250, 250], + [250, 250] ]; positions.forEach((pos) => { cy.get(canvas).click(pos[0], pos[1]); diff --git a/frontend/cypress/e2e/synthese-spec.js b/frontend/cypress/e2e/synthese-spec.js index c598f4d83c..c9158ac3a1 100644 --- a/frontend/cypress/e2e/synthese-spec.js +++ b/frontend/cypress/e2e/synthese-spec.js @@ -186,7 +186,7 @@ describe('Tests gn_synthese', () => { cy.get('[data-qa="synthese-download-btn"]').click(); cy.get('[data-qa="download-csv"]').click({ - force: true, + force: true }); cy.get('[data-qa="synthese-download-close-btn"]').click(); diff --git a/frontend/cypress/plugins/index.js b/frontend/cypress/plugins/index.js index 4db097f777..1939a5bffa 100644 --- a/frontend/cypress/plugins/index.js +++ b/frontend/cypress/plugins/index.js @@ -22,7 +22,7 @@ module.exports = (on, config) => { } const filenames = fs.readdirSync(downloadsDirPath); return filenames[0]; - }, + } }); return config; }; diff --git a/frontend/cypress/support/import/getGlobalConfig.js b/frontend/cypress/support/import/getGlobalConfig.js index 394ff17129..7721d2a98e 100644 --- a/frontend/cypress/support/import/getGlobalConfig.js +++ b/frontend/cypress/support/import/getGlobalConfig.js @@ -9,13 +9,13 @@ Cypress.Commands.add('getGlobalConfig', () => { 'Auteur', 'Debut import', 'Destination', - 'Fin import', + 'Fin import' ]; const columns = columnsImport .filter((column) => columnNames.includes(column.name)) .map((column) => ({ name: column.name, - sortable: column.filter, + sortable: column.filter })); return columns; }) diff --git a/frontend/cypress/support/users/geonatureLogin.js b/frontend/cypress/support/users/geonatureLogin.js index 94f8999d8c..a86ea42a91 100644 --- a/frontend/cypress/support/users/geonatureLogin.js +++ b/frontend/cypress/support/users/geonatureLogin.js @@ -1,6 +1,6 @@ const DEFAULT_LOGIN = { username: 'admin', - password: 'admin', + password: 'admin' }; Cypress.Commands.add('geonatureLogin', (username, password) => { @@ -13,8 +13,8 @@ Cypress.Commands.add('geonatureLogin', (username, password) => { url: `${Cypress.env('apiEndpoint')}auth/login`, body: { login: username, - password: password, - }, + password: password + } }) .its('body') .then((body) => { diff --git a/frontend/cypress/support/users/geonatureLogout.js b/frontend/cypress/support/users/geonatureLogout.js index 4900b95b52..1bb8080211 100644 --- a/frontend/cypress/support/users/geonatureLogout.js +++ b/frontend/cypress/support/users/geonatureLogout.js @@ -1,6 +1,6 @@ Cypress.Commands.add('geonatureLogout', () => { cy.request({ method: 'GET', - url: `${Cypress.env('apiEndpoint')}auth/logout`, + url: `${Cypress.env('apiEndpoint')}auth/logout` }); }); diff --git a/frontend/src/app/GN2CommonModule/form/dynamic-form/dynamic-form.component.html b/frontend/src/app/GN2CommonModule/form/dynamic-form/dynamic-form.component.html index 2fd0925e68..04200a1793 100644 --- a/frontend/src/app/GN2CommonModule/form/dynamic-form/dynamic-form.component.html +++ b/frontend/src/app/GN2CommonModule/form/dynamic-form/dynamic-form.component.html @@ -11,7 +11,7 @@ 'number', 'file', 'medias', - 'bool_radio', + 'bool_radio' ].includes(formDefComp['type_widget']) " > diff --git a/frontend/src/app/shared/discussionCardModule/discussion-card.component.html b/frontend/src/app/shared/discussionCardModule/discussion-card.component.html index f2fe7571ba..519569ac7f 100644 --- a/frontend/src/app/shared/discussionCardModule/discussion-card.component.html +++ b/frontend/src/app/shared/discussionCardModule/discussion-card.component.html @@ -117,7 +117,7 @@ color: ['0', '6'].includes(comment.cd_nomenclature) ? 'darkslategray' : 'white', border: ['0', '6'].includes(comment.cd_nomenclature) ? '1px solid rgba(0,0,0,0.2)' - : 'none', + : 'none' }" > {{ comment.label_default }} diff --git a/frontend/src/app/shared/syntheseSharedModule/synthese-info-obs/synthese-info-obs.component.html b/frontend/src/app/shared/syntheseSharedModule/synthese-info-obs/synthese-info-obs.component.html index 8aa9d646a1..876ef0408a 100644 --- a/frontend/src/app/shared/syntheseSharedModule/synthese-info-obs/synthese-info-obs.component.html +++ b/frontend/src/app/shared/syntheseSharedModule/synthese-info-obs/synthese-info-obs.component.html @@ -25,7 +25,7 @@ aria-label="Close" (click)="activeModal.dismiss('Cross click')" [ngStyle]="{ - outlineWidth: '0px', + outlineWidth: '0px' }" data-qa="synthese-info-obs-close-btn" > diff --git a/frontend/src/app/utils/filelayer.js b/frontend/src/app/utils/filelayer.js index 3c8f5ae080..4a031692c7 100644 --- a/frontend/src/app/utils/filelayer.js +++ b/frontend/src/app/utils/filelayer.js @@ -43,7 +43,7 @@ options: { layer: L.geoJson, layerOptions: {}, - fileSizeLimit: 1024, + fileSizeLimit: 1024 }, initialize: function (map, options) { @@ -54,7 +54,7 @@ geojson: this._loadGeoJSON, json: this._loadGeoJSON, gpx: this._convertToGeoJSON, - kml: this._convertToGeoJSON, + kml: this._convertToGeoJSON }; }, @@ -87,7 +87,7 @@ this.fire('data:loaded', { layer: layer, filename: file.name, - format: parser.ext, + format: parser.ext }); } catch (err) { this.fire('data:error', { error: err }); @@ -143,7 +143,7 @@ this.fire('data:loaded', { layer: layer, filename: name, - format: parser.ext, + format: parser.ext }); } catch (err) { this.fire('data:error', { error: err }); @@ -153,7 +153,7 @@ _isParameterMissing: function (v, vname) { if (typeof v === 'undefined') { this.fire('data:error', { - error: new Error('Missing parameter: ' + vname), + error: new Error('Missing parameter: ' + vname) }); return true; } @@ -166,13 +166,13 @@ parser = this._parsers[ext]; if (!parser) { this.fire('data:error', { - error: new Error('Unsupported file type (' + ext + ')'), + error: new Error('Unsupported file type (' + ext + ')') }); return undefined; } return { processor: parser, - ext: ext, + ext: ext }; }, @@ -182,7 +182,7 @@ this.fire('data:error', { error: new Error( 'File size exceeds limit (' + fileSize + ' > ' + this.options.fileSizeLimit + 'kb)' - ), + ) }); return false; } @@ -214,20 +214,20 @@ } geojson = toGeoJSON[format](content); return this._loadGeoJSON(geojson); - }, + } }); var FileLayerLoad = L.Control.extend({ statics: { TITLE: 'Load local file (GPX, KML, GeoJSON)', - LABEL: '⌅', + LABEL: '⌅' }, options: { position: 'topleft', fitBounds: true, layerOptions: {}, addToMap: true, - fileSizeLimit: 1024, + fileSizeLimit: 1024 }, initialize: function (options) { @@ -280,7 +280,7 @@ thisLoader.loadMultiple(e.dataTransfer.files); map.scrollWheelZoom.enable(); - }, + } }; for (callbackName in callbacks) { if (callbacks.hasOwnProperty(callbackName)) { @@ -330,7 +330,7 @@ e.preventDefault(); }); return container; - }, + } }); L.FileLayer = {}; diff --git a/frontend/src/app/utils/leaflet-icon.js b/frontend/src/app/utils/leaflet-icon.js index 12f03752eb..0b98ce1252 100644 --- a/frontend/src/app/utils/leaflet-icon.js +++ b/frontend/src/app/utils/leaflet-icon.js @@ -12,6 +12,6 @@ export const CustomIcon = Icon.extend({ iconAnchor: [12, 41], popupAnchor: [1, -34], tooltipAnchor: [16, -28], - shadowSize: [41, 41], - }, + shadowSize: [41, 41] + } }); diff --git a/frontend/src/webpack.config.js b/frontend/src/webpack.config.js index 81d15e0351..339d3aed98 100644 --- a/frontend/src/webpack.config.js +++ b/frontend/src/webpack.config.js @@ -3,7 +3,7 @@ const webpack = require('webpack'); module.exports = { plugins: [ new webpack.ProvidePlugin({ - process: 'process/browser', - }), - ], + process: 'process/browser' + }) + ] };