mirror of
https://github.com/maybe-finance/maybe.git
synced 2025-08-02 20:15:22 +02:00
Beta Testing Round 3 Bug Fixes (#1357)
* Clean up env example files * Fix duplicate category creations * Fix duplicate tag and merchant creation * Add initial valuation to imported accounts * Add upgrade modal prompt * Don't hide content on billing page * Add temporary session for new customers * Lint fixes * Fix unused translations * Fix system tests
This commit is contained in:
parent
1d20de770f
commit
6baffe7539
43 changed files with 231 additions and 81 deletions
|
@ -14,6 +14,14 @@ class AccountImport < Import
|
|||
)
|
||||
|
||||
account.save!
|
||||
|
||||
account.entries.create!(
|
||||
amount: row.amount,
|
||||
currency: row.currency,
|
||||
date: Date.current,
|
||||
name: "Imported account value",
|
||||
entryable: Account::Valuation.new
|
||||
)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -4,6 +4,7 @@ class Category < ApplicationRecord
|
|||
belongs_to :family
|
||||
|
||||
validates :name, :color, :family, presence: true
|
||||
validates :name, uniqueness: { scope: :family_id }
|
||||
|
||||
before_update :clear_internal_category, if: :name_changed?
|
||||
|
||||
|
|
|
@ -71,7 +71,8 @@ class Demo::Generator
|
|||
first_name: "Demo",
|
||||
last_name: "User",
|
||||
role: "admin",
|
||||
password: "password"
|
||||
password: "password",
|
||||
onboarded_at: Time.current
|
||||
end
|
||||
|
||||
def create_tags!
|
||||
|
|
|
@ -132,7 +132,7 @@ class Family < ApplicationRecord
|
|||
end
|
||||
|
||||
def subscribed?
|
||||
stripe_subscription_status.present? && stripe_subscription_status == "active"
|
||||
stripe_subscription_status == "active"
|
||||
end
|
||||
|
||||
def primary_user
|
||||
|
|
|
@ -3,6 +3,7 @@ class Merchant < ApplicationRecord
|
|||
belongs_to :family
|
||||
|
||||
validates :name, :color, :family, presence: true
|
||||
validates :name, uniqueness: { scope: :family }
|
||||
|
||||
scope :alphabetically, -> { order(:name) }
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue