Skip to content

Commit

Permalink
Merge pull request #150 from gctools-outilsgc/event-page
Browse files Browse the repository at this point in the history
event/group page init
  • Loading branch information
doug0102 authored Aug 17, 2023
2 parents 98bd6cd + 6974c4f commit a0496fa
Show file tree
Hide file tree
Showing 15 changed files with 112 additions and 19 deletions.
25 changes: 10 additions & 15 deletions src/app/app-routing.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,6 @@ const routes: Routes = [
path: CoreRoutes.Blog,
title: translations.titles.blog,
loadChildren: () => import('./features/blog/blog.module').then(m => m.BlogModule),
canActivate: [AuthGuard],
data: {
title: translations.titles.blog,
breadcrumb: translations.titles.blog
Expand All @@ -120,7 +119,7 @@ const routes: Routes = [
path: CoreRoutes.Bookmarks,
title: translations.titles.bookmarks,
loadChildren: () => import('./features/bookmarks/bookmarks.module').then(m => m.BookmarksModule),
canActivate: [AuthGuard],
canActivate: [AuthGuard, InterceptorGuard],
data: {
title: translations.titles.bookmarks,
breadcrumb: translations.titles.bookmarks
Expand All @@ -130,7 +129,7 @@ const routes: Routes = [
path: CoreRoutes.Dashboard,
title: translations.titles.dashboards,
loadChildren: () => import('./features/dashboard/dashboard.module').then(m => m.DashboardModule),
canActivate: [AuthGuard],
canActivate: [AuthGuard, InterceptorGuard],
data: {
title: translations.titles.dashboards,
breadcrumb: translations.titles.dashboards
Expand All @@ -145,7 +144,6 @@ const routes: Routes = [
path: CoreRoutes.Events,
title: translations.titles.events,
loadChildren: () => import('./features/events/events.module').then(m => m.EventsModule),
canActivate: [AuthGuard],
data: {
title: translations.titles.events,
breadcrumb: translations.titles.events
Expand All @@ -155,7 +153,7 @@ const routes: Routes = [
path: CoreRoutes.Friends,
title: translations.titles.friends,
loadChildren: () => import('./features/friends/friends.module').then(m => m.FriendsModule),
canActivate: [AuthGuard],
canActivate: [AuthGuard, InterceptorGuard],
data: {
title: translations.titles.friends,
breadcrumb: translations.titles.friends
Expand All @@ -165,7 +163,7 @@ const routes: Routes = [
path: CoreRoutes.Groups,
title: translations.titles.groups,
loadChildren: () => import('./features/groups/groups.module').then(m => m.GroupsModule),
canActivate: [AuthGuard],
canActivate: [AuthGuard, InterceptorGuard],
data: {
title: translations.titles.groups,
breadcrumb: translations.titles.groups
Expand All @@ -175,7 +173,7 @@ const routes: Routes = [
path: CoreRoutes.Invite,
title: translations.titles.invite,
loadChildren: () => import('./features/invite/invite.module').then(m => m.InviteModule),
canActivate: [AuthGuard],
canActivate: [AuthGuard, InterceptorGuard],
data: {
title: translations.titles.invite,
breadcrumb: translations.titles.invite
Expand All @@ -185,7 +183,7 @@ const routes: Routes = [
path: CoreRoutes.Members,
title: translations.titles.members,
loadChildren: () => import('./features/members/members.module').then(m => m.MembersModule),
canActivate: [AuthGuard],
canActivate: [AuthGuard, InterceptorGuard],
data: {
title: translations.titles.members,
breadcrumb: translations.titles.members
Expand All @@ -195,7 +193,7 @@ const routes: Routes = [
path: CoreRoutes.Messages,
title: translations.titles.messages,
loadChildren: () => import('./features/messages/messages.module').then(m => m.MessagesModule),
canActivate: [AuthGuard],
canActivate: [AuthGuard, InterceptorGuard],
data: {
title: translations.titles.messages,
breadcrumb: translations.titles.messages
Expand All @@ -205,7 +203,6 @@ const routes: Routes = [
path: CoreRoutes.Missions,
title: translations.titles.missions,
loadChildren: () => import('./features/missions/missions.module').then(m => m.MissionsModule),
canActivate: [AuthGuard],
data: {
title: translations.titles.missions,
breadcrumb: translations.titles.missions
Expand All @@ -215,7 +212,7 @@ const routes: Routes = [
path: CoreRoutes.NewsFeed,
title: translations.titles.newsfeed,
loadChildren: () => import('./features/news-feed/news-feed.module').then(m => m.NewsFeedModule),
canActivate: [AuthGuard],
canActivate: [AuthGuard, InterceptorGuard],
data: {
title: translations.titles.newsfeed,
breadcrumb: translations.titles.newsfeed
Expand All @@ -225,7 +222,7 @@ const routes: Routes = [
path: CoreRoutes.Profile,
title: translations.titles.profile,
loadChildren: () => import('./features/profile/profile.module').then(m => m.ProfileModule),
canActivate: [AuthGuard],
canActivate: [AuthGuard, InterceptorGuard],
data: {
title: translations.titles.profile,
breadcrumb: translations.titles.profile
Expand All @@ -235,7 +232,6 @@ const routes: Routes = [
path: CoreRoutes.Search,
title: translations.titles.search,
loadChildren: () => import('./features/search/search.module').then(m => m.SearchModule),
canActivate: [AuthGuard],
data: {
title: translations.titles.search,
breadcrumb: translations.titles.search
Expand All @@ -245,7 +241,7 @@ const routes: Routes = [
path: CoreRoutes.Settings,
title: translations.titles.settings,
loadChildren: () => import('./features/settings/settings.module').then(m => m.SettingsModule),
canActivate: [AuthGuard],
canActivate: [AuthGuard, InterceptorGuard],
data: {
title: translations.titles.settings,
breadcrumb: translations.titles.settings
Expand All @@ -255,7 +251,6 @@ const routes: Routes = [
path: CoreRoutes.TheWire,
title: translations.titles.thewire,
loadChildren: () => import('./features/the-wire/the-wire.module').then(m => m.TheWireModule),
canActivate: [AuthGuard],
data: {
title: translations.titles.thewire,
breadcrumb: translations.titles.thewire
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<p>event works!</p>
Empty file.
21 changes: 21 additions & 0 deletions src/app/features/events/components/event/event.component.spec.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
import { ComponentFixture, TestBed } from '@angular/core/testing';

import { EventComponent } from './event.component';

describe('EventComponent', () => {
let component: EventComponent;
let fixture: ComponentFixture<EventComponent>;

beforeEach(() => {
TestBed.configureTestingModule({
declarations: [EventComponent]
});
fixture = TestBed.createComponent(EventComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});

it('should create', () => {
expect(component).toBeTruthy();
});
});
11 changes: 11 additions & 0 deletions src/app/features/events/components/event/event.component.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import { ChangeDetectionStrategy, Component } from '@angular/core';

@Component({
selector: 'app-event',
templateUrl: './event.component.html',
styleUrls: ['./event.component.scss'],
changeDetection: ChangeDetectionStrategy.OnPush
})
export class EventComponent {

}
13 changes: 13 additions & 0 deletions src/app/features/events/events-routing.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,25 @@ import { NgModule } from '@angular/core';
import { RouterModule, Routes } from '@angular/router';
import { EventsComponent } from './events.component';

import { Translations } from 'src/app/core/services/translations.service';
import { EventComponent } from './components/event/event.component';
let translations = Translations.getInstance();

const routes: Routes = [
{
path: '',
pathMatch: 'full',
component: EventsComponent
},
{
path: ':eventId',
title: translations.titles.event,
component: EventComponent,
data: {
title: translations.titles.event,
breadcrumb: translations.titles.event
}
},
{
path: '**',
redirectTo: ''
Expand Down
5 changes: 3 additions & 2 deletions src/app/features/events/events.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,13 @@ import { SharedModule } from 'src/app/shared/shared.module';
import { EventCardComponent } from './components/event-card/event-card.component';
import { MatCardModule } from '@angular/material/card';
import { EventListComponent } from './components/event-list/event-list.component';
import { EventComponent } from './components/event/event.component';

@NgModule({
declarations: [
EventCardComponent,
EventListComponent
EventListComponent,
EventComponent
],
imports: [
CommonModule,
Expand All @@ -19,7 +21,6 @@ import { EventListComponent } from './components/event-list/event-list.component
MatCardModule
],
exports: [
EventCardComponent,
EventListComponent
]
})
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<p>group works!</p>
Empty file.
21 changes: 21 additions & 0 deletions src/app/features/groups/components/group/group.component.spec.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
import { ComponentFixture, TestBed } from '@angular/core/testing';

import { GroupComponent } from './group.component';

describe('GroupComponent', () => {
let component: GroupComponent;
let fixture: ComponentFixture<GroupComponent>;

beforeEach(() => {
TestBed.configureTestingModule({
declarations: [GroupComponent]
});
fixture = TestBed.createComponent(GroupComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});

it('should create', () => {
expect(component).toBeTruthy();
});
});
11 changes: 11 additions & 0 deletions src/app/features/groups/components/group/group.component.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import { ChangeDetectionStrategy, Component } from '@angular/core';

@Component({
selector: 'app-group',
templateUrl: './group.component.html',
styleUrls: ['./group.component.scss'],
changeDetection: ChangeDetectionStrategy.OnPush
})
export class GroupComponent {

}
13 changes: 13 additions & 0 deletions src/app/features/groups/groups-routing.module.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,26 @@
import { NgModule } from '@angular/core';
import { RouterModule, Routes } from '@angular/router';
import { GroupsComponent } from './groups.component';
import { GroupComponent } from './components/group/group.component';

import { Translations } from 'src/app/core/services/translations.service';
let translations = Translations.getInstance();

const routes: Routes = [
{
path: '',
pathMatch: 'full',
component: GroupsComponent
},
{
path: ':groupId',
title: translations.titles.group,
component: GroupComponent,
data: {
title: translations.titles.group,
breadcrumb: translations.titles.group
}
},
{
path: '**',
redirectTo: ''
Expand Down
5 changes: 3 additions & 2 deletions src/app/features/groups/groups.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,14 @@ import { SharedModule } from 'src/app/shared/shared.module';
import { GroupCardComponent } from './components/group-card/group-card.component';
import { MatCardModule } from '@angular/material/card';
import { GroupListComponent } from './components/group-list/group-list.component';
import { GroupComponent } from './components/group/group.component';


@NgModule({
declarations: [
GroupCardComponent,
GroupListComponent
GroupListComponent,
GroupComponent
],
imports: [
CommonModule,
Expand All @@ -20,7 +22,6 @@ import { GroupListComponent } from './components/group-list/group-list.component
MatCardModule
],
exports: [
GroupCardComponent,
GroupListComponent
]
})
Expand Down
2 changes: 2 additions & 0 deletions src/assets/i18n/translations.en.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,10 @@ export default {
"bookmarks": "Bookmarks",
"dashboards": "Dashboards",
"events": "Events",
"event": "Event",
"friends": "Friends",
"groups": "Groups",
"group": "Group",
"invite": "Invite",
"members": "Members",
"messages": "Messages",
Expand Down
2 changes: 2 additions & 0 deletions src/assets/i18n/translations.fr.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,10 @@ const fr: typeof import('./translations.en').default = {
"bookmarks": "Signets",
"dashboards": "Tableaux de bord",
"events": "Événements",
"event": "Événement",
"friends": "Amis",
"groups": "Groupes",
"group": "Groupe",
"invite": "Inviter",
"members": "Membres",
"messages": "Messages",
Expand Down

0 comments on commit a0496fa

Please sign in to comment.