Skip to content

Commit

Permalink
add name to sow
Browse files Browse the repository at this point in the history
  • Loading branch information
kaiomagalhaes committed Nov 27, 2023
1 parent 7a9c697 commit dcd4b92
Show file tree
Hide file tree
Showing 10 changed files with 23 additions and 11 deletions.
2 changes: 1 addition & 1 deletion app/controllers/statement_of_works_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,6 @@ def set_statement_of_work
def statement_of_work_params
params.require(:statement_of_work).permit(:model, :hourly_revenue, :total_revenue, :total_hours,
:hour_delivery_schedule, :limit_by_delivery_schedule,
:start_date, :end_date)
:start_date, :end_date, :name)
end
end
4 changes: 2 additions & 2 deletions app/models/project.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
# name :string
# slack_channel :string
# slug :string
# sync_source_control :boolean default(FALSE)
# sync_ticket_tracking_system :boolean default(FALSE)
# sync_source_control :boolean default(FALSE), not null
# sync_ticket_tracking_system :boolean default(FALSE), not null
# created_at :datetime not null
# updated_at :datetime not null
# customer_id :bigint not null
Expand Down
1 change: 1 addition & 0 deletions app/models/statement_of_work.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
# hourly_revenue :float
# limit_by_delivery_schedule :boolean default(TRUE), not null
# model :string
# name :string
# start_date :datetime
# total_hours :float
# total_revenue :float
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# frozen_string_literal: true

json.extract! statement_of_work, :id, :model, :hourly_revenue, :total_revenue, :total_hours, :hour_delivery_schedule,
:limit_by_delivery_schedule, :start_date, :end_date, :project_id, :created_at, :updated_at
:limit_by_delivery_schedule, :start_date, :end_date, :project_id, :created_at, :updated_at, :name
7 changes: 7 additions & 0 deletions db/migrate/20231127193434_add_name_to_statement_of_work.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# frozen_string_literal: true

class AddNameToStatementOfWork < ActiveRecord::Migration[7.0]
def change
add_column :statement_of_works, :name, :string
end
end
7 changes: 4 additions & 3 deletions db/schema.rb

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions spec/factories/projects.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
# name :string
# slack_channel :string
# slug :string
# sync_source_control :boolean default(FALSE)
# sync_ticket_tracking_system :boolean default(FALSE)
# sync_source_control :boolean default(FALSE), not null
# sync_ticket_tracking_system :boolean default(FALSE), not null
# created_at :datetime not null
# updated_at :datetime not null
# customer_id :bigint not null
Expand Down
2 changes: 2 additions & 0 deletions spec/factories/statement_of_works.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
# hourly_revenue :float
# limit_by_delivery_schedule :boolean default(TRUE), not null
# model :string
# name :string
# start_date :datetime
# total_hours :float
# total_revenue :float
Expand All @@ -30,6 +31,7 @@
project
start_date { Time.zone.today - 6.months }
end_date { Time.zone.today + 6.months }
name { FFaker::Lorem.sentence }

trait :with_maintenance do
model { 'maintenance' }
Expand Down
4 changes: 2 additions & 2 deletions spec/models/project_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
# name :string
# slack_channel :string
# slug :string
# sync_source_control :boolean default(FALSE)
# sync_ticket_tracking_system :boolean default(FALSE)
# sync_source_control :boolean default(FALSE), not null
# sync_ticket_tracking_system :boolean default(FALSE), not null
# created_at :datetime not null
# updated_at :datetime not null
# customer_id :bigint not null
Expand Down
1 change: 1 addition & 0 deletions spec/models/statement_of_work_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
# hourly_revenue :float
# limit_by_delivery_schedule :boolean default(TRUE), not null
# model :string
# name :string
# start_date :datetime
# total_hours :float
# total_revenue :float
Expand Down

0 comments on commit dcd4b92

Please sign in to comment.