mirror of
https://github.com/Freika/dawarich.git
synced 2026-01-10 17:21:38 -05:00
Update error message
This commit is contained in:
parent
6a0cc112dc
commit
63aa197a29
4 changed files with 4 additions and 3 deletions
|
|
@ -24,6 +24,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
|
|||
## Added
|
||||
|
||||
- Added foundation for upcoming authentication from iOS app.
|
||||
- [Dawarich Cloud] Trial users can now create up to 5 imports. After that, they will be prompted to subscribe to a paid plan.
|
||||
|
||||
|
||||
# [0.32.0] - 2025-09-13
|
||||
|
|
|
|||
|
|
@ -54,7 +54,7 @@ export default class extends Controller {
|
|||
|
||||
// Check import count limits for trial users
|
||||
if (this.userTrialValue && this.currentImportsCountValue >= 5) {
|
||||
const message = 'Import limit reached. Trial users can only create up to 5 imports. Please upgrade your account to import more files.'
|
||||
const message = 'Import limit reached. Trial users can only create up to 5 imports. Please subscribe to import more files.'
|
||||
showFlashMessage('error', message)
|
||||
|
||||
// Clear the file input
|
||||
|
|
|
|||
|
|
@ -76,7 +76,7 @@ class Import < ApplicationRecord
|
|||
existing_imports_count = user.imports.count
|
||||
return unless existing_imports_count >= 5
|
||||
|
||||
errors.add(:base, 'Trial users can only create up to 5 imports. Please upgrade your account to import more files.')
|
||||
errors.add(:base, 'Trial users can only create up to 5 imports. Please subscribe to import more files.')
|
||||
end
|
||||
|
||||
def recalculate_stats
|
||||
|
|
|
|||
|
|
@ -87,7 +87,7 @@ RSpec.describe Import, type: :model do
|
|||
new_import = build(:import, user: user, name: 'import_6')
|
||||
|
||||
expect(new_import).not_to be_valid
|
||||
expect(new_import.errors[:base]).to include('Trial users can only create up to 5 imports. Please upgrade your account to import more files.')
|
||||
expect(new_import.errors[:base]).to include('Trial users can only create up to 5 imports. Please subscribe to import more files.')
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue