~singpolyma/sgx-jmp

613c6f844c06e235d642f2b4de3ac740870688a0 — Stephen Paul Weber 4 months ago e90dcfa
LazyObject is not nil, so safenav doesn't work
3 files changed, 4 insertions(+), 4 deletions(-)

M forms/configure_calls.rb
M lib/customer_info.rb
M lib/customer_repo.rb
M forms/configure_calls.rb => forms/configure_calls.rb +2 -2
@@ 31,14 31,14 @@ field(
	value: @customer.fwd.uri
)

if (lidb = @customer.tndetails&.dig(:features, :lidb))
if (lidb = @customer.tndetails.dig(:features, :lidb))
	field(
		var: "lidb_name",
		type: "fixed",
		label: "CNAM",
		value: "#{lidb[:subscriber_information]} (#{lidb[:status]})"
	)
elsif @customer.tndetails&.dig(:on_net_vendor)
elsif @customer.tndetails[:on_net_vendor]
	field(
		var: "lidb_name",
		type: "text-single",

M lib/customer_info.rb => lib/customer_info.rb +1 -1
@@ 83,7 83,7 @@ class CustomerInfo
				plan_info: plan_info,
				tel: customer.registered? ? customer.registered?.phone : nil,
				balance: customer.balance,
				cnam: customer.tndetails&.dig(:features, :lidb, :subscriber_information)
				cnam: customer.tndetails.dig(:features, :lidb, :subscriber_information)
			)
		end
	end

M lib/customer_repo.rb => lib/customer_repo.rb +1 -1
@@ 167,7 167,7 @@ protected
	def tndetails(sgx)
		return unless sgx.registered?

		LazyObject.new { @bandwidth_tn_repo.find(sgx.registered?.phone) }
		LazyObject.new { @bandwidth_tn_repo.find(sgx.registered?.phone) || {} }
	end

	def find_inner(customer_id, jid)