Coder Social home page Coder Social logo

Comments (3)

zachgoll avatar zachgoll commented on June 20, 2024 1

@claudey you are correct, I'll go ahead and close this issue out.

This was for a prior version of the UI, so I think #707 actually addresses all of it!

from maybe.

zachgoll avatar zachgoll commented on June 20, 2024

Here's where everything is being grouped:

def self.by_group(period = Period.all)
grouped_accounts = { assets: ValueGroup.new("Assets"), liabilities: ValueGroup.new("Liabilities") }
Accountable.by_classification.each do |classification, types|
types.each do |type|
group = grouped_accounts[classification.to_sym].add_child_node(type)
Accountable.from_type(type).includes(:account).each do |accountable|
account = accountable.account
value_node = group.add_value_node(account)
value_node.attach_series(account.series(period))
end
end
end
grouped_accounts
end

And to fix this, we could probably add an empty? method on the ValueGroup class:

def value_nodes
return [ self ] unless value.nil?
children.flat_map { |child| child.value_nodes }
end

Something like:

def empty?
  value_nodes.empty?
end

from maybe.

claudey avatar claudey commented on June 20, 2024

@zachgoll I think #707 fixes the first part of this issue, the Empty State problem to address.

from maybe.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.