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:
@@ -25,7 +25,7 @@ import { MozimoDailyRegisterItem } from './mozimo-daily-register-item';
|
||||
import { MozimoDailyRegisterService } from './mozimo-daily-register.service';
|
||||
|
||||
export interface MozimoDailyRegisterFormData {
|
||||
date: moment.Moment;
|
||||
date: Date;
|
||||
items: {
|
||||
received: number;
|
||||
sale: number;
|
||||
@@ -79,7 +79,7 @@ export class MozimoDailyRegisterComponent {
|
||||
model = linkedSignal({
|
||||
source: this.info,
|
||||
computation: (v): MozimoDailyRegisterFormData => ({
|
||||
date: moment(v.date, 'DD-MMM-YYYY'),
|
||||
date: moment(v.date, 'DD-MMM-YYYY').toDate(),
|
||||
items: v.body.map((x) => ({
|
||||
received: x.received,
|
||||
sale: x.sale,
|
||||
@@ -129,7 +129,7 @@ export class MozimoDailyRegisterComponent {
|
||||
getMozimoDailyRegister(): MozimoDailyRegister {
|
||||
const formModel = this.model();
|
||||
const info = this.info();
|
||||
info.date = formModel.date.format('DD-MMM-YYYY');
|
||||
info.date = moment(formModel.date).format('DD-MMM-YYYY');
|
||||
|
||||
const array = formModel.items;
|
||||
if (array) {
|
||||
|
||||
Reference in New Issue
Block a user