Merge branch 'fixes/fix-bijoux-photos' into staging
This commit is contained in:
commit
9b9dcef8ab
File diff suppressed because one or more lines are too long
@ -44,7 +44,7 @@ class Bdd {
|
||||
"fk_client_group_facturation_id","group_facturation_name",
|
||||
"fk_product_type_id",
|
||||
"portal_code","alarm_code","funeral_code",
|
||||
"product_brand");
|
||||
"product_brand","product_reference");
|
||||
$this->whiteTable = array(
|
||||
"client", "lieu", "trajet", "devis", "produit_devis", "facture", "produit", "configuration", "ligne_trajet", "thanato", "article", "defunt", "article_devis", "bibliotheque", "bijou_defunt", "obs_defunt", "hypo_defunt",
|
||||
"client_group_discount","client_group",
|
||||
@ -3195,6 +3195,7 @@ class Bdd {
|
||||
defunt.sexe as defunt_sexe,
|
||||
defunt.ref_pacemaker as defunt_reference_pacemaker,
|
||||
defunt.product_brand as defunt_product_brand,
|
||||
defunt.product_reference as defunt_product_reference,
|
||||
client.nom as client_nom,
|
||||
client.prenom as client_prenom,
|
||||
client.entreprise as client_entreprise,
|
||||
|
||||
@ -98,6 +98,9 @@ class PacemakerCertificatePdfHandler extends FPDF {
|
||||
FileExportHelpers::FormatTextForExport("Numéro de série : ").
|
||||
FileExportHelpers::FormatTextForExport($this->devisOfDefunt['defunt_reference_pacemaker']),0,1);
|
||||
$this->Cell(0,6,
|
||||
FileExportHelpers::FormatTextForExport("Référence du produit : ").
|
||||
FileExportHelpers::FormatTextForExport($this->devisOfDefunt['defunt_product_reference']),0,1);
|
||||
$this->Cell(0,6,
|
||||
FileExportHelpers::FormatTextForExport("Marque du produit : ").
|
||||
FileExportHelpers::FormatTextForExport($this->devisOfDefunt['defunt_product_brand']),0,1);
|
||||
$this->Cell(0,12, FileExportHelpers::FormatTextForExport("La présente attestion est établie pour faire valoir ce que de droit."),0,5);
|
||||
|
||||
@ -1,2 +1,3 @@
|
||||
alter table oc_gestion_defunt add product_brand VARCHAR(255) DEFAULT '';
|
||||
update oc_gestion_defunt SET ref_pacemaker = '' WHERE ref_pacemaker = 'Référence pacemaker';
|
||||
alter table oc_gestion_defunt add product_reference VARCHAR(255) DEFAULT '';
|
||||
@ -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"));
|
||||
|
||||
@ -81,11 +81,18 @@
|
||||
</div>
|
||||
<!-- Référence pacemaker -->
|
||||
<div class="d-flex flex-row align-items-center col-12" style="margin-bottom: 16px">
|
||||
<div class="col-3">Référence du produit</div>
|
||||
<div class="col-3">Référence pacemaker</div>
|
||||
<div class="col-9">
|
||||
<input class="gestion-input w-100" type="text" value="<?php echo ($_['defunt'][0]->ref_pacemaker ?? "") ?>" data-table="defunt" data-column="ref_pacemaker" data-id="<?php echo $_['defunt'][0]->id ?>"/>
|
||||
</div>
|
||||
</div>
|
||||
<!-- Product reference -->
|
||||
<div class="d-flex flex-row align-items-center col-12" style="margin-bottom: 16px">
|
||||
<div class="col-3">Référence du produit</div>
|
||||
<div class="col-9">
|
||||
<input class="gestion-input w-100" type="text" value="<?php echo ($_['defunt'][0]->product_reference ?? "") ?>" data-table="defunt" data-column="product_reference" data-id="<?php echo $_['defunt'][0]->id ?>"/>
|
||||
</div>
|
||||
</div>
|
||||
<!-- Product brand -->
|
||||
<div class="d-flex flex-row align-items-center col-12" style="margin-bottom: 16px">
|
||||
<div class="col-3">Marque du produit</div>
|
||||
@ -303,7 +310,7 @@
|
||||
<ul class="ponction-list"></ul>
|
||||
</div>
|
||||
</div>
|
||||
<!-- Quantité ponction -->
|
||||
<!-- Quantité ponction -->nextcloud.oc_calendar_invitations
|
||||
<div class="d-flex flex-row align-items-center col-12" style="margin-bottom: 16px">
|
||||
<div class="col-3">Quantité(l)</div>
|
||||
<div class="col-9">
|
||||
@ -478,10 +485,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