Skip to content
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

OBPIH-5832 Product Source Redesign #4438

Conversation

jmiranda
Copy link
Member

@jmiranda jmiranda commented Jan 2, 2024

I'm creating this pull request so we can keep track of change requests from the already merged PRs.

@awalkowiak This doesn't get merged until I am 💯

@awalkowiak awalkowiak self-requested a review January 9, 2024 14:21
Copy link
Collaborator

Choose a reason for hiding this comment

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

please add a TODO comment explaining the purpouse for creating this hook and add information that once react-router package is bumped up to version 6.x.^ this can be replaced with useSearchParams

@@ -47,6 +47,7 @@ $orange-alpha: #fca714;
--blue-800: #202750;

// GRAY
--gray-border: #DFE4ED;
Copy link
Collaborator

@drodzewicz drodzewicz Jan 10, 2024

Choose a reason for hiding this comment

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

Lets follow a following pattern for creating CSS color variables
--[primary_color_group_name]-[subgroup_index][color_index]
so an example --gray-102 is

  • primary_color_group_name: gray
  • subgroup_index: 1
  • color_index: 02

The issue I have with --gray-border is that we might want to use this color #DFE4ED for something else than a border also what if in the future we need to create a variable for a different border color like #636D82 do we call it
--gray-border-2?

Copy link
Collaborator

Choose a reason for hiding this comment

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

I like the idea of these components, lets also add a className prop so the components are a little bit more customizable

const ListWrapper = ({ children, className }) => (
  <div className={`d-flex flex-column list-page-main ${className}`}>
    {children}
  </div>
);

export default ListWrapper;

ListWrapper.defaultProps = {
  className: "",
}

ListWrapper.propTypes = {
  children: PropTypes.node.isRequired,
  className: PropTypes.string,
};

I would also suggest refactoring all other list pages with these wrappers ASAP.
This is a very simple change since these components are very basic wrappers with predetermined classNames and if we are not going to do it now I don't think we will ever come back to this topic, so lets make this simple change.

Copy link
Collaborator

Choose a reason for hiding this comment

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

I think this component should be a bit more generic and receive the tabs configuration as props instead of defining it in the component specific to only Product Sources page.

During planning I foresaw the implementation for this component in a following way

  1. Have a Generic Tabs component which we will be able to use on many different pages in the future.
  2. Have it receive a tabs configuration
    In this example something like
const tabs = {
  [DETAILS_TAB]: {
    label: {
      id: 'react.productSupplier.tabs.details.label',
      defaultMessage: 'Details',
    },
  onClick: (key) => switchTab(key)
  render: () => <ComponentsToRenderOnTab1 />
  },
  [PREFERENCE_TYPES_TAB]: {
    label: {
      id: 'react.productSupplier.tabs.preferenceTypes.label',
      defaultMessage: 'Preference Types',
    },
   onClick: (key) => switchTab(key),
  render: () => <ComponentsToRenderOnTab2 />
  },
};
  1. have it receive and active tab props like example
Tabs are something that will also be implemented in PO view page and it would be a shame if we would have to duplicate the code for it.

My preference would also be to use an existing library for tabs like https://www.npmjs.com/package/react-tabs

Copy link
Collaborator

@awalkowiak awalkowiak left a comment

Choose a reason for hiding this comment

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

I looked through the majority of frontend work, on Monday I'll look more through the backend (plus I'll look around in some react places I have just skimmed)

import apiClient from 'utils/apiClient';

export default {
// TODO: tech debt: Replace by the product api call instead of generic
Copy link
Collaborator

Choose a reason for hiding this comment

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

Why not the generic?

Copy link
Collaborator

Choose a reason for hiding this comment

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

I think we discussed once and agreed, that we would eventually want to get rid of the generic services/controllers.
The reason I used them was not to introduce many backend changes when I was working alone.

Copy link
Member Author

Choose a reason for hiding this comment

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

Use generic API until we implement Resource annotation for organization.

Copy link
Collaborator

Choose a reason for hiding this comment

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

I think this should be in utils 🤔 although I feel like we have some misplaced components here and there. Could be good to rethink the structure overall.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Or actually, I think it is not a Util, and the directory here should be renamed

Copy link
Collaborator

Choose a reason for hiding this comment

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

I agree we should rethink the structure, because I also found it difficult to find a proper place for a few components/utils.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Same comment as in the previous component

import useQueryParams from 'hooks/useQueryParams';
import Translate from 'utils/Translate';

const Tabs = ({ config }) => {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Is the name of it too "generic"? Could we get a better name for it? Or do you feel like it is ok?

Copy link
Collaborator

@kchelstowski kchelstowski Jan 29, 2024

Choose a reason for hiding this comment

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

Initially it was named as "ProductSupplierTabs", but I got a suggestion from @drodzewicz, that we could eventually use this component for further redesigns (e.g. PO form), hence the name should be more generic.

});
};

