Skip to content

Commit 1580817

Browse files
github-actions[bot]MarfuenDhanus3133dependabot[bot]golamrabbiazad
authored
[comp] Production Deploy (#1438)
* refactor: enhance EmployeeCompletionChart with profile links - Added external profile links for employees in the EmployeeCompletionChart, allowing users to view detailed profiles. - Integrated organization ID retrieval using useParams for dynamic linking. - Improved layout of employee details for better visual presentation. * fix: Enforce role-based access control in app * fix: Prisma seed command in `packages/db` * fix: Move role checks on org level * fix: Allow access to auditor role * chore: Just restrict access to employee role * chore(deps): bump @tiptap/extension-highlight from 2.22.3 to 3.3.0 (#1404) Bumps [@tiptap/extension-highlight](https://github.com/ueberdosis/tiptap/tree/HEAD/packages/extension-highlight) from 2.22.3 to 3.3.0. - [Release notes](https://github.com/ueberdosis/tiptap/releases) - [Changelog](https://github.com/ueberdosis/tiptap/blob/develop/packages/extension-highlight/CHANGELOG.md) - [Commits](https://github.com/ueberdosis/tiptap/commits/v3.3.0/packages/extension-highlight) --- updated-dependencies: - dependency-name: "@tiptap/extension-highlight" dependency-version: 3.3.0 dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * chore(deps): bump dub from 0.63.7 to 0.66.1 (#1399) Bumps [dub](https://github.com/dubinc/dub-ts) from 0.63.7 to 0.66.1. - [Release notes](https://github.com/dubinc/dub-ts/releases) - [Changelog](https://github.com/dubinc/dub-ts/blob/main/RELEASES.md) - [Commits](dubinc/dub-ts@v0.63.7...v0.66.1) --- updated-dependencies: - dependency-name: dub dependency-version: 0.66.1 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Mariano Fuentes <marfuen98@gmail.com> * chore(deps): bump @dub/embed-react from 0.0.15 to 0.0.16 (#1337) Bumps [@dub/embed-react](https://github.com/dubinc/dub) from 0.0.15 to 0.0.16. - [Commits](https://github.com/dubinc/dub/commits) --- updated-dependencies: - dependency-name: "@dub/embed-react" dependency-version: 0.0.16 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Mariano Fuentes <marfuen98@gmail.com> * chore: update Header component and enhance NoAccess page layout (#1425) - Added Header component to NoAccess page for better organization context. - Adjusted layout of NoAccess page to improve user experience and visual structure. - Updated Header component to conditionally render AssistantButton based on hideChat prop. Dependencies updated in bun.lock for @dub/embed-react, dub, and @tiptap/extension-highlight. Co-authored-by: Mariano Fuentes <marfuen98@gmail.com> * fix: remove duplicate dependsOn key (#1426) Signed-off-by: Golamrabbi Azad <35021384+golamrabbiazad@users.noreply.github.com> * [dev] [Marfuen] mariano/videos (#1427) * chore: update Header component and enhance NoAccess page layout - Added Header component to NoAccess page for better organization context. - Adjusted layout of NoAccess page to improve user experience and visual structure. - Updated Header component to conditionally render AssistantButton based on hideChat prop. Dependencies updated in bun.lock for @dub/embed-react, dub, and @tiptap/extension-highlight. * feat: implement training video backfill functionality - Added scripts and server actions to trigger training video completion backfill for all organizations or specific organizations. - Created jobs to handle backfilling of training video records for existing members in organizations. - Enhanced employee onboarding processes by ensuring new members have training video completion entries created upon invitation or organization creation. - Updated README with usage instructions and details on the backfill jobs. This implementation improves the tracking of training video completions for all members, ensuring accurate data representation in the system. --------- Co-authored-by: Mariano Fuentes <marfuen98@gmail.com> * [dev] [Marfuen] mariano/fix-bug (#1429) * chore: update Header component and enhance NoAccess page layout - Added Header component to NoAccess page for better organization context. - Adjusted layout of NoAccess page to improve user experience and visual structure. - Updated Header component to conditionally render AssistantButton based on hideChat prop. Dependencies updated in bun.lock for @dub/embed-react, dub, and @tiptap/extension-highlight. * feat: implement training video backfill functionality - Added scripts and server actions to trigger training video completion backfill for all organizations or specific organizations. - Created jobs to handle backfilling of training video records for existing members in organizations. - Enhanced employee onboarding processes by ensuring new members have training video completion entries created upon invitation or organization creation. - Updated README with usage instructions and details on the backfill jobs. This implementation improves the tracking of training video completions for all members, ensuring accurate data representation in the system. * fix: update database access in training video backfill action - Replaced direct database access reference with a centralized db import for improved consistency and maintainability in the triggerTrainingVideoBackfill action. * chore: remove backfill training videos script - Deleted the backfill-training-videos.ts script as it is no longer needed for triggering training video completion backfill jobs. This change simplifies the codebase and removes redundant functionality. * chore: remove training video backfill action and documentation - Deleted the trigger-training-video-backfill action and its associated README documentation as they are no longer needed. This change streamlines the codebase and eliminates outdated references to backfill functionality. --------- Co-authored-by: Mariano Fuentes <marfuen98@gmail.com> * Mariano/updated employees (#1430) * chore: update Header component and enhance NoAccess page layout - Added Header component to NoAccess page for better organization context. - Adjusted layout of NoAccess page to improve user experience and visual structure. - Updated Header component to conditionally render AssistantButton based on hideChat prop. Dependencies updated in bun.lock for @dub/embed-react, dub, and @tiptap/extension-highlight. * feat: implement training video backfill functionality - Added scripts and server actions to trigger training video completion backfill for all organizations or specific organizations. - Created jobs to handle backfilling of training video records for existing members in organizations. - Enhanced employee onboarding processes by ensuring new members have training video completion entries created upon invitation or organization creation. - Updated README with usage instructions and details on the backfill jobs. This implementation improves the tracking of training video completions for all members, ensuring accurate data representation in the system. * fix: update database access in training video backfill action - Replaced direct database access reference with a centralized db import for improved consistency and maintainability in the triggerTrainingVideoBackfill action. * chore: remove backfill training videos script - Deleted the backfill-training-videos.ts script as it is no longer needed for triggering training video completion backfill jobs. This change simplifies the codebase and removes redundant functionality. * chore: remove training video backfill action and documentation - Deleted the trigger-training-video-backfill action and its associated README documentation as they are no longer needed. This change streamlines the codebase and eliminates outdated references to backfill functionality. * chore: remove training video backfill action and related documentation (#1431) - Deleted the trigger-training-video-backfill action and its associated README documentation as they are no longer needed. This change streamlines the codebase and eliminates outdated references to backfill functionality. Co-authored-by: Mariano Fuentes <marfuen98@gmail.com> * [dev] [Marfuen] mariano/batch (#1432) * chore: remove training video backfill action and related documentation - Deleted the trigger-training-video-backfill action and its associated README documentation as they are no longer needed. This change streamlines the codebase and eliminates outdated references to backfill functionality. * feat: enhance training video backfill process with batch processing - Updated the backfillTrainingVideosForAllOrgs function to process organizations in batches of 500, improving efficiency and handling of large datasets. - Added logging for batch processing to track the number of organizations processed and any errors encountered during triggering. - Adjusted return values to reflect the total number of organizations processed and the number of batches created. --------- Co-authored-by: Mariano Fuentes <marfuen98@gmail.com> * show loader while marking video as complete (#1437) Co-authored-by: chasprowebdev <chasgarciaprowebdev@gmail.com> --------- Signed-off-by: dependabot[bot] <support@github.com> Signed-off-by: Golamrabbi Azad <35021384+golamrabbiazad@users.noreply.github.com> Co-authored-by: Mariano Fuentes <marfuen98@gmail.com> Co-authored-by: Dhanus <dhanus3133@gmail.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Golamrabbi Azad <35021384+golamrabbiazad@users.noreply.github.com> Co-authored-by: chasprowebdev <chasgarciaprowebdev@gmail.com>
1 parent 8dbb944 commit 1580817

2 files changed

Lines changed: 16 additions & 4 deletions

File tree

apps/portal/src/app/(app)/(home)/[orgId]/components/video/VideoCarousel.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ export function VideoCarousel({ videos }: VideoCarouselProps) {
5252

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

55-
const { execute: executeMarkComplete } = useAction(markVideoAsCompleted, {
55+
const { execute: executeMarkComplete, isExecuting } = useAction(markVideoAsCompleted, {
5656
onSuccess: (data) => {
5757
// Update local UI state immediately upon successful action
5858
const completedMetadataId = mergedVideos[currentIndex].id;
@@ -134,6 +134,7 @@ export function VideoCarousel({ videos }: VideoCarouselProps) {
134134
video={mergedVideos[currentIndex]} // Pass the merged object
135135
isCompleted={isCurrentVideoCompleted} // Use local state for UI
136136
onComplete={handleVideoComplete}
137+
isMarkingComplete={isExecuting}
137138
onNext={isCurrentVideoCompleted && hasNextVideo ? goToNext : undefined}
138139
allVideosCompleted={allVideosCompleted} // Use local state for UI
139140
onWatchAgain={() => {

apps/portal/src/app/(app)/(home)/[orgId]/components/video/YoutubeEmbed.tsx

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
import { Button } from '@comp/ui/button';
44
import type { EmployeeTrainingVideoCompletion } from '@db';
5-
import { ArrowRight, Check } from 'lucide-react';
5+
import { ArrowRight, Check, Loader2 } from 'lucide-react';
66
import { useState } from 'react';
77

88
// Define our own TrainingVideo interface since we can't find the import
@@ -26,6 +26,7 @@ interface YoutubeEmbedProps {
2626
onComplete: () => void;
2727
onNext?: () => void;
2828
allVideosCompleted: boolean;
29+
isMarkingComplete: boolean;
2930
onWatchAgain: () => void;
3031
}
3132

@@ -35,6 +36,7 @@ export function YoutubeEmbed({
3536
onComplete,
3637
onNext,
3738
allVideosCompleted,
39+
isMarkingComplete,
3840
onWatchAgain,
3941
}: YoutubeEmbedProps) {
4042
const [isRewatching, setIsRewatching] = useState(false);
@@ -53,8 +55,17 @@ export function YoutubeEmbed({
5355
disabled={isCompleted}
5456
className="gap-2"
5557
>
56-
<Check className="h-4 w-4" />
57-
{isCompleted ? 'Completed' : 'Mark as Complete'}
58+
{isMarkingComplete ? (
59+
<>
60+
<Loader2 className="h-4 w-4 animate-spin" />
61+
Marking as Complete...
62+
</>
63+
) : (
64+
<>
65+
<Check className="h-4 w-4" />
66+
{isCompleted ? 'Completed' : 'Mark as Complete'}
67+
</>
68+
)}
5869
</Button>
5970
)}
6071
</div>

0 commit comments

Comments
 (0)