finish generate care certificate on frontend , wip pdf policy
This commit is contained in:
parent
5fb39fc9a0
commit
3db4200e48
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 "./listener/main_listener";
|
||||
import { getBibliotheques, getBijouxById, getHypodermiquesyId, getObservationsById, getproduits, saveAttestationPacemaker, saveRapportBijoux, saveRapportSoin, updateDB } from "./modules/ajaxRequest.mjs";
|
||||
import { getBibliotheques, getBijouxById, getHypodermiquesyId, getObservationsById, getproduits, saveAttestationPacemaker,exportCareCertificate, saveRapportBijoux, saveRapportSoin, updateDB } from "./modules/ajaxRequest.mjs";
|
||||
|
||||
let bibliotheques = [];
|
||||
let sortedBibliotheques = [];
|
||||
@ -71,7 +71,12 @@ window.addEventListener("DOMContentLoaded", function () {
|
||||
var pacemakerBtn = document.getElementById("pacemakerBtn");
|
||||
var rapportSoinBtn = document.getElementById("rapportSoinBtn");
|
||||
var rapportBijouxBtn = document.getElementById("rapportBijouxBtn");
|
||||
var exportCareCertificateButton = document.getElementById("exportCareCertificate");
|
||||
|
||||
|
||||
exportCareCertificateButton.addEventListener("click",function(){
|
||||
exportCareCertificate({defuntId : defuntid});
|
||||
})
|
||||
pacemakerBtn.addEventListener("click", function(){
|
||||
saveAttestationPacemaker({ numdefunt: defuntid });
|
||||
});
|
||||
|
||||
@ -723,3 +723,25 @@ export function getproduits(callback) {
|
||||
showError(response);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 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,7 +22,10 @@
|
||||
<div class="container-fluid">
|
||||
<div class="d-flex justify-content-between">
|
||||
<h2>Aperçu du défunt</h2>
|
||||
<button id="pacemakerBtn" class="btn btn-secondary" type="button">Générer l'attestation pacemaker</button>
|
||||
<div class="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>
|
||||
</div>
|
||||
</div>
|
||||
<hr>
|
||||
<div class="col-6" style="margin-bottom: 32px">
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user