Skip to content

Commit

Permalink
Merge branch 'next' into bugfix-zms-3253-3466-3415-1891-validation-op…
Browse files Browse the repository at this point in the history
…ening-hours-of-the-same-appointment-type-must-not-overlap
  • Loading branch information
Thomas Fink authored and Thomas Fink committed Feb 17, 2025
2 parents c4164cb + 972ed05 commit 48e1fba
Show file tree
Hide file tree
Showing 38 changed files with 391 additions and 400 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,7 @@ To run Checks locally in your local docker container:

0. Run all at once:
- `ddev exec "./cli modules loop 'vendor/bin/phpcs --standard=psr12 src/'"`
- `ddev exec "./cli modules loop 'vendor/bin/phpcbf --standard=psr12 src/'"`

1. **Enter the container** (if using DDEV or Docker):
- `ddev ssh`
Expand Down
2 changes: 1 addition & 1 deletion zmsapi/src/Zmsapi/ProcessConfirmationMail.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ class ProcessConfirmationMail extends BaseController
{
/**
* @SuppressWarnings(Param)
* @return String
* @return string
*/
public function readResponse(
\Psr\Http\Message\RequestInterface $request,
Expand Down
2 changes: 1 addition & 1 deletion zmsapi/src/Zmsapi/ProcessDeleteMail.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ class ProcessDeleteMail extends BaseController
{
/**
* @SuppressWarnings(Param)
* @return String
* @return string
*/
public function readResponse(
\Psr\Http\Message\RequestInterface $request,
Expand Down
2 changes: 1 addition & 1 deletion zmsapi/src/Zmsapi/ProcessPreconfirmationMail.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ class ProcessPreconfirmationMail extends BaseController
{
/**
* @SuppressWarnings(Param)
* @return String
* @return string
*/
public function readResponse(
\Psr\Http\Message\RequestInterface $request,
Expand Down
31 changes: 20 additions & 11 deletions zmscitizenapi/src/Zmscitizenapi/Models/ThinnedScope.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,31 +12,34 @@
class ThinnedScope extends Entity implements JsonSerializable
{
public static $schema = 'citizenapi/thinnedScope.json';
/** @var int */
/** @var int */
public int $id;
/** @var ThinnedProvider|null */
/** @var ThinnedProvider|null */
public ?ThinnedProvider $provider;
/** @var string|null */
/** @var string|null */
public ?string $shortName;
/** @var bool|null */
/** @var string|null */
public ?string $emailFrom;
/** @var bool|null */
public ?bool $telephoneActivated;
/** @var bool|null */
/** @var bool|null */
public ?bool $telephoneRequired;
/** @var bool|null */
/** @var bool|null */
public ?bool $customTextfieldActivated;
/** @var bool|null */
/** @var bool|null */
public ?bool $customTextfieldRequired;
/** @var string|null */
/** @var string|null */
public ?string $customTextfieldLabel;
/** @var bool|null */
/** @var bool|null */
public ?bool $captchaActivatedRequired;
/** @var string|null */
/** @var string|null */
public ?string $displayInfo;
public function __construct(int $id = 0, ?ThinnedProvider $provider = null, ?string $shortName = null, ?bool $telephoneActivated = null, ?bool $telephoneRequired = null, ?bool $customTextfieldActivated = null, ?bool $customTextfieldRequired = null, ?string $customTextfieldLabel = null, ?bool $captchaActivatedRequired = null, ?string $displayInfo = null)
public function __construct(int $id = 0, ?ThinnedProvider $provider = null, ?string $shortName = null, ?string $emailFrom = null, ?bool $telephoneActivated = null, ?bool $telephoneRequired = null, ?bool $customTextfieldActivated = null, ?bool $customTextfieldRequired = null, ?string $customTextfieldLabel = null, ?bool $captchaActivatedRequired = null, ?string $displayInfo = null)
{
$this->id = $id;
$this->provider = $provider;
$this->shortName = $shortName;
$this->emailFrom = $emailFrom;
$this->telephoneActivated = $telephoneActivated;
$this->telephoneRequired = $telephoneRequired;
$this->customTextfieldActivated = $customTextfieldActivated;
Expand Down Expand Up @@ -64,6 +67,11 @@ public function getShortName(): ?string
return $this->shortName;
}

public function getEmailFrom(): ?string
{
return $this->emailFrom;
}

public function getTelephoneActivated(): ?bool
{
return $this->telephoneActivated;
Expand Down Expand Up @@ -105,6 +113,7 @@ public function toArray(): array
'id' => $this->id,
'provider' => $this->provider,
'shortName' => $this->shortName,
'emailFrom' => $this->emailFrom,
'telephoneActivated' => $this->telephoneActivated,
'telephoneRequired' => $this->telephoneRequired,
'customTextfieldActivated' => $this->customTextfieldActivated,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ public function processCancel(array $body): ThinnedProcess|array
]];
}

// Send cancellation email before cancelling the appointment
$this->sendCancellationEmail($process);
return $this->cancelProcess($process);
}
Expand Down Expand Up @@ -80,6 +79,6 @@ private function cancelProcess(ThinnedProcess $process): ThinnedProcess|array
private function sendCancellationEmail(ThinnedProcess $process): void
{
$processEntity = MapperService::thinnedProcessToProcess($process);
ZmsApiFacadeService::sendCancelationEmail($processEntity);
ZmsApiFacadeService::sendCancellationEmail($processEntity);
}
}
Loading

0 comments on commit 48e1fba

Please sign in to comment.