authentication
This commit is contained in:
51
client/src/app/modules/dashboard/dashboard.component.ts
Normal file
51
client/src/app/modules/dashboard/dashboard.component.ts
Normal file
@@ -0,0 +1,51 @@
|
||||
import { Component } from '@angular/core';
|
||||
import { AgGridAngular } from 'ag-grid-angular';
|
||||
import { ColDef } from 'ag-grid-community'; // Column Definition Type Interface
|
||||
|
||||
@Component({
|
||||
selector: 'app-dashboard',
|
||||
standalone: true,
|
||||
imports: [AgGridAngular],
|
||||
templateUrl: './dashboard.component.html',
|
||||
styleUrl: './dashboard.component.scss'
|
||||
})
|
||||
export class DashboardComponent {
|
||||
|
||||
defaultColDef: ColDef = {
|
||||
flex: 1,
|
||||
editable: true
|
||||
};
|
||||
rowData = [
|
||||
{ make: "Tesla", model: "Model Y", price: 64950, electric: true },
|
||||
{ make: "Ford", model: "F-Series", price: 33850, electric: false },
|
||||
{ make: "Toyota", model: "Corolla", price: 29600, electric: false },
|
||||
{ make: "Tesla", model: "Model Y", price: 64950, electric: true },
|
||||
{ make: "Ford", model: "F-Series", price: 33850, electric: false },
|
||||
{ make: "Toyota", model: "Corolla", price: 29600, electric: false },
|
||||
{ make: "Tesla", model: "Model Y", price: 64950, electric: true },
|
||||
{ make: "Ford", model: "F-Series", price: 33850, electric: false },
|
||||
{ make: "Toyota", model: "Corolla", price: 29600, electric: false },
|
||||
{ make: "Tesla", model: "Model Y", price: 64950, electric: true },
|
||||
];
|
||||
|
||||
// Column Definitions: Defines the columns to be displayed.
|
||||
colDefs: ColDef[] = [
|
||||
{ field: "make" },
|
||||
{
|
||||
field: "model",
|
||||
cellEditor: 'agSelectCellEditor',
|
||||
singleClickEdit: true,
|
||||
cellEditorParams: {
|
||||
values: ['English', 'Spanish', 'French', 'Portuguese', '(other)'],
|
||||
}
|
||||
},
|
||||
{ field: "price", type: 'number'
|
||||
// cellEditor: 'agDateCellEditor',
|
||||
// cellEditorParams: {
|
||||
// min: '2000-01-01',
|
||||
// max: '2019-12-31',
|
||||
// }
|
||||
},
|
||||
{ field: "electric", editable: true }
|
||||
];
|
||||
}
|
||||
Reference in New Issue
Block a user