Skip to content

Commit

Permalink
🛠 Feature: Cmd+k filter plus detail preview of purchased courses
Browse files Browse the repository at this point in the history
  • Loading branch information
TomasSirotek committed Dec 8, 2023
1 parent 2c842c3 commit 2b61075
Show file tree
Hide file tree
Showing 53 changed files with 1,967 additions and 542 deletions.
4 changes: 1 addition & 3 deletions src/Infrastructure/Authentication/Services/JwtGenerator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,7 @@

namespace SkillSphere.Infrastructure.Authentication.Services;



public class JwtGenerator : IJwtTokenGen
public class JwtGenerator : IJwtTokenGen
{
private readonly JwtTokenConfig _authSettings;

Expand Down
3 changes: 2 additions & 1 deletion src/UI/angular.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@
],
"styles": [
"src/styles.scss",
"node_modules/tailwindcss/base.css"
"node_modules/tailwindcss/base.css",
"node_modules/@ngneat/cmdk/styles/vercel.css"
],
"scripts": [
"node_modules/flowbite/dist/flowbite.js"
Expand Down
62 changes: 60 additions & 2 deletions src/UI/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions src/UI/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
"private": true,
"dependencies": {
"@angular/animations": "^17.0.4",
"@angular/cdk": "^16.2.12",
"@angular/common": "^17.0.4",
"@angular/compiler": "^17.0.4",
"@angular/core": "^17.0.4",
Expand All @@ -25,7 +26,10 @@
"@ng-icons/core": "^25.3.1",
"@ng-icons/heroicons": "^25.3.1",
"@ng-select/ng-select": "^12.0.4",
"@ngneat/cmdk": "^2.0.0",
"@ngneat/dialog": "^4.1.1",
"@ngneat/overview": "^5.1.1",
"@ngneat/until-destroy": "^10.0.0",
"@swimlane/ngx-datatable": "^20.1.0",
"@tailwindcss/aspect-ratio": "^0.4.2",
"@tailwindcss/typography": "^0.5.10",
Expand Down
9 changes: 8 additions & 1 deletion src/UI/src/app/app.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,20 @@ import { ResponsiveHelperComponent } from './shared/components/responsive-helper
import { AlertComponent } from './shared/component/alert/alert.component';
import { initFlowbite } from 'flowbite';
import { ReactiveFormsModule } from '@angular/forms';
import { CommandComponent, EmptyDirective, GroupComponent, InputDirective, ItemDirective, ListComponent } from '@ngneat/cmdk';

@Component({
selector: 'app-root',
templateUrl: './app.component.html',
styleUrls: ['./app.component.scss'],
standalone: true,
imports: [NgClass, RouterOutlet, ResponsiveHelperComponent,AlertComponent,NgIf],

imports: [NgClass, RouterOutlet, ResponsiveHelperComponent,AlertComponent,NgIf,CommandComponent,
InputDirective,
ListComponent,
GroupComponent,
ItemDirective,
EmptyDirective],

})
export class AppComponent implements OnInit {
Expand Down
4 changes: 2 additions & 2 deletions src/UI/src/app/core/constant/menu.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@ export class Menu {
items: [
{
icon:' heroBuildingStorefront',
label: 'Courses',
label: 'Store',
route: '/courses',
},
{
icon: 'heroFolderOpen',
icon: 'heroSquares2x2',
label: 'Dashboard',
route: '/dashboard',
children: [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@
>
<!-- end Header -->

<app-boxes-header
[showButton]="false"
title="Purchase courses"
></app-boxes-header>


<!-- Card Blog -->
<div class="py-4 mx-auto">
<div *ngIf="!isLoaded; else skeletonContent">
Expand Down Expand Up @@ -31,22 +37,20 @@
*ngIf="filteredCourses && filteredCourses.length > 0; else noResults"
>
<!-- Course cards -->
<ng-container *ngFor="let course of filteredCourses">
<ng-container *ngFor="let course of filteredCourses ; let i = index">

<div
class="group shadow-sm dark:border-gray-700 hover:scale-105 transform transition-transform duration-300"
>
<div
class="bg-white border border-gray-200 rounded-lg shadow dark:bg-gray-800 dark:border-gray-700 overflow-hidden"
class="bg-white border border-gray-200 rounded-md shadow dark:bg-gray-800 dark:border-gray-700 overflow-hidden"
>
<div class="relative">
<div class="absolute top-2 left-2 text-black dark:text-white">
<button
class="flex-none button rounded-md px-4 text-xs font-semibold text-white hover:cursor-pointer"
>
<ng-icon
name="heroCheckBadge"
class="text-3xl text-green-500"
></ng-icon>

</button>
</div>

Expand Down Expand Up @@ -89,7 +93,7 @@
</div>
</div>

<div class="p-4 md:p-6 space-y-2 hover:cursor-pointer">
<div class="p-4 md:p-6 space-y-2 hover:cursor-pointer" (click)="openModal(i) ">
<h3
class="text-xl font-semibold text-gray-800 dark:text-gray-300 dark:hover:text-white"
>
Expand Down Expand Up @@ -132,7 +136,7 @@
</div>

<div>
<button class="border-green-500 border rounded-md px-2">
<button class="border-green-500 border rounded-md px-2">
<span [class]="'text-green-500'" class="font-bold">
Watch now
</span>
Expand All @@ -142,6 +146,7 @@
</div>
</div>
</div>

</ng-container>
</div>
</ng-template>
Expand All @@ -153,5 +158,9 @@
</ng-template>
</div>


<!-- End Card Blog -->
</div>

<app-modal-preview [descriptionType]="false" (canceled)="handleCancelPreviewModal()" [course]="selectedCourse" />

Loading

0 comments on commit 2b61075

Please sign in to comment.