finish remove age sexe from defunt list and add date de soin

This commit is contained in:
Tiavina 2025-02-14 11:29:20 +03:00
parent a00dd3add6
commit a0c2d84097
25 changed files with 31 additions and 36 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -613,6 +613,7 @@ class Bdd {
$sql = "SELECT ".$this->tableprefix."defunt.id, ".$this->tableprefix."defunt.nom, ".$this->tableprefix."defunt.date_naissance, ".$this->tableprefix."defunt.ref_pacemaker, ".$this->tableprefix."defunt.sexe, "
.$this->tableprefix."client.nom as nom_client, ".$this->tableprefix."client.id as id_client, "
.$this->tableprefix."devis.num as numero_devis, ".$this->tableprefix."devis.id as id_devis, ".$this->tableprefix."devis.user_id as user_id, "
.$this->tableprefix."devis.date as devis_date, "
.$this->tableprefix."lieu.id as lid, ".$this->tableprefix."lieu.nom as lieu
FROM ".$this->tableprefix."defunt
LEFT JOIN ".$this->tableprefix."devis ON ".$this->tableprefix."devis.id_defunt = ".$this->tableprefix."defunt.id

View File

@ -12,15 +12,16 @@ export class Defunt {
constructor(myresp) {
this.id = myresp.id;
this.nom = ((myresp.nom.length === 0) ? '-' : myresp.nom);
this.date_naissance = myresp.date_naissance;
this.age = 0;
this.sexe = ((myresp.sexe.length === 0) ? null : myresp.sexe);
this.ref_pacemaker = ((myresp.ref_pacemaker.lenth == 0) ? '-' : myresp.ref_pacemaker);
this.ref_pacemaker = ((myresp.ref_pacemaker.length == 0) ? '-' : myresp.ref_pacemaker);
this.devisDate = "-";
if(myresp.id_devis != null && myresp.devis_date != null){
const date = new Date(myresp.devis_date);
this.devisDate = date.toLocaleDateString('fr-FR');
}
this.pompe = ((myresp.nom_client == null) ? '-' : myresp.nom_client);
this.lieu = ((myresp.lieu == null) ? '-' : myresp.lieu);
this.numero_devis = ((myresp.user_id == null) ? '-' : myresp.user_id);
this.baseUrl = generateUrl(`/apps/gestion/defunt/${this.id}/show`);
this.age = Defunt.caclulateAge(myresp.date_naissance);
this.productCoverDescription = Defunt.getDefuntProductCoverDescriptionFromApiResponse(myresp);
}
@ -39,17 +40,11 @@ export class Defunt {
let myrow = [
'<div>' + this.id + '</div>', // identifiant
'<div class="editable" data-table="defunt" data-column="nom" data-id="' + this.id + '">' + this.nom + '</div>', // nom
'<div id="ageDefunt-'+this.id+'">'+this.age+'</div>', // age
'<div>'+
'<select class="gestion-select" data-table="defunt" data-column="sexe" data-id="' + this.id + '">'+
'<option value="m" '+((this.sexe=='m')?'selected':'')+'>Masculin</option>'+
'<option value="f" '+((this.sexe=='f')?'selected':'')+'>Féminin</option>'+
'</select>'+
'</div>', // sexe
'<div class="editable" data-table="defunt" data-column="ref_pacemaker" data-id="' + this.id + '">' + this.ref_pacemaker + '</div>', // reference pacemaker
'<div>'+this.numero_devis+'</div>', // numeroDevis
'<div>'+this.pompe+'</div>', // pompe
'<div>'+this.lieu+'</div>', // lieu
'<div>'+this.devisDate+'</div>',
'<div class="selectCoverProductsList" data-id="' + this.id + '" data-current="' + this.productId + '">' +this.productCoverDescription+'</div>', // lieu
'<div style="display:inline-block;margin-right:0px;width:80%;"><a href="' + this.baseUrl + '"><button>' + t('gestion', 'Open') + '</button></a></div><div data-modifier="defunt" data-id=' + this.id + ' data-table="defunt" style="display:inline-block;margin-right:0px;" class="deleteItem icon-delete"></div>'
];

View File

@ -16,12 +16,11 @@
<tr>
<th><?php p($l->t('ID'));?></th>
<th>Nom</th>
<th>Âge</th>
<th>Sexe</th>
<th>Référence pacemaker</th>
<th>Numéro de devis</th>
<th>Pompe funèbre</th>
<th>Lieu de soin</th>
<th>Date de soin</th>
<th>Housse</th>
<th><?php p($l->t('Actions'));?></th>
</tr>