Skip to content

date logic changed#358

Open
chanabyte wants to merge 10 commits into
mainfrom
forms-history
Open

date logic changed#358
chanabyte wants to merge 10 commits into
mainfrom
forms-history

Conversation

@chanabyte

Copy link
Copy Markdown
Collaborator

No description provided.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

This PR updates week/date handling across the API and admin UI by replacing custom UTC/week-boundary logic with dayjs (UTC + ISO week), while also expanding the admin form builder experience (history filtering UI, publish success + empty-form draft flows, and form deletion).

Changes:

  • Standardize week-bound computations (Mon–Sun, UTC) and date formatting using dayjs + isoWeek + utc in server endpoints and admin pages.
  • Improve admin builder UX: history toolbar + advanced filter drawer, keyword search, empty-form draft prompt, publish success modal, and delete action.
  • Regenerate/update package-lock.json metadata.

Reviewed changes

Copilot reviewed 6 out of 7 changed files in this pull request and generated 7 comments.

Show a summary per file
File Description
server/api/form/index.ts Switch weekday formatting + weekly bounds to dayjs.utc().startOf/endOf('isoWeek').
server/api/admin/class-progress.get.ts Replace custom date/week parsing + YMD formatting with dayjs ISO-week logic for filtering and output.
app/composables/useAdmin.ts Update date formatting, add builder state for new filters/modals, and refactor publish flow + deletion support.
app/pages/admin/builder.vue Update builder UI to use new composable state, add modals and advanced filters drawer, and adjust week label logic.
app/pages/admin/raffle.vue Replace getLastMonday usage with dayjs ISO-week week-start display.
app/pages/admin/styles/builder.css Add styles for new modals, toolbar/drawer UI, and empty-form/publish-success presentation.
package-lock.json Lockfile metadata churn (peer flags and related fields).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread app/composables/useAdmin.ts
Comment thread server/api/admin/class-progress.get.ts
Comment thread server/api/admin/class-progress.get.ts
Comment thread server/api/admin/class-progress.get.ts
Comment thread app/pages/admin/styles/builder.css Outdated
Comment thread app/pages/admin/builder.vue
Comment thread app/pages/admin/builder.vue Outdated
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
@AidanLoran AidanLoran self-assigned this Jun 9, 2026
@AidanLoran AidanLoran self-requested a review June 9, 2026 02:13
@AidanLoran AidanLoran removed their assignment Jun 9, 2026
Comment thread app/composables/useAdmin.ts
Comment thread app/composables/useAdmin.ts Outdated

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I this can be replaced with Dayjs functions

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

utils/dateLogic.ts:15-16

Comment thread app/composables/useAdmin.ts Outdated
Comment thread app/composables/useAdmin.ts
Comment thread app/composables/useAdmin.ts
Comment thread app/pages/admin/builder.vue
Comment thread app/pages/admin/builder.vue
Comment thread app/pages/admin/builder.vue
Comment thread server/api/admin/class-progress.get.ts
@AidanLoran AidanLoran linked an issue Jul 8, 2026 that may be closed by this pull request
@v-patel v-patel deleted the branch main July 9, 2026 02:21
@v-patel v-patel closed this Jul 9, 2026
@v-patel v-patel reopened this Jul 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature] Deleting forms

4 participants