Changing from job-finder to MT
This commit is contained in:
parent
a396b0eeb4
commit
52e73d2ff1
|
|
@ -1,14 +1,11 @@
|
||||||
<nav class="navbar navbar-expand-lg navbar-dark bg-dark sticky-top">
|
<nav class="navbar navbar-expand-lg navbar-dark bg-dark sticky-top">
|
||||||
|
<div class="container">
|
||||||
| <a class="navbar-brand" href="/about-me">O mnie</a>
|
| <a class="navbar-brand" href="/about-me">O mnie</a>
|
||||||
|
| <a class="navbar-brand" href="/asset-calculator">Kalkulator amortyzacyjny</a>
|
||||||
|
| <a class="navbar-brand" href="/fixed-asset">Środki trwałe</a>
|
||||||
| <a class="navbar-brand" href="/quotes">Kursy</a>
|
| <a class="navbar-brand" href="/quotes">Kursy</a>
|
||||||
| <a class="navbar-brand" href="/asset-calculator">Kalkulator</a>
|
<!-- <a class="navbar-brand" href="/jobfinder">Oferty</a> -->
|
||||||
<a class="navbar-brand" href="/jobfinder">Oferty</a>
|
</div>
|
||||||
|
|
||||||
</nav>
|
</nav>
|
||||||
|
|
||||||
<div class="container">
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
<router-outlet />
|
<router-outlet />
|
||||||
`
|
`
|
||||||
|
|
@ -3,22 +3,40 @@ import { DashboardComponent } from './components/dashboard/dashboard.component';
|
||||||
import { AssetCalculatorComponent } from './asset-calculator/asset-calculator.component';
|
import { AssetCalculatorComponent } from './asset-calculator/asset-calculator.component';
|
||||||
import { AboutMeComponent } from './about-me/about-me.component';
|
import { AboutMeComponent } from './about-me/about-me.component';
|
||||||
import { ChatGPTComponent } from './chat-gpt/chat-gpt.component';
|
import { ChatGPTComponent } from './chat-gpt/chat-gpt.component';
|
||||||
import {JobfinderComponent } from './jobfinder/jobfinder.component'
|
import {JobfinderComponent } from './jobfinder/jobfinder.component';
|
||||||
|
import { FixedAssetComponent } from './fixed-asset/fixed-asset.component';
|
||||||
|
|
||||||
|
|
||||||
export const routes: Routes = [
|
export const routes: Routes = [
|
||||||
{ path: "",
|
{
|
||||||
title: "Wyszukiwacz pracy",
|
path: "",
|
||||||
component:AssetCalculatorComponent },
|
title: "Środki trwałe",
|
||||||
{ path: "about-me",
|
component:FixedAssetComponent
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: "about-me",
|
||||||
title:"O mnie",
|
title:"O mnie",
|
||||||
component: AboutMeComponent },
|
component: AboutMeComponent
|
||||||
{ path: "asset-calculator",
|
},
|
||||||
|
{
|
||||||
|
path: "asset-calculator",
|
||||||
title: "Kalkulator amortyzacyjny",
|
title: "Kalkulator amortyzacyjny",
|
||||||
component:AssetCalculatorComponent },
|
component:AssetCalculatorComponent
|
||||||
{ path: "quotes",
|
},
|
||||||
|
{
|
||||||
|
path: "quotes",
|
||||||
title:"Kursy podstawowych walut i złota",
|
title:"Kursy podstawowych walut i złota",
|
||||||
component: DashboardComponent },
|
component: DashboardComponent
|
||||||
{ path: "jobfinder",
|
},
|
||||||
|
{
|
||||||
|
path: "jobfinder",
|
||||||
title:"Wyszukiwacz pracy i serwis do jej rejestracji",
|
title:"Wyszukiwacz pracy i serwis do jej rejestracji",
|
||||||
component: JobfinderComponent }
|
component: JobfinderComponent
|
||||||
];
|
},
|
||||||
|
{
|
||||||
|
path: "fixed-asset",
|
||||||
|
title:"Środki trwałe",
|
||||||
|
component: FixedAssetComponent
|
||||||
|
}
|
||||||
|
]
|
||||||
|
;
|
||||||
|
|
|
||||||
|
|
@ -1,14 +1,15 @@
|
||||||
import {Component, effect, computed, OnInit, signal } from '@angular/core';
|
import {Component, effect, computed, OnInit, signal } from '@angular/core';
|
||||||
import {ReactiveFormsModule, FormGroup, Validators, FormControl, FormArray} from '@angular/forms';
|
import {ReactiveFormsModule, FormGroup, Validators, FormControl, FormArray} from '@angular/forms';
|
||||||
import {CurrencyPipe,DecimalPipe,PercentPipe, NgFor} from '@angular/common';
|
import {CurrencyPipe,DecimalPipe,PercentPipe, NgFor} from '@angular/common';
|
||||||
import {AssetsModule} from './assets/assets.module'
|
|
||||||
|
|
||||||
import {Asset, Positions, AssetPlanPosition, TypeDepreciation, YearMonth, AssetLifeChange } from './assets/asset';
|
import {Asset, Positions, AssetPlanPosition, TypeDepreciation, YearMonth, AssetLifeChange } from './assets/asset';
|
||||||
import {AssetService} from './assets/service/asset.service'
|
import {AssetService} from './assets/service/asset.service'
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-asset-calculator',
|
selector: 'app-asset-calculator',
|
||||||
standalone: true,
|
standalone: true,
|
||||||
imports: [ CurrencyPipe, DecimalPipe, PercentPipe, AssetsModule, ReactiveFormsModule, NgFor ] ,
|
imports: [ CurrencyPipe, DecimalPipe, PercentPipe, ReactiveFormsModule, NgFor ] ,
|
||||||
templateUrl: "asset-calculator.component.html",
|
templateUrl: "asset-calculator.component.html",
|
||||||
styleUrl: 'asset-calculator.component.css'
|
styleUrl: 'asset-calculator.component.css'
|
||||||
})
|
})
|
||||||
|
|
|
||||||
|
|
@ -34,7 +34,9 @@ export class AssetLifeChange{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
export class Asset {
|
export class Asset {
|
||||||
|
|
||||||
start : YearMonth ;
|
start : YearMonth ;
|
||||||
depreciationRate : number ;
|
depreciationRate : number ;
|
||||||
type : TypeDepreciation;
|
type : TypeDepreciation;
|
||||||
|
|
@ -58,6 +60,40 @@ export class Asset {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export class AssetsContainer{
|
||||||
|
|
||||||
|
assets: Map<string,Asset> = new Map();
|
||||||
|
|
||||||
|
constructor(){
|
||||||
|
this.initDefault();
|
||||||
|
}
|
||||||
|
|
||||||
|
initDefault(){
|
||||||
|
const yearMonth = new YearMonth('2024-11');
|
||||||
|
this.assets.set('Inv01', new Asset( 1000, yearMonth, TypeDepreciation.linear, 20 ) );
|
||||||
|
this.assets.set('Inv02', new Asset( 3000, yearMonth, TypeDepreciation.linear, 20 ) );
|
||||||
|
this.assets.set('Inv03', new Asset( 5000, yearMonth, TypeDepreciation.linear, 15 ) );
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
delete( nrInv: string ){
|
||||||
|
this.assets.delete(nrInv);
|
||||||
|
}
|
||||||
|
|
||||||
|
put( invNumber:string, asset: Asset ){
|
||||||
|
this.assets.set( invNumber, asset );
|
||||||
|
}
|
||||||
|
|
||||||
|
get( invNumber:string ){
|
||||||
|
return this.assets.get( invNumber );
|
||||||
|
}
|
||||||
|
|
||||||
|
getNrAssets( ){
|
||||||
|
return Array.from( this.assets.entries() );
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
export class AssetPlanPosition{
|
export class AssetPlanPosition{
|
||||||
when : YearMonth = new YearMonth('0-0');
|
when : YearMonth = new YearMonth('0-0');
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,54 @@
|
||||||
|
<div class="container">
|
||||||
|
|
||||||
|
<h2>Lista środków trwałych</h2>
|
||||||
|
|
||||||
|
<table id="assets" class="table">
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th class="col-2">Numer inwentarzowy</th>
|
||||||
|
<th class="col-2">KŚT</th>
|
||||||
|
<th class="col-2">Zmiany wartości</th>
|
||||||
|
<th class="col-2">Metoda amortyzacji</th>
|
||||||
|
<th class="col-2">Plan</th>
|
||||||
|
<th class="col-2" ></th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
<tr>
|
||||||
|
<div class="row">
|
||||||
|
|
||||||
|
<td class="col-2"><a href="/assets/Inv1/edit">Inv1</a></td>
|
||||||
|
<td class="col-2" >001</td>
|
||||||
|
<td class="col-2">
|
||||||
|
<a href="/assets/Inv1/life-browsing"><b>1</b> zmian</a></td>
|
||||||
|
<td class="col-2">
|
||||||
|
<a href="/assets/Inv1/methods-browsing"><b>1</b> metod</a></td>
|
||||||
|
|
||||||
|
<td class="col-2"><a href="/assets/Inv1/plan-calculate"><b>Wylicz plan</b></a></td>
|
||||||
|
<td class="col-2"><a type="button" class="btn btn-outline-secondary"
|
||||||
|
href="/assets/Inv1/remove">Usuń Składnik</a></td>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<div class="row">
|
||||||
|
|
||||||
|
<td class="col-2"><a href="/assets/Inv2/edit">Inv2</a></td>
|
||||||
|
<td class="col-2" >002</td>
|
||||||
|
<td class="col-2">
|
||||||
|
<a href="/assets/Inv2/life-browsing"><b>2</b> zmian</a></td>
|
||||||
|
<td class="col-2">
|
||||||
|
<a href="/assets/Inv2/methods-browsing"><b>1</b> metod</a></td>
|
||||||
|
|
||||||
|
<td class="col-2"><a href="/assets/Inv2/plan-calculate"><b>Wylicz plan</b></a></td>
|
||||||
|
<td class="col-2"><a type="button" class="btn btn-outline-secondary"
|
||||||
|
href="/assets/Inv2/remove">Usuń Składnik</a></td>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
<a type="button" class="btn btn-outline-secondary" href="/assets/new">Dodaj środek trwały</a>
|
||||||
|
<a type="button" class="btn btn-outline-secondary" href="/assets/init-default">Zainicjuj domyślną listę</a>
|
||||||
|
</div>
|
||||||
|
|
@ -0,0 +1,23 @@
|
||||||
|
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
||||||
|
|
||||||
|
import { FixedAssetComponent } from './fixed-asset.component';
|
||||||
|
|
||||||
|
describe('FixedAssetComponent', () => {
|
||||||
|
let component: FixedAssetComponent;
|
||||||
|
let fixture: ComponentFixture<FixedAssetComponent>;
|
||||||
|
|
||||||
|
beforeEach(async () => {
|
||||||
|
await TestBed.configureTestingModule({
|
||||||
|
imports: [FixedAssetComponent]
|
||||||
|
})
|
||||||
|
.compileComponents();
|
||||||
|
|
||||||
|
fixture = TestBed.createComponent(FixedAssetComponent);
|
||||||
|
component = fixture.componentInstance;
|
||||||
|
fixture.detectChanges();
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should create', () => {
|
||||||
|
expect(component).toBeTruthy();
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
@ -0,0 +1,66 @@
|
||||||
|
import { Component } from '@angular/core';
|
||||||
|
import { AssetsContainer, Asset } from '../asset-calculator/assets/asset';
|
||||||
|
|
||||||
|
@Component({
|
||||||
|
selector: 'app-fixed-asset',
|
||||||
|
standalone: true,
|
||||||
|
imports: [],
|
||||||
|
template:`
|
||||||
|
|
||||||
|
<div class="container">
|
||||||
|
|
||||||
|
<h2 class="text-center m-2">Lista środków trwałych( w toku )</h2>
|
||||||
|
<div class="table-responsive">
|
||||||
|
<table id="assets" class="table table-bordered">
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th class="col-2">Numer inwentarzowy</th>
|
||||||
|
<th class="col-2">Zmiany wartości</th>
|
||||||
|
<th class="col-2">Metoda amortyzacji</th>
|
||||||
|
<th class="col-2">Plan</th>
|
||||||
|
<th class="col-2" ></th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
@for( asset of assetsContainer.getNrAssets(); track asset[0] ) {
|
||||||
|
<tr>
|
||||||
|
<td class="col-2"> {{asset[0]}} </td>
|
||||||
|
<td class="col-2">
|
||||||
|
<a href="/assets/Inv1/life-browsing"><b>1</b> zmian</a></td>
|
||||||
|
<td class="col-2">
|
||||||
|
<a href="/assets/Inv1/methods-browsing"><b>1</b> metod</a></td>
|
||||||
|
|
||||||
|
<td class="col-2"><a href="/assets/Inv1/plan-calculate"><b>Wylicz plan</b></a></td>
|
||||||
|
<td class="col-2">
|
||||||
|
<input type="button" class="btn btn-outline-secondary" (click)="delete(asset[0])" value="Usuń Składnik">
|
||||||
|
</td>
|
||||||
|
|
||||||
|
</tr>
|
||||||
|
}
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<input type="button" (click)=initDefault() class="btn btn-outline-secondary" value="Zainicjuj domyślną listę">
|
||||||
|
</div>
|
||||||
|
`,
|
||||||
|
styleUrl: './fixed-asset.component.css'
|
||||||
|
})
|
||||||
|
export class FixedAssetComponent {
|
||||||
|
assetsContainer : AssetsContainer;
|
||||||
|
|
||||||
|
|
||||||
|
constructor(){
|
||||||
|
this.assetsContainer = new AssetsContainer ();
|
||||||
|
|
||||||
|
}
|
||||||
|
initDefault(){
|
||||||
|
this.assetsContainer.initDefault();
|
||||||
|
}
|
||||||
|
|
||||||
|
delete( nrInv : string){
|
||||||
|
this.assetsContainer.delete( nrInv );
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
import { Component, OnInit } from '@angular/core';
|
import { Component, OnInit } from '@angular/core';
|
||||||
|
|
||||||
import { ReactiveFormsModule, FormsModule, FormBuilder, FormGroup } from '@angular/forms';
|
import { ReactiveFormsModule, FormBuilder, FormGroup } from '@angular/forms';
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-jobfinder',
|
selector: 'app-jobfinder',
|
||||||
standalone: true,
|
standalone: true,
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue