mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-07 18:44:08 +00:00
add popover html content
This commit is contained in:
parent
0add020e57
commit
de45555c5a
@ -44,11 +44,12 @@
|
|||||||
<!--
|
<!--
|
||||||
Etape actuelle: {{ w.currentStep.currentStep.text }}
|
Etape actuelle: {{ w.currentStep.currentStep.text }}
|
||||||
<ul>
|
<ul>
|
||||||
<li v-for="w in w.steps">
|
<li v-for="step in w.steps">
|
||||||
Etape: {{ w.currentStep.text }},
|
Etape: {{ step.currentStep.text }},
|
||||||
<span v-if="w.transitionPrevious != null">
|
<span v-if="step.transitionPrevious != null">
|
||||||
transition pour arriver à cette étape : {{ w.transitionPrevious.text }},
|
transition pour arriver à cette étape : {{ step.transitionPrevious.text }},
|
||||||
par: {{ w.transitionPreviousBy.text }}, le {{ w.transitionPreviousAt.datetime }}
|
par: {{ step.transitionPreviousBy.text }},
|
||||||
|
le {{ step.transitionPreviousAt.datetime }}
|
||||||
</span>
|
</span>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
@ -81,8 +82,20 @@
|
|||||||
<script>
|
<script>
|
||||||
import Popover from 'bootstrap/js/src/popover';
|
import Popover from 'bootstrap/js/src/popover';
|
||||||
|
|
||||||
|
const i18n = {
|
||||||
|
messages: {
|
||||||
|
fr: {
|
||||||
|
you_subscribed_to_all_steps: "Vous recevrez une notification à chaque étape",
|
||||||
|
you_subscribed_to_final_step: "Vous recevrez une notification à l'étape finale",
|
||||||
|
by: "Par",
|
||||||
|
at: "Le"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "ListWorkflow",
|
name: "ListWorkflow",
|
||||||
|
i18n: i18n,
|
||||||
props: {
|
props: {
|
||||||
workflows: {
|
workflows: {
|
||||||
type: Array,
|
type: Array,
|
||||||
@ -93,13 +106,20 @@ export default {
|
|||||||
goToUrl(w) {
|
goToUrl(w) {
|
||||||
return `/fr/main/workflow/${w.id}/show`;
|
return `/fr/main/workflow/${w.id}/show`;
|
||||||
},
|
},
|
||||||
getPopTitle(w) {
|
getPopTitle(step) {
|
||||||
// todo
|
if (step.transitionPrevious != null) {
|
||||||
return 'title'
|
let freezed = step.isFreezed ? `<i class="fa fa-snowflake-o fa-sm me-1"></i>` : ``;
|
||||||
|
return `${freezed}${step.currentStep.text}`; // or step.transitionPrevious.text ??
|
||||||
|
}
|
||||||
},
|
},
|
||||||
getPopContent(w) {
|
getPopContent(step) {
|
||||||
// todo
|
if (step.transitionPrevious != null) {
|
||||||
return 'content'
|
return `<ul class="small_in_title">
|
||||||
|
<li><span class="item-key">${i18n.messages.fr.by} : </span><b>${step.transitionPreviousBy.text}</b></li>
|
||||||
|
<li><span class="item-key">${i18n.messages.fr.at} : </span><b>${step.transitionPreviousAt.datetime}</b></li>
|
||||||
|
</ul>`
|
||||||
|
;
|
||||||
|
}
|
||||||
},
|
},
|
||||||
isUserSubscribedToStep(w) {
|
isUserSubscribedToStep(w) {
|
||||||
// todo
|
// todo
|
||||||
@ -118,14 +138,6 @@ export default {
|
|||||||
html: true,
|
html: true,
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
},
|
|
||||||
i18n: {
|
|
||||||
messages: {
|
|
||||||
fr: {
|
|
||||||
you_subscribed_to_all_steps: "Vous recevrez une notification à chaque étape",
|
|
||||||
you_subscribed_to_final_step: "Vous recevrez une notification à l'étape finale",
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user