apply prettier to appointement
This commit is contained in:
parent
3de1ec71ff
commit
549028b1d0
@ -5,14 +5,14 @@
|
|||||||
<form @submit.prevent="submitReport">
|
<form @submit.prevent="submitReport">
|
||||||
<div>
|
<div>
|
||||||
<label for="appointmentId">ID du rendez-vous :</label>
|
<label for="appointmentId">ID du rendez-vous :</label>
|
||||||
<div style="display: flex; align-items: center; gap: 0.5rem;">
|
<div style="display: flex; align-items: center; gap: 0.5rem">
|
||||||
<button type="button" @click="decrementId">-</button>
|
<button type="button" @click="decrementId">-</button>
|
||||||
<input
|
<input
|
||||||
id="appointmentId"
|
id="appointmentId"
|
||||||
v-model.number="appointmentId"
|
v-model.number="appointmentId"
|
||||||
type="number"
|
type="number"
|
||||||
min="1"
|
min="1"
|
||||||
style="width: 60px; text-align: center;"
|
style="width: 60px; text-align: center"
|
||||||
/>
|
/>
|
||||||
<button type="button" @click="incrementId">+</button>
|
<button type="button" @click="incrementId">+</button>
|
||||||
</div>
|
</div>
|
||||||
@ -27,7 +27,9 @@
|
|||||||
></textarea>
|
></textarea>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<button type="submit">{{ isUpdate ? "Mettre à jour" : "Créer" }} le rapport</button>
|
<button type="submit">
|
||||||
|
{{ isUpdate ? "Mettre à jour" : "Créer" }} le rapport
|
||||||
|
</button>
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
<p v-if="responseMessage">{{ responseMessage }}</p>
|
<p v-if="responseMessage">{{ responseMessage }}</p>
|
||||||
@ -77,15 +79,21 @@ export default {
|
|||||||
});
|
});
|
||||||
|
|
||||||
if (response.status === 201 || response.status === 200) {
|
if (response.status === 201 || response.status === 200) {
|
||||||
this.responseMessage = "Rapport " + (this.isUpdate ? "mis à jour" : "créé") + " avec succès.";
|
this.responseMessage =
|
||||||
|
"Rapport " +
|
||||||
|
(this.isUpdate ? "mis à jour" : "créé") +
|
||||||
|
" avec succès.";
|
||||||
}
|
}
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
if (error.response && error.response.status === 400) {
|
if (error.response && error.response.status === 400) {
|
||||||
this.responseMessage = "Requête invalide. Vérifiez les informations.";
|
this.responseMessage =
|
||||||
|
"Requête invalide. Vérifiez les informations.";
|
||||||
} else if (error.response && error.response.status === 401) {
|
} else if (error.response && error.response.status === 401) {
|
||||||
this.responseMessage = "Vous n'êtes pas autorisé à effectuer cette action.";
|
this.responseMessage =
|
||||||
|
"Vous n'êtes pas autorisé à effectuer cette action.";
|
||||||
} else {
|
} else {
|
||||||
this.responseMessage = "Une erreur est survenue. Veuillez réessayer.";
|
this.responseMessage =
|
||||||
|
"Une erreur est survenue. Veuillez réessayer.";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
Loading…
x
Reference in New Issue
Block a user