Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
ff3f6f7
refactor: enhance EmployeeCompletionChart with profile links
Marfuen Aug 26, 2025
50222fa
Merge pull request #1411 from trycompai/mariano/new-agent
Marfuen Aug 26, 2025
8a81f42
fix: Enforce role-based access control in app
Dhanus3133 Aug 26, 2025
a9957cd
fix: Prisma seed command in `packages/db`
Dhanus3133 Aug 26, 2025
d7ac38b
Merge pull request #1414 from Dhanus3133/fix/prisma-seed-command
Marfuen Aug 27, 2025
f8700e9
Merge branch 'main' into fix/deny-access-non-owners-and-non-admin
Dhanus3133 Aug 27, 2025
a4056bf
fix: Move role checks on org level
Dhanus3133 Aug 27, 2025
237a1fc
Merge branch 'fix/deny-access-non-owners-and-non-admin' of https://gi…
Dhanus3133 Aug 27, 2025
1553400
fix: Allow access to auditor role
Dhanus3133 Aug 27, 2025
bfa18f0
chore: Just restrict access to employee role
Dhanus3133 Aug 27, 2025
4bedd51
Merge pull request #1413 from Dhanus3133/fix/deny-access-non-owners-a…
Marfuen Aug 27, 2025
f16ad2f
chore(deps): bump @tiptap/extension-highlight from 2.22.3 to 3.3.0 (#…
dependabot[bot] Aug 28, 2025
ee901ab
chore(deps): bump dub from 0.63.7 to 0.66.1 (#1399)
dependabot[bot] Aug 28, 2025
0740452
chore(deps): bump @dub/embed-react from 0.0.15 to 0.0.16 (#1337)
dependabot[bot] Aug 28, 2025
dd928ad
chore: update Header component and enhance NoAccess page layout (#1425)
github-actions[bot] Aug 28, 2025
9035238
fix: remove duplicate dependsOn key (#1426)
golamrabbiazad Aug 28, 2025
abedc9a
[dev] [Marfuen] mariano/videos (#1427)
github-actions[bot] Aug 28, 2025
1a3b08d
[dev] [Marfuen] mariano/fix-bug (#1429)
github-actions[bot] Aug 28, 2025
a717403
Mariano/updated employees (#1430)
Marfuen Aug 28, 2025
98c6503
chore: remove training video backfill action and related documentatio…
github-actions[bot] Aug 28, 2025
2691ce8
[dev] [Marfuen] mariano/batch (#1432)
github-actions[bot] Aug 28, 2025
3fe72a9
show loader while marking video as complete (#1437)
github-actions[bot] Aug 29, 2025
af81122
Merge branch 'release' into main
Marfuen Aug 29, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ export function VideoCarousel({ videos }: VideoCarouselProps) {

const [completedVideoIds, setCompletedVideoIds] = useState<Set<string>>(initialCompletedVideoIds);

const { execute: executeMarkComplete } = useAction(markVideoAsCompleted, {
const { execute: executeMarkComplete, isExecuting } = useAction(markVideoAsCompleted, {
onSuccess: (data) => {
// Update local UI state immediately upon successful action
const completedMetadataId = mergedVideos[currentIndex].id;
Expand Down Expand Up @@ -134,6 +134,7 @@ export function VideoCarousel({ videos }: VideoCarouselProps) {
video={mergedVideos[currentIndex]} // Pass the merged object
isCompleted={isCurrentVideoCompleted} // Use local state for UI
onComplete={handleVideoComplete}
isMarkingComplete={isExecuting}
onNext={isCurrentVideoCompleted && hasNextVideo ? goToNext : undefined}
allVideosCompleted={allVideosCompleted} // Use local state for UI
onWatchAgain={() => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import { Button } from '@comp/ui/button';
import type { EmployeeTrainingVideoCompletion } from '@db';
import { ArrowRight, Check } from 'lucide-react';
import { ArrowRight, Check, Loader2 } from 'lucide-react';
import { useState } from 'react';

// Define our own TrainingVideo interface since we can't find the import
Expand All @@ -26,6 +26,7 @@ interface YoutubeEmbedProps {
onComplete: () => void;
onNext?: () => void;
allVideosCompleted: boolean;
isMarkingComplete: boolean;
onWatchAgain: () => void;
}

Expand All @@ -35,6 +36,7 @@ export function YoutubeEmbed({
onComplete,
onNext,
allVideosCompleted,
isMarkingComplete,
onWatchAgain,
}: YoutubeEmbedProps) {
const [isRewatching, setIsRewatching] = useState(false);
Expand All @@ -53,8 +55,17 @@ export function YoutubeEmbed({
disabled={isCompleted}
className="gap-2"
>
<Check className="h-4 w-4" />
{isCompleted ? 'Completed' : 'Mark as Complete'}
{isMarkingComplete ? (
<>
<Loader2 className="h-4 w-4 animate-spin" />
Marking as Complete...
</>
) : (
<>
<Check className="h-4 w-4" />
{isCompleted ? 'Completed' : 'Mark as Complete'}
</>
)}
</Button>
)}
</div>
Expand Down
Loading