Skip to content

Conversation

@Saby-Bishops
Copy link
Member

fixes #9396

  • replace the add-course reactive form with typed controls for each field
  • update form handling helpers to use typed control access and normalize date placeholders

Codex Task

@Saby-Bishops Saby-Bishops marked this pull request as ready for review December 8, 2025 20:17
Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +192 to +196
createdDate: this.normalizeDateValue(form?.createdDate ?? this.courseForm.controls.createdDate.value),
creator: form?.creator ?? this.courseForm.controls.creator.value,
sourcePlanet: form?.sourcePlanet ?? this.courseForm.controls.sourcePlanet.value,
resideOn: form?.resideOn ?? this.courseForm.controls.resideOn.value,
updatedDate: this.normalizeDateValue(form?.updatedDate ?? this.courseForm.controls.updatedDate.value)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Prevent createdDate reset on course edit

The new setFormAndSteps normalizes incoming values with normalizeDateValue, but that helper only passes through strings/objects; numeric timestamps from saved courses fall through to datePlaceholder, so editing any course whose createdDate was stored as a number will swap the original creation time with the current time when updateDocument fills placeholders. This silently corrupts creation dates on every course edit.

Useful? React with 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

src/app/courses/add-courses/courses-add.component.ts

2 participants