Fix: Save account error was because in constructor type did not end in underscore
Fix: Employee save as checking for in None instead of is None Feature: Checking the existing token for validity in constructor of auth service, this should prevent last login showing Feature: Moved the middleware secret key into the env file Chore: Replaced my own GUID() with postgres UUID() type
This commit is contained in:
@ -1,13 +1,13 @@
|
||||
import {AfterViewInit, Component, ElementRef, OnInit, ViewChild} from '@angular/core';
|
||||
import { AfterViewInit, Component, ElementRef, OnInit, ViewChild } from '@angular/core';
|
||||
import { MatPaginator } from '@angular/material/paginator';
|
||||
import { MatSort } from '@angular/material/sort';
|
||||
import {ProductListDataSource} from './product-list-datasource';
|
||||
import {Product} from '../../core/product';
|
||||
import {ActivatedRoute} from '@angular/router';
|
||||
import {debounceTime, distinctUntilChanged, startWith} from 'rxjs/operators';
|
||||
import {FormBuilder, FormGroup} from '@angular/forms';
|
||||
import {Observable} from 'rxjs';
|
||||
import {ToCsvService} from "../../shared/to-csv.service";
|
||||
import { ProductListDataSource } from './product-list-datasource';
|
||||
import { Product } from '../../core/product';
|
||||
import { ActivatedRoute } from '@angular/router';
|
||||
import { debounceTime, distinctUntilChanged, startWith } from 'rxjs/operators';
|
||||
import { FormBuilder, FormGroup } from '@angular/forms';
|
||||
import { Observable } from 'rxjs';
|
||||
import { ToCsvService } from '../../shared/to-csv.service';
|
||||
|
||||
@Component({
|
||||
selector: 'app-product-list',
|
||||
@ -15,6 +15,25 @@ import {ToCsvService} from "../../shared/to-csv.service";
|
||||
styleUrls: ['./product-list.component.css']
|
||||
})
|
||||
export class ProductListComponent implements OnInit, AfterViewInit {
|
||||
|
||||
constructor(private route: ActivatedRoute, private fb: FormBuilder, private toCsv: ToCsvService) {
|
||||
this.showExtended = false;
|
||||
this.createForm();
|
||||
this.filter = this.listenToFilterChange();
|
||||
}
|
||||
|
||||
get showExtended(): boolean {
|
||||
return this._showExtended;
|
||||
}
|
||||
|
||||
set showExtended(value: boolean) {
|
||||
this._showExtended = value;
|
||||
if (value) {
|
||||
this.displayedColumns = ['name', 'costPrice', 'productYield', 'productGroup', 'info'];
|
||||
} else {
|
||||
this.displayedColumns = ['name', 'costPrice', 'productGroup', 'info'];
|
||||
}
|
||||
}
|
||||
@ViewChild('filterElement', { static: true }) filterElement: ElementRef;
|
||||
@ViewChild(MatPaginator, { static: true }) paginator: MatPaginator;
|
||||
@ViewChild(MatSort, { static: true }) sort: MatSort;
|
||||
@ -25,11 +44,7 @@ export class ProductListComponent implements OnInit, AfterViewInit {
|
||||
/** Columns displayed in the table. Columns IDs can be added, removed, or reordered. */
|
||||
displayedColumns: string[];
|
||||
|
||||
constructor(private route: ActivatedRoute, private fb: FormBuilder, private toCsv: ToCsvService) {
|
||||
this.showExtended = false;
|
||||
this.createForm();
|
||||
this.filter = this.listenToFilterChange();
|
||||
}
|
||||
private _showExtended: boolean;
|
||||
|
||||
createForm() {
|
||||
this.form = this.fb.group({
|
||||
@ -60,21 +75,6 @@ export class ProductListComponent implements OnInit, AfterViewInit {
|
||||
}, 0);
|
||||
}
|
||||
|
||||
private _showExtended: boolean;
|
||||
|
||||
get showExtended(): boolean {
|
||||
return this._showExtended;
|
||||
}
|
||||
|
||||
set showExtended(value: boolean) {
|
||||
this._showExtended = value;
|
||||
if (value) {
|
||||
this.displayedColumns = ['name', 'costPrice', 'productYield', 'productGroup', 'info'];
|
||||
} else {
|
||||
this.displayedColumns = ['name', 'costPrice', 'productGroup', 'info'];
|
||||
}
|
||||
}
|
||||
|
||||
exportCsv() {
|
||||
const headers = {
|
||||
Code: 'code',
|
||||
|
||||
Reference in New Issue
Block a user