when is leave , don't create a devis

This commit is contained in:
Tiavina 2025-01-24 14:49:46 +03:00
parent 42b29b3b6d
commit 651aaad405

View File

@ -49,6 +49,15 @@ class GestionService {
$this->talkService = $talkService;
}
private function GetIsLeaveFromVCalendarString(string $vCalendarString): bool{
$isLeave = false;
$isLeaveValue = VCalendarHelpers::GetValueFromKeyInVCalendarString("ISLEAVE", $vCalendarString);
if($isLeaveValue == "1"){
$isLeave = true;
}
return $isLeave;
}
private function GetCalendarSummaryFromVCalendarString(string $vCalendarString): string
{
$summaryValue = "Nom du défunt";
@ -197,6 +206,10 @@ class GestionService {
}
public function HandleCreatedCalendarObject(string $vCalendarString){
$isCalendarForLeave = $this->GetIsLeaveFromVCalendarString($vCalendarString);
if($isCalendarForLeave){
return;
}
$calendarSummary = $this->GetCalendarSummaryFromVCalendarString($vCalendarString);
$clientId = $this->GetClientIdFromVCalendarString($vCalendarString);
$locationId = $this->GetLocationIdFromVCalendarString($vCalendarString);