Class: ODDB::State::Companies::RootCompany

Inherits:
UserCompany show all
Defined in:
src/state/admin/root.rb,
src/state/companies/company.rb

Constant Summary

VIEW =
View::Companies::RootCompany

Constants inherited from UserCompany

LOGO_PATH, VIEW

Constants inherited from Company

LIMITED, VIEW

Constants inherited from Global

HOME_STATE, ZONE, ZONE_NAVIGATION

Constants inherited from Global

DIRECT_EVENT, GLOBAL_MAP, HOME_STATE, LIMITED, PRINT_STATES, READONLY_STATES, RESOLVE_STATES, REVERSE_MAP, VIEW, ZONE_NAVIGATION

Constants included from UmlautSort

FILTER_PAIRS

Instance Method Summary (collapse)

Methods inherited from UserCompany

#set_pass

Methods inherited from Company

#snapback_event

Methods inherited from Global

#limit_state

Methods inherited from Global

#_search_drugs, #_search_drugs_state, #_trigger, #add_to_interaction_basket, #allowed?, #atc_chooser, #checkout, #clear_interaction_basket, #creditable?, #direct_request_path, #doctorlist, #download, #export_csv, #extend, #fachinfo, #feedbacks, #help_navigation, #home_navigation, #home_state, #hospitallist, #interaction_basket, #limit_state, #limited?, #logout, #navigation, #notify, #password_reset, #paypal_return, #powerlink, #print, #proceed_download, #proceed_poweruser, #resolve, #resolve_state, #rss, #search, #show, #snapback_event, #sort, #sponsorlink, #suggest_address, #switch, #unique_email, #user_input, #user_navigation, #ywesee_contact, #zone_navigation, #zones

Methods included from Admin::LoginMethods

#autologin, #login

Methods included from UmlautSort

#sort_model, #umlaut_filter

Instance Method Details

- (Object) ajax



134
135
136
137
138
139
140
141
142
# File 'src/state/companies/company.rb', line 134

def ajax
  ba = @session.user_input(:business_area)
  if(@model.is_a?(Persistence::CreateItem))
    @model.carry(:business_area, ba)
  else
    @session.app.update(@model.pointer, {:business_area => ba}, unique_email)
  end
  AjaxCompany.new(@session, @model)
end

- (Object) delete



143
144
145
146
147
148
149
150
# File 'src/state/companies/company.rb', line 143

def delete
  if(@model.empty?)
    @session.app.delete(@model.pointer)
    State::Companies::CompanyList.new(@session, @session.app.companies)
  else
    State::Companies::MergeCompanies.new(@session, @model)
  end
end

- (Object) update



151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
# File 'src/state/companies/company.rb', line 151

def update
  keys = [
    :address,
    :address_email,
    :business_area,
    :city,
    :cl_status,
    :competition_email,
    :complementary_type,
    :contact,
    :contact_email,
    :disable_invoice_fachinfo,
    :disable_invoice_patinfo,
    :disable_patinfo,
    :ean13,
    :fax,
    :fon,
    :force_new_ydim_debitor,
    :generic_type,
    :invoice_date_fachinfo,
    :invoice_date_index,
    :invoice_date_lookandfeel,
    :invoice_date_patinfo,
    :invoice_htmlinfos,
    :invoice_email,
    :limit_invoice_duration,
    :logo_file,
    :lookandfeel_member_count,
    :name,
    :price_fachinfo,
    :price_index,
    :price_index_package,
    :price_lookandfeel,
    :price_lookandfeel_member,
    :price_patinfo,
    :plz,
    :powerlink,
    :regulatory_email,
    :swissmedic_email,
    :swissmedic_salutation,
    :url,
    :ydim_id,
  ]
  do_update(keys)
end