Skip to content

Commit

Permalink
Merge pull request #485 from code4romania/303-rows-not-displaying-or-…
Browse files Browse the repository at this point in the history
…updating-in-step-3-of-inregistreaza-caz-nou-2

Display min 1 item in children table
  • Loading branch information
gheorghelupu17 authored Jan 13, 2025
2 parents 8a65040 + 745178c commit 0fed219
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -352,6 +352,10 @@ protected function getSteps(): array
->schema(EditChildrenIdentity::getChildrenIdentityFormSchema())
->afterStateHydrated(
function (Set $set) {
if (! $this->parentBeneficiary?->children->count()) {
return;
}

$children = $this->parentBeneficiary?->children->toArray() ?? [];
foreach ($children as &$child) {
$child['birthdate'] = $child['birthdate'] ? Carbon::parse($child['birthdate'])->format('d.m.Y') : null;
Expand Down

0 comments on commit 0fed219

Please sign in to comment.