Removed Recipe Template as it was not needed.

Moved host listeners to the component declaration.
Form submit on Return fixed.
This commit is contained in:
tanshu committed 2026-08-26 06:00:13 +00:00
1 parent fe5e4a2308
commit e3719faddd
79 files changed
+737 -990

No files matched your search

+10 -10
View File
@@ -24,16 +24,16 @@ import { SettingsService } from './settings.service';
import { VoucherTypeService } from './voucher-type.service';
export interface LockInfoFormData {
validFrom: moment.Moment | null;
validTill: moment.Moment | null;
validFrom: Date | null;
validTill: Date | null;
index: number;
lockOlder: boolean;
olderRolling: boolean;
olderDate: moment.Moment;
olderDate: Date;
olderDays: number;
lockNewer: boolean;
newerRolling: boolean;
newerDate: moment.Moment;
newerDate: Date;
newerDays: number;
accountTypes: { accountType: boolean }[];
voucherTypes: { voucherType: boolean }[];
@@ -82,16 +82,16 @@ export class SettingsComponent {
lockInfoModel = linkedSignal({
source: this.lockInfoSource,
computation: (s): LockInfoFormData => ({
validFrom: null as moment.Moment | null,
validTill: null as moment.Moment | null,
validFrom: null as Date | null,
validTill: null as Date | null,
index: 0,
lockOlder: false,
olderRolling: false,
olderDate: moment().date(moment().date(1).daysInMonth()),
olderDate: moment().date(moment().date(1).daysInMonth()).toDate(),
olderDays: 0,
lockNewer: false,
newerRolling: false,
newerDate: moment().date(moment().date(1).daysInMonth()),
newerDate: moment().date(moment().date(1).daysInMonth()).toDate(),
newerDays: 0,
accountTypes: s.accTypes.map(() => ({ accountType: false })),
voucherTypes: s.vchTypes.map(() => ({ voucherType: false })),
@@ -133,13 +133,13 @@ export class SettingsComponent {
if (this.lockOlder() && this.olderRolling()) {
item.start.days = model.olderDays ?? 0;
} else if (this.lockOlder() && !this.olderRolling()) {
item.start.date = (model.olderDate ?? moment()).format('DD-MMM-YYYY');
item.start.date = moment(model.olderDate ?? new Date()).format('DD-MMM-YYYY');
}
if (this.lockNewer() && this.newerRolling()) {
item.finish.days = model.newerDays ?? 0;
}
if (this.lockNewer() && !this.newerRolling()) {
item.finish.date = (model.newerDate ?? moment()).format('DD-MMM-YYYY');
item.finish.date = moment(model.newerDate ?? new Date()).format('DD-MMM-YYYY');
}
this.accountTypes().forEach((at: AccountType, index: number) => {