lib/adiwg/mdtranslator/writers/sbJson/sections/sbJson_contact.rb in adiwg-mdtranslator-2.0.0rc13 vs lib/adiwg/mdtranslator/writers/sbJson/sections/sbJson_contact.rb in adiwg-mdtranslator-2.0.0

- old
+ new

@@ -73,11 +73,15 @@ json.personalTitle hContact[:positionName] if type == 'person' json.type role json.email hContact[:eMailList][0] unless hContact[:eMailList].empty? json.hours Hours.build(hContact[:hoursOfService]) unless hContact[:hoursOfService].empty? json.instructions hContact[:contactInstructions] - json.tty hContact[:phones].collect {|ph| ph[:phoneNumber] if + json.officePhone hContact[:phones].collect {|ph| ph[:phoneNumber] if + ph[:phoneServiceTypes].include?('voice')}.reject(&:nil?).first + json.faxPhone hContact[:phones].collect {|ph| ph[:phoneNumber] if + ph[:phoneServiceTypes].include?('fax')}.reject(&:nil?).first + json.ttyPhone hContact[:phones].collect {|ph| ph[:phoneNumber] if ph[:phoneServiceTypes].include?('tty')}.reject(&:nil?).first json.organization {json.displayText orgName} unless orgName.nil? json.logoUrl logoUrl unless logoUrl.nil? if !hContact[:addresses].empty? || !hContact[:phones].empty? @@ -85,9 +89,11 @@ unless hContact[:phones].empty? json.officePhone hContact[:phones].collect {|ph| ph[:phoneNumber] if ph[:phoneServiceTypes].include?('voice')}.reject(&:nil?).first json.faxPhone hContact[:phones].collect {|ph| ph[:phoneNumber] if ph[:phoneServiceTypes].include?('fax')}.reject(&:nil?).first + json.ttyPhone hContact[:phones].collect {|ph| ph[:phoneNumber] if + ph[:phoneServiceTypes].include?('tty')}.reject(&:nil?).first end unless hContact[:addresses].empty? aAddress = hContact[:addresses] json.description aAddress[0][:description] aAddress.each do |hAddress|