ecom_core 1.2.3 → 1.2.9
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/constants/ecom/core/status_constants.rb +11 -0
- data/app/models/ecom/core/attendance_sheet.rb +38 -26
- data/app/models/ecom/core/attendance_sheet_entry.rb +1 -1
- data/app/models/ecom/core/company.rb +10 -0
- data/app/models/ecom/core/crew.rb +4 -4
- data/app/models/ecom/core/crew_overtime.rb +6 -1
- data/app/models/ecom/core/crew_time.rb +8 -3
- data/app/models/ecom/core/overtime_sheet.rb +18 -15
- data/app/models/ecom/core/payment_detail.rb +1 -1
- data/app/models/ecom/core/payroll.rb +5 -0
- data/app/models/ecom/core/project.rb +4 -0
- data/app/models/ecom/core/project_crew.rb +15 -0
- data/config/database.ci.yml +1 -0
- data/db/migrate/20190101085530_create_ecom_core_companies.rb +14 -0
- data/db/migrate/20191119012030_create_ecom_core_task_templates.rb +4 -3
- data/db/migrate/20191119013236_create_ecom_core_work_product_templates.rb +4 -3
- data/db/migrate/20191119144618_create_ecom_core_stakeholders.rb +4 -3
- data/db/migrate/20191201131341_create_ecom_core_product_types.rb +4 -2
- data/db/migrate/20191201134420_create_ecom_core_work_component_templates.rb +8 -6
- data/db/migrate/20191201145848_create_ecom_core_projects.rb +28 -13
- data/db/migrate/20191202103735_create_ecom_core_tasks.rb +8 -5
- data/db/migrate/20191202105355_create_task_templates_resource_types.rb +8 -7
- data/db/migrate/20191202220832_create_ecom_core_users.rb +9 -6
- data/db/migrate/20191202220953_create_ecom_core_user_roles.rb +13 -8
- data/db/migrate/20191202221423_create_ecom_core_menus.rb +16 -9
- data/db/migrate/20191202235434_create_ecom_core_work_products.rb +29 -15
- data/db/migrate/20191206104247_create_ecom_core_work_components.rb +24 -14
- data/db/migrate/20191225100054_create_ecom_core_crews.rb +8 -4
- data/db/migrate/20191225121850_create_ecom_core_project_crews.rb +19 -0
- data/db/migrate/{20200401040433_create_ecom_core_attendance_sheets.rb → 20191225140433_create_ecom_core_attendance_sheets.rb} +6 -1
- data/db/migrate/20191225162539_create_ecom_core_attendance_sheet_entries.rb +17 -0
- data/db/migrate/20191225211712_create_ecom_core_crew_times.rb +15 -9
- data/db/migrate/20200126081005_create_ecom_core_payrolls.rb +4 -0
- data/db/migrate/20200126082103_create_ecom_core_payments.rb +6 -3
- data/db/migrate/20200126183218_create_ecom_core_payment_details.rb +10 -5
- data/db/migrate/20200307112519_create_ecom_core_custom_payment_details.rb +4 -3
- data/db/migrate/20200315145215_create_ecom_core_equipment_locations.rb +4 -3
- data/db/migrate/20200315150500_create_ecom_core_equipment_categories.rb +4 -2
- data/db/migrate/20200315152143_create_ecom_core_equipment.rb +4 -2
- data/db/migrate/20200315153640_create_ecom_core_equipment_items.rb +8 -5
- data/db/migrate/20200315160810_create_ecom_core_equipment_valuations.rb +4 -3
- data/db/migrate/20200316125323_create_ecom_core_equipment_components.rb +4 -3
- data/db/migrate/20200410090701_create_ecom_core_overtime_sheets.rb +7 -1
- data/db/migrate/20200410100035_create_ecom_core_overtime_sheet_entries.rb +8 -5
- data/db/migrate/20200410111827_create_ecom_core_crew_overtimes.rb +17 -11
- data/lib/ecom/core/version.rb +1 -1
- data/spec/factories/ecom/core/application_modules.rb +1 -1
- data/spec/factories/ecom/core/attendance_sheet_entries.rb +1 -1
- data/spec/factories/ecom/core/attendance_sheets.rb +3 -2
- data/spec/factories/ecom/core/companies.rb +9 -0
- data/spec/factories/ecom/core/crew_overtimes.rb +1 -1
- data/spec/factories/ecom/core/crew_times.rb +1 -1
- data/spec/factories/ecom/core/crew_types.rb +1 -1
- data/spec/factories/ecom/core/crews.rb +3 -1
- data/spec/factories/ecom/core/currencies.rb +1 -1
- data/spec/factories/ecom/core/custom_payment_details.rb +1 -1
- data/spec/factories/ecom/core/equipment.rb +1 -1
- data/spec/factories/ecom/core/equipment_categories.rb +1 -1
- data/spec/factories/ecom/core/equipment_components.rb +1 -1
- data/spec/factories/ecom/core/equipment_items.rb +1 -1
- data/spec/factories/ecom/core/equipment_locations.rb +1 -1
- data/spec/factories/ecom/core/equipment_types.rb +1 -1
- data/spec/factories/ecom/core/equipment_valuations.rb +1 -1
- data/spec/factories/ecom/core/location_types.rb +1 -1
- data/spec/factories/ecom/core/lookups.rb +1 -1
- data/spec/factories/ecom/core/material_types.rb +1 -1
- data/spec/factories/ecom/core/menus.rb +1 -1
- data/spec/factories/ecom/core/overtime_sheet_entries.rb +1 -1
- data/spec/factories/ecom/core/overtime_sheets.rb +3 -2
- data/spec/factories/ecom/core/overtime_types.rb +1 -1
- data/spec/factories/ecom/core/payment_details.rb +1 -1
- data/spec/factories/ecom/core/payments.rb +1 -1
- data/spec/factories/ecom/core/payrolls.rb +2 -1
- data/spec/factories/ecom/core/product_types.rb +1 -1
- data/spec/factories/ecom/core/project_crews.rb +9 -0
- data/spec/factories/ecom/core/projects.rb +2 -1
- data/spec/factories/ecom/core/resource_types.rb +1 -1
- data/spec/factories/ecom/core/stakeholder_types.rb +1 -1
- data/spec/factories/ecom/core/stakeholders.rb +1 -1
- data/spec/factories/ecom/core/task_template_types.rb +1 -1
- data/spec/factories/ecom/core/task_templates.rb +1 -1
- data/spec/factories/ecom/core/tasks.rb +1 -1
- data/spec/factories/ecom/core/user_roles.rb +1 -1
- data/spec/factories/ecom/core/users.rb +1 -1
- data/spec/factories/ecom/core/work_component_templates.rb +1 -1
- data/spec/factories/ecom/core/work_components.rb +1 -1
- data/spec/factories/ecom/core/work_product_templates.rb +1 -1
- data/spec/factories/ecom/core/work_products.rb +2 -2
- metadata +15 -18
- data/db/migrate/20200207035823_add_additional_columns_to_payment.rb +0 -6
- data/db/migrate/20200207040844_add_net_pay_column_to_payment_details.rb +0 -5
- data/db/migrate/20200210095535_add_advance_column_to_payment_details.rb +0 -5
- data/db/migrate/20200221123207_add_employee_id_to_crew.rb +0 -5
- data/db/migrate/20200401071343_remove_date_column_from_crew_times.rb +0 -5
- data/db/migrate/20200401122539_create_ecom_core_attendance_sheet_entries.rb +0 -14
- data/db/migrate/20200401142959_relate_crew_time_with_attendance_sheet_entry.rb +0 -8
- data/db/migrate/20200401144137_remove_crew_time_id_from_crew.rb +0 -7
- data/db/migrate/20200413144023_fix_crew_time_columns.rb +0 -17
- data/db/migrate/20200414044144_adjust_crew_overtime_column_names.rb +0 -6
- data/db/migrate/20200414185248_change_time_columns_to_datetime.rb +0 -8
@@ -1,8 +1,9 @@
|
|
1
1
|
FactoryBot.define do
|
2
|
-
factory :overtime_sheet, class:
|
2
|
+
factory :overtime_sheet, class: Ecom::Core::OvertimeSheet do
|
3
3
|
date { Date.today }
|
4
4
|
opened_at { Time.now }
|
5
5
|
submitted_at { Time.now + 1.day }
|
6
|
-
status { Ecom::Core::
|
6
|
+
status { Ecom::Core::StatusConstants::OPEN }
|
7
|
+
association :project
|
7
8
|
end
|
8
9
|
end
|
@@ -1,5 +1,5 @@
|
|
1
1
|
FactoryBot.define do
|
2
|
-
factory :product_type, class:
|
2
|
+
factory :product_type, class: Ecom::Core::ProductType do
|
3
3
|
name { FFaker::Name.name }
|
4
4
|
association :work_product_template
|
5
5
|
dimension { [{ name: 'length', label: 'length' }, { name: 'width', label: 'width' }] }
|
@@ -1,5 +1,5 @@
|
|
1
1
|
FactoryBot.define do
|
2
|
-
factory :project, class:
|
2
|
+
factory :project, class: Ecom::Core::Project do
|
3
3
|
name { FFaker::Name.name }
|
4
4
|
description { FFaker::Name.name }
|
5
5
|
location { FFaker::Name.name }
|
@@ -19,5 +19,6 @@ FactoryBot.define do
|
|
19
19
|
retention { FFaker::Random.rand(0..100) }
|
20
20
|
remark { FFaker::Name.name }
|
21
21
|
association :currency
|
22
|
+
association :company
|
22
23
|
end
|
23
24
|
end
|
@@ -1,5 +1,5 @@
|
|
1
1
|
FactoryBot.define do
|
2
|
-
factory :work_component_template, class:
|
2
|
+
factory :work_component_template, class: Ecom::Core::WorkComponentTemplate do
|
3
3
|
code { FFaker::Name.name }
|
4
4
|
name { FFaker::Name.name }
|
5
5
|
description { FFaker::Name.name }
|
@@ -1,5 +1,5 @@
|
|
1
1
|
FactoryBot.define do
|
2
|
-
factory :work_component, class:
|
2
|
+
factory :work_component, class: Ecom::Core::WorkComponent do
|
3
3
|
name { FFaker::Name.name }
|
4
4
|
dimension { [{ label: 'Length', name: 'length', value: 10 }] }
|
5
5
|
assignment_status { :unassigned }
|
@@ -1,5 +1,5 @@
|
|
1
1
|
FactoryBot.define do
|
2
|
-
factory :work_product_template, class:
|
2
|
+
factory :work_product_template, class: Ecom::Core::WorkProductTemplate do
|
3
3
|
code { FFaker::Name.unique.name }
|
4
4
|
name { FFaker::Name.unique.name }
|
5
5
|
description { FFaker::Name.name }
|
@@ -1,7 +1,7 @@
|
|
1
1
|
FactoryBot.define do
|
2
|
-
factory :work_product, class:
|
2
|
+
factory :work_product, class: Ecom::Core::WorkProduct do
|
3
3
|
code { FFaker::Name.unique.name }
|
4
|
-
name { FFaker::Name.name }
|
4
|
+
name { FFaker::Name.unique.name }
|
5
5
|
description { FFaker::Name.name }
|
6
6
|
design_reference_no { FFaker::Name.name }
|
7
7
|
dimension { [{ label: 'Length', name: 'length', value: 12 }] }
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ecom_core
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.2.
|
4
|
+
version: 1.2.9
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Henock L.
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-05-
|
11
|
+
date: 2020-05-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: aasm
|
@@ -123,7 +123,7 @@ dependencies:
|
|
123
123
|
- !ruby/object:Gem::Version
|
124
124
|
version: '0'
|
125
125
|
- !ruby/object:Gem::Dependency
|
126
|
-
name:
|
126
|
+
name: pg
|
127
127
|
requirement: !ruby/object:Gem::Requirement
|
128
128
|
requirements:
|
129
129
|
- - ">="
|
@@ -137,7 +137,7 @@ dependencies:
|
|
137
137
|
- !ruby/object:Gem::Version
|
138
138
|
version: '0'
|
139
139
|
- !ruby/object:Gem::Dependency
|
140
|
-
name:
|
140
|
+
name: rspec-rails
|
141
141
|
requirement: !ruby/object:Gem::Requirement
|
142
142
|
requirements:
|
143
143
|
- - ">="
|
@@ -151,7 +151,7 @@ dependencies:
|
|
151
151
|
- !ruby/object:Gem::Version
|
152
152
|
version: '0'
|
153
153
|
- !ruby/object:Gem::Dependency
|
154
|
-
name:
|
154
|
+
name: shoulda-matchers
|
155
155
|
requirement: !ruby/object:Gem::Requirement
|
156
156
|
requirements:
|
157
157
|
- - ">="
|
@@ -165,7 +165,7 @@ dependencies:
|
|
165
165
|
- !ruby/object:Gem::Version
|
166
166
|
version: '0'
|
167
167
|
- !ruby/object:Gem::Dependency
|
168
|
-
name:
|
168
|
+
name: simplecov
|
169
169
|
requirement: !ruby/object:Gem::Requirement
|
170
170
|
requirements:
|
171
171
|
- - ">="
|
@@ -189,6 +189,7 @@ files:
|
|
189
189
|
- MIT-LICENSE
|
190
190
|
- README.md
|
191
191
|
- Rakefile
|
192
|
+
- app/constants/ecom/core/status_constants.rb
|
192
193
|
- app/controllers/concerns/ecom/core/lookupable.rb
|
193
194
|
- app/controllers/concerns/ecom/core/resource_typeable.rb
|
194
195
|
- app/controllers/ecom/core/access_controller.rb
|
@@ -204,6 +205,7 @@ files:
|
|
204
205
|
- app/models/ecom/core/application_record.rb
|
205
206
|
- app/models/ecom/core/attendance_sheet.rb
|
206
207
|
- app/models/ecom/core/attendance_sheet_entry.rb
|
208
|
+
- app/models/ecom/core/company.rb
|
207
209
|
- app/models/ecom/core/crew.rb
|
208
210
|
- app/models/ecom/core/crew_overtime.rb
|
209
211
|
- app/models/ecom/core/crew_time.rb
|
@@ -229,6 +231,7 @@ files:
|
|
229
231
|
- app/models/ecom/core/payroll.rb
|
230
232
|
- app/models/ecom/core/product_type.rb
|
231
233
|
- app/models/ecom/core/project.rb
|
234
|
+
- app/models/ecom/core/project_crew.rb
|
232
235
|
- app/models/ecom/core/resource_type.rb
|
233
236
|
- app/models/ecom/core/stakeholder.rb
|
234
237
|
- app/models/ecom/core/stakeholder_type.rb
|
@@ -250,6 +253,7 @@ files:
|
|
250
253
|
- app/services/ecom/core/token_auth_service.rb
|
251
254
|
- config/database.ci.yml
|
252
255
|
- config/routes.rb
|
256
|
+
- db/migrate/20190101085530_create_ecom_core_companies.rb
|
253
257
|
- db/migrate/20190101112620_create_ecom_core_lookups.rb
|
254
258
|
- db/migrate/20190101112625_create_ecom_core_overtime_types.rb
|
255
259
|
- db/migrate/20191119010518_create_ecom_core_task_template_types.rb
|
@@ -271,14 +275,13 @@ files:
|
|
271
275
|
- db/migrate/20191202235434_create_ecom_core_work_products.rb
|
272
276
|
- db/migrate/20191206104247_create_ecom_core_work_components.rb
|
273
277
|
- db/migrate/20191225100054_create_ecom_core_crews.rb
|
278
|
+
- db/migrate/20191225121850_create_ecom_core_project_crews.rb
|
279
|
+
- db/migrate/20191225140433_create_ecom_core_attendance_sheets.rb
|
280
|
+
- db/migrate/20191225162539_create_ecom_core_attendance_sheet_entries.rb
|
274
281
|
- db/migrate/20191225211712_create_ecom_core_crew_times.rb
|
275
282
|
- db/migrate/20200126081005_create_ecom_core_payrolls.rb
|
276
283
|
- db/migrate/20200126082103_create_ecom_core_payments.rb
|
277
284
|
- db/migrate/20200126183218_create_ecom_core_payment_details.rb
|
278
|
-
- db/migrate/20200207035823_add_additional_columns_to_payment.rb
|
279
|
-
- db/migrate/20200207040844_add_net_pay_column_to_payment_details.rb
|
280
|
-
- db/migrate/20200210095535_add_advance_column_to_payment_details.rb
|
281
|
-
- db/migrate/20200221123207_add_employee_id_to_crew.rb
|
282
285
|
- db/migrate/20200307112519_create_ecom_core_custom_payment_details.rb
|
283
286
|
- db/migrate/20200315145215_create_ecom_core_equipment_locations.rb
|
284
287
|
- db/migrate/20200315150500_create_ecom_core_equipment_categories.rb
|
@@ -286,17 +289,9 @@ files:
|
|
286
289
|
- db/migrate/20200315153640_create_ecom_core_equipment_items.rb
|
287
290
|
- db/migrate/20200315160810_create_ecom_core_equipment_valuations.rb
|
288
291
|
- db/migrate/20200316125323_create_ecom_core_equipment_components.rb
|
289
|
-
- db/migrate/20200401040433_create_ecom_core_attendance_sheets.rb
|
290
|
-
- db/migrate/20200401071343_remove_date_column_from_crew_times.rb
|
291
|
-
- db/migrate/20200401122539_create_ecom_core_attendance_sheet_entries.rb
|
292
|
-
- db/migrate/20200401142959_relate_crew_time_with_attendance_sheet_entry.rb
|
293
|
-
- db/migrate/20200401144137_remove_crew_time_id_from_crew.rb
|
294
292
|
- db/migrate/20200410090701_create_ecom_core_overtime_sheets.rb
|
295
293
|
- db/migrate/20200410100035_create_ecom_core_overtime_sheet_entries.rb
|
296
294
|
- db/migrate/20200410111827_create_ecom_core_crew_overtimes.rb
|
297
|
-
- db/migrate/20200413144023_fix_crew_time_columns.rb
|
298
|
-
- db/migrate/20200414044144_adjust_crew_overtime_column_names.rb
|
299
|
-
- db/migrate/20200414185248_change_time_columns_to_datetime.rb
|
300
295
|
- lib/ecom/core.rb
|
301
296
|
- lib/ecom/core/engine.rb
|
302
297
|
- lib/ecom/core/version.rb
|
@@ -305,6 +300,7 @@ files:
|
|
305
300
|
- spec/factories/ecom/core/application_modules.rb
|
306
301
|
- spec/factories/ecom/core/attendance_sheet_entries.rb
|
307
302
|
- spec/factories/ecom/core/attendance_sheets.rb
|
303
|
+
- spec/factories/ecom/core/companies.rb
|
308
304
|
- spec/factories/ecom/core/crew_overtimes.rb
|
309
305
|
- spec/factories/ecom/core/crew_times.rb
|
310
306
|
- spec/factories/ecom/core/crew_types.rb
|
@@ -329,6 +325,7 @@ files:
|
|
329
325
|
- spec/factories/ecom/core/payments.rb
|
330
326
|
- spec/factories/ecom/core/payrolls.rb
|
331
327
|
- spec/factories/ecom/core/product_types.rb
|
328
|
+
- spec/factories/ecom/core/project_crews.rb
|
332
329
|
- spec/factories/ecom/core/projects.rb
|
333
330
|
- spec/factories/ecom/core/resource_types.rb
|
334
331
|
- spec/factories/ecom/core/stakeholder_types.rb
|
@@ -1,14 +0,0 @@
|
|
1
|
-
class CreateEcomCoreAttendanceSheetEntries < ActiveRecord::Migration[6.0]
|
2
|
-
def change
|
3
|
-
create_table :ecom_core_attendance_sheet_entries do |t|
|
4
|
-
t.references :attendance_sheet, null: false, index: { name: 'ase_on_as_indx' }
|
5
|
-
t.references :crew, null: false, index: { name: 'ase_on_crew_indx' }
|
6
|
-
t.float :total_hours
|
7
|
-
|
8
|
-
t.timestamps
|
9
|
-
end
|
10
|
-
add_foreign_key :ecom_core_attendance_sheet_entries, :ecom_core_attendance_sheets,
|
11
|
-
column: :attendance_sheet_id
|
12
|
-
add_foreign_key :ecom_core_attendance_sheet_entries, :ecom_core_crews, column: :crew_id
|
13
|
-
end
|
14
|
-
end
|
@@ -1,8 +0,0 @@
|
|
1
|
-
class RelateCrewTimeWithAttendanceSheetEntry < ActiveRecord::Migration[6.0]
|
2
|
-
def change
|
3
|
-
add_column :ecom_core_crew_times, :attendance_sheet_entry_id, :integer,
|
4
|
-
index: { name: 'ase_on_ct_indx' }
|
5
|
-
add_foreign_key :ecom_core_crew_times, :ecom_core_attendance_sheet_entries,
|
6
|
-
column: :attendance_sheet_entry_id
|
7
|
-
end
|
8
|
-
end
|
@@ -1,7 +0,0 @@
|
|
1
|
-
class RemoveCrewTimeIdFromCrew < ActiveRecord::Migration[6.0]
|
2
|
-
def change
|
3
|
-
remove_foreign_key :ecom_core_crew_times, :ecom_core_crews, column: :crew_id
|
4
|
-
remove_index :ecom_core_crew_times, name: 'ct_on_crew_indx'
|
5
|
-
remove_column :ecom_core_crew_times, :crew_id
|
6
|
-
end
|
7
|
-
end
|
@@ -1,17 +0,0 @@
|
|
1
|
-
class FixCrewTimeColumns < ActiveRecord::Migration[6.0]
|
2
|
-
def change
|
3
|
-
remove_column :ecom_core_crew_times, :overtime, :boolean
|
4
|
-
remove_column :ecom_core_crew_times, :overtime_type_id, :integer
|
5
|
-
remove_column :ecom_core_crew_times, :converted_hours, :float
|
6
|
-
|
7
|
-
add_column :ecom_core_crew_times, :revised, :boolean, default: false, null: false
|
8
|
-
add_column :ecom_core_crew_times, :revision_to_id, :integer
|
9
|
-
add_column :ecom_core_crew_times, :created_by_id, :integer
|
10
|
-
|
11
|
-
add_index :ecom_core_crew_times, :revision_to_id, name: 'ct_on_rt_indx'
|
12
|
-
add_index :ecom_core_crew_times, :created_by_id, name: 'cb_on_ct_indx'
|
13
|
-
|
14
|
-
add_foreign_key :ecom_core_crew_times, :ecom_core_crew_times, column: :revision_to_id
|
15
|
-
add_foreign_key :ecom_core_crew_times, :ecom_core_users, column: :created_by_id
|
16
|
-
end
|
17
|
-
end
|
@@ -1,8 +0,0 @@
|
|
1
|
-
class ChangeTimeColumnsToDatetime < ActiveRecord::Migration[6.0]
|
2
|
-
def change
|
3
|
-
remove_column :ecom_core_crew_times, :checkin_time, :time
|
4
|
-
add_column :ecom_core_crew_times, :checkin_time, :datetime
|
5
|
-
remove_column :ecom_core_crew_times, :checkout_time, :time
|
6
|
-
add_column :ecom_core_crew_times, :checkout_time, :datetime
|
7
|
-
end
|
8
|
-
end
|