-
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
870ddba
commit 20e0727
Showing
12 changed files
with
117 additions
and
23 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
20 changes: 20 additions & 0 deletions
20
libs/mix-share/src/components/main-toolbar/toolbar.service.ts
This file contains 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,20 @@ | ||
import { TemplatePortal } from '@angular/cdk/portal'; | ||
import { Injectable, TemplateRef, ViewContainerRef } from '@angular/core'; | ||
import { BehaviorSubject } from 'rxjs'; | ||
|
||
@Injectable({ providedIn: 'root' }) | ||
export class ToolbarService { | ||
constructor() {} | ||
|
||
public templatePortal$ = new BehaviorSubject<TemplatePortal | undefined>( | ||
undefined | ||
); | ||
|
||
public add(template: TemplateRef<unknown>, viewRef: ViewContainerRef) { | ||
this.templatePortal$.next(new TemplatePortal(template, viewRef)); | ||
} | ||
|
||
public remove() { | ||
this.templatePortal$.next(undefined); | ||
} | ||
} |
This file contains 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
This file contains 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
This file contains 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
This file contains 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
13 changes: 13 additions & 0 deletions
13
libs/mix-share/src/modules/task-manage/task-manage.layout.html
This file contains 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,13 @@ | ||
<router-outlet></router-outlet> | ||
|
||
<ng-template #projectTroller> | ||
<tui-breadcrumbs> | ||
<a *tuiItem tuiLink> {{ 'Project(s)' }} </a> | ||
<a *tuiItem tuiLink> | ||
<mix-project-select | ||
[size]="'s'" | ||
(selectedItemChange)="uiStore.changeSelected($event)" | ||
></mix-project-select | ||
></a> | ||
</tui-breadcrumbs> | ||
</ng-template> |
44 changes: 44 additions & 0 deletions
44
libs/mix-share/src/modules/task-manage/task-manage.layout.ts
This file contains 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,44 @@ | ||
import { CommonModule } from '@angular/common'; | ||
import { | ||
ChangeDetectionStrategy, | ||
Component, | ||
TemplateRef, | ||
ViewChild, | ||
ViewContainerRef, | ||
inject, | ||
} from '@angular/core'; | ||
import { RouterModule } from '@angular/router'; | ||
import { TuiLinkModule } from '@taiga-ui/core'; | ||
import { TuiBreadcrumbsModule } from '@taiga-ui/kit'; | ||
import { ToolbarService } from '../../components/main-toolbar/toolbar.service'; | ||
import { ProjectSelectComponent } from './components/project-select/project-select.component'; | ||
import { TaskManageStore } from './store/task-ui.store'; | ||
|
||
@Component({ | ||
selector: 'task-manage-layout', | ||
templateUrl: './task-manage.layout.html', | ||
standalone: true, | ||
changeDetection: ChangeDetectionStrategy.OnPush, | ||
imports: [ | ||
RouterModule, | ||
CommonModule, | ||
TuiBreadcrumbsModule, | ||
TuiLinkModule, | ||
ProjectSelectComponent, | ||
], | ||
}) | ||
export class TaskManageLayoutComponent { | ||
@ViewChild('projectTroller') public projectCtrl!: TemplateRef<unknown>; | ||
|
||
public toolbarSrv = inject(ToolbarService); | ||
public viewRef = inject(ViewContainerRef); | ||
public uiStore = inject(TaskManageStore); | ||
|
||
ngAfterViewInit() { | ||
this.toolbarSrv.add(this.projectCtrl, this.viewRef); | ||
} | ||
|
||
ngOnDestroy() { | ||
this.toolbarSrv.remove(); | ||
} | ||
} |
31 changes: 19 additions & 12 deletions
31
libs/mix-share/src/modules/task-manage/task-manange.route.ts
This file contains 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 |
---|---|---|
@@ -1,19 +1,26 @@ | ||
import { Routes } from '@angular/router'; | ||
import { TaskManageLayoutComponent } from './task-manage.layout'; | ||
|
||
export const taskManagementRoutes: Routes = [ | ||
{ | ||
path: 'board', | ||
loadComponent: () => | ||
import('./board/board.component').then((c) => c.TaskBoardComponent), | ||
}, | ||
{ | ||
path: 'project', | ||
loadComponent: () => | ||
import('./project/project.component').then((c) => c.ProjectComponent), | ||
}, | ||
{ | ||
path: '', | ||
redirectTo: 'board', | ||
pathMatch: 'full', | ||
component: TaskManageLayoutComponent, | ||
children: [ | ||
{ | ||
path: 'board', | ||
loadComponent: () => | ||
import('./board/board.component').then((c) => c.TaskBoardComponent), | ||
}, | ||
{ | ||
path: 'project', | ||
loadComponent: () => | ||
import('./project/project.component').then((c) => c.ProjectComponent), | ||
}, | ||
{ | ||
path: '', | ||
redirectTo: 'board', | ||
pathMatch: 'full', | ||
}, | ||
], | ||
}, | ||
]; |
20e0727
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.
Successfully deployed to the following URLs:
mix-portal-angular – ./
mix-portal-angular-mixcore.vercel.app
mix-portal-angular-git-master-mixcore.vercel.app
mix-portal-angular.vercel.app
studio.mixcore.net
admin.mixcore.dev