Compare commits

...

3 Commits

Author SHA1 Message Date
nobohan
9158e33854 #392 php cs-fixer 2025-06-19 21:29:43 +02:00
nobohan
af74f7860b Fixed nullable content for NewsItem in setContent signature #392 2025-06-19 17:53:33 +02:00
bdf1cf71ba Fix argument usage in localizeString method for UserRenderBoxBadge component
Adjusted `localizeString` method to accept a `label` parameter, ensuring proper localization of `user_job.label` and `main_scope.name`. Also made minor syntax adjustments to improve readability.
2025-06-17 10:55:30 +02:00
3 changed files with 13 additions and 6 deletions

View File

@@ -0,0 +1,7 @@
kind: Fixed
body: |
Allow null and cast as string to setContent method for NewsItem
time: 2025-06-19T17:01:42.125730402+02:00
custom:
Issue: "392"
SchemaChange: No schema change

View File

@@ -70,9 +70,9 @@ class NewsItem implements TrackCreationInterface, TrackUpdateInterface
return $this->content;
}
public function setContent(string $content): void
public function setContent(?string $content): void
{
$this->content = $content;
$this->content = (string) $content;
}
public function getStartDate(): ?\DateTimeImmutable

View File

@@ -2,10 +2,10 @@
<span class="chill-entity entity-user">
{{ user.label }}
<span class="user-job" v-if="user.user_job !== null"
>({{ localizeString(user.user_job.label) }})</span
> ({{ localizeString(user.user_job.label) }})</span
>
<span class="main-scope" v-if="user.main_scope !== null"
>({{ localizeString(user.main_scope.name) }})</span
> ({{ localizeString(user.main_scope.name) }})</span
>
<span
v-if="user.isAbsent"
@@ -22,8 +22,8 @@ import { localizeString } from "ChillMainAssets/lib/localizationHelper/localizat
export default {
name: "UserRenderBoxBadge",
methods: {
localizeString() {
return localizeString;
localizeString(label) {
return localizeString(label);
},
},
props: ["user"],