-
-
Notifications
You must be signed in to change notification settings - Fork 504
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Kit Redesign] Phase 1 - Change itemizable source #3750
base: main
Are you sure you want to change the base?
[Kit Redesign] Phase 1 - Change itemizable source #3750
Conversation
…o 3609-kit-allocation-should-create-inventory-in-out
…o 3609-kit-allocation-should-create-inventory-in-out
…o 3609-kit-allocation-should-create-inventory-in-out
…o 3609-kit-allocation-should-create-inventory-in-out
…o 3656-add-shipped-to-delivery-method
…o 3609-kit-allocation-should-create-inventory-in-out
…o 3656-add-shipped-to-delivery-method
…o 3656-add-shipped-to-delivery-method
…o 3656-add-shipped-to-delivery-method
…o 3609-kit-allocation-should-create-inventory-in-out # Conflicts: # db/schema.rb
…han-haidar/human-essentials into 3609-kit-allocation-should-create-inventory-in-out
…o 3707-change-itemizable-source # Conflicts: # db/migrate/20230606061826_create_kit_allocations.rb # db/migrate/20230612075547_add_kit_allocation_type_to_kit_allocations.rb
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall looks good - had some comments. :)
@@ -1,8 +1,8 @@ | |||
class KitsController < ApplicationController | |||
def index | |||
@kits = current_organization.kits.includes(line_items: :item, inventory_items: :storage_location).class_filter(filter_params) | |||
@items = Item.where(partner_key: "kit").includes(line_items: :item, inventory_items: :storage_location).class_filter(filter_params) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Probably should use a join
here instead of checking partner_key.
@@ -14,6 +14,7 @@ | |||
# | |||
|
|||
class BaseItem < ApplicationRecord | |||
include Itemizable |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, the issue had some bad wording - this has to be added to the Item
class, not BaseItem
.
@@ -0,0 +1,5 @@ | |||
class ChangeItemizableId < ActiveRecord::Migration[7.0] | |||
def change | |||
Rake::Task['change_itemizable_id'].invoke |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why was this split into a Rake task?
In case anyone is looking at this in the future, only commits you need to look at are the last 6 (b822b57 onwards)
|
Resolves #3707
Description
Just created the draft PR to get pulse checked to see if I am in the right direction with my approach
Type of change
Screenshots