mirror of
https://github.com/mayswind/ezbookkeeping.git
synced 2026-05-16 07:57:33 +08:00
modify method name
This commit is contained in:
@@ -139,13 +139,13 @@ export function useAccountEditPageBaseBase() {
|
||||
}
|
||||
|
||||
function setAccount(newAccount: Account): void {
|
||||
account.value.from(newAccount);
|
||||
account.value.fillFrom(newAccount);
|
||||
subAccounts.value = [];
|
||||
|
||||
if (newAccount.subAccounts && newAccount.subAccounts.length > 0) {
|
||||
for (let i = 0; i < newAccount.subAccounts.length; i++) {
|
||||
const subAccount = account.value.createNewSubAccount(userStore.currentUserDefaultCurrency, getCurrentUnixTime());
|
||||
subAccount.from(newAccount.subAccounts[i]);
|
||||
const subAccount: Account = account.value.createNewSubAccount(userStore.currentUserDefaultCurrency, getCurrentUnixTime());
|
||||
subAccount.fillFrom(newAccount.subAccounts[i]);
|
||||
|
||||
subAccounts.value.push(subAccount);
|
||||
}
|
||||
|
||||
@@ -151,12 +151,12 @@ export function useUserProfilePageBase() {
|
||||
|
||||
function setCurrentUserProfile(profile: UserBasicInfo): void {
|
||||
emailVerified.value = profile.emailVerified;
|
||||
oldProfile.value.from(profile);
|
||||
newProfile.value.from(oldProfile.value);
|
||||
oldProfile.value.fillFrom(profile);
|
||||
newProfile.value.fillFrom(oldProfile.value);
|
||||
}
|
||||
|
||||
function reset(): void {
|
||||
newProfile.value.from(oldProfile.value);
|
||||
newProfile.value.fillFrom(oldProfile.value);
|
||||
}
|
||||
|
||||
function doAfterProfileUpdate(user: UserBasicInfo): void {
|
||||
|
||||
@@ -279,7 +279,7 @@ function open(options?: { id?: string, currentAccount?: Account, category?: numb
|
||||
submitting.value = false;
|
||||
|
||||
const newAccount = Account.createNewAccount(userStore.currentUserDefaultCurrency, getCurrentUnixTime());
|
||||
account.value.from(newAccount);
|
||||
account.value.fillFrom(newAccount);
|
||||
subAccounts.value = [];
|
||||
currentAccountIndex.value = -1;
|
||||
|
||||
|
||||
@@ -149,18 +149,18 @@ function open(options: { id?: string; parentId?: string; type?: CategoryType; cu
|
||||
submitting.value = false;
|
||||
|
||||
const newTransactionCategory = TransactionCategory.createNewCategory();
|
||||
category.value.from(newTransactionCategory);
|
||||
category.value.fillFrom(newTransactionCategory);
|
||||
|
||||
if (options.id) {
|
||||
if (options.currentCategory) {
|
||||
category.value.from(options.currentCategory);
|
||||
category.value.fillFrom(options.currentCategory);
|
||||
}
|
||||
|
||||
editCategoryId.value = options.id;
|
||||
transactionCategoriesStore.getCategory({
|
||||
categoryId: editCategoryId.value
|
||||
}).then(response => {
|
||||
category.value.from(response);
|
||||
category.value.fillFrom(response);
|
||||
loading.value = false;
|
||||
}).catch(error => {
|
||||
loading.value = false;
|
||||
|
||||
@@ -718,7 +718,7 @@ function open(options: TransactionEditOptions): Promise<TransactionEditResponse
|
||||
if (options && options.id) {
|
||||
if (options.currentTemplate) {
|
||||
setTransaction(options.currentTemplate, options, false, false);
|
||||
(transaction.value as TransactionTemplate).from(options.currentTemplate);
|
||||
(transaction.value as TransactionTemplate).fillFrom(options.currentTemplate);
|
||||
}
|
||||
|
||||
mode.value = TransactionEditPageMode.Edit;
|
||||
@@ -768,7 +768,7 @@ function open(options: TransactionEditOptions): Promise<TransactionEditResponse
|
||||
transaction.value = TransactionTemplate.createNewTransactionTemplate(transaction.value);
|
||||
}
|
||||
|
||||
(transaction.value as TransactionTemplate).from(template);
|
||||
(transaction.value as TransactionTemplate).fillFrom(template);
|
||||
} else {
|
||||
setTransaction(null, options, true, true);
|
||||
}
|
||||
|
||||
@@ -209,7 +209,7 @@ function init(): void {
|
||||
transactionCategoriesStore.getCategory({
|
||||
categoryId: editCategoryId.value
|
||||
}).then(response => {
|
||||
category.value.from(response);
|
||||
category.value.fillFrom(response);
|
||||
loading.value = false;
|
||||
}).catch(error => {
|
||||
if (error.processed) {
|
||||
|
||||
@@ -955,7 +955,7 @@ function init(): void {
|
||||
transaction.value = TransactionTemplate.createNewTransactionTemplate(transaction.value);
|
||||
}
|
||||
|
||||
(transaction.value as TransactionTemplate).from(template);
|
||||
(transaction.value as TransactionTemplate).fillFrom(template);
|
||||
}
|
||||
|
||||
loading.value = false;
|
||||
|
||||
Reference in New Issue
Block a user