Skip to content

OBPIH-6111 add pricing section with inputs#4524

Merged
awalkowiak merged 8 commits intofeature/product-supplier-list-redesignfrom
OBPIH-6111-add-pricing-section-with-inputs
Mar 1, 2024
Merged

OBPIH-6111 add pricing section with inputs#4524
awalkowiak merged 8 commits intofeature/product-supplier-list-redesignfrom
OBPIH-6111-add-pricing-section-with-inputs

Conversation

@drodzewicz
Copy link
Collaborator

@drodzewicz drodzewicz commented Feb 28, 2024

One thing you may notice are changes to some other sections. This is because I have added the bootstrap grid system as a wrapper for our fields.
One of the reopen change requests I got was that my fields we not in the same layout as on the mock so I decided to use bootstrap grid system to solve this issue.
To not have different approaches in other sections I did the following modifications and also added row and col-lg classes

@drodzewicz drodzewicz self-assigned this Feb 28, 2024
@drodzewicz drodzewicz force-pushed the OBPIH-6111-add-pricing-section-with-inputs branch from 2395e04 to e1997c9 Compare February 28, 2024 17:32

// preselect value 1 when unit of measure Each is selected
useEffect(() => {
if (uom?.id === 'EA') {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this feels dangerous to me. Are we sure that on every instance this would have the id of 'EA'?
I think we'd be safer if we looked at uom.code, but we would have to include the code in the response of uoms and change the getDefaultValues() to include the code.
Unless @awalkowiak / @jmiranda know if this will always have id of 'EA' on any instance, then we can let it go.

Copy link
Collaborator

@kchelstowski kchelstowski Feb 29, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can see that we insert the "EA" unit of measure in one of the migrations:

<insert tableName="unit_of_measure">
            <column name="id" value="EA"/>
            <column name="version" valueNumeric="0"/>
            <column name="code" value="EA"/>
            <column name="name" value="Each"/>
            <column name="uom_class_id" value="QUANTITY"/>
            <column name="created_by_id" value="1"/>
            <column name="updated_by_id" value="1"/>
            <column name="date_created" valueDate="2020-04-25T00:00:00.0"/>
            <column name="last_updated" valueDate="2020-04-25T00:00:00.0"/>
</insert>

so I think we are fine with checking the uom.id at this point


// preselect value 1 when unit of measure Each is selected
useEffect(() => {
if (uom?.id === 'EA') {
Copy link
Collaborator

@kchelstowski kchelstowski Feb 29, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can see that we insert the "EA" unit of measure in one of the migrations:

<insert tableName="unit_of_measure">
            <column name="id" value="EA"/>
            <column name="version" valueNumeric="0"/>
            <column name="code" value="EA"/>
            <column name="name" value="Each"/>
            <column name="uom_class_id" value="QUANTITY"/>
            <column name="created_by_id" value="1"/>
            <column name="updated_by_id" value="1"/>
            <column name="date_created" valueDate="2020-04-25T00:00:00.0"/>
            <column name="last_updated" valueDate="2020-04-25T00:00:00.0"/>
</insert>

so I think we are fine with checking the uom.id at this point

@awalkowiak awalkowiak merged commit 90e647f into feature/product-supplier-list-redesign Mar 1, 2024
@awalkowiak awalkowiak deleted the OBPIH-6111-add-pricing-section-with-inputs branch March 1, 2024 14:00
awalkowiak pushed a commit that referenced this pull request Mar 12, 2024
* OBPIH-6111 Fixed issue where form is unsavable when package price is not filled in

* OBPIH-6111 Fix issue with preceeding zeros in input type number

* OBPIH-6111 Fix null contractPrice in api response

* OBPIH-6111 Prevent from entering fractions on package quantity

* OBPIH-6111 When unit of measure Each is selected, set value of quantity to 1 and disable the field

* OBPIH-6111 use grid system provided by bootstrap to align form inputs

* OBPIH-6111 Removed possibility for minimum Order quantity to enter fractions

* OBPIH-6111 Added same padding values as on other form sections
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants