Skip to content

Commit

Permalink
Merge pull request #34 from EscolaLMS/feature/STAR-40
Browse files Browse the repository at this point in the history
Repair bug after change value in consultations
  • Loading branch information
HerbertIV authored Mar 24, 2022
2 parents e53009a + 7d14d39 commit 622dcac
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/Consultations/ApprovedTermVariables.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ public static function defaultSectionsContent(): array
'user_name' => self::VAR_USER_NAME,
'consultation' => self::VAR_CONSULTATION_TITLE,
'proposed_term' => self::VAR_CONSULTATION_PROPOSED_TERM
]),),
])),
];
}
}
4 changes: 1 addition & 3 deletions src/Consultations/CommonConsultationVariables.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,13 @@ abstract class CommonConsultationVariables extends EmailVariables
const VAR_CONSULTATION_TITLE = '@VarConsultationTitle';
const VAR_CONSULTATION_PROPOSED_TERM = '@VarConsultationProposedTerm';



public static function mockedVariables(?User $user = null): array
{
$faker = \Faker\Factory::create();
return array_merge(parent::mockedVariables(), [
self::VAR_USER_NAME => $faker->name(),
self::VAR_CONSULTATION_TITLE => $faker->word(),

self::VAR_CONSULTATION_PROPOSED_TERM => $faker->dateTime(),
]);
}

Expand Down
2 changes: 1 addition & 1 deletion src/Consultations/ReportTermVariables.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ public static function requiredVariablesInSection(string $sectionKey): array
public static function variablesFromEvent(EventWrapper $event): array
{
return array_merge(parent::variablesFromEvent($event), [
self::VAR_CONSULTATION_BUYER_NAME => $event->getConsultationTerm()->orderItem->order->user->name,
self::VAR_CONSULTATION_BUYER_NAME => $event->getConsultationTerm()->user->name,
]);
}

Expand Down

0 comments on commit 622dcac

Please sign in to comment.