From 92e960d75d3cbb9a788f23fcda85220f5c8c6471 Mon Sep 17 00:00:00 2001 From: Amritanshu Date: Fri, 11 Sep 2026 10:08:26 +0000 Subject: [PATCH] Fix, date picker would not change the date. --- .vscode/launch.json | 21 +++++++++++++++++++ .../employee-functions.component.ts | 4 ++-- 2 files changed, 23 insertions(+), 2 deletions(-) diff --git a/.vscode/launch.json b/.vscode/launch.json index 1a5f7a8d..93e32629 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -29,5 +29,26 @@ "PYTHONUNBUFFERED": "1" } }, + { + "name": "Python: FastAPI (Live Reload)", + "type": "debugpy", + "request": "launch", + "module": "uvicorn", + "args": [ + "brewman.main:app", + "--host", + "0.0.0.0", + "--port", + "9998", + "--reload" + ], + "cwd": "${workspaceFolder}/brewman", + "subProcess": true, + "justMyCode": true, + "envFile": "${workspaceFolder}/.env", + "env": { + "PYTHONUNBUFFERED": "1" + } + } ], } \ No newline at end of file diff --git a/overlord/src/app/employee-functions/employee-functions.component.ts b/overlord/src/app/employee-functions/employee-functions.component.ts index a9ed0cee..f65e834f 100644 --- a/overlord/src/app/employee-functions/employee-functions.component.ts +++ b/overlord/src/app/employee-functions/employee-functions.component.ts @@ -50,14 +50,14 @@ export class EmployeeFunctionsComponent { } chosenYearHandler(normalizedYear: moment.Moment) { - const ctrlValue = this.creditSalaryModel().date ?? moment(); + const ctrlValue = moment(this.creditSalaryModel().date); ctrlValue.year(normalizedYear.year()); ctrlValue.date(ctrlValue.daysInMonth()); this.creditSalaryModel.update((m) => ({ ...m, date: ctrlValue })); } chosenMonthHandler(normlizedMonth: moment.Moment, datepicker: MatDatepicker) { - const ctrlValue = this.creditSalaryModel().date ?? moment(); + const ctrlValue = moment(this.creditSalaryModel().date); ctrlValue.month(normlizedMonth.month()); ctrlValue.date(ctrlValue.daysInMonth()); this.creditSalaryModel.update((m) => ({ ...m, date: ctrlValue }));