erp_work_effort 4.0.0 → 4.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/controllers/api/v1/projects_controller.rb +25 -0
- data/app/controllers/api/v1/time_entries_controller.rb +313 -0
- data/app/controllers/api/v1/transportation_routes_controller.rb +9 -0
- data/app/controllers/api/v1/work_effort_associations_controller.rb +102 -0
- data/app/controllers/api/v1/work_effort_party_assignments_controller.rb +136 -0
- data/app/controllers/api/v1/work_effort_types_controller.rb +120 -0
- data/app/controllers/api/v1/work_efforts_controller.rb +284 -0
- data/app/models/associated_transportation_route.rb +8 -5
- data/app/models/cal_evt_party_role.rb +9 -0
- data/app/models/calendar_event.rb +46 -0
- data/app/models/calendar_invite.rb +10 -0
- data/app/models/candidate_submission.rb +37 -0
- data/app/models/experience.rb +11 -0
- data/app/models/extensions/biz_txn_events.rb +35 -0
- data/app/models/extensions/finacial_txns.rb +27 -0
- data/app/models/extensions/order_line_item.rb +12 -0
- data/app/models/extensions/party.rb +204 -0
- data/app/models/party_skill.rb +2 -0
- data/app/models/pay_period.rb +59 -0
- data/app/models/position.rb +8 -0
- data/app/models/position_fulfillment.rb +8 -0
- data/app/models/position_type.rb +12 -0
- data/app/models/project.rb +59 -0
- data/app/models/requirement.rb +2 -0
- data/app/models/resume.rb +11 -0
- data/app/models/shift.rb +22 -0
- data/app/models/skill_type.rb +8 -0
- data/app/models/staffing_position.rb +9 -0
- data/app/models/time_entry.rb +260 -0
- data/app/models/timesheet.rb +194 -0
- data/app/models/timesheet_party_role.rb +21 -0
- data/app/models/transportation_route.rb +103 -18
- data/app/models/transportation_route_segment.rb +44 -0
- data/app/models/transportation_route_stop.rb +19 -0
- data/app/models/wc_code.rb +7 -0
- data/app/models/work_effort.rb +512 -30
- data/app/models/work_effort_association.rb +7 -0
- data/app/models/work_effort_association_type.rb +5 -0
- data/app/models/work_effort_biz_txn_event.rb +22 -0
- data/app/models/work_effort_party_assignment.rb +140 -3
- data/app/models/work_effort_type.rb +5 -0
- data/config/routes.rb +54 -11
- data/db/data_migrations/20150709053041_add_skill_types.rb +27 -0
- data/db/data_migrations/20150709055922_add_position_types.rb +27 -0
- data/db/data_migrations/20150711220000_add_task_tracked_statuses.rb +25 -0
- data/db/data_migrations/20150712081804_add_work_effort_types.rb +23 -0
- data/db/data_migrations/20150718052204_add_project_tracked_statuses.rb +24 -0
- data/db/data_migrations/20150718054404_add_project_party_role_types.rb +14 -0
- data/db/data_migrations/20150812150320_add_work_effort_dependency_types.rb +35 -0
- data/db/migrate/20100220000000_base_work_efforts.rb +310 -89
- data/db/migrate/20150227174108_create_staffing_positions.rb +11 -0
- data/db/migrate/20150305194158_create_wc_codes.rb +24 -0
- data/db/migrate/20150313134411_create_shifts.rb +28 -0
- data/db/migrate/20150325195749_create_candidate_submissions.rb +22 -0
- data/db/migrate/20150327115910_resumes.rb +15 -0
- data/db/migrate/20150401060938_add_resume_parser_statuses.rb +14 -0
- data/db/migrate/20150607181734_create_calendar_events.rb +24 -0
- data/db/migrate/20150616174228_create_cal_evt_party_roles.rb +19 -0
- data/db/migrate/20150707164520_create_calendar_invites.rb +21 -0
- data/db/migrate/20150718052404_create_projects.rb +20 -0
- data/db/migrate/20150812191812_update_work_efforts.rb +59 -0
- data/db/migrate/20150824152639_add_sequence_to_work_effort.rb +9 -0
- data/db/migrate/20150830133951_add_work_effort_biz_txn_events.rb +21 -0
- data/db/migrate/20150908200612_update_time_entries.rb +70 -0
- data/db/migrate/20151115180427_add_defaults_for_work_effort.rb +36 -0
- data/db/migrate/20151218195330_update_transportation_routes.rb +72 -0
- data/db/migrate/20160310163052_add_created_by_updated_by_to_erp_work_effort.rb +63 -0
- data/db/migrate/20160418115227_add_created_by_updated_by_to_skill_type.rb +34 -0
- data/lib/erp_work_effort.rb +3 -0
- data/lib/erp_work_effort/config.rb +33 -0
- data/lib/erp_work_effort/engine.rb +0 -4
- data/lib/erp_work_effort/services/unit_converter.rb +284 -0
- data/lib/erp_work_effort/version.rb +1 -1
- data/lib/tasks/populate_model_data.rake +19 -0
- data/lib/tasks/resume_parser.rake +18 -0
- metadata +80 -16
- data/app/controllers/erp_work_effort/erp_app/organizer/tasks/base_controller.rb +0 -13
- data/app/controllers/erp_work_effort/erp_app/organizer/tasks/work_efforts_controller.rb +0 -128
- data/db/data_migrations/20131213151309_create_tasks_organizer_application.rb +0 -14
- data/db/migrate/20130829153419_base_routes.rb +0 -93
- data/db/migrate/20131213140617_add_work_effort_role_assignments.rb +0 -16
- data/db/migrate/20131213144223_add_work_item_to_work_effort.rb +0 -8
- data/db/migrate/20140106184615_update_work_effort_item_id_to_int.rb +0 -27
@@ -0,0 +1,19 @@
|
|
1
|
+
namespace :resume_parser do
|
2
|
+
desc "Populate Model data for all pending resumes"
|
3
|
+
task :populate_model_data => :environment do
|
4
|
+
pending_resumes = Resume.with_current_status
|
5
|
+
.where('tracked_status_type_id = ?',
|
6
|
+
TrackedStatusType.find_by_ancestor_iids(['resume_parser', 'pending']))
|
7
|
+
.readonly(false)
|
8
|
+
pending_resumes_count = pending_resumes.count
|
9
|
+
if pending_resumes_count == 0
|
10
|
+
puts "No pending resumes to be populated"
|
11
|
+
else
|
12
|
+
pending_resumes.each_with_index do |pending_resume,index|
|
13
|
+
puts "Populating model data: #{index+1} out of #{pending_resumes_count}"
|
14
|
+
pending_resume.populate_model_data
|
15
|
+
puts "#{index+1} out of #{pending_resumes_count} #{"resume".pluralize(pending_resumes_count)} populated"
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
@@ -0,0 +1,18 @@
|
|
1
|
+
namespace :resume_parser do
|
2
|
+
desc "Parses resume file.Specify a file name as 'rake resume_parser:parse <file name>'"
|
3
|
+
task :parse => :environment do
|
4
|
+
if (ARGV.size < 2)
|
5
|
+
puts 'Please specify a file name as "rake resume_parser:parse <file name>"'
|
6
|
+
else
|
7
|
+
file_name = ARGV.last
|
8
|
+
resume = Resume.new
|
9
|
+
|
10
|
+
puts "--------Parsing file #{file_name}--------"
|
11
|
+
|
12
|
+
if resume.parse(file_name)
|
13
|
+
puts "--------file #{file_name} parsed--------"
|
14
|
+
end
|
15
|
+
task file_name.to_sym do ; end
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
metadata
CHANGED
@@ -1,57 +1,71 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: erp_work_effort
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 4.
|
4
|
+
version: 4.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Rick Koloski, Russell Holmes
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2016-06-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: savon
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: 2.5.0
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - "~>"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: 2.5.0
|
13
27
|
- !ruby/object:Gem::Dependency
|
14
28
|
name: erp_tech_svcs
|
15
29
|
requirement: !ruby/object:Gem::Requirement
|
16
30
|
requirements:
|
17
31
|
- - "~>"
|
18
32
|
- !ruby/object:Gem::Version
|
19
|
-
version: '4.
|
33
|
+
version: '4.2'
|
20
34
|
type: :runtime
|
21
35
|
prerelease: false
|
22
36
|
version_requirements: !ruby/object:Gem::Requirement
|
23
37
|
requirements:
|
24
38
|
- - "~>"
|
25
39
|
- !ruby/object:Gem::Version
|
26
|
-
version: '4.
|
40
|
+
version: '4.2'
|
27
41
|
- !ruby/object:Gem::Dependency
|
28
42
|
name: erp_inventory
|
29
43
|
requirement: !ruby/object:Gem::Requirement
|
30
44
|
requirements:
|
31
45
|
- - "~>"
|
32
46
|
- !ruby/object:Gem::Version
|
33
|
-
version: '4.
|
47
|
+
version: '4.2'
|
34
48
|
type: :runtime
|
35
49
|
prerelease: false
|
36
50
|
version_requirements: !ruby/object:Gem::Requirement
|
37
51
|
requirements:
|
38
52
|
- - "~>"
|
39
53
|
- !ruby/object:Gem::Version
|
40
|
-
version: '4.
|
54
|
+
version: '4.2'
|
41
55
|
- !ruby/object:Gem::Dependency
|
42
56
|
name: erp_dev_svcs
|
43
57
|
requirement: !ruby/object:Gem::Requirement
|
44
58
|
requirements:
|
45
59
|
- - "~>"
|
46
60
|
- !ruby/object:Gem::Version
|
47
|
-
version: '4.
|
61
|
+
version: '4.2'
|
48
62
|
type: :development
|
49
63
|
prerelease: false
|
50
64
|
version_requirements: !ruby/object:Gem::Requirement
|
51
65
|
requirements:
|
52
66
|
- - "~>"
|
53
67
|
- !ruby/object:Gem::Version
|
54
|
-
version: '4.
|
68
|
+
version: '4.2'
|
55
69
|
description: Description of ErpWorkEffort.
|
56
70
|
email:
|
57
71
|
- russonrails@gmail.com
|
@@ -62,30 +76,56 @@ files:
|
|
62
76
|
- GPL-3-LICENSE
|
63
77
|
- README.rdoc
|
64
78
|
- Rakefile
|
65
|
-
- app/controllers/
|
66
|
-
- app/controllers/
|
79
|
+
- app/controllers/api/v1/projects_controller.rb
|
80
|
+
- app/controllers/api/v1/time_entries_controller.rb
|
81
|
+
- app/controllers/api/v1/transportation_routes_controller.rb
|
82
|
+
- app/controllers/api/v1/work_effort_associations_controller.rb
|
83
|
+
- app/controllers/api/v1/work_effort_party_assignments_controller.rb
|
84
|
+
- app/controllers/api/v1/work_effort_types_controller.rb
|
85
|
+
- app/controllers/api/v1/work_efforts_controller.rb
|
67
86
|
- app/models/associated_transportation_route.rb
|
68
87
|
- app/models/associated_work_effort.rb
|
88
|
+
- app/models/cal_evt_party_role.rb
|
89
|
+
- app/models/calendar_event.rb
|
90
|
+
- app/models/calendar_invite.rb
|
91
|
+
- app/models/candidate_submission.rb
|
69
92
|
- app/models/deliverable.rb
|
70
93
|
- app/models/deliverable_type.rb
|
94
|
+
- app/models/experience.rb
|
95
|
+
- app/models/extensions/biz_txn_events.rb
|
96
|
+
- app/models/extensions/finacial_txns.rb
|
97
|
+
- app/models/extensions/order_line_item.rb
|
71
98
|
- app/models/extensions/party.rb
|
72
99
|
- app/models/good_type.rb
|
73
100
|
- app/models/party_fixed_asset_assignment.rb
|
74
101
|
- app/models/party_resource_availability.rb
|
75
102
|
- app/models/party_resource_availability_type.rb
|
76
103
|
- app/models/party_skill.rb
|
104
|
+
- app/models/pay_period.rb
|
105
|
+
- app/models/position.rb
|
106
|
+
- app/models/position_fulfillment.rb
|
107
|
+
- app/models/position_type.rb
|
108
|
+
- app/models/project.rb
|
77
109
|
- app/models/requirement.rb
|
78
110
|
- app/models/requirement_party_role.rb
|
79
111
|
- app/models/requirement_type.rb
|
112
|
+
- app/models/resume.rb
|
113
|
+
- app/models/shift.rb
|
80
114
|
- app/models/skill_type.rb
|
115
|
+
- app/models/staffing_position.rb
|
116
|
+
- app/models/time_entry.rb
|
117
|
+
- app/models/timesheet.rb
|
118
|
+
- app/models/timesheet_party_role.rb
|
81
119
|
- app/models/transportation_route.rb
|
82
120
|
- app/models/transportation_route_segment.rb
|
83
121
|
- app/models/transportation_route_stop.rb
|
84
122
|
- app/models/valid_work_assignment.rb
|
85
123
|
- app/models/valid_work_assignment_attribute.rb
|
124
|
+
- app/models/wc_code.rb
|
86
125
|
- app/models/work_effort.rb
|
87
126
|
- app/models/work_effort_association.rb
|
88
127
|
- app/models/work_effort_association_type.rb
|
128
|
+
- app/models/work_effort_biz_txn_event.rb
|
89
129
|
- app/models/work_effort_deliverable_produced.rb
|
90
130
|
- app/models/work_effort_fixed_asset_assignment.rb
|
91
131
|
- app/models/work_effort_fixed_asset_serviced.rb
|
@@ -102,21 +142,45 @@ files:
|
|
102
142
|
- app/models/work_order_item_fulfillment.rb
|
103
143
|
- app/models/work_requirement_fulfillment.rb
|
104
144
|
- config/routes.rb
|
105
|
-
- db/data_migrations/20131213151309_create_tasks_organizer_application.rb
|
106
145
|
- db/data_migrations/20131215225329_add_task_work_effort_types.rb
|
107
146
|
- db/data_migrations/20131215234936_add_task_statuses.rb
|
147
|
+
- db/data_migrations/20150709053041_add_skill_types.rb
|
148
|
+
- db/data_migrations/20150709055922_add_position_types.rb
|
149
|
+
- db/data_migrations/20150711220000_add_task_tracked_statuses.rb
|
150
|
+
- db/data_migrations/20150712081804_add_work_effort_types.rb
|
151
|
+
- db/data_migrations/20150718052204_add_project_tracked_statuses.rb
|
152
|
+
- db/data_migrations/20150718054404_add_project_party_role_types.rb
|
153
|
+
- db/data_migrations/20150812150320_add_work_effort_dependency_types.rb
|
108
154
|
- db/migrate/20100220000000_base_work_efforts.rb
|
109
|
-
- db/migrate/
|
110
|
-
- db/migrate/
|
111
|
-
- db/migrate/
|
112
|
-
- db/migrate/
|
155
|
+
- db/migrate/20150227174108_create_staffing_positions.rb
|
156
|
+
- db/migrate/20150305194158_create_wc_codes.rb
|
157
|
+
- db/migrate/20150313134411_create_shifts.rb
|
158
|
+
- db/migrate/20150325195749_create_candidate_submissions.rb
|
159
|
+
- db/migrate/20150327115910_resumes.rb
|
160
|
+
- db/migrate/20150401060938_add_resume_parser_statuses.rb
|
161
|
+
- db/migrate/20150607181734_create_calendar_events.rb
|
162
|
+
- db/migrate/20150616174228_create_cal_evt_party_roles.rb
|
163
|
+
- db/migrate/20150707164520_create_calendar_invites.rb
|
164
|
+
- db/migrate/20150718052404_create_projects.rb
|
165
|
+
- db/migrate/20150812191812_update_work_efforts.rb
|
166
|
+
- db/migrate/20150824152639_add_sequence_to_work_effort.rb
|
167
|
+
- db/migrate/20150830133951_add_work_effort_biz_txn_events.rb
|
168
|
+
- db/migrate/20150908200612_update_time_entries.rb
|
169
|
+
- db/migrate/20151115180427_add_defaults_for_work_effort.rb
|
170
|
+
- db/migrate/20151218195330_update_transportation_routes.rb
|
171
|
+
- db/migrate/20160310163052_add_created_by_updated_by_to_erp_work_effort.rb
|
172
|
+
- db/migrate/20160418115227_add_created_by_updated_by_to_skill_type.rb
|
113
173
|
- lib/erp_work_effort.rb
|
174
|
+
- lib/erp_work_effort/config.rb
|
114
175
|
- lib/erp_work_effort/engine.rb
|
115
176
|
- lib/erp_work_effort/extensions.rb
|
116
177
|
- lib/erp_work_effort/extensions/active_record/acts_as_routable.rb
|
117
178
|
- lib/erp_work_effort/extensions/active_record/acts_as_work_effort.rb
|
179
|
+
- lib/erp_work_effort/services/unit_converter.rb
|
118
180
|
- lib/erp_work_effort/version.rb
|
119
181
|
- lib/tasks/erp_work_effort_tasks.rake
|
182
|
+
- lib/tasks/populate_model_data.rake
|
183
|
+
- lib/tasks/resume_parser.rake
|
120
184
|
- spec/dummy/Rakefile
|
121
185
|
- spec/dummy/app/assets/javascripts/application.js
|
122
186
|
- spec/dummy/app/assets/stylesheets/application.css
|
@@ -197,7 +261,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
197
261
|
version: '0'
|
198
262
|
requirements: []
|
199
263
|
rubyforge_project:
|
200
|
-
rubygems_version: 2.
|
264
|
+
rubygems_version: 2.4.8
|
201
265
|
signing_key:
|
202
266
|
specification_version: 4
|
203
267
|
summary: Summary of ErpWorkEffort.
|
@@ -1,13 +0,0 @@
|
|
1
|
-
module ErpApp
|
2
|
-
module Organizer
|
3
|
-
module Tasks
|
4
|
-
class BaseController < ::ErpApp::Organizer::BaseController
|
5
|
-
|
6
|
-
def menu
|
7
|
-
render :json => [{:text => 'Menu Item', :leaf => true, :iconCls => 'icon-note_pinned', :applicationCardId => "tasks_example_panel"}]
|
8
|
-
end
|
9
|
-
|
10
|
-
end #BaseController
|
11
|
-
end #Tasks
|
12
|
-
end #Organizer
|
13
|
-
end #ErpApp
|
@@ -1,128 +0,0 @@
|
|
1
|
-
module ErpWorkEffort
|
2
|
-
module ErpApp
|
3
|
-
module Organizer
|
4
|
-
module Tasks
|
5
|
-
class WorkEffortsController < ::ErpApp::Organizer::BaseController
|
6
|
-
|
7
|
-
def role_types
|
8
|
-
data = RoleType.iid('task_master').self_and_descendants.collect{|item| item.to_hash(:only => [:id, :description])}
|
9
|
-
|
10
|
-
render :json => {success: true, role_types: data}
|
11
|
-
end
|
12
|
-
|
13
|
-
def work_effort_types
|
14
|
-
data = WorkEffortType.all.collect{|item| item.to_hash(:only => [:id, :description])}
|
15
|
-
|
16
|
-
render :json => {success: true, work_effort_types: data}
|
17
|
-
end
|
18
|
-
|
19
|
-
def task_count
|
20
|
-
party = params[:party_id].blank? ? nil : Party.find(params[:party_id])
|
21
|
-
|
22
|
-
if party
|
23
|
-
work_efforts_statement = WorkEffort.work_efforts_for_party(party, 'pending')
|
24
|
-
else
|
25
|
-
work_efforts_statement = WorkEffort.work_efforts_for_party(current_user.party, 'pending')
|
26
|
-
end
|
27
|
-
|
28
|
-
count = work_efforts_statement.count
|
29
|
-
|
30
|
-
render :json => {success: true, count: count}
|
31
|
-
end
|
32
|
-
|
33
|
-
def index
|
34
|
-
offset = params[:offset] || 0
|
35
|
-
limit = params[:limit] || 25
|
36
|
-
party = params[:party_id].blank? ? nil : Party.find(params[:party_id])
|
37
|
-
all_tasks = params[:all_tasks].blank? ? false : true
|
38
|
-
|
39
|
-
if all_tasks
|
40
|
-
work_efforts_statement = WorkEffort
|
41
|
-
elsif party
|
42
|
-
work_efforts_statement = WorkEffort.work_efforts_for_party(party)
|
43
|
-
else
|
44
|
-
work_efforts_statement = WorkEffort.work_efforts_for_party(current_user.party)
|
45
|
-
end
|
46
|
-
|
47
|
-
total = work_efforts_statement.count
|
48
|
-
work_efforts = work_efforts_statement.limit(limit).offset(offset)
|
49
|
-
|
50
|
-
work_efforts.sort!
|
51
|
-
|
52
|
-
data = work_efforts.sort.collect { |item| item.to_hash(
|
53
|
-
:only => [
|
54
|
-
:id,
|
55
|
-
:description,
|
56
|
-
:created_at,
|
57
|
-
:current_status,
|
58
|
-
],
|
59
|
-
:current_status_description => (TrackedStatusType.find_by_internal_identifier(item.current_status).description),
|
60
|
-
:assigned_parties => item.assigned_parties,
|
61
|
-
:assigned_roles => item.assigned_roles
|
62
|
-
)
|
63
|
-
}
|
64
|
-
|
65
|
-
render :json => {:success => true, :total => total, :work_efforts => data}
|
66
|
-
end
|
67
|
-
|
68
|
-
def create
|
69
|
-
result = {}
|
70
|
-
|
71
|
-
begin
|
72
|
-
ActiveRecord::Base.transaction do
|
73
|
-
estimated_completion_time = params[:estimated_completion_time].to_i
|
74
|
-
description = params[:description].strip
|
75
|
-
work_effort_type_id = params[:work_effort_type]
|
76
|
-
|
77
|
-
work_effort_type = WorkEffortType.find(work_effort_type_id)
|
78
|
-
|
79
|
-
work_effort = WorkEffort.new
|
80
|
-
work_effort.work_effort_type = work_effort_type
|
81
|
-
work_effort.description = description
|
82
|
-
work_effort.projected_completion_time = estimated_completion_time
|
83
|
-
work_effort.save
|
84
|
-
|
85
|
-
work_effort.current_status = 'pending'
|
86
|
-
|
87
|
-
unless params[:assignment_type_role].blank?
|
88
|
-
role_type = RoleType.find(params[:role_type])
|
89
|
-
|
90
|
-
work_effort.role_types << role_type
|
91
|
-
|
92
|
-
end
|
93
|
-
|
94
|
-
unless params[:assignment_type_party].blank?
|
95
|
-
party = Party.find(params[:assigned_party_id])
|
96
|
-
|
97
|
-
work_effort_party_assignment = WorkEffortPartyAssignment.new
|
98
|
-
work_effort_party_assignment.party = party
|
99
|
-
work_effort_party_assignment.role_type = RoleType.iid('worker')
|
100
|
-
|
101
|
-
work_effort.work_effort_party_assignments << work_effort_party_assignment
|
102
|
-
end
|
103
|
-
|
104
|
-
work_effort.save
|
105
|
-
|
106
|
-
result = {:success => true, :message => "Task Added"}
|
107
|
-
|
108
|
-
end
|
109
|
-
rescue => ex
|
110
|
-
Rails.logger.error ex.message
|
111
|
-
Rails.logger.error ex.backtrace.join("\n")
|
112
|
-
result = {:success => false, :message => "Error adding task"}
|
113
|
-
end
|
114
|
-
|
115
|
-
render :json => result
|
116
|
-
end
|
117
|
-
|
118
|
-
def destroy
|
119
|
-
work_effort = WorkEffort.find(params[:id])
|
120
|
-
|
121
|
-
render :json => {:success => work_effort.destroy}
|
122
|
-
end
|
123
|
-
|
124
|
-
end #WorkEffortsController
|
125
|
-
end #Tasks
|
126
|
-
end #Organizer
|
127
|
-
end #ErpApp
|
128
|
-
end #ErpWorkEffort
|
@@ -1,14 +0,0 @@
|
|
1
|
-
class CreateTasksOrganizerApplication
|
2
|
-
def self.up
|
3
|
-
OrganizerApplication.create(
|
4
|
-
:description => 'Tasks',
|
5
|
-
:icon => 'icon-note_pinned',
|
6
|
-
:javascript_class_name => 'Compass.ErpApp.Organizer.Applications.Tasks.Base',
|
7
|
-
:internal_identifier => 'tasks'
|
8
|
-
)
|
9
|
-
end
|
10
|
-
|
11
|
-
def self.down
|
12
|
-
OrganizerApplication.destroy_all(:conditions => ['internal_identifier = ?','tasks'])
|
13
|
-
end
|
14
|
-
end
|
@@ -1,93 +0,0 @@
|
|
1
|
-
class BaseRoutes < ActiveRecord::Migration
|
2
|
-
def up
|
3
|
-
# transportation_routes
|
4
|
-
unless table_exists?(:transportation_routes)
|
5
|
-
create_table :transportation_routes do |t|
|
6
|
-
|
7
|
-
t.string :internal_identifier
|
8
|
-
t.string :description
|
9
|
-
t.string :comments
|
10
|
-
|
11
|
-
#connection to external system
|
12
|
-
t.string :external_identifier
|
13
|
-
t.string :external_id_source
|
14
|
-
|
15
|
-
t.timestamps
|
16
|
-
end
|
17
|
-
end
|
18
|
-
|
19
|
-
# transportation_route_segments
|
20
|
-
unless table_exists?(:transportation_route_segments)
|
21
|
-
create_table :transportation_route_segments do |t|
|
22
|
-
|
23
|
-
t.string :internal_identifier
|
24
|
-
t.string :description
|
25
|
-
t.string :comments
|
26
|
-
|
27
|
-
#connection to external system
|
28
|
-
t.string :external_identifier
|
29
|
-
t.string :external_id_source
|
30
|
-
|
31
|
-
t.integer :sequence
|
32
|
-
t.datetime :estimated_start
|
33
|
-
t.datetime :estmated_arrival
|
34
|
-
t.datetime :actual_start
|
35
|
-
t.datetime :actual_arrival
|
36
|
-
t.integer :start_mileage
|
37
|
-
t.integer :end_milage
|
38
|
-
t.integer :fuel_used
|
39
|
-
|
40
|
-
#foreign keys
|
41
|
-
t.integer :transportation_route_id
|
42
|
-
t.integer :from_transportation_route_stop_id
|
43
|
-
t.integer :to_transportation_route_stop_id
|
44
|
-
|
45
|
-
t.timestamps
|
46
|
-
end
|
47
|
-
end
|
48
|
-
|
49
|
-
# transportation_route_stops
|
50
|
-
unless table_exists?(:transportation_route_stops)
|
51
|
-
create_table :transportation_route_stops do |t|
|
52
|
-
|
53
|
-
t.string :internal_identifier
|
54
|
-
t.string :description
|
55
|
-
|
56
|
-
t.integer :postal_address_id
|
57
|
-
t.string :geoloc
|
58
|
-
t.integer :sequence
|
59
|
-
|
60
|
-
#connection to external system
|
61
|
-
t.string :external_identifier
|
62
|
-
t.string :external_id_source
|
63
|
-
|
64
|
-
#foreign keys
|
65
|
-
t.integer :transportation_route_id
|
66
|
-
|
67
|
-
t.timestamps
|
68
|
-
end
|
69
|
-
end
|
70
|
-
|
71
|
-
# associated_transportation_routes
|
72
|
-
unless table_exists?(:associated_transportation_routes)
|
73
|
-
create_table :associated_transportation_routes do |t|
|
74
|
-
#foreign keys
|
75
|
-
t.integer :transportation_route_id
|
76
|
-
|
77
|
-
#polymorphic columns
|
78
|
-
t.integer :associated_record_id
|
79
|
-
t.string :associated_record_type
|
80
|
-
end
|
81
|
-
add_index :associated_transportation_routes, [:associated_record_id, :associated_record_type], :name => "associated_route_record_id_type_idx"
|
82
|
-
add_index :associated_transportation_routes, :transportation_route_id, :name => "associated_route_transportation_route_id_idx"
|
83
|
-
end
|
84
|
-
end
|
85
|
-
|
86
|
-
def down
|
87
|
-
[:transportation_routes, :transportation_route_segments, :transportation_route_stops, :associated_transportation_routes].each do |tbl|
|
88
|
-
if table_exists?(tbl)
|
89
|
-
drop_table tbl
|
90
|
-
end
|
91
|
-
end
|
92
|
-
end
|
93
|
-
end
|