Chore: Upgrade to Angular v18
Chore: Upgrade to Python 3.12 Chore: Upgrade to psycopg3
This commit is contained in:
@ -1,7 +1,13 @@
|
||||
import { Component, ElementRef, OnInit, ViewChild } from '@angular/core';
|
||||
import { FormControl, FormGroup } from '@angular/forms';
|
||||
import { FormControl, FormGroup, ReactiveFormsModule } from '@angular/forms';
|
||||
import { MatButton } from '@angular/material/button';
|
||||
import { MatCard, MatCardHeader, MatCardTitle, MatCardContent, MatCardActions } from '@angular/material/card';
|
||||
import { MatOption } from '@angular/material/core';
|
||||
import { MatDialog } from '@angular/material/dialog';
|
||||
import { MatSelectChange } from '@angular/material/select';
|
||||
import { MatDivider } from '@angular/material/divider';
|
||||
import { MatFormField, MatLabel } from '@angular/material/form-field';
|
||||
import { MatInput } from '@angular/material/input';
|
||||
import { MatSelectChange, MatSelect } from '@angular/material/select';
|
||||
import { ActivatedRoute, Router } from '@angular/router';
|
||||
import { map } from 'rxjs/operators';
|
||||
|
||||
@ -14,6 +20,22 @@ import { HeaderFooterService } from './header-footer.service';
|
||||
selector: 'app-section-printer',
|
||||
templateUrl: './header-footer.component.html',
|
||||
styleUrls: ['./header-footer.component.css'],
|
||||
standalone: true,
|
||||
imports: [
|
||||
MatCard,
|
||||
MatCardHeader,
|
||||
MatCardTitle,
|
||||
MatCardContent,
|
||||
ReactiveFormsModule,
|
||||
MatFormField,
|
||||
MatLabel,
|
||||
MatSelect,
|
||||
MatOption,
|
||||
MatInput,
|
||||
MatDivider,
|
||||
MatCardActions,
|
||||
MatButton,
|
||||
],
|
||||
})
|
||||
export class HeaderFooterComponent implements OnInit {
|
||||
@ViewChild('section', { static: true }) sectionElement?: ElementRef;
|
||||
@ -60,15 +82,15 @@ export class HeaderFooterComponent implements OnInit {
|
||||
}
|
||||
|
||||
save() {
|
||||
this.ser.save(this.getItem()).subscribe(
|
||||
(result: HeaderFooter[]) => {
|
||||
this.ser.save(this.getItem()).subscribe({
|
||||
next: (result: HeaderFooter[]) => {
|
||||
this.toaster.show('Success', '');
|
||||
this.showItem(result);
|
||||
},
|
||||
(error) => {
|
||||
error: (error) => {
|
||||
this.toaster.show('Error', error);
|
||||
},
|
||||
);
|
||||
});
|
||||
}
|
||||
|
||||
getItem(): HeaderFooter {
|
||||
|
||||
Reference in New Issue
Block a user