finish frontend part on attestation de soin
This commit is contained in:
parent
57c79699b8
commit
ab3628603b
File diff suppressed because one or more lines are too long
@ -4,7 +4,7 @@ import "../css/mycss.css";
|
|||||||
|
|
||||||
import { globalConfiguration } from "./modules/mainFunction.mjs";
|
import { globalConfiguration } from "./modules/mainFunction.mjs";
|
||||||
import "./listener/main_listener";
|
import "./listener/main_listener";
|
||||||
import { getBibliotheques, getBijouxById, getHypodermiquesyId, getObservationsById, getproduits, saveAttestationPacemaker, saveRapportBijoux, saveRapportSoin, updateDB } from "./modules/ajaxRequest.mjs";
|
import { getBibliotheques, exportCareCertificate, getBijouxById, getHypodermiquesyId, getObservationsById, getproduits, saveAttestationPacemaker, saveRapportBijoux, saveRapportSoin, updateDB } from "./modules/ajaxRequest.mjs";
|
||||||
|
|
||||||
let bibliotheques = [];
|
let bibliotheques = [];
|
||||||
let sortedBibliotheques = [];
|
let sortedBibliotheques = [];
|
||||||
@ -71,6 +71,11 @@ window.addEventListener("DOMContentLoaded", function () {
|
|||||||
var pacemakerBtn = document.getElementById("pacemakerBtn");
|
var pacemakerBtn = document.getElementById("pacemakerBtn");
|
||||||
var rapportSoinBtn = document.getElementById("rapportSoinBtn");
|
var rapportSoinBtn = document.getElementById("rapportSoinBtn");
|
||||||
var rapportBijouxBtn = document.getElementById("rapportBijouxBtn");
|
var rapportBijouxBtn = document.getElementById("rapportBijouxBtn");
|
||||||
|
var exportCareCertificateButton = document.getElementById("exportCareCertificate");
|
||||||
|
|
||||||
|
exportCareCertificateButton.addEventListener("click",function(){
|
||||||
|
exportCareCertificate({defuntId : defuntid});
|
||||||
|
})
|
||||||
|
|
||||||
pacemakerBtn.addEventListener("click", function(){
|
pacemakerBtn.addEventListener("click", function(){
|
||||||
saveAttestationPacemaker({ numdefunt: defuntid });
|
saveAttestationPacemaker({ numdefunt: defuntid });
|
||||||
|
|||||||
@ -795,3 +795,25 @@ export function exportClientDevisByMonthAndYearToPdf(clientId,year,month) {
|
|||||||
showError(t('gestion', "Erreur dans la génération de devis multiple"));
|
showError(t('gestion', "Erreur dans la génération de devis multiple"));
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Export care certificate
|
||||||
|
* @param {*} defuntIdPayload
|
||||||
|
*/
|
||||||
|
export function exportCareCertificate(defuntIdPayload) {
|
||||||
|
$.ajax({
|
||||||
|
url: baseUrl + '/defunt/exportCareCertificate',
|
||||||
|
type: 'POST',
|
||||||
|
contentType: 'application/json',
|
||||||
|
data: JSON.stringify(defuntIdPayload)
|
||||||
|
}).done(function (response) {
|
||||||
|
if(response == null) {
|
||||||
|
showMessage('Ce defunt n\'appartient à aucun devis.');
|
||||||
|
} else {
|
||||||
|
showSuccess('Sauvegardé dans '+ response );
|
||||||
|
}
|
||||||
|
}).fail(function (response, code) {
|
||||||
|
showMessage(t('gestion', 'There is an error'));
|
||||||
|
error(response);
|
||||||
|
});
|
||||||
|
};
|
||||||
@ -22,8 +22,11 @@
|
|||||||
<div class="container-fluid">
|
<div class="container-fluid">
|
||||||
<div class="d-flex justify-content-between">
|
<div class="d-flex justify-content-between">
|
||||||
<h2>Aperçu du défunt</h2>
|
<h2>Aperçu du défunt</h2>
|
||||||
|
<div>
|
||||||
|
<button id="exportCareCertificate" class="btn btn-secondary" type="button">Générer l'attestation de soins</button>
|
||||||
<button id="pacemakerBtn" class="btn btn-secondary" type="button">Générer l'attestation pacemaker</button>
|
<button id="pacemakerBtn" class="btn btn-secondary" type="button">Générer l'attestation pacemaker</button>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
<hr>
|
<hr>
|
||||||
<div class="col-6" style="margin-bottom: 32px">
|
<div class="col-6" style="margin-bottom: 32px">
|
||||||
<h6>INFORMATIONS GÉNÉRALES</h6>
|
<h6>INFORMATIONS GÉNÉRALES</h6>
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user