Chore: Moved from css to sass, god knows what to do now.

Chore: Prettier line length changed to 120 from 100
Fix: Hard coded the face as the primary color to make the buttons stand out
This commit is contained in:
2023-03-13 23:52:44 +05:30
parent b021861ba3
commit efa2af396d
123 changed files with 313 additions and 836 deletions

View File

@ -7,10 +7,7 @@ import { MAT_DIALOG_DATA, MatDialogRef } from '@angular/material/dialog';
styleUrls: ['./image-dialog.component.css'],
})
export class ImageDialogComponent {
constructor(
public dialogRef: MatDialogRef<ImageDialogComponent>,
@Inject(MAT_DIALOG_DATA) public data: string,
) {}
constructor(public dialogRef: MatDialogRef<ImageDialogComponent>, @Inject(MAT_DIALOG_DATA) public data: string) {}
close(): void {
this.dialogRef.close();

View File

@ -10,9 +10,7 @@ export class LocalTimePipe implements PipeTransform {
return '';
}
if (value.length === 5) {
return moment(value, 'HH:mm')
.subtract(new Date().getTimezoneOffset(), 'minutes')
.format('HH:mm');
return moment(value, 'HH:mm').subtract(new Date().getTimezoneOffset(), 'minutes').format('HH:mm');
}
return moment(value, 'DD-MMM-YYYY HH:mm')
.subtract(new Date().getTimezoneOffset(), 'minutes')

View File

@ -11,13 +11,7 @@ import { LocalTimePipe } from './local-time.pipe';
@NgModule({
imports: [CommonModule, MatButtonModule, MatDialogModule],
declarations: [
ConfirmDialogComponent,
ImageDialogComponent,
AccountingPipe,
ClearPipe,
LocalTimePipe,
],
declarations: [ConfirmDialogComponent, ImageDialogComponent, AccountingPipe, ClearPipe, LocalTimePipe],
exports: [AccountingPipe, ClearPipe, LocalTimePipe],
})
export class SharedModule {}

View File

@ -11,9 +11,7 @@ export class ToCsvService {
const header = Object.keys(headers);
const replacer = (key: string, value: string | number | null) => (value === null ? '' : value);
const csv = data.map((row) =>
header
.map((fieldName) => JSON.stringify((row as ToCsvType)[headers[fieldName]], replacer))
.join(','),
header.map((fieldName) => JSON.stringify((row as ToCsvType)[headers[fieldName]], replacer)).join(','),
);
csv.unshift(header.join(','));
return csv.join('\r\n');