Merge branch 'hytha/features/add-talk-minutes' into staging

This commit is contained in:
Tiavina 2025-04-02 12:20:00 +03:00
commit d6b7c9388b
2 changed files with 15 additions and 3 deletions

View File

@ -3840,8 +3840,16 @@ class Bdd {
}
$calendarData = $this->getCalendarDataByCalendarObjectUuid($devis->num);
$devisTimeValue = VCalendarHelpers::GetStartAndEndTimeFromVCalendarString($calendarData);
$devis->startTime = $devisTimeValue["startTime"];
$devis->endTime = $devisTimeValue["endTime"];
$startTimeValueWithMinutes = "";
$endTimeValueWithMinutes = "";
if($devisTimeValue["datetimeStart"]){
$startTimeValueWithMinutes = $devisTimeValue["datetimeStart"]->format('H\hi');
}
if($devisTimeValue["datetimeEnd"]){
$endTimeValueWithMinutes = $devisTimeValue["datetimeEnd"]->format('H\hi');
}
$devis->startTime = $startTimeValueWithMinutes;
$devis->endTime = $endTimeValueWithMinutes;
$devisProducts = $this->getDevisProduits($devisId);
$devisProducts = json_encode($devisProducts);
$devisProducts = json_decode($devisProducts);
@ -3885,7 +3893,7 @@ class Bdd {
$message .= html_entity_decode($devis->nom_defunt);
$message .= '
le '.$devisDate;
$message .= 'à '.$devis->startTime. ' ';
$message .= ' à '.$devis->startTime. ' ';
$message .= '
à '.html_entity_decode($devis->lieu). ' '. html_entity_decode($devis->adresse_soin);

View File

@ -41,6 +41,8 @@ class VCalendarHelpers
$endTimeValue = "";
$totalHours = 0;
$totalWorkedHours = 0;
$dateStart = null;
$dateEnd = null;
if($vCalendarString != ""){
$dateStart = self::GetDateStartOrDateEndFromVCalendarString("DTSTART", $vCalendarString);
if($dateStart != null){
@ -54,6 +56,8 @@ class VCalendarHelpers
$totalWorkedHours = DateHelpers::GetWorkingHoursBetweenDatetimeEndAndDatetimeStart($dateEnd,$dateStart);
}
return [
"datetimeStart" => $dateStart,
"datetimeEnd" => $dateEnd,
"startTime" => $startTimeValue,
"endTime" => $endTimeValue,
"totalHours" => $totalHours,