Skip to content

Commit

Permalink
Merge pull request #3245 from michael-genson/fix/missing-name-in-time…
Browse files Browse the repository at this point in the history
…line-event

fix: Missing Name in Timeline Event
  • Loading branch information
boc-the-git authored Mar 5, 2024
2 parents 170b4d3 + 6b52b61 commit 2e7078e
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions frontend/components/Domain/Recipe/RecipeLastMade.vue
Original file line number Diff line number Diff line change
Expand Up @@ -132,8 +132,7 @@ export default defineComponent({
const { $auth, i18n } = useContext();
const domMadeThisForm = ref<VForm>();
const newTimelineEvent = ref<RecipeTimelineEventIn>({
// @ts-expect-error - TS doesn't like the $auth global user attribute
subject: i18n.tc("recipe.user-made-this", { user: $auth.user.fullName }),
subject: "",
eventType: "comment",
eventMessage: "",
timestamp: undefined,
Expand Down Expand Up @@ -178,6 +177,8 @@ export default defineComponent({
}
newTimelineEvent.value.recipeId = props.recipe.id
// @ts-expect-error - TS doesn't like the $auth global user attribute
newTimelineEvent.value.subject = i18n.t("recipe.user-made-this", { user: $auth.user.fullName })
// the user only selects the date, so we set the time to end of day local time
// we choose the end of day so it always comes after "new recipe" events
Expand Down

0 comments on commit 2e7078e

Please sign in to comment.