Commit 7e4091eb authored by Julien BOUYER's avatar Julien BOUYER
Browse files

UNOTOPLYS-217 chore : fix des erreurs ESLint

parent ae484431
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
"prettier:check": "prettier --check \"{,src/**/,webpack/}*.{md,json,yml,html,js,ts,tsx,css,scss,vue,java}\"", "prettier:check": "prettier --check \"{,src/**/,webpack/}*.{md,json,yml,html,js,ts,tsx,css,scss,vue,java}\"",
"prettier:format": "prettier --write \"{,src/**/,webpack/}*.{md,json,yml,html,js,ts,tsx,css,scss,vue,java}\"", "prettier:format": "prettier --write \"{,src/**/,webpack/}*.{md,json,yml,html,js,ts,tsx,css,scss,vue,java}\"",
"lint": "vue-cli-service lint --no-fix", "lint": "vue-cli-service lint --no-fix",
"lint:fix": "vue-cli-service lint", "lint:fix": "vue-cli-service lint --fix",
"cleanup": "rimraf target/classes/static/", "cleanup": "rimraf target/classes/static/",
"clean-www": "rimraf target/classes/static/app/{src,target/}", "clean-www": "rimraf target/classes/static/app/{src,target/}",
"start": "npm run webapp:dev", "start": "npm run webapp:dev",
......
...@@ -7,7 +7,7 @@ export default class ConfigurationService { ...@@ -7,7 +7,7 @@ export default class ConfigurationService {
const properties = []; const properties = [];
const propertiesObject = this.getConfigPropertiesObjects(res.data); const propertiesObject = this.getConfigPropertiesObjects(res.data);
for (const key in propertiesObject) { for (const key in propertiesObject) {
if (propertiesObject.hasOwnProperty(key)) { if (Object.prototype.hasOwnProperty.call(propertiesObject, key)) {
properties.push(propertiesObject[key]); properties.push(propertiesObject[key]);
} }
} }
...@@ -31,7 +31,7 @@ export default class ConfigurationService { ...@@ -31,7 +31,7 @@ export default class ConfigurationService {
const detailProperties = propertyObject['properties']; const detailProperties = propertyObject['properties'];
const vals = []; const vals = [];
for (const keyDetail in detailProperties) { for (const keyDetail in detailProperties) {
if (detailProperties.hasOwnProperty(keyDetail)) { if (Object.prototype.hasOwnProperty.call(detailProperties, keyDetail)) {
vals.push({ key: keyDetail, val: detailProperties[keyDetail]['value'] }); vals.push({ key: keyDetail, val: detailProperties[keyDetail]['value'] });
} }
} }
......
...@@ -46,7 +46,7 @@ export default class HealthService { ...@@ -46,7 +46,7 @@ export default class HealthService {
let hasDetails = false; let hasDetails = false;
for (const key in healthObject) { for (const key in healthObject) {
if (healthObject.hasOwnProperty(key)) { if (Object.prototype.hasOwnProperty.call(healthObject, key)) {
const value = healthObject[key]; const value = healthObject[key];
if (key === 'status' || key === 'error') { if (key === 'status' || key === 'error') {
healthData[key] = value; healthData[key] = value;
...@@ -73,7 +73,7 @@ export default class HealthService { ...@@ -73,7 +73,7 @@ export default class HealthService {
public flattenHealthData(result: any, path: any, data: any): any { public flattenHealthData(result: any, path: any, data: any): any {
for (const key in data) { for (const key in data) {
if (data.hasOwnProperty(key)) { if (Object.prototype.hasOwnProperty.call(data, key)) {
const value = data[key]; const value = data[key];
if (this.isHealthObject(value)) { if (this.isHealthObject(value)) {
if (this.hasSubSystem(value)) { if (this.hasSubSystem(value)) {
...@@ -106,7 +106,7 @@ export default class HealthService { ...@@ -106,7 +106,7 @@ export default class HealthService {
let result = false; let result = false;
for (const key in healthObject) { for (const key in healthObject) {
if (healthObject.hasOwnProperty(key)) { if (Object.prototype.hasOwnProperty.call(healthObject, key)) {
const value = healthObject[key]; const value = healthObject[key];
if (value && value.status) { if (value && value.status) {
result = true; result = true;
...@@ -120,7 +120,7 @@ export default class HealthService { ...@@ -120,7 +120,7 @@ export default class HealthService {
let result = false; let result = false;
for (const key in healthObject) { for (const key in healthObject) {
if (healthObject.hasOwnProperty(key)) { if (Object.prototype.hasOwnProperty.call(healthObject, key)) {
if (key === 'status') { if (key === 'status') {
result = true; result = true;
} }
......
...@@ -11,7 +11,7 @@ import Toolbar from '@/components/toolbar/toolbar.vue'; ...@@ -11,7 +11,7 @@ import Toolbar from '@/components/toolbar/toolbar.vue';
}, },
}) })
export default class AdminHomeComponent extends Vue { export default class AdminHomeComponent extends Vue {
private cards: Object[] = [ private cards: any[] = [
{ title: 'Mon premier workspace', number_element: '15', type_element: 'Questionnaires', link: 'ScreenEdit' }, { title: 'Mon premier workspace', number_element: '15', type_element: 'Questionnaires', link: 'ScreenEdit' },
{ title: 'Staps Nantes', number_element: '32', type_element: 'Questionnaires', link: 'ScreenEdit' }, { title: 'Staps Nantes', number_element: '32', type_element: 'Questionnaires', link: 'ScreenEdit' },
]; ];
......
...@@ -108,13 +108,7 @@ ...@@ -108,13 +108,7 @@
</tr> </tr>
</tbody> </tbody>
</table> </table>
<b-modal <b-modal ref="removeUser" id="removeUser" v-bind:title="$t('entity.delete.title')" @ok="deleteUser()">
ref="removeUser"
id="removeUser"
title="Confirm delete operation"
v-bind:title="$t('entity.delete.title')"
@ok="deleteUser()"
>
<div class="modal-body"> <div class="modal-body">
<p id="jhi-delete-user-heading" v-text="$t('userManagement.delete.question', { login: removeId })"> <p id="jhi-delete-user-heading" v-text="$t('userManagement.delete.question', { login: removeId })">
Are you sure you want to delete this user? Are you sure you want to delete this user?
......
import Vue from 'vue';
import Component from 'vue-class-component';
@Component
export default class CardToolbar extends Vue {}
<template>
<!--<div class="flex items-center">-->
<!--<button class="p-1 text-blue-600 transition rounded-md hover:text-white hover:bg-blue-600 focus:ring">-->
<!--<svg class="icon" viewBox="0 0 24 24">-->
<!--<path fill="currentColor" d="M21,7V3H17V4H7V3H3V7H4V17H3V21H7V20H17V21H21V17H20V7H21M18,4H20V6H18V4M4,4H6V6H4V4M6,20H4V18H6V20M20,20H18V18H20V20M18,17H17V18H7V17H6V7H7V6H17V7H18V17M16,8V10H13V16H11V10H8V8H16Z"></path>-->
<!--</svg>-->
<!--</button>-->
<!--<button class="p-1 text-blue-600 transition rounded-md hover:text-white hover:bg-blue-600 focus:ring">-->
<!--<svg class="icon" viewBox="0 0 24 24">-->
<!--<path fill="currentColor" d="M21,3H3C2,3 1,4 1,5V19A2,2 0 0,0 3,21H21C22,21 23,20 23,19V5C23,4 22,3 21,3M5,17L8.5,12.5L11,15.5L14.5,11L19,17H5Z"></path>-->
<!--</svg>-->
<!--</button>-->
<!--<button class="p-1 text-blue-600 transition rounded-md hover:text-white hover:bg-blue-600 focus:ring">-->
<!--<svg class="icon" viewBox="0 0 24 24">-->
<!--<path fill="currentColor" d="M18,9H16V7H18M18,13H16V11H18M18,17H16V15H18M8,9H6V7H8M8,13H6V11H8M8,17H6V15H8M18,3V5H16V3H8V5H6V3H4V21H6V19H8V21H16V19H18V21H20V3H18Z"></path>-->
<!--</svg>-->
<!--</button>-->
<!--<button class="p-1 text-blue-600 transition rounded-md hover:text-white hover:bg-blue-600 focus:ring">-->
<!--<svg class="icon" viewBox="0 0 24 24">-->
<!--<path fill="currentColor" d="M20.56 18H3.44C2.65 18 2 17.37 2 16.59V7.41C2 6.63 2.65 6 3.44 6H20.56C21.35 6 22 6.63 22 7.41V16.59C22 17.37 21.35 18 20.56 18M6.81 15.19V11.53L8.73 13.88L10.65 11.53V15.19H12.58V8.81H10.65L8.73 11.16L6.81 8.81H4.89V15.19H6.81M19.69 12H17.77V8.81H15.85V12H13.92L16.81 15.28L19.69 12Z"></path>-->
<!--</svg>-->
<!--</button>-->
<!--</div>-->
</template>
<script lang="ts" src="./card-toolbar.component.ts" />
<template></template> <template>
<div></div>
</template>
<script lang="ts" src="./message.component.ts" /> <script lang="ts" src="./message.component.ts" />
<template> <template>
<component :is="componentForItem" :configuration="componentConfiguration" @itemEdit="itemEdit"/> <component :is="componentForItem" :configuration="componentConfiguration" @itemEdit="itemEdit" />
</template> </template>
<script lang="ts" src="./screen-item-edit.component.ts" /> <script lang="ts" src="./screen-item-edit.component.ts" />
...@@ -18,7 +18,7 @@ export default class AdminUsersTable extends Vue { ...@@ -18,7 +18,7 @@ export default class AdminUsersTable extends Vue {
@Prop() @Prop()
public authorizedUsers: User[]; public authorizedUsers: User[];
public loginSearch: string = ''; public loginSearch = '';
private userSelected: IUser = new User(); private userSelected: IUser = new User();
......
...@@ -11,7 +11,7 @@ export default class Item extends Vue { ...@@ -11,7 +11,7 @@ export default class Item extends Vue {
@Prop() @Prop()
public idx: string; public idx: string;
public get currentComponent(): object { public get currentComponent(): any {
const type = this.item.type; const type = this.item.type;
// noinspection TypeScriptCheckImport (import fait au runtime) // noinspection TypeScriptCheckImport (import fait au runtime)
return () => import(`@/front/components/${type}/${type}`); return () => import(`@/front/components/${type}/${type}`);
......
...@@ -16,7 +16,7 @@ export default class ScreenFooter extends Vue { ...@@ -16,7 +16,7 @@ export default class ScreenFooter extends Vue {
public hasPrevious: boolean; public hasPrevious: boolean;
@Prop() @Prop()
public progress: object; public progress: any;
@Inject('frontFormService') @Inject('frontFormService')
private frontFormService: () => FrontFormService; private frontFormService: () => FrontFormService;
......
...@@ -3,6 +3,7 @@ import Component from 'vue-class-component'; ...@@ -3,6 +3,7 @@ import Component from 'vue-class-component';
import ScreenHeader from '@/front/screen/screen-header.vue'; import ScreenHeader from '@/front/screen/screen-header.vue';
import ScreenFooter from '@/front/screen/screen-footer.vue'; import ScreenFooter from '@/front/screen/screen-footer.vue';
import Item from '@/front/item/item.vue'; import Item from '@/front/item/item.vue';
import { IScreen } from '@/shared/model/screen.model';
@Component({ @Component({
components: { components: {
...@@ -12,11 +13,11 @@ import Item from '@/front/item/item.vue'; ...@@ -12,11 +13,11 @@ import Item from '@/front/item/item.vue';
}, },
}) })
export default class Screen extends Vue { export default class Screen extends Vue {
public get currentScreen(): object { public get currentScreen(): IScreen {
return this.$store.getters.currentScreen; return this.$store.getters.currentScreen;
} }
public get progress(): object { public get progress(): any {
return this.$store.getters.progress; return this.$store.getters.progress;
} }
} }
...@@ -4,10 +4,10 @@ import { Store } from 'vuex'; ...@@ -4,10 +4,10 @@ import { Store } from 'vuex';
import { BUILD_TIMESTAMP } from '@/constants'; import { BUILD_TIMESTAMP } from '@/constants';
export default class TranslationService { export default class TranslationService {
private store: Store<{}>; private store: Store<any>;
private i18n: VueI18n; private i18n: VueI18n;
constructor(store: Store<{}>, i18n: VueI18n) { constructor(store: Store<any>, i18n: VueI18n) {
this.store = store; this.store = store;
this.i18n = i18n; this.i18n = i18n;
} }
......
import { Store } from 'vuex'; import { Store } from 'vuex';
export default class JhiAlertService { export default class JhiAlertService {
private store: Store<{}>; private store: Store<any>;
constructor(store: Store<{}>) { constructor(store: Store<any>) {
this.store = store; this.store = store;
this.store.commit('initAlert'); this.store.commit('initAlert');
} }
......
...@@ -81,10 +81,10 @@ export default class JhiDataUtils extends Vue { ...@@ -81,10 +81,10 @@ export default class JhiDataUtils extends Vue {
*/ */
clearInputImage(entity, elementRef, field, fieldContentType, idInput) { clearInputImage(entity, elementRef, field, fieldContentType, idInput) {
if (entity && field && fieldContentType) { if (entity && field && fieldContentType) {
if (entity.hasOwnProperty(field)) { if (Object.prototype.hasOwnProperty.call(entity, field)) {
entity[field] = null; entity[field] = null;
} }
if (entity.hasOwnProperty(fieldContentType)) { if (Object.prototype.hasOwnProperty.call(entity, fieldContentType)) {
entity[fieldContentType] = null; entity[fieldContentType] = null;
} }
if (elementRef && idInput && elementRef.nativeElement.querySelector('#' + idInput)) { if (elementRef && idInput && elementRef.nativeElement.querySelector('#' + idInput)) {
......
...@@ -9,7 +9,6 @@ export default class JhiItemCountComponent extends Vue { ...@@ -9,7 +9,6 @@ export default class JhiItemCountComponent extends Vue {
total: number; total: number;
@Prop() @Prop()
itemsPerPage: number; itemsPerPage: number;
i18nEnabled = true;
get first() { get first() {
return (this.page - 1) * this.itemsPerPage === 0 ? 1 : (this.page - 1) * this.itemsPerPage + 1; return (this.page - 1) * this.itemsPerPage === 0 ? 1 : (this.page - 1) * this.itemsPerPage + 1;
......
<template> <template>
<div class="info jhi-item-count"> <div class="info jhi-item-count">
<span v-if="i18nEnabled" v-text="$t('global.item-count', { first, second, total })" <span>{{ $t('global.item-count', { first, second, total }) }} </span>
>Showing {{ first }} - {{ second }} of {{ total }} items.</span
>
<span v-if="!i18nEnabled">
Showing {{ (page - 1) * itemsPerPage === 0 ? 1 : (page - 1) * itemsPerPage + 1 }} -
{{ page * itemsPerPage < total ? page * itemsPerPage : total }}
of {{ total }} items.
</span>
</div> </div>
</template> </template>
......
...@@ -17,7 +17,7 @@ export default class HeaderService { ...@@ -17,7 +17,7 @@ export default class HeaderService {
} }
public updateTabsForWorkspaceId(workspaceId: number, currentKey: string): void { public updateTabsForWorkspaceId(workspaceId: number, currentKey: string): void {
const tabs: Object[] = [ const tabs: any[] = [
{ {
title: this.i18n.t('onglets.parametrages'), title: this.i18n.t('onglets.parametrages'),
link: `/admin/workspace/${workspaceId}/settings`, link: `/admin/workspace/${workspaceId}/settings`,
...@@ -33,7 +33,7 @@ export default class HeaderService { ...@@ -33,7 +33,7 @@ export default class HeaderService {
} }
public updateTabsForFormId(workspaceId: number, formId: number, currentKey: string): void { public updateTabsForFormId(workspaceId: number, formId: number, currentKey: string): void {
const tabs: Object[] = [ const tabs: any[] = [
{ {
title: this.i18n.t('onglets.parametrages'), title: this.i18n.t('onglets.parametrages'),
link: `/admin/workspace/${workspaceId}/form/${formId}/settings`, link: `/admin/workspace/${workspaceId}/form/${formId}/settings`,
...@@ -54,7 +54,7 @@ export default class HeaderService { ...@@ -54,7 +54,7 @@ export default class HeaderService {
} }
public updateTabsForAdmin(currentTab: string): void { public updateTabsForAdmin(currentTab: string): void {
const tabs: Object[] = [ const tabs: any[] = [
{ {
title: this.i18n.t('onglets.workspaces'), title: this.i18n.t('onglets.workspaces'),
link: '/admin/workspace', link: '/admin/workspace',
......
<template></template> <template>
<div></div>
</template>
<script lang="ts" src="./form-list.component.ts" /> <script lang="ts" src="./form-list.component.ts" />
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