Add frontend folder & setup frontend project
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
import { NgModule } from '@angular/core';
|
||||
import { RouterModule, Routes } from '@angular/router';
|
||||
import { AllowancePage } from './allowance.page';
|
||||
|
||||
const routes: Routes = [
|
||||
{
|
||||
path: '',
|
||||
component: AllowancePage,
|
||||
}
|
||||
];
|
||||
|
||||
@NgModule({
|
||||
imports: [RouterModule.forChild(routes)],
|
||||
exports: [RouterModule]
|
||||
})
|
||||
export class AllowancePageRoutingModule {}
|
||||
@@ -0,0 +1,18 @@
|
||||
import { IonicModule } from '@ionic/angular';
|
||||
import { NgModule } from '@angular/core';
|
||||
import { CommonModule } from '@angular/common';
|
||||
import { FormsModule } from '@angular/forms';
|
||||
import { AllowancePage } from './allowance.page';
|
||||
|
||||
import { AllowancePageRoutingModule } from './allowance-routing.module';
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
IonicModule,
|
||||
CommonModule,
|
||||
FormsModule,
|
||||
AllowancePageRoutingModule
|
||||
],
|
||||
declarations: [AllowancePage]
|
||||
})
|
||||
export class AllowancePageModule {}
|
||||
@@ -0,0 +1,15 @@
|
||||
<ion-header [translucent]="true">
|
||||
<ion-toolbar>
|
||||
<ion-title>
|
||||
Allowance
|
||||
</ion-title>
|
||||
</ion-toolbar>
|
||||
</ion-header>
|
||||
|
||||
<ion-content [fullscreen]="true">
|
||||
<ion-header collapse="condense">
|
||||
<ion-toolbar>
|
||||
<ion-title size="large">Allowance</ion-title>
|
||||
</ion-toolbar>
|
||||
</ion-header>
|
||||
</ion-content>
|
||||
@@ -0,0 +1,26 @@
|
||||
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
import { IonicModule } from '@ionic/angular';
|
||||
|
||||
import { ExploreContainerComponentModule } from '../explore-container/explore-container.module';
|
||||
|
||||
import { AllowancePage } from './allowance.page';
|
||||
|
||||
describe('AllowancePage', () => {
|
||||
let component: AllowancePage;
|
||||
let fixture: ComponentFixture<AllowancePage>;
|
||||
|
||||
beforeEach(async () => {
|
||||
await TestBed.configureTestingModule({
|
||||
declarations: [AllowancePage],
|
||||
imports: [IonicModule.forRoot(), ExploreContainerComponentModule]
|
||||
}).compileComponents();
|
||||
|
||||
fixture = TestBed.createComponent(AllowancePage);
|
||||
component = fixture.componentInstance;
|
||||
fixture.detectChanges();
|
||||
});
|
||||
|
||||
it('should create', () => {
|
||||
expect(component).toBeTruthy();
|
||||
});
|
||||
});
|
||||
@@ -0,0 +1,13 @@
|
||||
import { Component } from '@angular/core';
|
||||
|
||||
@Component({
|
||||
selector: 'app-allowance',
|
||||
templateUrl: 'allowance.page.html',
|
||||
styleUrls: ['allowance.page.scss'],
|
||||
standalone: false,
|
||||
})
|
||||
export class AllowancePage {
|
||||
|
||||
constructor() {}
|
||||
|
||||
}
|
||||
16
frontend/allowance-planner-v2/src/app/app-routing.module.ts
Normal file
16
frontend/allowance-planner-v2/src/app/app-routing.module.ts
Normal file
@@ -0,0 +1,16 @@
|
||||
import { NgModule } from '@angular/core';
|
||||
import { PreloadAllModules, RouterModule, Routes } from '@angular/router';
|
||||
|
||||
const routes: Routes = [
|
||||
{
|
||||
path: '',
|
||||
loadChildren: () => import('./tabs/tabs.module').then(m => m.TabsPageModule)
|
||||
}
|
||||
];
|
||||
@NgModule({
|
||||
imports: [
|
||||
RouterModule.forRoot(routes, { preloadingStrategy: PreloadAllModules })
|
||||
],
|
||||
exports: [RouterModule]
|
||||
})
|
||||
export class AppRoutingModule {}
|
||||
3
frontend/allowance-planner-v2/src/app/app.component.html
Normal file
3
frontend/allowance-planner-v2/src/app/app.component.html
Normal file
@@ -0,0 +1,3 @@
|
||||
<ion-app>
|
||||
<ion-router-outlet></ion-router-outlet>
|
||||
</ion-app>
|
||||
21
frontend/allowance-planner-v2/src/app/app.component.spec.ts
Normal file
21
frontend/allowance-planner-v2/src/app/app.component.spec.ts
Normal file
@@ -0,0 +1,21 @@
|
||||
import { CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
|
||||
import { TestBed } from '@angular/core/testing';
|
||||
|
||||
import { AppComponent } from './app.component';
|
||||
|
||||
describe('AppComponent', () => {
|
||||
|
||||
beforeEach(async () => {
|
||||
await TestBed.configureTestingModule({
|
||||
declarations: [AppComponent],
|
||||
schemas: [CUSTOM_ELEMENTS_SCHEMA],
|
||||
}).compileComponents();
|
||||
});
|
||||
|
||||
it('should create the app', () => {
|
||||
const fixture = TestBed.createComponent(AppComponent);
|
||||
const app = fixture.componentInstance;
|
||||
expect(app).toBeTruthy();
|
||||
});
|
||||
|
||||
});
|
||||
11
frontend/allowance-planner-v2/src/app/app.component.ts
Normal file
11
frontend/allowance-planner-v2/src/app/app.component.ts
Normal file
@@ -0,0 +1,11 @@
|
||||
import { Component } from '@angular/core';
|
||||
|
||||
@Component({
|
||||
selector: 'app-root',
|
||||
templateUrl: 'app.component.html',
|
||||
styleUrls: ['app.component.scss'],
|
||||
standalone: false,
|
||||
})
|
||||
export class AppComponent {
|
||||
constructor() {}
|
||||
}
|
||||
16
frontend/allowance-planner-v2/src/app/app.module.ts
Normal file
16
frontend/allowance-planner-v2/src/app/app.module.ts
Normal file
@@ -0,0 +1,16 @@
|
||||
import { NgModule } from '@angular/core';
|
||||
import { BrowserModule } from '@angular/platform-browser';
|
||||
import { RouteReuseStrategy } from '@angular/router';
|
||||
|
||||
import { IonicModule, IonicRouteStrategy } from '@ionic/angular';
|
||||
|
||||
import { AppRoutingModule } from './app-routing.module';
|
||||
import { AppComponent } from './app.component';
|
||||
|
||||
@NgModule({
|
||||
declarations: [AppComponent],
|
||||
imports: [BrowserModule, IonicModule.forRoot(), AppRoutingModule],
|
||||
providers: [{ provide: RouteReuseStrategy, useClass: IonicRouteStrategy }],
|
||||
bootstrap: [AppComponent],
|
||||
})
|
||||
export class AppModule {}
|
||||
@@ -0,0 +1,16 @@
|
||||
import { NgModule } from '@angular/core';
|
||||
import { RouterModule, Routes } from '@angular/router';
|
||||
import { HistoryPage } from './history.page';
|
||||
|
||||
const routes: Routes = [
|
||||
{
|
||||
path: '',
|
||||
component: HistoryPage,
|
||||
}
|
||||
];
|
||||
|
||||
@NgModule({
|
||||
imports: [RouterModule.forChild(routes)],
|
||||
exports: [RouterModule]
|
||||
})
|
||||
export class HistoryPageRoutingModule {}
|
||||
@@ -0,0 +1,18 @@
|
||||
import { IonicModule } from '@ionic/angular';
|
||||
import { NgModule } from '@angular/core';
|
||||
import { CommonModule } from '@angular/common';
|
||||
import { FormsModule } from '@angular/forms';
|
||||
import { HistoryPage } from './history.page';
|
||||
|
||||
import { HistoryPageRoutingModule } from './history-routing.module';
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
IonicModule,
|
||||
CommonModule,
|
||||
FormsModule,
|
||||
HistoryPageRoutingModule
|
||||
],
|
||||
declarations: [HistoryPage]
|
||||
})
|
||||
export class HistoryPageModule {}
|
||||
@@ -0,0 +1,15 @@
|
||||
<ion-header [translucent]="true">
|
||||
<ion-toolbar>
|
||||
<ion-title>
|
||||
History
|
||||
</ion-title>
|
||||
</ion-toolbar>
|
||||
</ion-header>
|
||||
|
||||
<ion-content [fullscreen]="true">
|
||||
<ion-header collapse="condense">
|
||||
<ion-toolbar>
|
||||
<ion-title size="large">History</ion-title>
|
||||
</ion-toolbar>
|
||||
</ion-header>
|
||||
</ion-content>
|
||||
@@ -0,0 +1,26 @@
|
||||
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
import { IonicModule } from '@ionic/angular';
|
||||
|
||||
import { ExploreContainerComponentModule } from '../explore-container/explore-container.module';
|
||||
|
||||
import { HistoryPage } from './history.page';
|
||||
|
||||
describe('HistoryPage', () => {
|
||||
let component: HistoryPage;
|
||||
let fixture: ComponentFixture<HistoryPage>;
|
||||
|
||||
beforeEach(async () => {
|
||||
await TestBed.configureTestingModule({
|
||||
declarations: [HistoryPage],
|
||||
imports: [IonicModule.forRoot(), ExploreContainerComponentModule]
|
||||
}).compileComponents();
|
||||
|
||||
fixture = TestBed.createComponent(HistoryPage);
|
||||
component = fixture.componentInstance;
|
||||
fixture.detectChanges();
|
||||
});
|
||||
|
||||
it('should create', () => {
|
||||
expect(component).toBeTruthy();
|
||||
});
|
||||
});
|
||||
@@ -0,0 +1,13 @@
|
||||
import { Component } from '@angular/core';
|
||||
|
||||
@Component({
|
||||
selector: 'app-history',
|
||||
templateUrl: 'history.page.html',
|
||||
styleUrls: ['history.page.scss'],
|
||||
standalone: false,
|
||||
})
|
||||
export class HistoryPage {
|
||||
|
||||
constructor() {}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,39 @@
|
||||
import { NgModule } from '@angular/core';
|
||||
import { RouterModule, Routes } from '@angular/router';
|
||||
import { TabsPage } from './tabs.page';
|
||||
|
||||
const routes: Routes = [
|
||||
{
|
||||
path: 'tabs',
|
||||
component: TabsPage,
|
||||
children: [
|
||||
{
|
||||
path: 'history',
|
||||
loadChildren: () => import('../history/history.module').then(m => m.HistoryPageModule)
|
||||
},
|
||||
{
|
||||
path: 'allowance',
|
||||
loadChildren: () => import('../allowance/allowance.module').then(m => m.AllowancePageModule)
|
||||
},
|
||||
{
|
||||
path: 'tasks',
|
||||
loadChildren: () => import('../tasks/tasks.module').then(m => m.TasksPageModule)
|
||||
},
|
||||
{
|
||||
path: '',
|
||||
redirectTo: '/tabs/allowance',
|
||||
pathMatch: 'full'
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
path: '',
|
||||
redirectTo: '/tabs/allowance',
|
||||
pathMatch: 'full'
|
||||
}
|
||||
];
|
||||
|
||||
@NgModule({
|
||||
imports: [RouterModule.forChild(routes)],
|
||||
})
|
||||
export class TabsPageRoutingModule {}
|
||||
21
frontend/allowance-planner-v2/src/app/tabs/tabs.module.ts
Normal file
21
frontend/allowance-planner-v2/src/app/tabs/tabs.module.ts
Normal file
@@ -0,0 +1,21 @@
|
||||
import { IonicModule } from '@ionic/angular';
|
||||
import { NgModule } from '@angular/core';
|
||||
import { CommonModule } from '@angular/common';
|
||||
import { FormsModule } from '@angular/forms';
|
||||
import {MatIconModule} from '@angular/material/icon';
|
||||
|
||||
import { TabsPageRoutingModule } from './tabs-routing.module';
|
||||
|
||||
import { TabsPage } from './tabs.page';
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
IonicModule,
|
||||
CommonModule,
|
||||
FormsModule,
|
||||
TabsPageRoutingModule,
|
||||
MatIconModule,
|
||||
],
|
||||
declarations: [TabsPage]
|
||||
})
|
||||
export class TabsPageModule {}
|
||||
17
frontend/allowance-planner-v2/src/app/tabs/tabs.page.html
Normal file
17
frontend/allowance-planner-v2/src/app/tabs/tabs.page.html
Normal file
@@ -0,0 +1,17 @@
|
||||
<ion-tabs>
|
||||
|
||||
<ion-tab-bar slot="bottom">
|
||||
<ion-tab-button tab="history" href="/tabs/history">
|
||||
<mat-icon>history</mat-icon>
|
||||
</ion-tab-button>
|
||||
|
||||
<ion-tab-button tab="allowance" href="/tabs/allowance">
|
||||
<mat-icon>savings</mat-icon>
|
||||
</ion-tab-button>
|
||||
|
||||
<ion-tab-button tab="tasks" href="/tabs/tasks">
|
||||
<mat-icon>task_alt</mat-icon>
|
||||
</ion-tab-button>
|
||||
</ion-tab-bar>
|
||||
|
||||
</ion-tabs>
|
||||
@@ -0,0 +1 @@
|
||||
|
||||
26
frontend/allowance-planner-v2/src/app/tabs/tabs.page.spec.ts
Normal file
26
frontend/allowance-planner-v2/src/app/tabs/tabs.page.spec.ts
Normal file
@@ -0,0 +1,26 @@
|
||||
import { CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
|
||||
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
|
||||
import { TabsPage } from './tabs.page';
|
||||
|
||||
describe('TabsPage', () => {
|
||||
let component: TabsPage;
|
||||
let fixture: ComponentFixture<TabsPage>;
|
||||
|
||||
beforeEach(async () => {
|
||||
await TestBed.configureTestingModule({
|
||||
declarations: [TabsPage],
|
||||
schemas: [CUSTOM_ELEMENTS_SCHEMA],
|
||||
}).compileComponents();
|
||||
});
|
||||
|
||||
beforeEach(() => {
|
||||
fixture = TestBed.createComponent(TabsPage);
|
||||
component = fixture.componentInstance;
|
||||
fixture.detectChanges();
|
||||
});
|
||||
|
||||
it('should create', () => {
|
||||
expect(component).toBeTruthy();
|
||||
});
|
||||
});
|
||||
13
frontend/allowance-planner-v2/src/app/tabs/tabs.page.ts
Normal file
13
frontend/allowance-planner-v2/src/app/tabs/tabs.page.ts
Normal file
@@ -0,0 +1,13 @@
|
||||
import { Component } from '@angular/core';
|
||||
|
||||
@Component({
|
||||
selector: 'app-tabs',
|
||||
templateUrl: 'tabs.page.html',
|
||||
styleUrls: ['tabs.page.scss'],
|
||||
standalone: false,
|
||||
})
|
||||
export class TabsPage {
|
||||
|
||||
constructor() {}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
import { NgModule } from '@angular/core';
|
||||
import { RouterModule, Routes } from '@angular/router';
|
||||
import { TasksPage } from './tasks.page';
|
||||
|
||||
const routes: Routes = [
|
||||
{
|
||||
path: '',
|
||||
component: TasksPage,
|
||||
}
|
||||
];
|
||||
|
||||
@NgModule({
|
||||
imports: [RouterModule.forChild(routes)],
|
||||
exports: [RouterModule]
|
||||
})
|
||||
export class TasksPageRoutingModule {}
|
||||
18
frontend/allowance-planner-v2/src/app/tasks/tasks.module.ts
Normal file
18
frontend/allowance-planner-v2/src/app/tasks/tasks.module.ts
Normal file
@@ -0,0 +1,18 @@
|
||||
import { IonicModule } from '@ionic/angular';
|
||||
import { NgModule } from '@angular/core';
|
||||
import { CommonModule } from '@angular/common';
|
||||
import { FormsModule } from '@angular/forms';
|
||||
import { TasksPage } from './tasks.page';
|
||||
|
||||
import { TasksPageRoutingModule } from './tasks-routing.module';
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
IonicModule,
|
||||
CommonModule,
|
||||
FormsModule,
|
||||
TasksPageRoutingModule
|
||||
],
|
||||
declarations: [TasksPage]
|
||||
})
|
||||
export class TasksPageModule {}
|
||||
15
frontend/allowance-planner-v2/src/app/tasks/tasks.page.html
Normal file
15
frontend/allowance-planner-v2/src/app/tasks/tasks.page.html
Normal file
@@ -0,0 +1,15 @@
|
||||
<ion-header [translucent]="true">
|
||||
<ion-toolbar>
|
||||
<ion-title>
|
||||
Tasks
|
||||
</ion-title>
|
||||
</ion-toolbar>
|
||||
</ion-header>
|
||||
|
||||
<ion-content [fullscreen]="true">
|
||||
<ion-header collapse="condense">
|
||||
<ion-toolbar>
|
||||
<ion-title size="large">Tasks</ion-title>
|
||||
</ion-toolbar>
|
||||
</ion-header>
|
||||
</ion-content>
|
||||
@@ -0,0 +1,26 @@
|
||||
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
import { IonicModule } from '@ionic/angular';
|
||||
|
||||
import { ExploreContainerComponentModule } from '../explore-container/explore-container.module';
|
||||
|
||||
import { TasksPage } from './tasks.page';
|
||||
|
||||
describe('TasksPage', () => {
|
||||
let component: TasksPage;
|
||||
let fixture: ComponentFixture<TasksPage>;
|
||||
|
||||
beforeEach(async () => {
|
||||
await TestBed.configureTestingModule({
|
||||
declarations: [TasksPage],
|
||||
imports: [IonicModule.forRoot(), ExploreContainerComponentModule]
|
||||
}).compileComponents();
|
||||
|
||||
fixture = TestBed.createComponent(TasksPage);
|
||||
component = fixture.componentInstance;
|
||||
fixture.detectChanges();
|
||||
});
|
||||
|
||||
it('should create', () => {
|
||||
expect(component).toBeTruthy();
|
||||
});
|
||||
});
|
||||
13
frontend/allowance-planner-v2/src/app/tasks/tasks.page.ts
Normal file
13
frontend/allowance-planner-v2/src/app/tasks/tasks.page.ts
Normal file
@@ -0,0 +1,13 @@
|
||||
import { Component } from '@angular/core';
|
||||
|
||||
@Component({
|
||||
selector: 'app-tasks',
|
||||
templateUrl: 'tasks.page.html',
|
||||
styleUrls: ['tasks.page.scss'],
|
||||
standalone: false,
|
||||
})
|
||||
export class TasksPage {
|
||||
|
||||
constructor() {}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user