fix bijoux photo , wip numero de serie
This commit is contained in:
parent
1ec5af483c
commit
7dc7b556af
File diff suppressed because one or more lines are too long
@ -73,7 +73,6 @@ window.addEventListener("DOMContentLoaded", function () {
|
||||
var rapportSoinBtn = document.getElementById("rapportSoinBtn");
|
||||
var exportCareCertificateButton = document.getElementById("exportCareCertificate");
|
||||
var setDefuntCoverButton = this.document.getElementById("coverProductsRadioButton");
|
||||
var exportBijouxRapport = this.document.getElementById("exportBijouxRapport");
|
||||
|
||||
var showRapportBijouxExportModalButton = this.document.getElementById("showRapportBijouxExportModal");
|
||||
var closeRapportBijouxModalButton = this.document.getElementById("closeRapportBijouxModal");
|
||||
@ -85,8 +84,8 @@ window.addEventListener("DOMContentLoaded", function () {
|
||||
$('#saveRapportBijouxModal').show();
|
||||
})
|
||||
|
||||
exportBijouxRapport.addEventListener("click",function(){
|
||||
const rapportWithPhotosRadio = document.getElementsByName('withProducts');
|
||||
$(document).on("click", "#exportBijouxRapport", function () {
|
||||
const rapportWithPhotosRadio = document.getElementsByName('withPhotos');
|
||||
let selectedValue = "0";
|
||||
for (const radio of rapportWithPhotosRadio) {
|
||||
if (radio.checked) {
|
||||
@ -99,7 +98,6 @@ window.addEventListener("DOMContentLoaded", function () {
|
||||
withPhotos: selectedValue
|
||||
});
|
||||
$('#saveRapportBijouxModal').hide();
|
||||
|
||||
});
|
||||
|
||||
setDefuntCoverButton.addEventListener("click",function(){
|
||||
@ -128,13 +126,12 @@ window.addEventListener("DOMContentLoaded", function () {
|
||||
saveRapportSoin({ numdefunt: defuntid });
|
||||
});
|
||||
|
||||
$(".photoBijouUpload").on("change", function () {
|
||||
$(document).on("change", ".photoBijouUpload", function () {
|
||||
let fileInput = this;
|
||||
let file = fileInput.files[0];
|
||||
let bijouxId = $(this).data("id");
|
||||
setBijouxPhoto(bijouxId,file);
|
||||
getBijouxById();
|
||||
})
|
||||
});
|
||||
});
|
||||
|
||||
function loadBibliotheques(response) {
|
||||
|
||||
@ -859,6 +859,7 @@ export function setBijouxPhoto(bijouxId,file) {
|
||||
}).done(function (response) {
|
||||
if(response != null) {
|
||||
showSuccess('Sauvegardé dans' + response);
|
||||
getBijouxById();
|
||||
return;
|
||||
}
|
||||
showError(t('gestion', "Erreur dans l'assignation de photo sur ce bijou"));
|
||||
|
||||
@ -478,10 +478,10 @@
|
||||
<div class="modal-body">
|
||||
<div class="radio-group">
|
||||
<label>
|
||||
<input type="radio" name="withProducts" value="1"> Avec photos
|
||||
<input type="radio" name="withPhotos" value="1"> Avec photos
|
||||
</label>
|
||||
<label>
|
||||
<input type="radio" name="withProducts" value="0"> Sans photos
|
||||
<input type="radio" name="withPhotos" value="0"> Sans photos
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user