-
Notifications
You must be signed in to change notification settings - Fork 50
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
(refactor):03-4505-Refactor stock operations forms for ease of maintenance #258
base: main
Are you sure you want to change the base?
Conversation
…ents for conditional rendering
…ce base operation detail form by making conditional rendering of fields and ensuring autofeeling
…ce to empty state add buton and launching well
…ockOperationItemCell, enhance StockAvailability with error handling and loading states
…mission step component
…uttons in stock operation submission form
…ement in stock operations;seperate concerns on hook
…utility functions for object manipulation
… item form; clean up batch no selector
…nd improve styling; refactor stock operation issue button
…user and batch number selectors
…enhance unit tests for better coverage
…user selectors; improve mock implementations
…ration form utility functions
… operation form with additional tab functionality
…in stock operation forms;Fix undefined bug in operation form submision
@@ -24,15 +24,11 @@ interface BatchNoSelectorProps<T> { | |||
|
|||
const BatchNoSelector = <T,>(props: BatchNoSelectorProps<T>) => { | |||
const { isLoading, stockItemBatchNos } = useStockItemBatchNos(props.stockItemUuid); | |||
console.log('stockItemBatchNos', stockItemBatchNos); |
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.
can we remove this console log
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.
Ok,sure.Its even an older copy which is used to derive the improved one hence it unused and forgot to remove it.all cleaned up now
…ir styles and tests
…ing it with refactored version
@@ -0,0 +1,39 @@ | |||
import React from 'react'; | |||
|
|||
export const EmptyDataIllustration = ({ width = '64', height = '64' }) => { |
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.
@Omoshlawi i am thiinking we use empty state from framework instead of duplicating efforts
handleAdd?: () => void; | ||
message: string; | ||
}; | ||
const EmptyState: React.FC<Props> = ({ headerTitle, handleAdd, message }) => { |
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.
same as here
const response: FetchResponse<StockOperationDTO> = await (isEditing ? updateStockOperation : createStockOperation)( | ||
payload, | ||
); | ||
// const response: FetchResponse<StockOperationDTO> = await (isEditing ? updateStockOperation : createStockOperation)( |
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.
incase this is not required anymore we can remove it making sure its alternative implementation works as was before
Requirements
Summary
autofill-responsible.person.mp4
responsible-person-other.mp4
resp0nsible-person-other-edit-mode.mp4
update-operation-add-items.mp4
update-stock-operation-delete-items.mp4
** Component Coupling Issues: **
** State management issues: **
** Unused code segments **
-Inconsistent UI patterns affecting user experience
Screenshots
Related Issue
Other