feat(planning): grille hebdomadaire complète avec API et filtres
- Connexion API via proxy Angular (résolution CORS, base path /api) - Import CSS ng-zorro global pour les modales et composants - Filtres Camion/Show câblés sur l'affichage de la grille - Camions affichés via TrucksService (linkés au show du même créneau) - Panneau de détails : spectacles + camions du jour sélectionné - Modale de création de spectacle stylisée avec fond et centrage - Positionnement précis des events à la minute dans leur créneau - Auto-scroll vers l'heure courante au chargement - Ligne "maintenant" sur la colonne du jour actuel - Régénération des services OpenAPI (nouveaux noms de types) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Generated
Vendored
+1
-1
@@ -1,6 +1,6 @@
|
||||
|
||||
<form [formGroup]="form" novalidate>
|
||||
<nz-cascader [nzOptions]="nzOptions" formControlName="name" />
|
||||
<nz-cascader [nzOptions]="nzOptions" formControlName="name"></nz-cascader>
|
||||
</form>
|
||||
<br />
|
||||
<button nz-button (click)="reset()">Reset</button>
|
||||
|
||||
Generated
Vendored
+11
-6
@@ -1,6 +1,6 @@
|
||||
import { Component, inject } from '@angular/core';
|
||||
import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
|
||||
import { Component, inject, OnDestroy } from '@angular/core';
|
||||
import { FormBuilder, ReactiveFormsModule, Validators } from '@angular/forms';
|
||||
import { Subscription } from 'rxjs';
|
||||
|
||||
import { NzButtonModule } from 'ng-zorro-antd/button';
|
||||
import { NzCascaderModule, NzCascaderOption } from 'ng-zorro-antd/cascader';
|
||||
@@ -52,7 +52,7 @@ const options: NzCascaderOption[] = [
|
||||
imports: [ReactiveFormsModule, NzButtonModule, NzCascaderModule],
|
||||
<% if(inlineTemplate) { %>template: `
|
||||
<form [formGroup]="form" novalidate>
|
||||
<nz-cascader [nzOptions]="nzOptions" formControlName="name" />
|
||||
<nz-cascader [nzOptions]="nzOptions" formControlName="name"></nz-cascader>
|
||||
</form>
|
||||
<br />
|
||||
<button nz-button (click)="reset()">Reset</button>
|
||||
@@ -64,15 +64,16 @@ const options: NzCascaderOption[] = [
|
||||
}
|
||||
`]<% } else { %>styleUrls: ['./<%= dasherize(name) %>.component.<%= style %>']<% } %>
|
||||
})
|
||||
export class <%= classify(name) %>Component {
|
||||
export class <%= classify(name) %>Component implements OnDestroy {
|
||||
private fb = inject(FormBuilder);
|
||||
form = this.fb.group({
|
||||
name: this.fb.control<string[] | null>(null, Validators.required)
|
||||
});
|
||||
readonly nzOptions: NzCascaderOption[] = options;
|
||||
nzOptions: NzCascaderOption[] = options;
|
||||
changeSubscription: Subscription;
|
||||
|
||||
constructor() {
|
||||
this.form.controls.name.valueChanges.pipe(takeUntilDestroyed()).subscribe(data => {
|
||||
this.changeSubscription = this.form.controls.name.valueChanges.subscribe(data => {
|
||||
this.onChanges(data);
|
||||
});
|
||||
}
|
||||
@@ -89,4 +90,8 @@ export class <%= classify(name) %>Component {
|
||||
onChanges(values: string[] | null): void {
|
||||
console.log(values);
|
||||
}
|
||||
|
||||
ngOnDestroy(): void {
|
||||
this.changeSubscription.unsubscribe();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user