first eslint corrections

This commit is contained in:
2024-10-31 17:28:02 +01:00
parent f90f1c7ef8
commit 27ecae4486
109 changed files with 6903 additions and 4637 deletions

View File

@@ -1,39 +1,51 @@
<template>
<h2>{{ $t('pick_social_issue') }}</h2>
<div id="awc_create_form">
<div id="picking" class="">
<p>{{ $t('pick_social_issue_linked_with_action') }}</p>
<div v-for="si in socialIssues" :key="si.id">
<input type="radio" v-bind:value="si.id" name="socialIssue" v-model="socialIssuePicked"><span class="badge bg-chill-l-gray text-dark">{{ si.text }}</span>
</div>
<div
id="picking"
class=""
>
<p>{{ $t('pick_social_issue_linked_with_action') }}</p>
<div
v-for="si in socialIssues"
:key="si.id"
>
<input
type="radio"
:value="si.id"
name="socialIssue"
v-model="socialIssuePicked"
><span class="badge bg-chill-l-gray text-dark">{{ si.text }}</span>
</div>
<div class="my-3">
<div class="col-11">
<vue-multiselect
name="otherIssues"
label="text"
track-by="id"
open-direction="bottom"
:close-on-select="true"
:preserve-search="false"
:reset-after="true"
:hide-selected="true"
:taggable="false"
:multiple="false"
:searchable="true"
:allow-empty="true"
:show-labels="false"
:loading="issueIsLoading"
:placeholder="$t('choose_other_social_issue')"
:options="socialIssuesOther"
@select="addIssueInList">
</vue-multiselect>
name="otherIssues"
label="text"
track-by="id"
open-direction="bottom"
:close-on-select="true"
:preserve-search="false"
:reset-after="true"
:hide-selected="true"
:taggable="false"
:multiple="false"
:searchable="true"
:allow-empty="true"
:show-labels="false"
:loading="issueIsLoading"
:placeholder="$t('choose_other_social_issue')"
:options="socialIssuesOther"
@select="addIssueInList"
/>
</div>
</div>
<div v-if="hasSocialIssuePicked" class="mb-3">
<div
v-if="hasSocialIssuePicked"
class="mb-3"
>
<h2>{{ $t('pick_an_action') }}</h2>
<div class="col-11">
<vue-multiselect
@@ -44,57 +56,91 @@
:close-on-select="true"
:show-labels="true"
track-by="id"
></vue-multiselect>
/>
</div>
</div>
<div v-if="isLoadingSocialActions">
<i class="fa fa-circle-o-notch fa-spin fa-fw"></i>
<i class="fa fa-circle-o-notch fa-spin fa-fw" />
</div>
<div v-if="hasSocialActionPicked" id="persons" class="mb-5">
<div
v-if="hasSocialActionPicked"
id="persons"
class="mb-5"
>
<h2>{{ $t('persons_involved') }}</h2>
<ul>
<li v-for="p in personsReachables" :key="p.id">
<li
v-for="p in personsReachables"
:key="p.id"
>
<div class="form-check">
<input type="checkbox" :value="p.id" v-model="personsPicked" class="form-check-input" :id="'person_check'+p.id">
<label class="form-check-label" :for="'person_check' + p.id">
<person-text :person="p"></person-text>
<input
type="checkbox"
:value="p.id"
v-model="personsPicked"
class="form-check-input"
:id="'person_check'+p.id"
>
<label
class="form-check-label"
:for="'person_check' + p.id"
>
<person-text :person="p" />
</label>
</div>
</li>
</ul>
</div>
</div>
<!-- <div v-if="hasSocialActionPicked" id="start_date">
<p><label>{{ $t('startDate') }}</label> <input type="date" v-model="startDate" /></p>
</div> -->
<div class="row">
<div v-if="hasSocialActionPicked" id="start_date" class="mb-3 row">
<label class="col-form-label col-sm-4">{{ $t('startDate') }}</label>
<div class="col-sm-8">
<input class="form-control" type="date" v-model="startDate"/>
<div
v-if="hasSocialActionPicked"
id="start_date"
class="mb-3 row"
>
<label class="col-form-label col-sm-4">{{ $t('startDate') }}</label>
<div class="col-sm-8">
<input
class="form-control"
type="date"
v-model="startDate"
>
</div>
</div>
</div>
<!-- <div v-if="hasSocialActionPicked" id="end_date">
<!-- <div v-if="hasSocialActionPicked" id="end_date">
<p><label>{{ $t('endDate') }}</label> <input type="date" v-model="endDate" /></p>
</div> -->
<div v-if="hasSocialActionPicked" id="end_date" class="mb-3 row">
<label class="col-form-label col-sm-4">{{ $t('endDate') }}</label>
<div class="col-sm-8">
<input class="form-control" type="date" v-model="endDate"/>
<div
v-if="hasSocialActionPicked"
id="end_date"
class="mb-3 row"
>
<label class="col-form-label col-sm-4">{{ $t('endDate') }}</label>
<div class="col-sm-8">
<input
class="form-control"
type="date"
v-model="endDate"
>
</div>
</div>
</div>
</div>
<div id="confirm">
<div v-if="hasErrors">
<p>{{ $t('form_has_errors') }}</p>
<ul>
<li v-for="e in errors" :key="e.id">
<li
v-for="e in errors"
:key="e.id"
>
{{ e }}
</li>
</ul>
@@ -103,15 +149,26 @@
<div>
<ul class="record_actions">
<li class="cancel">
<button class="btn btn-cancel" @click="goToPrevious">
<button
class="btn btn-cancel"
@click="goToPrevious"
>
{{ $t('action.cancel') }}
</button>
</li>
<li v-if="hasSocialActionPicked">
<button class="btn btn-save" v-show="!isPostingWork" @click="submit">
<button
class="btn btn-save"
v-show="!isPostingWork"
@click="submit"
>
{{ $t('action.save') }}
</button>
<button class="btn btn-save" v-show="isPostingWork" disabled>
<button
class="btn btn-save"
v-show="isPostingWork"
disabled
>
{{ $t('action.save') }}
</button>
</li>
@@ -119,7 +176,6 @@
</div>
</div>
</div>
</template>