Added multiple basic UI components
This commit is contained in:
@ -1,12 +1,44 @@
|
||||
// src/app/app.component.ts
|
||||
import { Component } from '@angular/core';
|
||||
import { RouterOutlet } from '@angular/router';
|
||||
import { CommonModule } from '@angular/common';
|
||||
import { TitleSheetsFormComponent } from './view/components/title-sheets-form/title-sheets-form.component';
|
||||
import { TitleSheet, createEmptyTitleSheet } from './models/title-sheet.model';
|
||||
import { Router, RouterModule, RouterOutlet } from '@angular/router';
|
||||
|
||||
@Component({
|
||||
selector: 'app-root',
|
||||
imports: [RouterOutlet],
|
||||
standalone: true,
|
||||
imports: [
|
||||
CommonModule,
|
||||
RouterOutlet,
|
||||
TitleSheetsFormComponent // ← Import direct du composant
|
||||
],
|
||||
templateUrl: './app.component.html',
|
||||
styleUrl: './app.component.scss'
|
||||
styleUrls: ['./app.component.scss']
|
||||
})
|
||||
export class AppComponent {
|
||||
title = 'DTFluxTitrage-Client';
|
||||
title = 'test-title-sheets';
|
||||
testTitleSheet: TitleSheet;
|
||||
debugInfo: any = {};
|
||||
|
||||
constructor() {
|
||||
// Créer un titleSheet de test
|
||||
this.testTitleSheet = createEmptyTitleSheet();
|
||||
this.debugInfo.testTitleSheet = this.testTitleSheet;
|
||||
}
|
||||
|
||||
onTitleSheetSaved(titleSheet: TitleSheet): void {
|
||||
console.log('Title Sheet saved:', titleSheet);
|
||||
this.debugInfo.lastSaved = titleSheet;
|
||||
this.debugInfo.savedAt = new Date();
|
||||
|
||||
// Créer un nouveau titleSheet pour la suite
|
||||
this.testTitleSheet = createEmptyTitleSheet();
|
||||
}
|
||||
|
||||
onFormReset(): void {
|
||||
console.log('Form reset');
|
||||
this.debugInfo.lastAction = 'Form reset';
|
||||
this.debugInfo.resetAt = new Date();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user