const getActions = useCallback((productSupplierId) => (hasPermissionsToProductSourceActions(currentUser, isAdmin) ? [
Copy link
Collaborator

Choose a reason for hiding this comment

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

I think that this hasPermissions should be a "global" / more generic util or hook where you provide required permission and it checks if user has it or not. I don't feel I like writing a separate util or hook for each component/action sense 🤔


import PropTypes from 'prop-types';

const ListFilterFormWrapper = ({ children, className }) => (
Copy link
Collaborator

Choose a reason for hiding this comment

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

There are 6 wrappers that are basically the same differing with only "default" classes that are added to the className:

  1. d-flex flex-column list-page-filters ${className}
  2. d-flex justify-content-end buttons align-items-center ${className}
  3. d-flex list-page-header ${className}
  4. title-text p-3 d-flex justify-content-between align-items-center ${className}
  5. list-page-list-section ${className}
  6. d-flex flex-column list-page-main ${className}

Do you really need all of them?

Copy link
Collaborator

Choose a reason for hiding this comment

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

I agree at the moment it could be one, that would just receive className prop, but I think it is more maintainable with this approach, especially if we'd want to add any element in the specific wrapper and if we want to use it also while creating the forms.


// To have permissions for product source list actions
// user has to be at least admin and has product manager permissions
export const hasPermissionsToProductSourceActions = (user, isAdmin) => {
Copy link
Collaborator

Choose a reason for hiding this comment

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

I feel like this one can be more generic and reused for other things (or turned into hook)


import 'utils/utils.scss';

const CustomConfirmModal = ({
Copy link
Collaborator

Choose a reason for hiding this comment

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

What's that "Custom", why it can't be just "ConfirmModal"?

Copy link
Member Author

@jmiranda jmiranda left a comment

Choose a reason for hiding this comment

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

Just to review the naming for the new params command class.


import org.pih.warehouse.api.PaginationParams

class ProductSupplierListParams extends PaginationParams {
Copy link
Member Author

Choose a reason for hiding this comment

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

@jmiranda to think about naming here.

Copy link
Member Author

Choose a reason for hiding this comment

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

Ok just change the name to PaginationCommand and ProductSupplierFilterCommand.

I think pagination should support totalCount as well.

In fact, for the pagination command, use this implementation as a guide.

https://github.com/bmihovski/grails3asciibooks/blob/64e1b6ee69260ae15af0a19ad409b5733ef9b756/asciibooks/src/main/groovy/com/asciibooks/commands/PaginationCommand.groovy

We probably don't need to handle sort/order now (that probably needs a separate class like SearchCommand anyway).

Copy link
Member Author

Choose a reason for hiding this comment

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

Copy link
Collaborator

Choose a reason for hiding this comment

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

@jmiranda thanks for the review. I will checkout the example you've attached. As for the totalCount, it would be difficult to include it, because it's not a user that we receive this param from, but it's counted after running the createCriteria, so I kinda do not see a use case for that currently.

import apiClient from 'utils/apiClient';

export default {
// TODO: tech debt: Replace by the product api call instead of generic
Copy link
Member Author

Choose a reason for hiding this comment

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

Use generic API until we implement Resource annotation for organization.

kchelstowski and others added 25 commits March 12, 2024 18:42
…4433)

* OBPIH-6013 Change redirect of the product supplier list action, to render the react page

* OBPIH-6013 Add translations for the product supplier list header

* OBPIH-6013 Add new styles and colors for product supplier list page

* OBPIH-6013 Add new react-router route for product supplier list

* OBPIH-6013 Add generic component ListTitle for the title of a list page

* OBPIH-6013 Add generic wrappers for a list page - including whole page wrapper, header wrapper and header's buttons wrapper

* OBPIH-6013 Add product supplier list header components

* OBPIH-6013 Add hooks to get query params and to handle logic of switching tabs on product supplier list
…, filtering, sorting (#4435)

* OBPIH-6015 Fix eslint import error that caused react not building

* OBPIH-6015 Add endpoint to fetch product sources data with pagination, filtering, sorting

* OBPIH-6015 Remove unused imports + remove redundant fallback for offset/max value
* OBPIH-6018 Add package price property to product supplier toJson

* OBPIH-6018 Add translations for labels for the product sources table

* OBPIH-6018 Add an api url for product sources on the react side

* OBPIH-6018 Include new packagePrice property in ProductSupplierListDto

* OBPIH-6018 Add components for product source table

* OBPIH-6018 Remove unused imports + fix eslint in ProductSupplierTabs component

* OBPIH-6018 Add hook for logic of fetching product sources data

* OBPIH-6018 Add generic wrappers for list table

* OBPIH-6018 Fix label for no data text
* OBPIH-6020 Add opening preference type modal and basic structure of it

* OBPIH-6020 Add mapping preference types

* OBPIH-6020 Pass id to the modal component for redirecting

* OBPIH-6020 Override global modal styles

* OBPIH-6020 Add url for editing

* OBPIH-6020 Add translation for modal header

* OBPIH-6020 Changes after review

* OBPIH-6020 Add key
* OBPIH-6014 Add filter fields for product sources list filters

* OBPIH-6014 Add util method to clear query params

* OBPIH-6014 Add components for product sources list filters

* OBPIH-6014 Add methods and services to fetch product and organization from the generic api

* OBPIH-6014 Adjust the hook for product supplier list data to include the filter params

* OBPIH-6014 Add hooks for product sources list filters logic

* OBPIH-6014 Add methods with service calls for fetching the product and organization

* OBPIH-6014 Add sorting by the source name for the product sources list

* OBPIH-6014 Add translations for product sources list filters

* OBPIH-6014 Remove unnecessary spread operator before omitBy method

* OBPIH-6014 Add productSupplier reducer to store the preferenceTypes

* OBPIH-6014 Enable the preferenceType select for the product sources filters

* OBPIH-6014 Add method to fetch the preferenceType options

* OBPIH-6014 Fetch preference types and include it in product sources filters logic

* OBPIH-6014 Refactor preference type options endpoint to include the default preference types (Multiple, None)

* OBPIH-6014 Add default translation for the default preference type options
…unnecessary url mapping (#4442)

* OBPIH-6021 Remove unnecessary url mapping for productSupplier and change the url on the frontend to be in plural form (productSuppliers, not productSupplier)

* OBPIH-6021 Add an api endpoint to delete a product supplier
…ist (fixes after post-code review) (#4449)

* OBPIH-6013 Add an ability to add a custom className for list wrappers

* OBPIH-6013 Make Tabs component reusable

* OBPIH-6013 Rename the color
* OBPIH-6022 Add disabling action dots and add edit and delete actions

* OBPIH-6022 Fix error with toggle data, add redirect to edit page

* OBPIH-6022 Add roles to user json and add checking if user has permission to source list actions

* OBPIH-6022 Add custom modal component

* OBPIH-6022 Add product supplier api on the frontend

* OBPIH-6022 Add styling for custom modal

* OBPIH-6022 Add new button type in global styling

* OBPIH-6022 Add new labels and use custom modal component

* OBPIH-6022 Add hiding modal after delete action

* OBPIH-6022 Sort imports in product supplier list

* OBPIH-6022 Changes after review

* OBPIH-6022 Use confirmAlert

* OBPIH-6022 Changes after review

* OBPIH-6022 Fixes after review

* OBPIH-6022 Move confirmation modal to util function
…ation, sorting (post-code review fixes) (#4457)

* OBPIH-6015 Revert DTO classes and use default Map toJson()

* OBPIH-6015 Move sorting logic to a separate method

* OBPIH-6015 Make the product name column a link that redirects to the stock card page

* OBPIH-6015 Remove default settings for offset and max pagination params

* OBPIH-6015 Include more fields for search field filter on product sources list

* OBPIH-6015 Fix supplier code column and preference type column to display name instead of id of the preference type

* OBPIH-6015 fix conflicts and eslint
* OBPIH-6018 Include supplier code in the supplierName property + add rounding for the packagePrice and unitPrice

* OBPIH-6018 Add export all action + add tooltip for supplier name and supplier code columns

* OBPIH-6018 Add cursor pointer for details/preferenceTypes tabs and the Multiple preference type cell

* OBPIH-6018 Fix filtering by manufacturer.name

* OBPIH-6018 Add link to export the product suppliers

* OBPIH-6018 Include manufacturer in the usedAliases

* OBPIH-6018 Refactor toJson() to return a Map for nested properties

* OBPIH-6018 Refactor show only active field to include inactive
* OBPIH-6022 Add new translations

* OBPIH-6022 Add success message after deleting product supplier

* OBPIH-6022 Add handling sql integrity constraint violation exception

* OBPIH-6022 Hide redirects to product source edit page

* OBPIH-6022 Fixes after review
…4482)

* OBPIH-6014 Fix async select dropdown to be wider for longer labels

* OBPIH-6014 Change state name to dropdownWidth (fix after review)

* OBPIH-6014 Add prop type for the options
* OBPIH-6020 Change font size to smaller

* OBPIH-6020 Fixes after product source review

* OBPIH-6020 Change naming of the argument in hasPermission function
… form (#4489)

* OBPIH-6019 Add openConfirmationModal to exports in useProductSupplierActions hook

* OBPIH-6019 Add new route for create page and change redirects to it

* OBPIH-6019 Rename some list components to be more generic

* OBPIH-6019 Add new translations

* OBPIH-6019 Add redirect button component

* OBPIH-6019 Add hook for create page and create header components

* OBPIH-6019 Add styling and product supplier get url

* OBPIH-6019 Change naming of components

* OBPIH-6019 Add translation hook to create page
* OBPIH-6023 Add reusable Section and Subsection components

* OBPIH-6023 Fixes after review
* OBPIH-6101 Add images for slider

* OBPIH-6101 Add switch component and styling

* OBPIH-6101 Changes after reviews

* OBPIH-6101 Add unique ids to toggles
…create/edit form (#4496)

* OBPIH-6024 Add text field and wrapper for input fields

* OBPIH-6024 Add styling for text input field

* OBPIH-6024 Change redirect argument to passed function

* OBPIH-6024 Changes after review
#4495)

* OBPIH-5832 Rename pagination and filter command and implement validateable interface

* OBPIH-5832 Rename params to command
kchelstowski and others added 26 commits March 12, 2024 18:44
…Fixes after QA) (#4513)

* OBPIH-6014 Add blank constraint to supplier code and source name properties

* OBPIH-6014 Add errors to AdditionalDetails subsection and missing errors to BasicDetails subsection

* OBPIH-6014 Adjust ProductSupplier toJson to return null when no supplier, and to return ratingTypeCode as string

* OBPIH-6014 Fix substitution of rating type code when editing a product supplier

* OBPIH-6014 Fix issue with having validation errors when filling and clearing a non-required select field

* OBPIH-6014 Change translation from Product to Product Name
…able (#4510)

* OBPIH-6109 Create section and subsection for preference type variations

* OBPIH-6109 Adjust form and validation hook

* OBPIH-6109 Create util for differentiate default preference types from others

* OBPIH-6109 Use section and subsection in new form

* OBPIH-6109 Create invalid items indicator

* OBPIH-6109 Create hooks for preference type variations columns

* OBPIH-6109 Add styling

* OBPIH-6109 Fix datepicker format

* OBPIH-6109 Add translations

* OBPIH-6109 Fix styling of v2 input components

* OBPIH-6109 Fix fontSize of react select icons

* OBPIH-6109 Fix placement of datefield component in subsections

* OBPIH-6109 Sort imports

* OBPIH-6109 Fixes after review

* OBPIH-6109 Fixes after review

* OBPIH-6109 Fixes after rebase
#4516)

* OBPIH-6116 Refactor uom options endpoint to be able to receive type param, which filters by uom class

* OBPIH-6116 Remove plural url mapping for currencies
…dpoints (#4518)

* OBPIH-6118 Improve preference type options endpoint

* OBPIH-6115 Create rating type options endpoint

* OBPIH-6118 Fixes after review

* OBPIH-6115 Replace mocked rating type options and use new endpoint

* OBPIH-6115 Use api service in actions

* OBPIH-6115 Add abort controller

* OBPIH-6115 Add missing signal
* OBPIH-6111 Added Section and subsection wrappers for pricing

* OBPIH-6111 Added Package Specification subsection

* OBPIH-6111 Added Fixed price subsection

* OBPIH-6111 Added reducer for UoMs

* OBPIH-6111 Refactor reducer for UoM

* OBPIH-6111 Remove old currency reducer and move it to UoM

* OBPIH-6111 Modified textInput component to handle number decimal formatting

* OBPIH-6111 Fxied Fixed price section validation schema

* OBPIH-6111 Update Pricing section numeric input types and add missing tooltip on input

* OBPIH-6111 Compute eachPrice value from packagePrice and packageSize

* OBPIH-6111 Fix Checkbox component

* OBPIH-6111 Added additional validation to numeric fields

* OBPIH-6111 rename field to uomCode

* OBPIH-6111 Fix datepicker component

* OBPIH-6111 Fix Number Input validation

* OBPIH-6111 rename Unit Of measure variables

* OBPIH-6111 rename minimum order quantity

* OBPIH-6111 Create a custom hook for fetching and accesing PreferenceTypeOptions

* OBPIH-6111 Created a generic useoptionsFetch hook to handle option fetches

* OBPIH-6111 rename properties
* OBPIH-6166 Change current defaultProductPackge to defaultProductPackageDerived

* OBPIH-6166 Add defaultProductPackage column to product supplier table

* OBPIH-6166 Adjust domain changes - add defaultProductPackage association, adjust toJson() with new needed properties, adjust defaultProductPackageDerived to current behavior of toJson()

* OBPIH-6166 Adjust frontend pricing section to pricing endpoint

* OBPIH-6166 Add product package toJson()

* OBPIH-6166 Add endpoint for create/edit product package with pricing

* OBPIH-6166 Change checking the productPackagePrice from checking the truthiness to check if it's null.

* OBPIH-6166 Shorten the validator for contractPriceValidUntil date

* OBPIH-6166 Apply the new behavior of default product package to the product supplier list

* OBPIH-6166 Fix a bug related to passing an empty contractPriceValidUntil
…4520)

* OBPIH-6109 Fix datepicker format

* OBPIH-6109 Add translations

* OBPIH-6109 Fix styling of v2 input components

* OBPIH-6109 Fix placement of datefield component in subsections

* OBPIH-6109 Sort imports

* OBPIH-6110 Create filtering hook

* OBPIH-6110 Adjust showing errors in table

* OBPIH-6110 Change eslint rule to not show error on leading _

* OBPIH-6110 Adjust styling

* OBPIH-6110 Fix time format

* OBPIH-6110 Fix triggering validation and underlining rows

* OBPIH-6110 Add validation for duplicated organzations

* OBPIH-6110 Fix issue with detached dropdown and some styling changes

* OBPIH-6110 Fixes after review

* OBPIH-6110 Changes after review
* OBPIH-6108 Added Default Preference Type section with validation schema and fields

* OBPIH-6108 use preference type options in default preference type select

* OBPIH-6108 Prevented prop drilling case for ratingTypeCodes and moved the access to this value to a subsection that uses this data

* OBPIH-6108 fix default preference type schema type

* OBPIH-6108 set defaultPreferenceType as optional value and send only id in the payload

* OBPIH-6108 use bootstrap grid to align default preference type inputs

* OBPIH-6108 Added placeholders to fields on Default Preference Type
- added styling for placeholder on DateField
- added ability to pass a translation label to placeholder on DateField

* OBPIH-6108 added hasErrors prop to Select and updated defaultPreferenceType validation schema
* 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
…4526)

* OBPIH-6119 Adjust names of properties on the frontend side to align with backend (ability to bind the command automatically)

* OBPIH-6119 Add endpoint to create/edit (both single, and batch) product supplier preference
* OBPIH-6112 add entityTypeCode enum on frontend part

* OBPIH-6112 add attribute service and controller + add attributes property in toJson

* OBPIH-6112 add new translations

* OBPIH-6112 add react redux action for handling attributes

* OBPIH-6112 Add new section

* OBPIH-6112 Handle dynamic form validation

* OBPIH-6112 Add handling submitting values

* OBPIH-6112 Fix triggering validation

* OBPIH-6112 Add mapping default values

* OBPIH-6112 Fix code styling

* OBPIH-6112 Fixes after review
…Fixes after QA) (#4528)

* OBPIH-6110 Fixes for applying filters when there are no errors

* OBPIH-6110 Add resetting scrollbar on button actions
…4531)

* OBPIH-6170 Substitute default preference type when editing a product supplier

* OBPIH-6170 Add an endpoint to delete a product supplier preference
* OBPIH-6114 Add tiered pricing to product supplier

* OBPIH-6114 Set default tiered pricing to false on command
#4532)

* OBPIH-6232 Added hyperlink to source edit page on product source code

* OBPIH-6232 open product stockcard in a new tab

* OBPIH-6232 open stock card page with specified tab open
* OBPIH-5926 Add translations

* OBPIH-5926 Add function for resetting inputted values

* OBPIH-5926 Adjust styling

* OBPIH-5926 Create hook for deleting preferenceType

* OBPIH-6206 Add new translations

* OBPIH-6206 Fix product supplier urls

* OBPIH-6206 Export function for resetting default preference type

* OBPIH-6206 Fix attributes styling

* OBPIH-6206 Add new param to components

* OBPIH-6206 Adjust hook for deleting preference types within the table

* OBPIH-6206 Use the hook in table

* OBPIH-6206 Remove unused property

* OBPIH-6206 Split imports into new lines

* OBPIH-6206 Add onCancel to propTypes and rename selectedRow variable
* OBPIH-6108 Refactor validation schema  sections into separate schemas

* OBPIH-6108 export error types from subsections

* OBPIH-6108 Move Each price calculation into separate hook

* OBPIH-6108 trigger validation on preference type fields when default preference sections has changed

* OBPIH-6108 refactor default values for product sources create form

* OBPIH-6108 Fix issue with clearing default prefference type select

* OBPIH-6108 Fixes after review
- added comments and renamed validation function for Preference type
- moved validation trigger to onBlur on other fields rather than useEffect
…ult Preference Type" filter (#4537)

* OBPIH-6219 Change translation for preference type filter

* OBPIH-6219 Change params in request for listing product suppliers

* OBPIH-6219 Change property in product supplier command

* OBPIH-6219 Add filtering for default product supplier

* OBPIH-6219 Use string assigned to variable instead of hardcoded one
…xes after QA) (#4540)

* OBPIH-6108 trigger validation on PreferenceType when clearing default preference type subsection

* OBPIH-6108 Fix input error message styling on a form
- prevent inputs from jumping when errors appear under the input

* OBPIH-6108 chnage optional and null to nullish
* OBPIH-6108 Add missing id on default preference type

* OBPIH-6108 Fix imports linter errors
…t page when user has sufficient roles (#4539)

* OBPIH-6232 created useUserHasPermissions hook for checking if user is authorized with minimum required roles

* OBPIH-6232 return user current logged in location roles in app context

* OBPIH-6232 Update UserHasPermission hook with users current location roles

* OBPIH-6232 use useUserHasPermission hook on list actions

* OBPIH-6232 added comments to useuserHasPermission hook to document its functionality

* OBPIH-6232 update hook dependency array

* OBPIH-6232 use new useUserHasPermission hook instead of permissionsUtils in other places and remove permission util
* OBPIH-6112 Add validation for empty strings and add filtering for active attributes

* OBPIH-6112 Add new translations

* OBPIH-6112 Add new props and create variables for new modal

* OBPIH-6112 Add new modal

* OBPIH-6112 Handle attribute without options and allow Other

* OBPIH-6112 Change query in AttributeService

* OBPIH-6112 Changes after review
…butes (#4538)

* OBPIH-6163 Add translations for validation messages

* OBPIH-6163 Add a bulk endpoint for create/update/delete product attributes

* OBPIH-6163 Fixes after review
…4542)

* OBPIH-5926 Add tooltip and fix issue with canceling modal

* OBPIH-5926 Fix clearing defaultPreferenceTypes filter
@awalkowiak awalkowiak force-pushed the feature/product-supplier-list-redesign branch from f482fb3 to f71f5c3 Compare March 12, 2024 17:58
@awalkowiak awalkowiak merged commit 3512a70 into feature/upgrade-to-grails-3.3.10 Mar 12, 2024
2 checks passed
@awalkowiak awalkowiak deleted the feature/product-supplier-list-redesign branch March 12, 2024 18:14
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.

None yet

5 participants