Skip to content

Commit

Permalink
save
Browse files Browse the repository at this point in the history
  • Loading branch information
anonymous committed Mar 19, 2024
1 parent 6f4fef5 commit 9c301fc
Show file tree
Hide file tree
Showing 7 changed files with 12 additions and 6 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "moneynote-pc",
"version": "1.0.76",
"version": "1.0.77",
"private": true,
"scripts": {
"analyze": "cross-env ANALYZE=1 max build",
Expand Down
1 change: 0 additions & 1 deletion src/locales/en-US/book.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ export default {
'book.label.default.transfer.to.account': 'Default Transfer To Account',
'book.set.default': 'Set as Default',
'book.export': 'Export Transactions',
'book.export.confirm': 'Are you sure?',
'book.export.fail': 'Export failed, please try again later.',

'template.label.previewUrl': 'Preview',
Expand Down
1 change: 1 addition & 0 deletions src/locales/en-US/common.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ export default {
'none': 'None',
'sort': 'Sort',
'convertCurrency': 'To {code}',
'confirm.msg': 'Are you sure?',

'label.name': 'Name',
'label.canExpense': 'Can Expense',
Expand Down
1 change: 0 additions & 1 deletion src/locales/zh-CN/book.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ export default {
'book.label.default.transfer.to.account': '默认转入账户',
'book.set.default': '设为默认',
'book.export': '导出账单',
'book.export.confirm': '确认此操作吗?',
'book.export.fail': '导出失败,请稍后重试。',

'template.label.previewUrl': '账本结构',
Expand Down
1 change: 1 addition & 0 deletions src/locales/zh-CN/common.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ export default {
'none': '无',
'sort': '排序',
'convertCurrency': '折合{code}',
'confirm.msg': '确认此操作吗?',

'label.name': '名称',
'label.canExpense': '可支出',
Expand Down
10 changes: 8 additions & 2 deletions src/pages/BalanceFlow/DataTable.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -99,9 +99,15 @@ export default () => {
}
};

const confirmMsg = t('confirm.msg');
const confirmHandler = async (record) => {
await confirm(record.id);
successHandler();
Modal.confirm({
title: confirmMsg,
onOk: async () => {
await confirm(record.id);
successHandler();
}
});
};

const messageDeleteConfirm = t('delete.confirm');
Expand Down
2 changes: 1 addition & 1 deletion src/pages/Book/DataTable.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ export default () => {
const [exportingBook, setExportingBook] = useState();
const exportFlowHandler = async (record) => {
const messageFailExport = intl.formatMessage({ id: 'book.export.fail' });
const messageConfirmExport = intl.formatMessage({ id: 'book.export.confirm' });
const messageConfirmExport = intl.formatMessage({ id: 'confirm.msg' });
Modal.confirm({
title: messageConfirmExport,
onOk: async () => {
Expand Down

0 comments on commit 9c301fc

Please sign in to comment.