Skip to content

Commit

Permalink
remove limit_by_delivery_schedule
Browse files Browse the repository at this point in the history
  • Loading branch information
kaiomagalhaes committed Jan 24, 2024
1 parent 6e11fca commit 3d42476
Show file tree
Hide file tree
Showing 7 changed files with 52 additions and 52 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 @@ -44,7 +44,7 @@ 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,
:hour_delivery_schedule,
:start_date, :end_date, :name)
end
end
29 changes: 14 additions & 15 deletions app/models/statement_of_work.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,21 +4,20 @@
#
# Table name: statement_of_works
#
# id :bigint not null, primary key
# contract_model_type :string
# end_date :datetime
# hour_delivery_schedule :string
# 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
# created_at :datetime not null
# updated_at :datetime not null
# contract_model_id :integer
# project_id :bigint not null
# id :bigint not null, primary key
# contract_model_type :string
# end_date :datetime
# hour_delivery_schedule :string
# hourly_revenue :float
# model :string
# name :string
# start_date :datetime
# total_hours :float
# total_revenue :float
# created_at :datetime not null
# updated_at :datetime not null
# contract_model_id :integer
# project_id :bigint not null
#
# Indexes
#
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, :name
:start_date, :end_date, :project_id, :created_at, :updated_at, :name
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# frozen_string_literal: true

class RemoveLimitByDeliveryScheduleFromSow < ActiveRecord::Migration[7.0]
def change
remove_column :statement_of_works, :limit_by_delivery_schedule, :boolean
end
end
3 changes: 1 addition & 2 deletions db/schema.rb

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

32 changes: 14 additions & 18 deletions spec/factories/statement_of_works.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,21 +4,20 @@
#
# Table name: statement_of_works
#
# id :bigint not null, primary key
# contract_model_type :string
# end_date :datetime
# hour_delivery_schedule :string
# 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
# created_at :datetime not null
# updated_at :datetime not null
# contract_model_id :integer
# project_id :bigint not null
# id :bigint not null, primary key
# contract_model_type :string
# end_date :datetime
# hour_delivery_schedule :string
# hourly_revenue :float
# model :string
# name :string
# start_date :datetime
# total_hours :float
# total_revenue :float
# created_at :datetime not null
# updated_at :datetime not null
# contract_model_id :integer
# project_id :bigint not null
#
# Indexes
#
Expand All @@ -42,7 +41,6 @@
total_hours { 120 }
total_revenue { 12_000 }
hour_delivery_schedule { 'monthly' }
limit_by_delivery_schedule { true }
end

trait :with_time_and_materials do
Expand All @@ -51,7 +49,6 @@
total_hours { 120 }
total_revenue { 12_000 }
hour_delivery_schedule { 'contract_period' }
limit_by_delivery_schedule { true }
end

trait :with_fixed_bid do
Expand All @@ -60,7 +57,6 @@
total_hours { nil }
total_revenue { 12_000 }
hour_delivery_schedule { 'contract_period' }
limit_by_delivery_schedule { false }
end
end
end
29 changes: 14 additions & 15 deletions spec/models/statement_of_work_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,21 +4,20 @@
#
# Table name: statement_of_works
#
# id :bigint not null, primary key
# contract_model_type :string
# end_date :datetime
# hour_delivery_schedule :string
# 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
# created_at :datetime not null
# updated_at :datetime not null
# contract_model_id :integer
# project_id :bigint not null
# id :bigint not null, primary key
# contract_model_type :string
# end_date :datetime
# hour_delivery_schedule :string
# hourly_revenue :float
# model :string
# name :string
# start_date :datetime
# total_hours :float
# total_revenue :float
# created_at :datetime not null
# updated_at :datetime not null
# contract_model_id :integer
# project_id :bigint not null
#
# Indexes
#
Expand Down

0 comments on commit 3d42476

Please sign in to comment.