set gestion build

This commit is contained in:
Tiavina 2024-12-27 17:39:50 +03:00
commit 1ed2ded93b
23 changed files with 68 additions and 23 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

View File

@ -1779,7 +1779,7 @@ class Bdd {
private function setDevisIsWeekendOrNotText($devis){
$isWeekend = DateHelpers::isWeekend($devis['date']);
$value = $isWeekend ? "Férié" : "J";
$value = $isWeekend ? "Ferie" : "J";
$devis["dayType"] = $value;
return $devis;
}
@ -1884,6 +1884,40 @@ class Bdd {
return "";
}
public function getCalendarOrganizerNameByCalendarObjectUuid(string $calendarObjectUuid){
$calendarObject = $this->getCalendarObjectByUuid($calendarObjectUuid);
if($calendarObject != null){
$calendar = $this->getCalendarById($calendarObject['calendarid']);
if($calendar != null){
$principalUri = $calendar["principaluri"];
$organizerName = str_replace('principals/users/','',$principalUri);
$organizerName = trim($organizerName);
return $organizerName;
}
}
return null;
}
public function getCalendarObjectByUuid(string $calendarObjectUuid){
$sql = "SELECT * FROM ".self::CALENDAR_TABLE_PREFIX."calendarobjects WHERE uid = ?;";
$calendarObjectList = $this->execSQLNoJsonReturn($sql, [$calendarObjectUuid]);
if(!empty($calendarObjectList)){
$calendarData = $calendarObjectList[0];
return $calendarData;
}
return null;
}
public function getCalendarById(int $calendarId){
$sql = "SELECT * FROM ".self::CALENDAR_TABLE_PREFIX."calendars WHERE id = ?;";
$calendarList = $this->execSQLNoJsonReturn($sql, [$calendarId]);
if(!empty($calendarList)){
$calendarData = $calendarList[0];
return $calendarData;
}
return null;
}
/**
* @param $calendarData
* @return bool|string

View File

@ -49,8 +49,8 @@ class ExportThanatoStatisticService {
'Date'.';'.
'Heure Debut'.';'.
'Heure Fin'.';'.
utf8_decode(html_entity_decode('Jour/Férié')).';'.
'Nom et Prenoms'.';'.
utf8_decode(html_entity_decode('Jour/Ferie')).';'.
utf8_decode(html_entity_decode('Nom et Prénom')).';'.
'Lieu'.';'.
'Pompe funebre'.';'.
'Pompe funebre adresse'.';'.

View File

@ -65,6 +65,17 @@ class GestionService {
$thanatoId = $thanatoIdFromDb;
}
}
else{
//get from calendar object
$calendarUuid = VCalendarHelpers::GetValueFromKeyInVCalendarString("UID", $vCalendarString);
$organizerName = $this->gestionBdd->getCalendarOrganizerNameByCalendarObjectUuid($calendarUuid);
if($organizerName != null){
$thanatoIdFromDb = $this->gestionBdd->getFirstThanatoIdByName($organizerName);
if($thanatoIdFromDb != null){
$thanatoId = $thanatoIdFromDb;
}
}
}
return $thanatoId;
}
private function GetAttendeesNameFromVCalendarString(string $vCalendarString): array

View File

@ -21,7 +21,7 @@ export class Lieu {
*/
getDTRow() {
let myrow = [
'<div>' + this.user_id + '</div>',
'<div>' + this.id + '</div>',
'<div class="editable" data-table="lieu" data-column="nom" data-id="' + this.id + '" style="display:inline">' + this.nom + '</div>',
'<div class="editable" data-table="lieu" data-column="adresse" data-id="' + this.id + '" style="display:inline">' + this.adresse + '</div>',
'<div class="editable" data-table="lieu" data-column="latitude" data-id="' + this.id + '" style="display:inline">' + this.latitude + '</div>',