~singpolyma/sgx-jmp

sgx-jmp/lib/customer_info.rb -rw-r--r-- 3.2 KiB
Merge branch 'fix-info-when-no-plan'

* fix-info-when-no-plan:
  Fix rendering info when there is no plan
Fix rendering info when there is no plan
Merge branch 'show-remaining-included-calling-credit'

* show-remaining-included-calling-credit:
  Show remaining included calling credit in customer info
  Add missing require
Show remaining included calling credit in customer info
Add missing require
Merge branch 'no-15-spin'

* no-15-spin:
  Auto top up enough to get to auto_top_up_amount
  Remove Customer knowledge of all presenter objects
Remove Customer knowledge of all presenter objects
Merge branch 'more-admin-info'

* more-admin-info:
  Test Admin Info with Numbers
  Refetch Customer on Repeated Customer Info Calls
  Trust Level in Customer Info
  Show Callability State in Customer Info
  PromiseHash
  No Settled Transactions is 0, not Null
Test Admin Info with Numbers

My current two AdminInfo tests have unregistered customers because it's
easier, but it means that some parts of the logic don't get tested.

This one digs a bit deeper to test this part of the forms, but it
requires injecting a repo
Trust Level in Customer Info

We have this thing, so we should probably be able to see it
Show Callability State in Customer Info

This shows relatively easily which class a given user finds themselves
in.

Whether they can't call because they have no balance, or if they have
lots of room, or if they're being asked.

Hopefully this will make it easier to tell at a glance if a calling
issue is due to a few things.
PromiseHash

Here in info I'm doing a lot of this pattern:

    EMPromise.all([one, two three]).then { |one, two, three|
    	new(one: one, two: two, three: three)
    }

Which felt really noisy for what is a pretty logical operation.
So now I can keep the keys and values together and do:

    PromiseHash.all(one: one, two: two, three:three).then(&method(:new))

It's smaller, but more importantly it's more meaningful to me.
It keeps the declaration of the meaning together with the sourcing of
the value.
And because it uses EMPromise.all in the guts it's not a problem if some
of the keys are not promises.
Easy-peasy!
LazyObject is not nil, so safenav doesn't work
Merge branch 'tx-list'

* tx-list:
  Admin Command Menu + Admin Financial View
  Transactions List
  Customer Financials
  Telephone Link
Telephone Link

Sometimes I need to go there to look something up or change a setting,
and every time I do I have to navigate through the UI to a number I
already know.

This should make that faster.
Merge branch 'overage-limit'

* overage-limit:
  auto_top_up_amount and monthly_overage_limit from CustomerRepo
  Move Bandwidth Tn remote operations to BandwidthTnRepo
  Use value_semantics to DRY up CustomerRepo
  Use NotFound exception for all customer not found cases
auto_top_up_amount and monthly_overage_limit from CustomerRepo

Move load of auto_top_up_amount to the repo, and load monthly_overage_limit in
the same operation.
Customer Info Forms and More Info

There's a bit extra info I wanted about users, so since I was doing this
anyway I figured I may as well port the existing forms to the new form
renderer.

Then, in order to fit within the guidelines I needed subforms, so
partials were added.
Make tel present or not more machine readable
Show CNAM in customer info
Next