Changeset 587

Show
Ignore:
Timestamp:
03/29/07 11:16:45 (2 years ago)
Author:
sacha
Message:

provide names of parties and cpas in case the user selects a wrong id or hits return by accident

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/bin/run-command-center.rb

    r573 r587  
    402402 
    403403def get_party_and_cpa 
    404   puts "Getting the cpa and selecting the party." 
    405   puts "Select organisation:" 
     404  puts "Please select the party you want to manage first." 
     405  puts "Select party:" 
    406406  parties = Dir.glob "#{@config['CONFIG_DIR']}/#{@config['SYSTEMS_DIR']}/*" 
    407407  party_selection = Hash.new 
     
    422422    else 
    423423      puts "#{selected_organisation} is an invalid entry. Please select again." 
     424      counter = 1 
     425      parties.each{ | party | 
     426        party_selection[counter] = party 
     427        puts "#{counter.to_s}. #{File.basename party}" 
     428        counter += 1 
     429      } 
    424430    end 
    425431  end 
    426432 
    427433  party_name = File.basename party_path 
    428    
     434 
     435  puts "This party has multipe Collboration Protocol Agreements (trading partner agreements)." 
     436  puts "Please select the CPA you want to test." 
    429437  puts "Select CPA:" 
    430438  cpas = Hash.new 
     
    447455    else 
    448456      puts "#{selected_cpa} is invalid. Please select again." 
     457      counter = 1 
     458      available_cpas.each{ | cpa | 
     459        cpas[counter] = cpa 
     460        puts "#{counter.to_s}. #{File.basename cpa}" 
     461        counter += 1 
     462      } 
    449463    end 
    450464  end