diff --git a/cmd/webserver.go b/cmd/webserver.go index 1d57096c..230a914a 100644 --- a/cmd/webserver.go +++ b/cmd/webserver.go @@ -395,6 +395,9 @@ func startWebServer(c *core.CliContext) error { apiV1Route.POST("/transactions/modify.json", bindApi(api.Transactions.TransactionModifyHandler)) apiV1Route.POST("/transactions/batch_update/category.json", bindApi(api.Transactions.TransactionBatchUpdateCategoriesHandler)) apiV1Route.POST("/transactions/batch_update/account.json", bindApi(api.Transactions.TransactionBatchUpdateAccountsHandler)) + apiV1Route.POST("/transactions/batch_update/tag/add.json", bindApi(api.Transactions.TransactionBatchAddTagsHandler)) + apiV1Route.POST("/transactions/batch_update/tag/remove.json", bindApi(api.Transactions.TransactionBatchRemoveTagsHandler)) + apiV1Route.POST("/transactions/batch_update/tag/clear.json", bindApi(api.Transactions.TransactionBatchClearTagsHandler)) apiV1Route.POST("/transactions/move/all.json", bindApi(api.Transactions.TransactionMoveAllBetweenAccountsHandler)) apiV1Route.POST("/transactions/delete.json", bindApi(api.Transactions.TransactionDeleteHandler)) apiV1Route.POST("/transactions/batch_delete.json", bindApi(api.Transactions.TransactionBatchDeleteHandler)) diff --git a/pkg/api/transactions.go b/pkg/api/transactions.go index 051dcdf9..aea49cc0 100644 --- a/pkg/api/transactions.go +++ b/pkg/api/transactions.go @@ -1588,6 +1588,291 @@ func (a *TransactionsApi) TransactionBatchUpdateAccountsHandler(c *core.WebConte return true, nil } +// TransactionBatchAddTagsHandler batch add tags to transactions by request parameters for current user +func (a *TransactionsApi) TransactionBatchAddTagsHandler(c *core.WebContext) (any, *errs.Error) { + var transactionBatchUpdateReq models.TransactionBatchAddTagsRequest + err := c.ShouldBindJSON(&transactionBatchUpdateReq) + + if err != nil { + log.Warnf(c, "[transactions.TransactionBatchAddTagsHandler] parse request failed, because %s", err.Error()) + return nil, errs.NewIncompleteOrIncorrectSubmissionError(err) + } + + clientTimezone, err := c.GetClientTimezone() + + if err != nil { + log.Warnf(c, "[transactions.TransactionBatchAddTagsHandler] cannot get client timezone, because %s", err.Error()) + return nil, errs.ErrClientTimezoneOffsetInvalid + } + + transactionIds, err := utils.StringArrayToInt64Array(transactionBatchUpdateReq.TransactionIds) + + if err != nil { + log.Warnf(c, "[transactions.TransactionBatchAddTagsHandler] parse transaction ids failed, because %s", err.Error()) + return nil, errs.ErrTransactionIdInvalid + } + + tagIds, err := utils.StringArrayToInt64Array(transactionBatchUpdateReq.TagIds) + + if err != nil { + log.Warnf(c, "[transactions.TransactionBatchAddTagsHandler] parse tag ids failed, because %s", err.Error()) + return nil, errs.ErrTransactionTagIdInvalid + } + + tagIds = utils.ToUniqueInt64Slice(tagIds) + + uid := c.GetCurrentUid() + user, err := a.users.GetUserById(c, uid) + + if err != nil { + if !errs.IsCustomError(err) { + log.Errorf(c, "[transactions.TransactionBatchAddTagsHandler] failed to get user, because %s", err.Error()) + } + + return nil, errs.ErrUserNotFound + } + + tags, err := a.transactionTags.GetTagsByTagIds(c, uid, tagIds) + + if err != nil { + log.Errorf(c, "[transactions.TransactionBatchAddTagsHandler] failed to get tags for user \"uid:%d\", because %s", uid, err.Error()) + return nil, errs.Or(err, errs.ErrOperationFailed) + } + + if len(tags) != len(tagIds) { + log.Warnf(c, "[transactions.TransactionBatchAddTagsHandler] some tags do not exist for user \"uid:%d\"", uid) + return nil, errs.ErrTransactionTagNotFound + } + + transactions, err := a.transactions.GetTransactionsByTransactionIds(c, uid, transactionIds) + + if err != nil { + log.Errorf(c, "[transactions.TransactionBatchAddTagsHandler] failed to get transactions for user \"uid:%d\", because %s", uid, err.Error()) + return nil, errs.Or(err, errs.ErrOperationFailed) + } + + transactionTagIndexes, err := a.transactionTags.GetAllTagIdsOfTransactions(c, uid, transactionIds) + + if err != nil { + log.Errorf(c, "[transactions.TransactionBatchAddTagsHandler] failed to get transactions tag indexes for user \"uid:%d\", because %s", uid, err.Error()) + return nil, errs.Or(err, errs.ErrOperationFailed) + } + + allNewTransactionTagIndexes := make(map[int64][]int64, len(transactions)) + + for i := 0; i < len(transactions); i++ { + transaction := transactions[i] + + if transaction.Type == models.TRANSACTION_DB_TYPE_TRANSFER_IN { + log.Warnf(c, "[transactions.TransactionBatchAddTagsHandler] cannot modify transaction \"id:%d\" for user \"uid:%d\", because transaction type is transfer in", transaction.TransactionId, uid) + return nil, errs.ErrTransactionTypeInvalid + } + + transactionEditable := user.CanEditTransactionByTransactionTime(transaction.TransactionTime, clientTimezone) + + if !transactionEditable { + log.Warnf(c, "[transactions.TransactionBatchAddTagsHandler] transaction \"id:%d\" is not editable for user \"uid:%d\"", transaction.TransactionId, uid) + return nil, errs.ErrCannotModifyTransactionWithThisTransactionTime + } + + existedTagIds := transactionTagIndexes[transaction.TransactionId] + existedTagIdsMap := make(map[int64]bool, len(existedTagIds)) + + for j := 0; j < len(existedTagIds); j++ { + existedTagIdsMap[existedTagIds[j]] = true + } + + var newTagIds []int64 + + for j := 0; j < len(tagIds); j++ { + tagId := tagIds[j] + + if _, exists := existedTagIdsMap[tagId]; !exists { + newTagIds = append(newTagIds, tagId) + } + } + + allNewTransactionTagIndexes[transaction.TransactionId] = newTagIds + } + + err = a.transactions.BatchAddTagsToTransactions(c, uid, transactions, allNewTransactionTagIndexes) + + if err != nil { + log.Errorf(c, "[transactions.TransactionBatchAddTagsHandler] failed to batch update transactions tags for user \"uid:%d\", because %s", uid, err.Error()) + return nil, errs.Or(err, errs.ErrOperationFailed) + } + + log.Infof(c, "[transactions.TransactionBatchAddTagsHandler] user \"uid:%d\" has batch updated tag of %d transactions successfully", uid, len(allNewTransactionTagIndexes)) + return true, nil +} + +// TransactionBatchRemoveTagsHandler batch remove tags from transactions by request parameters for current user +func (a *TransactionsApi) TransactionBatchRemoveTagsHandler(c *core.WebContext) (any, *errs.Error) { + var transactionBatchUpdateReq models.TransactionBatchRemoveTagsRequest + err := c.ShouldBindJSON(&transactionBatchUpdateReq) + + if err != nil { + log.Warnf(c, "[transactions.TransactionBatchRemoveTagsHandler] parse request failed, because %s", err.Error()) + return nil, errs.NewIncompleteOrIncorrectSubmissionError(err) + } + + clientTimezone, err := c.GetClientTimezone() + + if err != nil { + log.Warnf(c, "[transactions.TransactionBatchRemoveTagsHandler] cannot get client timezone, because %s", err.Error()) + return nil, errs.ErrClientTimezoneOffsetInvalid + } + + transactionIds, err := utils.StringArrayToInt64Array(transactionBatchUpdateReq.TransactionIds) + + if err != nil { + log.Warnf(c, "[transactions.TransactionBatchRemoveTagsHandler] parse transaction ids failed, because %s", err.Error()) + return nil, errs.ErrTransactionIdInvalid + } + + tagIds, err := utils.StringArrayToInt64Array(transactionBatchUpdateReq.TagIds) + + if err != nil { + log.Warnf(c, "[transactions.TransactionBatchRemoveTagsHandler] parse tag ids failed, because %s", err.Error()) + return nil, errs.ErrTransactionTagIdInvalid + } + + tagIds = utils.ToUniqueInt64Slice(tagIds) + + uid := c.GetCurrentUid() + user, err := a.users.GetUserById(c, uid) + + if err != nil { + if !errs.IsCustomError(err) { + log.Errorf(c, "[transactions.TransactionBatchRemoveTagsHandler] failed to get user, because %s", err.Error()) + } + + return nil, errs.ErrUserNotFound + } + + tags, err := a.transactionTags.GetTagsByTagIds(c, uid, tagIds) + + if err != nil { + log.Errorf(c, "[transactions.TransactionBatchRemoveTagsHandler] failed to get tags for user \"uid:%d\", because %s", uid, err.Error()) + return nil, errs.Or(err, errs.ErrOperationFailed) + } + + if len(tags) != len(tagIds) { + log.Warnf(c, "[transactions.TransactionBatchRemoveTagsHandler] some tags do not exist for user \"uid:%d\"", uid) + return nil, errs.ErrTransactionTagNotFound + } + + transactions, err := a.transactions.GetTransactionsByTransactionIds(c, uid, transactionIds) + + if err != nil { + log.Errorf(c, "[transactions.TransactionBatchRemoveTagsHandler] failed to get transactions for user \"uid:%d\", because %s", uid, err.Error()) + return nil, errs.Or(err, errs.ErrOperationFailed) + } + + allTransactionIds := make([]int64, 0, len(transactions)) + + for i := 0; i < len(transactions); i++ { + transaction := transactions[i] + + if transaction.Type == models.TRANSACTION_DB_TYPE_TRANSFER_IN { + log.Warnf(c, "[transactions.TransactionBatchRemoveTagsHandler] cannot modify transaction \"id:%d\" for user \"uid:%d\", because transaction type is transfer in", transaction.TransactionId, uid) + return nil, errs.ErrTransactionTypeInvalid + } + + transactionEditable := user.CanEditTransactionByTransactionTime(transaction.TransactionTime, clientTimezone) + + if !transactionEditable { + log.Warnf(c, "[transactions.TransactionBatchRemoveTagsHandler] transaction \"id:%d\" is not editable for user \"uid:%d\"", transaction.TransactionId, uid) + return nil, errs.ErrCannotModifyTransactionWithThisTransactionTime + } + + allTransactionIds = append(allTransactionIds, transaction.TransactionId) + } + + err = a.transactions.BatchRemoveTagsFromTransactions(c, uid, allTransactionIds, tagIds) + + if err != nil { + log.Errorf(c, "[transactions.TransactionBatchRemoveTagsHandler] failed to batch update transactions tags for user \"uid:%d\", because %s", uid, err.Error()) + return nil, errs.Or(err, errs.ErrOperationFailed) + } + + log.Infof(c, "[transactions.TransactionBatchRemoveTagsHandler] user \"uid:%d\" has batch updated tag of %d transactions successfully", uid, len(allTransactionIds)) + return true, nil +} + +// TransactionBatchClearTagsHandler batch clear all tags from transactions by request parameters for current user +func (a *TransactionsApi) TransactionBatchClearTagsHandler(c *core.WebContext) (any, *errs.Error) { + var transactionBatchUpdateReq models.TransactionBatchClearTagsRequest + err := c.ShouldBindJSON(&transactionBatchUpdateReq) + + if err != nil { + log.Warnf(c, "[transactions.TransactionBatchClearTagsHandler] parse request failed, because %s", err.Error()) + return nil, errs.NewIncompleteOrIncorrectSubmissionError(err) + } + + clientTimezone, err := c.GetClientTimezone() + + if err != nil { + log.Warnf(c, "[transactions.TransactionBatchClearTagsHandler] cannot get client timezone, because %s", err.Error()) + return nil, errs.ErrClientTimezoneOffsetInvalid + } + + transactionIds, err := utils.StringArrayToInt64Array(transactionBatchUpdateReq.TransactionIds) + + if err != nil { + log.Warnf(c, "[transactions.TransactionBatchClearTagsHandler] parse transaction ids failed, because %s", err.Error()) + return nil, errs.ErrTransactionIdInvalid + } + + uid := c.GetCurrentUid() + user, err := a.users.GetUserById(c, uid) + + if err != nil { + if !errs.IsCustomError(err) { + log.Errorf(c, "[transactions.TransactionBatchClearTagsHandler] failed to get user, because %s", err.Error()) + } + + return nil, errs.ErrUserNotFound + } + + transactions, err := a.transactions.GetTransactionsByTransactionIds(c, uid, transactionIds) + + if err != nil { + log.Errorf(c, "[transactions.TransactionBatchClearTagsHandler] failed to get transactions for user \"uid:%d\", because %s", uid, err.Error()) + return nil, errs.Or(err, errs.ErrOperationFailed) + } + + allTransactionIds := make([]int64, 0, len(transactions)) + + for i := 0; i < len(transactions); i++ { + transaction := transactions[i] + + if transaction.Type == models.TRANSACTION_DB_TYPE_TRANSFER_IN { + log.Warnf(c, "[transactions.TransactionBatchClearTagsHandler] cannot modify transaction \"id:%d\" for user \"uid:%d\", because transaction type is transfer in", transaction.TransactionId, uid) + return nil, errs.ErrTransactionTypeInvalid + } + + transactionEditable := user.CanEditTransactionByTransactionTime(transaction.TransactionTime, clientTimezone) + + if !transactionEditable { + log.Warnf(c, "[transactions.TransactionBatchClearTagsHandler] transaction \"id:%d\" is not editable for user \"uid:%d\"", transaction.TransactionId, uid) + return nil, errs.ErrCannotModifyTransactionWithThisTransactionTime + } + + allTransactionIds = append(allTransactionIds, transaction.TransactionId) + } + + err = a.transactions.BatchClearAllTagsFromTransactions(c, uid, allTransactionIds) + + if err != nil { + log.Errorf(c, "[transactions.TransactionBatchClearTagsHandler] failed to batch update transactions tags for user \"uid:%d\", because %s", uid, err.Error()) + return nil, errs.Or(err, errs.ErrOperationFailed) + } + + log.Infof(c, "[transactions.TransactionBatchClearTagsHandler] user \"uid:%d\" has batch updated tag of %d transactions successfully", uid, len(allTransactionIds)) + return true, nil +} + // TransactionMoveAllBetweenAccountsHandler moves all transactions from one account to another account for current user func (a *TransactionsApi) TransactionMoveAllBetweenAccountsHandler(c *core.WebContext) (any, *errs.Error) { var transactionMoveReq models.TransactionMoveBetweenAccountsRequest diff --git a/pkg/errs/transaction.go b/pkg/errs/transaction.go index 725a6b79..df2d29c2 100644 --- a/pkg/errs/transaction.go +++ b/pkg/errs/transaction.go @@ -45,4 +45,5 @@ var ( ErrCannotMoveTransactionFromOrToHiddenAccount = NewNormalError(NormalSubcategoryTransaction, 38, http.StatusBadRequest, "cannot move transaction from or to hidden account") ErrCannotMoveTransactionFromOrToParentAccount = NewNormalError(NormalSubcategoryTransaction, 39, http.StatusBadRequest, "cannot move transaction from or to parent account") ErrCannotMoveTransactionBetweenAccountsWithDifferentCurrencies = NewNormalError(NormalSubcategoryTransaction, 40, http.StatusBadRequest, "cannot move transaction between accounts with different currencies") + ErrCannotAddTagsToTooManyTransactionsOneTime = NewNormalError(NormalSubcategoryTransaction, 41, http.StatusBadRequest, "cannot add tags to too many transactions one time") ) diff --git a/pkg/models/transaction.go b/pkg/models/transaction.go index fc1ca3b6..fd36d50c 100644 --- a/pkg/models/transaction.go +++ b/pkg/models/transaction.go @@ -327,17 +327,34 @@ type TransactionGetRequest struct { // TransactionBatchUpdateCategoryRequest represents all parameters of transaction batch update category request type TransactionBatchUpdateCategoryRequest struct { - TransactionIds []string `json:"transactionIds,string" binding:"required"` + TransactionIds []string `json:"transactionIds" binding:"required"` CategoryId int64 `json:"categoryId,string" binding:"required"` } // TransactionBatchUpdateAccountRequest represents all parameters of transaction batch update account request type TransactionBatchUpdateAccountRequest struct { - TransactionIds []string `json:"transactionIds,string" binding:"required"` + TransactionIds []string `json:"transactionIds" binding:"required"` AccountId int64 `json:"accountId,string" binding:"required"` IsDestinationAccount bool `json:"isDestinationAccount"` } +// TransactionBatchAddTagsRequest represents all parameters of transaction batch add tags request +type TransactionBatchAddTagsRequest struct { + TransactionIds []string `json:"transactionIds" binding:"required"` + TagIds []string `json:"tagIds" binding:"required"` +} + +// TransactionBatchRemoveTagsRequest represents all parameters of transaction batch remove tags request +type TransactionBatchRemoveTagsRequest struct { + TransactionIds []string `json:"transactionIds" binding:"required"` + TagIds []string `json:"tagIds" binding:"required"` +} + +// TransactionBatchClearTagsRequest represents all parameters of transaction batch clear tags request +type TransactionBatchClearTagsRequest struct { + TransactionIds []string `json:"transactionIds" binding:"required"` +} + // TransactionMoveBetweenAccountsRequest represents all parameters of moving all transactions between accounts request type TransactionMoveBetweenAccountsRequest struct { FromAccountId int64 `json:"fromAccountId,string" binding:"required,min=1"` diff --git a/pkg/services/transactions.go b/pkg/services/transactions.go index 257ed96b..bf7e130a 100644 --- a/pkg/services/transactions.go +++ b/pkg/services/transactions.go @@ -1033,7 +1033,7 @@ func (s *TransactionService) ModifyTransaction(c core.Context, transaction *mode } // Get and verify tags - err = s.isTagsValid(sess, transaction, transactionTagIndexes, addTagIds) + err = s.isTagsValid(sess, transaction.Uid, transactionTagIndexes, addTagIds) if err != nil { return err @@ -1373,6 +1373,160 @@ func (s *TransactionService) BatchUpdateTransactionsCategory(c core.Context, uid }) } +// BatchAddTagsToTransactions batch adds tags to transactions +func (s *TransactionService) BatchAddTagsToTransactions(c core.Context, uid int64, transactions []*models.Transaction, addTransactionTagIds map[int64][]int64) error { + if uid <= 0 { + return errs.ErrUserIdInvalid + } + + if len(addTransactionTagIds) < 1 { + return errs.ErrTransactionIdInvalid + } + + now := time.Now().Unix() + transactionTagIndexes := make([]*models.TransactionTagIndex, 0, len(addTransactionTagIds)) + transactionsMap := make(map[int64]*models.Transaction, len(transactions)) + transactionTagIdsMap := make(map[int64]bool, 0) + + for i := 0; i < len(transactions); i++ { + transaction := transactions[i] + transactionsMap[transaction.TransactionId] = transaction + } + + for transactionId, tagIds := range addTransactionTagIds { + if transactionId <= 0 { + return errs.ErrTransactionIdInvalid + } + + transaction, exists := transactionsMap[transactionId] + + if !exists || transaction == nil { + return errs.ErrTransactionNotFound + } + + tagIds = utils.ToUniqueInt64Slice(tagIds) + + for i := 0; i < len(tagIds); i++ { + tagId := tagIds[i] + + if tagId <= 0 { + return errs.ErrTransactionTagIdInvalid + } + + transactionTagIndexes = append(transactionTagIndexes, &models.TransactionTagIndex{ + Uid: uid, + Deleted: false, + TransactionTime: transaction.TransactionTime, + TagId: tagId, + TransactionId: transactionId, + CreatedUnixTime: now, + UpdatedUnixTime: now, + }) + + transactionTagIdsMap[tagId] = true + } + } + + tagIndexUuids := s.GenerateUuids(uuid.UUID_TYPE_TAG_INDEX, uint16(len(transactionTagIndexes))) + + if len(tagIndexUuids) < len(transactionTagIndexes) { + return errs.ErrCannotAddTagsToTooManyTransactionsOneTime + } + + for i := 0; i < len(transactionTagIndexes); i++ { + transactionTagIndexes[i].TagIndexId = tagIndexUuids[i] + } + + tagIds := make([]int64, 0, len(transactionTagIdsMap)) + + for tagId := range transactionTagIdsMap { + tagIds = append(tagIds, tagId) + } + + return s.UserDataDB(uid).DoTransaction(c, func(sess *xorm.Session) error { + // Get and verify tags + err := s.isTagsValid(sess, uid, transactionTagIndexes, tagIds) + + if err != nil { + return err + } + + for i := 0; i < len(transactionTagIndexes); i++ { + transactionTagIndex := transactionTagIndexes[i] + _, err := sess.Insert(transactionTagIndex) + + if err != nil { + return err + } + } + + return nil + }) +} + +// BatchRemoveTagsFromTransactions batch removes tags from transactions +func (s *TransactionService) BatchRemoveTagsFromTransactions(c core.Context, uid int64, transactionIds []int64, tagIds []int64) error { + if uid <= 0 { + return errs.ErrUserIdInvalid + } + + if len(transactionIds) < 1 { + return errs.ErrTransactionIdInvalid + } + + uniqueTransactionIds := utils.ToUniqueInt64Slice(transactionIds) + uniqueTagIds := utils.ToUniqueInt64Slice(tagIds) + now := time.Now().Unix() + + tagIndexUpdateModel := &models.TransactionTagIndex{ + Deleted: true, + DeletedUnixTime: now, + } + + return s.UserDataDB(uid).DoTransaction(c, func(sess *xorm.Session) error { + deletedRows, err := sess.Cols("deleted", "deleted_unix_time").Where("uid=? AND deleted=?", uid, false).In("transaction_id", uniqueTransactionIds).In("tag_id", uniqueTagIds).Update(tagIndexUpdateModel) + + if err != nil { + return err + } else if deletedRows < 1 { + return errs.ErrTransactionTagNotFound + } + + return nil + }) +} + +// BatchClearAllTagsFromTransactions batch clears all tags from transactions +func (s *TransactionService) BatchClearAllTagsFromTransactions(c core.Context, uid int64, transactionIds []int64) error { + if uid <= 0 { + return errs.ErrUserIdInvalid + } + + if len(transactionIds) < 1 { + return errs.ErrTransactionIdInvalid + } + + uniqueTransactionIds := utils.ToUniqueInt64Slice(transactionIds) + now := time.Now().Unix() + + tagIndexUpdateModel := &models.TransactionTagIndex{ + Deleted: true, + DeletedUnixTime: now, + } + + return s.UserDataDB(uid).DoTransaction(c, func(sess *xorm.Session) error { + deletedRows, err := sess.Cols("deleted", "deleted_unix_time").Where("uid=? AND deleted=?", uid, false).In("transaction_id", uniqueTransactionIds).Update(tagIndexUpdateModel) + + if err != nil { + return err + } else if deletedRows < 1 { + return errs.ErrTransactionTagNotFound + } + + return nil + }) +} + // MoveAllTransactionsBetweenAccounts moves all transactions from one account to another account, and combine balance modification transactions if necessary func (s *TransactionService) MoveAllTransactionsBetweenAccounts(c core.Context, uid int64, fromAccountId int64, toAccountId int64) error { if uid <= 0 { @@ -2317,7 +2471,7 @@ func (s *TransactionService) doCreateTransaction(c core.Context, database *datas } // Get and verify tags - err = s.isTagsValid(sess, transaction, transactionTagIndexes, tagIds) + err = s.isTagsValid(sess, transaction.Uid, transactionTagIndexes, tagIds) if err != nil { return err @@ -2954,10 +3108,10 @@ func (s *TransactionService) isCategoryValid(sess *xorm.Session, transaction *mo return nil } -func (s *TransactionService) isTagsValid(sess *xorm.Session, transaction *models.Transaction, transactionTagIndexes []*models.TransactionTagIndex, tagIds []int64) error { +func (s *TransactionService) isTagsValid(sess *xorm.Session, uid int64, transactionTagIndexes []*models.TransactionTagIndex, tagIds []int64) error { if len(transactionTagIndexes) > 0 { var tags []*models.TransactionTag - err := sess.Where("uid=? AND deleted=?", transaction.Uid, false).In("tag_id", tagIds).Find(&tags) + err := sess.Where("uid=? AND deleted=?", uid, false).In("tag_id", tagIds).Find(&tags) if err != nil { return err diff --git a/src/lib/services.ts b/src/lib/services.ts index 4462052c..e47f540d 100644 --- a/src/lib/services.ts +++ b/src/lib/services.ts @@ -67,6 +67,9 @@ import type { TransactionModifyRequest, TransactionBatchUpdateCategoryRequest, TransactionBatchUpdateAccountRequest, + TransactionBatchAddTagsRequest, + TransactionBatchRemoveTagsRequest, + TransactionBatchClearTagsRequest, TransactionMoveBetweenAccountsRequest, TransactionDeleteRequest, TransactionBatchDeleteRequest, @@ -625,6 +628,21 @@ export default { timeout: DEFAULT_BATCH_UPDATE_TRANSACTIONS_API_TIMEOUT } as ApiRequestConfig); }, + batchAddTagsToTransaction: (req: TransactionBatchAddTagsRequest): ApiResponsePromise => { + return axios.post>('v1/transactions/batch_update/tag/add.json', req, { + timeout: DEFAULT_BATCH_UPDATE_TRANSACTIONS_API_TIMEOUT + } as ApiRequestConfig); + }, + batchRemoveTagsFromTransaction: (req: TransactionBatchRemoveTagsRequest): ApiResponsePromise => { + return axios.post>('v1/transactions/batch_update/tag/remove.json', req, { + timeout: DEFAULT_BATCH_UPDATE_TRANSACTIONS_API_TIMEOUT + } as ApiRequestConfig); + }, + batchClearAllTagsFromTransaction: (req: TransactionBatchClearTagsRequest): ApiResponsePromise => { + return axios.post>('v1/transactions/batch_update/tag/clear.json', req, { + timeout: DEFAULT_BATCH_UPDATE_TRANSACTIONS_API_TIMEOUT + } as ApiRequestConfig); + }, moveAllTransactionsBetweenAccounts: (req: TransactionMoveBetweenAccountsRequest): ApiResponsePromise => { return axios.post>('v1/transactions/move/all.json', req); }, diff --git a/src/locales/de.json b/src/locales/de.json index 19d7fec4..b41bf570 100644 --- a/src/locales/de.json +++ b/src/locales/de.json @@ -141,6 +141,7 @@ "moveTransactionsInAccountTip": "Diese Aktion kann NICHT rückgängig gemacht werden. Alle Transaktionen werden von {fromAccount} nach {toAccount} verschoben.", "clearTransactionsInAccountTip": "Diese Aktion kann NICHT rückgängig gemacht werden. Ihre Transaktionsdaten in {account} werden gelöscht. Bitte geben Sie Ihr aktuelles Passwort zur Bestätigung ein.", "deleteTransactionsTip": "You CANNOT undo this action. This will delete {count} transactions. Please enter your current password to confirm.", + "clearTransactionsTagsTip": "You CANNOT undo this action. This will clear all tags from {count} transactions.", "accountActivationAndResendValidationEmailTip": "Ein Aktivierungslink wurde an Ihre E-Mail-Adresse gesendet: {email}. Wenn Sie die E-Mail nicht erhalten haben, geben Sie bitte das Passwort erneut ein und klicken Sie auf die Schaltfläche unten, um die Bestätigungs-E-Mail erneut zu senden.", "resendValidationEmailTip": "Wenn Sie die E-Mail nicht erhalten haben, geben Sie bitte das Passwort erneut ein und klicken Sie auf die Schaltfläche unten, um die Bestätigungs-E-Mail an: {email} erneut zu senden.", "oauth2bindTip": "Sie melden sich beim Benutzer {userName} mit {providerName} an. Bitte geben Sie Ihr ezBookkeeping-Passwort zur Bestätigung ein." @@ -1195,6 +1196,7 @@ "cannot move transaction from or to hidden account": "Transaktion kann nicht von oder zu einem versteckten Konto verschoben werden", "cannot move transaction from or to parent account": "Transaktion kann nicht von oder zu einem übergeordneten Konto verschoben werden", "cannot move transaction between accounts with different currencies": "Transaktion kann nicht zwischen Konten mit unterschiedlichen Währungen verschoben werden", + "cannot add tags to too many transactions one time": "You cannot add tags to too many transactions one time", "transaction category id is invalid": "Transaktionskategorie-ID ist ungültig", "transaction category not found": "Transaktionskategorie nicht gefunden", "transaction category type is invalid": "Transaktionskategorietyp ist ungültig", @@ -1856,6 +1858,10 @@ "Update Accounts for Transactions": "Update Accounts for Transactions", "Update Destination Accounts for Transactions": "Update Destination Accounts for Transactions", "Unable to update accounts for transactions": "Unable to update accounts for transactions", + "Add Tags to Transactions": "Add Tags to Transactions", + "Remove Tags from Transactions": "Remove Tags from Transactions", + "Clear All Tags from Transactions": "Clear All Tags from Transactions", + "Unable to update tags for transactions": "Unable to update tags for transactions", "Delete Transactions": "Delete Transactions", "Unable to delete these transactions": "Unable to delete these transactions", "Account List": "Kontoliste", diff --git a/src/locales/en.json b/src/locales/en.json index 143c9255..b2c3d5f4 100644 --- a/src/locales/en.json +++ b/src/locales/en.json @@ -141,6 +141,7 @@ "moveTransactionsInAccountTip": "You CANNOT undo this action. This will move all transactions from {fromAccount} to {toAccount}.", "clearTransactionsInAccountTip": "You CANNOT undo this action. This will clear your transactions data in {account}. Please enter your current password to confirm.", "deleteTransactionsTip": "You CANNOT undo this action. This will delete {count} transactions. Please enter your current password to confirm.", + "clearTransactionsTagsTip": "You CANNOT undo this action. This will clear all tags from {count} transactions.", "accountActivationAndResendValidationEmailTip": "Account activation link has been sent to your email address: {email}, If you don't receive the mail, please fill password again and click the button below to resend the validation mail.", "resendValidationEmailTip": "If you don't receive the mail, please fill password again and click the button below to resend the validation mail to: {email}", "oauth2bindTip": "You're signing in to the {userName} user using {providerName}. Please enter your ezBookkeeping password to verify." @@ -1195,6 +1196,7 @@ "cannot move transaction from or to hidden account": "Cannot move transaction from or to hidden account", "cannot move transaction from or to parent account": "Cannot move transaction from or to parent account", "cannot move transaction between accounts with different currencies": "Cannot move transaction between accounts with different currencies", + "cannot add tags to too many transactions one time": "You cannot add tags to too many transactions one time", "transaction category id is invalid": "Transaction category ID is invalid", "transaction category not found": "Transaction category is not found", "transaction category type is invalid": "Transaction category type is invalid", @@ -1856,6 +1858,10 @@ "Update Accounts for Transactions": "Update Accounts for Transactions", "Update Destination Accounts for Transactions": "Update Destination Accounts for Transactions", "Unable to update accounts for transactions": "Unable to update accounts for transactions", + "Add Tags to Transactions": "Add Tags to Transactions", + "Remove Tags from Transactions": "Remove Tags from Transactions", + "Clear All Tags from Transactions": "Clear All Tags from Transactions", + "Unable to update tags for transactions": "Unable to update tags for transactions", "Delete Transactions": "Delete Transactions", "Unable to delete these transactions": "Unable to delete these transactions", "Account List": "Account List", diff --git a/src/locales/es.json b/src/locales/es.json index 8b49c1f5..63b749a6 100644 --- a/src/locales/es.json +++ b/src/locales/es.json @@ -141,6 +141,7 @@ "moveTransactionsInAccountTip": "NO PUEDES deshacer esta acción. Se moverán todas las transacciones de {fromAccount} a {toAccount}.", "clearTransactionsInAccountTip": "NO PUEDES deshacer esta acción. Se eliminarán todas las transacciones de {account}. Por favor introduce tu contraseña para confirmar.", "deleteTransactionsTip": "You CANNOT undo this action. This will delete {count} transactions. Please enter your current password to confirm.", + "clearTransactionsTagsTip": "You CANNOT undo this action. This will clear all tags from {count} transactions.", "accountActivationAndResendValidationEmailTip": "El enlace de activación de la cuenta se envió a tu dirección de correo electrónico: {email}. Si no recibes el correo, introduce nuevamente la contraseña y haz clic en el botón de abajo para reenviar el correo de validación.", "resendValidationEmailTip": "Si no recibes el correo, introduce nuevamente la contraseña y haz clic en el botón de abajo para reenviar el correo de validación a: {email}", "oauth2bindTip": "Estás iniciando sesión con el usuario {userName} usando {providerName}. Porfavor introduce tu contraseña de ezBookkeeping para verificar." @@ -1195,6 +1196,7 @@ "cannot move transaction from or to hidden account": "No se puede mover la transacción desde o hacia una cuenta oculta", "cannot move transaction from or to parent account": "No se puede mover la transacción desde o hacia la cuenta principal", "cannot move transaction between accounts with different currencies": "No se pueden mover transacciones entre cuentas con diferentes monedas", + "cannot add tags to too many transactions one time": "You cannot add tags to too many transactions one time", "transaction category id is invalid": "El ID de categoría de transacción no es válido", "transaction category not found": "No se encuentra la categoría de transacción", "transaction category type is invalid": "El tipo de categoría de transacción no es válido", @@ -1856,6 +1858,10 @@ "Update Accounts for Transactions": "Update Accounts for Transactions", "Update Destination Accounts for Transactions": "Update Destination Accounts for Transactions", "Unable to update accounts for transactions": "Unable to update accounts for transactions", + "Add Tags to Transactions": "Add Tags to Transactions", + "Remove Tags from Transactions": "Remove Tags from Transactions", + "Clear All Tags from Transactions": "Clear All Tags from Transactions", + "Unable to update tags for transactions": "Unable to update tags for transactions", "Delete Transactions": "Delete Transactions", "Unable to delete these transactions": "Unable to delete these transactions", "Account List": "Lista de Cuentas", diff --git a/src/locales/fr.json b/src/locales/fr.json index ad1b25fc..7d4d85a5 100644 --- a/src/locales/fr.json +++ b/src/locales/fr.json @@ -141,6 +141,7 @@ "moveTransactionsInAccountTip": "You CANNOT undo this action. This will move all transactions from {fromAccount} to {toAccount}.", "clearTransactionsInAccountTip": "You CANNOT undo this action. This will clear your transactions data in {account}. Please enter your current password to confirm.", "deleteTransactionsTip": "You CANNOT undo this action. This will delete {count} transactions. Please enter your current password to confirm.", + "clearTransactionsTagsTip": "You CANNOT undo this action. This will clear all tags from {count} transactions.", "accountActivationAndResendValidationEmailTip": "Le lien d'activation du compte a été envoyé à votre adresse e-mail : {email}, Si vous ne recevez pas le mail, veuillez remplir à nouveau le mot de passe et cliquer sur le bouton ci-dessous pour renvoyer l'e-mail de validation.", "resendValidationEmailTip": "Si vous ne recevez pas le mail, veuillez remplir à nouveau le mot de passe et cliquer sur le bouton ci-dessous pour renvoyer l'e-mail de validation à : {email}", "oauth2bindTip": "You're signing in to the {userName} user using {providerName}. Please enter your ezBookkeeping password to verify." @@ -1195,6 +1196,7 @@ "cannot move transaction from or to hidden account": "Cannot move transaction from or to hidden account", "cannot move transaction from or to parent account": "Cannot move transaction from or to parent account", "cannot move transaction between accounts with different currencies": "Cannot move transaction between accounts with different currencies", + "cannot add tags to too many transactions one time": "You cannot add tags to too many transactions one time", "transaction category id is invalid": "L'ID de catégorie de transaction est invalide", "transaction category not found": "Catégorie de transaction non trouvée", "transaction category type is invalid": "Le type de catégorie de transaction est invalide", @@ -1856,6 +1858,10 @@ "Update Accounts for Transactions": "Update Accounts for Transactions", "Update Destination Accounts for Transactions": "Update Destination Accounts for Transactions", "Unable to update accounts for transactions": "Unable to update accounts for transactions", + "Add Tags to Transactions": "Add Tags to Transactions", + "Remove Tags from Transactions": "Remove Tags from Transactions", + "Clear All Tags from Transactions": "Clear All Tags from Transactions", + "Unable to update tags for transactions": "Unable to update tags for transactions", "Delete Transactions": "Delete Transactions", "Unable to delete these transactions": "Unable to delete these transactions", "Account List": "Liste des comptes", diff --git a/src/locales/it.json b/src/locales/it.json index 9a01c88b..aef4e117 100644 --- a/src/locales/it.json +++ b/src/locales/it.json @@ -141,6 +141,7 @@ "moveTransactionsInAccountTip": "You CANNOT undo this action. This will move all transactions from {fromAccount} to {toAccount}.", "clearTransactionsInAccountTip": "You CANNOT undo this action. This will clear your transactions data in {account}. Please enter your current password to confirm.", "deleteTransactionsTip": "You CANNOT undo this action. This will delete {count} transactions. Please enter your current password to confirm.", + "clearTransactionsTagsTip": "You CANNOT undo this action. This will clear all tags from {count} transactions.", "accountActivationAndResendValidationEmailTip": "Abbiamo inviato un link per l'attivazione del tuo account all'indirizzo {email}. Se non hai ricevuto la mail, inserisci nuovamente la password e premi il bottone per ritentare l'invio.", "resendValidationEmailTip": "Se non hai ricevuto la mail, inserisci nuovamente la password e premi il bottone per ritentare l'invio all'indirizzo: {email}", "oauth2bindTip": "You're signing in to the {userName} user using {providerName}. Please enter your ezBookkeeping password to verify." @@ -1195,6 +1196,7 @@ "cannot move transaction from or to hidden account": "Cannot move transaction from or to hidden account", "cannot move transaction from or to parent account": "Cannot move transaction from or to parent account", "cannot move transaction between accounts with different currencies": "Cannot move transaction between accounts with different currencies", + "cannot add tags to too many transactions one time": "You cannot add tags to too many transactions one time", "transaction category id is invalid": "ID categoria transazione non valido", "transaction category not found": "Categoria transazione non trovata", "transaction category type is invalid": "Tipo di categoria transazione non valido", @@ -1856,6 +1858,10 @@ "Update Accounts for Transactions": "Update Accounts for Transactions", "Update Destination Accounts for Transactions": "Update Destination Accounts for Transactions", "Unable to update accounts for transactions": "Unable to update accounts for transactions", + "Add Tags to Transactions": "Add Tags to Transactions", + "Remove Tags from Transactions": "Remove Tags from Transactions", + "Clear All Tags from Transactions": "Clear All Tags from Transactions", + "Unable to update tags for transactions": "Unable to update tags for transactions", "Delete Transactions": "Delete Transactions", "Unable to delete these transactions": "Unable to delete these transactions", "Account List": "Elenco account", diff --git a/src/locales/ja.json b/src/locales/ja.json index 7d9334ef..123e914f 100644 --- a/src/locales/ja.json +++ b/src/locales/ja.json @@ -141,6 +141,7 @@ "moveTransactionsInAccountTip": "You CANNOT undo this action. This will move all transactions from {fromAccount} to {toAccount}.", "clearTransactionsInAccountTip": "You CANNOT undo this action. This will clear your transactions data in {account}. Please enter your current password to confirm.", "deleteTransactionsTip": "You CANNOT undo this action. This will delete {count} transactions. Please enter your current password to confirm.", + "clearTransactionsTagsTip": "You CANNOT undo this action. This will clear all tags from {count} transactions.", "accountActivationAndResendValidationEmailTip": "アカウントの有効化リンクがメールアドレスに送信されました:{email}、メールが届かない場合はパスワードをもう一度入力して下のボタンをクリックして認証メールを再送信してください。", "resendValidationEmailTip": "メールが届かない場合は、パスワードをもう一度入力の上、以下のボタンをクリックして検証メールを再送信してください: {email}", "oauth2bindTip": "You're signing in to the {userName} user using {providerName}. Please enter your ezBookkeeping password to verify." @@ -1195,6 +1196,7 @@ "cannot move transaction from or to hidden account": "Cannot move transaction from or to hidden account", "cannot move transaction from or to parent account": "Cannot move transaction from or to parent account", "cannot move transaction between accounts with different currencies": "Cannot move transaction between accounts with different currencies", + "cannot add tags to too many transactions one time": "You cannot add tags to too many transactions one time", "transaction category id is invalid": "取引カテゴリIDは無効です", "transaction category not found": "取引カテゴリは見つかりません", "transaction category type is invalid": "取引カテゴリタイプは無効です", @@ -1856,6 +1858,10 @@ "Update Accounts for Transactions": "Update Accounts for Transactions", "Update Destination Accounts for Transactions": "Update Destination Accounts for Transactions", "Unable to update accounts for transactions": "Unable to update accounts for transactions", + "Add Tags to Transactions": "Add Tags to Transactions", + "Remove Tags from Transactions": "Remove Tags from Transactions", + "Clear All Tags from Transactions": "Clear All Tags from Transactions", + "Unable to update tags for transactions": "Unable to update tags for transactions", "Delete Transactions": "Delete Transactions", "Unable to delete these transactions": "Unable to delete these transactions", "Account List": "口座リスト", diff --git a/src/locales/kn.json b/src/locales/kn.json index 16312d09..fbcb4db5 100644 --- a/src/locales/kn.json +++ b/src/locales/kn.json @@ -141,6 +141,7 @@ "moveTransactionsInAccountTip": "ಈ ಕ್ರಿಯೆಯನ್ನು ಹಿಂದಕ್ಕೆ ತರಲು ಸಾಧ್ಯವಿಲ್ಲ. ಇದು {fromAccount} ನ ಎಲ್ಲಾ ವಹಿವಾಟುಗಳನ್ನು {toAccount} ಗೆ ಸ್ಥಳಾಂತರಿಸುತ್ತದೆ.", "clearTransactionsInAccountTip": "ಈ ಕ್ರಿಯೆಯನ್ನು ಹಿಂದಕ್ಕೆ ತರಲು ಸಾಧ್ಯವಿಲ್ಲ. ಇದು {account} ನಲ್ಲಿ ನಿಮ್ಮ ಎಲ್ಲಾ ವಹಿವಾಟುಗಳನ್ನು ಅಳಿಸುತ್ತದೆ. ದೃಢೀಕರಿಸಲು ದಯವಿಟ್ಟು ನಿಮ್ಮ ಪ್ರಸ್ತುತ ಪಾಸ್‌ವರ್ಡ್ ನಮೂದಿಸಿ.", "deleteTransactionsTip": "You CANNOT undo this action. This will delete {count} transactions. Please enter your current password to confirm.", + "clearTransactionsTagsTip": "You CANNOT undo this action. This will clear all tags from {count} transactions.", "accountActivationAndResendValidationEmailTip": "ಖಾತೆ ಸಕ್ರಿಯಗೊಳಿಸುವ ಲಿಂಕ್ ಅನ್ನು ನಿಮ್ಮ ಈಮೇಲ್‌ಗೆ ಕಳುಹಿಸಲಾಗಿದೆ: {email}. ನೀವು ಇಮೇಲ್ ಪಡೆಯದಿದ್ದರೆ, ದಯವಿಟ್ಟು ಪಾಸ್‌ವರ್ಡ್ ಮರು ನಮೂದಿಸಿ ಮತ್ತು ಕೆಳಗಿನ ಬಟನ್ ಒತ್ತಿ ಸರೀಕರಿಸುವ ಇಮೇಲ್ ಮರು ಕಳುಹಿಸಿ.", "resendValidationEmailTip": "ನೀವು ಇಮೇಲ್ ಪಡೆಯದಿದ್ದರೆ, ದಯವಿಟ್ಟು ಪಾಸ್‌ವರ್ಡ್ ಮರು ನಮೂದಿಸಿ ಮತ್ತು ಕೆಳಗಿನ ಬಟನ್ ಒತ್ತಿ ಮರು ಸರೀಕರಿಸುವ ಇಮೇಲ್ ಕಳುಹಿಸಲಾಗುವುದು: {email}", "oauth2bindTip": "ನೀವು {providerName} ಬಳಸಿ {userName} ಬಳಕೆದಾರರಾಗಿ ಲಾಗಿನ್ ಆಗುತ್ತಿದ್ದೀರಿ. ದೃಢೀಕರಿಸಲು ದಯವಿಟ್ಟು ನಿಮ್ಮ ezBookkeeping ಪಾಸ್‌ವರ್ಡ್ ನಮೂದಿಸಿ." @@ -1195,6 +1196,7 @@ "cannot move transaction from or to hidden account": "ಗೋಚರಿಸದ ಖಾತೆಯಿಂದ/ಖಾತೆಗೆ ವಹಿವಾಟು ಸ್ಥಳಾಂತರಿಸಲು ಸಾಧ್ಯವಿಲ್ಲ", "cannot move transaction from or to parent account": "ಪೋಷಕ ಖಾತೆಯಿಂದ ಅಥವಾ ಖಾತೆಗೆ ವಹಿವಾಟು ಸ್ಥಳಾಂತರಿಸಲು ಸಾಧ್ಯವಿಲ್ಲ", "cannot move transaction between accounts with different currencies": "ವಿವಿಧ ಕರೆನ್ಸಿಗಳ ಖಾತೆಗಳ ನಡುವೆ ವಹಿವಾಟು ಸ್ಥಳಾಂತರ ಮಾಡಲು ಸಾಧ್ಯವಿಲ್ಲ", + "cannot add tags to too many transactions one time": "You cannot add tags to too many transactions one time", "transaction category id is invalid": "ವಹಿವಾಟು ವರ್ಗ ID ಅಮಾನ್ಯವಾಗಿದೆ", "transaction category not found": "ವಹಿವಾಟು ವರ್ಗ ಸಿಕ್ಕಿಲ್ಲ", "transaction category type is invalid": "ವಹಿವಾಟು ವರ್ಗದ ಪ್ರಕಾರ ಅಮಾನ್ಯವಾಗಿದೆ", @@ -1856,6 +1858,10 @@ "Update Accounts for Transactions": "Update Accounts for Transactions", "Update Destination Accounts for Transactions": "Update Destination Accounts for Transactions", "Unable to update accounts for transactions": "Unable to update accounts for transactions", + "Add Tags to Transactions": "Add Tags to Transactions", + "Remove Tags from Transactions": "Remove Tags from Transactions", + "Clear All Tags from Transactions": "Clear All Tags from Transactions", + "Unable to update tags for transactions": "Unable to update tags for transactions", "Delete Transactions": "Delete Transactions", "Unable to delete these transactions": "Unable to delete these transactions", "Account List": "ಖಾತೆಗಳ ಪಟ್ಟಿ", diff --git a/src/locales/ko.json b/src/locales/ko.json index 99c304de..cb7c0d61 100644 --- a/src/locales/ko.json +++ b/src/locales/ko.json @@ -141,6 +141,7 @@ "moveTransactionsInAccountTip": "이 작업은 되돌릴 수 없습니다. {fromAccount}에서 {toAccount}로 모든 거래를 이동합니다.", "clearTransactionsInAccountTip": "이 작업은 되돌릴 수 없습니다. {account}의 거래 데이터를 지웁니다. 계속하시려면 현재 비밀번호를 입력하세요.", "deleteTransactionsTip": "You CANNOT undo this action. This will delete {count} transactions. Please enter your current password to confirm.", + "clearTransactionsTagsTip": "You CANNOT undo this action. This will clear all tags from {count} transactions.", "accountActivationAndResendValidationEmailTip": "계정 활성화 링크가 귀하의 이메일 주소({email})로 전송되었습니다. 메일을 받지 못하신 경우, 비밀번호를 다시 입력하고 아래 버튼을 클릭하여 확인 메일을 재전송하십시오.", "resendValidationEmailTip": "메일을 받지 못하신 경우, 비밀번호를 다시 입력하고 아래 버튼을 클릭하여 확인 메일을 {email}로 재전송하십시오.", "oauth2bindTip": "{providerName}를 사용하여 {userName} 사용자로 로그인하고 있습니다. 확인을 위해 ezBookkeeping 비밀번호를 입력하세요." @@ -1195,6 +1196,7 @@ "cannot move transaction from or to hidden account": "숨겨진 계좌에서 또는 숨겨진 계좌로 거래를 이동할 수 없습니다.", "cannot move transaction from or to parent account": "상위 계좌에서 또는 상위 계좌로 거래를 이동할 수 없습니다.", "cannot move transaction between accounts with different currencies": "다른 통화를 사용하는 계좌 간에 거래를 이동할 수 없습니다.", + "cannot add tags to too many transactions one time": "You cannot add tags to too many transactions one time", "transaction category id is invalid": "거래 카테고리 ID가 유효하지 않습니다.", "transaction category not found": "거래 카테고리를 찾을 수 없습니다.", "transaction category type is invalid": "거래 카테고리 유형이 유효하지 않습니다.", @@ -1856,6 +1858,10 @@ "Update Accounts for Transactions": "Update Accounts for Transactions", "Update Destination Accounts for Transactions": "Update Destination Accounts for Transactions", "Unable to update accounts for transactions": "Unable to update accounts for transactions", + "Add Tags to Transactions": "Add Tags to Transactions", + "Remove Tags from Transactions": "Remove Tags from Transactions", + "Clear All Tags from Transactions": "Clear All Tags from Transactions", + "Unable to update tags for transactions": "Unable to update tags for transactions", "Delete Transactions": "Delete Transactions", "Unable to delete these transactions": "Unable to delete these transactions", "Account List": "계좌 목록", diff --git a/src/locales/nl.json b/src/locales/nl.json index b834bcd9..15b2aa22 100644 --- a/src/locales/nl.json +++ b/src/locales/nl.json @@ -141,6 +141,7 @@ "moveTransactionsInAccountTip": "You CANNOT undo this action. This will move all transactions from {fromAccount} to {toAccount}.", "clearTransactionsInAccountTip": "You CANNOT undo this action. This will clear your transactions data in {account}. Please enter your current password to confirm.", "deleteTransactionsTip": "You CANNOT undo this action. This will delete {count} transactions. Please enter your current password to confirm.", + "clearTransactionsTagsTip": "You CANNOT undo this action. This will clear all tags from {count} transactions.", "accountActivationAndResendValidationEmailTip": "Een activatielink is verzonden naar je e-mailadres: {email}. Als je de e-mail niet ontvangt, vul dan je wachtwoord opnieuw in en klik op de knop hieronder om de validatiemail opnieuw te verzenden.", "resendValidationEmailTip": "Als je de e-mail niet ontvangt, vul dan je wachtwoord opnieuw in en klik op de knop hieronder om de validatiemail opnieuw te verzenden naar: {email}", "oauth2bindTip": "You're signing in to the {userName} user using {providerName}. Please enter your ezBookkeeping password to verify." @@ -1195,6 +1196,7 @@ "cannot move transaction from or to hidden account": "Cannot move transaction from or to hidden account", "cannot move transaction from or to parent account": "Cannot move transaction from or to parent account", "cannot move transaction between accounts with different currencies": "Cannot move transaction between accounts with different currencies", + "cannot add tags to too many transactions one time": "You cannot add tags to too many transactions one time", "transaction category id is invalid": "Transactiecategorie-ID is ongeldig", "transaction category not found": "Transactiecategorie niet gevonden", "transaction category type is invalid": "Type transactiecategorie is ongeldig", @@ -1856,6 +1858,10 @@ "Update Accounts for Transactions": "Update Accounts for Transactions", "Update Destination Accounts for Transactions": "Update Destination Accounts for Transactions", "Unable to update accounts for transactions": "Unable to update accounts for transactions", + "Add Tags to Transactions": "Add Tags to Transactions", + "Remove Tags from Transactions": "Remove Tags from Transactions", + "Clear All Tags from Transactions": "Clear All Tags from Transactions", + "Unable to update tags for transactions": "Unable to update tags for transactions", "Delete Transactions": "Delete Transactions", "Unable to delete these transactions": "Unable to delete these transactions", "Account List": "Rekeningenlijst", diff --git a/src/locales/pt_BR.json b/src/locales/pt_BR.json index e49b9c7f..5aea997f 100644 --- a/src/locales/pt_BR.json +++ b/src/locales/pt_BR.json @@ -141,6 +141,7 @@ "moveTransactionsInAccountTip": "Você NÃO PODE desfazer esta ação. Isso moverá todas as transações de {fromAccount} para {toAccount}.", "clearTransactionsInAccountTip": "Você NÃO PODE desfazer esta ação. Isso apagará todas as transações em {account}. Por favor, insira sua senha atual para confirmar.", "deleteTransactionsTip": "You CANNOT undo this action. This will delete {count} transactions. Please enter your current password to confirm.", + "clearTransactionsTagsTip": "You CANNOT undo this action. This will clear all tags from {count} transactions.", "accountActivationAndResendValidationEmailTip": "O link de ativação da conta foi enviado para seu endereço de e-mail: {email}. Se você não receber o e-mail, por favor, insira a senha novamente e clique no botão abaixo para reenviar o e-mail de validação.", "resendValidationEmailTip": "Se você não receber o e-mail, por favor, insira a senha novamente e clique no botão abaixo para reenviar o e-mail de validação para: {email}", "oauth2bindTip": "Você está fazendo login como {userName} usando {providerName}. Por favor, insira sua senha do ezBookkeeping para verificar." @@ -1195,6 +1196,7 @@ "cannot move transaction from or to hidden account": "Não é possível mover transação de ou para conta oculta", "cannot move transaction from or to parent account": "Não é possível mover transação de ou para conta principal", "cannot move transaction between accounts with different currencies": "Não é possível mover transação entre contas com moedas diferentes", + "cannot add tags to too many transactions one time": "You cannot add tags to too many transactions one time", "transaction category id is invalid": "ID de categoria de transação é inválido", "transaction category not found": "Categoria de transação não encontrada", "transaction category type is invalid": "Tipo de categoria de transação é inválido", @@ -1856,6 +1858,10 @@ "Update Accounts for Transactions": "Update Accounts for Transactions", "Update Destination Accounts for Transactions": "Update Destination Accounts for Transactions", "Unable to update accounts for transactions": "Unable to update accounts for transactions", + "Add Tags to Transactions": "Add Tags to Transactions", + "Remove Tags from Transactions": "Remove Tags from Transactions", + "Clear All Tags from Transactions": "Clear All Tags from Transactions", + "Unable to update tags for transactions": "Unable to update tags for transactions", "Delete Transactions": "Delete Transactions", "Unable to delete these transactions": "Unable to delete these transactions", "Account List": "Lista de Contas", diff --git a/src/locales/ru.json b/src/locales/ru.json index 94e24754..b6ce8402 100644 --- a/src/locales/ru.json +++ b/src/locales/ru.json @@ -141,6 +141,7 @@ "moveTransactionsInAccountTip": "Вы НЕ сможете отменить это действие. Все транзакции будут перемещены с {fromAccount} на {toAccount}.", "clearTransactionsInAccountTip": "Вы НЕ сможете отменить это действие. Все транзакции будут отчищеы с {account}. Пожалуйста введите пароль.", "deleteTransactionsTip": "You CANNOT undo this action. This will delete {count} transactions. Please enter your current password to confirm.", + "clearTransactionsTagsTip": "You CANNOT undo this action. This will clear all tags from {count} transactions.", "accountActivationAndResendValidationEmailTip": "Ссылка для активации учетной записи была отправлена на ваш электронный адрес: {email}. Если вы не получили письмо, заполните пароль снова и нажмите кнопку ниже, чтобы отправить письмо повторно.", "resendValidationEmailTip": "Если вы не получили письмо, заполните пароль снова и нажмите кнопку ниже, чтобы отправить письмо повторно на: {email}", "oauth2bindTip": "Вы входите как пользователь {userName} используя {providerName}. Пожалуйста введите ваш ezBookkeeping пароль для подтверждения." @@ -1195,6 +1196,7 @@ "cannot move transaction from or to hidden account": "Нельзя переместить транзакцию из/в скрытый счёт", "cannot move transaction from or to parent account": "Нельзя переместить транзакцию из/в родительский счёт", "cannot move transaction between accounts with different currencies": "Нельзя переместить транзакцию между счетами с разными валютами", + "cannot add tags to too many transactions one time": "You cannot add tags to too many transactions one time", "transaction category id is invalid": "ID категории транзакции недействителен", "transaction category not found": "Категория транзакции не найдена", "transaction category type is invalid": "Тип категории транзакции недействителен", @@ -1856,6 +1858,10 @@ "Update Accounts for Transactions": "Update Accounts for Transactions", "Update Destination Accounts for Transactions": "Update Destination Accounts for Transactions", "Unable to update accounts for transactions": "Unable to update accounts for transactions", + "Add Tags to Transactions": "Add Tags to Transactions", + "Remove Tags from Transactions": "Remove Tags from Transactions", + "Clear All Tags from Transactions": "Clear All Tags from Transactions", + "Unable to update tags for transactions": "Unable to update tags for transactions", "Delete Transactions": "Delete Transactions", "Unable to delete these transactions": "Unable to delete these transactions", "Account List": "Список счетов", diff --git a/src/locales/sl.json b/src/locales/sl.json index cfddf552..e2f62ccc 100644 --- a/src/locales/sl.json +++ b/src/locales/sl.json @@ -141,6 +141,7 @@ "moveTransactionsInAccountTip": "Tega dejanja NE MORETE razveljaviti. S tem boste vse transakcije premaknili iz računa {fromAccount} v račun {toAccount}.", "clearTransactionsInAccountTip": "Tega dejanja NE MORETE razveljaviti. S tem boste izbrisali podatke o transakcijah v računu {account}. Za potrditev vnesite trenutno geslo.", "deleteTransactionsTip": "You CANNOT undo this action. This will delete {count} transactions. Please enter your current password to confirm.", + "clearTransactionsTagsTip": "You CANNOT undo this action. This will clear all tags from {count} transactions.", "accountActivationAndResendValidationEmailTip": "Povezava za aktivacijo računa je bila poslana na vaš e-poštni naslov: {email}. Če e-pošte ne prejmete, ponovno vnesite geslo in kliknite spodnji gumb, da ponovno pošljete potrditveno e-pošto.", "resendValidationEmailTip": "Če ne prejmete e-pošte, ponovno vnesite geslo in kliknite spodnji gumb, da ponovno pošljete potrditveno e-pošto na: {email}", "oauth2bindTip": "Prijavljate se v uporabniški račun {userName} z uporabo računa {providerName}. Za potrditev vnesite svoje geslo za ezBookkeeping." @@ -1195,6 +1196,7 @@ "cannot move transaction from or to hidden account": "Transakcije ni mogoče premakniti iz ali v skrit račun", "cannot move transaction from or to parent account": "Transakcije ni mogoče premakniti iz ali v nadrejeni račun", "cannot move transaction between accounts with different currencies": "Transakcij ni mogoče premikati med računi z različnimi valutami", + "cannot add tags to too many transactions one time": "You cannot add tags to too many transactions one time", "transaction category id is invalid": "ID kategorije transakcije ni veljaven", "transaction category not found": "Kategorije transakcije ni mogoče najti", "transaction category type is invalid": "Vrsta kategorije transakcije ni veljavna", @@ -1856,6 +1858,10 @@ "Update Accounts for Transactions": "Update Accounts for Transactions", "Update Destination Accounts for Transactions": "Update Destination Accounts for Transactions", "Unable to update accounts for transactions": "Unable to update accounts for transactions", + "Add Tags to Transactions": "Add Tags to Transactions", + "Remove Tags from Transactions": "Remove Tags from Transactions", + "Clear All Tags from Transactions": "Clear All Tags from Transactions", + "Unable to update tags for transactions": "Unable to update tags for transactions", "Delete Transactions": "Delete Transactions", "Unable to delete these transactions": "Unable to delete these transactions", "Account List": "Seznam računov", diff --git a/src/locales/ta.json b/src/locales/ta.json index d404ab79..05268230 100644 --- a/src/locales/ta.json +++ b/src/locales/ta.json @@ -141,6 +141,7 @@ "moveTransactionsInAccountTip": "இந்த செயலை மீட்டெடுக்க முடியாது. இது {fromAccount} இலிருந்து அனைத்து பரிவர்த்தனைகளையும் {toAccount} க்கு மாற்றும்.", "clearTransactionsInAccountTip": "இந்த செயலை மீட்டெடுக்க முடியாது. இது {account} இல் உள்ள உங்கள் அனைத்து பரிவர்த்தனைகளையும் நீக்கும். உறுதிப்படுத்த உங்கள் தற்போதைய கடவுச்சொல்லை உள்ளிடவும்.", "deleteTransactionsTip": "You CANNOT undo this action. This will delete {count} transactions. Please enter your current password to confirm.", + "clearTransactionsTagsTip": "You CANNOT undo this action. This will clear all tags from {count} transactions.", "accountActivationAndResendValidationEmailTip": "கணக்கு செயல்படுத்தும் இணைப்பு உங்கள் மின்னஞ்சலுக்கு அனுப்பப்பட்டது: {email}. நீங்கள் மின்னஞ்சலைப் பெறவில்லை என்றால், கடவுச்சொல்லை மீண்டும் உள்ளிட்டு கீழே உள்ள பொத்தானை அழுத்தி சரிபார்ப்பு மின்னஞ்சலை மீண்டும் அனுப்பவும்.", "resendValidationEmailTip": "நீங்கள் மின்னஞ்சலைப் பெறவில்லை என்றால், கடவுச்சொல்லை மீண்டும் உள்ளிட்டு கீழே உள்ள பொத்தானை அழுத்தவும், சரிபார்ப்பு மின்னஞ்சல் அனுப்பப்படும்: {email}", "oauth2bindTip": "நீங்கள் {providerName} பயன்படுத்தி {userName} பயனராக உள்நுழைகிறீர்கள். உறுதிப்படுத்த உங்கள் ezBookkeeping கடவுச்சொல்லை உள்ளிடவும்." @@ -1195,6 +1196,7 @@ "cannot move transaction from or to hidden account": "மறைந்த கணக்கிலிருந்து/கணக்கிற்கு பரிவர்த்தனை நகர்த்த முடியாது", "cannot move transaction from or to parent account": "பெற்றோர் கணக்கிலிருந்து அல்லது கணக்கிற்கு பரிவர்த்தனை நகர்த்த முடியாது", "cannot move transaction between accounts with different currencies": "பல்வேறு நாணயம்களின் கணக்குகளின் இடையே பரிவர்த்தனை இடம்மாற்றம் செய்ய முடியாது", + "cannot add tags to too many transactions one time": "You cannot add tags to too many transactions one time", "transaction category id is invalid": "பரிவர்த்தனை வகை ID தவறானது உள்ளது", "transaction category not found": "பரிவர்த்தனை வகை கிடைக்கவில்லை", "transaction category type is invalid": "பரிவர்த்தனை வகையின் வகை தவறானது உள்ளது", @@ -1856,6 +1858,10 @@ "Update Accounts for Transactions": "Update Accounts for Transactions", "Update Destination Accounts for Transactions": "Update Destination Accounts for Transactions", "Unable to update accounts for transactions": "Unable to update accounts for transactions", + "Add Tags to Transactions": "Add Tags to Transactions", + "Remove Tags from Transactions": "Remove Tags from Transactions", + "Clear All Tags from Transactions": "Clear All Tags from Transactions", + "Unable to update tags for transactions": "Unable to update tags for transactions", "Delete Transactions": "Delete Transactions", "Unable to delete these transactions": "Unable to delete these transactions", "Account List": "கணக்குகளின் பட்டியல்", diff --git a/src/locales/th.json b/src/locales/th.json index 71916bdc..48ba8a44 100644 --- a/src/locales/th.json +++ b/src/locales/th.json @@ -141,6 +141,7 @@ "moveTransactionsInAccountTip": "You CANNOT undo this action. This will move all transactions from {fromAccount} to {toAccount}.", "clearTransactionsInAccountTip": "คุณไม่สามารถยกเลิกการกระทำนี้ได้ การกระทำนี้จะลบข้อมูลธุรกรรมทั้งหมดใน {account} โปรดป้อนรหัสผ่านปัจจุบันเพื่อยืนยัน", "deleteTransactionsTip": "You CANNOT undo this action. This will delete {count} transactions. Please enter your current password to confirm.", + "clearTransactionsTagsTip": "You CANNOT undo this action. This will clear all tags from {count} transactions.", "accountActivationAndResendValidationEmailTip": "ลิงก์สำหรับเปิดใช้งานบัญชีได้ถูกส่งไปยังอีเมลของคุณแล้ว: {email} หากคุณไม่ได้รับอีเมล โปรดกรอกรหัสผ่านอีกครั้งแล้วกดปุ่มด้านล่างเพื่อส่งอีเมลยืนยันอีกครั้ง", "resendValidationEmailTip": "หากคุณไม่ได้รับอีเมล โปรดกรอกรหัสผ่านอีกครั้งแล้วกดปุ่มด้านล่างเพื่อส่งอีเมลยืนยันไปยัง: {email}", "oauth2bindTip": "You're signing in to the {userName} user using {providerName}. Please enter your ezBookkeeping password to verify." @@ -1195,6 +1196,7 @@ "cannot move transaction from or to hidden account": "Cannot move transaction from or to hidden account", "cannot move transaction from or to parent account": "Cannot move transaction from or to parent account", "cannot move transaction between accounts with different currencies": "Cannot move transaction between accounts with different currencies", + "cannot add tags to too many transactions one time": "You cannot add tags to too many transactions one time", "transaction category id is invalid": "รหัสหมวดหมู่ธุรกรรมไม่ถูกต้อง", "transaction category not found": "ไม่พบหมวดหมู่ธุรกรรม", "transaction category type is invalid": "ประเภทหมวดหมู่ธุรกรรมไม่ถูกต้อง", @@ -1856,6 +1858,10 @@ "Update Accounts for Transactions": "Update Accounts for Transactions", "Update Destination Accounts for Transactions": "Update Destination Accounts for Transactions", "Unable to update accounts for transactions": "Unable to update accounts for transactions", + "Add Tags to Transactions": "Add Tags to Transactions", + "Remove Tags from Transactions": "Remove Tags from Transactions", + "Clear All Tags from Transactions": "Clear All Tags from Transactions", + "Unable to update tags for transactions": "Unable to update tags for transactions", "Delete Transactions": "Delete Transactions", "Unable to delete these transactions": "Unable to delete these transactions", "Account List": "รายการบัญชี", diff --git a/src/locales/tr.json b/src/locales/tr.json index 6cfca038..4711a923 100644 --- a/src/locales/tr.json +++ b/src/locales/tr.json @@ -141,6 +141,7 @@ "moveTransactionsInAccountTip": "Bu işlem GERİ ALINAMAZ. Bu, {fromAccount} hesabındaki tüm işlemleri {toAccount} hesabına taşıyacaktır.", "clearTransactionsInAccountTip": "Bu işlem GERİ ALINAMAZ. Bu, {account} hesabındaki işlem verilerinizi silecektir. Onaylamak için lütfen mevcut şifrenizi girin.", "deleteTransactionsTip": "You CANNOT undo this action. This will delete {count} transactions. Please enter your current password to confirm.", + "clearTransactionsTagsTip": "You CANNOT undo this action. This will clear all tags from {count} transactions.", "accountActivationAndResendValidationEmailTip": "Hesap aktivasyon bağlantısı e-posta adresinize ({email}) gönderildi. Eğer e-postayı almadıysanız, lütfen şifrenizi tekrar girin ve doğrulama postasını yeniden göndermek için aşağıdaki butona tıklayın.", "resendValidationEmailTip": "Eğer e-postayı almadıysanız, lütfen şifrenizi tekrar girin ve doğrulama postasını şu adrese yeniden göndermek için aşağıdaki butona tıklayın: {email}", "oauth2bindTip": "{providerName} kullanarak {userName} hesabına giriş yapıyorsunuz. Doğrulamak için lütfen ezBookkeeping şifrenizi girin." @@ -1195,6 +1196,7 @@ "cannot move transaction from or to hidden account": "Gizli hesaptan veya gizli hesaba işlem taşınamaz", "cannot move transaction from or to parent account": "Ana hesaptan veya ana hesaba işlem taşınamaz", "cannot move transaction between accounts with different currencies": "Farklı para birimlerine sahip hesaplar arasında işlem taşınamaz", + "cannot add tags to too many transactions one time": "You cannot add tags to too many transactions one time", "transaction category id is invalid": "İşlem kategori ID geçersiz", "transaction category not found": "İşlem kategorisi bulunamadı", "transaction category type is invalid": "İşlem kategori türü geçersiz", @@ -1856,6 +1858,10 @@ "Update Accounts for Transactions": "Update Accounts for Transactions", "Update Destination Accounts for Transactions": "Update Destination Accounts for Transactions", "Unable to update accounts for transactions": "Unable to update accounts for transactions", + "Add Tags to Transactions": "Add Tags to Transactions", + "Remove Tags from Transactions": "Remove Tags from Transactions", + "Clear All Tags from Transactions": "Clear All Tags from Transactions", + "Unable to update tags for transactions": "Unable to update tags for transactions", "Delete Transactions": "Delete Transactions", "Unable to delete these transactions": "Unable to delete these transactions", "Account List": "Hesap Listesi", diff --git a/src/locales/uk.json b/src/locales/uk.json index 36a82c32..d3738126 100644 --- a/src/locales/uk.json +++ b/src/locales/uk.json @@ -141,6 +141,7 @@ "moveTransactionsInAccountTip": "You CANNOT undo this action. This will move all transactions from {fromAccount} to {toAccount}.", "clearTransactionsInAccountTip": "You CANNOT undo this action. This will clear your transactions data in {account}. Please enter your current password to confirm.", "deleteTransactionsTip": "You CANNOT undo this action. This will delete {count} transactions. Please enter your current password to confirm.", + "clearTransactionsTagsTip": "You CANNOT undo this action. This will clear all tags from {count} transactions.", "accountActivationAndResendValidationEmailTip": "Посилання для активації облікового запису було надіслано на вашу електронну адресу: {email}. Якщо ви не отримали лист, введіть пароль ще раз і натисніть кнопку нижче, щоб надіслати лист повторно.", "resendValidationEmailTip": "Якщо ви не отримали лист, введіть пароль ще раз і натисніть кнопку нижче, щоб надіслати лист повторно на адресу: {email}", "oauth2bindTip": "You're signing in to the {userName} user using {providerName}. Please enter your ezBookkeeping password to verify." @@ -1195,6 +1196,7 @@ "cannot move transaction from or to hidden account": "Cannot move transaction from or to hidden account", "cannot move transaction from or to parent account": "Cannot move transaction from or to parent account", "cannot move transaction between accounts with different currencies": "Cannot move transaction between accounts with different currencies", + "cannot add tags to too many transactions one time": "You cannot add tags to too many transactions one time", "transaction category id is invalid": "ID категорії транзакції недійсний", "transaction category not found": "Категорію транзакції не знайдено", "transaction category type is invalid": "Тип категорії транзакції недійсний", @@ -1856,6 +1858,10 @@ "Update Accounts for Transactions": "Update Accounts for Transactions", "Update Destination Accounts for Transactions": "Update Destination Accounts for Transactions", "Unable to update accounts for transactions": "Unable to update accounts for transactions", + "Add Tags to Transactions": "Add Tags to Transactions", + "Remove Tags from Transactions": "Remove Tags from Transactions", + "Clear All Tags from Transactions": "Clear All Tags from Transactions", + "Unable to update tags for transactions": "Unable to update tags for transactions", "Delete Transactions": "Delete Transactions", "Unable to delete these transactions": "Unable to delete these transactions", "Account List": "Список рахунків", diff --git a/src/locales/vi.json b/src/locales/vi.json index 1a56cd44..2791d991 100644 --- a/src/locales/vi.json +++ b/src/locales/vi.json @@ -141,6 +141,7 @@ "moveTransactionsInAccountTip": "You CANNOT undo this action. This will move all transactions from {fromAccount} to {toAccount}.", "clearTransactionsInAccountTip": "You CANNOT undo this action. This will clear your transactions data in {account}. Please enter your current password to confirm.", "deleteTransactionsTip": "You CANNOT undo this action. This will delete {count} transactions. Please enter your current password to confirm.", + "clearTransactionsTagsTip": "You CANNOT undo this action. This will clear all tags from {count} transactions.", "accountActivationAndResendValidationEmailTip": "Liên kết kích hoạt tài khoản đã được gửi tới email của bạn: {email}. Nếu bạn không nhận được email, vui lòng nhập lại mật khẩu và nhấp nút bên dưới để gửi lại email xác nhận.", "resendValidationEmailTip": "Nếu bạn không nhận được email, vui lòng nhập lại mật khẩu và nhấp nút bên dưới để gửi lại email xác nhận tới: {email}", "oauth2bindTip": "You're signing in to the {userName} user using {providerName}. Please enter your ezBookkeeping password to verify." @@ -1195,6 +1196,7 @@ "cannot move transaction from or to hidden account": "Cannot move transaction from or to hidden account", "cannot move transaction from or to parent account": "Cannot move transaction from or to parent account", "cannot move transaction between accounts with different currencies": "Cannot move transaction between accounts with different currencies", + "cannot add tags to too many transactions one time": "You cannot add tags to too many transactions one time", "transaction category id is invalid": "ID danh mục giao dịch không hợp lệ", "transaction category not found": "Không tìm thấy danh mục giao dịch", "transaction category type is invalid": "Loại danh mục giao dịch không hợp lệ", @@ -1856,6 +1858,10 @@ "Update Accounts for Transactions": "Update Accounts for Transactions", "Update Destination Accounts for Transactions": "Update Destination Accounts for Transactions", "Unable to update accounts for transactions": "Unable to update accounts for transactions", + "Add Tags to Transactions": "Add Tags to Transactions", + "Remove Tags from Transactions": "Remove Tags from Transactions", + "Clear All Tags from Transactions": "Clear All Tags from Transactions", + "Unable to update tags for transactions": "Unable to update tags for transactions", "Delete Transactions": "Delete Transactions", "Unable to delete these transactions": "Unable to delete these transactions", "Account List": "Danh sách tài khoản", diff --git a/src/locales/zh_Hans.json b/src/locales/zh_Hans.json index 8f83bec0..339a7861 100644 --- a/src/locales/zh_Hans.json +++ b/src/locales/zh_Hans.json @@ -141,6 +141,7 @@ "moveTransactionsInAccountTip": "您不能撤销该操作。该操作将会把 {fromAccount} 账户中所有的交易数据移动到 {toAccount}。", "clearTransactionsInAccountTip": "您不能撤销该操作。该操作将会清除您在 {account} 账户中的交易数据。请输入您当前的密码以确认。", "deleteTransactionsTip": "您不能撤销该操作。该操作将会删除 {count} 个交易数据。请输入您当前的密码以确认。", + "clearTransactionsTagsTip": "您不能撤销该操作。该操作将会清除 {count} 个交易中的全部标签。", "accountActivationAndResendValidationEmailTip": "账号激活链接已经发送到您的邮箱地址:{email},如果您没有收到邮件,请再次输入密码并点击下方的按钮重新发送验证邮件。", "resendValidationEmailTip": "如果您没有收到邮件,请再次输入密码并点击下方的按钮重新发送验证邮件到:{email}", "oauth2bindTip": "您正在使用 {providerName} 登录 \"{userName}\" 用户,请输入你的 ezBookkeeping 的密码进行验证。" @@ -1195,6 +1196,7 @@ "cannot move transaction from or to hidden account": "不能从隐藏账户移动交易或移动交易到隐藏账户", "cannot move transaction from or to parent account": "不能从父账户移动交易或移动交易到父账户", "cannot move transaction between accounts with different currencies": "不能在不同货币的账户之间移动交易", + "cannot add tags to too many transactions one time": "一次不能将标签添加到太多交易", "transaction category id is invalid": "交易分类ID无效", "transaction category not found": "交易分类不存在", "transaction category type is invalid": "交易分类类型无效", @@ -1856,6 +1858,10 @@ "Update Accounts for Transactions": "更新交易的账户", "Update Destination Accounts for Transactions": "更新交易的目标账户", "Unable to update accounts for transactions": "无法更新交易的账户", + "Add Tags to Transactions": "为交易添加标签", + "Remove Tags from Transactions": "从交易移除标签", + "Clear All Tags from Transactions": "从交易清除所有标签", + "Unable to update tags for transactions": "无法更新交易的标签", "Delete Transactions": "删除交易", "Unable to delete these transactions": "无法删除这些交易", "Account List": "账户列表", diff --git a/src/locales/zh_Hant.json b/src/locales/zh_Hant.json index f8b5f71b..6188c713 100644 --- a/src/locales/zh_Hant.json +++ b/src/locales/zh_Hant.json @@ -141,6 +141,7 @@ "moveTransactionsInAccountTip": "您不能還原此操作。此操作將會把 {fromAccount} 帳戶中的所有交易資料移動到 {toAccount}。", "clearTransactionsInAccountTip": "您不能還原此操作。此操作將會清除您在 {account} 帳戶中的交易資料。請輸入您目前的密碼以確認。", "deleteTransactionsTip": "您不能還原此操作。此操作將會刪除 {count} 個交易資料。請輸入您目前的密碼以確認。", + "clearTransactionsTagsTip": "您不能還原此操作。此操作將會清除 {count} 個交易中的全部標籤。", "accountActivationAndResendValidationEmailTip": "帳號啟用連結已經傳送到您的信箱地址:{email},如果您沒有收到郵件,請再次輸入密碼並點擊下方的按鈕重新發送驗證郵件。", "resendValidationEmailTip": "如果您沒有收到郵件,請再次輸入密碼並點擊下方的按鈕重新發送驗證郵件到:{email}", "oauth2bindTip": "您正在使用 {providerName} 登入 \"{userName}\" 使用者,請輸入您的 ezBookkeeping 的密碼以進行驗證。" @@ -1195,6 +1196,7 @@ "cannot move transaction from or to hidden account": "不能從隱藏帳戶移動交易或移動交易到隱藏帳戶", "cannot move transaction from or to parent account": "不能從父帳戶移動交易或移動交易到父帳戶", "cannot move transaction between accounts with different currencies": "不能在不同幣別的帳戶之間移動交易", + "cannot add tags to too many transactions one time": "一次不能將標籤添加到太多交易", "transaction category id is invalid": "交易分類ID無效", "transaction category not found": "交易分類不存在", "transaction category type is invalid": "交易分類類型無效", @@ -1856,6 +1858,10 @@ "Update Accounts for Transactions": "更新交易的帳戶", "Update Destination Accounts for Transactions": "更新交易的目標帳戶", "Unable to update accounts for transactions": "無法更新交易的帳戶", + "Add Tags to Transactions": "為交易添加標籤", + "Remove Tags from Transactions": "從交易移除標籤", + "Clear All Tags from Transactions": "從交易清除所有標籤", + "Unable to update tags for transactions": "無法更新交易的標籤", "Delete Transactions": "刪除交易", "Unable to delete these transactions": "無法刪除這些交易", "Account List": "帳戶清單", diff --git a/src/models/transaction.ts b/src/models/transaction.ts index a21d49eb..6c86426d 100644 --- a/src/models/transaction.ts +++ b/src/models/transaction.ts @@ -569,6 +569,20 @@ export interface TransactionBatchUpdateAccountRequest { readonly isDestinationAccount: boolean; } +export interface TransactionBatchAddTagsRequest { + readonly transactionIds: string[]; + readonly tagIds: string[]; +} + +export interface TransactionBatchRemoveTagsRequest { + readonly transactionIds: string[]; + readonly tagIds: string[]; +} + +export interface TransactionBatchClearTagsRequest { + readonly transactionIds: string[]; +} + export interface TransactionMoveBetweenAccountsRequest { readonly fromAccountId: string; readonly toAccountId: string; diff --git a/src/stores/transaction.ts b/src/stores/transaction.ts index 4109a3a9..6a12a4ba 100644 --- a/src/stores/transaction.ts +++ b/src/stores/transaction.ts @@ -1198,6 +1198,99 @@ export const useTransactionsStore = defineStore('transactions', () => { }); } + function batchAddTagsToTransaction({ transactionIds, tagIds }: { transactionIds: string[], tagIds: string[] }): Promise { + return new Promise((resolve, reject) => { + services.batchAddTagsToTransaction({ transactionIds, tagIds }).then(response => { + const data = response.data; + + if (!data || !data.success || !data.result) { + reject({ message: 'Unable to update tags for transactions' }); + return; + } + + updateStoreInvalidState({ + transactionList: true, + reconciliationStatement: true, + explorer: true + }); + + resolve(data.result); + }).catch(error => { + logger.error('failed to update tags for transactions', error); + + if (error.response && error.response.data && error.response.data.errorMessage) { + reject({ error: error.response.data }); + } else if (!error.processed) { + reject({ message: 'Unable to update tags for transactions' }); + } else { + reject(error); + } + }); + }); + } + + function batchRemoveTagsFromTransaction({ transactionIds, tagIds }: { transactionIds: string[], tagIds: string[] }): Promise { + return new Promise((resolve, reject) => { + services.batchRemoveTagsFromTransaction({ transactionIds, tagIds }).then(response => { + const data = response.data; + + if (!data || !data.success || !data.result) { + reject({ message: 'Unable to update tags for transactions' }); + return; + } + + updateStoreInvalidState({ + transactionList: true, + reconciliationStatement: true, + explorer: true + }); + + resolve(data.result); + }).catch(error => { + logger.error('failed to update tags for transactions', error); + + if (error.response && error.response.data && error.response.data.errorMessage) { + reject({ error: error.response.data }); + } else if (!error.processed) { + reject({ message: 'Unable to update tags for transactions' }); + } else { + reject(error); + } + }); + }); + } + + function batchClearAllTagsFromTransaction({ transactionIds }: { transactionIds: string[] }): Promise { + return new Promise((resolve, reject) => { + services.batchClearAllTagsFromTransaction({ transactionIds }).then(response => { + const data = response.data; + + if (!data || !data.success || !data.result) { + reject({ message: 'Unable to update tags for transactions' }); + return; + } + + updateStoreInvalidState({ + transactionList: true, + reconciliationStatement: true, + explorer: true + }); + + resolve(data.result); + }).catch(error => { + logger.error('failed to update tags for transactions', error); + + if (error.response && error.response.data && error.response.data.errorMessage) { + reject({ error: error.response.data }); + } else if (!error.processed) { + reject({ message: 'Unable to update tags for transactions' }); + } else { + reject(error); + } + }); + }); + } + function moveAllTransactionsBetweenAccounts({ fromAccountId, toAccountId }: { fromAccountId: string, toAccountId: string }): Promise { return new Promise((resolve, reject) => { services.moveAllTransactionsBetweenAccounts({ fromAccountId, toAccountId }).then(response => { @@ -1574,6 +1667,9 @@ export const useTransactionsStore = defineStore('transactions', () => { saveTransaction, batchUpdateTransactionCategories, batchUpdateTransactionAccounts, + batchAddTagsToTransaction, + batchRemoveTagsFromTransaction, + batchClearAllTagsFromTransaction, moveAllTransactionsBetweenAccounts, deleteTransaction, batchDeleteTransactions, diff --git a/src/views/desktop/insights/dialogs/BatchUpdateTagsDialog.vue b/src/views/desktop/insights/dialogs/BatchUpdateTagsDialog.vue new file mode 100644 index 00000000..485f903f --- /dev/null +++ b/src/views/desktop/insights/dialogs/BatchUpdateTagsDialog.vue @@ -0,0 +1,180 @@ + + + diff --git a/src/views/desktop/insights/tabs/ExplorerEditableDataTableTab.vue b/src/views/desktop/insights/tabs/ExplorerEditableDataTableTab.vue index 3b73ccdb..dd9cb7d8 100644 --- a/src/views/desktop/insights/tabs/ExplorerEditableDataTableTab.vue +++ b/src/views/desktop/insights/tabs/ExplorerEditableDataTableTab.vue @@ -100,6 +100,19 @@ :disabled="!isAllSelectedTransactionsTransfer" @click="batchUpdateTransactionAccounts(true)"> + + + + + @@ -199,6 +213,7 @@ import SnackBar from '@/components/desktop/SnackBar.vue'; import PaginationButtons from '@/components/desktop/PaginationButtons.vue'; import BatchUpdateCategoryDialog from '@/views/desktop/insights/dialogs/BatchUpdateCategoryDialog.vue'; import BatchUpdateAccountDialog from '@/views/desktop/insights/dialogs/BatchUpdateAccountDialog.vue'; +import BatchUpdateTagsDialog, { type BatchUpdateTagsOperationType } from '@/views/desktop/insights/dialogs/BatchUpdateTagsDialog.vue'; import BatchDeleteDialog from '@/views/desktop/insights/dialogs/BatchDeleteDialog.vue'; import { ref, computed, useTemplateRef, watch } from 'vue'; @@ -228,6 +243,7 @@ import { type SnackBarType = InstanceType; type BatchUpdateCategoryDialogType = InstanceType; type BatchUpdateAccountDialogType = InstanceType; +type BatchUpdateTagsDialogType = InstanceType; type BatchDeleteDialogType = InstanceType; interface InsightsExplorerDataTableTabProps { @@ -245,6 +261,7 @@ const emit = defineEmits<{ const snackbar = useTemplateRef('snackbar'); const batchUpdateCategoryDialog = useTemplateRef('batchUpdateCategoryDialog'); const batchUpdateAccountDialog = useTemplateRef('batchUpdateAccountDialog'); +const batchUpdateTagsDialog = useTemplateRef('batchUpdateTagsDialog'); const batchDeleteDialog = useTemplateRef('batchDeleteDialog'); const { @@ -365,6 +382,25 @@ function batchUpdateTransactionAccounts(isDestinationAccount: boolean): void { }); } +function batchUpdateTransactionTags(type: BatchUpdateTagsOperationType): void { + batchUpdateTagsDialog.value?.open({ + type: type, + updateIds: getAllSelectedTransactionIds() + }).then(updatedCount => { + if (updatedCount > 0) { + snackbar.value?.showMessage('format.misc.youHaveUpdatedTransactions', { + count: formatNumberToLocalizedNumerals(updatedCount) + }); + } + selectedTransactions.value = {}; + emit('update:transactions'); + }).catch(error => { + if (error) { + snackbar.value?.showError(error); + } + }); +} + function batchDeleteTransactions(): void { batchDeleteDialog.value?.open({ updateIds: getAllSelectedTransactionIds()