mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-21 07:03:49 +00:00
first eslint corrections
This commit is contained in:
@@ -1,14 +1,14 @@
|
||||
<template>
|
||||
<on-the-fly
|
||||
:type="context.type"
|
||||
:id="context.id"
|
||||
:action="context.action"
|
||||
:buttonText="options.buttonText"
|
||||
:displayBadge="options.displayBadge === 'true'"
|
||||
:isDead="options.isDead"
|
||||
:parent="options.parent"
|
||||
@saveFormOnTheFly="saveFormOnTheFly">
|
||||
</on-the-fly>
|
||||
<on-the-fly
|
||||
:type="context.type"
|
||||
:id="context.id"
|
||||
:action="context.action"
|
||||
:button-text="options.buttonText"
|
||||
:display-badge="options.displayBadge === 'true'"
|
||||
:is-dead="options.isDead"
|
||||
:parent="options.parent"
|
||||
@save-form-on-the-fly="saveFormOnTheFly"
|
||||
/>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
@@ -1,40 +1,62 @@
|
||||
<template>
|
||||
<ul class="nav nav-tabs">
|
||||
<li v-if="allowedTypes.includes('person')" class="nav-item">
|
||||
<a class="nav-link" :class="{ active: isActive('person') }">
|
||||
<label for="person">
|
||||
<input type="radio" name="person" id="person" v-model="radioType" value="person">
|
||||
{{ $t('onthefly.create.person') }}
|
||||
</label>
|
||||
</a>
|
||||
</li>
|
||||
<li v-if="allowedTypes.includes('thirdparty')" class="nav-item">
|
||||
<a class="nav-link" :class="{ active: isActive('thirdparty') }">
|
||||
<label for="thirdparty">
|
||||
<input type="radio" name="thirdparty" id="thirdparty" v-model="radioType" value="thirdparty">
|
||||
{{ $t('onthefly.create.thirdparty') }}
|
||||
</label>
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<div class="my-4">
|
||||
<on-the-fly-person
|
||||
v-if="type === 'person'"
|
||||
:action="action"
|
||||
:query="query"
|
||||
ref="castPerson"
|
||||
<ul class="nav nav-tabs">
|
||||
<li
|
||||
v-if="allowedTypes.includes('person')"
|
||||
class="nav-item"
|
||||
>
|
||||
<a
|
||||
class="nav-link"
|
||||
:class="{ active: isActive('person') }"
|
||||
>
|
||||
</on-the-fly-person>
|
||||
|
||||
<on-the-fly-thirdparty
|
||||
v-if="type === 'thirdparty'"
|
||||
:action="action"
|
||||
:query="query"
|
||||
ref="castThirdparty"
|
||||
<label for="person">
|
||||
<input
|
||||
type="radio"
|
||||
name="person"
|
||||
id="person"
|
||||
v-model="radioType"
|
||||
value="person"
|
||||
>
|
||||
{{ $t('onthefly.create.person') }}
|
||||
</label>
|
||||
</a>
|
||||
</li>
|
||||
<li
|
||||
v-if="allowedTypes.includes('thirdparty')"
|
||||
class="nav-item"
|
||||
>
|
||||
<a
|
||||
class="nav-link"
|
||||
:class="{ active: isActive('thirdparty') }"
|
||||
>
|
||||
</on-the-fly-thirdparty>
|
||||
</div>
|
||||
<label for="thirdparty">
|
||||
<input
|
||||
type="radio"
|
||||
name="thirdparty"
|
||||
id="thirdparty"
|
||||
v-model="radioType"
|
||||
value="thirdparty"
|
||||
>
|
||||
{{ $t('onthefly.create.thirdparty') }}
|
||||
</label>
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<div class="my-4">
|
||||
<on-the-fly-person
|
||||
v-if="type === 'person'"
|
||||
:action="action"
|
||||
:query="query"
|
||||
ref="castPerson"
|
||||
/>
|
||||
|
||||
<on-the-fly-thirdparty
|
||||
v-if="type === 'thirdparty'"
|
||||
:action="action"
|
||||
:query="query"
|
||||
ref="castThirdparty"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
@@ -1,91 +1,125 @@
|
||||
<template>
|
||||
|
||||
<a v-if="isDisplayBadge" @click="openModal">
|
||||
<span class="chill-entity" :class="badgeType">
|
||||
{{ buttonText }}<span v-if="isDead"> (‡)</span>
|
||||
</span>
|
||||
</a>
|
||||
<a v-else class="btn btn-sm" target="_blank"
|
||||
:class="classAction"
|
||||
:title="$t(titleAction)"
|
||||
@click="openModal">
|
||||
<a
|
||||
v-if="isDisplayBadge"
|
||||
@click="openModal"
|
||||
>
|
||||
<span
|
||||
class="chill-entity"
|
||||
:class="badgeType"
|
||||
>
|
||||
{{ buttonText }}<span v-if="isDead"> (‡)</span>
|
||||
</a>
|
||||
</span>
|
||||
</a>
|
||||
<a
|
||||
v-else
|
||||
class="btn btn-sm"
|
||||
target="_blank"
|
||||
:class="classAction"
|
||||
:title="$t(titleAction)"
|
||||
@click="openModal"
|
||||
>
|
||||
{{ buttonText }}<span v-if="isDead"> (‡)</span>
|
||||
</a>
|
||||
|
||||
<teleport to="body">
|
||||
<modal v-if="modal.showModal"
|
||||
:modalDialogClass="modal.modalDialogClass"
|
||||
@close="modal.showModal = false">
|
||||
<teleport to="body">
|
||||
<modal
|
||||
v-if="modal.showModal"
|
||||
:modal-dialog-class="modal.modalDialogClass"
|
||||
@close="modal.showModal = false"
|
||||
>
|
||||
<template #header>
|
||||
<h3
|
||||
v-if="parent"
|
||||
class="modal-title"
|
||||
>
|
||||
{{ $t(titleModal, {q: parent.text}) }}
|
||||
</h3>
|
||||
<h3
|
||||
v-else
|
||||
class="modal-title"
|
||||
>
|
||||
{{ $t(titleModal) }}
|
||||
</h3>
|
||||
</template>
|
||||
|
||||
<template v-slot:header>
|
||||
<h3 v-if="parent" class="modal-title">{{ $t(titleModal, {q: parent.text}) }}</h3>
|
||||
<h3 v-else class="modal-title">{{ $t(titleModal) }}</h3>
|
||||
</template>
|
||||
<template
|
||||
#body
|
||||
v-if="type === 'person'"
|
||||
>
|
||||
<on-the-fly-person
|
||||
:id="id"
|
||||
:type="type"
|
||||
:action="action"
|
||||
ref="castPerson"
|
||||
/>
|
||||
<div v-if="hasResourceComment">
|
||||
<h3>{{ $t('onthefly.resource_comment_title') }}</h3>
|
||||
<blockquote class="chill-user-quote">
|
||||
{{ parent.comment }}
|
||||
</blockquote>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<template v-slot:body v-if="type === 'person'">
|
||||
<on-the-fly-person
|
||||
:id="id"
|
||||
:type="type"
|
||||
:action="action"
|
||||
ref="castPerson">
|
||||
</on-the-fly-person>
|
||||
<div v-if="hasResourceComment">
|
||||
<h3>{{ $t('onthefly.resource_comment_title') }}</h3>
|
||||
<blockquote class="chill-user-quote">
|
||||
{{ parent.comment }}
|
||||
</blockquote>
|
||||
</div>
|
||||
</template>
|
||||
<template
|
||||
#body
|
||||
v-else-if="type === 'thirdparty'"
|
||||
>
|
||||
<on-the-fly-thirdparty
|
||||
:id="id"
|
||||
:type="type"
|
||||
:action="action"
|
||||
ref="castThirdparty"
|
||||
/>
|
||||
<div v-if="hasResourceComment">
|
||||
<h3>{{ $t('onthefly.resource_comment_title') }}</h3>
|
||||
<blockquote class="chill-user-quote">
|
||||
{{ parent.comment }}
|
||||
</blockquote>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<template v-slot:body v-else-if="type === 'thirdparty'">
|
||||
<on-the-fly-thirdparty
|
||||
:id="id"
|
||||
:type="type"
|
||||
:action="action"
|
||||
ref="castThirdparty">
|
||||
</on-the-fly-thirdparty>
|
||||
<div v-if="hasResourceComment">
|
||||
<h3>{{ $t('onthefly.resource_comment_title') }}</h3>
|
||||
<blockquote class="chill-user-quote">
|
||||
{{ parent.comment }}
|
||||
</blockquote>
|
||||
</div>
|
||||
</template>
|
||||
<template
|
||||
#body
|
||||
v-else-if="parent"
|
||||
>
|
||||
<on-the-fly-thirdparty
|
||||
:parent="parent"
|
||||
:action="action"
|
||||
type="thirdparty"
|
||||
ref="castThirdparty"
|
||||
/>
|
||||
</template>
|
||||
|
||||
<template v-slot:body v-else-if="parent">
|
||||
<on-the-fly-thirdparty
|
||||
:parent="parent"
|
||||
:action="action"
|
||||
type="thirdparty"
|
||||
ref="castThirdparty">
|
||||
</on-the-fly-thirdparty>
|
||||
</template>
|
||||
|
||||
<template v-slot:body v-else>
|
||||
<on-the-fly-create
|
||||
:action="action"
|
||||
:allowedTypes="allowedTypes"
|
||||
:query="query"
|
||||
ref="castNew">
|
||||
</on-the-fly-create>
|
||||
</template>
|
||||
|
||||
<template v-slot:footer>
|
||||
<a v-if="action === 'show'"
|
||||
:href="buildLocation(id, type)"
|
||||
:title="$t(titleMessage)"
|
||||
class="btn btn-show">{{ $t(buttonMessage) }}
|
||||
</a>
|
||||
<a v-else
|
||||
class="btn btn-save"
|
||||
@click="saveAction">
|
||||
{{ $t('action.save')}}
|
||||
</a>
|
||||
</template>
|
||||
|
||||
</modal>
|
||||
</teleport>
|
||||
<template
|
||||
#body
|
||||
v-else
|
||||
>
|
||||
<on-the-fly-create
|
||||
:action="action"
|
||||
:allowed-types="allowedTypes"
|
||||
:query="query"
|
||||
ref="castNew"
|
||||
/>
|
||||
</template>
|
||||
|
||||
<template #footer>
|
||||
<a
|
||||
v-if="action === 'show'"
|
||||
:href="buildLocation(id, type)"
|
||||
:title="$t(titleMessage)"
|
||||
class="btn btn-show"
|
||||
>{{ $t(buttonMessage) }}
|
||||
</a>
|
||||
<a
|
||||
v-else
|
||||
class="btn btn-save"
|
||||
@click="saveAction"
|
||||
>
|
||||
{{ $t('action.save') }}
|
||||
</a>
|
||||
</template>
|
||||
</modal>
|
||||
</teleport>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
Reference in New Issue
Block a user