mirror of
https://github.com/FJurmanovic/wallet-web.git
synced 2026-02-06 14:18:08 +00:00
subscription create dates
This commit is contained in:
@@ -10,6 +10,7 @@ import {
|
||||
import { AppFormElement, InputFieldElement } from 'components/';
|
||||
import { BasePageElement } from 'common/';
|
||||
import { AppDropdownElement } from 'components/app-dropdown/AppDropdownElement';
|
||||
import dayjs from 'dayjs';
|
||||
|
||||
@controller
|
||||
class SubscriptionCreateElement extends BasePageElement {
|
||||
@@ -113,14 +114,22 @@ class SubscriptionCreateElement extends BasePageElement {
|
||||
customRange,
|
||||
transactionType: transactionTypeId,
|
||||
subscriptionType: subscriptionTypeId,
|
||||
startDate,
|
||||
endDate,
|
||||
} = values;
|
||||
|
||||
const startDateFormat = dayjs(startDate).format();
|
||||
const endDateFormat = dayjs(endDate).format();
|
||||
|
||||
const walletData = this.walletData;
|
||||
|
||||
const formData = {
|
||||
description,
|
||||
amount,
|
||||
customRange: customRange || 0,
|
||||
hasEnd: (this.hasEndCheck?.inp as HTMLInputElement)?.checked,
|
||||
startDate: startDateFormat,
|
||||
endDate: endDateFormat,
|
||||
walletId: walletData && walletData.walletId ? walletData.walletId : walletId,
|
||||
transactionTypeId:
|
||||
walletData && walletData.transactionTypeId ? walletData.transactionTypeId : transactionTypeId,
|
||||
|
||||
Reference in New Issue
Block a user