Created
February 21, 2011 11:03
-
-
Save Piotroslav/836930 to your computer and use it in GitHub Desktop.
my Lead stuff
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <all-approved-page> | |
| <content:> | |
| <header> | |
| <h2> | |
| <ht key="leads.all_approved.heading"> | |
| Final approval for <this.contact.company/> - <this.name/> | |
| </ht> | |
| </h2> | |
| <h3></h3> | |
| </header> | |
| <field-list fields="contract_signed, resource_confirmation, resource_manager, project_sponsor"/> | |
| <all-approved-form/> | |
| </content:> | |
| </all-approved-page> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <include src="rapid" plugin="hobo"/> | |
| <include src="taglibs/auto/rapid/cards"/> | |
| <include src="taglibs/auto/rapid/pages"/> | |
| <include src="taglibs/auto/rapid/forms"/> | |
| <include src="paperclip" plugin="paperclip_with_hobo" /> | |
| <include src="hobo-jquery" plugin="hobo-jquery" /> | |
| <extend tag="page"> | |
| <old-page merge> | |
| <custom-scripts:> | |
| <hjq-assets/> | |
| </custom-scripts> | |
| </old-page> | |
| </extend> | |
| <set-theme name="clean"/> | |
| <def tag="app-name">mobica crm</def> | |
| <def tag="sum" attrs="attribute"> | |
| <%= | |
| this.inject(nil) {|total, item| | |
| val = item.send(attribute) | |
| c = val.try.+(0) || val.try.total_entries || (val.try.loaded? && | |
| val.try.length) || val.try.count || val.try.length | |
| if total.nil? | |
| c | |
| else | |
| total+c | |
| end | |
| } | |
| %> | |
| </def> | |
| <def attrs='param-name, options, id' tag='filter-menu-without-no-option'> | |
| <form class='filter-menu' action='&request.request_uri' method='get' | |
| merge-attrs='id'> | |
| <div> | |
| <% selected = options.detect {|o| | |
| o.to_s==params[param_name.gsub('-', '_')] } %> | |
| <select-menu name='¶m_name' options='&options' | |
| selected='&selected' merge-params /> | |
| </div> | |
| </form> | |
| </def> | |
| <def tag="engineerlist"> | |
| <h1>Engineers Available</h1> | |
| <collection with="&Engineer.all"/> | |
| </def> | |
| <def tag="main-nav"> | |
| <navigation class="main-nav" merge-attrs param="default"> | |
| <nav-item with="&Todo"><ht key="todos.nav_item">To Do</ht></nav-item> | |
| <nav-item with="&Company"><ht key="companies.nav_item">Companies</ht></nav-item> | |
| <nav-item with="&Contact"><ht key="contacts.nav_item">Contacts</ht></nav-item> | |
| <nav-item with="&Call"><ht key="calls.nav_item">Calls</ht></nav-item> | |
| <nav-item with="&Lead"><ht key="leads.nav_item">Leads</ht></nav-item> | |
| <%- if current_user.signed_up? -%> | |
| <if test="¤t_user.role != :international"> | |
| <nav-item with="&Bidform"><ht key="bidforms.nav_item">BF</ht></nav-item> | |
| <nav-item with="&Engineer"><ht key="engineers.nav_item">Engineers</ht></nav-item> | |
| <!-- <nav-item with="&Offer"><ht key="jobs.nav_item">Assignments</ht></nav-item> --> | |
| <nav-item with="&Project"><ht key="projects.nav_item">Projects</ht></nav-item> | |
| <nav-item with="&Assignment"><ht key="assignments.nav_item">Assignments</ht></nav-item> | |
| </if> | |
| <%- end -%> | |
| </navigation> | |
| </def> | |
| <extend tag="card" for="Lead"> | |
| <old-card merge> | |
| <header: replace> | |
| <h4><a><name/><transition-buttons/></a></h4> | |
| </header:> | |
| <body: replace> | |
| <div class="engineers"> | |
| Team: <repeat:engineers join=", "><a/></repeat><else>None</else> | |
| </div> | |
| </body:> | |
| </old-card> | |
| </extend> | |
| <extend tag="card" for="Company"> | |
| <old-card merge> | |
| <body: replace> | |
| <div class="contacts"> | |
| Contacts: <repeat:contacts join=", "><a/></repeat><else>None</else> | |
| </div> | |
| </body:> | |
| </old-card> | |
| </extend> | |
| <def tag="nil-view"></def> | |
| <def tag="view" for="Bidform"><a>BF <%= this.id.to_s %></a></def> | |
| <def tag="view" for="ActiveSupport::TimeWithZone"><%= this.strftime("%d/%m/%y") %></def> | |
| <def tag="view" for="Lead::LifecycleStateField"><%= this.to_s.upcase %></def> | |
| <def tag="view" for="Lead::fptm"><%= this.to_s.upcase %></def> | |
| <def tag="view" for="Date"><%= this.strftime("%d/%m/%y") %></def> | |
| <def tag="input" for="Date"><hjq-datepicker dateFormat="dd/mm/y" merge/></def> | |
| <def tag="input-many" for="Offer" merge> | |
| <hjq-input-many> | |
| <item:> | |
| <field-list fields="engineer, name, dayrate, startdate, enddate"> | |
| <engineer-view:> | |
| <name-one/> | |
| </engineer-view:> | |
| </field-list> | |
| </item:> | |
| </hjq-input-many> | |
| </def> | |
| <def tag="input-many" for="Assignment"> | |
| <hjq-input-many> | |
| <item:> | |
| <field-list fields="engineer, name, dayrate, startdate, enddate"> | |
| <engineer-view:> | |
| <name-one/> | |
| </engineer-view:> | |
| </field-list> | |
| </item:> | |
| </hjq-input-many> | |
| </def> | |
| <extend tag="form" for="Engineer"> | |
| <old-form enctype="multipart/form-data" merge> | |
| <field-list: fields="name, mobile, skypeid, description, status, available, base, avatar"/> | |
| </old-form> | |
| </extend> | |
| <extend tag="form" for="Company"> | |
| <old-form merge> | |
| <field-list fields="name, phone, address, description, user" param/> | |
| <submit label="#{ht 'companies.actions.save', :default=>['Save']}" /> | |
| </old-form> | |
| </extend> | |
| <def tag="edit-page" for="User"> | |
| <page merge title="#{ht 'users.edit.title', :default=>['Edit User'] }"> | |
| <body: class="edit-page user" param/> | |
| <content:> | |
| <section param="content-header"> | |
| <h2 param="heading"> | |
| <ht key="users.edit.heading" name="&this.respond_to?(:name) ? this.name : ''"> | |
| Edit <type-name/> | |
| </ht> | |
| </h2> | |
| <!--<delete-button label="#{ht 'users.actions.delete', :default=>['Remove This User']}" param/>--> | |
| </section> | |
| <section param="content-body"> | |
| <form param/> | |
| <br/><br/><br/> | |
| <deactivate-user-form if="&can_edit?" /> | |
| </section> | |
| </content:> | |
| </page> | |
| </def> | |
| <def tag="win-form" for="Lead"> | |
| <form lifecycle="win" merge param="default" name="winForm"> | |
| <error-messages param/> | |
| <input type="hidden" name="key" value="&this.lifecycle.provided_key" if="&this.lifecycle.provided_key"/> | |
| <field-list fields="proposal, fptm, enddate, invoice_address, contract, special_terms, teamsize, duration, value" param/> | |
| <field-list fields="contract_signed" param/> | |
| <field-list fields="resource_manager" param/> | |
| <div param="actions"> | |
| <submit id="winner_button" label="#{ht 'leads.actions.win', :default=>['Request Final Approval']}" param/><or-cancel param="cancel"/> | |
| </div> | |
| </form> | |
| <script type="text/javascript"> | |
| function check_form(){ | |
| document.getElementById('winner_button').style.visibility = "hidden"; | |
| document.getElementById("second_button").style.visibility = "hidden"; | |
| if (document.winForm.elements['lead[contract_signed]'].selectedIndex == 1){ | |
| document.getElementById('winner_button').style.visibility = "visible"; | |
| } | |
| if (document.winForm.elements['lead[contract_signed]'].selectedIndex == 2){ | |
| document.getElementById("second_button").style.visibility = "visible"; | |
| } | |
| } | |
| </script> | |
| </def> | |
| <def tag="all-approved-form" for="Lead"> | |
| <form lifecycle="all_approved" merge param="default" > | |
| <error-messages param/> | |
| <input type="hidden" name="key" value="&this.lifecycle.provided_key" if="&this.lifecycle.provided_key"/> | |
| <field-list fields="reason" param/> | |
| <div param="actions"> | |
| <submit id="winner_button" label="#{ht 'leads.actions.all_approved', :default=>['Approve Lead']}" style="background-color:green" param/><submit id="second_button" label="#{ht 'leads.actions.reject', :default=>['Reject project start']}" style="background-color:red" param/><or-cancel param="cancel"/> | |
| </div> | |
| </form> | |
| </def> | |
| <def tag="all-approved-page" polymorphic/> | |
| <def tag="all-approved-page" for="Lead"> | |
| <page title="#{ht 'leads.all-approved.title', :default=>['Win']}" merge> | |
| <body: class="lifecycle-transition-page win-page" param/> | |
| <content:> | |
| <header param="content-header"> | |
| <h2 param="heading"> | |
| <ht key="leads.all-approved.heading"> | |
| Win | |
| </ht> | |
| </h2> | |
| </header> | |
| <section param="content-body"> | |
| <all-approved-form param="form"/> | |
| </section> | |
| </content:> | |
| </page> | |
| </def> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class Lead < ActiveRecord::Base | |
| hobo_model # Don't put anything above this | |
| has_paper_trail | |
| fields do | |
| name :string, :required | |
| description :text, :required | |
| fptm enum_string(:FP,:TM,:INTERNAL), :required => true | |
| teamsize :integer, :required, :default => 1 | |
| duration :integer, :required, :default => 1 | |
| decision_date :date, :required | |
| probability :integer, :required, :default => 5 | |
| value :integer, :required | |
| currency enum_string(:GBP,:EURO,:DOLLAR,:SEK,:ZLOTY), :default => "GBP" | |
| enddate :date | |
| proposal :text | |
| invoice_address :text | |
| contract :text | |
| special_terms :text | |
| reason :string | |
| contract_signed enum_string(:choose, :contract_signed, :request_start_at_risk) # | |
| resource_confirmation enum_string(:possible_to_deliver, :all_confirmed, :impossible) # | |
| timestamps | |
| end | |
| has_many :engineers, :through => :offers | |
| has_many :offers, :accessible => true | |
| has_many :projects, :accessible => true | |
| has_many :bidforms, :accessible => true | |
| has_many :signoffs | |
| belongs_to :contact | |
| belongs_to :user, :class_name => "User", :creator => true | |
| belongs_to :resource_manager, :class_name => "User", :conditions => { :role => "resourcing" } #resource manager | |
| belongs_to :project_sponsor, :class_name => "User" | |
| validates_inclusion_of :probability, :in => 0..100, :message => "must be between 5% and 100%" | |
| validates_inclusion_of :value, :in => 1000..5000000, :message => "must be greater than 1000" | |
| set_default_order "decision_date ASC" | |
| lifecycle do | |
| state :suspect, :default => :true | |
| state :to_bid | |
| state :bidding | |
| state :to_approve | |
| state :bid | |
| state :won | |
| state :lost | |
| state :no_bid | |
| state :dead | |
| state :may_extend | |
| state :final_approval #win prestatus | |
| create :newlead, :params => [ :salesman ], :become => :suspect, | |
| :available_to => "User" do | |
| end | |
| transition :win, { :bid => :final_approval } , :params => [:proposal, :fptm, :enddate, :invoice_address, :contract, :special_terms, :teamsize, :duration, :value, :resource_manager, :contract_signed], :available_to => :user | |
| transition :all_approved, { :final_approval => :won}, :params => [:reason, :project_sponsor], :avialable_to => "User.decider" | |
| transition :confirm_resources, { :final_approval => :final_approval }, :params => [:resource_confirmation], :avialable_to => "User.resourcer" | |
| transition :advance, { :suspect => :to_bid }, :params => [:bidforms], :available_to => :user | |
| transition :reset, { :to_bid => :suspect }, :available_to => "User.decider" | |
| transition :authorise_bid_effort, { :to_bid => :bidding } , :available_to => "User.decider" | |
| transition :get_approval, { :bidding => :to_approve } , :available_to => :user | |
| transition :approve, { :to_approve => :bid } , :available_to => "User.decider" | |
| transition :withdraw, { :to_bid => :no_bid } , :params => [:reason], :available_to => "User.decider" | |
| transition :withdraw, { :bidding => :no_bid } ,:params => [:reason], :available_to => "User.decider" | |
| transition :lose, { :bid => :lost } , :params => [:reason], :available_to => :user | |
| transition :lose, { :bidding => :lost } , :params => [:reason], :available_to => :user | |
| transition :lose, { :to_bid => :lost } , :params => [:reason], :available_to => :user | |
| transition :lose, { :suspect => :lost } , :params => [:reason], :available_to => :user | |
| transition :kill, { :bid => :dead } , :params => [:reason], :available_to => :user | |
| transition :kill, { :bidding => :dead } , :params => [:reason], :available_to => :user | |
| transition :kill, { :suspect => :dead } , :params => [:reason], :available_to => :user | |
| transition :kill, { :to_bid => :dead } , :params => [:reason], :available_to => :user | |
| transition :reopen, { :dead => :suspect } , :available_to => "User.decider" | |
| transition :reopen, { :lost => :to_bid } , :available_to => "User.decider" | |
| transition :reopen, { :no_bid => :to_bid } , :available_to => "User.decider" | |
| transition :to_extend,{ :won => :may_extend }, :if => "fptm == :TM", :available_to => :user | |
| transition :win_extension, { :may_extend => :final_approval }, :params => [:offers], :available_to => :user | |
| transition :no_extension, { :may_extend => :final_approval }, :available_to => :user | |
| transition :reject, { :final_approval => :to_approve } , :params => [:reason], :avialable_to => "User.decider" | |
| end | |
| validates_presence_of :enddate, :on => :win | |
| validates_presence_of :proposal, :on => :win | |
| validates_presence_of :invoice_address, :on => :win | |
| validates_presence_of :contract, :on => :win | |
| validates_presence_of :special_terms, :on => :win | |
| validates_presence_of :teamsize, :on => :win | |
| validates_presence_of :duration, :on => :win | |
| validates_presence_of :value, :on => :win | |
| validates_presence_of :contract_signed, :on => :win | |
| validates_presence_of :reason, :on => :lose | |
| validates_presence_of :reason, :on => :kill | |
| validates_presence_of :reason, :on => :withdraw | |
| validates_presence_of :reason, :on => :reject | |
| named_scope :forapproval, :conditions => "state = 'to_bid' or state = 'to_approve'" | |
| named_scope :active, :conditions => "state = 'suspect' or state = 'to_bid' or state = 'bid' or state = 'bidding' or state = 'to_approve' or state = 'may_extend'" | |
| named_scope :inactive, :conditions => "state = 'won' or state = 'lost' or state = 'dead' or state = 'no_bid'" | |
| named_scope :hot, :conditions => "probability > 20 and state != 'lost' and state != 'dead' and state != 'won' and state != 'no_bid'" | |
| # --- Permissions --- # | |
| def create_permitted? | |
| #(acting_user.signed_up? && acting_user.role =="Sales") || acting_user.administrator? | |
| acting_user.signed_up? | |
| end | |
| def update_permitted? | |
| acting_user.signed_up? | |
| end | |
| def destroy_permitted? | |
| acting_user.administrator? | |
| end | |
| def view_permitted?(field) | |
| new_record? || acting_user.id == user_id or acting_user.role != :international or contact.company.user == acting_user | |
| acting_user.signed_up? | |
| end | |
| def before_save | |
| # self.value = 50 * self.duration * self.teamsize * self.probability | |
| end | |
| end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class LeadsController < ApplicationController | |
| hobo_model_controller | |
| auto_actions :all, :except => [:new, :create] | |
| auto_actions_for :contact, [:new, :create] | |
| index_action :pipeline | |
| index_action :results | |
| index_action :approvals | |
| index_action :weekly | |
| index_action :quarter | |
| index_action :quarter_graph | |
| def index | |
| hobo_index Lead.active.apply_scopes(:search => [params[:search], :name, :state], | |
| :order_by => parse_sort_param(:name, :probability, :teamsize, :duration, :state), | |
| :user_is => params[:user] || current_user) | |
| end | |
| def pipeline | |
| hobo_index Lead.hot.apply_scopes(:search => [params[:search], :name, :state], | |
| :order_by => parse_sort_param(:name, :probability, :value, :created_at, :decision_date, :state), | |
| :user_is => params[:user]) | |
| end | |
| def results | |
| @result = ["won","final_approval","lost","dead","no_bid"] | |
| if params[:result] == "All" | |
| hobo_index Lead.inactive.apply_scopes(:search => [params[:search], :name, :state], | |
| :order_by => parse_sort_param(:name, :teamsize, :duration, :decision_date, :state, :created_at, :user), | |
| :user_is => params[:user]) | |
| else | |
| hobo_index Lead.inactive.apply_scopes(:search => [params[:search], :name, :state], | |
| :order_by => parse_sort_param(:name, :teamsize, :duration, :decision_date, :state, :created_at, :user), | |
| :user_is => params[:user], | |
| :state_is => params[:result]) | |
| end | |
| end | |
| def approvals | |
| hobo_index Lead.forapproval.apply_scopes(:search => [params[:search], :name, :state], | |
| :order_by => parse_sort_param(:name, :probability, :teamsize, :duration, :decision_date, :state, :created_at), | |
| :user_is => params[:user]) | |
| end | |
| def weekly | |
| last_monday = Date.commercial(Date.today.year, Date.today.cweek, 1) | |
| if last_monday == Date.today | |
| last_monday = last_monday - 7 | |
| end | |
| hobo_index Lead.apply_scopes(:search => [params[:search], :name, :state], | |
| :order_by => parse_sort_param(:name, :teamsize, :duration, :decision_date, :state, :created_at, :user), | |
| :user_is => params[:user], | |
| :state_is => params[:result], :created_between => [last_monday, Date.tomorrow], :state_is_not => "suspect" ) | |
| end | |
| def show | |
| @lead = find_instance | |
| @offers = @lead.offers.apply_scopes(:search => [params[:search], :name], | |
| :order_by => parse_sort_param(:name)) | |
| end | |
| def do_win_extension | |
| do_transition_action :win_extension do | |
| if valid? | |
| signoff = Signoff.new | |
| signoff.detail = "WON EXTENSION" | |
| signoff.lead = @lead | |
| signoff.user = current_user | |
| signoff.save | |
| UserMailer.deliver_extension_notice(@lead.user, @lead) | |
| end | |
| end | |
| end | |
| def do_win | |
| do_transition_action :win do | |
| if valid? | |
| @lead = find_instance | |
| @lead.decision_date = Date.today | |
| @lead.save | |
| signoff = Signoff.new | |
| signoff.detail = "LEAD READY TO FINAL APPROVAL" | |
| signoff.lead = @lead | |
| signoff.user = current_user | |
| signoff.save | |
| if @lead.contract_signed == 'request_start_at_risk' | |
| end | |
| UserMailer.deliver_final_approval_request(@lead.user, @lead) | |
| end | |
| end | |
| end | |
| def do_advance | |
| @lead = find_instance | |
| @lead.created_at = Time.now # reset the time this lead was found, because it's now a REAL lead :-) | |
| @lead.save | |
| do_transition_action :advance do | |
| signoff = Signoff.new | |
| signoff.detail = "ADVANCED from SUSPECT => TO_BID" | |
| signoff.lead = @lead | |
| signoff.user = current_user | |
| signoff.save | |
| UserMailer.deliver_authrequest_bid_effort(@lead.user, @lead) | |
| if @lead.bidforms.first == nil | |
| bidform = Bidform.new | |
| bidform.lead = @lead | |
| bidform.save | |
| end | |
| end | |
| end | |
| def do_kill | |
| do_transition_action :kill | |
| @lead = find_instance | |
| @lead.decision_date = Date.today | |
| @lead.save | |
| signoff = Signoff.new | |
| signoff.detail = "LEAD KILLED" | |
| signoff.lead = @lead | |
| signoff.user = current_user | |
| signoff.save | |
| end | |
| def do_kill | |
| do_transition_action :kill | |
| @lead = find_instance | |
| @lead.decision_date = Date.today | |
| @lead.save | |
| signoff = Signoff.new | |
| signoff.detail = "LEAD KILLED" | |
| signoff.lead = @lead | |
| signoff.user = current_user | |
| signoff.save | |
| end | |
| def do_withdraw | |
| do_transition_action :withdraw | |
| @lead = find_instance | |
| @lead.save | |
| signoff = Signoff.new | |
| signoff.detail = "NO BID" | |
| signoff.lead = @lead | |
| signoff.user = current_user | |
| signoff.save | |
| end | |
| def do_reset | |
| do_transition_action :reset | |
| @lead = find_instance | |
| @lead.save | |
| signoff = Signoff.new | |
| signoff.detail = "RESET to SUSPECT" | |
| signoff.lead = @lead | |
| signoff.user = current_user | |
| signoff.save | |
| end | |
| def do_get_approval | |
| do_transition_action :get_approval | |
| @lead = find_instance | |
| @lead.save | |
| signoff = Signoff.new | |
| signoff.detail = "READY FOR APPROVAL" | |
| signoff.lead = @lead | |
| signoff.user = current_user | |
| signoff.save | |
| UserMailer.deliver_bid_approval_request(@lead.user, @lead) | |
| end | |
| def do_approve | |
| do_transition_action :approve | |
| @lead = find_instance | |
| @lead.save | |
| signoff = Signoff.new | |
| signoff.detail = "BID APPROVED" | |
| signoff.lead = @lead | |
| signoff.user = current_user | |
| signoff.save | |
| UserMailer.deliver_bid_approved_notice(@lead.user, @lead) | |
| end | |
| def do_authorise_bid_effort | |
| do_transition_action :authorise_bid_effort | |
| @lead = find_instance | |
| @lead.save | |
| signoff = Signoff.new | |
| signoff.detail = "BID EFFORT AUTHORIZED" | |
| signoff.lead = @lead | |
| signoff.user = current_user | |
| signoff.save | |
| end | |
| def do_lose | |
| do_transition_action :lose | |
| @lead = find_instance | |
| @lead.decision_date = Date.today | |
| @lead.save | |
| signoff = Signoff.new | |
| signoff.detail = "LOST" | |
| signoff.lead = @lead | |
| signoff.user = current_user | |
| signoff.save | |
| end | |
| def quarter | |
| hobo_index User.show_leads.apply_scopes(:order_by =>parse_sort_param(:total_leads, :name)) | |
| @graph = open_flash_chart_object(1060,600,"/leads/quarter_graph") | |
| end | |
| def quarter_graph | |
| chart = User.generate_leads_graph | |
| render :text => chart.to_s | |
| end | |
| def do_all_approved | |
| do_transition_action :all_approved | |
| @lead = find_instance | |
| @lead.decision_date = Date.today | |
| @lead.save | |
| project = Project.new | |
| project.lead = @lead | |
| project.description = @lead.name | |
| project.company = @lead.contact.company | |
| project.teamsize = @lead.teamsize | |
| project.duration = @lead.duration | |
| project.user = @lead.user | |
| project.enddate = @lead.enddate | |
| project.proposal = @lead.proposal | |
| project.contract = @lead.contract | |
| project.special_terms = @lead.special_terms | |
| project.invoice_address = @lead.invoice_address | |
| project.fptm = @lead.fptm | |
| project.sale_value = @lead.value | |
| project.currency = @lead.currency | |
| project.sponsor = @lead.project_sponsor | |
| project.save | |
| signoff = Signoff.new | |
| signoff.detail = "PROJECT WON" | |
| signoff.lead = @lead | |
| signoff.user = current_user | |
| signoff.save | |
| #UserMailer.deliver_new_project_notice(@lead.user, project) | |
| UserMailer.deliver_final_approval_notice(@lead.user, @lead) | |
| UserMailer.deliver_final_approval_report(@lead.user, @lead) | |
| end | |
| end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| (in C:/repo-stage) | |
| /search {:controller=>"leads", :action=>"search"} | |
| / {:controller=>"leads", :action=>"index"} | |
| /search {:controller=>"leads_controller", :action=>"search"} | |
| / {:controller=>"leads_controller", :action=>"index"} | |
| site_search /search {:controller=>"front", :action=>"search"} | |
| root / {:controller=>"front", :action=>"index"} | |
| engineer_locations GET /engineer_locations(.:format) {:controller=>"engineer_locations", :action=>"index"} | |
| new_engineer_location GET /engineer_locations/new(.:format) {:controller=>"engineer_locations", :action=>"new"} | |
| create_engineer_location POST /engineer_locations(.:format) {:controller=>"engineer_locations", :action=>"create"} | |
| update_engineer_location PUT /engineer_locations/:id(.:format) {:controller=>"engineer_locations", :action=>"update"} | |
| destroy_engineer_location DELETE /engineer_locations/:id(.:format) {:controller=>"engineer_locations", :action=>"destroy"} | |
| complete_name_companies GET /companies/complete_name(.:format) {:controller=>"companies", :action=>"complete_name"} | |
| target_companies GET /companies/target(.:format) {:controller=>"companies", :action=>"target"} | |
| companies GET /companies(.:format) {:controller=>"companies", :action=>"index"} | |
| new_company GET /companies/new(.:format) {:controller=>"companies", :action=>"new"} | |
| edit_company GET /companies/:id/edit(.:format) {:controller=>"companies", :action=>"edit"} | |
| company GET /companies/:id(.:format) {:controller=>"companies", :action=>"show"} | |
| create_company POST /companies(.:format) {:controller=>"companies", :action=>"create"} | |
| update_company PUT /companies/:id(.:format) {:controller=>"companies", :action=>"update"} | |
| destroy_company DELETE /companies/:id(.:format) {:controller=>"companies", :action=>"destroy"} | |
| graph_engineers GET /engineers/graph(.:format) {:controller=>"engineers", :action=>"graph"} | |
| availability_graph_engineers GET /engineers/availability_graph(.:format) {:controller=>"engineers", :action=>"availability_graph"} | |
| complete_name_engineers GET /engineers/complete_name(.:format) {:controller=>"engineers", :action=>"complete_name"} | |
| engineers GET /engineers(.:format) {:controller=>"engineers", :action=>"index"} | |
| new_engineer GET /engineers/new(.:format) {:controller=>"engineers", :action=>"new"} | |
| edit_engineer GET /engineers/:id/edit(.:format) {:controller=>"engineers", :action=>"edit"} | |
| engineer GET /engineers/:id(.:format) {:controller=>"engineers", :action=>"show"} | |
| create_engineer POST /engineers(.:format) {:controller=>"engineers", :action=>"create"} | |
| update_engineer PUT /engineers/:id(.:format) {:controller=>"engineers", :action=>"update"} | |
| destroy_engineer DELETE /engineers/:id(.:format) {:controller=>"engineers", :action=>"destroy"} | |
| complete_name_users GET /users/complete_name(.:format) {:controller=>"users", :action=>"complete_name"} | |
| do_user_reset_password PUT /users/:id/reset_password(.:format) {:controller=>"users", :action=>"do_reset_password"} | |
| user_reset_password GET /users/:id/reset_password(.:format) {:controller=>"users", :action=>"reset_password"} | |
| PUT /users/:id/deactivate_user(.:format) {:controller=>"users", :action=>"do_deactivate_user"} | |
| GET /users/:id/deactivate_user(.:format) {:controller=>"users", :action=>"deactivate_user"} | |
| do_user_deactivate_user PUT /users/:id/deactivate_user(.:format) {:controller=>"users", :action=>"do_deactivate_user"} | |
| user_deactivate_user GET /users/:id/deactivate_user(.:format) {:controller=>"users", :action=>"deactivate_user"} | |
| users GET /users(.:format) {:controller=>"users", :action=>"index"} | |
| new_user GET /users/new(.:format) {:controller=>"users", :action=>"new"} | |
| edit_user GET /users/:id/edit(.:format) {:controller=>"users", :action=>"edit"} | |
| user GET /users/:id(.:format) {:controller=>"users", :action=>"show"} | |
| create_user POST /users(.:format) {:controller=>"users", :action=>"create"} | |
| update_user PUT /users/:id(.:format) {:controller=>"users", :action=>"update"} | |
| destroy_user DELETE /users/:id(.:format) {:controller=>"users", :action=>"destroy"} | |
| user_account GET /users/:id/account(.:format) {:controller=>"users", :action=>"account"} | |
| user_login /login(.:format) {:controller=>"users", :action=>"login"} | |
| user_logout /logout(.:format) {:controller=>"users", :action=>"logout"} | |
| user_forgot_password /forgot_password(.:format) {:controller=>"users", :action=>"forgot_password"} | |
| quarter_projects GET /projects/quarter(.:format) {:controller=>"projects", :action=>"quarter"} | |
| quarter_graph_projects GET /projects/quarter_graph(.:format) {:controller=>"projects", :action=>"quarter_graph"} | |
| do_project_finish PUT /projects/:id/finish(.:format) {:controller=>"projects", :action=>"do_finish"} | |
| project_finish GET /projects/:id/finish(.:format) {:controller=>"projects", :action=>"finish"} | |
| do_project_reopen PUT /projects/:id/reopen(.:format) {:controller=>"projects", :action=>"do_reopen"} | |
| project_reopen GET /projects/:id/reopen(.:format) {:controller=>"projects", :action=>"reopen"} | |
| projects GET /projects(.:format) {:controller=>"projects", :action=>"index"} | |
| edit_project GET /projects/:id/edit(.:format) {:controller=>"projects", :action=>"edit"} | |
| project GET /projects/:id(.:format) {:controller=>"projects", :action=>"show"} | |
| update_project PUT /projects/:id(.:format) {:controller=>"projects", :action=>"update"} | |
| destroy_project DELETE /projects/:id(.:format) {:controller=>"projects", :action=>"destroy"} | |
| new_project_for_lead GET /leads/:lead_id/projects/new(.:format) {:controller=>"projects", :action=>"new_for_lead"} | |
| create_project_for_lead POST /leads/:lead_id/projects(.:format) {:controller=>"projects", :action=>"create_for_lead"} | |
| complete_name_contacts GET /contacts/complete_name(.:format) {:controller=>"contacts", :action=>"complete_name"} | |
| target_contacts GET /contacts/target(.:format) {:controller=>"contacts", :action=>"target"} | |
| contacts GET /contacts(.:format) {:controller=>"contacts", :action=>"index"} | |
| edit_contact GET /contacts/:id/edit(.:format) {:controller=>"contacts", :action=>"edit"} | |
| contact GET /contacts/:id(.:format) {:controller=>"contacts", :action=>"show"} | |
| update_contact PUT /contacts/:id(.:format) {:controller=>"contacts", :action=>"update"} | |
| destroy_contact DELETE /contacts/:id(.:format) {:controller=>"contacts", :action=>"destroy"} | |
| new_contact_for_company GET /companies/:company_id/contacts/new(.:format) {:controller=>"contacts", :action=>"new_for_company"} | |
| create_contact_for_company POST /companies/:company_id/contacts(.:format) {:controller=>"contacts", :action=>"create_for_company"} | |
| bidforms GET /bidforms(.:format) {:controller=>"bidforms", :action=>"index"} | |
| new_bidform GET /bidforms/new(.:format) {:controller=>"bidforms", :action=>"new"} | |
| edit_bidform GET /bidforms/:id/edit(.:format) {:controller=>"bidforms", :action=>"edit"} | |
| bidform GET /bidforms/:id(.:format) {:controller=>"bidforms", :action=>"show"} | |
| create_bidform POST /bidforms(.:format) {:controller=>"bidforms", :action=>"create"} | |
| update_bidform PUT /bidforms/:id(.:format) {:controller=>"bidforms", :action=>"update"} | |
| destroy_bidform DELETE /bidforms/:id(.:format) {:controller=>"bidforms", :action=>"destroy"} | |
| complete_engineer_assignments GET /assignments/complete_engineer(.:format) {:controller=>"assignments", :action=>"complete_engineer"} | |
| do_assignment_finish PUT /assignments/:id/finish(.:format) {:controller=>"assignments", :action=>"do_finish"} | |
| assignment_finish GET /assignments/:id/finish(.:format) {:controller=>"assignments", :action=>"finish"} | |
| do_assignment_extension PUT /assignments/:id/extension(.:format) {:controller=>"assignments", :action=>"do_extension"} | |
| assignment_extension GET /assignments/:id/extension(.:format) {:controller=>"assignments", :action=>"extension"} | |
| do_assignment_reopen PUT /assignments/:id/reopen(.:format) {:controller=>"assignments", :action=>"do_reopen"} | |
| assignment_reopen GET /assignments/:id/reopen(.:format) {:controller=>"assignments", :action=>"reopen"} | |
| assignments GET /assignments(.:format) {:controller=>"assignments", :action=>"index"} | |
| new_assignment GET /assignments/new(.:format) {:controller=>"assignments", :action=>"new"} | |
| edit_assignment GET /assignments/:id/edit(.:format) {:controller=>"assignments", :action=>"edit"} | |
| assignment GET /assignments/:id(.:format) {:controller=>"assignments", :action=>"show"} | |
| create_assignment POST /assignments(.:format) {:controller=>"assignments", :action=>"create"} | |
| update_assignment PUT /assignments/:id(.:format) {:controller=>"assignments", :action=>"update"} | |
| destroy_assignment DELETE /assignments/:id(.:format) {:controller=>"assignments", :action=>"destroy"} | |
| new_assignment_for_project GET /projects/:project_id/assignments/new(.:format) {:controller=>"assignments", :action=>"new_for_project"} | |
| create_assignment_for_project POST /projects/:project_id/assignments(.:format) {:controller=>"assignments", :action=>"create_for_project"} | |
| signoffs GET /signoffs(.:format) {:controller=>"signoffs", :action=>"index"} | |
| new_signoff GET /signoffs/new(.:format) {:controller=>"signoffs", :action=>"new"} | |
| edit_signoff GET /signoffs/:id/edit(.:format) {:controller=>"signoffs", :action=>"edit"} | |
| signoff GET /signoffs/:id(.:format) {:controller=>"signoffs", :action=>"show"} | |
| create_signoff POST /signoffs(.:format) {:controller=>"signoffs", :action=>"create"} | |
| update_signoff PUT /signoffs/:id(.:format) {:controller=>"signoffs", :action=>"update"} | |
| destroy_signoff DELETE /signoffs/:id(.:format) {:controller=>"signoffs", :action=>"destroy"} | |
| new_signoff_for_lead GET /leads/:lead_id/signoffs/new(.:format) {:controller=>"signoffs", :action=>"new_for_lead"} | |
| create_signoff_for_lead POST /leads/:lead_id/signoffs(.:format) {:controller=>"signoffs", :action=>"create_for_lead"} | |
| pipeline_leads GET /leads/pipeline(.:format) {:controller=>"leads", :action=>"pipeline"} | |
| results_leads GET /leads/results(.:format) {:controller=>"leads", :action=>"results"} | |
| approvals_leads GET /leads/approvals(.:format) {:controller=>"leads", :action=>"approvals"} | |
| weekly_leads GET /leads/weekly(.:format) {:controller=>"leads", :action=>"weekly"} | |
| quarter_leads GET /leads/quarter(.:format) {:controller=>"leads", :action=>"quarter"} | |
| quarter_graph_leads GET /leads/quarter_graph(.:format) {:controller=>"leads", :action=>"quarter_graph"} | |
| do_lead_newlead POST /leads/newlead(.:format) {:controller=>"leads", :action=>"do_newlead"} | |
| lead_newlead GET /leads/newlead(.:format) {:controller=>"leads", :action=>"newlead"} | |
| do_lead_win PUT /leads/:id/win(.:format) {:controller=>"leads", :action=>"do_win"} | |
| lead_win GET /leads/:id/win(.:format) {:controller=>"leads", :action=>"win"} | |
| do_lead_advance PUT /leads/:id/advance(.:format) {:controller=>"leads", :action=>"do_advance"} | |
| lead_advance GET /leads/:id/advance(.:format) {:controller=>"leads", :action=>"advance"} | |
| do_lead_reset PUT /leads/:id/reset(.:format) {:controller=>"leads", :action=>"do_reset"} | |
| lead_reset GET /leads/:id/reset(.:format) {:controller=>"leads", :action=>"reset"} | |
| do_lead_authorise_bid_effort PUT /leads/:id/authorise_bid_effort(.:format) {:controller=>"leads", :action=>"do_authorise_bid_effort"} | |
| lead_authorise_bid_effort GET /leads/:id/authorise_bid_effort(.:format) {:controller=>"leads", :action=>"authorise_bid_effort"} | |
| do_lead_get_approval PUT /leads/:id/get_approval(.:format) {:controller=>"leads", :action=>"do_get_approval"} | |
| lead_get_approval GET /leads/:id/get_approval(.:format) {:controller=>"leads", :action=>"get_approval"} | |
| do_lead_approve PUT /leads/:id/approve(.:format) {:controller=>"leads", :action=>"do_approve"} | |
| lead_approve GET /leads/:id/approve(.:format) {:controller=>"leads", :action=>"approve"} | |
| PUT /leads/:id/withdraw(.:format) {:controller=>"leads", :action=>"do_withdraw"} | |
| GET /leads/:id/withdraw(.:format) {:controller=>"leads", :action=>"withdraw"} | |
| do_lead_withdraw PUT /leads/:id/withdraw(.:format) {:controller=>"leads", :action=>"do_withdraw"} | |
| lead_withdraw GET /leads/:id/withdraw(.:format) {:controller=>"leads", :action=>"withdraw"} | |
| PUT /leads/:id/lose(.:format) {:controller=>"leads", :action=>"do_lose"} | |
| GET /leads/:id/lose(.:format) {:controller=>"leads", :action=>"lose"} | |
| PUT /leads/:id/lose(.:format) {:controller=>"leads", :action=>"do_lose"} | |
| GET /leads/:id/lose(.:format) {:controller=>"leads", :action=>"lose"} | |
| PUT /leads/:id/lose(.:format) {:controller=>"leads", :action=>"do_lose"} | |
| GET /leads/:id/lose(.:format) {:controller=>"leads", :action=>"lose"} | |
| do_lead_lose PUT /leads/:id/lose(.:format) {:controller=>"leads", :action=>"do_lose"} | |
| lead_lose GET /leads/:id/lose(.:format) {:controller=>"leads", :action=>"lose"} | |
| PUT /leads/:id/kill(.:format) {:controller=>"leads", :action=>"do_kill"} | |
| GET /leads/:id/kill(.:format) {:controller=>"leads", :action=>"kill"} | |
| PUT /leads/:id/kill(.:format) {:controller=>"leads", :action=>"do_kill"} | |
| GET /leads/:id/kill(.:format) {:controller=>"leads", :action=>"kill"} | |
| PUT /leads/:id/kill(.:format) {:controller=>"leads", :action=>"do_kill"} | |
| GET /leads/:id/kill(.:format) {:controller=>"leads", :action=>"kill"} | |
| do_lead_kill PUT /leads/:id/kill(.:format) {:controller=>"leads", :action=>"do_kill"} | |
| lead_kill GET /leads/:id/kill(.:format) {:controller=>"leads", :action=>"kill"} | |
| PUT /leads/:id/reopen(.:format) {:controller=>"leads", :action=>"do_reopen"} | |
| GET /leads/:id/reopen(.:format) {:controller=>"leads", :action=>"reopen"} | |
| PUT /leads/:id/reopen(.:format) {:controller=>"leads", :action=>"do_reopen"} | |
| GET /leads/:id/reopen(.:format) {:controller=>"leads", :action=>"reopen"} | |
| do_lead_reopen PUT /leads/:id/reopen(.:format) {:controller=>"leads", :action=>"do_reopen"} | |
| lead_reopen GET /leads/:id/reopen(.:format) {:controller=>"leads", :action=>"reopen"} | |
| do_lead_to_extend PUT /leads/:id/to_extend(.:format) {:controller=>"leads", :action=>"do_to_extend"} | |
| lead_to_extend GET /leads/:id/to_extend(.:format) {:controller=>"leads", :action=>"to_extend"} | |
| do_lead_win_extension PUT /leads/:id/win_extension(.:format) {:controller=>"leads", :action=>"do_win_extension"} | |
| lead_win_extension GET /leads/:id/win_extension(.:format) {:controller=>"leads", :action=>"win_extension"} | |
| do_lead_no_extension PUT /leads/:id/no_extension(.:format) {:controller=>"leads", :action=>"do_no_extension"} | |
| lead_no_extension GET /leads/:id/no_extension(.:format) {:controller=>"leads", :action=>"no_extension"} | |
| leads GET /leads(.:format) {:controller=>"leads", :action=>"index"} | |
| edit_lead GET /leads/:id/edit(.:format) {:controller=>"leads", :action=>"edit"} | |
| lead GET /leads/:id(.:format) {:controller=>"leads", :action=>"show"} | |
| update_lead PUT /leads/:id(.:format) {:controller=>"leads", :action=>"update"} | |
| destroy_lead DELETE /leads/:id(.:format) {:controller=>"leads", :action=>"destroy"} | |
| new_lead_for_contact GET /contacts/:contact_id/leads/new(.:format) {:controller=>"leads", :action=>"new_for_contact"} | |
| create_lead_for_contact POST /contacts/:contact_id/leads(.:format) {:controller=>"leads", :action=>"create_for_contact"} | |
| weekly_calls GET /calls/weekly(.:format) {:controller=>"calls", :action=>"weekly"} | |
| statistics_calls GET /calls/statistics(.:format) {:controller=>"calls", :action=>"statistics"} | |
| allcalls_calls GET /calls/allcalls(.:format) {:controller=>"calls", :action=>"allcalls"} | |
| quarter_calls GET /calls/quarter(.:format) {:controller=>"calls", :action=>"quarter"} | |
| quarter_graph_calls GET /calls/quarter_graph(.:format) {:controller=>"calls", :action=>"quarter_graph"} | |
| calls GET /calls(.:format) {:controller=>"calls", :action=>"index"} | |
| new_call GET /calls/new(.:format) {:controller=>"calls", :action=>"new"} | |
| edit_call GET /calls/:id/edit(.:format) {:controller=>"calls", :action=>"edit"} | |
| call GET /calls/:id(.:format) {:controller=>"calls", :action=>"show"} | |
| create_call POST /calls(.:format) {:controller=>"calls", :action=>"create"} | |
| update_call PUT /calls/:id(.:format) {:controller=>"calls", :action=>"update"} | |
| destroy_call DELETE /calls/:id(.:format) {:controller=>"calls", :action=>"destroy"} | |
| create_call_for_contact POST /contacts/:contact_id/calls(.:format) {:controller=>"calls", :action=>"create_for_contact"} | |
| complete_contact_todos GET /todos/complete_contact(.:format) {:controller=>"todos", :action=>"complete_contact"} | |
| todos GET /todos(.:format) {:controller=>"todos", :action=>"index"} | |
| new_todo GET /todos/new(.:format) {:controller=>"todos", :action=>"new"} | |
| edit_todo GET /todos/:id/edit(.:format) {:controller=>"todos", :action=>"edit"} | |
| todo GET /todos/:id(.:format) {:controller=>"todos", :action=>"show"} | |
| create_todo POST /todos(.:format) {:controller=>"todos", :action=>"create"} | |
| update_todo PUT /todos/:id(.:format) {:controller=>"todos", :action=>"update"} | |
| destroy_todo DELETE /todos/:id(.:format) {:controller=>"todos", :action=>"destroy"} | |
| create_todo_for_contact POST /contacts/:contact_id/todos(.:format) {:controller=>"todos", :action=>"create_for_contact"} | |
| complete_engineer_offers GET /offers/complete_engineer(.:format) {:controller=>"offers", :action=>"complete_engineer"} | |
| offers GET /offers(.:format) {:controller=>"offers", :action=>"index"} | |
| new_offer GET /offers/new(.:format) {:controller=>"offers", :action=>"new"} | |
| edit_offer GET /offers/:id/edit(.:format) {:controller=>"offers", :action=>"edit"} | |
| offer GET /offers/:id(.:format) {:controller=>"offers", :action=>"show"} | |
| create_offer POST /offers(.:format) {:controller=>"offers", :action=>"create"} | |
| update_offer PUT /offers/:id(.:format) {:controller=>"offers", :action=>"update"} | |
| destroy_offer DELETE /offers/:id(.:format) {:controller=>"offers", :action=>"destroy"} | |
| new_offer_for_lead GET /leads/:lead_id/offers/new(.:format) {:controller=>"offers", :action=>"new_for_lead"} | |
| create_offer_for_lead POST /leads/:lead_id/offers(.:format) {:controller=>"offers", :action=>"create_for_lead"} | |
| dryml_support /dryml/:action {:controller=>"hobo/dryml/dryml_support"} | |
| dev_support /dev/:action {:controller=>"hobo/dev"} | |
| GET /engineers(.:format) {:controller=>"engineers", :action=>"index"} | |
| POST /engineers(.:format) {:controller=>"engineers", :action=>"create"} | |
| GET /engineers/new(.:format) {:controller=>"engineers", :action=>"new"} | |
| GET /engineers/:id/edit(.:format) {:controller=>"engineers", :action=>"edit"} | |
| avatars_engineer GET /engineers/:id/avatars(.:format) {:controller=>"engineers", :action=>"avatars"} | |
| GET /engineers/:id(.:format) {:controller=>"engineers", :action=>"show"} | |
| PUT /engineers/:id(.:format) {:controller=>"engineers", :action=>"update"} | |
| DELETE /engineers/:id(.:format) {:controller=>"engineers", :action=>"destroy"} | |
| /:controller/:action/:id | |
| /:controller/:action/:id(.:format) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment