[#FER-19] Ajouter le healthCheck du pont bascule (!58)
Some checks failed
Auto Tag Develop / tag (push) Has been cancelled
Some checks failed
Auto Tag Develop / tag (push) Has been cancelled
| Numéro du ticket | Titre du ticket | |------------------|-----------------| | | | ## Description de la PR ## Modification du .env ## Check list - [x] Pas de régression - [x] TU/TI/TF rédigée - [x] TU/TI/TF OK - [x] CHANGELOG modifié Reviewed-on: #58 Co-authored-by: tristan <tristan@yuno.malio.fr> Co-committed-by: tristan <tristan@yuno.malio.fr>
This commit was merged in pull request #58.
This commit is contained in:
@@ -2,7 +2,15 @@
|
||||
<div class="flex justify-center">
|
||||
<div class="flex flex-col items-center w-[660px]">
|
||||
<h1 class="font-bold text-5xl uppercase text-primary-500">{{ title }}</h1>
|
||||
<p class="text-primary-500 uppercase text-2xl mt-2">Pont-bascule connecté</p>
|
||||
<p
|
||||
v-if="pontBasculeStatus === 'connected'"
|
||||
class="uppercase text-2xl mt-2 text-green-600">Pont-bascule connecté</p>
|
||||
<p
|
||||
v-else-if="pontBasculeStatus === 'disconnected'"
|
||||
class="uppercase text-2xl mt-2 text-red-600">Pont-bascule non connecté</p>
|
||||
<p
|
||||
v-else
|
||||
class="uppercase text-2xl mt-2 invisible">Pont-bascule connecté</p>
|
||||
<div
|
||||
v-if="!displayWeight"
|
||||
class="w-full flex flex-col items-center justify-center border border-black h-[90px] mt-12 mb-[86px]">
|
||||
@@ -19,6 +27,7 @@
|
||||
<div class="flex justify-center mt-[54px]">
|
||||
<UiButton
|
||||
class="text-xl uppercase bg-primary-500 text-white h-[50px] w-[272px]"
|
||||
:disabled="pontBasculeStatus !== 'connected'"
|
||||
@click="fetchWeight"
|
||||
>{{ displayWeight !== null ? 'refaire une pesée' : 'peser' }}</UiButton>
|
||||
<UiButton
|
||||
@@ -35,7 +44,8 @@
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { toRef } from 'vue'
|
||||
import { onMounted, toRef } from 'vue'
|
||||
import { usePontBascule } from '~/composables/usePontBascule'
|
||||
import { useWeighingStep } from '~/composables/steps/useWeighingStep'
|
||||
import type { WeightData } from '~/services/dto/weight-data'
|
||||
|
||||
@@ -55,6 +65,9 @@ const props = defineProps<{
|
||||
|
||||
const entityRef = toRef(props, 'entity')
|
||||
|
||||
const { status: pontBasculeStatus, checkHealth } = usePontBascule()
|
||||
onMounted(checkHealth)
|
||||
|
||||
const {
|
||||
displayWeight,
|
||||
title,
|
||||
|
||||
Reference in New Issue
Block a user