Chore: Upgrade to Angular v18

Chore: Upgrade to Python 3.12
Chore: Upgrade to psycopg3
This commit is contained in:
2024-06-03 13:22:56 +05:30
parent 56c1be5e05
commit 010e9a84db
573 changed files with 5727 additions and 6528 deletions

View File

@ -1,7 +1,21 @@
import { CdkDragDrop, moveItemInArray } from '@angular/cdk/drag-drop';
import { CdkDragDrop, moveItemInArray, CdkDropList, CdkDrag } from '@angular/cdk/drag-drop';
import { Component, OnInit, ViewChild } from '@angular/core';
import { MatTable } from '@angular/material/table';
import { ActivatedRoute, Router } from '@angular/router';
import { MatButton, MatAnchor } from '@angular/material/button';
import { MatCard, MatCardHeader, MatCardTitleGroup, MatCardTitle, MatCardContent } from '@angular/material/card';
import { MatIcon } from '@angular/material/icon';
import {
MatTable,
MatColumnDef,
MatHeaderCellDef,
MatHeaderCell,
MatCellDef,
MatCell,
MatHeaderRowDef,
MatHeaderRow,
MatRowDef,
MatRow,
} from '@angular/material/table';
import { ActivatedRoute, Router, RouterLink } from '@angular/router';
import { BehaviorSubject } from 'rxjs';
import { MenuCategory } from '../../core/menu-category';
@ -15,6 +29,30 @@ import { TableListDataSource } from './table-list-datasource';
selector: 'app-table-list',
templateUrl: './table-list.component.html',
styleUrls: ['./table-list.component.css'],
standalone: true,
imports: [
MatCard,
MatCardHeader,
MatCardTitleGroup,
MatCardTitle,
MatButton,
MatAnchor,
RouterLink,
MatIcon,
MatCardContent,
MatTable,
CdkDropList,
MatColumnDef,
MatHeaderCellDef,
MatHeaderCell,
MatCellDef,
MatCell,
MatHeaderRowDef,
MatHeaderRow,
MatRowDef,
MatRow,
CdkDrag,
],
})
export class TableListComponent implements OnInit {
@ViewChild('table', { static: true }) table?: MatTable<MenuCategory>;
@ -44,14 +82,14 @@ export class TableListComponent implements OnInit {
}
updateSortOrder() {
this.ser.updateSortOrder(this.list).subscribe(
() => {
this.ser.updateSortOrder(this.list).subscribe({
next: () => {
this.toaster.show('Success', '');
},
(error) => {
error: (error) => {
this.toaster.show('Error', error);
},
);
});
}
dropTable(event: CdkDragDrop<TableListDataSource>) {