-
Notifications
You must be signed in to change notification settings - Fork 11
upgrade captain dashboard #67
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
dhamariT
wants to merge
18
commits into
main
Choose a base branch
from
upgrade-captain-dashboard
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
18 commits
Select commit
Hold shift + click to select a range
9018b9c
feat: add captain dashboard and team pages with permissions
dhamariT 99fe8cd
refactor: enhance captain dashboard link with WIP indicator
dhamariT c7b951a
copilot suggested changes
dhamariT c885bff
redundant profile card use + crew
EricZil 27e133a
pretty
EricZil 3894d93
fix: update admin page redirect logic for captain role
dhamariT de55a3c
feat: enhance ship certifications and captain dashboard functionality
dhamariT f1c6e01
feat: add spot check leaderboard to admin page
dhamariT 0363b71
Merge branch 'main' into update-captain-role-permissions
dhamariT e8dd614
feat: enhance captain team functionality and activity tracking
dhamariT 87d1013
fix: update returned certification labels in CertsView component
dhamariT 2468219
chore: add .gitignore file to exclude IDE/editor files
dhamariT e25ec00
refactor: improve code formatting and readability across multiple com…
dhamariT 87c2bf5
refactor: reorganize User model and enhance PayoutReq and Session models
dhamariT 8e927a5
chore: add migration for captain role permissions and db schema sync
dhamariT 02ee80f
refactor: update skills handling and logging for JSON compatibility
dhamariT 535e0b9
refactor: standardize JSON handling for skills and decisions across r…
dhamariT 017d161
refactor: improve JSON parsing for skills and decisions in API routes
dhamariT File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,2 @@ | ||
| # IDE / Editor | ||
| .idea/ |
2 changes: 2 additions & 0 deletions
2
sw-dash/prisma/migrations/20250116010641_remove_unused_hire_fields/migration.sql
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,2 @@ | ||
| -- Migration already applied. Placeholder for history tracking. | ||
| SELECT 1; | ||
78 changes: 78 additions & 0 deletions
78
sw-dash/prisma/migrations/20250312000000_captain_role_permissions/migration.sql
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,78 @@ | ||
| -- AlterTable | ||
| ALTER TABLE `users` MODIFY `skills` LONGTEXT NULL; | ||
|
|
||
| -- AlterTable | ||
| ALTER TABLE `ysws_reviews` MODIFY `devlogs` LONGTEXT NULL, | ||
| MODIFY `commits` LONGTEXT NULL, | ||
| MODIFY `decisions` LONGTEXT NULL; | ||
|
|
||
| -- AlterTable | ||
| ALTER TABLE `metrics_history` MODIFY `output` LONGTEXT NULL; | ||
|
|
||
| -- AlterTable | ||
| ALTER TABLE `sys_logs` MODIFY `metadata` LONGTEXT NULL, | ||
| MODIFY `reqBody` LONGTEXT NULL, | ||
| MODIFY `reqHeaders` LONGTEXT NULL, | ||
| MODIFY `resBody` LONGTEXT NULL, | ||
| MODIFY `resHeaders` LONGTEXT NULL, | ||
| MODIFY `changes` LONGTEXT NULL; | ||
|
|
||
| -- CreateTable | ||
| CREATE TABLE `spot_check_session_certs` ( | ||
| `id` INTEGER NOT NULL AUTO_INCREMENT, | ||
| `sessionId` INTEGER NOT NULL, | ||
| `certId` INTEGER NOT NULL, | ||
| `addedAt` DATETIME(3) NOT NULL DEFAULT CURRENT_TIMESTAMP(3), | ||
|
|
||
| INDEX `spot_check_session_certs_certId_idx`(`certId`), | ||
| INDEX `spot_check_session_certs_sessionId_idx`(`sessionId`), | ||
| UNIQUE INDEX `spot_check_session_certs_sessionId_certId_key`(`sessionId`, `certId`), | ||
| PRIMARY KEY (`id`) | ||
| ) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; | ||
|
|
||
| -- CreateTable | ||
| CREATE TABLE `spot_check_sessions` ( | ||
| `id` INTEGER NOT NULL AUTO_INCREMENT, | ||
| `staffId` INTEGER NOT NULL, | ||
| `startedAt` DATETIME(3) NOT NULL DEFAULT CURRENT_TIMESTAMP(3), | ||
| `pausedAt` DATETIME(3) NULL, | ||
| `endedAt` DATETIME(3) NULL, | ||
| `totalSecondsAccrued` INTEGER NOT NULL DEFAULT 0, | ||
| `status` VARCHAR(191) NOT NULL DEFAULT 'active', | ||
| `wrightId` INTEGER NULL, | ||
|
|
||
| INDEX `spot_check_sessions_staffId_idx`(`staffId`), | ||
| INDEX `spot_check_sessions_status_idx`(`status`), | ||
| INDEX `spot_check_sessions_wrightId_idx`(`wrightId`), | ||
| PRIMARY KEY (`id`) | ||
| ) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; | ||
|
|
||
| -- CreateIndex | ||
| CREATE INDEX `payout_reqs_adminId_fkey` ON `payout_reqs`(`adminId`); | ||
|
|
||
| -- CreateIndex | ||
| CREATE INDEX `sessions_userId_fkey` ON `sessions`(`userId`); | ||
|
|
||
| -- CreateIndex | ||
| CREATE INDEX `ship_certs_claimerId_fkey` ON `ship_certs`(`claimerId`); | ||
|
|
||
| -- CreateIndex | ||
| CREATE INDEX `ft_submitter_notes_staffId_fkey` ON `ft_submitter_notes`(`staffId`); | ||
|
|
||
| -- CreateIndex | ||
| CREATE INDEX `ticket_notes_authorId_fkey` ON `ticket_notes`(`authorId`); | ||
|
|
||
| -- CreateIndex | ||
| CREATE INDEX `spot_checks_resolvedBy_fkey` ON `spot_checks`(`resolvedBy`); | ||
|
|
||
| -- AddForeignKey | ||
| ALTER TABLE `spot_check_session_certs` ADD CONSTRAINT `spot_check_session_certs_certId_fkey` FOREIGN KEY (`certId`) REFERENCES `ship_certs`(`id`) ON DELETE CASCADE ON UPDATE CASCADE; | ||
|
|
||
| -- AddForeignKey | ||
| ALTER TABLE `spot_check_session_certs` ADD CONSTRAINT `spot_check_session_certs_sessionId_fkey` FOREIGN KEY (`sessionId`) REFERENCES `spot_check_sessions`(`id`) ON DELETE CASCADE ON UPDATE CASCADE; | ||
|
|
||
| -- AddForeignKey | ||
| ALTER TABLE `spot_check_sessions` ADD CONSTRAINT `spot_check_sessions_staffId_fkey` FOREIGN KEY (`staffId`) REFERENCES `users`(`id`) ON DELETE CASCADE ON UPDATE CASCADE; | ||
|
|
||
| -- AddForeignKey | ||
| ALTER TABLE `spot_check_sessions` ADD CONSTRAINT `spot_check_sessions_wrightId_fkey` FOREIGN KEY (`wrightId`) REFERENCES `users`(`id`) ON DELETE SET NULL ON UPDATE CASCADE; |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This migration file appears to have been rewritten into a no-op placeholder. Prisma migrations are intended to be immutable; changing an old migration can break fresh installs and cause schema drift between environments. If the original migration caused issues, prefer adding a new corrective migration (or documenting/locking the existing one) rather than editing historical SQL in-place.