Moved from moment to luxon.
Report Printing is not a post not a get.
This commit is contained in:
@@ -8,7 +8,7 @@ import { MatInputModule } from '@angular/material/input';
|
||||
import { MatSlideToggleModule } from '@angular/material/slide-toggle';
|
||||
import { MatSnackBar } from '@angular/material/snack-bar';
|
||||
import { MatTabsModule } from '@angular/material/tabs';
|
||||
import moment from 'moment';
|
||||
import { DateTime } from 'luxon';
|
||||
|
||||
import { environment } from '../app.environment';
|
||||
import { AuthService } from '../auth/auth.service';
|
||||
@@ -68,8 +68,8 @@ export class SettingsComponent {
|
||||
|
||||
runMaintenance() {
|
||||
const formModel = this.formModel();
|
||||
const startDate = moment(formModel.startDate).format('DD-MMM-YYYY');
|
||||
const finishDate = moment(formModel.finishDate).format('DD-MMM-YYYY');
|
||||
const startDate = DateTime.fromJSDate(formModel.startDate).toFormat('dd-MMM-yyyy');
|
||||
const finishDate = DateTime.fromJSDate(formModel.finishDate).toFormat('dd-MMM-yyyy');
|
||||
|
||||
if (!this.beerFile || !this.saleFile) {
|
||||
this.snackBar.open('Please choose both files first!', 'Danger');
|
||||
|
||||
Reference in New Issue
Block a user